From 4635ef49912db82faa0bf4c5a9686b8742f6ed3e Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 12 Jun 2024 19:46:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/dict.ts | 1 + src/views/eam/sparepartsinlocation/index.vue | 17 +++++--- .../sparePartsInLocationMain.data.ts | 41 ++++++++++--------- 3 files changed, 34 insertions(+), 25 deletions(-) diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 64754649a..3b08a2073 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -367,4 +367,5 @@ export enum DICT_TYPE { OFF_BACK_STATUS = 'off_back_status', SPAREPARTS_APPLY_STATUS_ENUM = 'spareparts_apply_status_enum',// 流程状态 IS_LINE_ITEM = 'is_line_item', // 是否是线边 + PUT_IN_TYPE = 'put_in_type',// 入库类型 } diff --git a/src/views/eam/sparepartsinlocation/index.vue b/src/views/eam/sparepartsinlocation/index.vue index 5507d516f..a931b9e36 100644 --- a/src/views/eam/sparepartsinlocation/index.vue +++ b/src/views/eam/sparepartsinlocation/index.vue @@ -82,7 +82,7 @@ @@ -131,6 +131,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => row['areaCode'] = val[0].areaCode row['sparePartsCode'] = val[0].sparePartsCode row['currentQty'] = val[0].qty + row['isRadeIn'] = val[0].isRadeIn } } else { if (formField == 'locationCode') { @@ -138,6 +139,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => setV['areaCode'] = val[0].areaCode setV['sparePartsCode'] = val[0].sparePartsCode setV['currentQty'] = val[0].qty + setV['isRadeIn'] = val[0].isRadeIn } } @@ -149,9 +151,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => const searchTableSuccessDetail = (formField, searchField, val, formRef) => { nextTick(async () => { const setV = {} - if (formField == 'sparePartsCode') { - setV['sparePartsCode'] = val[0].itemNumber - setV['currentQty'] = val[0].qty + if (formField == 'locationCode') { + setV['locationCode'] = val[0].code + setV['areaCode'] = val[0].areaCode + setV['sparePartsCode'] = val[0].sparePartsCode + setV['currentQty'] = val[0].qty + setV['isRadeIn'] = val[0].isRadeIn } formRef.setValues(setV) }) @@ -218,8 +223,8 @@ const isShowMainButton = (row, val) => { // 列表-操作按钮 const butttondata = (row) => { return [ - defaultButtons.mainListEditBtn({ hasPermi: 'eam:spare-parts-in-location-main:update' }) // 编辑 - // defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:sparePartsInLocationMain:delete' }) // 删除 + defaultButtons.mainListEditBtn({ hasPermi: 'eam:spare-parts-in-location-main:update' }), // 编辑 + defaultButtons.mainListDeleteBtn({ hasPermi: 'eam:spare-parts-in-location-main:delete' }) // 删除 ] } diff --git a/src/views/eam/sparepartsinlocation/sparePartsInLocationMain.data.ts b/src/views/eam/sparepartsinlocation/sparePartsInLocationMain.data.ts index d5c6cf39c..e0f238228 100644 --- a/src/views/eam/sparepartsinlocation/sparePartsInLocationMain.data.ts +++ b/src/views/eam/sparepartsinlocation/sparePartsInLocationMain.data.ts @@ -10,10 +10,7 @@ import { ItemAccounts } from '@/views/eam/itemAccounts/itemAccounts.data' export const SparePartsInLocationMainRules = reactive({ number: [required], theme: [required], - // status: [required], - // areaCode: [required], - // locationCode: [required], - concurrencyStamp: [required], + type: [required], }) // 备件入库主表 export const SparePartsInLocationMain = useCrudSchemas(reactive([ @@ -38,6 +35,13 @@ export const SparePartsInLocationMain = useCrudSchemas(reactive([ field: 'theme', sort: 'custom', isSearch: true, + },{ + label: '入库类型', + field: 'type', + sort: 'custom', + dictType: DICT_TYPE.PUT_IN_TYPE, + dictClass: 'string', + }, { label: '流程状态', @@ -140,7 +144,6 @@ export const SparePartsInLocationDetailRules = reactive({ areaCode: [required], sparePartsCode: [required], applyQty: [required], - concurrencyStamp: [required], }) export const SparePartsInLocationDetail = useCrudSchemas(reactive([ @@ -167,19 +170,19 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive( } }, tableForm: { - // isInpuFocusShow: true, - // searchListPlaceholder: '请选择备件编号', // 输入框占位文本 - // searchField: 'itemNumber', // 查询弹窗赋值字段 - // searchTitle: '备件信息', // 查询弹窗标题 - // searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 - // searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 - // searchCondition: [ - // { - // key: 'available', - // value: 'TRUE', - // isMainValue: false - // } - // ] + isInpuFocusShow: true, + searchListPlaceholder: '请选择备件编号', // 输入框占位文本 + searchField: 'itemNumber', // 查询弹窗赋值字段 + searchTitle: '备件信息', // 查询弹窗标题 + searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ] } }, { @@ -193,7 +196,7 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive( } }, tableForm:{ - // disabled: true + disabled: true } }, {