From 43e115a7de2c763c36d79e610a3abb1d833ea892 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期一, 05 八月 2024 10:21:52 +0800
Subject: [PATCH] 修改发货报表
---
north-glass-erp/northglass-erp/src/views/pp/productionBasicData/SelectProductionBasicData.vue | 50 ++++++++++++++++++++++++++++++++++----------------
1 files changed, 34 insertions(+), 16 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/pp/productionBasicData/SelectProductionBasicData.vue b/north-glass-erp/northglass-erp/src/views/pp/productionBasicData/SelectProductionBasicData.vue
index a44f8c2..771d29e 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/productionBasicData/SelectProductionBasicData.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/productionBasicData/SelectProductionBasicData.vue
@@ -7,8 +7,11 @@
import {ElMessage} from "element-plus";
import { useI18n } from 'vue-i18n'
import {changeFilterEvent, filterChanged} from "@/hook"
+import useUserInfoStore from '@/stores/userInfo'
+
//璇█鑾峰彇
const { t } = useI18n()
+const userStore = useUserInfoStore()
let router=useRouter()
//瀹氫箟鏁版嵁杩斿洖缁撴灉
let produceList = ref([])
@@ -74,6 +77,11 @@
return count.toFixed(2)
}
+const hasDecimal = (value) => {
+ const regex = /\./; // 瀹氫箟姝e垯琛ㄨ揪寮忥紝鏌ユ壘灏忔暟鐐�
+ return regex.test(value); // 杩斿洖true/false
+}
+
//棣栨鍔犺浇
request.post(`/basicDataProduce/selectBasic`).then((res) => {
if (res.code == 200) {
@@ -118,11 +126,11 @@
},//琛ㄥご鍙傛暟
columns:[
{type:'expand',fixed:"left",slots: { content:'content' },width: 50},
- {title: '鎿嶄綔', width: 140, slots: { default: 'button_slot' },fixed:"left"},
- {field: 'id', width: 60, title: 'id',filters:[{ data: '' }],slots: { filter: 'num1_filter' },},
- {field: 'basic_type',width: 370, title: '绫诲瀷', showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
- {field: 'basic_name', width: 330,title: '鍚嶇О', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
- {field: 'd_basic_name',width: 330, title: '绫诲埆',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {title: t('basicData.operate'), width: 140, slots: { default: 'button_slot' },fixed:"left"},
+ {field: 'id', width: 60, title: t('productionBasicData.id'),filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged,},
+ {field: 'basic_type',width: 370, title: t('machine.type'), showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged},
+ {field: 'basic_name', width: 330,title: t('orderBasicData.name'), filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged},
+ {field: 'd_basic_name',width: 330, title: t('productionBasicData.basicName')},
],
//琛ㄥご鎸夐挳
toolbarConfig: {
@@ -179,7 +187,6 @@
<div class="main-div-customer">
<vxe-grid
max-height="100%"
- @filter-change="filterChanged"
class="mytable-scrollbar"
ref="xGrid"
v-bind="gridOptions"
@@ -200,14 +207,25 @@
<!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
<template #button_slot="{ row }">
- <el-button @click="getTableRow(row,'edit');" link type="primary" size="small">{{$t('basicData.edit')}}</el-button>
- <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">鍒犻櫎</el-button>
+<!-- <el-button @click="getTableRow(row,'edit');" link type="primary" size="small">{{$t('basicData.edit')}}</el-button>-->
+ <el-button @click="getTableRow(row,'edit')"
+ v-if="userStore.user.permissions.indexOf('SelectProductionBasicData.edit') > -1"
+ link
+ type="primary"
+ size="small">
+ {{ $t('basicData.edit') }}
+ </el-button>
+ <el-popconfirm @confirm="getTableRow(row,'delete')" :title="$t('searchOrder.deleteConfirm')">
+ <template #reference>
+ <el-button link type="primary" size="small">{{ $t('basicData.delete') }}</el-button>
+ </template>
+ </el-popconfirm>
</template>
<template #num1_filter="{ column, $panel }">
<div>
<div v-for="(option, index) in column.filters" :key="index">
- <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/>
+ <input type="text" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/>
</div>
</div>
</template>
@@ -215,10 +233,10 @@
</vxe-grid>
- <el-dialog v-model="dialogTableVisible" title="鍩虹鏁版嵁淇敼">
+ <el-dialog v-model="dialogTableVisible" :title="$t('productionBasicData.basicDataEdit')">
<el-row>
<el-col :span="2">
- <el-text>id锛�</el-text>
+ <el-text>{{$t('productionBasicData.id')}}锛�</el-text>
</el-col>
<el-col :span="3">
<el-input v-model="getBasicData.id" readonly autocomplete="off" style="width: 220px"/>
@@ -226,7 +244,7 @@
</el-row>
<el-row>
<el-col :span="2">
- <el-text>绫诲瀷锛�</el-text>
+ <el-text>{{$t('machine.type')}}锛�</el-text>
</el-col>
<el-col :span="3">
<el-input v-model="getBasicData.basic_type" readonly autocomplete="off" style="width: 220px"/>
@@ -234,7 +252,7 @@
</el-row>
<el-row>
<el-col :span="2">
- <el-text>鍚嶇О锛�</el-text>
+ <el-text>{{$t('orderBasicData.name')}}锛�</el-text>
</el-col>
<el-col :span="3">
<el-input v-model="getBasicData.basic_name" autocomplete="off" style="width: 220px"/>
@@ -242,7 +260,7 @@
</el-row>
<el-row>
<el-col :span="2">
- <el-text>绫诲埆锛�</el-text>
+ <el-text>{{$t('productionBasicData.basicName')}}锛�</el-text>
</el-col>
<el-col :span="3">
<!-- <el-input v-model="getBasicData.d_basic_name" autocomplete="off" style="width: 220px"/>-->
@@ -260,9 +278,9 @@
<template #footer>
<span class="dialog-footer">
- <el-button @click="dialogTableVisible = false">鍙栨秷</el-button>
+ <el-button @click="dialogTableVisible = false">{{$t('basicData.cancelButtonText')}}</el-button>
<el-button type="primary" @click="updateBasic">
- 淇敼
+ {{$t('basicData.update')}}
</el-button>
</span>
</template>
--
Gitblit v1.8.0