From 2ce515ffd04deb435129a50137f208c3b5d8c5f3 Mon Sep 17 00:00:00 2001 From: "YEJIAXING-PC\\lenovo" <591141169@qq.com> Date: Wed, 12 Feb 2025 08:56:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BA=93=E5=AD=98=E4=BA=8B?= =?UTF-8?q?=E5=8A=A1=E6=9F=A5=E8=AF=A2=E5=94=AF=E4=B8=80=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../applicationRecordMain.data.ts | 8 --- .../countadjustPlan/countadjustPlan.data.ts | 55 ++++++++++++++----- src/views/eam/item/countadjustPlan/index.vue | 9 ++- .../item/itemAccounts/itemAccounts.data.ts | 16 +++++- 4 files changed, 61 insertions(+), 27 deletions(-) diff --git a/src/views/eam/item/applicationRecord/applicationRecordMain.data.ts b/src/views/eam/item/applicationRecord/applicationRecordMain.data.ts index b8f7d42..fd892f9 100644 --- a/src/views/eam/item/applicationRecord/applicationRecordMain.data.ts +++ b/src/views/eam/item/applicationRecord/applicationRecordMain.data.ts @@ -19,7 +19,6 @@ export const ApplicationRecordMain = useCrudSchemas(reactive([ isForm: false, isSearch: true, table: { - width: 180, fixed: 'left' }, }, @@ -30,7 +29,6 @@ export const ApplicationRecordMain = useCrudSchemas(reactive([ formatter: dateFormatter, isTable: true, table: { - width: 180, }, isForm: false, detail: { @@ -45,7 +43,6 @@ export const ApplicationRecordMain = useCrudSchemas(reactive([ isForm: false, isSearch: false, table: { - width: 150, }, }, { @@ -55,7 +52,6 @@ export const ApplicationRecordMain = useCrudSchemas(reactive([ formatter: dateFormatter, isTable: true, table: { - width: 180, }, isForm: false, detail: { @@ -69,7 +65,6 @@ export const ApplicationRecordMain = useCrudSchemas(reactive([ isForm: false, isSearch: false, table: { - width: 150, }, }, { @@ -79,7 +74,6 @@ export const ApplicationRecordMain = useCrudSchemas(reactive([ isForm: false, isSearch: false, table: { - width: 150, }, }, { @@ -87,7 +81,6 @@ export const ApplicationRecordMain = useCrudSchemas(reactive([ field: 'name', sort: 'custom', table: { - width: 150, }, }, { @@ -99,7 +92,6 @@ export const ApplicationRecordMain = useCrudSchemas(reactive([ isSearch: true, isTable: true, table: { - width: 150 }, tableForm: { type: 'Select', diff --git a/src/views/eam/item/countadjustPlan/countadjustPlan.data.ts b/src/views/eam/item/countadjustPlan/countadjustPlan.data.ts index c1e5d3c..eb32bb5 100644 --- a/src/views/eam/item/countadjustPlan/countadjustPlan.data.ts +++ b/src/views/eam/item/countadjustPlan/countadjustPlan.data.ts @@ -1,4 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { LocationArea, LocationAreaRules } from '../../basic/locationArea/locationArea.data' +import * as LocationAreaApi from '@/api/eam/basic/locationArea' // 表单校验 export const CountadjustPlanRules = reactive({ @@ -26,7 +28,7 @@ export const CountadjustPlan = useCrudSchemas(reactive([ }, { label: '盘点类型', - field: 'classification', + field: 'classificationView', sort: 'custom', dictType: DICT_TYPE.CLASSIFICATION, dictClass: 'string', @@ -34,38 +36,63 @@ export const CountadjustPlan = useCrudSchemas(reactive([ isTable: true, isForm: true, table: { - width: 150 + }, + form: { + component:'Select', + componentProps: { + multiple: true, + disabled: false + } }, tableForm: { + multiple: true, type: 'Select', disabled: false } }, { label: '是否账内库', - field: 'isInAccount', + field: 'isInAccountView', + sort: 'custom', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: false, isTable: true, - sort: 'custom', + isForm: true, table: { - width: 140 - }, - tableForm: { - type: 'Select', - inactiveValue: 'FALSE', - disabled: true }, form: { - component: 'Switch', - value: 'TRUE', + component:'Select', componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + multiple: true, + disabled: false } + }, + tableForm: { + multiple: true, + type: 'Select', + disabled: false } }, + { + label: '库区编号', + field: 'areaNumber', + sort: 'custom', + table: { + }, + form: { + componentProps: { + multiple: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择库区编号', // 输入框占位文本 + searchField: 'number', // 查询弹窗赋值字段 + searchTitle: '库区', // 查询弹窗标题 + searchAllSchemas: LocationArea.allSchemas, // 查询弹窗所需类 + searchPage: LocationAreaApi.getLocationAreaPage, // 查询弹窗所需分页方法 + searchCondition: [] + } + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/item/countadjustPlan/index.vue b/src/views/eam/item/countadjustPlan/index.vue index 9d1237d..251671d 100644 --- a/src/views/eam/item/countadjustPlan/index.vue +++ b/src/views/eam/item/countadjustPlan/index.vue @@ -79,9 +79,12 @@ const tableColumns = ref(CountadjustPlan.allSchemas.tableColumns) // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef) => { nextTick(() => { - const setV = {} - setV[formField] = val[0][searchField] - formRef.setValues(setV) + const setV = {} + setV[formField] = val[0][searchField] + if(formField=='areaNumber'){ + setV['areaNumber'] = val.map(item=>item[searchField]).join(',') + } + formRef.setValues(setV) }) } diff --git a/src/views/eam/item/itemAccounts/itemAccounts.data.ts b/src/views/eam/item/itemAccounts/itemAccounts.data.ts index 8fa761a..b29ceca 100644 --- a/src/views/eam/item/itemAccounts/itemAccounts.data.ts +++ b/src/views/eam/item/itemAccounts/itemAccounts.data.ts @@ -434,16 +434,28 @@ export const ItemAccounts = useCrudSchemas(reactive([ }, isForm: false, }, + { + label: '批次', + field: 'batch', + sort: 'custom', + isTable: true, + isForm: true, + form: { + componentProps: { + disabled: true + } + }, + }, { label: '库龄', field: 'areaAge', sort: 'custom', formatter: (row: Recordable, column: TableColumn, cellValue: any) => { - if (!row.purchaseTime) { + if (!row.batchDate) { return '未知'; // 如果 purchaseTime 为 null 或 undefined,返回 '未知' } - const purchaseTime = new Date(row.purchaseTime); // 获取采购时间 + const purchaseTime = new Date(row.batchDate); // 获取采购时间 if (isNaN(purchaseTime.getTime())) { return '未知'; // 如果 purchaseTime 不是有效日期,返回 '未知' }