From 38a701088f30d409f69684cd45663ccbdab5e4aa Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Fri, 21 Jun 2024 08:40:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=A4=96=E5=85=A5=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 --- .../unplannedissueJobMain.data.ts | 141 ++++++++ .../unplannedissueRequestMain/index.vue | 11 + .../unplannedissueRequestMain.data.ts | 311 ++++++++++++++++-- .../unplannedreceiptRequestMain.data.ts | 2 +- 4 files changed, 428 insertions(+), 37 deletions(-) diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/unplannedissueJobMain.data.ts b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/unplannedissueJobMain.data.ts index 865b0b2a8..791637252 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/unplannedissueJobMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/unplannedissueJobMain.data.ts @@ -2,6 +2,15 @@ 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} 计划外出库任务主表 */ @@ -95,6 +104,138 @@ export const UnplannedissueJobMain = useCrudSchemas(reactive([ } }, }, + { + 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: '过期时间', field: 'expiredTime', diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue index 4befdd5ec..b7e4d65a1 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue @@ -120,6 +120,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => row['fromLocationCode'] = val[0]['locationCode'] row['itemCode'] = val[0]['itemCode'] row['uom'] = val[0]['uom'] + row['qty'] = val[0]['qty'] } if(formField === 'costcentreCode'){ row['costcentreCode'] = val[0]['costcentreCode'] @@ -133,6 +134,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => 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) } diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts index 9de1cdcfb..3a20417cc 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts @@ -5,6 +5,12 @@ import * as getRequestsettingApi from '@/api/wms/requestsetting/index' import * as BalanceApi from '@/api/wms/balance' import { Balance } from '@/views/wms/inventoryManage/balance/balance.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' @@ -69,6 +75,7 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + isTableForm:false, isForm: false, isTable:false, }, @@ -76,6 +83,9 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ label: '领用描述', field: 'usageDescription', sort: 'custom', + isTableForm:false, + isForm: false, + isTable:false, table: { width: 150 }, @@ -99,6 +109,9 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ formatter: (_: Recordable, __: TableColumn, cellValue: number) => { return cellValue }, + isTableForm:false, + isForm: false, + isTable:false, table: { width: 150 }, @@ -112,6 +125,138 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ filterable: 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: '申请时间', field: 'requestTime', @@ -119,6 +264,9 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' }, + isTableForm:false, + isForm: false, + isTable:false, sort: 'custom', table: { width: 180 @@ -140,6 +288,9 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' }, + isTableForm:false, + isForm: false, + isTable:false, sort: 'custom', table: { width: 180 @@ -173,7 +324,7 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, - isSearch: true, + isSearch: false, isForm: false, }, { @@ -183,7 +334,7 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, - isSearch: true, + isSearch: false, isForm: false, }, { @@ -290,27 +441,6 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ } } }, - { - label: '直接生成记录', - field: 'directCreateRecord', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isForm: false, - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'Switch', - value: requestsettingData.directCreateRecord, - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE', - disabled: true - } - } - }, { label: '备注', field: 'remark', @@ -320,6 +450,26 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ }, isTable: false, }, + // { + // label: '直接生成记录', + // field: 'directCreateRecord', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', + // isForm: true, + // isTable: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // component: 'Switch', + // value: requestsettingData.directCreateRecord, + // componentProps: { + // inactiveValue: 'TRUE', + // activeValue: 'TRUE' + // } + // } + // }, { label: '创建时间', field: 'createTime', @@ -427,6 +577,15 @@ export const UnplannedissueRequestMainRules = reactive({ usageDescription:[ { required: true, message: '请选择领用描述', trigger: 'blur' } ], + costCenterCode: [ + { required: true, message: '请输入成本中心代码', trigger: 'blur' } + ], + costCenterType: [ + { required: true, message: '请输入成本中心类型', trigger: 'blur' } + ], + reasonCodeRequisition: [ + { required: true, message: '请输入领用原因代码', trigger: 'blur' } + ], }) /** @@ -461,7 +620,26 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive searchField: 'packingNumber', searchTitle: '库存余额信息', searchAllSchemas: Balance.allSchemas, - searchPage: BalanceApi.getBalanceItemPage + searchPage: BalanceApi.getBalanceItemPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + action: '==', + isSearch: true, + isMainValue: false + },{ + key: 'businessType', + value: 'UnplannedDeliver', + action: '==', + isSearch: true, + isMainValue: false + },{ + key: 'inOrOut', + value: 'out', + action: '==', + isSearch: true, + isMainValue: false + }] }, form: { // labelMessage: '信息提示说明!!!', @@ -471,7 +649,26 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive searchField: 'packingNumber', searchTitle: '库存余额信息', searchAllSchemas: Balance.allSchemas, - searchPage: BalanceApi.getBalanceItemPage + searchPage: BalanceApi.getBalanceItemPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + action: '==', + isSearch: true, + isMainValue: false + },{ + key: 'businessType', + value: 'UnplannedDeliver', + action: '==', + isSearch: true, + isMainValue: false + },{ + key: 'inOrOut', + value: 'out', + action: '==', + isSearch: true, + isMainValue: false + }] } } }, @@ -512,6 +709,14 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive table: { width: 150 }, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled:true + } }, { label: '包装号', @@ -520,6 +725,14 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive table: { width: 150 }, + tableForm: { + disabled:true + }, + form: { + componentProps: { + disabled: true + } + } }, { label: '器具号', @@ -563,7 +776,13 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive width: 150 }, tableForm: { - type: 'Select' + type: 'Select', + disabled:true + }, + form: { + componentProps: { + disabled: true + } } }, { @@ -577,7 +796,13 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive width: 150 }, tableForm: { - type: 'Select' + type: 'Select', + disabled: true + }, + form: { + componentProps: { + disabled: true + } } }, { @@ -587,6 +812,14 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive table: { width: 150 }, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled:true + } }, { label: '成本中心代码', @@ -595,6 +828,9 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive table: { width: 150 }, + isTable:false, + isDetail:false, + isTableForm:false, tableForm:{ isInpuFocusShow: true, // 开启查询弹窗 searchListPlaceholder: '选择成本中心', @@ -634,6 +870,9 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive table: { width: 150 }, + isTable:false, + isDetail:false, + isTableForm:false, tableForm:{ isInpuFocusShow: true, // 开启查询弹窗 searchListPlaceholder: '选择科目代码', @@ -792,14 +1031,14 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive //表单校验 export const UnplannedissueRequestDetailRules = reactive({ - packingNumber: [ - { required: true, message: '请输入包装号', trigger: 'change' }, - { max: 50, message: '不得超过50个字符', trigger: 'blur' } - ], - batch: [ - { required: true, message: '请输入批次', trigger: 'blur' }, - { max: 50, message: '不得超过50个字符', trigger: 'blur' } - ], + // packingNumber: [ + // { required: true, message: '请输入包装号', trigger: 'change' }, + // { max: 50, message: '不得超过50个字符', trigger: 'blur' } + // ], + // batch: [ + // { required: true, message: '请输入批次', trigger: 'blur' }, + // { max: 50, message: '不得超过50个字符', trigger: 'blur' } + // ], containerNumber: [ { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], @@ -823,4 +1062,4 @@ export const UnplannedissueRequestDetailRules = reactive({ qadProjectCode:[ { required: true, message: '请选择科目代码', trigger: 'change' } ] -}) \ No newline at end of file +}) diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts index a6d0e49f4..c6f32aee9 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts @@ -460,7 +460,7 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive component: 'Switch', value: requestsettingData.directCreateRecord, componentProps: { - inactiveValue: 'FALSE', + inactiveValue: 'TRUE', activeValue: 'TRUE', } }