From 56ad92a92a867374ef78b782366ccf6bae3e0b9f Mon Sep 17 00:00:00 2001
From: zhaoxuebing <1291173720@qq.com>
Date: Wed, 11 Sep 2024 14:22:14 +0800
Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=96=99=E9=9A=94=E7=A6=BB=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/utils/dict.ts | 3 +-
.../inventorymoveRecordMainOKHOLD/index.vue | 236 ++++++
.../inventorymoveRecordMainOKHOLD.data.ts | 761 ++++++++++++++++++
3 files changed, 999 insertions(+), 1 deletion(-)
create mode 100644 src/views/wms/moveManage/inventorymove/inventorymoveRecordMainOKHOLD/index.vue
create mode 100644 src/views/wms/moveManage/inventorymove/inventorymoveRecordMainOKHOLD/inventorymoveRecordMainOKHOLD.data.ts
diff --git a/src/utils/dict.ts b/src/utils/dict.ts
index 800462d54..842c9cb5b 100644
--- a/src/utils/dict.ts
+++ b/src/utils/dict.ts
@@ -399,8 +399,9 @@ export enum DICT_TYPE {
IS_LINE_ITEM = 'is_line_item', // 是否是线边
PUT_IN_TYPE = 'put_in_type', // 入库类型
PURCHASE_JOB_STATUS = 'purchase_job_status', // 采购收货任务状态
- PUBLISHE_STATUS = 'publishe_status', // 采购收货任务状态
+ PUBLISHE_STATUS = 'publishe_status', // 采购收货任务状态
PUBLISHE_STATUS_FIRST_INSPECTION = 'publishe_status_first_inspection', // 首件检验记录发布状态
RETURN_REASON_TYPE = 'return_reason_type', // 采购退货原因类型
SCRAPPING_REASON = 'scrapping_reason', //制品子件报废原因
+ RECEIVE_STATUS = 'receive_status', // 收货确认状态
}
diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainOKHOLD/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainOKHOLD/index.vue
new file mode 100644
index 000000000..cbd6376fb
--- /dev/null
+++ b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainOKHOLD/index.vue
@@ -0,0 +1,236 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.number }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainOKHOLD/inventorymoveRecordMainOKHOLD.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainOKHOLD/inventorymoveRecordMainOKHOLD.data.ts
new file mode 100644
index 000000000..0e54eb2d5
--- /dev/null
+++ b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainOKHOLD/inventorymoveRecordMainOKHOLD.data.ts
@@ -0,0 +1,761 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
+
+/**
+ * @returns {Array} 库存转移记录主表
+ */
+export const InventorymoveRecordMain = useCrudSchemas(reactive([
+ {
+ label: '单据号',
+ field: 'number',
+ sort: 'custom',
+ table: {
+ width: 180,
+ fixed: 'left'
+ },
+ isSearch: true
+ },
+ {
+ label: '申请单号',
+ field: 'requestNumber',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ sortTableDefault:996,
+ isSearch: true
+ },
+ {
+ label: '任务单号',
+ field: 'jobNumber',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ sortTableDefault:997,
+ isSearch: true
+ },
+ // {
+ // label: '使用在途库',
+ // field: 'useOnTheWayLocation',
+ // dictType: DICT_TYPE.TRUE_FALSE,
+ // dictClass: 'string',
+ // isTable: true,
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // form: {
+ // component: 'Switch',
+ // value: 'TRUE',
+ // componentProps: {
+ // inactiveValue: 'FALSE',
+ // activeValue: 'TRUE'
+ // }
+ // }
+ // },
+ // {
+ // label: '申请时间',
+ // field: 'requestTime',
+ // 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',
+ // }
+ // },
+ // },
+ // {
+ // label: '截止时间',
+ // field: 'dueTime',
+ // 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',
+ // }
+ // },
+ // },
+ // {
+ // label: '执行时间',
+ // field: 'executeTime',
+ // 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',
+ // }
+ // },
+ // },
+ // {
+ // label: '生效日期',
+ // field: 'activeDate',
+ // 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',
+ // }
+ // },
+ // },
+ {
+ label: '发货单号',
+ field: 'asnNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isForm: false,
+ },
+ {
+ label: '从仓库代码',
+ field: 'fromWarehouseCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '到仓库代码',
+ field: 'toWarehouseCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ // {
+ // label: '从库区类型范围',
+ // field: 'fromAreaTypes',
+ // dictType: DICT_TYPE.AREA_TYPE,
+ // dictClass: 'string',
+ // isTable: true,
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // },
+ // {
+ // label: '到库区类型范围',
+ // field: 'toAreaTypes',
+ // dictType: DICT_TYPE.AREA_TYPE,
+ // dictClass: 'string',
+ // isTable: true,
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // },
+ // {
+ // label: '从库区代码范围',
+ // field: 'fromAreaCodes',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // },
+ // {
+ // label: '到库区代码范围',
+ // field: 'toAreaCodes',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // },
+ {
+ label: '出库事务类型',
+ field: 'outTransactionType',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '入库事务类型',
+ field: 'inTransactionType',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '业务类型',
+ field: 'businessType',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+
+ // {
+ // label: '部门',
+ // field: 'departmentCode',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // },
+ // {
+ // label: '接口类型',
+ // field: 'interfaceType',
+ // dictType: DICT_TYPE.INTERFACE_TYPE,
+ // dictClass: 'string',
+ // isTable: true,
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // },
+ // {
+ // label: '备注',
+ // field: 'remark',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // },
+ {
+ 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',
+ }
+ },
+ 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',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ 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: 'code',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // },
+ // {
+ // label: '是否可用',
+ // field: 'available',
+ // dictType: DICT_TYPE.TRUE_FALSE,
+ // dictClass: 'string',
+ // isSearch: true,
+ // isTable: true,
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // form: {
+ // component: 'Switch',
+ // value: 'TRUE',
+ // componentProps: {
+ // inactiveValue: 'FALSE',
+ // activeValue: 'TRUE'
+ // }
+ // }
+ // },
+]))
+
+//表单校验
+export const InventorymoveRecordMainRules = reactive({
+ requestNumber: [
+ { required: true, message: '请选择申请单号', trigger: 'change' }
+ ],
+ fromWarehouseCode: [
+ { required: true, message: '请选择从仓库代码', trigger: 'change' }
+ ],
+ fromAreaTypes: [
+ { required: true, message: '请选择从库区类型范围', trigger: 'change' }
+ ],
+ fromAreaCodes: [
+ { 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: 'blur' }
+ ],
+ creator: [
+ { required: true, message: '请输入创建者', trigger: 'blur' }
+ ],
+})
+
+/**
+ * @returns {Array} 库存转移记录子表
+ */
+export const InventorymoveRecordDetail = useCrudSchemas(reactive([
+ {
+ label: '单据号',
+ field: 'number',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ hiddenInMain: true,
+ },
+ {
+ label: '接收状态',
+ field: 'receiveStatus',
+ sort: 'custom',
+ dictType: DICT_TYPE.RECEIVE_STATUS,
+ dictClass: 'string',
+ sortTableDefault:998,
+ isTable: true,
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '物料代码',
+ field: 'itemCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '物料名称',
+ field: 'itemName',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '物料描述1',
+ field: 'itemDesc1',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '物料描述2',
+ field: 'itemDesc2',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ // {
+ // label: '在途库库位',
+ // field: 'onTheWayLocationCode',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // },
+ {
+ label: '从批次',
+ field: 'fromBatch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '到批次',
+ field: 'toBatch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '供应商批次',
+ field: 'altBatch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '从包装号',
+ field: 'fromPackingNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '到包装号',
+ field: 'toPackingNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ // {
+ // label: '从器具号',
+ // field: 'fromContainerNumber',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // },
+ // {
+ // label: '到器具号',
+ // field: 'toContainerNumber',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // },
+ {
+ label: '数量',
+ field: 'qty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ }
+ },
+ {
+ label: '计量单位',
+ field: 'uom',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '从库位代码',
+ field: 'fromLocationCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '到库位代码',
+ field: 'toLocationCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '从库存状态',
+ field: 'fromInventoryStatus',
+ dictType: DICT_TYPE.INVENTORY_STATUS,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '到库存状态',
+ field: 'toInventoryStatus',
+ dictType: DICT_TYPE.INVENTORY_STATUS,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '从库位组代码',
+ field: 'fromLocationGroupCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '到库位组代码',
+ field: 'toLocationGroupCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '从库区代码',
+ field: 'fromAreaCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '到库区代码',
+ field: 'toAreaCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '项目代码',
+ field: 'projectCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '从货主代码',
+ field: 'fromOwnerCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '到货主代码',
+ field: 'toOwnerCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '接口类型',
+ field: 'interfaceType',
+ dictType: DICT_TYPE.INTERFACE_TYPE,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ // {
+ // label: '备注',
+ // field: 'remark',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // },
+ // {
+ // label: '任务明细ID',
+ // field: 'jobDetailId',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // },
+ // {
+ // 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',
+ // }
+ // },
+ // },
+ // {
+ // label: '创建者',
+ // field: 'creator',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // },
+ // {
+ // label: '代码',
+ // field: 'code',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // },
+]))
+
+//表单校验
+export const InventorymoveRecordDetailRules = reactive({
+ fromPackingNumber: [
+ { required: true, message: '请选择从包装号', trigger: 'change' }
+ ],
+ fromBatch: [
+ { required: true, message: '请输入从批次', trigger: 'blur' }
+ ],
+ fromLocationCode: [
+ { required: true, message: '请选择从库位代码', trigger: 'change' }
+ ],
+ fromLocationGroupCode: [
+ { required: true, message: '请选择从库位组代码', trigger: 'change' }
+ ],
+ fromAreaCode: [
+ { required: true, message: '请选择从库区代码', trigger: 'change' }
+ ],
+ fromInventoryStatus: [
+ { required: true, message: '请选择从库存状态', trigger: 'change' }
+ ],
+ toPackingNumber: [
+ { required: true, message: '请选择到包装号', trigger: 'change' }
+ ],
+ toBatch: [
+ { required: true, message: '请输入到批次', trigger: 'blur' }
+ ],
+ toLocationCode: [
+ { required: true, message: '请选择到库位代码', trigger: 'change' }
+ ],
+ toLocationGroupCode: [
+ { required: true, message: '请选择到库位组代码', trigger: 'change' }
+ ],
+ toAreaCode: [
+ { required: true, message: '请选择到库区代码', trigger: 'change' }
+ ],
+ toInventoryStatus: [
+ { 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' }
+ ],
+})