Browse Source

生产条码清单管理代码修改

master_hella_20240701
chenfang 8 months ago
parent
commit
c98ce8d881
  1. 17
      src/views/wms/buttMesManage/mesBarCode/index.vue
  2. 6
      src/views/wms/buttMesManage/mesBarCode/mesBarCode.data.ts

17
src/views/wms/buttMesManage/mesBarCode/index.vue

@ -27,9 +27,9 @@
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #code="{row}"> <template #plnt="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> <el-button type="primary" link @click="openDetail(row, '代码', row.plnt)">
<span>{{ row.code }}</span> <span>{{ row.plnt }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
@ -154,17 +154,6 @@ const openForm = (type: string, row?: any) => {
// form // form
const formsSuccess = async (formType,data) => { const formsSuccess = async (formType,data) => {
var isHave =MesBarCode.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') { if (formType === 'create') {
await MesBarCodeApi.createMesBarCode(data) await MesBarCodeApi.createMesBarCode(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))

6
src/views/wms/buttMesManage/mesBarCode/mesBarCode.data.ts

@ -9,7 +9,7 @@ export const MesBarCodeRules = reactive({
export const MesBarCode = useCrudSchemas(reactive<CrudSchema[]>([ export const MesBarCode = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: 'Plnt', label: 'Plnt',
field: 'plat', field: 'plnt',
sort: 'custom', sort: 'custom',
table: { table: {
width: 120 width: 120
@ -26,6 +26,7 @@ export const MesBarCode = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isSearch:true
}, },
{ {
label: 'SIGN', label: 'SIGN',
@ -74,9 +75,6 @@ export const MesBarCode = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 120 width: 120
}, },
form: {
component: 'SelectV2'
},
}, },
{ {
label: 'Length BC', label: 'Length BC',

Loading…
Cancel
Save