From aadbbe2e76ea0b8908b8e05298d7f5cac08d83cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=BB=E7=A0=96-JAVA=5CAdministrator?= <591141169@qq.com> Date: Fri, 22 Mar 2024 17:38:14 +0800 Subject: [PATCH] =?UTF-8?q?BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eam/item/itemAccounts/itemAccounts.data.ts | 5 ++++- src/views/eam/item/itemApplyMain/index.vue | 16 +++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/views/eam/item/itemAccounts/itemAccounts.data.ts b/src/views/eam/item/itemAccounts/itemAccounts.data.ts index dfbc5b6..d0d85af 100644 --- a/src/views/eam/item/itemAccounts/itemAccounts.data.ts +++ b/src/views/eam/item/itemAccounts/itemAccounts.data.ts @@ -164,11 +164,12 @@ export const ItemAccounts = useCrudSchemas(reactive([ field: 'itemDO.financer', sort: 'custom', }, - { + { label: '是否以旧换新', field: 'itemDO.isRadeIn', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', + isSearch: false, isTable: true, sort: 'custom', table: { @@ -188,6 +189,8 @@ export const ItemAccounts = useCrudSchemas(reactive([ } } }, + + { label: '是否可用', field: 'available', diff --git a/src/views/eam/item/itemApplyMain/index.vue b/src/views/eam/item/itemApplyMain/index.vue index 58811c6..0800d72 100644 --- a/src/views/eam/item/itemApplyMain/index.vue +++ b/src/views/eam/item/itemApplyMain/index.vue @@ -31,7 +31,7 @@ :tableAllSchemas="ItemApplyDetail.allSchemas" :tableFormRules="ItemApplyDetailRules" :tableData="tableData" :apiUpdate="ItemApplyMainApi.updateItemApplyMain" :apiCreate="ItemApplyMainApi.createItemApplyMain" :isBusiness="true" @handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" - @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" /> + @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" @formSelectChange='formSelectChange' /> { nextTick(async () => { if (type == 'tableForm') { - console.log(formField); // 明细查询页赋值 if (formField == 'itemNumber') { let subList = tableData.value @@ -102,7 +101,7 @@ } if (formField == 'deviceNumber') { row['deviceNumber'] = val[0]['number'] - } + } } else { const setV = {} setV[formField] = val[0][searchField] @@ -122,9 +121,14 @@ setV['available'] = val[0]['available'] } else if (formField == 'deviceNumber') { setV['deviceNumber'] = val[0]['number'] - } + } formRef.setValues(setV) }) + } + const formSelectChange = (field, val, row) => { + if (field == 'type') { + row['deviceNumber'] = "" + } } // 子表新增的时候选择表格之后需要会显得字段 @@ -167,9 +171,7 @@ } else if (val == 'refresh') { // 刷新 getList() } else if (val == 'filtrate') { // 筛选 - } else { // 其他按钮 - console.log('其他按钮', item) - } + } } // 根据状态返回该按钮是否显示