From 140603e4b238e8137ad9bd1b7a921c885bad8768 Mon Sep 17 00:00:00 2001 From: yufei_wang <2267742828@qq.com> Date: Fri, 8 Nov 2024 14:13:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=8F=E5=AE=9A=E5=93=81=E6=94=B6=E8=B4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/purchasereceiptJobDetail/index.ts | 15 + src/api/wms/purchasereceiptJobMain/index.ts | 16 + .../wms/purchasereceiptRecordDetail/index.ts | 15 + .../wms/purchasereceiptRecordMain/index.ts | 13 + .../wms/purchasereceiptRequestDetail/index.ts | 16 + .../wms/purchasereceiptRequestMain/index.ts | 14 + .../toolPurchasereceiptJobMain/index.vue | 428 +++ .../purchasereceiptJobMain.data.ts | 1590 +++++++++++ .../toolPurchasereceiptRecordMain/index.vue | 475 ++++ .../purchasereceiptRecordMain.data.ts | 2037 +++++++++++++ .../toolPurchasereceiptRequestMain/index.vue | 915 ++++++ .../purchasereceiptRequestMain.data.ts | 2532 +++++++++++++++++ 12 files changed, 8066 insertions(+) create mode 100644 src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptJobMain/index.vue create mode 100644 src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptJobMain/purchasereceiptJobMain.data.ts create mode 100644 src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptRecordMain/index.vue create mode 100644 src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptRecordMain/purchasereceiptRecordMain.data.ts create mode 100644 src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptRequestMain/index.vue create mode 100644 src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptRequestMain/purchasereceiptRequestMain.data.ts diff --git a/src/api/wms/purchasereceiptJobDetail/index.ts b/src/api/wms/purchasereceiptJobDetail/index.ts index c012a623f..547d7c9c6 100644 --- a/src/api/wms/purchasereceiptJobDetail/index.ts +++ b/src/api/wms/purchasereceiptJobDetail/index.ts @@ -44,6 +44,21 @@ export const getPurchasereceiptJobDetailPage = async (params) => { } } +// 查询协定品收货任务子列表 +export const getToolPurchasereceiptJobDetailPage = async (params) => { + if (params.isSearch) { + params.source_type = "TOOL" + params.order_type_m = 2 + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/purchasereceipt-job-detail/senior', data }) + } else { + params.sourceType = "TOOL" + params.orderTypeM = 2 + return await request.get({ url: `/wms/purchasereceipt-job-detail/page`, params }) + } +} + // 查询备件收货任务子列表 export const getPurchasereceiptJobDetailPageSapre = async (params) => { if (params.isSearch) { diff --git a/src/api/wms/purchasereceiptJobMain/index.ts b/src/api/wms/purchasereceiptJobMain/index.ts index 79e546090..b357846d9 100644 --- a/src/api/wms/purchasereceiptJobMain/index.ts +++ b/src/api/wms/purchasereceiptJobMain/index.ts @@ -100,6 +100,22 @@ export const exportPurchasereceiptJobMain = async (params) => { } } +// 导出协定品收货任务主 Excel +export const exportToolPurchasereceiptJobMain = async (params) => { + if (params.isSearch) { + params.source_type = "TOOL" + params.order_type_m = 2 + const data = {...params} + return await request.downloadPost({ url: `/wms/purchasereceipt-job-main/export-excel-senior`, data }) + } else { + params.sourceType = "TOOL" + params.orderTypeM = 2 + return await request.download({ url: `/wms/purchasereceipt-job-main/export-excel`, params }) + } +} + + + // 导出备件收货任务 export const exportSparereceiptJobMain = async (params) => { diff --git a/src/api/wms/purchasereceiptRecordDetail/index.ts b/src/api/wms/purchasereceiptRecordDetail/index.ts index 53d6cec7d..e7f56eaf3 100644 --- a/src/api/wms/purchasereceiptRecordDetail/index.ts +++ b/src/api/wms/purchasereceiptRecordDetail/index.ts @@ -61,6 +61,21 @@ export const getPurchasereceiptRecordDetailPage = async (params) => { } } +// 查询协定品收货记录子列表 +export const getToolPurchasereceiptRecordDetailPage = async (params) => { + if (params.isSearch) { + params.source_type = "TOOL" + params.order_type_m = 2 + delete params.isSearch + const data = { ...params } + return await request.post({ url: '/wms/purchasereceipt-record-detail/senior', data }) + } else { + params.sourceType = "TOOL" + params.orderTypeM = 2 + return await request.get({ url: `/wms/purchasereceipt-record-detail/page`, params }) + } +} + // 查询采购拒收记录 export const getPurchasereceiptRecordDetailRefusePage = async (params) => { if (params.isSearch) { diff --git a/src/api/wms/purchasereceiptRecordMain/index.ts b/src/api/wms/purchasereceiptRecordMain/index.ts index 13ff984b6..0428e423e 100644 --- a/src/api/wms/purchasereceiptRecordMain/index.ts +++ b/src/api/wms/purchasereceiptRecordMain/index.ts @@ -88,6 +88,19 @@ export const exportPurchasereceiptRecordMain = async (params) => { return await request.download({ url: `/wms/purchasereceipt-record-main/export-excel`, params }) } } +// 导出采购收货记录主 Excel +export const exportToolPurchasereceiptRecordMain = async (params) => { + if (params.isSearch) { + params.source_type = "TOOL" + params.order_type_m = 2 + const data = {...params} + return await request.downloadPost({ url: `/wms/purchasereceipt-record-main/export-excel-senior`, data }) + } else { + params.sourceType = "TOOL" + params.orderTypeM = 2 + return await request.download({ url: `/wms/purchasereceipt-record-main/export-excel`, params }) + } +} // 导出采购收货记录主 Excel export const exportPurchasereceiptRecordRefuseMain = async (params) => { diff --git a/src/api/wms/purchasereceiptRequestDetail/index.ts b/src/api/wms/purchasereceiptRequestDetail/index.ts index 4d5789976..15f80d24d 100644 --- a/src/api/wms/purchasereceiptRequestDetail/index.ts +++ b/src/api/wms/purchasereceiptRequestDetail/index.ts @@ -46,6 +46,22 @@ export const getPurchasereceiptRequestDetailPage = async (params) => { } } +// 查询协定品收货申请子列表 +export const getTOOLPurchasereceiptRequestDetailPage = async (params) => { + + if (params.isSearch) { + params.source_type = "TOOL" + params.order_type_m = 2 + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/purchasereceipt-request-detail/senior', data }) + } else { + params.sourceType = "TOOL" + params.orderTypeM = 2 + return await request.get({ url: `/wms/purchasereceipt-request-detail/page`, params }) + } +} + // 查询备件收货申请子列表 export const getPurchasereceiptRequestDetailPageSpare = async (params) => { if (params.isSearch) { diff --git a/src/api/wms/purchasereceiptRequestMain/index.ts b/src/api/wms/purchasereceiptRequestMain/index.ts index 0ae9b85cd..92ba0b6ef 100644 --- a/src/api/wms/purchasereceiptRequestMain/index.ts +++ b/src/api/wms/purchasereceiptRequestMain/index.ts @@ -88,6 +88,20 @@ export const exportPurchasereceiptRequestMain = async (params) => { } } +// 导出采购收货申请主 Excel +export const exportToolPurchasereceiptRequestMain = async (params) => { + if (params.isSearch) { + params.source_type = "TOOL" + params.order_type_m = 2 + const data = {...params} + return await request.downloadPost({ url: `/wms/purchasereceipt-request-main/export-excel-senior`, data }) + } else { + params.sourceType = "TOOL" + params.orderTypeM = 2 + return await request.download({ url: `/wms/purchasereceipt-request-main/export-excel`, params }) + } +} + // 导出采购M型收货申请主 Excel export const exportPurchasereceiptRequestMainOrderTypeM = async (params) => { diff --git a/src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptJobMain/index.vue b/src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptJobMain/index.vue new file mode 100644 index 000000000..66df6c739 --- /dev/null +++ b/src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptJobMain/index.vue @@ -0,0 +1,428 @@ + + + diff --git a/src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptJobMain/purchasereceiptJobMain.data.ts b/src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptJobMain/purchasereceiptJobMain.data.ts new file mode 100644 index 000000000..3349d2e31 --- /dev/null +++ b/src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptJobMain/purchasereceiptJobMain.data.ts @@ -0,0 +1,1590 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' +import { fa } from 'element-plus/es/locale' +import { DICT_TYPE } from '@/utils/dict' + +/** + * @returns {Array} 采购收货任务主表 + */ +export const PurchasereceiptJobMain = useCrudSchemas( + reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isSearch: true, + sortSearchDefault: 1 + }, + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch: false, + sortTableDefault: 2 + }, + { + label: '发货单号', + field: 'asnNumber', + sort: 'custom', + table: { + width: 180 + }, + sortTableDefault: 3, + isSearch: true + }, + { + label: '要货计划单号', + field: 'ppNumber', + sort: 'custom', + isTable: false, + table: { + width: 180 + } + }, + { + label: '供应商代码', + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + sortSearchDefault: 2 + }, + { + label: '到月台代码', + field: 'toDockCode', + sort: 'custom', + isTable: false, + table: { + width: 150 + } + }, + { + label: '承运商', + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1010 + }, + { + label: '数据来源', + field: 'sourceType', + dictType: DICT_TYPE.PURCHASERECEIPT_SOURCE_TYPE, + sort: 'custom', + table: { + width: 150 + }, + form: { + value: 'ASN_ExternalReceipt', + componentProps: { + disabled: true + } + }, + isSearch: true, + }, + { + label: '运输方式', + field: 'transferMode', + dictType: DICT_TYPE.TRANSFER_MODE, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1011 + }, + { + label: '车牌号', + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1012 + }, + { + label: '从仓库代码', + field: 'fromWarehouseCode', + sort: 'custom', + isTable: false, + table: { + width: 150 + } + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + isTable: false, + table: { + width: 150 + }, + //formatter: dateFormatter, + detail: { + //dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + form: { + // component: 'DatePicker', + // componentProps: { + // type: 'datetime', + // dateFormat: 'YYYY-MM-DD HH:mm:ss', + // valueFormat: 'x' + // } + } + }, + { + label: '申请时间', + field: 'requestTime', + sort: 'custom', + isTable: false, + table: { + width: 180 + }, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } + }, + { + label: '要求截止时间', + field: 'requestDueTime', + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.PURCHASE_JOB_STATUS, + dictClass: 'string', + isSearch: false, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 6 + }, + { + label: '过期时间', + field: 'expiredTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } + }, + // { + // label: '状态', + // field: 'jobStageStatus', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '优先级', + field: 'priority', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + form: { + component: 'InputNumber' + } + }, + { + label: '优先级增量', + field: 'priorityIncrement', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + form: { + component: 'InputNumber' + } + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '岗位', + field: 'userPositionCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '承接人', + field: 'acceptUserName', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '承接时间', + field: 'acceptTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } + }, + { + label: '完成人', + field: 'completeUserName', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '完成时间', + field: 'completeTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } + }, + { + label: '从库区类型范围', + field: 'fromAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '到库区类型范围', + field: 'toAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '从库区代码范围', + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + // { + // label: '创建者', + // field: 'creator', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable: false + // }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + }, + isSearch: true, + 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: 'autoComplete', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + sort: 'custom', + table: { + width: 180 + } + }, + { + label: '允许修改库位', + field: 'allowModifyLocation', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + sort: 'custom', + table: { + width: 180 + } + }, + { + label: '允许修改数量', + field: 'allowModifyQty', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + sort: 'custom', + table: { + width: 180 + } + }, + { + label: '允许大于推荐数量', + field: 'allowBiggerQty', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + sort: 'custom', + table: { + width: 180 + } + }, + { + label: '允许小于推荐数量', + field: 'allowSmallerQty', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + sort: 'custom', + table: { + width: 180 + } + }, + { + label: '允许修改库存状态', + field: 'allowModifyInventoryStatus', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + sort: 'custom', + table: { + width: 180 + } + }, + { + label: '允许连续扫描', + field: 'allowContinuousScanning', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + sort: 'custom', + table: { + width: 180 + } + }, + { + label: '允许部分完成', + field: 'allowPartialComplete', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + sort: 'custom', + table: { + width: 180 + } + }, + { + label: '允许修改批次', + field: 'allowModifyBatch', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + sort: 'custom', + table: { + width: 180 + } + }, + { + label: '允许修改箱码', + field: 'allowModifyPackingNumber', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + sort: 'custom', + table: { + width: 180 + } + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 250, + fixed: 'right' + } + }, + { + label: '批次', // 实际是子表的到批次,为了不影响页面,单独放上面 + field: 'batch', + sort: 'custom', + isForm: false, + isTableForm: false, + table: { + width: 150 + }, + sortTableDefault: 1001 + }, + { + label: '包装号', // 实际是子表的到包装号,为了不影响页面,单独放上面 + field: 'packingNumber', + sort: 'custom', + isForm: false, + isTableForm: false, + table: { + width: 150 + }, + sortTableDefault: 1001 + }, + + { + label: '创建时间', + field: 'createTime', + isForm: false, + table: { + width: 180 + }, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + }, + isTable:false, + }, + // { + // label: '创建者', + // field: 'creator', + // table: { + // width: 130 + // }, + // isForm: false, + // isTable: true + // } + ]) +) + +//表单校验 +export const PurchasereceiptJobMainRules = reactive({ + requestNumber: [{ required: true, message: '请选择申请单号', trigger: 'change' }], + supplierCode: [{ required: true, message: '请选择供应商代码', trigger: 'change' }], + toWarehouseCode: [{ required: true, message: '请选择到仓库代码', trigger: 'change' }], + toAreaTypes: [{ required: true, message: '请选择到库区类型范围', trigger: 'change' }], + requestTime: [{ required: true, message: '请输入申请时间', trigger: 'change' }], + requestDueTime: [{ required: true, message: '请输入要求截止时间', trigger: 'change' }], + status: [{ required: true, message: '请选择状态', trigger: 'change' }], + // jobStageStatus: [ + // { required: true, message: '请选择阶段状态', trigger: 'change' } + // ], + priority: [{ required: true, message: '请输入优先级', trigger: 'blur' }], + priorityIncrement: [{ required: true, message: '请输入优先级增量', trigger: 'blur' }], + departmentCode: [{ required: true, message: '请输入部门', trigger: 'blur' }], + userPositionCode: [{ required: true, message: '请输入岗位', trigger: 'blur' }], + number: [{ required: true, message: '请输入单据号', trigger: 'blur' }], + businessType: [{ required: true, message: '请输入业务类型', trigger: 'blur' }], + createTime: [{ required: true, message: '请输入创建时间', trigger: 'blur' }], + creator: [{ required: true, message: '请输入创建者', trigger: 'blur' }] +}) + +/** + * @returns {Array} 采购收货任务子表 + */ +export const PurchasereceiptJobDetail = useCrudSchemas( + reactive([ + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + hiddenInMain: true, + sortTableDefault: 1002, + sortSearchDefault: 1002 + }, + { + label: '包装规格', + field: 'packUnit', + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1002 + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber' + }, + sortTableDefault: 1002 + }, + // { + // label: '器具号', + // field: 'containerNumber', + // sort: 'custom', + // hiddenInMain: true, + // table: { + // width: 150 + // }, + // isTable: false + // }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + sortSearchDefault: 1000, + isSearch: true, + hiddenInMain: true, + sortTableDefault: 8 + }, + // { + // label: '替代批次', + // field: 'altBatch', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable: false, + // hiddenInMain: true + // }, + { + label: '到货日期', + field: 'arriveDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + sortTableDefault: 1005, + hiddenInMain: true, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x' + } + } + }, + { + label: '生产日期', + field: 'produceDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + sortTableDefault: 1005, + hiddenInMain: true, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x' + } + } + }, + { + label: '过期日期', + field: 'expireDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + sortTableDefault: 1005, + hiddenInMain: true, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x' + } + } + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + sortTableDefault: 1006 + }, + // { + // label: '来源库位', + // field: 'fromLocationCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // sortTableDefault: 1007 + // }, + { + label: '目标库位', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1007 + }, + { + label: '采购订单号', + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + sortTableDefault: 6 + }, + { + label: '订单行', + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 6 + }, + { + label: '行类型', + field: 'poLineType', + sort: 'custom', + table: { + width: 180 + }, + sortTableDefault: 6, + hiddenInMain: true, + isForm: false, + tableForm: { + disabled: true + } + }, + + { + label: '供应商计量数量', + field: 'supplierQty', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1009, + hiddenInMain: true, + form: { + component: 'InputNumber' + } + }, + { + label: '供应商计量单位', + field: 'supplierUom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1009, + hiddenInMain: true + }, + { + label: '转换率', + field: 'convertRate', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber' + }, + sortTableDefault: 1009, + hiddenInMain: true + }, + { + label: '从货主', + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + sortTableDefault: 1008 + }, + { + label: '到货主', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + sortTableDefault: 1008 + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 7, + isSearch: true + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 7 + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + sortTableDefault: 7 + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + sortTableDefault: 7 + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + sortTableDefault: 1010 + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1004 + }, + { + label: '订单数量', + field: 'orderQty', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + sortTableDefault: 1004 + }, + { + label: '收货数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + sortTableDefault: 1004 + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + form: { + component: 'InputNumber' + }, + sortTableDefault: 1004 + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + hiddenInMain: true, + sortTableDefault: 1011 + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1012, + hiddenInMain: true + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + }, + hiddenInMain: false, + sortTableDefault: 1012 + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: false, + sortTableDefault: 1012 + }, + { + label: '操作', + hiddenInMain: true, + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 180, + fixed: 'right' + }, + isTableForm: true + } + ]) +) + +//表单校验 +export const PurchasereceiptJobDetailRules = reactive({ + packingNumber: [{ required: true, message: '请选择包装号', trigger: 'change' }], + batch: [{ required: true, message: '请输入批次', trigger: 'blur' }], + arriveDate: [{ required: true, message: '请输入到货日期', trigger: 'change' }], + produceDate: [{ required: true, message: '请输入生产日期', trigger: 'change' }], + expireDate: [{ required: true, message: '请输入过期日期', trigger: 'change' }], + inventoryStatus: [{ required: true, message: '请选择库存状态', trigger: 'change' }], + poNumber: [{ required: true, message: '请选择订单号', trigger: 'change' }], + poLine: [{ required: true, message: '请输入订单行', trigger: 'blur' }], + packQty: [{ required: true, message: '请输入包装数量', trigger: 'blur' }], + packUnit: [{ required: true, message: '请选择包装规格', trigger: 'change' }], + convertRate: [{ required: true, message: '请输入转换率', trigger: 'blur' }], + toLocationCode: [{ required: true, message: '请选择到库位代码', trigger: 'change' }], + number: [{ required: true, message: '请输入单据号', trigger: 'blur' }], + itemCode: [{ required: true, message: '请选择物料代码', trigger: 'change' }], + createTime: [{ required: true, message: '请输入创建时间', trigger: 'blur' }], + creator: [{ required: true, message: '请输入创建者', trigger: 'blur' }] +}) + +/** + * @returns {Array} 采购收货任务子表 + */ +export const PurchasereceiptJobDetailPackingNumber = useCrudSchemas( + reactive([ + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled: true + } + }, + // { + // label: '器具号', + // field: 'containerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // componentProps: { + // disabled: true + // } + // }, + // tableForm: { + // disabled: true + // } + // }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled: true + } + }, + // { + // label: '替代批次', + // field: 'altBatch', + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // componentProps: { + // disabled: true + // } + // }, + // tableForm: { + // disabled: true + // } + // }, + { + label: '到货日期', + field: 'arriveDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + disabled: true, + style: { width: '100%' }, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x' + } + }, + tableForm: { + disabled: true + } + }, + { + label: '生产日期', + field: 'produceDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x' + } + }, + tableForm: { + disabled: true, + type: 'FormDate', + valueFormat: 'x' + } + }, + { + label: '过期日期', + field: 'expireDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x' + } + }, + tableForm: { + disabled: true, + type: 'FormDate', + valueFormat: 'x' + } + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + } + }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + } + }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + } + }, + { + label: '订单号', + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + } + }, + { + label: '订单行', + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + } + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber' + }, + tableForm: { + disabled: true + } + }, + { + label: '包装规格', + field: 'packUnit', + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + } + }, + { + label: '供应商计量数量', + field: 'supplierQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber' + }, + tableForm: { + disabled: true + } + }, + { + label: '供应商计量单位', + field: 'supplierUom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + } + }, + { + label: '转换率', + field: 'convertRate', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber' + }, + tableForm: { + disabled: true + } + }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + } + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + } + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + } + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + } + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + } + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + } + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + } + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber' + }, + tableForm: { + disabled: true + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: true + } + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + tableForm: { + disabled: true + } + }, + { + label: '备注', + fiield: 'remark', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + } + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + } + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + }, + tableForm: { + disabled: true, + type: 'FormDate', + valueFormat: 'x' + } + } + ]) +) diff --git a/src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptRecordMain/index.vue b/src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptRecordMain/index.vue new file mode 100644 index 000000000..8c764f908 --- /dev/null +++ b/src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptRecordMain/index.vue @@ -0,0 +1,475 @@ + + + diff --git a/src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptRecordMain/purchasereceiptRecordMain.data.ts b/src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptRecordMain/purchasereceiptRecordMain.data.ts new file mode 100644 index 000000000..a0fb7f5ab --- /dev/null +++ b/src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptRecordMain/purchasereceiptRecordMain.data.ts @@ -0,0 +1,2037 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' + + + +/** + * @returns {Array} 采购收货记录主表 + */ +export const PurchasereceiptRecordMain = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isSearch: true, + sortSearchDefault:1, + sortTableDefault:1 + + }, + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + table: { + width: 180 + }, + sortTableDefault:2 + }, + { + label: '任务单号', + field: 'jobNumber', + sort: 'custom', + table: { + width: 180 + }, + sortTableDefault:3 + }, + { + label: '备注', + field: 'mainRemark', + sort: 'custom', + table: { + width: 180 + }, + isSearch: false, + sortTableDefault:3 + }, + { + label: '明细备注', + field: 'remark', + sort: 'custom', + table: { + width: 180 + }, + isSearch: false, + sortTableDefault:3 + }, + { + label: '发货单号', + field: 'asnNumber', + sort: 'custom', + table: { + width: 180 + }, + sortTableDefault:4, + isSearch: true + }, + { + label: 'ERP单据号(无用)', + field: 'erpNumber', + isTable:false, + isTableForm:false, + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: 'ERP单据号', + field: 'qadNumber', + sort: 'custom', + table: { + width: 200 + }, + sortTableDefault:5, + }, + { + label: '要货计划单号', + field: 'ppNumber', + sort: 'custom', + table: { + width: 180 + }, + isTable:false + }, + { + label: '供应商代码', + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + sortSearchDefault:2, + isTable:false + }, + { + label: '到月台代码', + field: 'toDockCode', + sort: 'custom', + table: { + width: 150 + }, + isTable:false + }, + { + label: '承运商', + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, + isTable:false + }, + { + label: '运输方式', + field: 'transferMode', + dictType: DICT_TYPE.TRANSFER_MODE, + sort: 'custom', + table: { + width: 150 + }, + isTable:false + }, + { + label: '数据来源', + field: 'sourceType', + dictType: DICT_TYPE.PURCHASERECEIPT_SOURCE_TYPE, + sort: 'custom', + table: { + width: 150 + }, + form: { + value: 'ASN_ExternalReceipt', + componentProps: { + disabled: true + } + }, + isSearch: false, + }, + { + label: '车牌号', + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, + isTable:false + }, + { + label: '从仓库代码', + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isTable:false + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isTable:false + }, + { + label: '从库区类型范围', + field: 'fromAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库区类型范围', + field: 'toAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库区代码范围', + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isTable:false + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isTable:false + }, + { + label: '出库事务类型', + field: 'outTransaction', + sort: 'custom', + table: { + width: 150 + }, + isTable:false + }, + { + label: '入库事务类型', + field: 'inTransaction', + sort: 'custom', + table: { + width: 150 + }, + isTable:false + }, + { + label: '执行时间', + field: 'executeTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable:false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '生效日期', + field: 'activeDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable:false, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + }, + { + label: '申请时间', + field: 'requestTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable:false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '截止时间', + field: 'dueTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable:false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + isTable:false, + }, + // { + // label: '代码', + // field: 'code', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '接口类型', + field: 'interfaceType', + dictType: DICT_TYPE.INTERFACE_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + isTable:false, + }, + // { + // label: '备注', + // field: 'mainRemark', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable:true, + // }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isTable:false, + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + isSearch: true, + 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: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + } + }, + { + + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 400, + fixed: 'right' + }, + }, + { + label: '批次', // 实际是子表的从批次,为了不影响页面,单独放上面 + field: 'fromBatch', + sort: 'custom', + isForm:false, + isTableForm:false, + table: { + width: 150 + }, + sortTableDefault:12, + }, + { + label: '包装号', // 实际是子表的从包装号,为了不影响页面,单独放上面 + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:16, + }, + { + label: '检验申请单号', + field: 'inspectNumber', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:6, + }, + { + label: '发货数量', + field: 'shippedQty', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:12, + }, + { + label: '收货数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:12, + }, + { + label: '创建时间', + field: 'createTime', + isForm: false, + table: { + width: 180 + }, + formatter: dateFormatter, + detail: { + dateFormat : 'YYYY-MM-DD HH:mm:ss' + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + } + }, + { + label: '创建者', + field: 'creator', + table: { + width: 130 + }, + isForm: false, + isTable: true + }, + { + label: '最后更新时间', + field: 'updateTime', + sort: 'custom', + isDetail: true, + isForm: false, + isTable: false, + 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: false, + table: { + width: 150 + } + }, +])) + +// 表单校验 +export const PurchasereceiptRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + supplierCode: [ + { required: true, message: '请选择供应商代码', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toAreaTypes: [ + { required: true, message: '请选择到库位类型服务', trigger: 'change' } + ], + outTransaction: [ + { required: true, message: '请输入出库事务类型', trigger: 'blur' } + ], + inTransaction: [ + { required: true, message: '请输入入库事务类型', trigger: 'blur' } + ], + executeTime: [ + { required: true, message: '请输入执行时间', trigger: 'change' } + ], + activeDate: [ + { required: true, message: '请输入生效日期', trigger: 'change' } + ], + available: [ + { required: true, message: '请输入是否可用', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + interfaceType: [ + { required: true, message: '请选择接口类型', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请选择创建时间', trigger: 'change' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + +/** + * @returns {Array} 采购收货记录子表 + */ +export const PurchasereceiptRecordDetail = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + }, + sortTableDefault:1998, + hiddenInMain:true + }, + { + label: '检验申请单号', + field: 'inspectNumber', + sort: 'custom', + table: { + width: 150 + }, + isTable:false, + sortTableDefault:6, + }, + { + label: '采购订单号', + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, + sortSearchDefault:5, + sortTableDefault:7, + isSearch: true + }, + { + label: '订单行', + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, + sortSearchDefault:5, + sortTableDefault:8, + }, + { + label: '行类型', + field: 'poLineType', + sort: 'custom', + table: { + width: 180 + }, + sortTableDefault:9, + hiddenInMain:true, + isForm: false, + tableForm:{ + disabled: true + }, + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:10, + isSearch: true + }, + { + label: '是否已发送检验申请', + field: 'inspectRequestFlag', + dictType: DICT_TYPE.TRUE_FALSE, + sort: 'custom', + table: { + width: 150 + }, + isTable:false, + isTableForm:false, + isForm:false, + form: { + value: 'ALL', + componentProps: { + disabled: true + } + }, + isSearch: true, + }, + { + label: '是否已生成上架申请', + field: 'putawayRequestFlag', + dictType: DICT_TYPE.TRUE_FALSE, + sort: 'custom', + table: { + width: 150 + }, + isTable:false, + isTableForm:false, + isForm:false, + form: { + value: 'ALL', + componentProps: { + disabled: true + } + }, + isSearch: true, + }, + { + label: '物料类型', + field: 'itemType', + sort: 'custom', + dictType: DICT_TYPE.ITEM_TYPE, + dictClass: 'string', + isSearch: true, + isTable:false, + isDetail:false, + search:{ + componentProps:{ + multiple:true, + } + } + + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:10, + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:11, + hiddenInMain:true + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:11, + hiddenInMain:true + }, + { + label: '从批次', + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:14, + hiddenInMain:true + }, + { + label: '到批次', + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:14, + hiddenInMain:true + }, + // { + // label: '替代批次', + // field: 'altBatch', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable:false, + // hiddenInMain:true + // }, + { + label: '从包装号', + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:15, + hiddenInMain:true + }, + { + label: '到包装号', + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:15, + hiddenInMain:true + }, + // { + // label: '从器具号', + // field: 'fromContainerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable:false, + // hiddenInMain:true + // }, + // { + // label: '到器具号', + // field: 'toContainerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable:false, + // hiddenInMain:true + // }, + { + label: '订单数量', + field: 'orderQty', + sort: 'custom', + table: { + width: 150 + }, + isTable:false, + hiddenInMain:true, + sortTableDefault:1004 + }, + { + label: '收货数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain:true, + sortTableDefault:12, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + isTable:false, + form: { + component: 'InputNumber', + }, + sortTableDefault:12, + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:13, + }, + { + label: '包装规格', + field: 'packUnit', + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:16, + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + tableForm: { + disabled: true, + }, + isForm:false, + sortTableDefault:16, + }, + { + label: '供应商计量数量', + field: 'supplierQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + sortTableDefault:24, + hiddenInMain:true + }, + { + label: '供应商计量单位', + field: 'supplierUom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:24, + hiddenInMain:true + }, + + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:18, + hiddenInMain:true + }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:18, + + }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:18, + }, + { + label: '从库位组', + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:19, + hiddenInMain:true + }, + { + label: '到库位组', + field: 'toLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:19, + hiddenInMain:true + }, + { + label: '从库区', + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:22, + hiddenInMain:true, + }, + { + label: '到库区', + field: 'toAreaCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:22, + hiddenInMain:true + }, + { + label: '从货主', + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:23, + hiddenInMain:true + }, + { + label: '到货主', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:23, + hiddenInMain:true + }, + { + label: '到货日期', + field: 'arriveDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + sortTableDefault:17, + hiddenInMain:true + }, + { + label: '生产日期', + field: 'produceDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + sortTableDefault:17, + hiddenInMain:true + }, + { + label: '过期日期', + field: 'expireDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + sortTableDefault:17, + hiddenInMain:true + }, + { + label: '转换率', + field: 'convertRate', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + sortTableDefault:1997, + hiddenInMain:true + }, + { + label: '目检结果', + field: 'visualInspectResult', + sort: 'custom', + table: { + width: 150 + }, + isTable:false, + hiddenInMain:true + }, + { + label: '目检照片', + field: 'visualInspectPhotos', + sort: 'custom', + table: { + width: 150 + }, + isTable:false, + hiddenInMain:true + }, + { + label: '不合格原因', + field: 'failedReason', + dictType: DICT_TYPE.PURCHASE_RETURN_REASON, + dictClass: 'string', + isTable:false, + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain:true + }, + { + label: '单价', + field: 'singlePrice', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + isTable:false, + hiddenInMain:true + }, + { + label: '金额', + field: 'amount', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + isTable:false, + hiddenInMain:true + }, + // { + // label: '任务明细ID', + // field: 'jobDetailId', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:1998, + hiddenInMain:true + }, + // { + // label: '代码', + // field: 'code', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '接口类型', + field: 'interfaceType', + dictType: DICT_TYPE.INTERFACE_TYPE, + dictClass: 'string', + sort: 'custom', + table: { + width: 150 + }, + isTable:false, + hiddenInMain:true + }, + // { + // label: '备注', + // field: 'remark', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain:true, + // sortTableDefault:2000, + // }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain:true, + sortTableDefault:2000, + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + hiddenInMain:true, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + sortTableDefault:2000, + }, + + { + label: '操作', + hiddenInMain:true, + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + }, + isTableForm:true, + } +])) + +// 表单校验 +export const PurchasereceiptRecordDetailRules = reactive({ + fromPackingNumber: [ + { required: true, message: '请选择从包装号', trigger: 'change' } + ], + toPackingNumber: [ + { required: true, message: '请选择到包装号', trigger: 'change' } + ], + fromBatch: [ + { required: true, message: '请输入从批次', trigger: 'blur' } + ], + toBatch: [ + { required: true, message: '请输入到批次', trigger: 'blur' } + ], + arriveDate: [ + { required: true, message: '请选择到货日期', trigger: 'change' } + ], + produceDate: [ + { required: true, message: '请选择生产日期', trigger: 'change' } + ], + expireDate: [ + { required: true, message: '请选择过期日期', trigger: 'change' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + toLocationGroupCode: [ + { required: true, message: '请选择到库位组代码', trigger: 'change' } + ], + toAreaCodes: [ + { required: true, message: '请选择到库区代码', trigger: 'change' } + ], + poNumber: [ + { required: true, message: '请选择订单号', trigger: 'change' } + ], + poLine: [ + { required: true, message: '请选择订单行', trigger: 'change' } + ], + packQty: [ + { required: true, message: '请输入包装数量', trigger: 'blur' } + ], + packUnit: [ + { required: true, message: '请选择包装规格', trigger: 'change' } + ], + convertRate: [ + { required: true, message: '请输入转换率', trigger: 'blur' } + ], + visualInspectResult: [ + { required: true, message: '请选择目检结果', trigger: 'change' } + ], +}) + + +/** + * @returns {Array} 采购收货记录子表-子包装数据 + */ +export const PurchasereceiptRecordDetailPackingNumber = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + hiddenInMain:true, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '订单号', + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '订单行', + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '从批次', + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '到批次', + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + // { + // label: '替代批次', + // field: 'altBatch', + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // componentProps: { + // disabled:true + // } + // }, + // tableForm: { + // disabled: true, + // } + // }, + { + label: '从包装号', + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '到包装号', + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + // { + // label: '从器具号', + // field: 'fromContainerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // componentProps: { + // disabled:true + // } + // }, + // tableForm: { + // disabled: true, + // } + // }, + // { + // label: '到器具号', + // field: 'toContainerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // componentProps: { + // disabled:true + // } + // }, + // tableForm: { + // disabled: true, + // } + // }, + { + label: '数量123', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + + }, + { + label: '包装规格', + field: 'packUnit', + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + + }, + { + label: '供应商计量数量', + field: 'supplierQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '供应商计量单位', + field: 'supplierUom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '从库位组代码', + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + sortTableDefault:21, + tableForm: { + disabled: true, + } + }, + { + label: '到库位组代码', + field: 'toLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + sortTableDefault:21, + tableForm: { + disabled: true, + } + }, + { + label: '从库区代码', + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '到库区代码', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '到货日期', + field: 'arriveDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + disabled: true, + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + tableForm: { + disabled: true, + type:'FormDate', + valueFormat: 'x', + } + }, + { + label: '生产日期', + field: 'produceDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + disabled: true, + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + tableForm: { + disabled: true, + type:'FormDate', + valueFormat: 'x', + } + }, + { + label: '过期日期', + field: 'expireDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + disabled: true, + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + tableForm: { + disabled: true, + type:'FormDate', + valueFormat: 'x', + } + }, + { + label: '转换率', + field: 'convertRate', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '目检结果', + field: 'visualInspectResult', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '目检照片', + field: 'visualInspectPhotos', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '不合格原因', + field: 'failedReason', + dictType: DICT_TYPE.PURCHASE_RETURN_REASON, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '单价', + field: 'singlePrice', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '金额', + field: 'amount', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '接口类型', + field: 'interfaceType', + dictType: DICT_TYPE.INTERFACE_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + // { + // label: '备注', + // field: 'remark', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain:true, + // form: { + // componentProps: { + // disabled:true + // } + // }, + // tableForm: { + // disabled: true, + // } + // } +])) diff --git a/src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptRequestMain/index.vue b/src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptRequestMain/index.vue new file mode 100644 index 000000000..a28a602d9 --- /dev/null +++ b/src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptRequestMain/index.vue @@ -0,0 +1,915 @@ + + + diff --git a/src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptRequestMain/purchasereceiptRequestMain.data.ts b/src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptRequestMain/purchasereceiptRequestMain.data.ts new file mode 100644 index 000000000..211ddf776 --- /dev/null +++ b/src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptRequestMain/purchasereceiptRequestMain.data.ts @@ -0,0 +1,2532 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' +import * as getRequestsettingApi from '@/api/wms/requestsetting/index' +import * as SupplierApi from '@/api/wms/supplier' +import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' +import * as PurchaseMainApi from '@/api/wms/purchaseMain' +import * as PurchaseDetailApi from '@/api/wms/purchaseDetail' +import * as LocationApi from '@/api/wms/location' +import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' +import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data' +import * as ItemPackageApi from '@/api/wms/itempackage/index' +import { PurchaseDetail, PurchaseMain } from '../../supplierdeliver/purchaseMain/purchaseMain.data' +import { useUserStore } from '@/store/modules/user' + + +const { t } = useI18n() // 国际化 +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize:10, + pageNo:1, + code:'PurchaseReceiptRequest' +} +const data = await getRequestsettingApi.getRequestsettingPage(queryParams) +const requestsettingData =data?.list[0]||{} + + +// 获取当前操作人的部门 +const userStore = useUserStore() +const userDept = userStore.userSelfInfo.dept +// id 转str 否则form回显匹配不到 +userDept.id = userDept.id.toString() +const userDeptArray:any = [userDept] + +/** + * @returns {Array} 采购收货申请主表 + */ +export const PurchasereceiptRequestMain = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + sortSearchDefault:1, + isForm: false, + isSearch: true, + }, + { + label: '采购订单号', + field: 'poNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch:true, + sortTableDefault:4, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择采购订单', // 输入框占位文本 + searchField: 'number', // 查询弹窗赋值字段 + searchTitle: '采购订单信息', // 查询弹窗标题 + isConcatDetailSchemas:true,//是否是主子表合并 默认false + searchDetailSchemas:PurchaseDetail.allSchemas, + searchAllSchemas: PurchaseMain.allSchemas, // 查询弹窗所需类 + searchPage: PurchaseDetailApi.getPurchaseDetailPageWMS, // 查询弹窗所需分页方法 + isEnter:true, + searchCondition: [{ + key:'status', + value:'2', + message: '已发布状态', + isMainValue: false + }, + { + key: 'status', // 查询列表中字段 + value: '2', // 指查询具体值 + action: '==', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 + }], + verificationParams: [{ + key: 'number', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + } + }, + isForm: true, + }, + { + label: '发货单号', + field: 'asnNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch:true, + sortSearchDefault:3, + isForm: true, + sortTableDefault:2 + }, + { + label: '供应商代码', + field: 'supplierCode', + sort: 'custom', + sortTableDefault:1, + table: { + width: 150 + }, + isSearch: true, + sortSearchDefault:2, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + disabled: true, + isSearchList: false, // 开启查询弹窗 + searchListPlaceholder: '请选择供应商代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '供应商信息', // 查询弹窗标题 + searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类 + searchPage: SupplierApi.getSupplierPage // 查询弹窗所需分页方法 + } + } + }, + // { + // label: '要货计划单号', + // field: 'ppNumber', + // sort: 'custom', + // table: { + // width: 180 + // }, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择要货计划单号', // 输入框占位文本 + // searchField: 'number', // 查询弹窗赋值字段 + // searchTitle: '要货计划信息', // 查询弹窗标题 + // searchAllSchemas: PurchasePlanMain.allSchemas, // 查询弹窗所需类 + // searchPage: PurchasePlanMainApi.getPurchasePlanMainPage, // 查询弹窗所需分页方法 + // searchCondition: [ + // { + // key: 'supplierCode', + // value: 'supplierCode', + // message: '请填写供应商代码!', + // isMainValue: true + // }, + // { + // key: 'status', + // value: 4, + // isMainValue: false + // }, + // { + // key: 'available', + // value: "TRUE", + // isMainValue: false + // }] + // } + // }, + // isForm: true, + // }, + { + label: '承运商', + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '运输方式', + field: 'transferMode', + dictType: DICT_TYPE.TRANSFER_MODE, + sort: 'custom', + table: { + width: 150 + }, + isSearch: false, + }, + { + label: '车牌号', + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '数据来源', + field: 'sourceType', + dictType: DICT_TYPE.PURCHASERECEIPT_SOURCE_TYPE, + sort: 'custom', + table: { + width: 150 + }, + form: { + value: 'ASN_ExternalReceipt', + componentProps: { + disabled: true + } + }, + isSearch: true, + }, + { + label: '从仓库代码', + field: 'fromWarehouseCode', + sort: 'custom', + isTable:false, + table: { + width: 150 + }, + isForm: false, + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + isTable:false, + table: { + width: 150 + }, + isForm: false, + }, + { + label: '从库区类型范围', + field: 'fromAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '到库区类型范围', + field: 'toAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '从库区代码范围', + field: 'fromAreaCodes', + sort: 'custom', + isTable: false, + table: { + width: 150 + }, + isForm: false, + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + isTable: false, + table: { + width: 150 + }, + isForm: false, + }, + { + label: '到月台代码', + field: 'toDockCode', + sort: 'custom', + isTable: false, + table: { + width: 150 + }, + isForm: false, + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + isTable: false, + table: { + width: 150 + }, + form: { + value: 'PurchaseReceipt', + componentProps: { + disabled: true + } + }, + isForm: false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + }, + { + label: '创建时间', + field: 'createTime', + isForm: false, + table: { + width: 180 + }, + formatter: dateFormatter, + detail: { + dateFormat : 'YYYY-MM-DD HH:mm:ss' + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isSearch: true, + 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: 'creator', + table: { + width: 130 + }, + isForm: false, + isTable: true + }, + { + label: '最后更新时间', + field: 'updateTime', + sort: 'custom', + isDetail: true, + isForm: false, + isTable: false, + 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: false, + table: { + width: 150 + } + }, + { + label: '申请时间', + field: 'requestTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: false, + isTable: false, + }, + // { + // label: '截止时间', + // field: 'dueTime', + // formatter: dateFormatter, + // detail: { + // dateFormat: 'YYYY-MM-DD HH:mm:ss' + // }, + // sort: 'custom', + // table: { + // width: 180 + // }, + // form: { + // component: 'DatePicker', + // componentProps: { + // style: {width:'100%'}, + // type: 'datetime', + // dateFormat: 'YYYY-MM-DD HH:mm:ss', + // valueFormat: 'x', + // } + // }, + // }, + // { + // label: '部门', + // field: 'departmentCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + // return userDeptArray.find((account) => account.id == cellValue)?.name + // }, + // form: { + // value: userDept.id, + // component: 'Select', + // api: () => userDeptArray, + // componentProps: { + // disabled: true, + // optionsAlias: { + // labelField: 'name', + // valueField: 'id' + // } + // } + // } + // }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: false, + isTable: true, + sortTableDefault:3, + isForm:false, + sort: 'custom', + table: { + width: 150 + }, + form: { + value: '1', + componentProps: { + disabled: true + } + } + }, + { + label: '自动提交', + field: 'autoCommit', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + isForm:false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'FALSE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true, + } + } + }, + { + label: '自动通过', + field: 'autoAgree', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + isForm:false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'FALSE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true, + } + } + }, + { + label: '自动执行', + field: 'autoExecute', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + isForm:false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'FALSE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true, + } + } + }, + { + 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: 'labelStatus', + sort: 'custom', + dictType: DICT_TYPE.LABEL_STATUS, + dictClass: 'string', + table: { + width: 150 + }, + isForm: false, + isTable: false, + isSearch: false, + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 400, + fixed: 'right' + }, + } +])) + +//表单校验 +export const PurchasereceiptRequestMainRules = reactive({ + ppNumber: [ + { required: true, message: '请输入采购订单', trigger: 'blur' } + ], + poNumber: [ + { required: true, message: '请选择采购订单号', trigger: 'blur' } + ], + toWarehouseCode: [ + { required: true, message: '请输入到仓库代码', trigger: 'blur' } + ], + toAreaTypes: [ + { required: true, message: '请输入到库区类型范围', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], +}) + +/** + * @returns {Array} 采购收货申请子表 + */ +export const PurchasereceiptRequestDetail = useCrudSchemas(reactive([ + + { + label: '订单号', + field: 'poNumber', + hiddenInMain:true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:5, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择订单号', + searchField: 'number', + searchTitle: '采购订单信息', + isConcatDetailSchemas:true,//是否是主子表合并 默认false + searchDetailSchemas:PurchaseDetail.allSchemas, + searchAllSchemas: PurchaseMain.allSchemas, + searchPage: PurchaseDetailApi.getPurchaseDetailPageWMS, + searchCondition: [ + { + key:'number', + value:'poNumber', + action: '==', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + isFormModel:true, + required:true, + message:'请选择采购订单号', + isMainValue: false + }, + { + key: 'status', // 查询列表中字段 + value: '2', // 指查询具体值 + action: '==', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 + }] + }, + form: { + labelMessage: '该订单号会影响订单行的选择', + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择订单号', + searchField: 'number', + searchTitle: '采购订单信息', + searchDetailSchemas:PurchaseDetail.allSchemas, + searchAllSchemas: PurchaseMain.allSchemas, + searchPage: PurchaseDetailApi.getPurchaseDetailPageWMS, + searchCondition: [{ + key:'supplierCode', + value:'supplierCode', + message: '请选择供应商!', + isMainValue: true + }] + } + } + }, + { + label: '订单类型', + field: 'type', + dictType: DICT_TYPE.WORK_ORDER_TYPE, + dictClass: 'string', + isSearch: false, + isTable: false, + isTableForm: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + isForm: false, + }, + { + label: '订单行', + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:5, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择订单行', // 输入框占位文本 + searchField: 'lineNumber', // 查询弹窗赋值字段 + searchTitle: '订单信息', // 查询弹窗标题 + searchAllSchemas: PurchaseDetail.allSchemas, // 查询弹窗所需类 + searchPage: PurchaseDetailApi.getPurchaseDetailPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key:'number', + value:'poNumber', + message: '请填写订单号!', + isMainValue: true + }] + } + }, + tableForm:{ + multiple:true, + isInpuFocusShow: true, + searchListPlaceholder: '请选择订单行', // 输入框占位文本 + searchField: 'lineNumber', // 查询弹窗赋值字段 + searchTitle: '订单信息', // 查询弹窗标题 + searchAllSchemas: PurchaseDetail.allSchemas, // 查询弹窗所需类 + searchPage: PurchaseDetailApi.getPurchaseDetailPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key:'number', + value:'poNumber', + message: '请填写订单号!', + isMainValue: true + }] + } + }, + { + label: '行类型', + field: 'poLineType', + sort: 'custom', + table: { + width: 180 + }, + sortTableDefault:5, + hiddenInMain:true, + isForm: false, + tableForm:{ + disabled: true + } + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch:true, + sortTableDefault:6, + tableForm:{ + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:7, + isTableForm: false, + isForm: false + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:7, + hiddenInMain:true, + isTableForm: false, + isForm: false + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:7, + hiddenInMain:true, + isTableForm: false, + isForm: false + }, + // { + // label: '器具号', + // field: 'containerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain:true, + // isTable:false, + // isTableForm: false, + // isForm: false + // }, + // { + // label: '数量', + // field: 'qty', + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // component: 'InputNumber', + // componentProps: { + // min: 1, + // precision: 6 + // }, + // }, + // tableForm: { + // type: 'InputNumber', + // min: 1, + // precision: 6 + // } + // }, + { + label: '订单数量', + field: 'orderQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + }, + }, + hiddenInMain: true, + sortTableDefault:9, + tableForm: { + disabled:true, + type: 'InputNumber', + min: 1, + precision: 6 + } + }, + { + label: '收货数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:9, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6 + }, + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 6 + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:10, + tableForm: { + type: 'Select', + disabled: true + } + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + hiddenInMain:true, + sortTableDefault:11, + isForm: false + }, + { + label: '包装规格', + field: 'packUnit', + dictClass: 'string', + isTable: true, + isTableForm: false, + sort: 'custom', + table: { + width: 150, + componentProps: { + disabled: true + } + }, + sortTableDefault:11, + tableForm:{ + disabled:true + }, + isForm: true + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:11, + form: { + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择包装', + searchField: 'packQty', + searchTitle: '物品包装信息', + searchAllSchemas: Itempackaging.allSchemas, + searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver, + searchCondition: [ + { + key: 'itemCode', + value: 'itemCode', + message: '请选择订单行', + isMainValue: true + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + + ] + } + }, + tableForm: { + isInpuFocusShow: true, + searchListPlaceholder: '请选择包装', + searchField: 'packQty', + searchTitle: '物品包装信息', + searchAllSchemas: Itempackaging.allSchemas, + searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver, + searchCondition: [ + { + key: 'itemCode', + value: 'itemCode', + message: '请选择订单行', + isMainValue: true + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + }] + }, + isTableForm: false, + isForm: true + }, + { + label: '到库位代码', + field: 'defaultToLocationCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:13, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择库位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + searchPage: LocationApi.selectBusinessTypeToLocation, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'businessType', + value: 'PurchaseReceipt', + isMainValue: false + },{ + key: 'isIn', + value: 'in', + isMainValue: false + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + } + }, + tableForm: { + enterSearch: true, + isInpuFocusShow: true, + searchListPlaceholder: '请选择库位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + searchPage: LocationApi.selectBusinessTypeToLocation, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'businessType', + value: 'PurchaseReceipt', + isMainValue: false + },{ + key: 'isIn', + value: 'in', + isMainValue: false + }], + isRepeat: true,//tableForm下方输入框是否可以重复添加该条数据 + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + }, + isTableForm: true, + isForm: false + }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:13, + hiddenInMain:true, + isTableForm: false, + isForm: false + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:13, + hiddenInMain:true, + isTableForm: false, + isForm: false + }, + { + label: '供应商计量数量', + field: 'supplierPackQty', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:13, + form: { + component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + }, + }, + hiddenInMain:true, + isTableForm: false, + isForm: false + }, + { + label: '供应商计量单位', + field: 'supplierPackUnit', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:13, + hiddenInMain:true, + isTableForm: false, + isForm: false, + tableForm: { + type: 'Select' + } + }, + { + label: '转换率', + field: 'convertRate', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:13, + hiddenInMain:true, + form: { + component: 'InputNumber', + componentProps: { + min: 0 + }, + }, + isTableForm: false, + isForm: false + }, + // { + // label: '替代批次', + // field: 'altBatch', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTableForm: false, + // isForm: false + // }, + { + label: '到货日期', + field: 'arriveDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + sortTableDefault:11, + hiddenInMain:true, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + tableForm:{ + type:'FormDate', + placeholder: '请选择到货日期', + valueFormat: 'x', + }, + }, + { + label: '生产日期', + field: 'produceDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + hiddenInMain:true, + sortTableDefault:11, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + tableForm:{ + type:'FormDate', + placeholder: '请选择生产日期', + valueFormat: 'x', + }, + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + sortTableDefault:8, + table: { + width: 150 + }, + tableForm:{ + disabled: true + } + }, + { + label: '过期日期', + field: 'expireDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + sortTableDefault:11, + table: { + width: 180 + }, + isTable:true, + hiddenInMain:true, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + // tableForm:{ + // type:'FormDate', + // placeholder: '请选择过期日期', + // valueFormat: 'x', + // }, + tableForm:{ + type: 'slot', + disabled: true + } + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault:12, + hiddenInMain:true, + isTableForm: false, + isForm: false, + tableForm: { + type: 'Select' + } + }, + // { + // label: '从库位代码', + // field: 'fromLocationCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // sortTableDefault:12, + // isTableForm: false, + // isForm: false + // }, + + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain:true, + isTableForm: false, + isForm: false + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + hiddenInMain:true, + isTableForm: false, + form: { + componentProps: { + disabled: true + } + } + }, + + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain:true, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain:true, + isTableForm: false, + isForm: false + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + hiddenInMain:true, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isTableForm: false, + isForm: false + }, + { + label: '操作', + hiddenInMain:true, + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + }, + isTableForm:false, + } +])) + +//表单校验 +export const PurchasereceiptRequestDetailRules = reactive({ + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + produceDate: [ + { required: true, message: '请输入生产日期', trigger: 'change' } + ], + arriveDate: [ + { required: true, message: '请输入到货日期', trigger: 'change' } + ], + expireDate: [ + { required: true, message: '请输入过期日期', trigger: 'change' } + ], + packQty: [ + { required: true, message: '请输入包装数量', trigger: 'change' } + ], + poNumber: [ + { required: true, message: '请输入订单号', trigger: 'change' } + ], + poLine: [ + { required: true, message: '请输入订单行', trigger: 'change' } + ], + packUnit: [ + { required: true, message: '请选择包装规格', trigger: 'change' } + ], + convertRate: [ + { required: true, message: '请输入转换率', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + itemCode: [ + { required: true, message: '请输入物料代码', trigger: 'change' } + ], +}) + +/** + * @returns {Array} 采购收货申请子表--子包装号 + */ +export const PurchasereceiptRequestDetailPackingNumber = useCrudSchemas(reactive([ + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '订单号', + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true, + isInpuFocusShow: false, + searchListPlaceholder: '请选择订单号', + searchField: 'number', + searchTitle: '采购订单信息', + searchAllSchemas: PurchaseMain.allSchemas, + searchPage: PurchaseMainApi.getPurchaseMainPage, + searchCondition: [{ + key:'supplierCode', + value:'supplierCode', + message: '请选择供应商!', + isMainValue: true + }] + }, + form: { + labelMessage: '该订单号会影响订单行的选择', + componentProps: { + disabled:true, + isSearchList: false, + searchListPlaceholder: '请选择订单号', + searchField: 'number', + searchTitle: '采购订单信息', + searchAllSchemas: PurchaseMain.allSchemas, + searchPage: PurchaseMainApi.getPurchaseMainPage, + searchCondition: [{ + key:'supplierCode', + value:'supplierCode', + message: '请选择供应商!', + isMainValue: true + }] + } + } + }, + { + label: '订单行', + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + disabled:true, + isSearchList: false, // 开启查询弹窗 + searchListPlaceholder: '请选择订单行', // 输入框占位文本 + searchField: 'lineNumber', // 查询弹窗赋值字段 + searchTitle: '订单信息', // 查询弹窗标题 + searchAllSchemas: PurchaseDetail.allSchemas, // 查询弹窗所需类 + searchPage: PurchaseDetailApi.getPurchaseDetailPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key:'number', + value:'poNumber', + message: '请填写订单号!', + isMainValue: true + }] + } + }, + tableForm:{ + disabled:true, + isInpuFocusShow: false, + searchListPlaceholder: '请选择订单行', // 输入框占位文本 + searchField: 'lineNumber', // 查询弹窗赋值字段 + searchTitle: '订单信息', // 查询弹窗标题 + searchAllSchemas: PurchaseDetail.allSchemas, // 查询弹窗所需类 + searchPage: PurchaseDetailApi.getPurchaseDetailPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key:'number', + value:'poNumber', + message: '请填写订单号!', + isMainValue: true + }] + } + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + // { + // label: '器具号', + // field: 'containerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTableForm: false, + // isForm: false + // }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + }, + }, + tableForm: { + disabled: true, + type: 'InputNumber', + min: 1, + precision: 6 + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: true + } + }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '默认到库位代码', + field: 'defaultToLocationCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择库位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, + tableForm:{ + disabled: true, + isInpuFocusShow: false, + searchListPlaceholder: '请选择库位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + }, + isTableForm: true, + isForm: false + }, + { + label: '生产日期', + field: 'produceDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + disabled:true, + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + tableForm:{ + disabled: true, + type:'FormDate', + placeholder: '请选择生产日期', + valueFormat: 'x', + }, + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled: true + } + }, + // { + // label: '替代批次', + // field: 'altBatch', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTableForm: false, + // isForm: false + // }, + { + label: '到货日期', + field: 'arriveDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + disabled:true, + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + tableForm:{ + disabled: true, + type:'FormDate', + placeholder: '请选择到货日期', + valueFormat: 'x', + }, + }, + { + label: '过期日期', + field: 'expireDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + disabled:true, + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + tableForm:{ + disabled: true, + type:'FormDate', + placeholder: '请选择过期日期', + valueFormat: 'x', + }, + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + tableForm: { + type: 'Select', + disabled: true, + } + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择包装', + searchField: 'packQty', + searchTitle: '物品包装信息', + searchAllSchemas: Itempackaging.allSchemas, + searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver, + searchCondition: [ + { + key: 'itemCode', + value: 'itemCode', + message: '请选择订单行', + isMainValue: true + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + + ] + } + }, + tableForm: { + disabled: true, + isInpuFocusShow: false, + searchListPlaceholder: '请选择包装', + searchField: 'packQty', + searchTitle: '物品包装信息', + searchAllSchemas: Itempackaging.allSchemas, + searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver, + searchCondition: [ + { + key: 'itemCode', + value: 'itemCode', + message: '请选择订单行', + isMainValue: true + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + }] + }, + isTableForm: true, + isForm: true + }, + { + label: '包装规格', + field: 'packUnit', + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150, + componentProps: { + disabled: true + } + }, + tableForm:{ + disabled:true + }, + isTableForm: true, + isForm: true + }, + { + label: '供应商计量数量', + field: 'supplierPackQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + }, + }, + isTableForm: false, + isForm: false + }, + { + label: '供应商计量单位', + field: 'supplierPackUnit', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + tableForm: { + type: 'Select' + } + }, + { + label: '转换率', + field: 'convertRate', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 0 + }, + }, + tableForm: { + disabled: true, + }, + isTableForm: false, + isForm: false + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + isTableForm: false, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isTableForm: false, + isForm: false + } +])) + + +export const PurchasereceiptRequestDetailLabel = useCrudSchemas(reactive([ + { + label: '订单号', + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled: true, + isInpuFocusShow: false, + searchListPlaceholder: '请选择订单号', + searchField: 'number', + searchTitle: '采购订单信息', + searchAllSchemas: PurchaseMain.allSchemas, + searchPage: PurchaseMainApi.getPurchaseMainPage, + searchCondition: [{ + key:'supplierCode', + value:'supplierCode', + message: '请选择供应商!', + isMainValue: true + }] + }, + form: { + labelMessage: '该订单号会影响订单行的选择', + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择订单号', + searchField: 'number', + searchTitle: '采购订单信息', + searchAllSchemas: PurchaseMain.allSchemas, + searchPage: PurchaseMainApi.getPurchaseMainPage, + searchCondition: [{ + key:'supplierCode', + value:'supplierCode', + message: '请选择供应商!', + isMainValue: true + }] + } + } + }, + { + label: '订单行', + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + disabled:true, + isSearchList: false, // 开启查询弹窗 + searchListPlaceholder: '请选择订单行', // 输入框占位文本 + searchField: 'lineNumber', // 查询弹窗赋值字段 + searchTitle: '订单信息', // 查询弹窗标题 + searchAllSchemas: PurchaseDetail.allSchemas, // 查询弹窗所需类 + searchPage: PurchaseDetailApi.getPurchaseDetailPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key:'number', + value:'poNumber', + message: '请填写订单号!', + isMainValue: true + }] + } + }, + tableForm:{ + disabled:true, + isInpuFocusShow: false, + searchListPlaceholder: '请选择订单行', // 输入框占位文本 + searchField: 'lineNumber', // 查询弹窗赋值字段 + searchTitle: '订单信息', // 查询弹窗标题 + searchAllSchemas: PurchaseDetail.allSchemas, // 查询弹窗所需类 + searchPage: PurchaseDetailApi.getPurchaseDetailPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key:'number', + value:'poNumber', + message: '请填写订单号!', + isMainValue: true + }] + } + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + isTableForm: true, + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + isTableForm: true, + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + // { + // label: '器具号', + // field: 'containerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTableForm: false, + // isForm: false + // }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + disabled:true, + min: 1, + precision: 6 + }, + }, + tableForm: { + disabled:true, + type: 'InputNumber', + min: 1, + precision: 6 + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: true + } + }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '默认到库位代码', + field: 'defaultToLocationCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + disabled:true, + isSearchList: false, // 开启查询弹窗 + searchListPlaceholder: '请选择库位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, + tableForm:{ + disabled:true, + isInpuFocusShow: false, + searchListPlaceholder: '请选择库位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + }, + isTableForm: true, + isForm: false + }, + { + label: '生产日期', + field: 'produceDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + disabled:true, + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + tableForm:{ + disabled:true, + type:'FormDate', + placeholder: '请选择生产日期', + valueFormat: 'x', + }, + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled: true + } + }, + // { + // label: '替代批次', + // field: 'altBatch', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTableForm: false, + // isForm: false + // }, + { + label: '到货日期', + field: 'arriveDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + disabled: true, + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + tableForm:{ + disabled: true, + type:'FormDate', + placeholder: '请选择到货日期', + valueFormat: 'x', + }, + }, + { + label: '过期日期', + field: 'expireDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + disabled: true, + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + tableForm:{ + disabled: true, + type:'FormDate', + placeholder: '请选择过期日期', + valueFormat: 'x', + }, + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + tableForm: { + type: 'Select' + } + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true, + isSearchList: true, + searchListPlaceholder: '请选择包装', + searchField: 'packQty', + searchTitle: '物品包装信息', + searchAllSchemas: Itempackaging.allSchemas, + searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver, + searchCondition: [ + { + key: 'itemCode', + value: 'itemCode', + message: '请选择订单行', + isTableRowValue: true, //查询当前searchTable表中行数据的值 + isMainValue: false + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + + ] + } + }, + tableForm: { + disabled: true, + isInpuFocusShow: true, + searchListPlaceholder: '请选择包装', + searchField: 'packQty', + searchTitle: '物品包装信息', + searchAllSchemas: Itempackaging.allSchemas, + searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver, + searchCondition: [ + { + key: 'itemCode', + value: 'itemCode', + message: '请选择订单行', + isTableRowValue: true, //查询当前searchTable表中行数据的值 + isMainValue: false + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + }] + }, + isTableForm: true, + isForm: true + }, + { + label: '包装规格', + field: 'packUnit', + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150, + componentProps: { + disabled: true + } + }, + tableForm:{ + disabled:true + }, + isTableForm: true, + isForm: true + }, + { + label: '供应商计量数量', + field: 'supplierPackQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + disabled: true, + min: 1, + precision: 6 + }, + }, + isTableForm: false, + isForm: false + }, + { + label: '供应商计量单位', + field: 'supplierPackUnit', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + tableForm: { + type: 'Select' + } + }, + { + label: '转换率', + field: 'convertRate', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + disabled: true, + min: 0 + }, + }, + isTableForm: false, + isForm: false + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + isTableForm: false, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, +]))