From cb664269411ec77a8f011c7fdaeed6138499aeab Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Tue, 20 Aug 2024 19:58:38 +0800 Subject: [PATCH] =?UTF-8?q?HL-5407=E6=8A=A5=E5=BA=9F=E5=87=BA=E5=BA=93?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scrap/scrapJobMain/scrapJobMain.data.ts | 140 ++++++++++ .../scrapRecordMain/scrapRecordMain.data.ts | 140 ++++++++++ .../scrap/scrapRequestMain/index.vue | 20 +- .../scrapRequestMain/scrapRequestMain.data.ts | 251 +++++++++++++++++- 4 files changed, 548 insertions(+), 3 deletions(-) diff --git a/src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts b/src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts index 8eb790095..5056fe6fa 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts +++ b/src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts @@ -1,6 +1,14 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' import { TableColumn } from '@/types/table' +import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data' +import * as QadCostcentreApi from '@/api/wms/qadCostcentre/index' + +import { QadProject } from '@/views/wms/basicDataManage/subject/qadProject/qadProject.data' +import * as QadProjectApi from '@/api/wms/qadProject' + +import * as SubjectAccountApi from '@/api/wms/subjectAccount' +import { SubjectAccount } from '@/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data' /** * @returns {Array} 报废出库任务主表 @@ -26,6 +34,138 @@ export const ScrapJobMain = useCrudSchemas( }, isSearch: true }, + { + label: '成本中心代码', + field: 'costCenterCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成本中心代码', + searchField: 'costcentreCode', + searchTitle: '成本中心代码', + searchAllSchemas: QadCostcentre.allSchemas, + searchPage: QadCostcentreApi.getQadCostcentrePage + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本 + searchField: 'costcentreCode', // 查询弹窗赋值字段 + searchTitle: '成本中心代码', // 查询弹窗标题 + searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类 + searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: '成本中心类型', + field: 'costCenterType', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + }, + { + label: '领用原因代码', + field: 'reasonCodeRequisition', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成领用原因代码', + searchField: 'code', + searchTitle: '领用原因代码', + searchAllSchemas: SubjectAccount.allSchemas, + searchPage: SubjectAccountApi.getSubjectAccountPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'costcentreType', + value: 'costCenterType', + message: '成本中心类型不能为空!', + isMainValue: true + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '领用原因代码', // 查询弹窗标题 + searchAllSchemas: SubjectAccount.allSchemas, // 查询弹窗所需类 + searchPage: SubjectAccountApi.getSubjectAccountPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'costcentreType', + value: 'costCenterType', + message: '成本中心类型不能为空!', + isMainValue: true + }] + } + } + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择QAD项目信息', + searchField: 'projectCode', + searchTitle: '领用原因代码', + searchAllSchemas: QadProject.allSchemas, + searchPage: QadProjectApi.getQadProjectPage + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择QAD项目信息', // 输入框占位文本 + searchField: 'projectCode', // 查询弹窗赋值字段 + searchTitle: '领用原因代码', // 查询弹窗标题 + searchAllSchemas: QadProject.allSchemas, // 查询弹窗所需类 + searchPage: QadProjectApi.getQadProjectPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: '工作中心', + field: 'workCenter', + sort: 'custom', + table: { + width: 150 + }, + }, { label: 'Q1通知单号', field: 'q1Number', diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts b/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts index 1f76fd57c..231c63c9f 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts @@ -1,6 +1,14 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' import { TableColumn } from '@/types/table' +import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data' +import * as QadCostcentreApi from '@/api/wms/qadCostcentre/index' + +import { QadProject } from '@/views/wms/basicDataManage/subject/qadProject/qadProject.data' +import * as QadProjectApi from '@/api/wms/qadProject' + +import * as SubjectAccountApi from '@/api/wms/subjectAccount' +import { SubjectAccount } from '@/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data' /** * @returns {Array} 报废出库记录主表 @@ -35,6 +43,138 @@ export const ScrapRecordMain = useCrudSchemas( }, isSearch: true }, + { + label: '成本中心代码', + field: 'costCenterCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成本中心代码', + searchField: 'costcentreCode', + searchTitle: '成本中心代码', + searchAllSchemas: QadCostcentre.allSchemas, + searchPage: QadCostcentreApi.getQadCostcentrePage + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本 + searchField: 'costcentreCode', // 查询弹窗赋值字段 + searchTitle: '成本中心代码', // 查询弹窗标题 + searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类 + searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: '成本中心类型', + field: 'costCenterType', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + }, + { + label: '领用原因代码', + field: 'reasonCodeRequisition', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成领用原因代码', + searchField: 'code', + searchTitle: '领用原因代码', + searchAllSchemas: SubjectAccount.allSchemas, + searchPage: SubjectAccountApi.getSubjectAccountPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'costcentreType', + value: 'costCenterType', + message: '成本中心类型不能为空!', + isMainValue: true + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '领用原因代码', // 查询弹窗标题 + searchAllSchemas: SubjectAccount.allSchemas, // 查询弹窗所需类 + searchPage: SubjectAccountApi.getSubjectAccountPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'costcentreType', + value: 'costCenterType', + message: '成本中心类型不能为空!', + isMainValue: true + }] + } + } + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择QAD项目信息', + searchField: 'projectCode', + searchTitle: '领用原因代码', + searchAllSchemas: QadProject.allSchemas, + searchPage: QadProjectApi.getQadProjectPage + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择QAD项目信息', // 输入框占位文本 + searchField: 'projectCode', // 查询弹窗赋值字段 + searchTitle: '领用原因代码', // 查询弹窗标题 + searchAllSchemas: QadProject.allSchemas, // 查询弹窗所需类 + searchPage: QadProjectApi.getQadProjectPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: '工作中心', + field: 'workCenter', + sort: 'custom', + table: { + width: 150 + }, + }, { label: 'Q1通知单号', field: 'q1Number', diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue index ec6a457db..2b82cc1b2 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue @@ -186,9 +186,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => row[formField] = val[0][searchField] } } else { + console.log("报废出库主表") const setV = {} - setV[formField] = val[0][searchField] - formRef.setValues(setV) if (formField == 'q1Number') { ScrapRequestMain.allSchemas.formSchema.forEach((item) => { if (item.field == 'q2Number' || item.field == 'q3Number') { @@ -216,7 +215,24 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => } }) } + if(formField === 'usageDescription'){ + setV['usageDescription'] = val[0]['usageDescription'] + setV['usageCode'] = val[0]['code'] + } + if(formField === 'costCenterCode'){ + setV['costcentreCode'] = val[0]['costcentreCode'] + setV['costCenterType'] = val[0]['costcentreType'] + } + if(formField === 'reasonCodeRequisition'){ + setV['reasonCodeRequisition'] = val[0]['code'] + } + if(formField === 'projectCode'){ + setV['projectCode'] = val[0]['projectCode'] + } + setV[formField] = val[0][searchField] + formRef.setValues(setV) } + }) } const clearSearchInput = (field) => { diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts index e38c1ea26..3822c77ef 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts @@ -17,6 +17,16 @@ import { Q2 } from '@/views/qms/inspectionQ2/inspectionQ2.data' import * as InspectionQ3Api from '@/api/qms/inspectionQ3/inspectionQ3Main' import { InspectionQ3Main } from '@/views/qms/inspectionQ3/inspectionQ3.data' + +import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data' +import * as QadCostcentreApi from '@/api/wms/qadCostcentre/index' + +import { QadProject } from '@/views/wms/basicDataManage/subject/qadProject/qadProject.data' +import * as QadProjectApi from '@/api/wms/qadProject' + +import * as SubjectAccountApi from '@/api/wms/subjectAccount' +import { SubjectAccount } from '@/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data' + const { t } = useI18n() // 国际化 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 @@ -53,6 +63,233 @@ export const ScrapRequestMain = useCrudSchemas( isForm: false, isSearch: true }, + { + label: '领用代码', + field: 'usageCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm:false, + isForm: false, + isTable:false, + }, + { + label: '领用描述', + field: 'usageDescription', + sort: 'custom', + isTableForm:false, + isForm: false, + isTable:false, + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择领用描述', + searchField: 'usageDescription', + searchTitle: '领用描述信息', + searchAllSchemas: SubjectAccount.allSchemas, + searchPage: SubjectAccountApi.getSubjectAccountPage + } + } + }, + { + label: '成本中心代码', + field: 'costCenterCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + enterSearch: true, + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成本中心代码', + searchField: 'costcentreCode', + searchTitle: '成本中心代码', + searchAllSchemas: QadCostcentre.allSchemas, + searchPage: QadCostcentreApi.getQadCostcentrePage, + verificationParams: [{ + key: 'costcentreCode', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + }, + 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, + }], // 失去焦点校验参数 + } + } + }, + { + label: '成本中心类型', + field: 'costCenterType', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + }, + { + label: '领用原因代码', + field: 'reasonCodeRequisition', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + enterSearch: true, + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成领用原因代码', + searchField: 'code', + searchTitle: '领用原因代码', + searchAllSchemas: SubjectAccount.allSchemas, + searchPage: SubjectAccountApi.getSubjectAccountPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'costcentreType', + value: 'costCenterType', + message: '成本中心类型不能为空!', + isMainValue: true + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '领用原因代码', // 查询弹窗标题 + searchAllSchemas: SubjectAccount.allSchemas, // 查询弹窗所需类 + searchPage: SubjectAccountApi.getSubjectAccountPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'costcentreType', + value: 'costCenterType', + message: '成本中心类型不能为空!', + isMainValue: true + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + } + } + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + enterSearch: true, + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择QAD项目信息', + searchField: 'projectCode', + searchTitle: '领用原因代码', + searchAllSchemas: QadProject.allSchemas, + searchPage: QadProjectApi.getQadProjectPage, + verificationParams: [{ + key: 'projectCode', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择QAD项目信息', // 输入框占位文本 + searchField: 'projectCode', // 查询弹窗赋值字段 + searchTitle: '领用原因代码', // 查询弹窗标题 + searchAllSchemas: QadProject.allSchemas, // 查询弹窗所需类 + searchPage: QadProjectApi.getQadProjectPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }], + verificationParams: [{ + key: 'projectCode', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + } + } + }, + { + label: '工作中心', + field: 'workCenter', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '订单号', + field: 'orderNumber', + sort: 'custom', + table: { + width: 150 + }, + }, { label: 'Q1通知单号', field: 'q1Number', @@ -579,7 +816,19 @@ export const ScrapRequestMainRules = reactive({ ], fromWarehouseCode:[ {required: true,message: '请选择从仓库代码',trigger: 'change' } - ] + ], + usageDescription:[ + { required: true, message: '请选择领用描述', trigger: 'blur' } + ], + costCenterCode: [ + { required: true, message: '请输入成本中心代码', trigger: 'blur' } + ], + costCenterType: [ + { required: true, message: '请输入成本中心类型', trigger: 'blur' } + ], + reasonCodeRequisition: [ + { required: true, message: '请输入领用原因代码', trigger: 'blur' } + ], }) /**