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 1/6] =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=A4=96=E5=85=A5?= =?UTF-8?q?=E5=BA=93=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', } } From 5a6693478a19201570de39c459d8480f30e0c1f7 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Fri, 21 Jun 2024 08:59:49 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=A4=96=E5=87=BA?= =?UTF-8?q?=E5=BA=93=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../unplannedissueRequestMain.data.ts | 40 +++++++++---------- .../unplannedreceiptRequestMain.data.ts | 6 +-- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts index 3a20417cc..d2b9a05f2 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts @@ -450,26 +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: 'directCreateRecord', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isForm: true, + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.directCreateRecord, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, { label: '创建时间', field: 'createTime', diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts index c6f32aee9..84d128f25 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts @@ -451,7 +451,7 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isForm: true, - isTable: true, + isTable: false, sort: 'custom', table: { width: 150 @@ -460,8 +460,8 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive component: 'Switch', value: requestsettingData.directCreateRecord, componentProps: { - inactiveValue: 'TRUE', - activeValue: 'TRUE', + inactiveValue: 'FALSE', + activeValue: 'TRUE' } } }, From 70fbf3f0e6737f8820477abd2bb919f30ae91d04 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Fri, 21 Jun 2024 09:28:01 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=A4=96=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E6=B7=BB=E5=8A=A0=E6=98=8E=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../unplannedreceiptRecordMain.data.ts | 2 ++ .../unplannedreceiptRequestMain/index.vue | 32 ++++++++++++------- .../unplannedreceiptRequestMain.data.ts | 1 + 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts index d923bcaa8..94435be74 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts @@ -687,6 +687,7 @@ export const UnplannedreceiptRecordDetail = useCrudSchemas(reactive if(formField == 'toLocationCode'){ row['toLocationCode'] = val[0]['code'] } else if(formField == 'itemCode'){ - const isType = await isItemType(val[0]['code'], labelType.value) - if(!isType){ - message.warning('当前物料可制造与其他数据不一致,请重新选择!') - } else { - row['itemCode'] = val[0]['code'] - row['uom'] = val[0]['uom'] - // 有效期 \ 过期日期 - row['validityDays'] = val[0]['validityDays'] - // StdcostpriceApi.queryStdcostpriceByItemCode({"itemCode":val[0]['code']}) - // .then(res => { - // row['singlePrice'] = res.price - // }) + if(val.length==0){ + return + } + const enableBuy = val[0]['enableBuy'] + let newVal = val.filter(item=>item.enableBuy==enableBuy) + if(newVal.length{ + let tfk = JSON.parse(JSON.stringify(tableFormKeys)) + tfk.batch = formatTime(new Date(), 'yyyyMMdd') + //生产日期 到货日期 默认当天 + tfk['produceDate'] = dayjs().valueOf() + tfk['arriveDate'] = dayjs().valueOf() + tfk['itemCode'] = item['code'] + tfk['uom'] = item['uom'] + tfk['validityDays'] = item['validityDays'] + tableData.value.push(tfk) + }) } else if(formField === 'costcentreCode'){ row['costcentreCode'] = val[0]['costcentreCode'] } else if(formField === 'qadProjectCode'){ diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts index 84d128f25..43ab7f668 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts @@ -615,6 +615,7 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive Date: Fri, 21 Jun 2024 09:29:51 +0800 Subject: [PATCH 4/6] =?UTF-8?q?BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eam/itemAccounts/itemAccounts.data.ts | 2 +- .../SparePartsApply.data.ts | 57 +++++++++++++++---- src/views/eam/sparePartsApplyMain/index.vue | 25 +++++--- src/views/eam/sparepartsinlocation/index.vue | 2 - .../SparePartsOutLocation.data.ts | 57 +++++++++++++++---- 5 files changed, 110 insertions(+), 33 deletions(-) diff --git a/src/views/eam/itemAccounts/itemAccounts.data.ts b/src/views/eam/itemAccounts/itemAccounts.data.ts index 0f1284160..cdafeec23 100644 --- a/src/views/eam/itemAccounts/itemAccounts.data.ts +++ b/src/views/eam/itemAccounts/itemAccounts.data.ts @@ -141,7 +141,7 @@ export const ItemAccounts = useCrudSchemas( label: '库区编号', field: 'areaNumber', sort: 'custom', - isTable: false, + isTable: true, isSearch: true, table: { width: 180 diff --git a/src/views/eam/sparePartsApplyMain/SparePartsApply.data.ts b/src/views/eam/sparePartsApplyMain/SparePartsApply.data.ts index 19a1a537a..287a1e917 100644 --- a/src/views/eam/sparePartsApplyMain/SparePartsApply.data.ts +++ b/src/views/eam/sparePartsApplyMain/SparePartsApply.data.ts @@ -230,19 +230,17 @@ export const SparePartsApplyMainRules = reactive({ export const SparePartsApplyDetail = useCrudSchemas( reactive([ { - label: '备件编号', - field: 'sparePartsCode', + label: '库位编号', + field: 'locationCode', sort: 'custom', - table: { - width: 150 - }, + isSearch: false, form: { - // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择备件编号', // 输入框占位文本 - searchField: 'itemNumber', // 查询弹窗赋值字段 - searchTitle: '备件信息', // 查询弹窗标题 + searchListPlaceholder: '请选择库位编号', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类 searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法 searchCondition: [ @@ -259,6 +257,7 @@ export const SparePartsApplyDetail = useCrudSchemas( searchListPlaceholder: '请选择备件编号', // 输入框占位文本 searchField: 'itemNumber', // 查询弹窗赋值字段 searchTitle: '备件信息', // 查询弹窗标题 + searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类 searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法 searchCondition: [ @@ -270,7 +269,36 @@ export const SparePartsApplyDetail = useCrudSchemas( ] } }, - + { + label: '库区编号', + field: 'areaCode', + sort: 'custom', + isSearch: false, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled: true + } + }, + { + label: '备件编号', + field: 'sparePartsCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled: true + } + }, { label: '库存数量', field: 'currentQty', @@ -278,7 +306,14 @@ export const SparePartsApplyDetail = useCrudSchemas( isSearch: false, tableForm: { disabled: true - } + }, + form: { + componentProps: { + disabled: true + } + }, + isDetail: false, + isTable: false }, { label: '申领数量', diff --git a/src/views/eam/sparePartsApplyMain/index.vue b/src/views/eam/sparePartsApplyMain/index.vue index 526ca9dc1..ddb76807f 100644 --- a/src/views/eam/sparePartsApplyMain/index.vue +++ b/src/views/eam/sparePartsApplyMain/index.vue @@ -132,18 +132,27 @@ const updataTableColumns = (val) => { // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { nextTick(() => { - nextTick(() => { - const setV = {} - setV[formField] = val[0][searchField] - if (formField == 'sparePartsCode') { + const setV = {} + setV[formField] = val[0][searchField] + console.log(11, val[0]) + if (type == 'tableForm') { + if (formField == 'locationCode') { + row['locationCode'] = val[0].locationNumber + row['areaCode'] = val[0].areaNumber row['sparePartsCode'] = val[0].itemNumber row['currentQty'] = val[0].qty + row['isRadeIn'] = val[0].isRadeIn } - if (formField == 'equipmentCode') { - row['equipmentCode'] = val[0].code + } else { + if (formField == 'locationCode') { + setV['locationCode'] = val[0].locationNumber + setV['areaCode'] = val[0].areaNumber + setV['sparePartsCode'] = val[0].itemNumber + setV['currentQty'] = val[0].qty + setV['isRadeIn'] = val[0].isRadeIn } - formRef.setValues(setV) - }) + } + formRef.setValues(setV) }) } // 查询页面返回——详情 diff --git a/src/views/eam/sparepartsinlocation/index.vue b/src/views/eam/sparepartsinlocation/index.vue index 72589ea1b..ed9ee8067 100644 --- a/src/views/eam/sparepartsinlocation/index.vue +++ b/src/views/eam/sparepartsinlocation/index.vue @@ -132,7 +132,6 @@ const updataTableColumns = (val) => { // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { - nextTick(() => { nextTick(() => { const setV = {} setV[formField] = val[0][searchField] @@ -156,7 +155,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => } formRef.setValues(setV) }) - }) } // 查询页面返回——详情 const searchTableSuccessDetail = (formField, searchField, val, formRef) => { diff --git a/src/views/eam/sparepartsoutlocation/SparePartsOutLocation.data.ts b/src/views/eam/sparepartsoutlocation/SparePartsOutLocation.data.ts index 4c6785760..2041ab575 100644 --- a/src/views/eam/sparepartsoutlocation/SparePartsOutLocation.data.ts +++ b/src/views/eam/sparepartsoutlocation/SparePartsOutLocation.data.ts @@ -217,19 +217,17 @@ export const SparePartsOutLocationMainRules = reactive({ export const SparePartsOutLocationDetail = useCrudSchemas( reactive([ { - label: '备件编号', - field: 'sparePartsCode', + label: '库位编号', + field: 'locationCode', sort: 'custom', - table: { - width: 150 - }, + isSearch: false, form: { - // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择备件编号', // 输入框占位文本 - searchField: 'itemNumber', // 查询弹窗赋值字段 - searchTitle: '备件信息', // 查询弹窗标题 + searchListPlaceholder: '请选择库位编号', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类 searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法 searchCondition: [ @@ -246,6 +244,7 @@ export const SparePartsOutLocationDetail = useCrudSchemas( searchListPlaceholder: '请选择备件编号', // 输入框占位文本 searchField: 'itemNumber', // 查询弹窗赋值字段 searchTitle: '备件信息', // 查询弹窗标题 + searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类 searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法 searchCondition: [ @@ -257,7 +256,36 @@ export const SparePartsOutLocationDetail = useCrudSchemas( ] } }, - + { + label: '库区编号', + field: 'areaCode', + sort: 'custom', + isSearch: false, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled: true + } + }, + { + label: '备件编号', + field: 'sparePartsCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled: true + } + }, { label: '库存数量', field: 'currentQty', @@ -265,7 +293,14 @@ export const SparePartsOutLocationDetail = useCrudSchemas( isSearch: false, tableForm: { disabled: true - } + }, + form: { + componentProps: { + disabled: true + } + }, + isDetail: false, + isTable: false }, { label: '申领数量', From e7a2524fd009e007956af70b82abf9110573da2b Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Fri, 21 Jun 2024 09:33:28 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=A4=96=E5=87=BA?= =?UTF-8?q?=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../unplannedissueRequestMain/index.vue | 24 ++++++++++++------- .../unplannedissueRequestMain.data.ts | 1 + 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue index b7e4d65a1..e1d9ef743 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue @@ -42,6 +42,8 @@ if (type == 'tableForm') { // 明细查询页赋值 if(formField === 'itemCode'){ - row[formField] = val[0][searchField] - row['packingNumber'] = val[0]['packingNumber'] - row['containerNumber'] = val[0]['containerNumber'] - row['batch'] = val[0]['batch'] - row['inventoryStatus'] = val[0]['inventoryStatus'] - row['fromLocationCode'] = val[0]['locationCode'] - row['itemCode'] = val[0]['itemCode'] - row['uom'] = val[0]['uom'] - row['qty'] = val[0]['qty'] + let newRow = JSON.parse(JSON.stringify(tableFormKeys)) + val.forEach(item=>{ + newRow[formField] =item[searchField] + newRow['packingNumber'] = item['packingNumber'] + newRow['containerNumber'] = item['containerNumber'] + newRow['batch'] = item['batch'] + newRow['inventoryStatus'] = item['inventoryStatus'] + newRow['fromLocationCode'] = item['locationCode'] + newRow['itemCode'] = item['itemCode'] + newRow['uom'] = item['uom'] + newRow['qty'] = item['qty'] + tableData.value.push(newRow) + }) } if(formField === 'costcentreCode'){ row['costcentreCode'] = val[0]['costcentreCode'] diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts index d2b9a05f2..745856d85 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts @@ -615,6 +615,7 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive width: 150 }, tableForm:{ + multiple:true,//多选 isInpuFocusShow: true, // 开启查询弹窗 searchListPlaceholder: '请输入包装号', searchField: 'packingNumber', From eb8f27cdcb4b1af55808e1d67eb4b78e4db9deac Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Fri, 21 Jun 2024 10:03:20 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=A4=96=E5=87=BA?= =?UTF-8?q?=E5=BA=93=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../unplannedissueRecordMain.data.ts | 158 ++++++++++++++++++ 1 file changed, 158 insertions(+) diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/unplannedissueRecordMain.data.ts b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/unplannedissueRecordMain.data.ts index d9bdbbbf8..0952ec3d1 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/unplannedissueRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/unplannedissueRecordMain.data.ts @@ -2,6 +2,15 @@ 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} 计划外出库记录主表 */ @@ -136,6 +145,138 @@ export const UnplannedissueRecordMain = 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: 'fromWarehouseCode', @@ -355,6 +496,7 @@ export const UnplannedissueRecordDetail = useCrudSchemas(reactive( label: '单据号', field: 'number', sort: 'custom', + hiddenInMain:true, table: { width: 180 }, @@ -411,6 +553,10 @@ export const UnplannedissueRecordDetail = useCrudSchemas(reactive( label: '器具号', field: 'containerNumber', sort: 'custom', + isTable:false, + isForm:false, + isDetail:false, + isTableForm:false, table: { width: 150 }, @@ -482,6 +628,10 @@ export const UnplannedissueRecordDetail = useCrudSchemas(reactive( label: '成本中心代码', field: 'costcentreCode', sort: 'custom', + isTable:false, + isForm:false, + isDetail:false, + isTableForm:false, table: { width: 150 }, @@ -490,6 +640,10 @@ export const UnplannedissueRecordDetail = useCrudSchemas(reactive( label: '科目代码', field: 'qadProjectCode', sort: 'custom', + isTable:false, + isForm:false, + isDetail:false, + isTableForm:false, table: { width: 150 }, @@ -498,6 +652,10 @@ export const UnplannedissueRecordDetail = useCrudSchemas(reactive( label: '货主代码', field: 'ownerCode', sort: 'custom', + isTable:false, + isForm:false, + isDetail:false, + isTableForm:false, table: { width: 150 },