From a9fe7878d44c3e38912e9e138b31f7f7956854ec Mon Sep 17 00:00:00 2001
From: zhaoxuebing <1291173720@qq.com>
Date: Mon, 22 Jul 2024 19:52:08 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BB=B4=E4=BF=AE=E5=A4=87=E4=BB=B6=E9=80=80?=
=?UTF-8?q?=E8=B4=A7=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../purchasereturnRequestMain/index.vue | 2 +
.../purchasereturnRecordSpareMain/index.vue | 198 ++
.../purchasereturnRecordSpareMain.data.ts | 906 +++++++++
.../purchasereturnRequestSpareMain/index.vue | 1014 ++++++++++
.../purchasereturnRequestSpareMain.data.ts | 1674 +++++++++++++++++
5 files changed, 3794 insertions(+)
create mode 100644 src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRecordSpareMain/index.vue
create mode 100644 src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRecordSpareMain/purchasereturnRecordSpareMain.data.ts
create mode 100644 src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue
create mode 100644 src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/purchasereturnRequestSpareMain.data.ts
diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
index 7875f9402..b8aa0129c 100644
--- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
+++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
@@ -915,9 +915,11 @@ const submitForm = async (formType, submitData) => {
formRef.value.formLoading = false
return
}
+ data.returnSourceType='1'
await PurchasereturnRequestMainApi.createPurchasereturnRequestMain(data)
message.success(t('common.createSuccess'))
} else {
+ data.returnSourceType='1'
await PurchasereturnRequestMainApi.updatePurchasereturnRequestMain(data)
message.success(t('common.updateSuccess'))
}
diff --git a/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRecordSpareMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRecordSpareMain/index.vue
new file mode 100644
index 000000000..0a762707e
--- /dev/null
+++ b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRecordSpareMain/index.vue
@@ -0,0 +1,198 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.number }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRecordSpareMain/purchasereturnRecordSpareMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRecordSpareMain/purchasereturnRecordSpareMain.data.ts
new file mode 100644
index 000000000..ef0a33ad3
--- /dev/null
+++ b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRecordSpareMain/purchasereturnRecordSpareMain.data.ts
@@ -0,0 +1,906 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
+
+/**
+ * @returns {Array} 采购退货记录主表
+ */
+export const PurchasereturnRecordMain = useCrudSchemas(reactive([
+ {
+ label: '单据号',
+ field: 'number',
+ sort: 'custom',
+ table: {
+ width: 180,
+ fixed: 'left'
+ },
+ sortTableDefault: 1012,
+ sortSearchDefault:1,
+ isSearch: true
+ },
+ {
+ label: '申请单号',
+ field: 'requestNumber',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ isTable: false
+ },
+ {
+ label: '任务单号',
+ field: 'jobNumber',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ isTable: false
+ },
+ {
+ label: '采购收货记录单号',
+ field: 'purchaseReceiptRecordNumber',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ isSearch: true,
+ sortTableDefault: 3,
+ sortSearchDefault: 5,
+ }, {
+ label: 'qad采购退货记录单号',
+ field: 'qadPurchaseReturnRecordCode',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ sortSearchDefault:3,
+ sortTableDefault: 4,
+ isTable: true
+ },
+ {
+ label: '发货单号',
+ field: 'asnNumber',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ sortSearchDefault:3,
+ isSearch: true,
+ sortTableDefault: 2
+ },
+ {
+ label: '要货计划单号',
+ field: 'ppNumber',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ isTable: false
+ },
+ {
+ label: '供应商代码',
+ field: 'supplierCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault: 1,
+ sortSearchDefault:2,
+ isSearch: true
+ },
+ {
+ label: '从月台代码',
+ field: 'fromDockCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable: false
+ },
+ {
+ label: '承运商',
+ field: 'carrierCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable: false
+ },
+ {
+ label: '运输方式',
+ field: 'transferMode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable: 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: 'outTransactionType',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable: false
+ },
+ {
+ label: '入库事务类型',
+ field: 'inTransactionType',
+ 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: '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: 'available',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isTable: false,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ // {
+ // label: '原因',
+ // field: 'available',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // isTable: true,
+ // },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ isTable: true,
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ },
+ {
+ label: '创建者',
+ field: 'creator',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable: false,
+ },
+ {
+ label: '操作',
+ field: 'action',
+ isDetail: false,
+ isForm: false,
+ table: {
+ width: 150,
+ fixed: 'right'
+ },
+ }
+]))
+
+//表单校验
+export const PurchasereturnRecordMainRules = reactive({
+ requestNumber: [
+ { required: true, message: '请选择申请单号', trigger: 'change' }
+ ],
+ supplierCode: [
+ { required: true, message: '请选择供应商代码', trigger: 'change' }
+ ],
+ fromWarehouseCode: [
+ { required: true, message: '请选择从仓库代码', trigger: 'change' }
+ ],
+ fromAreaTypes: [
+ { 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 PurchasereturnRecordDetail = useCrudSchemas(reactive([
+
+ {
+ label: '从包装号',
+ field: 'fromPackingNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isSearch: true,
+ sortTableDefault: 1001,
+ sortSearchDefault: 1001,
+ },
+ {
+ label: '到包装号',
+ field: 'toPackingNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isSearch: true,
+ hiddenInMain: true,
+ sortSearchDefault: 1002,
+ sortTableDefault: 1001,
+ },
+ {
+ label: '包装规格',
+ field: 'packUnit',
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault: 1004,
+ },
+ {
+ label: '包装数量',
+ field: 'packQty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault: 1004,
+ form: {
+ component: 'InputNumber',
+ }
+ },
+ {
+ label: '退货数量',
+ field: 'qty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 0,
+ precision: 6,
+ disabled:false
+ }
+ },
+ sortTableDefault: 1004,
+ hiddenInMain:true,
+ isForm:false,
+ tableForm:{
+ type:'InputNumber',
+ min:0,
+ precision: 6,
+ disabled:false
+ }
+ },
+ {
+ 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: 'fromBatch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isSearch: true,
+ sortTableDefault: 1000,
+ },
+ {
+ label: '到批次',
+ field: 'toBatch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isSearch: true,
+ sortTableDefault: 1000,
+ hiddenInMain: true
+ },
+ {
+ label: '替代批次',
+ field: 'altBatch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable:false,
+ hiddenInMain: true
+ },
+ {
+ label: '从库位代码',
+ field: 'fromLocationCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault: 1009,
+ hiddenInMain: true
+ },
+ // {
+ // label: '到库位代码',
+ // field: 'toLocationCode',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // sortTableDefault: 1009,
+ // hiddenInMain: true
+ // },
+ {
+ label: '从库位组代码',
+ field: 'fromLocationGroupCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault: 1010,
+ hiddenInMain: true
+ },
+ // {
+ // label: '到库位组代码',
+ // field: 'toLocationGroupCode',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // sortTableDefault: 1010,
+ // hiddenInMain: true
+ // },
+ {
+ label: '从库区代码',
+ field: 'fromAreaCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault: 1010,
+ hiddenInMain: true
+ },
+ // {
+ // label: '到库区代码',
+ // field: 'toAreaCode',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // sortTableDefault: 1010,
+ // hiddenInMain: true
+ // },
+ {
+ label: '从货主代码',
+ field: 'fromOwnerCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault: 1010,
+ hiddenInMain: true
+ },
+ {
+ label: '到货主代码',
+ field: 'toOwnerCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault: 1010,
+ hiddenInMain: true
+ },
+ {
+ label: '库存状态',
+ field: 'inventoryStatus',
+ dictType: DICT_TYPE.INVENTORY_STATUS,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault: 1008,
+ hiddenInMain: true
+ },
+ {
+ label: '订单号',
+ field: 'poNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault: 4,
+ },
+ {
+ label: '订单行',
+ field: 'poLine',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault: 5,
+ },
+ {
+ label: '单据号',
+ field: 'number',
+ sort: 'custom',
+ table: {
+ width: 180,
+ },
+ sortTableDefault: 1013,
+ hiddenInMain: true,
+ isSearch: false
+ },
+ {
+ label: '原因',
+ field: 'reason',
+ dictType: DICT_TYPE.PURCHASE_RETURN_REASON,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault: 1013,
+ hiddenInMain: true
+ },
+
+ {
+ label: '物料代码',
+ field: 'itemCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isSearch: true,
+ sortSearchDefault: 6,
+ },
+ {
+ label: '物料名称',
+ field: 'itemName',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortSearchDefault: 6,
+ },
+ {
+ label: '物料描述1',
+ field: 'itemDesc1',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortSearchDefault: 7,
+ hiddenInMain: true
+ },
+ {
+ label: '物料描述2',
+ field: 'itemDesc2',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortSearchDefault: 7,
+ hiddenInMain: true
+ },
+ // {
+ // label: '数量',
+ // field: 'qty',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // isTable:true,
+ // sortTableDefault: 1005,
+ // form: {
+ // component: 'InputNumber',
+ // }
+ // },
+ {
+ label: '计量单位',
+ field: 'uom',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
+ isTable: true,
+ sortTableDefault: 1006,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '单价',
+ field: 'singlePrice',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ hiddenInMain:true,
+ sortTableDefault: 1006,
+ form: {
+ component: 'InputNumber',
+ }
+ },
+ {
+ label: '金额',
+ field: 'amount',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ hiddenInMain:true,
+ sortTableDefault: 1006,
+ form: {
+ component: 'InputNumber',
+ }
+ },
+ {
+ label: '项目代码',
+ field: 'projectCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault: 1011,
+ hiddenInMain: true
+ },
+ // {
+ // 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
+ },
+ hiddenInMain: true
+ },
+ // {
+ // label: '任务明细ID',
+ // field: 'jobDetailId',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // },
+ {
+ label: '原因',
+ field: 'remark',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault: 1007,
+ hiddenInMain: true
+ },
+ {
+ label: '创建者',
+ field: 'creator',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault: 1014,
+ hiddenInMain: true,
+ },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ hiddenInMain: true,
+ sortTableDefault: 1014,
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ },
+
+]))
+
+//表单校验
+export const PurchasereturnRecordDetailRules = 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' }
+ ],
+ reason: [
+ { required: true, message: '请选择原因', trigger: 'change' }
+ ],
+ fromLocationCode: [
+ { required: true, message: '请选择从库位代码', trigger: 'change' }
+ ],
+ fromLocationGroupCode: [
+ { required: true, message: '请选择从库位组代码', trigger: 'change' }
+ ],
+ fromAreaCode: [
+ { required: true, message: '请选择从库区代码', trigger: 'change' }
+ ],
+ inventoryStatus: [
+ { required: true, message: '请选择库存状态', trigger: 'change' }
+ ],
+ poNumber: [
+ { required: true, message: '请选择订单号', trigger: 'change' }
+ ],
+ poline: [
+ { required: true, message: '请选择订单行', trigger: 'change' }
+ ],
+})
diff --git a/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue
new file mode 100644
index 000000000..74f26175a
--- /dev/null
+++ b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue
@@ -0,0 +1,1014 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.number }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/purchasereturnRequestSpareMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/purchasereturnRequestSpareMain.data.ts
new file mode 100644
index 000000000..cfe8ea285
--- /dev/null
+++ b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/purchasereturnRequestSpareMain.data.ts
@@ -0,0 +1,1674 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
+const { t } = useI18n() // 国际化
+import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
+import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data'
+import * as ItemPackageApi from '@/api/wms/itempackage/index'
+import * as LocationApi from "@/api/wms/location";
+import {Location} from "@/views/wms/basicDataManage/factoryModeling/location/location.data";
+import * as BalanceApi from '@/api/wms/balance'
+import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
+
+
+
+// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
+const queryParams = {
+ pageSize:10,
+ pageNo:1,
+ code:'PurchaseReturnRequest'
+}
+ const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
+ const requestsettingData =data?.list[0]||{}
+
+ // 获取当前操作人的部门
+ import { useUserStore } from '@/store/modules/user'
+ import { TableColumn } from '@/types/table'
+ const userStore = useUserStore()
+ const userDept = userStore.userSelfInfo.dept
+ // id 转str 否则form回显匹配不到
+ userDept.id = userDept.id.toString()
+ const userDeptArray:any = [userDept]
+
+
+// 采购收货记录展示列
+export const PurchasereceiptRecordMain1 = useCrudSchemas(reactive([
+ {
+ label: '物料代码',
+ field: 'itemCode',
+ fixed: 'left',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isSearch: true
+ },
+ {
+ label: '采购收货记录单号',
+ field: 'number',
+ fixed: 'left',
+ sort: 'custom',
+ table: {
+ width: 200
+ },
+ isSearch: true
+ },
+ {
+ label: '发货单号',
+ field: 'asnNumber',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ isSearch: true
+ },
+ {
+ label: '采购订单号',
+ field: 'poNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isSearch: true
+ },
+ {
+ label: '订单行',
+ field: 'poLine',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+
+ {
+ label: '物料名称',
+ field: 'itemName',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '批次', // 实际是子表的从批次,为了不影响页面,单独放上面
+ field: 'fromBatch',
+ sort: 'custom',
+ isForm:false,
+ isTableForm:false,
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '计量单位',
+ field: 'uom',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ // {
+ // label: '包装规格',
+ // field: 'packUnit',
+ // 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
+ },
+ },
+
+
+]))
+
+/**
+ * @returns {Array} 采购退货申请主表
+ */
+export const PurchasereturnRequestMain = useCrudSchemas(reactive([
+ {
+ label: '单据号',
+ field: 'number',
+ sort: 'custom',
+ table: {
+ width: 180,
+ fixed: 'left'
+ },
+ isForm: false,
+ isSearch: true,
+ },
+ {
+ label: '状态',
+ field: 'status',
+ dictType: DICT_TYPE.REQUEST_STATUS,
+ dictClass: 'string',
+ isSearch: true,
+ isTable: true,
+ isForm:false,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:1,
+ form: {
+ value: '1',
+ componentProps: {
+ disabled: true
+ }
+ }
+ },
+ // {
+ // label: '供应商代码',
+ // field: 'supplierCode',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // sortTableDefault:1,
+ // isSearch: true,
+ // form:{
+ // componentProps:{
+ // enterSearch: true,
+ // isSearchList: true, // 开启查询弹窗
+ // searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
+ // searchField: 'code', // 查询弹窗赋值字段
+ // searchTitle: '供应商信息', // 查询弹窗标题
+ // searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
+ // searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法
+ // verificationParams: [{
+ // key: 'code',
+ // action: '==',
+ // value: '',
+ // isMainValue: false,
+ // isSearch: true,
+ // isFormModel: true,
+ // }], // 失去焦点校验参数
+ // }
+ // }
+ // },
+ // {
+ // label: '维修备件收货记录单号',
+ // field: 'purchaseReceiptRecordNumber',
+ // sort: 'custom',
+ // table: {
+ // width: 180
+ // },
+ // form: {
+ // // labelMessage: '信息提示说明!!!',
+ // componentProps: {
+ // enterSearch: true,
+ // disabled:true,
+ // isSearchList: true, // 开启查询弹窗
+ // searchListPlaceholder: '请选择采购收货记录单号', // 输入框占位文本
+ // searchField: 'number', // 查询弹窗赋值字段
+ // searchTitle: '采购收货记录', // 查询弹窗标题
+ // searchAllSchemas: PurchasereceiptRecordMain1.allSchemas, // 查询弹窗所需类
+ // searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageReturn, // 查询弹窗所需分页方法
+ // searchCondition: [
+ // {
+ // key: 'supplierCode',
+ // value: 'supplierCode',
+ // isMainValue: true
+ // }],
+ // verificationParams: [{
+ // key: 'number',
+ // action: '==',
+ // value: '',
+ // isMainValue: false,
+ // isSearch: true,
+ // isFormModel: true,
+ // }], // 失去焦点校验参数
+ // }
+ // }
+ // },
+ // {
+ // label: '发货单号',
+ // field: 'asnNumber',
+ // sort: 'custom',
+ // table: {
+ // width: 180
+ // },
+ // isForm: false,
+ // sortTableDefault:2
+ // },
+ // {
+ // label: '要货计划单号',
+ // field: 'ppNumber',
+ // sort: 'custom',
+ // table: {
+ // width: 180
+ // },
+ // isForm: false,
+ // isTable: false,
+ // },
+ // {
+ // label: '承运商',
+ // field: 'carrierCode',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // isTable: false,
+ // },
+ // {
+ // label: '运输方式',
+ // field: 'transferMode',
+ // sort: 'custom',
+ // dictType: DICT_TYPE.TRANSFER_MODE,
+ // dictClass: 'string',
+ // table: {
+ // width: 150
+ // },
+ // isTable: false,
+ // },
+ // {
+ // label: '车牌号',
+ // field: 'vehiclePlateNumber',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // isTable: false,
+ // },
+ // {
+ // label: '从仓库代码',
+ // field: 'fromWarehouseCode',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // isForm: false,
+ // isTable: false,
+ // },
+ // {
+ // label: '到仓库代码',
+ // field: 'toWarehouseCode',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // isTableForm:false,
+ // isForm: false,
+ // isTable: 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
+ // },
+ // isTableForm:false,
+ // isForm: false,
+ // },
+ // {
+ // label: '从库区代码范围',
+ // field: 'fromAreaCodes',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // isForm: false,
+ // isTable: false,
+ // },
+ // {
+ // label: '到库区代码范围',
+ // field: 'toAreaCodes',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // isForm: false,
+ // isTable: false,
+ // isTableForm:false,
+ // },
+ // {
+ // label: '从月台代码',
+ // field: 'fromDockCode',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // isForm: false,
+ // isTable: false,
+
+ // },
+ {
+ label: '业务类型',
+ field: 'businessType',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ value: 'PurchaseReturn',
+ componentProps: {
+ disabled: true
+ }
+ },
+ isForm: false,
+ isTable: false,
+ },
+ // {
+ // 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
+ },
+ isForm:false,
+ isTableForm:false,
+ isTable: false,
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width:'100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ },
+ {
+ label: '部门',
+ field: 'departmentCode',
+ sort: 'custom',
+ isForm:false,
+ table: {
+ width: 150
+ },
+ isTable: false,
+ 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: 'remark',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ 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: false
+ },
+ {
+ 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: 'autoCommit',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isTable: false,
+ isForm:false,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'Switch',
+ value: requestsettingData.autoCommit,
+ 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: requestsettingData.autoAgree,
+ 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: requestsettingData.autoExecute,
+ 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: 'action',
+ isDetail: false,
+ isForm: false,
+ table: {
+ width: 300,
+ fixed: 'right'
+ },
+ }
+]))
+
+//表单校验
+export const PurchasereturnRequestMainRules = reactive({
+ supplierCode: [
+ { required: true, message: '请输入供应商代码', trigger: 'blur' }
+ ],
+ dueTime: [
+ { required: true, message: '请选择截止时间', trigger: 'blur' }
+ ],
+ purchaseReceiptRecordNumber: [
+ { required: true, message: '请输入采购收货记录单号', trigger: 'blur' }
+ ],
+ carrierCode: [
+ { max: 50, message: '不得超过50个字符', trigger: 'blur' },
+ ],
+ vehiclePlateNumber: [
+ { max: 50, message: '不得超过50个字符', trigger: 'blur' },
+ ],
+ remark: [
+ { max: 50, message: '不得超过50个字符', trigger: 'blur' }
+ ],
+ fromWarehouseCode: [
+ { required: true, message: '请输入从仓库代码', trigger: 'blur' }
+ ],
+ fromAreaTypes: [
+ { required: true, message: '请选择从库区类型范围', trigger: 'change' }
+ ],
+ 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 PurchasereturnRequestDetail = useCrudSchemas(reactive([
+ // {
+ // label: '订单号',
+ // field: 'poNumber',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // tableForm:{
+ // disabled:true
+ // },
+ // form: {
+ // componentProps:{
+ // disabled:true
+ // }
+ // }
+ // },
+ // {
+ // label: '订单行',
+ // field: 'poLine',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // tableForm:{
+ // isInpuFocusShow: false, // 开启查询弹窗
+ // searchListPlaceholder: '请选择订单行',
+ // searchField: 'poLine',
+ // searchTitle: '采购收货记录信息',
+ // searchAllSchemas: PurchasereceiptRecordDetail.allSchemas,
+ // searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage,
+ // searchCondition: [{
+ // key: 'number',
+ // value: 'purchaseReceiptRecordNumber',
+ // message: '请填写采购收货记录号!',
+ // isMainValue: true
+ // }]
+ // },
+ // form: {
+ // // labelMessage: '信息提示说明!!!',
+ // componentProps: {
+ // isSearchList: false,
+ // searchListPlaceholder: '请选择订单行',
+ // searchField: 'poLine',
+ // searchTitle: '采购收货记录信息',
+ // searchAllSchemas: PurchasereceiptRecordDetail.allSchemas,
+ // searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage,
+ // searchCondition: [{
+ // key: 'number',
+ // value: 'purchaseReceiptRecordNumber',
+ // message: '请填写采购收货记录号!',
+ // isMainValue: true
+ // }]
+ // }
+ // },
+ // },
+ {
+ label: '物料代码',
+ field: 'itemCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ isInpuFocusShow: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择包装号',
+ searchField: 'packingNumber',
+ searchTitle: '库存余额信息',
+ searchAllSchemas: Balance.allSchemas,
+ searchPage: BalanceApi.getBalancePageSpare,
+ searchCondition: [{
+ key: 'available',
+ value: 'TRUE',
+ action: '==',
+ isSearch: true,
+ isMainValue: false
+ },{
+ key: 'businessType',
+ value: 'PurchaseReturnSpare',
+ action: '==',
+ isSearch: true,
+ isMainValue: false
+ },{
+ key: 'inOrOut',
+ value: 'out',
+ action: '==',
+ isSearch: true,
+ isMainValue: false
+ }]
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ disabled:true,
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择包装号',
+ searchField: 'packingNumber',
+ searchTitle: '库存余额信息',
+ searchAllSchemas: Balance.allSchemas,
+ searchPage: BalanceApi.getBalancePageSpare,
+ searchCondition: [{
+ key: 'available',
+ value: 'TRUE',
+ action: '==',
+ isSearch: true,
+ isMainValue: false
+ },{
+ key: 'businessType',
+ value: 'PurchaseReturnSpare',
+ action: '==',
+ isSearch: true,
+ isMainValue: false
+ },{
+ key: 'inOrOut',
+ value: 'out',
+ action: '==',
+ isSearch: true,
+ isMainValue: false
+ }]
+ }
+ }
+ },
+ {
+ label: '物料名称',
+ field: 'itemName',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '物料描述1',
+ field: 'itemDesc1',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm:false,
+ isTable:false,
+ hiddenInMain: true,
+ isForm: false,
+ tableForm:{
+ disabled:true
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '物料描述2',
+ field: 'itemDesc2',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm:false,
+ isTable:false,
+ hiddenInMain: true,
+ isForm: false,
+ tableForm:{
+ disabled:true
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '批次',
+ field: 'batch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '替代批次',
+ field: 'altBatch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ hiddenInMain: true,
+ isTableForm: false,
+ isTable: false,
+ isForm: false,
+ tableForm:{
+ disabled:true
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '器具号',
+ field: 'containerNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ hiddenInMain: true,
+ tableForm:{
+ disabled:true
+ },
+ isTableForm: false,
+ isTable: false,
+ isForm: false,
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '计量单位',
+ field: 'uom',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
+ // isSearch: true,
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true,
+ type: 'Select',
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '退货数量',
+ field: 'qty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 0,
+ precision: 6,
+ disabled:false
+ }
+ },
+ isTable:false,
+ isTableForm:false,
+ tableForm:{
+ disabled:true,
+ type:'InputNumber',
+ min:0,
+ precision: 6
+ }
+ },
+ // { //与国强联调的时候发现退货数量用的是qty
+ // label: '退货数量',
+ // field: 'returnedQty',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // form: {
+ // component: 'InputNumber',
+ // componentProps: {
+ // min: 0,
+ // precision: 6,
+ // disabled:false
+ // }
+ // },
+ // isTable: false,
+ // isTableForm: false,
+ // isForm:false,
+ // tableForm:{
+ // type:'InputNumber',
+ // min:0,
+ // precision: 6,
+ // disabled:false
+ // }
+ // },
+ {
+ label: '从库位代码',
+ field: 'fromLocationCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true,
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '包装号',
+ field: 'packingNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true,
+ },
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '库存余额',
+ field: 'inventoryBalance',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ disabled: true,
+ min: 0,
+ precision: 6
+ }
+ },
+ tableForm:{
+ hidden:false,//控制列是否展示
+ type:'InputNumber',
+ min:0,
+ precision: 6,
+ disabled:true,
+ },
+ hiddenInMain: true,
+ isTable: false,
+ isDetail: false,
+ },
+ {
+ label: '退货数量',
+ field: 'qty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 0,
+ precision: 6
+ }
+ },
+ isForm:false,
+ tableForm:{
+ type:'InputNumber',
+ min:0,
+ precision: 6
+ }
+ },
+ {
+ label: '库存状态',
+ field: 'inventoryStatus',
+ dictType: DICT_TYPE.INVENTORY_STATUS,
+ dictClass: 'string',
+ isSearch: true,
+ hiddenInMain: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true,
+ type: 'Select',
+ },
+ isTableForm: false,
+ isTable: false,
+ isForm: false,
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '到库位代码',
+ field: 'toLocationCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ hiddenInMain: true,
+ isTableForm: false,
+ isTable: false,
+ isForm: false,
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '从货主代码',
+ field: 'fromOwnerCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ hiddenInMain: true,
+ isTableForm: false,
+ isTable: false,
+ isForm: false,
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '到货主代码',
+ field: 'toOwnerCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ hiddenInMain: true,
+ isTableForm: false,
+ isTable: false,
+ isForm: false,
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ // {
+ // label: '到货日期',
+ // field: 'arriveDate',
+ // formatter: dateFormatter2,
+ // detail: {
+ // dateFormat: 'YYYY-MM-DD'
+ // },
+ // sort: 'custom',
+ // table: {
+ // width: 180
+ // },
+ // hiddenInMain: true,
+ // form: {
+ // component: 'DatePicker',
+ // componentProps: {
+ // style: {width: '100%'},
+ // type: 'date',
+ // dateFormat: 'YYYY-MM-DD',
+ // valueFormat: 'x',
+ // }
+ // },
+ // tableForm:{
+ // disabled:true,
+ // type: 'FormDate',
+ // dateFormat: 'YYYY-MM-DD',
+ // valueFormat: 'x',
+ // },
+ // isTableForm: false
+ // },
+ // {
+ // label: '生产日期',
+ // field: 'produceDate',
+ // formatter: dateFormatter2,
+ // detail: {
+ // dateFormat: 'YYYY-MM-DD'
+ // },
+ // hiddenInMain: true,
+ // 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',
+ // format: 'YYYY-MM-DD',
+ // valueFormat: 'x',
+ // },
+ // isTableForm: false
+ // },
+ // {
+ // label: '过期日期',
+ // field: 'expireDate',
+ // formatter: dateFormatter2,
+ // detail: {
+ // dateFormat: 'YYYY-MM-DD'
+ // },
+ // sort: 'custom',
+ // table: {
+ // width: 180
+ // },
+ // hiddenInMain: true,
+ // form: {
+ // component: 'DatePicker',
+ // componentProps: {
+ // disabled: true,
+ // style: {width: '100%'},
+ // type: 'date',
+ // dateFormat: 'YYYY-MM-DD',
+ // valueFormat: 'x',
+ // }
+ // },
+ // isTableForm: false,
+ // isTable: false,
+ // tableForm:{
+ // disabled:true,
+ // type: 'FormDate',
+ // format: 'YYYY-MM-DD',
+ // valueFormat: 'x',
+ // }
+ // },
+ // {
+ // label: '任务明细ID',
+ // field: 'jobDetailId',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // tableForm:{
+ // disabled:true
+ // },
+ // isTableForm:false,
+ // hiddenInMain: true,
+ // isForm:false,
+ // form: {
+ // componentProps:{
+ // disabled:true
+ // }
+ // },
+ // },
+ {
+ label: '项目代码',
+ field: 'projectCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ isForm: false,
+ isTableForm: false,
+ isTable: false,
+ hiddenInMain: true,
+ form: {
+ componentProps:{
+ disabled:true
+ }
+ },
+ },
+
+ {
+ label: '单据号',
+ field: 'number',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ hiddenInMain: true,
+ tableForm:{
+ disabled:true
+ },
+ isForm: false,
+ isTableForm:false,
+ },
+ // {
+ // label: '接口类型',
+ // field: 'interfaceType',
+ // dictType: DICT_TYPE.INTERFACE_TYPE,
+ // dictClass: 'string',
+ // isSearch: true,
+ // isTable: true,
+ // hiddenInMain: true,
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // tableForm:{
+ // disabled:true
+ // },
+ // isForm:false,
+ // isTableForm:false,
+ // form: {
+ // componentProps:{
+ // disabled:true
+ // }
+ // },
+ // },
+ // {
+ // label: '备注',
+ // field: 'remark',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // tableForm:{
+ // disabled:true
+ // },
+ // isTableForm: false,
+ // isTable: false,
+ // hiddenInMain: true,
+ // isForm: false,
+ // form: {
+ // componentProps:{
+ // disabled:true
+ // }
+ // },
+ // },
+ {
+ label: '创建者',
+ field: 'creator',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ 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: {
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ tableForm:{
+ disabled:true
+ },
+ isTableForm:false,
+ isForm:false
+ },
+ // {
+ // label: '原因',
+ // field: 'remark',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // isTable: false,
+ // },
+ {
+ label: '操作',
+ hiddenInMain:true,
+ field: 'action',
+ isDetail: false,
+ isForm: false ,
+ table: {
+ width: 150,
+ fixed: 'right'
+ },
+ isTableForm:false,
+ }
+]))
+
+//表单校验
+export const PurchasereturnRequestDetailRules = reactive({
+ // packingNumber: [
+ // { required: true, message: '请输入包装号', trigger: 'blur' }
+ // ],
+ // batch: [
+ // { required: true, message: '请输入批次', trigger: 'blur' }
+ // ],
+ // inventoryStatus: [
+ // { required: true, message: '请选择库存状态', trigger: 'change' }
+ // ],
+ // poNumber: [
+ // { required: true, message: '请输入订单号', trigger: 'blur' }
+ // ],
+ // poLine: [
+ // { required: true, message: '请输入订单行', trigger: 'blur' }
+ // ],
+ // reason: [
+ // { required: true, message: '请选择原因', trigger: 'change' }
+ // ],
+ itemCode: [
+ { required: true, message: '请输入物料代码', trigger: 'blur' }
+ ],
+ remark: [
+ { max: 50, message: '不得超过50个字符', trigger: 'blur' }
+ ],
+})
+
+export const PurchasereReturnRequestDetailLabel = useCrudSchemas(reactive([
+ {
+ 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
+ },
+ isTable:false,
+ 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: '从库位代码1',
+ field: 'fromLocationCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ 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: 'altBatch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ 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: 'batch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ 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: '请选择订单行',
+ isMainValue: true
+ },
+ {
+ 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: '请选择订单行',
+ 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
+ },
+]))
+