From 49b36a8ebb9892843debbac8dfb9c12fe9b5ca7f Mon Sep 17 00:00:00 2001 From: yufei_wang <2267742828@qq.com> Date: Wed, 16 Oct 2024 14:55:07 +0800 Subject: [PATCH] =?UTF-8?q?HL-6285WMS=20=E9=A2=84=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E3=80=81=E8=A3=85=E9=85=8D=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E3=80=81=E8=A3=85=E9=85=8D=E6=94=B6=E8=B4=A7=E3=80=81=E8=A3=85?= =?UTF-8?q?=E9=85=8D=E5=A4=87=E4=BB=B6=E8=AE=A1=E5=88=92=E3=80=81=E9=A2=84?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E5=A4=87=E4=BB=B6=E8=AE=A1=E5=88=92=E3=80=81?= =?UTF-8?q?=E9=A2=84=E7=94=9F=E4=BA=A7=E6=94=B6=E8=B4=A7=20=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E6=96=B0=E5=A2=9E=E6=97=B6=EF=BC=8C1.=20=E9=87=8D?= =?UTF-8?q?=E6=96=B0=E9=80=89=E6=8B=A9=E8=BD=A6=E9=97=B4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E7=8F=AD=E7=BB=84=E4=BF=A1=E6=81=AF=E5=BA=94?= =?UTF-8?q?=E8=AF=A5=E6=B8=85=E7=A9=BA=202.=E7=8F=AD=E7=BB=84=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E8=A6=81=E6=A0=B9=E6=8D=AE=E7=94=9F=E4=BA=A7=E7=BA=BF?= =?UTF-8?q?=E7=9A=84=E9=80=89=E6=8B=A9=E8=BF=9B=E8=A1=8C=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productionplan/productionMain/index.vue | 35 +++++++++++++------ .../productionMain/productionMain.data.ts | 7 +++- .../productionMainAssemble/index.vue | 35 +++++++++++++------ .../productionMainAssemble.data.ts | 7 +++- .../productionMainAssembleSparePart/index.vue | 35 +++++++++++++------ .../productionMainAssembleSparePart.data.ts | 5 +++ .../productionMainPredictSparePart/index.vue | 35 +++++++++++++------ .../productionMainPredictSparePart.data.ts | 5 +++ 8 files changed, 122 insertions(+), 42 deletions(-) diff --git a/src/views/wms/productionManage/productionplan/productionMain/index.vue b/src/views/wms/productionManage/productionplan/productionMain/index.vue index 7abcdd087..41b7f8a5f 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMain/index.vue @@ -58,6 +58,7 @@ :isShowReduceButtonSelection="true" @tableSelectionDelete="tableSelectionDelete" @searchTableSuccess="searchTableSuccess" + @clearSearchInput="clearSearchInput" @submitForm="submitForm" /> @@ -108,7 +109,23 @@ const tableColumns = ref([...ProductionMain.allSchemas.tableColumns,...Productio const updataTableColumns = (val) => { tableColumns.value = val } - +const clearSearchInput = (field)=>{ + console.log('field',field) + if('workshop' == field){ + //车间代码 + formRef.value.formRef.setValues({ + productionLine: '', + team:'' + }) + tableData.value = [] + }else if('productionLine' == field){ + // 生产线 + formRef.value.formRef.setValues({ + team:'' + }) + tableData.value = [] + } +} // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { nextTick(async() => { @@ -158,18 +175,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => } } else { const setV = {} + setV[formField] = val[0][searchField] if(formField == 'workshop'){ setV['workshop'] = val[0]['code'] setV['productionLine'] = '' - if(tableData.value){ - tableData.value.forEach(item => { - item.itemCode ='' - item.bomVersion = '' - item.uom = '' - }) - } - }else{ - setV[formField] = val[0][searchField] + setV['team'] = '' + tableData.value = [] + } else if(formField == 'productionLine'){ + // 生产线 + setV['team'] = '' + tableData.value = [] } formRef.setValues(setV) } diff --git a/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts b/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts index 76e26ea30..d4b04bec4 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts @@ -187,7 +187,12 @@ export const ProductionMain = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false - }], + },{ + key: 'productionLineCode', + value: 'productionLine', + message: '请填写生产线代码!', + isMainValue: true + }], verificationParams: [{ key: 'code', action: '==', diff --git a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue index a5335ec3c..086782113 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue @@ -58,6 +58,7 @@ :isShowReduceButtonSelection="true" @tableSelectionDelete="tableSelectionDelete" @searchTableSuccess="searchTableSuccess" + @clearSearchInput="clearSearchInput" @submitForm="submitForm" /> @@ -107,7 +108,23 @@ const tableColumns = ref([...ProductionMain.allSchemas.tableColumns,...Productio const updataTableColumns = (val) => { tableColumns.value = val } - +const clearSearchInput = (field)=>{ + console.log('field',field) + if('workshop' == field){ + //车间代码 + formRef.value.formRef.setValues({ + productionLine: '', + team:'' + }) + tableData.value = [] + }else if('productionLine' == field){ + // 生产线 + formRef.value.formRef.setValues({ + team:'' + }) + tableData.value = [] + } +} // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { nextTick(async() => { @@ -157,18 +174,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => } else { const setV = {} + setV[formField] = val[0][searchField] if(formField == 'workshop'){ setV['workshop'] = val[0]['code'] setV['productionLine'] = '' - if(tableData.value){ - tableData.value.forEach(item => { - item.itemCode ='' - item.bomVersion = '' - item.uom = '' - }) - } - }else{ - setV[formField] = val[0][searchField] + setV['team'] = '' + tableData.value = [] + } else if(formField == 'productionLine'){ + // 生产线 + setV['team'] = '' + tableData.value = [] } formRef.setValues(setV) } diff --git a/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts b/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts index 7b43f9b8d..e821fef80 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts @@ -186,7 +186,12 @@ export const ProductionMain = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false - }], + },{ + key: 'productionLineCode', + value: 'productionLine', + message: '请填生产线代码!', + isMainValue: true + }], verificationParams: [{ key: 'code', action: '==', diff --git a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue index 5f1d7a00b..ba0f049c1 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue @@ -58,6 +58,7 @@ :isShowReduceButtonSelection="true" @tableSelectionDelete="tableSelectionDelete" @searchTableSuccess="searchTableSuccess" + @clearSearchInput="clearSearchInput" @submitForm="submitForm" /> @@ -107,7 +108,23 @@ const tableColumns = ref([...ProductionMain.allSchemas.tableColumns,...Productio const updataTableColumns = (val) => { tableColumns.value = val } - +const clearSearchInput = (field)=>{ + console.log('field',field) + if('workshop' == field){ + //车间代码 + formRef.value.formRef.setValues({ + productionLine: '', + team:'' + }) + tableData.value = [] + }else if('productionLine' == field){ + // 生产线 + formRef.value.formRef.setValues({ + team:'' + }) + tableData.value = [] + } +} // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { nextTick(async() => { @@ -149,18 +166,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => } } else { const setV = {} + setV[formField] = val[0][searchField] if(formField == 'workshop'){ setV['workshop'] = val[0]['code'] setV['productionLine'] = '' - if(tableData.value){ - tableData.value.forEach(item => { - item.itemCode ='' - item.bomVersion = '' - item.uom = '' - }) - } - }else{ - setV[formField] = val[0][searchField] + setV['team'] = '' + tableData.value = [] + } else if(formField == 'productionLine'){ + // 生产线 + setV['team'] = '' + tableData.value = [] } formRef.setValues(setV) } diff --git a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts index de69f82d7..101c6be8b 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts @@ -190,6 +190,11 @@ export const ProductionMain = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false + },{ + key: 'productionLineCode', + value: 'productionLine', + message: '请填生产线代码!', + isMainValue: true }], verificationParams: [{ key: 'code', diff --git a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue index a75670988..d17f8c5cf 100644 --- a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue @@ -58,6 +58,7 @@ :isShowReduceButtonSelection="true" @tableSelectionDelete="tableSelectionDelete" @searchTableSuccess="searchTableSuccess" + @clearSearchInput="clearSearchInput" @submitForm="submitForm" /> @@ -107,7 +108,23 @@ const tableColumns = ref([...ProductionMain.allSchemas.tableColumns,...Productio const updataTableColumns = (val) => { tableColumns.value = val } - +const clearSearchInput = (field)=>{ + console.log('field',field) + if('workshop' == field){ + //车间代码 + formRef.value.formRef.setValues({ + productionLine: '', + team:'' + }) + tableData.value = [] + }else if('productionLine' == field){ + // 生产线 + formRef.value.formRef.setValues({ + team:'' + }) + tableData.value = [] + } +} // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { nextTick(async() => { @@ -149,18 +166,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => } } else { const setV = {} + setV[formField] = val[0][searchField] if(formField == 'workshop'){ setV['workshop'] = val[0]['code'] setV['productionLine'] = '' - if(tableData.value){ - tableData.value.forEach(item => { - item.itemCode ='' - item.bomVersion = '' - item.uom = '' - }) - } - }else{ - setV[formField] = val[0][searchField] + setV['team'] = '' + tableData.value = [] + } else if(formField == 'productionLine'){ + // 生产线 + setV['team'] = '' + tableData.value = [] } formRef.setValues(setV) } diff --git a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts index 11019d913..dd647d7af 100644 --- a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts @@ -186,6 +186,11 @@ export const ProductionMain = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false + },{ + key: 'productionLineCode', + value: 'productionLine', + message: '请填生产线代码!', + isMainValue: true }], verificationParams: [{ key: 'code',