From 4626369a9eb851db65d894caf2a3edf894f6685e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=BB=E7=A0=96-JAVA=5CAdministrator?= <591141169@qq.com> Date: Fri, 21 Jun 2024 09:29:51 +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/itemAccounts/itemAccounts.data.ts | 2 +- .../SparePartsApply.data.ts | 57 +++++++++++++++---- src/views/eam/sparePartsApplyMain/index.vue | 25 +++++--- src/views/eam/sparepartsinlocation/index.vue | 2 - .../SparePartsOutLocation.data.ts | 57 +++++++++++++++---- 5 files changed, 110 insertions(+), 33 deletions(-) diff --git a/src/views/eam/itemAccounts/itemAccounts.data.ts b/src/views/eam/itemAccounts/itemAccounts.data.ts index 0f1284160..cdafeec23 100644 --- a/src/views/eam/itemAccounts/itemAccounts.data.ts +++ b/src/views/eam/itemAccounts/itemAccounts.data.ts @@ -141,7 +141,7 @@ export const ItemAccounts = useCrudSchemas( label: '库区编号', field: 'areaNumber', sort: 'custom', - isTable: false, + isTable: true, isSearch: true, table: { width: 180 diff --git a/src/views/eam/sparePartsApplyMain/SparePartsApply.data.ts b/src/views/eam/sparePartsApplyMain/SparePartsApply.data.ts index 19a1a537a..287a1e917 100644 --- a/src/views/eam/sparePartsApplyMain/SparePartsApply.data.ts +++ b/src/views/eam/sparePartsApplyMain/SparePartsApply.data.ts @@ -230,19 +230,17 @@ export const SparePartsApplyMainRules = reactive({ export const SparePartsApplyDetail = useCrudSchemas( reactive([ { - label: '备件编号', - field: 'sparePartsCode', + label: '库位编号', + field: 'locationCode', sort: 'custom', - table: { - width: 150 - }, + isSearch: false, form: { - // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择备件编号', // 输入框占位文本 - searchField: 'itemNumber', // 查询弹窗赋值字段 - searchTitle: '备件信息', // 查询弹窗标题 + searchListPlaceholder: '请选择库位编号', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类 searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法 searchCondition: [ @@ -259,6 +257,7 @@ export const SparePartsApplyDetail = useCrudSchemas( searchListPlaceholder: '请选择备件编号', // 输入框占位文本 searchField: 'itemNumber', // 查询弹窗赋值字段 searchTitle: '备件信息', // 查询弹窗标题 + searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类 searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法 searchCondition: [ @@ -270,7 +269,36 @@ export const SparePartsApplyDetail = useCrudSchemas( ] } }, - + { + label: '库区编号', + field: 'areaCode', + sort: 'custom', + isSearch: false, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled: true + } + }, + { + label: '备件编号', + field: 'sparePartsCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled: true + } + }, { label: '库存数量', field: 'currentQty', @@ -278,7 +306,14 @@ export const SparePartsApplyDetail = useCrudSchemas( isSearch: false, tableForm: { disabled: true - } + }, + form: { + componentProps: { + disabled: true + } + }, + isDetail: false, + isTable: false }, { label: '申领数量', diff --git a/src/views/eam/sparePartsApplyMain/index.vue b/src/views/eam/sparePartsApplyMain/index.vue index 526ca9dc1..ddb76807f 100644 --- a/src/views/eam/sparePartsApplyMain/index.vue +++ b/src/views/eam/sparePartsApplyMain/index.vue @@ -132,18 +132,27 @@ const updataTableColumns = (val) => { // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { nextTick(() => { - nextTick(() => { - const setV = {} - setV[formField] = val[0][searchField] - if (formField == 'sparePartsCode') { + const setV = {} + setV[formField] = val[0][searchField] + console.log(11, val[0]) + if (type == 'tableForm') { + if (formField == 'locationCode') { + row['locationCode'] = val[0].locationNumber + row['areaCode'] = val[0].areaNumber row['sparePartsCode'] = val[0].itemNumber row['currentQty'] = val[0].qty + row['isRadeIn'] = val[0].isRadeIn } - if (formField == 'equipmentCode') { - row['equipmentCode'] = val[0].code + } else { + if (formField == 'locationCode') { + setV['locationCode'] = val[0].locationNumber + setV['areaCode'] = val[0].areaNumber + setV['sparePartsCode'] = val[0].itemNumber + setV['currentQty'] = val[0].qty + setV['isRadeIn'] = val[0].isRadeIn } - formRef.setValues(setV) - }) + } + formRef.setValues(setV) }) } // 查询页面返回——详情 diff --git a/src/views/eam/sparepartsinlocation/index.vue b/src/views/eam/sparepartsinlocation/index.vue index 72589ea1b..ed9ee8067 100644 --- a/src/views/eam/sparepartsinlocation/index.vue +++ b/src/views/eam/sparepartsinlocation/index.vue @@ -132,7 +132,6 @@ const updataTableColumns = (val) => { // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { - nextTick(() => { nextTick(() => { const setV = {} setV[formField] = val[0][searchField] @@ -156,7 +155,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => } formRef.setValues(setV) }) - }) } // 查询页面返回——详情 const searchTableSuccessDetail = (formField, searchField, val, formRef) => { diff --git a/src/views/eam/sparepartsoutlocation/SparePartsOutLocation.data.ts b/src/views/eam/sparepartsoutlocation/SparePartsOutLocation.data.ts index 4c6785760..2041ab575 100644 --- a/src/views/eam/sparepartsoutlocation/SparePartsOutLocation.data.ts +++ b/src/views/eam/sparepartsoutlocation/SparePartsOutLocation.data.ts @@ -217,19 +217,17 @@ export const SparePartsOutLocationMainRules = reactive({ export const SparePartsOutLocationDetail = useCrudSchemas( reactive([ { - label: '备件编号', - field: 'sparePartsCode', + label: '库位编号', + field: 'locationCode', sort: 'custom', - table: { - width: 150 - }, + isSearch: false, form: { - // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择备件编号', // 输入框占位文本 - searchField: 'itemNumber', // 查询弹窗赋值字段 - searchTitle: '备件信息', // 查询弹窗标题 + searchListPlaceholder: '请选择库位编号', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类 searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法 searchCondition: [ @@ -246,6 +244,7 @@ export const SparePartsOutLocationDetail = useCrudSchemas( searchListPlaceholder: '请选择备件编号', // 输入框占位文本 searchField: 'itemNumber', // 查询弹窗赋值字段 searchTitle: '备件信息', // 查询弹窗标题 + searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类 searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法 searchCondition: [ @@ -257,7 +256,36 @@ export const SparePartsOutLocationDetail = useCrudSchemas( ] } }, - + { + label: '库区编号', + field: 'areaCode', + sort: 'custom', + isSearch: false, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled: true + } + }, + { + label: '备件编号', + field: 'sparePartsCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled: true + } + }, { label: '库存数量', field: 'currentQty', @@ -265,7 +293,14 @@ export const SparePartsOutLocationDetail = useCrudSchemas( isSearch: false, tableForm: { disabled: true - } + }, + form: { + componentProps: { + disabled: true + } + }, + isDetail: false, + isTable: false }, { label: '申领数量',