From 6328142eeca5159eb3f5effbf7a714e0d5ea0f27 Mon Sep 17 00:00:00 2001 From: yufei_wang <2267742828@qq.com> Date: Sat, 14 Sep 2024 16:05:58 +0800 Subject: [PATCH] =?UTF-8?q?HL-6043=E7=89=A9=E6=96=99=E9=9A=94=E7=A6=BB?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=EF=BC=8C=E9=80=89=E6=8B=A9=E7=89=A9=E6=96=99?= =?UTF-8?q?=E7=9A=84=E5=BC=B9=E5=87=BA=E5=88=97=E8=A1=A8=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=88=97=E9=A1=BA=E5=BA=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inventorymoveRequestMain.data.ts | 463 +++++++++++++++++- 1 file changed, 461 insertions(+), 2 deletions(-) diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts index a3c76a5c5..397723f27 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts @@ -10,6 +10,7 @@ import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/l import * as WarehouseApi from '@/api/wms/warehouse' import { Warehouse } from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data' +import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' const { t } = useI18n() // 国际化 @@ -524,7 +525,465 @@ export const InventorymoveRequestMainRules = reactive({ { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], }) +export const BalanceShow = useCrudSchemas( + reactive([ + { + 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: false + }, + { + label: '库存数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber' + } + }, + { + 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: 'itemType', + sort: 'custom', + dictType: DICT_TYPE.ITEM_TYPE, + dictClass: 'string', + isSearch: true, + table: { + width: 100 + } + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true + }, + { + label: '包装规格', + field: 'packUnit', + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + } + }, + { + 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: '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} 库存转移申请子表 */ @@ -648,7 +1107,7 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( searchListPlaceholder: '请选择从包装号', searchField: 'packingNumber', searchTitle: '库存余额信息', - searchAllSchemas: Balance.allSchemas, + searchAllSchemas: BalanceShow.allSchemas, searchPage: BalanceApi.selectLocationTypeToBalance, }, form: { @@ -658,7 +1117,7 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( searchListPlaceholder: '请选择从包装号', searchField: 'packingNumber', searchTitle: '库存余额信息', - searchAllSchemas: Balance.allSchemas, + searchAllSchemas: BalanceShow.allSchemas, searchPage: BalanceApi.selectLocationTypeToBalance, } }