From cc22ad2b334a0f22502b00a3ceaeadf7571ea301 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=BB=E7=A0=96-JAVA=5CAdministrator?= <591141169@qq.com> Date: Thu, 29 Aug 2024 10:50:25 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=91=E7=9B=AE=E8=B4=A6=E6=88=B7=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=A2=9E=E5=8A=A0=E4=B8=A4=E4=B8=AA=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E4=B8=BA=E9=A1=B9=E7=9B=AE=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=BF=85=E5=A1=AB=EF=BC=88=E7=B1=BB=E5=9E=8B=E4=B8=BA=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E5=80=BC=EF=BC=8C=E9=BB=98=E8=AE=A4=E4=B8=BA=E5=90=A6?= =?UTF-8?q?=EF=BC=89/=E6=88=90=E6=9C=AC=E4=B8=AD=E5=BF=83=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=80=BC=EF=BC=88=E5=AD=97=E7=AC=A6=E5=9E=8B=EF=BC=8C?= =?UTF-8?q?=E9=80=89=E5=A1=AB=EF=BC=89=EF=BC=8C=E6=88=90=E6=9C=AC=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E5=8F=96=E7=8E=B0=E6=9C=89=E6=88=90=E6=9C=AC=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E6=90=9C=E7=B4=A2=E5=B8=AE=E5=8A=A9=20=20=20=20HL-574?= =?UTF-8?q?3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../subjectAccount/subjectAccount.data.ts | 588 ++++++++++-------- 1 file changed, 329 insertions(+), 259 deletions(-) diff --git a/src/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data.ts b/src/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data.ts index 1ed2be4ca..125def636 100644 --- a/src/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data.ts +++ b/src/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data.ts @@ -10,292 +10,362 @@ const typeList = await QadProjectApi.getProjectType() export const SubjectAccountRules = reactive({ code: [required], accountingAccount: [required], - costcentreType:[required], + costcentreType: [required], accountingName: [required], usageDescription: [required], costecentreCode: [required], projectId: [required], projectCode: [required], available: [required], - isFromPlMstr:[required] + isFromPlMstr: [required] }) -export const SubjectAccount = useCrudSchemas(reactive([ - { - label: 'id', - field: 'id', - sort: 'custom', - isForm: false, - isTable:false, - }, - { - label: '代码', - field: 'code', - sort: 'custom', - isSearch: true, - }, - { - label: '领用描述', - field: 'usageDescription', - sort: 'custom', - isSearch: false, - isTable:false, - isForm:false, - }, - { - label: '成本中心ID', - field: 'costcentreId', - sort: 'custom', - isSearch: false, - isTable:false, - isForm: false, - form:{ - componentProps:{ - disabled:true - } - } - }, - { - label: '成本中心代码', - field: 'costcentreCode', - sort: 'custom', - isSearch: false, - isTable:false, - isForm: false, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择物料代码', // 输入框占位文本 - searchField: 'costcentreCode', // 查询弹窗赋值字段 - searchTitle: '成本中心信息', // 查询弹窗标题 - searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类 - searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] - } - } - }, - { - label: '类型', - field: 'costcentreType', - sort: 'custom', - isSearch: true, - form:{ - show:true, - component: 'Select', - componentProps: { - // isSearchList: true, - placeholder:'请选择库位代码', - searchField: 'costcentreType', - // searchTitle: '生产线信息', - // searchAllSchemas: Productionline.allSchemas, - // searchPage: ProductionLineCodeApi.getProductionlinePage - options:typeList.map(item=>({ - label:item.labelKey, - value:item.labelValue - })) +export const SubjectAccount = useCrudSchemas( + reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isForm: false, + isTable: false + }, + { + label: '代码', + field: 'code', + sort: 'custom', + isSearch: true + }, + { + label: '领用描述', + field: 'usageDescription', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false + }, + { + label: '成本中心ID', + field: 'costcentreId', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + form: { + componentProps: { + disabled: true + } } - } - - }, - { - label: '项目ID', - field: 'projectId', - sort: 'custom', - isSearch: false, - isTable:false, - isForm:false, - disabled:true, - form:{ - componentProps:{ - disabled:true + }, + { + label: '成本中心代码', + field: 'costcentreCode', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchField: 'costcentreCode', // 查询弹窗赋值字段 + searchTitle: '成本中心信息', // 查询弹窗标题 + searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类 + searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ] + } } - } - }, - { - label: '项目代码', - field: 'projectCode', - sort: 'custom', - isSearch: false, - isForm:false, - isTable:false, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择物料代码', // 输入框占位文本 - searchField: 'projectCode', // 查询弹窗赋值字段 - searchTitle: '物料基础信息', // 查询弹窗标题 - searchAllSchemas: QadProject.allSchemas, // 查询弹窗所需类 - searchPage: QadProjectApi.getQadProjectPage, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] + }, + { + label: '类型', + field: 'costcentreType', + sort: 'custom', + isSearch: true, + form: { + show: true, + component: 'Select', + componentProps: { + // isSearchList: true, + placeholder: '请选择库位代码', + searchField: 'costcentreType', + // searchTitle: '生产线信息', + // searchAllSchemas: Productionline.allSchemas, + // searchPage: ProductionLineCodeApi.getProductionlinePage + options: typeList.map((item) => ({ + label: item.labelKey, + value: item.labelValue + })) + } } - } - }, - { - label: '会计账户', - field: 'accountingAccount', - sort: 'custom', - isSearch: false, - form:{ - componentProps:{ - disabled:false + }, + { + label: '项目ID', + field: 'projectId', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + disabled: true, + form: { + componentProps: { + disabled: true + } } - } - }, - { - label: '名称', - field: 'accountingName', - sort: 'custom', - isSearch: false, - form:{ - componentProps:{ - disabled:false + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + isSearch: false, + isForm: false, + isTable: false, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchField: 'projectCode', // 查询弹窗赋值字段 + searchTitle: '物料基础信息', // 查询弹窗标题 + searchAllSchemas: QadProject.allSchemas, // 查询弹窗所需类 + searchPage: QadProjectApi.getQadProjectPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ] + } } - } - }, - { - label: '是否可用', - field: 'available', - sort: 'custom', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: true, - table: { - width: 120 }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + { + label: '会计账户', + field: 'accountingAccount', + sort: 'custom', + isSearch: false, + table: { + width: 120 + }, + form: { + componentProps: { + disabled: false + } } }, - }, - { - label: '是否来自产品类', - field: 'isFromPlMstr', - sort: 'custom', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: true, - table: { - width: 140 + { + label: '名称', + field: 'accountingName', + sort: 'custom', + isSearch: false, + form: { + componentProps: { + disabled: false + } + } }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + { + label: '是否可用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + table: { + width: 120 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } } }, - }, - { - label: '产品类类型', - field: 'plMstrType', - sort: 'custom', - isSearch: false, - dictType: DICT_TYPE.PL_MSTR_TYPE, - dictClass: 'string', - isTable: true, - table: { - width: 120 + { + label: '是否来自产品类', + field: 'isFromPlMstr', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + table: { + width: 140 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, - form:{ - componentProps:{ - disabled:false + { + label: '产品类类型', + field: 'plMstrType', + sort: 'custom', + isSearch: false, + dictType: DICT_TYPE.PL_MSTR_TYPE, + dictClass: 'string', + isTable: true, + table: { + width: 120 + }, + form: { + componentProps: { + disabled: false + } } - } - }, - { - label: '备注', - field: 'remark', - sort: 'custom', - }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - search: { - component: 'DatePicker', - componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + { + label: '项目是否必填', + field: 'isProject', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + table: { + width: 140 + }, + form: { + component: 'Switch', + value: 'FALSE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } } }, - form: { - component: 'DatePicker', - componentProps: { - style: {width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + { + label: '成本中心默认值', + field: 'costDefault', + sort: 'custom', + isSearch: false, + isTable: true, + isForm: true, + table: { + width: 130 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本 + searchField: 'costcentreCode', // 查询弹窗赋值字段 + searchTitle: '成本中心信息', // 查询弹窗标题 + searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类 + searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ], + verificationParams: [ + { + key: 'costcentreCode', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } } }, - isForm: false, - }, - { - label: '创建者', - field: 'creator', - table: { - width: 130 + { + label: '备注', + field: 'remark', + sort: 'custom' }, - isForm: false, - isTable: true - }, - { - label: '最后更新时间', - field: 'updateTime', - sort: 'custom', - isDetail: true, - isForm: false, - isTable: true, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + table: { + width: 180 + }, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + }, + isForm: false }, - table: { - width: 180 + { + label: '创建者', + field: 'creator', + table: { + width: 130 + }, + isForm: false, + isTable: true }, - form: { - component: 'DatePicker', - componentProps: { - style: {width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + { + label: '最后更新时间', + field: 'updateTime', + sort: 'custom', + isDetail: true, + isForm: false, + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } + }, + { + label: '最后更新者', + field: 'updater', + isDetail: true, + isForm: false, + isTable: true, + table: { + width: 150 + } + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' } } - }, - { - label: '最后更新者', - field: 'updater', - isDetail: true, - isForm: false, - isTable: true, - table: { - width: 150 - } - }, - { - label: '操作', - field: 'action', - isForm: false, - table: { - width: 150, - fixed: 'right' - } - } -])) + ]) +)