From 5a316c4ea2121097b237b4b1f333d46be7c7fcf2 Mon Sep 17 00:00:00 2001 From: chenfang <1057876684@qq.com> Date: Mon, 28 Oct 2024 14:41:36 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=99=A8=E5=85=B7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=BC=80=E5=8F=91=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/balance/index.ts | 11 + .../itemManage/itembasic/itembasic.data.ts | 45 ++ .../itemManage/packageunit/index.vue | 36 +- .../packageunit/packageunit.data.ts | 126 +-- .../balanceContainer/balance.data.ts | 738 ++++++++++++++++++ .../balanceContainer/index.vue | 373 +++++++++ .../containerMainRequest.data.ts | 250 +++--- .../createContainerMainRequest.data.ts | 623 +++++++++++++++ .../createContainerMainRequest/index.vue | 540 +++++++++++++ .../initialContainerMainRequest/index.vue | 6 +- .../initialContainerMainRequest.data.ts | 186 +++-- .../moveContainerMainRequest/index.vue | 538 +++++++++++++ .../moveContainerMainRequest.data.ts | 607 ++++++++++++++ .../returnContainerMainRequest/index.vue | 538 +++++++++++++ .../returnContainerMainRequest.data.ts | 607 ++++++++++++++ 15 files changed, 4954 insertions(+), 270 deletions(-) create mode 100644 src/views/wms/inventoryManage/balanceContainer/balance.data.ts create mode 100644 src/views/wms/inventoryManage/balanceContainer/index.vue create mode 100644 src/views/wms/inventoryjobManage/containermanage/createContainerMainRequest/createContainerMainRequest.data.ts create mode 100644 src/views/wms/inventoryjobManage/containermanage/createContainerMainRequest/index.vue create mode 100644 src/views/wms/inventoryjobManage/containermanage/moveContainerMainRequest/index.vue create mode 100644 src/views/wms/inventoryjobManage/containermanage/moveContainerMainRequest/moveContainerMainRequest.data.ts create mode 100644 src/views/wms/inventoryjobManage/containermanage/returnContainerMainRequest/index.vue create mode 100644 src/views/wms/inventoryjobManage/containermanage/returnContainerMainRequest/returnContainerMainRequest.data.ts diff --git a/src/api/wms/balance/index.ts b/src/api/wms/balance/index.ts index 5199e941b..1387a2391 100644 --- a/src/api/wms/balance/index.ts +++ b/src/api/wms/balance/index.ts @@ -199,6 +199,17 @@ export const selectConfigToBalance = async (params) => { } } +// 查询器具库存余额列表 +export const getBalanceByQJ = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/balance/seniorContainer', data }) + } else { + return await request.get({ url: `/wms/balance/pageContainer`, params }) + } +} + // 查询库存余额列表根据业务类型 根据库存状态及库区类型筛选 export const getBalanceByBusinessTypeByItemType = async (params) => { diff --git a/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts b/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts index d8677ce34..502cf1efc 100644 --- a/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts +++ b/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts @@ -536,3 +536,48 @@ export const rules = reactive({ ], }) console.log(Itembasic) +// 器具初始化管理选择器具时专用 +export const ItembasicCopy = useCrudSchemas(reactive([ + { + label: '代码', + field: 'code', + sort: 'custom', + isSearch: true, + table: { + width: 180, + fixed: 'left' + }, + }, + { + label: '名称', + field: 'name', + sort: 'custom', + isSearch: true, + table: { + width: 150 + }, + }, + { + label: '计量单位', + field: 'uom', + sort: 'custom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isSearch: true, + isTable: true, + table: { + width: 120 + } + }, + { + label: '类型', + field: 'type', + sort: 'custom', + dictType: DICT_TYPE.ITEM_TYPE, + dictClass: 'string', + isTable: true, + table: { + width: 100 + } , + } +])) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/itemManage/packageunit/index.vue b/src/views/wms/basicDataManage/itemManage/packageunit/index.vue index c57070b0d..81922810c 100644 --- a/src/views/wms/basicDataManage/itemManage/packageunit/index.vue +++ b/src/views/wms/basicDataManage/itemManage/packageunit/index.vue @@ -180,30 +180,30 @@ const openForm = (type: string, row?: any) => { if (item.field == 'code') { item.componentProps.disabled = true } - if (item.field == 'name') { - item.componentProps.disabled = true - } - if (item.field == 'manageBalance') { - item.componentProps.disabled = true - } - if (item.field == 'type') { - item.componentProps.disabled = true - } + // if (item.field == 'name') { + // item.componentProps.disabled = true + // } + // if (item.field == 'manageBalance') { + // item.componentProps.disabled = true + // } + // if (item.field == 'type') { + // item.componentProps.disabled = true + // } }) }else { Packageunit.allSchemas.formSchema.forEach((item) => { if (item.field == 'code') { item.componentProps.disabled = false } - if (item.field == 'name') { - item.componentProps.disabled = false - } - if (item.field == 'manageBalance') { - item.componentProps.disabled = false - } - if (item.field == 'type') { - item.componentProps.disabled = false - } + // if (item.field == 'name') { + // item.componentProps.disabled = false + // } + // if (item.field == 'manageBalance') { + // item.componentProps.disabled = false + // } + // if (item.field == 'type') { + // item.componentProps.disabled = false + // } }) } basicFormRef.value.open(type, row) diff --git a/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts b/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts index d290567a0..eb1d13c75 100644 --- a/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts +++ b/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts @@ -107,25 +107,25 @@ export const Packageunit1 = useCrudSchemas(reactive([ width: 150 }, }, - { - label: '是否重复使用', - field: 'reuse', - sort: 'custom', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isSearch: false, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' - } - }, - table: { - width: 150 - }, - }, + // { + // label: '是否重复使用', + // field: 'reuse', + // sort: 'custom', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', + // isSearch: false, + // form: { + // component: 'Switch', + // value: 'TRUE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // }, + // table: { + // width: 150 + // }, + // }, { label: '是否管理包装库存', field: 'manageBalance', @@ -451,43 +451,53 @@ export const Packageunit = useCrudSchemas(reactive([ width: 150 }, }, + // { + // label: '是否重复使用', + // field: 'reuse', + // sort: 'custom', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', + // isSearch: false, + // form: { + // component: 'Switch', + // value: 'TRUE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // }, + // table: { + // width: 150 + // }, + // }, { - label: '是否重复使用', - field: 'reuse', + label: '是否管理包装库存', + field: 'manageBalance', sort: 'custom', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: false, form: { component: 'Switch', - value: 'TRUE', + value: 'FALSE', componentProps: { inactiveValue: 'FALSE', activeValue: 'TRUE' } }, table: { - width: 150 + width: 180 }, }, { - label: '是否管理包装库存', + label: '器具开关', field: 'manageBalance', sort: 'custom', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isSearch: false, - form: { - component: 'Switch', - value: 'FALSE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' - } - }, - table: { - width: 180 - }, + isSearch: true, + isForm: false, + isTable: false, }, { label: '生效时间', @@ -692,9 +702,9 @@ export const PackageunitRules = reactive({ type: [ { required: true, message: '请选择包装类型', trigger: 'change' } ], - reuse: [ - { required: true, message: '请选择是否重复使用', trigger: 'change' } - ], + // reuse: [ + // { required: true, message: '请选择是否重复使用', trigger: 'change' } + // ], available: [ { required: true, message: '请选择是否可用', trigger: 'change' } ], @@ -820,25 +830,25 @@ export const PackageunitCopy = useCrudSchemas(reactive([ width: 150 }, }, - { - label: '是否重复使用', - field: 'reuse', - sort: 'custom', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isSearch: false, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' - } - }, - table: { - width: 150 - }, - }, + // { + // label: '是否重复使用', + // field: 'reuse', + // sort: 'custom', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', + // isSearch: false, + // form: { + // component: 'Switch', + // value: 'TRUE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // }, + // table: { + // width: 150 + // }, + // }, { label: '是否管理包装库存', field: 'manageBalance', diff --git a/src/views/wms/inventoryManage/balanceContainer/balance.data.ts b/src/views/wms/inventoryManage/balanceContainer/balance.data.ts new file mode 100644 index 000000000..15c896752 --- /dev/null +++ b/src/views/wms/inventoryManage/balanceContainer/balance.data.ts @@ -0,0 +1,738 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' + +/** + * @returns {Array} 库存余额 + */ +export const Balance = useCrudSchemas( + reactive([ + { + label: '器具代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true + }, + { + label: '器具名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + isSearch: false + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + hiddenSearchHigh: true,// 高级筛选中隐藏 + isSearch: false, + isForm: false, + isTable: false, + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + hiddenSearchHigh: true,// 高级筛选中隐藏 + isSearch: false, + isForm: false, + isTable: false, + }, + { + label: '物料类型', + field: 'itemType', + sort: 'custom', + dictType: DICT_TYPE.ITEM_TYPE, + dictClass: 'string', + isSearch: false, + isForm: false, + isTable: false, + table: { + width: 100 + } + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + isSearch: false, + isForm: false, + isTable: false, + }, + { + label: '供应商批次', + field: 'altBatch', + sort: 'custom', + table: { + width: 150 + }, + isSearch: false, + isForm: false, + isTable: false, + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + isSearch: false, + isForm: false, + isTable: false, + }, + { + label: '包装规格', + field: 'packUnit', + sort: 'custom', + isSearch: false, + isForm: false, + isTable: false, + table: { + width: 150 + } + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + isSearch: false, + isForm: false, + isTable: false, + 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: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isSearch: false, + isForm: false, + isTable: 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', + isSearch: false, + isForm: false, + isTable: false, + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '库区类型', + field: 'areaType', + sort: 'custom', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isSearch: false, + isForm: false, + isTable: false, + table: { + width: 150 + } + }, + + { + label: '仓库代码', + field: 'warehouseCode', + sort: 'custom', + isSearch: false, + isForm: false, + isTable: false, + table: { + width: 150 + } + }, + { + label: '库位组代码', + field: 'locationGroupCode', + sort: 'custom', + isSearch: false, + isForm: false, + isTable: false, + table: { + width: 150 + } + }, + { + label: '库区代码', + field: 'areaCode', + sort: 'custom', + isSearch: false, + isForm: false, + isTable: false, + 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', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + isSearch: false, + isForm: false, + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x' + } + } + }, + { + label: '生产日期', + field: 'produceDate', + isSearch: false, + isForm: false, + isTable: false, + 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', + isSearch: false, + isForm: false, + isTable: false, + 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 + }, + isSearch: false, + isForm: false, + isTable: false, + }, + { + label: '锁定数量', + field: 'lockedQty', + sort: 'custom', + table: { + width: 150 + }, + isSearch: false, + isForm: false, + 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', + isSearch: false, + isForm: false, + isTable: false, + 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', + isSearch: false, + isForm: false, + isTable: false, + 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' + } + }, + isSearch: false, + isForm: false, + isTable: false, + 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' + } + }, + isSearch: false, + isForm: false, + isTable: false, + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isSearch: false, + isForm: false, + isTable: false, + }, + // TODO: 临时添加 方便操作 + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 200, + fixed: 'right' + } + } + ]) +) + + +export const TransactionTab = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isTable: true, + isForm: true, + isDetail:true, + }, + { + label: '创建时间', + field: 'createTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + 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: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '事务类型', + field: 'transactionType', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '库存动作', + field: 'inventoryAction', + dictType: DICT_TYPE.INVENTORY_ACTION, + dictClass: 'string', + isTable: true, + isSearch: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '业务记录号', + field: 'recordNumber', + sort: 'custom', + isTable: true, + isSearch: true, + table: { + width: 180 + }, + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + }, + { + label: '替代批次', + field: 'altBatch', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + }, + { + label: '库位代码', + field: 'locationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + isSearch: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '事务号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: true + } + +])) + +// 表单校验 +export const BalanceRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + // containerNumber: [ + // { required: true, message: '请选择器具号', trigger: 'change' } + // ], + itemCode: [ + { required: true, message: '请选择物料代码', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + arriveDate: [ + { required: true, message: '请选择到货日期', trigger: 'change' } + ], + produceDate: [ + { required: true, message: '请选择生产日期', trigger: 'change' } + ], +}) diff --git a/src/views/wms/inventoryManage/balanceContainer/index.vue b/src/views/wms/inventoryManage/balanceContainer/index.vue new file mode 100644 index 000000000..2d4ee1064 --- /dev/null +++ b/src/views/wms/inventoryManage/balanceContainer/index.vue @@ -0,0 +1,373 @@ + + + diff --git a/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/containerMainRequest.data.ts b/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/containerMainRequest.data.ts index f27b29eb0..358e8ff41 100644 --- a/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/containerMainRequest.data.ts +++ b/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/containerMainRequest.data.ts @@ -9,6 +9,7 @@ import * as LocationApi from '@/api/wms/location' import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' import * as getRequestsettingApi from '@/api/wms/requestsetting/index' +import * as getBusinessTypeApi from '@/api/wms/businesstype/index' // 表单校验 export const ContainerMainRequestRules = reactive({ @@ -27,6 +28,17 @@ const queryParams = { const data = await getRequestsettingApi.getRequestsettingPage(queryParams) const requestsettingData =data?.list[0]||{} + +const businessTypeQueryParams = { + pageSize:10, + pageNo:1, + code:'CreateContainerManage', + name:'器具新增管理' +} + + const businessTypeValue = await getBusinessTypeApi.getBusinesstypePage(businessTypeQueryParams) + const businessTypeData =businessTypeValue?.list[0]||{} + // 获取当前操作人的部门 import { useUserStore } from '@/store/modules/user' const userStore = useUserStore() @@ -45,7 +57,8 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ table: { width: 100 }, - }, { + }, + { label: '状态', field: 'status', dictType: DICT_TYPE.REQUEST_STATUS, @@ -63,6 +76,52 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ } } }, + { + label: '初始化库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择初始化库位代码', + searchField: 'code', + searchTitle: '库位信息', + searchAllSchemas: Location.allSchemas, + searchPage: LocationApi.selectBusinessTypeToLocation, + searchCondition: [{ + key: 'businessType', + value: businessTypeData.code, + },{ + key: 'isIn', + value: 'in', + isMainValue: false + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择初始化库位代码', + searchField: 'code', + searchTitle: '库位信息', + searchAllSchemas: Location.allSchemas, + searchPage: LocationApi.selectBusinessTypeToLocation, + searchCondition: [{ + key: 'businessType', + value: businessTypeData.code, + },{ + key: 'isIn', + value: 'in', + isMainValue: false + }] + } + }, + isSearch: false, + isForm: true, + isTable: false, + }, { label: '类型', field: 'type', @@ -86,7 +145,9 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ sort: 'custom', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', + isSearch: false, isForm: false, + isTable: false, table: { width: 150 }, @@ -96,17 +157,19 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ field: 'mainRemark', sort: 'custom', isSearch: false, - isTable: true + isForm: true, + isTable: false, }, { label: '部门', field: 'departmentCode', sort: 'custom', - isForm: false, table: { width: 150 }, - isTable:false, + isSearch: false, + isForm: false, + isTable: false, formatter: (_: Recordable, __: TableColumn, cellValue: number) => { return userDeptArray.find((account) => account.id == cellValue)?.name }, @@ -128,8 +191,9 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ field: 'autoCommit', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isTable: false, + isSearch: false, isForm: false, + isTable: false, sort: 'custom', table: { width: 150 @@ -149,8 +213,9 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ field: 'autoAgree', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isTable: false, + isSearch: false, isForm: false, + isTable: false, sort: 'custom', table: { width: 150 @@ -170,8 +235,9 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ field: 'autoExecute', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isTable: false, + isSearch: false, isForm: false, + isTable: false, sort: 'custom', table: { width: 150 @@ -191,6 +257,7 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ field: 'directCreateRecord', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', + isSearch: false, isForm: false, isTable: false, sort: 'custom', @@ -215,7 +282,9 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ detail: { dateFormat : 'YYYY-MM-DD HH:mm:ss' }, - isSearch: true, + isSearch: false, + isForm: false, + isTable: false, search: { component: 'DatePicker', componentProps: { @@ -224,8 +293,9 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] } }, - isTable: false, - isForm: false, + table: { + width: 180 + }, }, { label: '创建者', @@ -233,8 +303,9 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ table: { width: 130 }, + isSearch: false, isForm: false, - isTable: false + isTable: false, }, { label: '最后更新时间', @@ -264,6 +335,7 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ label: '最后更新者', field: 'updater', isDetail: true, + isSearch: false, isForm: false, isTable: false, table: { @@ -274,8 +346,9 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ label: '扩展属性', field: 'extraProperties', sort: 'custom', + isSearch: false, isForm: false, - isTable: false + isTable: false, }, { label: '并发乐观锁', @@ -285,13 +358,15 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ component: 'InputNumber', value: 0 }, + isSearch: false, isForm: false, - isTable: false + isTable: false, }, { label: '地点ID', field: 'siteId', sort: 'custom', + isSearch: false, isForm: false, isTable: false, }, @@ -314,9 +389,6 @@ export const ContainerDetailRequestRules = reactive({ containerNumber: [ { required: true, message: '请选择器具号', trigger: 'blur' } ], - toinventoryStatus: [ - { required: true, message: '请选择倒库存状态', trigger: 'blur' } - ], toQty: [ { required: true, message: '请输入到数量', trigger: 'blur' } ], @@ -379,74 +451,27 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ } }, { - label: '来源库位代码', - field: 'fromLocationCode', + label: '数量', + field: 'toQty', sort: 'custom', - table: { - width: 150 - }, - tableForm: { - disabled: true, - type: 'Select' - }, form: { - // labelMessage: '信息提示说明!!!', + component: 'InputNumber', componentProps: { disabled: true, + min: 0, + precision: 6 } - } - }, - { - label: '目标库位代码', - field: 'toLocationCode', - sort: 'custom', - table: { - width: 150 }, tableForm: { - enterSearch: true, - isInpuFocusShow: true, // 开启查询弹窗 - searchListPlaceholder: '请选择到库位代码', - searchField: 'code', - searchTitle: '库位信息', - searchAllSchemas: Location.allSchemas, - searchPage: LocationApi.selectBusinessTypeToLocation, - // 失去焦点校验参数 - 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, - // 失去焦点校验参数 - verificationParams: [{ - key: 'code', - action: '==', - value: '', - isMainValue: false, - isSearch: 'true', - isFormModel: true, - }] - } + type: 'InputNumber', + min: 0, + precision: 6 } }, { - label: '从库存状态', - field: 'fromInventoryStatus', - dictType: DICT_TYPE.INVENTORY_STATUS, + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, dictClass: 'string', isTable: true, sort: 'custom', @@ -454,12 +479,17 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ width: 150 }, tableForm: { - disabled: true, - type: 'Select' + type: 'Select', + disabled: true }, + form: { + componentProps: { + disabled: true + } + } }, { - label: '到库存状态', + label: '库存状态', field: 'toInventoryStatus', dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', @@ -469,55 +499,23 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ width: 150 }, tableForm: { + disabled: true, type: 'Select' }, - }, - // { - // label: '从数量', - // field: 'fromQty', - // sort: 'custom', - // tableForm: { - // disabled: true, - // }, - // }, - { - label: '到数量', - field: 'toQty', - sort: 'custom', form: { - component: 'InputNumber', componentProps: { - disabled: true, - min: 0, - precision: 6 + disabled: true } - }, - tableForm: { - type: 'InputNumber', - min: 0, - precision: 6 - } - }, - { - label: '计量单位', - field: 'uom', - dictType: DICT_TYPE.UOM, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - tableForm:{ - disabled: true, - type: 'Select' } }, { label: '子备注', field: 'remark', sort: 'custom', - isTable: true + isSearch: false, + isForm: false, + isTableForm: false, + isTable: false }, { label: '创建时间', @@ -525,7 +523,7 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ sort: 'custom', formatter: dateFormatter, detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' + dateFormat : 'YYYY-MM-DD HH:mm:ss' }, search: { component: 'DatePicker', @@ -545,11 +543,12 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ } }, table: { - width: 150 + width: 180 }, - isTable: true, + isSearch: false, isForm: false, - isTableForm: false + isTableForm: false, + isTable: false, }, { label: '创建者', @@ -557,9 +556,10 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ table: { width: 130 }, + isSearch: false, isForm: false, - isTable: true, - isTableForm: false + isTableForm: false, + isTable: false, }, { label: '地点ID', @@ -599,7 +599,9 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ isForm: false, hiddenInMain:true, isTableForm: false, - isTable: false + table: { + width: 200, + fixed: 'right' + } } -])) - +])) \ No newline at end of file diff --git a/src/views/wms/inventoryjobManage/containermanage/createContainerMainRequest/createContainerMainRequest.data.ts b/src/views/wms/inventoryjobManage/containermanage/createContainerMainRequest/createContainerMainRequest.data.ts new file mode 100644 index 000000000..dc83cbc1d --- /dev/null +++ b/src/views/wms/inventoryjobManage/containermanage/createContainerMainRequest/createContainerMainRequest.data.ts @@ -0,0 +1,623 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { TableColumn } from '@/types/table' +import { dateFormatter } from '@/utils/formatTime' + +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 ItembasicApi from '@/api/wms/itembasic' +import { ItembasicCopy } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' + +import * as getRequestsettingApi from '@/api/wms/requestsetting/index' +import * as getBusinessTypeApi from '@/api/wms/businesstype/index' + +// 表单校验 +export const ContainerMainRequestRules = reactive({ + type:[ + { required: true, message: '请选择类型', trigger: 'change' }, + ], + concurrencyStamp: [required], +}) + +const businessTypeQueryParams = { + pageSize:10, + pageNo:1, + code:'CreateContainerManage', + name:'器具新增管理' +} + + const businessTypeValue = await getBusinessTypeApi.getBusinesstypePage(businessTypeQueryParams) + const businessTypeData =businessTypeValue?.list[0]||{} + +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize:10, + pageNo:1, + code:'ContainerRequest' +} + const data = await getRequestsettingApi.getRequestsettingPage(queryParams) + const requestsettingData =data?.list[0]||{} + + // 获取当前操作人的部门 +import { useUserStore } from '@/store/modules/user' +const userStore = useUserStore() +const userDept = userStore.userSelfInfo.dept + // id 转str 否则form回显匹配不到 + userDept.id = userDept.id.toString() +const userDeptArray:any = [userDept] + +export const ContainerMainRequest = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + isSearch: true, + isForm: false, + table: { + width: 100 + }, + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: true, + isForm: false, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '初始化库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择初始化库位代码', + searchField: 'code', + searchTitle: '库位信息', + searchAllSchemas: Location.allSchemas, + searchPage: LocationApi.selectBusinessTypeToLocation, + searchCondition: [{ + key: 'businessType', + value: businessTypeData.code, + },{ + key: 'isIn', + value: 'in', + isMainValue: false + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择初始化库位代码', + searchField: 'code', + searchTitle: '库位信息', + searchAllSchemas: Location.allSchemas, + searchPage: LocationApi.selectBusinessTypeToLocation, + searchCondition: [{ + key: 'businessType', + value: businessTypeData.code, + },{ + key: 'isIn', + value: 'in', + isMainValue: false + }] + } + }, + isSearch: false, + isForm: true, + isTable: false, + }, + { + label: '类型', + field: 'type', + sort: 'custom', + dictType: DICT_TYPE.CONTAIN_MANAGE_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + table: { + width: 120 + }, + form:{ + componentProps:{ + disabled: true, + } + } + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: false, + isForm: false, + isTable: false, + table: { + width: 150 + }, + }, + { + label: '主备注', + field: 'mainRemark', + sort: 'custom', + isSearch: false, + isForm: true, + isTable: false, + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: false, + isForm: false, + 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: 'autoCommit', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: false, + isForm: false, + isTable: 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', + isSearch: false, + isForm: false, + isTable: 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', + isSearch: false, + isForm: false, + isTable: 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', + isSearch: false, + isForm: false, + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.directCreateRecord, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + detail: { + dateFormat : 'YYYY-MM-DD HH:mm:ss' + }, + isSearch: false, + isForm: false, + isTable: false, + 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')] + } + }, + table: { + width: 180 + }, + }, + { + label: '创建者', + field: 'creator', + table: { + width: 130 + }, + isSearch: false, + 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, + isSearch: false, + isForm: false, + isTable: false, + table: { + width: 150 + } + }, + { + label: '扩展属性', + field: 'extraProperties', + sort: 'custom', + isSearch: false, + isForm: false, + isTable: false, + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + isSearch: false, + isForm: false, + isTable: false, + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + isSearch: false, + isForm: false, + isTable: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 200, + fixed: 'right' + } + } +])) + +// 表单校验 +export const ContainerDetailRequestRules = reactive({ + toLocationCode: [ + { required: true, message: '请选择目标库位', trigger: 'blur' } + ], + containerNumber: [ + { required: true, message: '请选择器具号', trigger: 'blur' } + ], + toQty: [ + { required: true, message: '请输入到数量', trigger: 'blur' } + ], +}) + +export const ContainerDetailRequest = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '主表ID', + field: 'masterId', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + isSearch: true, + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '器具号', + field: 'containerNumber', + sort: 'custom', + tableForm:{ + multiple:true, + isInpuFocusShow: false, // 开启查询弹窗 + disabled: true, + searchListPlaceholder: '请选择器具号', + searchField: 'itemCode', + searchTitle: '器具信息', + searchAllSchemas: ItembasicCopy.allSchemas, + searchPage: ItembasicApi.selectConfigToItembasic, + verificationPage: ItembasicApi.selectContainermanageItemCode, // tableForm下方输入框校验失去焦点之后是否正确的方法 + isShowTableFormSearch: true, //tableForm下方是否出现输入框 + isRepeat: true,//tableForm下方输入框是否可以重复添加该条数据 + // 失去焦点校验参数 + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: 'true', + isFormModel: true, + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择器具号', + searchField: 'itemCode', + searchTitle: '器具信息', + searchAllSchemas: ItembasicCopy.allSchemas, + searchPage: ItembasicApi.selectConfigToItembasic, + } + } + }, + { + label: '数量', + field: 'toQty', + sort: 'custom', + form: { + component: 'InputNumber', + componentProps: { + disabled: true, + min: 0, + precision: 6 + } + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 6 + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '库存状态', + field: 'toInventoryStatus', + 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: 'remark', + sort: 'custom', + isSearch: false, + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + detail: { + dateFormat : 'YYYY-MM-DD HH:mm:ss' + }, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + table: { + width: 180 + }, + isSearch: false, + isForm: false, + isTableForm: false, + isTable: false, + }, + { + label: '创建者', + field: 'creator', + table: { + width: 130 + }, + isSearch: false, + isForm: false, + isTableForm: false, + isTable: false, + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '操作', + field: 'action', + isForm: false, + hiddenInMain:true, + isTableForm: false, + table: { + width: 200, + fixed: 'right' + } + } +])) + diff --git a/src/views/wms/inventoryjobManage/containermanage/createContainerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/createContainerMainRequest/index.vue new file mode 100644 index 000000000..f3cc24da1 --- /dev/null +++ b/src/views/wms/inventoryjobManage/containermanage/createContainerMainRequest/index.vue @@ -0,0 +1,540 @@ + + + + diff --git a/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue index f84f80485..ef7123c55 100644 --- a/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue @@ -125,7 +125,11 @@ const { tableObject, tableMethods } = useTable({ ContainerMainRequest.allSchemas.formSchema.forEach(item=>{ if(item.field == 'type'){ item.value = "INITIAL" - }}); + } + if(item.field == 'toLocationCode'){ + item.value = "INIT_CONTAIN" + } + }); businessType.value = 'InitialContainerManage' importFileName.value = '器具初始化申请' } diff --git a/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts b/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts index 3c4453b19..8bed7ab51 100644 --- a/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts +++ b/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts @@ -9,9 +9,10 @@ import * as LocationApi from '@/api/wms/location' import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' import * as ItembasicApi from '@/api/wms/itembasic' -import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' +import { ItembasicCopy } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' import * as getRequestsettingApi from '@/api/wms/requestsetting/index' +import * as getBusinessTypeApi from '@/api/wms/businesstype/index' // 表单校验 export const ContainerMainRequestRules = reactive({ @@ -21,6 +22,16 @@ export const ContainerMainRequestRules = reactive({ concurrencyStamp: [required], }) +const businessTypeQueryParams = { + pageSize:10, + pageNo:1, + code:'InitialContainerManage', + name:'器具初始化管理' +} + + const businessTypeValue = await getBusinessTypeApi.getBusinesstypePage(businessTypeQueryParams) + const businessTypeData =businessTypeValue?.list[0]||{} + // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 const queryParams = { pageSize:10, @@ -67,6 +78,52 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ } } }, + { + label: '初始化库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择初始化库位代码', + searchField: 'code', + searchTitle: '库位信息', + searchAllSchemas: Location.allSchemas, + searchPage: LocationApi.selectBusinessTypeToLocation, + searchCondition: [{ + key: 'businessType', + value: businessTypeData.code, + },{ + key: 'isIn', + value: 'in', + isMainValue: false + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择初始化库位代码', + searchField: 'code', + searchTitle: '库位信息', + searchAllSchemas: Location.allSchemas, + searchPage: LocationApi.selectBusinessTypeToLocation, + searchCondition: [{ + key: 'businessType', + value: businessTypeData.code, + },{ + key: 'isIn', + value: 'in', + isMainValue: false + }] + } + }, + isSearch: false, + isForm: true, + isTable: false, + }, { label: '类型', field: 'type', @@ -90,7 +147,9 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ sort: 'custom', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', + isSearch: false, isForm: false, + isTable: false, table: { width: 150 }, @@ -100,17 +159,19 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ field: 'mainRemark', sort: 'custom', isSearch: false, - isTable:true, + isForm: true, + isTable: false, }, { label: '部门', field: 'departmentCode', sort: 'custom', - isForm: false, table: { width: 150 }, - isTable:false, + isSearch: false, + isForm: false, + isTable: false, formatter: (_: Recordable, __: TableColumn, cellValue: number) => { return userDeptArray.find((account) => account.id == cellValue)?.name }, @@ -132,8 +193,9 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ field: 'autoCommit', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isTable: false, + isSearch: false, isForm: false, + isTable: false, sort: 'custom', table: { width: 150 @@ -153,8 +215,9 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ field: 'autoAgree', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isTable: false, + isSearch: false, isForm: false, + isTable: false, sort: 'custom', table: { width: 150 @@ -174,8 +237,9 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ field: 'autoExecute', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isTable: false, + isSearch: false, isForm: false, + isTable: false, sort: 'custom', table: { width: 150 @@ -195,6 +259,7 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ field: 'directCreateRecord', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', + isSearch: false, isForm: false, isTable: false, sort: 'custom', @@ -219,7 +284,9 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ detail: { dateFormat : 'YYYY-MM-DD HH:mm:ss' }, - isSearch: true, + isSearch: false, + isForm: false, + isTable: false, search: { component: 'DatePicker', componentProps: { @@ -228,11 +295,9 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] } }, - isTable: false, table: { width: 180 }, - isForm: false, }, { label: '创建者', @@ -240,8 +305,9 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ table: { width: 130 }, + isSearch: false, isForm: false, - isTable: false + isTable: false, }, { label: '最后更新时间', @@ -271,6 +337,7 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ label: '最后更新者', field: 'updater', isDetail: true, + isSearch: false, isForm: false, isTable: false, table: { @@ -281,8 +348,9 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ label: '扩展属性', field: 'extraProperties', sort: 'custom', + isSearch: false, isForm: false, - isTable: false + isTable: false, }, { label: '并发乐观锁', @@ -292,15 +360,17 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ component: 'InputNumber', value: 0 }, + isSearch: false, isForm: false, - isTable: false + isTable: false, }, { label: '地点ID', field: 'siteId', sort: 'custom', + isSearch: false, isForm: false, - isTable:false, + isTable: false, }, { label: '操作', @@ -368,7 +438,7 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ searchListPlaceholder: '请选择器具号', searchField: 'itemCode', searchTitle: '器具信息', - searchAllSchemas: Itembasic.allSchemas, + searchAllSchemas: ItembasicCopy.allSchemas, searchPage: ItembasicApi.selectConfigToItembasic, verificationPage: ItembasicApi.selectContainermanageItemCode, // tableForm下方输入框校验失去焦点之后是否正确的方法 isShowTableFormSearch: true, //tableForm下方是否出现输入框 @@ -390,60 +460,13 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ searchListPlaceholder: '请选择器具号', searchField: 'itemCode', searchTitle: '器具信息', - searchAllSchemas: Itembasic.allSchemas, + searchAllSchemas: ItembasicCopy.allSchemas, searchPage: ItembasicApi.selectConfigToItembasic, } } }, { - label: '目标库位代码', - field: 'toLocationCode', - sort: 'custom', - table: { - width: 150 - }, - tableForm:{ - isInpuFocusShow: true, // 开启查询弹窗 - searchListPlaceholder: '请选择到库位代码', - searchField: 'code', - searchTitle: '库位信息', - searchAllSchemas: Location.allSchemas, - searchPage: LocationApi.selectBusinessTypeToLocation, - }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择到库位代码', - searchField: 'code', - searchTitle: '库位信息', - searchAllSchemas: Location.allSchemas, - searchPage: LocationApi.selectBusinessTypeToLocation, - } - } - }, - { - label: '到库存状态', - field: 'toInventoryStatus', - dictType: DICT_TYPE.INVENTORY_STATUS, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - tableForm: { - disabled: true, - type: 'Select' - }, - form: { - componentProps: { - disabled: true - } - } - }, - { - label: '到数量', + label: '数量', field: 'toQty', sort: 'custom', form: { @@ -480,11 +503,34 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ } } }, + { + label: '库存状态', + field: 'toInventoryStatus', + 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: 'remark', sort: 'custom', - isTable:true, + isSearch: false, + isForm: false, + isTableForm: false, + isTable: false }, { label: '创建时间', @@ -511,12 +557,13 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ valueFormat: 'x', } }, - isTable: true, table: { width: 180 }, + isSearch: false, isForm: false, - isTableForm: false + isTableForm: false, + isTable: false, }, { label: '创建者', @@ -524,9 +571,10 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ table: { width: 130 }, + isSearch: false, isForm: false, - isTable: true, - isTableForm: false + isTableForm: false, + isTable: false, }, { label: '地点ID', diff --git a/src/views/wms/inventoryjobManage/containermanage/moveContainerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/moveContainerMainRequest/index.vue new file mode 100644 index 000000000..a608e02d3 --- /dev/null +++ b/src/views/wms/inventoryjobManage/containermanage/moveContainerMainRequest/index.vue @@ -0,0 +1,538 @@ + + + + diff --git a/src/views/wms/inventoryjobManage/containermanage/moveContainerMainRequest/moveContainerMainRequest.data.ts b/src/views/wms/inventoryjobManage/containermanage/moveContainerMainRequest/moveContainerMainRequest.data.ts new file mode 100644 index 000000000..e51780c8c --- /dev/null +++ b/src/views/wms/inventoryjobManage/containermanage/moveContainerMainRequest/moveContainerMainRequest.data.ts @@ -0,0 +1,607 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { TableColumn } from '@/types/table' +import { dateFormatter } from '@/utils/formatTime' + +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 getRequestsettingApi from '@/api/wms/requestsetting/index' +import * as getBusinessTypeApi from '@/api/wms/businesstype/index' + +// 表单校验 +export const ContainerMainRequestRules = reactive({ + type:[ + { required: true, message: '请选择类型', trigger: 'change' }, + ], + concurrencyStamp: [required], +}) + +const businessTypeQueryParams = { + pageSize:10, + pageNo:1, + code:'MoveContainerManage', + name:'器具移动管理' +} + + const businessTypeValue = await getBusinessTypeApi.getBusinesstypePage(businessTypeQueryParams) + const businessTypeData =businessTypeValue?.list[0]||{} + +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize:10, + pageNo:1, + code:'ContainerRequest' +} + const data = await getRequestsettingApi.getRequestsettingPage(queryParams) + const requestsettingData =data?.list[0]||{} + + // 获取当前操作人的部门 +import { useUserStore } from '@/store/modules/user' +const userStore = useUserStore() +const userDept = userStore.userSelfInfo.dept + // id 转str 否则form回显匹配不到 + userDept.id = userDept.id.toString() +const userDeptArray:any = [userDept] + +export const ContainerMainRequest = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + isSearch: true, + isForm: false, + table: { + width: 100 + }, + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: true, + isForm: false, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择到库位代码', + searchField: 'code', + searchTitle: '库位信息', + searchAllSchemas: Location.allSchemas, + searchPage: LocationApi.selectBusinessTypeToLocation, + searchCondition: [{ + key: 'businessType', + value: businessTypeData.code, + },{ + key: 'isIn', + value: 'in', + isMainValue: false + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择到库位代码', + searchField: 'code', + searchTitle: '库位信息', + searchAllSchemas: Location.allSchemas, + searchPage: LocationApi.selectBusinessTypeToLocation, + searchCondition: [{ + key: 'businessType', + value: businessTypeData.code, + },{ + key: 'isIn', + value: 'in', + isMainValue: false + }] + } + }, + isSearch: false, + isForm: true, + isTable: false, + }, + { + label: '类型', + field: 'type', + sort: 'custom', + dictType: DICT_TYPE.CONTAIN_MANAGE_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + table: { + width: 120 + }, + form:{ + componentProps:{ + disabled: true, + } + } + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: false, + isForm: false, + isTable: false, + table: { + width: 150 + }, + }, + { + label: '主备注', + field: 'mainRemark', + sort: 'custom', + isSearch: false, + isForm: true, + isTable: false, + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: false, + isForm: false, + 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: 'autoCommit', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: false, + isForm: false, + isTable: 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', + isSearch: false, + isForm: false, + isTable: 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', + isSearch: false, + isForm: false, + isTable: 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', + isSearch: false, + isForm: false, + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.directCreateRecord, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + detail: { + dateFormat : 'YYYY-MM-DD HH:mm:ss' + }, + isSearch: false, + isForm: false, + isTable: false, + 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')] + } + }, + table: { + width: 180 + }, + }, + { + label: '创建者', + field: 'creator', + table: { + width: 130 + }, + isSearch: false, + 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, + isSearch: false, + isForm: false, + isTable: false, + table: { + width: 150 + } + }, + { + label: '扩展属性', + field: 'extraProperties', + sort: 'custom', + isSearch: false, + isForm: false, + isTable: false, + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + isSearch: false, + isForm: false, + isTable: false, + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + isSearch: false, + isForm: false, + isTable: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 200, + fixed: 'right' + } + } +])) + +// 表单校验 +export const ContainerDetailRequestRules = reactive({ + toLocationCode: [ + { required: true, message: '请选择目标库位', trigger: 'blur' } + ], + containerNumber: [ + { required: true, message: '请选择器具号', trigger: 'blur' } + ], + toQty: [ + { required: true, message: '请输入到数量', trigger: 'blur' } + ], +}) + +export const ContainerDetailRequest = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '主表ID', + field: 'masterId', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + isSearch: true, + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '器具号', + field: 'containerNumber', + sort: 'custom', + tableForm:{ + multiple:true, + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择器具号', + searchField: 'itemCode', + searchTitle: '库存余额信息', + searchAllSchemas: Balance.allSchemas, + searchPage: BalanceApi.getBalanceByQJ, + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择器具号', + searchField: 'itemCode', + searchTitle: '库存余额信息', + searchAllSchemas: Balance.allSchemas, + searchPage: BalanceApi.getBalanceByQJ, + } + } + }, + { + label: '数量', + field: 'toQty', + sort: 'custom', + form: { + component: 'InputNumber', + componentProps: { + disabled: true, + min: 0, + precision: 6 + } + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 6 + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '库存状态', + field: 'toInventoryStatus', + 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: 'remark', + sort: 'custom', + isSearch: false, + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + detail: { + dateFormat : 'YYYY-MM-DD HH:mm:ss' + }, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + table: { + width: 180 + }, + isSearch: false, + isForm: false, + isTableForm: false, + isTable: false, + }, + { + label: '创建者', + field: 'creator', + table: { + width: 130 + }, + isSearch: false, + isForm: false, + isTableForm: false, + isTable: false, + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '操作', + field: 'action', + isForm: false, + hiddenInMain:true, + isTableForm: false, + table: { + width: 200, + fixed: 'right' + } + } +])) + diff --git a/src/views/wms/inventoryjobManage/containermanage/returnContainerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/returnContainerMainRequest/index.vue new file mode 100644 index 000000000..b607db2c2 --- /dev/null +++ b/src/views/wms/inventoryjobManage/containermanage/returnContainerMainRequest/index.vue @@ -0,0 +1,538 @@ + + + + diff --git a/src/views/wms/inventoryjobManage/containermanage/returnContainerMainRequest/returnContainerMainRequest.data.ts b/src/views/wms/inventoryjobManage/containermanage/returnContainerMainRequest/returnContainerMainRequest.data.ts new file mode 100644 index 000000000..99fe92c2d --- /dev/null +++ b/src/views/wms/inventoryjobManage/containermanage/returnContainerMainRequest/returnContainerMainRequest.data.ts @@ -0,0 +1,607 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { TableColumn } from '@/types/table' +import { dateFormatter } from '@/utils/formatTime' + +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 getRequestsettingApi from '@/api/wms/requestsetting/index' +import * as getBusinessTypeApi from '@/api/wms/businesstype/index' + +// 表单校验 +export const ContainerMainRequestRules = reactive({ + type:[ + { required: true, message: '请选择类型', trigger: 'change' }, + ], + concurrencyStamp: [required], +}) + +const businessTypeQueryParams = { + pageSize:10, + pageNo:1, + code:'ReturnContainerManage', + name:'器具返回管理' +} + + const businessTypeValue = await getBusinessTypeApi.getBusinesstypePage(businessTypeQueryParams) + const businessTypeData =businessTypeValue?.list[0]||{} + +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize:10, + pageNo:1, + code:'ContainerRequest' +} + const data = await getRequestsettingApi.getRequestsettingPage(queryParams) + const requestsettingData =data?.list[0]||{} + + // 获取当前操作人的部门 +import { useUserStore } from '@/store/modules/user' +const userStore = useUserStore() +const userDept = userStore.userSelfInfo.dept + // id 转str 否则form回显匹配不到 + userDept.id = userDept.id.toString() +const userDeptArray:any = [userDept] + +export const ContainerMainRequest = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + isSearch: true, + isForm: false, + table: { + width: 100 + }, + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: true, + isForm: false, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择到库位代码', + searchField: 'code', + searchTitle: '库位信息', + searchAllSchemas: Location.allSchemas, + searchPage: LocationApi.selectBusinessTypeToLocation, + searchCondition: [{ + key: 'businessType', + value: businessTypeData.code, + },{ + key: 'isIn', + value: 'in', + isMainValue: false + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择到库位代码', + searchField: 'code', + searchTitle: '库位信息', + searchAllSchemas: Location.allSchemas, + searchPage: LocationApi.selectBusinessTypeToLocation, + searchCondition: [{ + key: 'businessType', + value: businessTypeData.code, + },{ + key: 'isIn', + value: 'in', + isMainValue: false + }] + } + }, + isSearch: false, + isForm: true, + isTable: false, + }, + { + label: '类型', + field: 'type', + sort: 'custom', + dictType: DICT_TYPE.CONTAIN_MANAGE_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + table: { + width: 120 + }, + form:{ + componentProps:{ + disabled: true, + } + } + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: false, + isForm: false, + isTable: false, + table: { + width: 150 + }, + }, + { + label: '主备注', + field: 'mainRemark', + sort: 'custom', + isSearch: false, + isForm: true, + isTable: false, + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: false, + isForm: false, + 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: 'autoCommit', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: false, + isForm: false, + isTable: 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', + isSearch: false, + isForm: false, + isTable: 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', + isSearch: false, + isForm: false, + isTable: 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', + isSearch: false, + isForm: false, + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.directCreateRecord, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + detail: { + dateFormat : 'YYYY-MM-DD HH:mm:ss' + }, + isSearch: false, + isForm: false, + isTable: false, + 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')] + } + }, + table: { + width: 180 + }, + }, + { + label: '创建者', + field: 'creator', + table: { + width: 130 + }, + isSearch: false, + 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, + isSearch: false, + isForm: false, + isTable: false, + table: { + width: 150 + } + }, + { + label: '扩展属性', + field: 'extraProperties', + sort: 'custom', + isSearch: false, + isForm: false, + isTable: false, + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + isSearch: false, + isForm: false, + isTable: false, + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + isSearch: false, + isForm: false, + isTable: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 200, + fixed: 'right' + } + } +])) + +// 表单校验 +export const ContainerDetailRequestRules = reactive({ + toLocationCode: [ + { required: true, message: '请选择目标库位', trigger: 'blur' } + ], + containerNumber: [ + { required: true, message: '请选择器具号', trigger: 'blur' } + ], + toQty: [ + { required: true, message: '请输入到数量', trigger: 'blur' } + ], +}) + +export const ContainerDetailRequest = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '主表ID', + field: 'masterId', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + isSearch: true, + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '器具号', + field: 'containerNumber', + sort: 'custom', + tableForm:{ + multiple:true, + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择器具号', + searchField: 'itemCode', + searchTitle: '库存余额信息', + searchAllSchemas: Balance.allSchemas, + searchPage: BalanceApi.getBalanceByQJ, + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择器具号', + searchField: 'itemCode', + searchTitle: '库存余额信息', + searchAllSchemas: Balance.allSchemas, + searchPage: BalanceApi.getBalanceByQJ, + } + } + }, + { + label: '数量', + field: 'toQty', + sort: 'custom', + form: { + component: 'InputNumber', + componentProps: { + disabled: true, + min: 0, + precision: 6 + } + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 6 + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '库存状态', + field: 'toInventoryStatus', + 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: 'remark', + sort: 'custom', + isSearch: false, + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + detail: { + dateFormat : 'YYYY-MM-DD HH:mm:ss' + }, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + table: { + width: 180 + }, + isSearch: false, + isForm: false, + isTableForm: false, + isTable: false, + }, + { + label: '创建者', + field: 'creator', + table: { + width: 130 + }, + isSearch: false, + isForm: false, + isTableForm: false, + isTable: false, + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '操作', + field: 'action', + isForm: false, + hiddenInMain:true, + isTableForm: false, + table: { + width: 200, + fixed: 'right' + } + } +])) + From e12b216d7fd97de229b6bad71d2b9ac4298d35ff Mon Sep 17 00:00:00 2001 From: chenfang <1057876684@qq.com> Date: Tue, 29 Oct 2024 14:09:27 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=99=A8=E5=85=B7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=BC=80=E5=8F=91=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/containerMainRequest/index.ts | 7 +- .../createContainerMainRequest/index.vue | 3 +- .../initialContainerMainRequest/index.vue | 6 +- .../moveContainerMainRequest/index.vue | 16 +- .../returnContainerMainRequest/index.vue | 10 +- .../returnContainerMainRequest.data.ts | 24 +- .../scrapContainerMainRequest/index.vue | 5 +- .../scrapContainerMainRequest.data.ts | 253 +++++++++++------- 8 files changed, 216 insertions(+), 108 deletions(-) diff --git a/src/api/wms/containerMainRequest/index.ts b/src/api/wms/containerMainRequest/index.ts index 2d5bea0c1..681b93c3e 100644 --- a/src/api/wms/containerMainRequest/index.ts +++ b/src/api/wms/containerMainRequest/index.ts @@ -113,11 +113,16 @@ export const exportDeliverContainerMainRequest = async (params) => { } } -// 下载用户导入模板 +// 下载用户导入模板(器具初始化/新增) export const importTemplate = () => { return request.download({ url: '/wms/container-main-request/get-import-template' }) } +// 下载用户导入模板(器具返回/移动/报废) +export const importTemplateReturnAndMove = () => { + return request.download({ url: '/wms/container-main-request/get-import-template-returnAndMove' }) +} + // 关闭 export const close = (id) => { return request.put({ url: '/wms/container-main-request/close?id=' + id }) diff --git a/src/views/wms/inventoryjobManage/containermanage/createContainerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/createContainerMainRequest/index.vue index f3cc24da1..109951619 100644 --- a/src/views/wms/inventoryjobManage/containermanage/createContainerMainRequest/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/createContainerMainRequest/index.vue @@ -81,7 +81,7 @@ /> - + -./initialContainerMainRequest.data + \ No newline at end of file diff --git a/src/views/wms/inventoryjobManage/containermanage/moveContainerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/moveContainerMainRequest/index.vue index a608e02d3..89f39d8a3 100644 --- a/src/views/wms/inventoryjobManage/containermanage/moveContainerMainRequest/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/moveContainerMainRequest/index.vue @@ -81,7 +81,7 @@ /> - + diff --git a/src/views/wms/inventoryjobManage/containermanage/returnContainerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/returnContainerMainRequest/index.vue index b607db2c2..835adfc5f 100644 --- a/src/views/wms/inventoryjobManage/containermanage/returnContainerMainRequest/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/returnContainerMainRequest/index.vue @@ -81,7 +81,7 @@ /> - + diff --git a/src/views/wms/inventoryjobManage/containermanage/returnContainerMainRequest/returnContainerMainRequest.data.ts b/src/views/wms/inventoryjobManage/containermanage/returnContainerMainRequest/returnContainerMainRequest.data.ts index 99fe92c2d..fdb53d163 100644 --- a/src/views/wms/inventoryjobManage/containermanage/returnContainerMainRequest/returnContainerMainRequest.data.ts +++ b/src/views/wms/inventoryjobManage/containermanage/returnContainerMainRequest/returnContainerMainRequest.data.ts @@ -488,7 +488,29 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ } }, { - label: '库存状态', + label: '从库存状态', + field: 'fromInventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isForm: false, + isTableForm: false, + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true, + type: 'Select' + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '到库存状态', field: 'toInventoryStatus', dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', diff --git a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue index 302f86923..c8c79b8b8 100644 --- a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue @@ -81,7 +81,7 @@ /> - + diff --git a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts index 14e32f9a2..5d2c76d4b 100644 --- a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts +++ b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts @@ -9,6 +9,7 @@ import * as LocationApi from '@/api/wms/location' import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' import * as getRequestsettingApi from '@/api/wms/requestsetting/index' +import * as getBusinessTypeApi from '@/api/wms/businesstype/index' // 表单校验 export const ContainerMainRequestRules = reactive({ @@ -27,6 +28,17 @@ const queryParams = { const data = await getRequestsettingApi.getRequestsettingPage(queryParams) const requestsettingData = data?.list[0] || {} + +const businessTypeQueryParams = { + pageSize:10, + pageNo:1, + code:'ScrapContainerManage', + name:'器具报废管理' +} + + const businessTypeValue = await getBusinessTypeApi.getBusinesstypePage(businessTypeQueryParams) + const businessTypeData =businessTypeValue?.list[0]||{} + // 获取当前操作人的部门 import { useUserStore } from '@/store/modules/user' const userStore = useUserStore() @@ -63,6 +75,49 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ } } }, + // { + // label: '到库位代码', + // field: 'toLocationCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // tableForm:{ + // isInpuFocusShow: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择到库位代码', + // searchField: 'code', + // searchTitle: '库位信息', + // searchAllSchemas: Location.allSchemas, + // searchPage: LocationApi.selectBusinessTypeToLocation, + // searchCondition: [{ + // key: 'businessType', + // value: businessTypeData.code, + // },{ + // key: 'isIn', + // value: 'in', + // isMainValue: false + // }] + // }, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择到库位代码', + // searchField: 'code', + // searchTitle: '库位信息', + // searchAllSchemas: Location.allSchemas, + // searchPage: LocationApi.selectBusinessTypeToLocation, + // searchCondition: [{ + // key: 'businessType', + // value: businessTypeData.code, + // },{ + // key: 'isIn', + // value: 'in', + // isMainValue: false + // }] + // } + // } + // }, { label: '类型', field: 'type', @@ -96,16 +151,18 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ field: 'mainRemark', sort: 'custom', isSearch: false, - isTable: true + isForm: true, + isTable: false, }, { label: '部门', field: 'departmentCode', sort: 'custom', - isForm: false, table: { width: 150 }, + isSearch: false, + isForm: false, isTable: false, formatter: (_: Recordable, __: TableColumn, cellValue: number) => { return userDeptArray.find((account) => account.id == cellValue)?.name @@ -218,7 +275,9 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ detail: { dateFormat : 'YYYY-MM-DD HH:mm:ss' }, - isSearch: true, + isSearch: false, + isForm: false, + isTable: false, search: { component: 'DatePicker', componentProps: { @@ -227,8 +286,6 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] } }, - isTable: true, - isForm: false, }, { label: '创建者', @@ -236,8 +293,9 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ table: { width: 130 }, + isSearch: false, isForm: false, - isTable: true + isTable: false, }, { label: '最后更新时间', @@ -267,6 +325,7 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ label: '最后更新者', field: 'updater', isDetail: true, + isSearch: false, isForm: false, isTable: false, table: { @@ -277,8 +336,9 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ label: '扩展属性', field: 'extraProperties', sort: 'custom', + isSearch: false, isForm: false, - isTable: false + isTable: false, }, { label: '并发乐观锁', @@ -288,13 +348,15 @@ export const ContainerMainRequest = useCrudSchemas(reactive([ component: 'InputNumber', value: 0 }, + isSearch: false, isForm: false, - isTable: false + isTable: false, }, { label: '地点ID', field: 'siteId', sort: 'custom', + isSearch: false, isForm: false, isTable: false, }, @@ -357,14 +419,14 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ label: '器具号', field: 'containerNumber', sort: 'custom', - tableForm: { - multiple: true, + tableForm:{ + multiple:true, isInpuFocusShow: true, // 开启查询弹窗 searchListPlaceholder: '请选择器具号', searchField: 'itemCode', searchTitle: '库存余额信息', searchAllSchemas: Balance.allSchemas, - searchPage: BalanceApi.selectConfigToBalance, + searchPage: BalanceApi.getBalanceByQJ, }, form: { // labelMessage: '信息提示说明!!!', @@ -374,7 +436,7 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ searchField: 'itemCode', searchTitle: '库存余额信息', searchAllSchemas: Balance.allSchemas, - searchPage: BalanceApi.selectConfigToBalance, + searchPage: BalanceApi.getBalanceByQJ, } } }, @@ -382,6 +444,9 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ label: '来源库位代码', field: 'fromLocationCode', sort: 'custom', + isForm: false, + isTableForm: false, + isTable: false, table: { width: 150 }, @@ -396,83 +461,70 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ } } }, - { - label: '目标库位代码', - field: 'toLocationCode', - sort: 'custom', - table: { - width: 150 - }, - tableForm: { - enterSearch:true, - isInpuFocusShow: true, // 开启查询弹窗 - searchListPlaceholder: '请选择到库位代码', - searchField: 'code', - searchTitle: '库位信息', - searchAllSchemas: Location.allSchemas, - searchPage: LocationApi.selectPageItemAreaToLocation, - // 失去焦点校验参数 - 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.selectPageItemAreaToLocation, - // 失去焦点校验参数 - verificationParams: [{ - key: 'code', - action: '==', - value: '', - isMainValue: false, - isSearch: 'true', - isFormModel: true, - }] - } - } - }, - { - label: '从库存状态', - field: 'fromInventoryStatus', - dictType: DICT_TYPE.INVENTORY_STATUS, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - tableForm: { - disabled: true, - type: 'Select' - }, - }, - { - label: '到库存状态', - field: 'toInventoryStatus', - dictType: DICT_TYPE.INVENTORY_STATUS, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - tableForm: { - type: 'Select', - disabled: true - }, - }, + // { + // label: '目标库位代码', + // field: 'toLocationCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // tableForm: { + // enterSearch:true, + // isInpuFocusShow: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择到库位代码', + // searchField: 'code', + // searchTitle: '库位信息', + // searchAllSchemas: Location.allSchemas, + // searchPage: LocationApi.selectPageItemAreaToLocation, + // // 失去焦点校验参数 + // 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.selectPageItemAreaToLocation, + // // 失去焦点校验参数 + // verificationParams: [{ + // key: 'code', + // action: '==', + // value: '', + // isMainValue: false, + // isSearch: 'true', + // isFormModel: true, + // }] + // } + // } + // }, + // { + // label: '从库存状态', + // field: 'fromInventoryStatus', + // dictType: DICT_TYPE.INVENTORY_STATUS, + // dictClass: 'string', + // isForm: false, + // isTableForm: false, + // isTable: false, + // sort: 'custom', + // table: { + // width: 150 + // }, + // tableForm: { + // disabled: true, + // type: 'Select' + // }, + // }, // { // label: '从数量', // field: 'fromQty', @@ -482,7 +534,7 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ // }, // }, { - label: '到数量', + label: '数量', field: 'toQty', sort: 'custom', form: { @@ -514,11 +566,30 @@ export const ContainerDetailRequest = useCrudSchemas(reactive([ type: 'Select' } }, + { + label: '到库存状态', + field: 'toInventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isForm: false, + isTableForm: false, + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: true + }, + }, { label: '子备注', field: 'remark', sort: 'custom', - isTable: true + isTable: true, + isForm: false, + isTableForm: false }, { label: '创建时间',