From 5b1d705538eb78cf04dc57681c6e2eb5be91fe21 Mon Sep 17 00:00:00 2001 From: lidm0086 Date: Thu, 6 Jun 2024 17:27:14 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E8=AE=A1=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productionplan/productionMain/index.vue | 19 +++++++++++++----- .../productionMain/productionMain.data.ts | 14 ++++++------- .../productionMainAssemble/index.vue | 20 ++++++++++++++----- .../productionMainAssemble.data.ts | 8 ++++---- .../productionMainAssembleSparePart/index.vue | 20 ++++++++++++++----- .../productionMainAssembleSparePart.data.ts | 10 +++++----- .../productionMainPredictSparePart/index.vue | 19 +++++++++++++----- .../productionMainPredictSparePart.data.ts | 12 +++++------ 8 files changed, 80 insertions(+), 42 deletions(-) diff --git a/src/views/wms/productionManage/productionplan/productionMain/index.vue b/src/views/wms/productionManage/productionplan/productionMain/index.vue index 60a317857..4d1503c0a 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMain/index.vue @@ -76,7 +76,7 @@ /> - @@ -361,7 +361,7 @@ const buttonTableClick = async (val, row) => { } else if (val == 'delete') { // 删除 handleDelete(row.masterId) } - + } /** 添加/修改操作 */ @@ -499,10 +499,19 @@ const importSuccess = () => { // 筛选提交 const searchFormClick = (searchData) => { - tableObject.params = { - isSearch: true, - filters: searchData.filters + tableObject.params.isSearch = true + if(!searchData.filters){//重置的时候应用 + searchData.filters = [] + } + let filters = [...searchData.filters] + if(!filters.find(item=>item.column=='plan_type')){ + filters = [...filters,{ + action:'==', + column:'plan_type', + value:'predict', + }] } + tableObject.params.filters = filters getList() // 刷新当前列表 } diff --git a/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts b/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts index e8b547ebc..63d0981a2 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts @@ -307,7 +307,7 @@ export const ProductionMain = useCrudSchemas(reactive([ }, isForm: false, }, - + { label: '备注', field: 'remark', @@ -651,7 +651,7 @@ export const ProductionDetail = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false - }], + }], }, }, { @@ -833,8 +833,8 @@ export const ProductionDetail = useCrudSchemas(reactive([ field: 'available', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isSearch: true, - isTable: true, + isSearch: false, + isTable: false, sort: 'custom', table: { width: 150 @@ -852,8 +852,8 @@ export const ProductionDetail = useCrudSchemas(reactive([ type: 'Select', default: 'TRUE' }, - // isTableForm: false, - // isForm: false + isTableForm: false, + isForm: false }, { label: '单据号', @@ -914,7 +914,7 @@ export const ProductionDetail = useCrudSchemas(reactive([ isTableForm: false, isForm: false, }, - + { label: '操作', hiddenInMain:true, diff --git a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue index cb2e711bd..4c0d3956b 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue @@ -74,7 +74,7 @@ /> - @@ -349,7 +349,7 @@ const buttonTableClick = async (val, row) => { } else if (val == 'delete') { // 删除 handleDelete(row.masterId) } - + } /** 添加/修改操作 */ @@ -487,10 +487,20 @@ const importSuccess = () => { // 筛选提交 const searchFormClick = (searchData) => { - tableObject.params = { - isSearch: true, - filters: searchData.filters + tableObject.params.isSearch = true + if(!searchData.filters){//重置的时候应用 + searchData.filters = [] + } + let filters = [...searchData.filters] + console.log('searchData',routeName.value); + if(!filters.find(item=>item.column=='plan_type')){ + filters = [...filters,{ + action:'==', + column:'plan_type', + value:'assemble', + }] } + tableObject.params.filters = filters getList() // 刷新当前列表 } diff --git a/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts b/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts index 42815a1fb..f4489f8d2 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts @@ -298,7 +298,7 @@ export const ProductionMain = useCrudSchemas(reactive([ }, isForm: false, }, - + { label: '备注', field: 'remark', @@ -641,7 +641,7 @@ export const ProductionDetail = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false - }], + }], }, }, { @@ -820,8 +820,8 @@ export const ProductionDetail = useCrudSchemas(reactive([ field: 'available', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isSearch: true, - isTable: true, + isSearch: false, + isTable: false, sort: 'custom', table: { width: 150 diff --git a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue index 71a77f15a..1e078b89c 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue @@ -74,7 +74,7 @@ /> - @@ -349,7 +349,7 @@ const buttonTableClick = async (val, row) => { } else if (val == 'delete') { // 删除 handleDelete(row.masterId) } - + } /** 添加/修改操作 */ @@ -486,10 +486,20 @@ const importSuccess = () => { // 筛选提交 const searchFormClick = (searchData) => { - tableObject.params = { - isSearch: true, - filters: searchData.filters + tableObject.params.isSearch = true + if(!searchData.filters){//重置的时候应用 + searchData.filters = [] + } + let filters = [...searchData.filters] + console.log('searchData',routeName.value); + if(!filters.find(item=>item.column=='plan_type')){ + filters = [...filters,{ + action:'==', + column:'plan_type', + value:'assembleSparePart', + }] } + tableObject.params.filters = filters getList() // 刷新当前列表 } diff --git a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts index 08b6d9f17..670e4f9f0 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts @@ -298,7 +298,7 @@ export const ProductionMain = useCrudSchemas(reactive([ isTable: false, isForm: false, }, - + { label: '备注', field: 'remark', @@ -641,7 +641,7 @@ export const ProductionDetail = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false - }], + }], }, }, { @@ -820,8 +820,8 @@ export const ProductionDetail = useCrudSchemas(reactive([ field: 'available', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isSearch: true, - isTable: true, + isSearch: false, + isTable: false, sort: 'custom', table: { width: 150 @@ -901,7 +901,7 @@ export const ProductionDetail = useCrudSchemas(reactive([ isTableForm: false, isForm: false, }, - + { label: '操作', hiddenInMain:true, diff --git a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue index e62017597..164a58c10 100644 --- a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue @@ -74,7 +74,7 @@ /> - @@ -349,7 +349,7 @@ const buttonTableClick = async (val, row) => { } else if (val == 'delete') { // 删除 handleDelete(row.masterId) } - + } /** 添加/修改操作 */ @@ -487,10 +487,19 @@ const importSuccess = () => { // 筛选提交 const searchFormClick = (searchData) => { - tableObject.params = { - isSearch: true, - filters: searchData.filters + tableObject.params.isSearch = true + if(!searchData.filters){//重置的时候应用 + searchData.filters = [] + } + let filters = [...searchData.filters] + if(!filters.find(item=>item.column=='plan_type')){ + filters = [...filters,{ + action:'==', + column:'plan_type', + value:'predictSparePart', + }] } + tableObject.params.filters = filters getList() // 刷新当前列表 } diff --git a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts index a8d893c0a..d5bac9614 100644 --- a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts @@ -195,7 +195,7 @@ export const ProductionMain = useCrudSchemas(reactive([ } } }, - + { label: '物料代码', field: 'detailItemCode', @@ -299,7 +299,7 @@ export const ProductionMain = useCrudSchemas(reactive([ }, isForm: false, }, - + { label: '备注', field: 'remark', @@ -642,7 +642,7 @@ export const ProductionDetail = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false - }], + }], }, }, { @@ -792,7 +792,7 @@ export const ProductionDetail = useCrudSchemas(reactive([ isTableForm: false, isForm: false, }, - + { label: '创建时间', field: 'createTime', @@ -822,8 +822,8 @@ export const ProductionDetail = useCrudSchemas(reactive([ field: 'available', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isSearch: true, - isTable: true, + isSearch: false, + isTable: false, hiddenInMain: true, sort: 'custom', table: {