From b307743209b5ee63b295ae8200ebf339452754e2 Mon Sep 17 00:00:00 2001
From: chenfang <1057876684@qq.com>
Date: Wed, 12 Mar 2025 16:00:29 +0800
Subject: [PATCH] =?UTF-8?q?FWHL-268/FWHL-270=E5=B7=B2=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/wms/location/index.ts | 11 +
src/api/wms/purchaseDetail/index.ts | 12 +
.../index.vue | 482 +++++++++
.../inventorymoveRecordMainNew.data.ts | 777 ++++++++++++++
.../inventorymoveRecordRequestMain.data.ts | 988 ++++++++++++++++++
.../purchasereturnRequestMainNew/index.vue | 4 +-
6 files changed, 2272 insertions(+), 2 deletions(-)
create mode 100644 src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNewSparePart/index.vue
create mode 100644 src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNewSparePart/inventorymoveRecordMainNew.data.ts
create mode 100644 src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNewSparePart/inventorymoveRecordRequestMain.data.ts
diff --git a/src/api/wms/location/index.ts b/src/api/wms/location/index.ts
index 4cde26921..5be01283e 100644
--- a/src/api/wms/location/index.ts
+++ b/src/api/wms/location/index.ts
@@ -119,6 +119,17 @@ export const selectBusinessTypeToLocation = async (params) => {
}
}
+// 获得业务类型筛选出的库位分页(备件专用)
+export const selectBusinessTypeToLocationToSparePart = async (params) => {
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ return await request.post({ url: '/wms/location/pageBusinessTypeToLocationSeniorToSparePart', data })
+ } else {
+ return request.get({ url: `/wms/location/pageBusinessTypeToLocationToSparePart`, params })
+ }
+}
+
export const selectBusinessTypeOutLocation = async (params) => {
if (params.isSearch) {
delete params.isSearch
diff --git a/src/api/wms/purchaseDetail/index.ts b/src/api/wms/purchaseDetail/index.ts
index 842604d0e..f5e37e047 100644
--- a/src/api/wms/purchaseDetail/index.ts
+++ b/src/api/wms/purchaseDetail/index.ts
@@ -55,6 +55,18 @@ export const getPurchaseDetailPageWMS = async (params) => {
}
}
+// 查询采购订单子列表(不包含M订单)
+export const getPurchaseDetailPageWMSNotM = async (params) => {
+ if (params.isSearch) {
+ const data = {...params}
+ delete data.isSearch
+ return await request.post({ url: '/wms/purchase-detail/seniorWMSNotM', data })
+ } else {
+ return await request.get({ url: `/wms/purchase-detail/pageWMSNotM`, params })
+ }
+}
+
+
// 查询采购订单子列表
export const getPurchaseDetailPageWMSPurchasereceiptRequest = async (params) => {
diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNewSparePart/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNewSparePart/index.vue
new file mode 100644
index 000000000..765ad0ee7
--- /dev/null
+++ b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNewSparePart/index.vue
@@ -0,0 +1,482 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.number }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+./inventorymoveRecordRequestMain.data
diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNewSparePart/inventorymoveRecordMainNew.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNewSparePart/inventorymoveRecordMainNew.data.ts
new file mode 100644
index 000000000..c80b1d48f
--- /dev/null
+++ b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNewSparePart/inventorymoveRecordMainNew.data.ts
@@ -0,0 +1,777 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
+
+/**
+ * @returns {Array} 库存转移记录主表
+ */
+export const InventorymoveRecordMainNew = useCrudSchemas(reactive([
+ {
+ label: '单据号',
+ field: 'number',
+ sort: 'custom',
+ table: {
+ width: 180,
+ fixed: 'left'
+ },
+ isSearch: true
+ },
+ {
+ label: '申请单号',
+ field: 'requestNumber',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ sortTableDefault:9,
+ isSearch: true
+ },
+ {
+ label: '任务单号',
+ field: 'jobNumber',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ sortTableDefault:9,
+ 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
+ },
+ sortTableDefault:22
+
+ },
+ {
+ label: '到仓库代码',
+ field: 'toWarehouseCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:23
+ },
+ // {
+ // 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
+ },
+ sortTableDefault:24
+ },
+ {
+ label: '入库事务类型',
+ field: 'inTransactionType',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:25
+ },
+ {
+ label: '业务类型',
+ field: 'businessType',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:36
+ },
+
+ // {
+ // 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')]
+ }
+ },
+ sortTableDefault:34
+ },
+ {
+ label: '创建者',
+ field: 'creator',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:35
+ },
+ {
+ 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'
+ // }
+ // }
+ // },
+ {
+ label: '操作',
+ field: 'action',
+ isDetail: false,
+ isForm: false ,
+ table: {
+ width: 120,
+ fixed: 'right'
+ },
+ }
+]))
+
+//表单校验
+export const InventorymoveRecordMainNewRules = 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 InventorymoveRecordDetailNew = useCrudSchemas(reactive([
+ {
+ label: '单据号',
+ field: 'number',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ hiddenInMain: true,
+ },
+ {
+ label: '物料代码',
+ field: 'itemCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:10,
+ },
+ {
+ label: '物料名称',
+ field: 'itemName',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:27
+ },
+ {
+ label: '物料描述1',
+ field: 'itemDesc1',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:28
+ },
+ {
+ label: '物料描述2',
+ field: 'itemDesc2',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:29
+ },
+ // {
+ // label: '在途库库位',
+ // field: 'onTheWayLocationCode',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // },
+ {
+ label: '从批次',
+ field: 'fromBatch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:18
+ },
+ {
+ label: '到批次',
+ field: 'toBatch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:19
+ },
+ {
+ label: '从包装号',
+ field: 'fromPackingNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:11
+ },
+ {
+ label: '到包装号',
+ field: 'toPackingNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:12
+ },
+ // {
+ // 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',
+ },
+ sortTableDefault:17
+ },
+ {
+ label: '计量单位',
+ field: 'uom',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:30
+ },
+ {
+ label: '从库位代码',
+ field: 'fromLocationCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:13
+ },
+ {
+ label: '到库位代码',
+ field: 'toLocationCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:14
+ },
+ {
+ label: '从库存状态',
+ field: 'fromInventoryStatus',
+ dictType: DICT_TYPE.INVENTORY_STATUS,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:15
+ },
+ {
+ label: '到库存状态',
+ field: 'toInventoryStatus',
+ dictType: DICT_TYPE.INVENTORY_STATUS,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:16
+ },
+ {
+ label: '从库位组代码',
+ field: 'fromLocationGroupCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:31
+ },
+ {
+ label: '到库位组代码',
+ field: 'toLocationGroupCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:32
+ },
+ {
+ label: '从库区代码',
+ field: 'fromAreaCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:20
+ },
+ {
+ label: '到库区代码',
+ field: 'toAreaCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault:21
+ },
+ // {
+ // 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 InventorymoveRecordDetailNewRules = 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' }
+ ],
+})
diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNewSparePart/inventorymoveRecordRequestMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNewSparePart/inventorymoveRecordRequestMain.data.ts
new file mode 100644
index 000000000..f447783cf
--- /dev/null
+++ b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNewSparePart/inventorymoveRecordRequestMain.data.ts
@@ -0,0 +1,988 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
+import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
+
+import * as BalanceApi from '@/api/wms/balance'
+import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
+
+import * as LocationApi from '@/api/wms/location'
+import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
+import * as ItempackagingApi from '@/api/wms/itempackage'
+import { Itempackaging } from '@//views/wms/basicDataManage/itemManage/itempackage/itempackage.data'
+
+import * as WarehouseApi from '@/api/wms/warehouse'
+import { Warehouse } from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data'
+
+const { t } = useI18n() // 国际化
+
+// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
+const queryParams = {
+ pageSize:10,
+ pageNo:1,
+ code:'MoveRequest'
+}
+ 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]
+
+/**
+ * @returns {Array} 库存转移申请主表
+ */
+export const InventorymoveRequestMain = useCrudSchemas(reactive([
+ {
+ label: '从库位代码',
+ field: 'fromLocationCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ enterSearch: true,
+ isInpuFocusShow: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择从库位代码',
+ searchField: 'code',
+ searchTitle: '库位信息',
+ searchAllSchemas: Location.allSchemas,
+ searchPage: LocationApi.selectBusinessTypeToLocation,
+ searchCondition: [
+ {
+ key: 'businessType',
+ value: 'Move',
+ isMainValue: false
+ },{
+ key: 'isIn',
+ value: 'out',
+ isMainValue: false
+ }],
+ isRepeat:true,
+ verificationParams: [{
+ key: 'code',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true,
+ }], // 失去焦点校验参数
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ enterSearch: true,
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择从库位代码',
+ searchField: 'code',
+ searchTitle: '库位信息',
+ searchAllSchemas: Location.allSchemas,
+ searchPage: LocationApi.selectBusinessTypeToLocation,
+ searchCondition: [
+ {
+ key: 'businessType',
+ value: 'Move',
+ isMainValue: false
+ },{
+ key: 'isIn',
+ value: 'out',
+ isMainValue: false
+ }],
+ verificationParams: [{
+ key: 'code',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true,
+ }], // 失去焦点校验参数
+ }
+ }
+ },
+ {
+ label: '到库位代码',
+ field: 'toLocationCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ enterSearch: true,
+ isInpuFocusShow: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择到库位代码',
+ searchField: 'code',
+ searchTitle: '库位信息',
+ searchAllSchemas: Location.allSchemas,
+ searchPage: LocationApi.selectBusinessTypeToLocation,
+ searchCondition: [
+ {
+ key: 'businessType',
+ value: 'Move',
+ isMainValue: false
+ },{
+ key: 'isIn',
+ value: 'in',
+ isMainValue: false
+ },
+ {
+ key:'available', // 查询列表中字段
+ value:'TRUE', // 指查询具体值
+ isMainValue: false // 表示查询条件不是主表的字段的值
+ }],
+ isRepeat:true,
+ verificationParams: [{
+ key: 'code',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true,
+ }], // 失去焦点校验参数
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ enterSearch: true,
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择到库位代码',
+ searchField: 'code',
+ searchTitle: '库位信息',
+ searchAllSchemas: Location.allSchemas,
+ searchPage: LocationApi.selectBusinessTypeToLocation,
+ searchCondition: [
+ {
+ key: 'businessType',
+ value: 'Move',
+ isMainValue: false
+ },{
+ key: 'isIn',
+ value: 'in',
+ isMainValue: false
+ },
+ {
+ key:'available', // 查询列表中字段
+ value:'TRUE', // 指查询具体值
+ isMainValue: false // 表示查询条件不是主表的字段的值
+ }],
+ verificationParams: [{
+ key: 'code',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true,
+ }], // 失去焦点校验参数
+ }
+ }
+ },
+ {
+ label: '到库存状态',
+ field: 'toInventoryStatus',
+ dictType: DICT_TYPE.INVENTORY_STATUS,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ disabled: false,
+ type: 'Select'
+ },
+ form: {
+ value:'OK',
+ componentProps: {
+ disabled: 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',
+ }
+ },
+ },
+]))
+
+//表单校验
+export const InventorymoveRequestMainRules = reactive({
+ fromWarehouseCode: [
+ { required: true, message: '请选择从仓库代码', trigger: 'blur' }
+ ],
+ toWarehouseCode: [
+ { required: true, message: '请选择到仓库代码', trigger: 'blur' }
+ ],
+ fromLocationCode: [
+ { required: true, message: '请选择从库位代码', trigger: 'change' }
+ ],
+ toLocationCode: [
+ { required: true, message: '请选择到库位代码', trigger: 'change' }
+ ]
+})
+export const BalanceCopy = useCrudSchemas(
+ reactive([
+ {
+ label: '物料代码',
+ field: 'itemCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isSearch: true
+ },
+ {
+ label: '物料名称',
+ field: 'itemName',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isSearch: true
+ },
+ {
+ label: '包装数量',
+ field: 'packQty',
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ // {
+ // label: '器具代码',
+ // field: 'containerNumber',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // isTable:false
+ // },
+ {
+ label: '库存数量',
+ field: 'qty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber'
+ }
+ },
+ {
+ label: '物料描述1',
+ field: 'itemDesc1',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ hiddenSearchHigh: true,// 高级筛选中隐藏
+ isSearch: true
+ },
+ {
+ label: '物料描述2',
+ field: 'itemDesc2',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ hiddenSearchHigh: true,// 高级筛选中隐藏
+ isSearch: true
+ },
+ {
+ label: '物料类型',
+ field: 'itemType',
+ sort: 'custom',
+ dictType: DICT_TYPE.ITEM_TYPE,
+ dictClass: 'string',
+ isSearch: true,
+ table: {
+ width: 100
+ }
+ },
+ {
+ label: '批次',
+ field: 'batch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isSearch: true
+ },
+ {
+ label: '供应商批次',
+ field: 'altBatch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isSearch: false
+ },
+ {
+ label: '包装号',
+ field: 'packingNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isSearch: true
+ },
+ {
+ label: '包装规格',
+ field: 'packUnit',
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ // {
+ // label: '器具代码',
+ // field: 'containerNumber',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // isTable:false
+ // },
+ {
+ label: '创建者',
+ field: 'creator',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isForm: false
+ },
+ {
+ label: '计量单位',
+ field: 'uom',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '库位代码',
+ field: 'locationCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isSearch: true
+ },
+ {
+ label: '库存状态',
+ field: 'inventoryStatus',
+ dictType: DICT_TYPE.INVENTORY_STATUS,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '库区类型',
+ field: 'areaType',
+ sort: 'custom',
+ dictType: DICT_TYPE.AREA_TYPE,
+ dictClass: 'string',
+ isTable: true,
+ table: {
+ width: 150
+ }
+ },
+
+ {
+ label: '仓库代码',
+ field: 'warehouseCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '库位组代码',
+ field: 'locationGroupCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '库区代码',
+ field: 'areaCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ // {
+ // label: 'ERP库位代码',
+ // field: 'erpLocationCode',
+ // dictType: DICT_TYPE.ERP_LOCATION,
+ // dictClass: 'string',
+ // isTable: false,
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // },
+ // {
+ // label: '替代批次',
+ // field: 'altBatch',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // isTable: false,
+ // },
+ {
+ label: '到货日期',
+ field: 'arriveDate',
+ isTable: true,
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: { width: '100%' },
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x'
+ }
+ }
+ },
+ {
+ label: '生产日期',
+ field: 'produceDate',
+ isTable: true,
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: { width: '100%' },
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x'
+ }
+ }
+ },
+ {
+ label: '失效日期',
+ field: 'expireDate',
+ isTable: true,
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: { width: '100%' },
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x'
+ }
+ }
+ },
+ {
+ label: '货主代码',
+ field: 'ownerCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable: false
+ },
+ {
+ label: '锁定数量',
+ field: 'lockedQty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable: false,
+ form: {
+ component: 'InputNumber'
+ }
+ },
+ // {
+ // label: '可用数量',
+ // field: 'usableQty',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // form: {
+ // component: 'InputNumber',
+ // }
+ // },
+ // {
+ // label: '单价',
+ // field: 'singlePrice',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // form: {
+ // component: 'InputNumber',
+ // }
+ // },
+ // {
+ // label: '金额',
+ // field: 'amount',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // form: {
+ // component: 'InputNumber',
+ // }
+ // },
+ // {
+ // label: '入库时间',
+ // field: 'putInTime',
+ // isTable: true,
+ // formatter: dateFormatter,
+ // detail: {
+ // dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ // },
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // form: {
+ // component: 'DatePicker',
+ // componentProps: {
+ // type: 'datetime',
+ // }
+ // }
+ // },
+ {
+ label: '是否冻结',
+ field: 'frozen',
+ 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: 'frozenReason',
+ // dictType: DICT_TYPE.FROZEN_REASON,
+ // dictClass: 'string',
+ // isTable: true,
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // },
+ // {
+ // label: '重量',
+ // field: 'weight',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // form: {
+ // component: 'InputNumber',
+ // }
+ // },
+ // {
+ // label: '面积',
+ // field: 'area',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // form: {
+ // component: 'InputNumber',
+ // }
+ // },
+ // {
+ // label: '体积',
+ // field: 'volume',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // form: {
+ // component: 'InputNumber',
+ // }
+ // },
+ {
+ label: '最后事务号',
+ field: 'lastTransNumber',
+ 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: {
+ style: { width: '100%' },
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x'
+ }
+ },
+ isForm: false,
+ isSearch: true,
+ search: {
+ component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
+ type: 'datetimerange',
+ defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
+ }
+ }
+ },
+ {
+ label: '最后更新时间',
+ field: 'updateTime',
+ 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'
+ }
+ },
+ isForm: false,
+ isTable: true
+ },
+ {
+ label: '最后更新者',
+ field: 'updater',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isForm: false,
+ isTable: true
+ },
+ // TODO: 临时添加 方便操作
+ {
+ label: '操作',
+ field: 'action',
+ isDetail: false,
+ isForm: false,
+ table: {
+ width: 200,
+ fixed: 'right'
+ }
+ }
+ ])
+)
+/**
+ * @returns {Array} 库存转移申请子表
+ */
+export const InventorymoveRequestDetail = useCrudSchemas(reactive([
+ {
+ label: '物料代码',
+ field: 'itemCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ multiple:true,
+ disabled: true,
+ isInpuFocusShow: false, // 开启查询弹窗
+ searchListPlaceholder: '请选择从包装号',
+ searchField: 'packingNumber',
+ searchTitle: '库存余额信息',
+ searchAllSchemas: BalanceCopy.allSchemas,
+ searchPage: BalanceApi.selectLocationTypeToBalance,
+ searchCondition: [{
+ key: 'businessType',
+ value: 'Move',
+ isMainValue: false
+ },{
+ key:'locationCode', // 查询列表中字段
+ value:'fromLocationCode', // 指主表某字段
+ message: '请选择从库位代码!', // 当前置条件为空时 弹出信息提示
+ isMainValue: true, // 表示查询条件是主表的字段的值
+ action: '==', // 查询拼接条件
+ }]
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ disabled: true,
+ isSearchList: false, // 开启查询弹窗
+ searchListPlaceholder: '请选择从包装号',
+ searchField: 'packingNumber',
+ searchTitle: '库存余额信息',
+ searchAllSchemas: BalanceCopy.allSchemas,
+ searchPage: BalanceApi.selectLocationTypeToBalance,
+ searchCondition: [{
+ key: 'businessType',
+ value: 'Move',
+ isMainValue: false
+ }]
+ }
+ }
+
+ },
+ {
+ label: '从包装号',
+ field: 'fromPackingNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm:false,
+ tableForm: {
+ disabled: true
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ }
+ },
+ {
+ label: '到包装号',
+ field: 'toPackingNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm:false,
+ isForm: false,
+ },
+ {
+ label: '从库存状态',
+ field: 'fromInventoryStatus',
+ dictType: DICT_TYPE.INVENTORY_STATUS,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ disabled: true,
+ type: 'Select'
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ }
+ },
+ {
+ label: '包装规格',
+ field: 'packUnit',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: true,
+ isForm: false,
+ tableForm:{
+ multiple:false,
+ isInpuFocusShow: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择物料代码',
+ searchField: 'packUnit',
+ searchTitle: '物料包装信息',
+ searchAllSchemas: Itempackaging.allSchemas,
+ searchPage: ItempackagingApi.getItempackagingPageTree,
+ searchCondition: [{
+ key:'itemCode', // 查询列表中字段
+ value:'itemCode', // 指主表某字段
+ message: '请选择物料代码!', // 当前置条件为空时 弹出信息提示
+ isMainValue: true, // 表示查询条件是主表的字段的值
+ action: '==', // 查询拼接条件
+ }]
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ disabled: true,
+ isSearchList: false, // 开启查询弹窗
+ searchListPlaceholder: '请选择物料代码',
+ searchField: 'packUnit',
+ searchTitle: '物料包装信息',
+ searchAllSchemas: Itempackaging.allSchemas,
+ searchPage: ItempackagingApi.getItempackagingPageTree,
+ searchCondition: [{
+ key:'itemCode', // 查询列表中字段
+ value:'itemCode', // 指主表某字段
+ message: '请选择物料代码!', // 当前置条件为空时 弹出信息提示
+ isMainValue: true, // 表示查询条件是主表的字段的值
+ action: '==', // 查询拼接条件
+ }]
+ }
+ }
+ },
+ {
+ label: '包装数量',
+ field: 'packQty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ disabled:true
+ },
+ isTableForm: true,
+ isForm: false,
+ },
+ {
+ label: '批次',
+ field: 'fromBatch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ disabled: true
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ }
+ },
+ {
+ label: '供应商批次',
+ field: 'altBatch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ disabled: true
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ }
+ },
+ {
+ label: '数量',
+ field: 'qty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ // min: 0,
+ precision: 6
+ }
+ },
+ tableForm: {
+ disabled: false,
+ type: 'InputNumber',
+ // min: 0,
+ precision: 6
+ }
+ },
+ {
+ label: '计量单位',
+ field: 'uom',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ type: 'Select',
+ disabled: true
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ }
+ }
+]))
+
+//表单校验
+export const InventorymoveRequestDetailRules = reactive({
+ itemCode: [
+ { required: true, message: '请点击从包装号选择物料代码', trigger: 'change' }
+ ],
+ fromInventoryStatus: [
+ { required: true, message: '请选择从库存状态', trigger: 'change' }
+ ],
+ toInventoryStatus: [
+ { required: true, message: '请选择到库存状态', trigger: 'change' }
+ ]
+})
diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue
index cf11e26b5..a5256d8e0 100644
--- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue
+++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue
@@ -860,7 +860,7 @@ const onChangeForm = async (field, cur, formRef)=>{
}
const getPurchanseList = async ()=>{
- let res = await PurchaseDetailApi.getPurchaseDetailPageWMS({
+ let res = await PurchaseDetailApi.getPurchaseDetailPageWMSNotM({
supplierCode: formRef.value.formRef.formModel.supplierCode,
itemCode: formRef.value.formRef.formModel.itemCode,
pageSize: 20,
@@ -894,7 +894,7 @@ const choosePurchanseList = ()=>{
searchTableRef.value.open(
"直接选择采购订单",
PurchaseMain.allSchemas,
- PurchaseDetailApi.getPurchaseDetailPageWMS,
+ PurchaseDetailApi.getPurchaseDetailPageWMSNotM,
"hehehe",
"hehehe",
false,