From 82906bd6a9b1c3ebc293b848d55b1dd027a27105 Mon Sep 17 00:00:00 2001 From: songguoqiang Date: Wed, 18 Jun 2025 17:55:13 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=98=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/balanceDifference/index.ts | 89 ++ src/api/wms/differenceRequestDetail/index.ts | 62 ++ src/api/wms/differenceRequestMain/index.ts | 87 ++ .../balanceDifference/balance.data.ts | 853 ++++++++++++++++++ .../balanceDifference/index.vue | 444 +++++++++ .../differenceRecord/differenceRecord.data.ts | 195 ++++ .../differenceRecord/index.vue | 273 ++++++ .../differenceRequest.data.ts | 342 +++++++ .../differenceRequest/index.vue | 476 ++++++++++ 9 files changed, 2821 insertions(+) create mode 100644 src/api/wms/balanceDifference/index.ts create mode 100644 src/api/wms/differenceRequestDetail/index.ts create mode 100644 src/api/wms/differenceRequestMain/index.ts create mode 100644 src/views/wms/inventoryManage/balanceDifference/balance.data.ts create mode 100644 src/views/wms/inventoryManage/balanceDifference/index.vue create mode 100644 src/views/wms/inventoryManage/differenceRecord/differenceRecord.data.ts create mode 100644 src/views/wms/inventoryManage/differenceRecord/index.vue create mode 100644 src/views/wms/inventoryManage/differenceRequest/differenceRequest.data.ts create mode 100644 src/views/wms/inventoryManage/differenceRequest/index.vue diff --git a/src/api/wms/balanceDifference/index.ts b/src/api/wms/balanceDifference/index.ts new file mode 100644 index 000000000..ec3cf977c --- /dev/null +++ b/src/api/wms/balanceDifference/index.ts @@ -0,0 +1,89 @@ +import request from '@/config/axios' + +export interface BalanceVO { + packingNumber: string + containerNumber: string + itemCode: string + batch: string + altBatch: string + arriveDate: Date + produceDate: Date + expireDate: Date + inventoryStatus: string + locationCode: string + locationGroupCode: string + areaCode: string + warehouseCode: string + erpLocationCode: string + ownerCode: string + uom: string + qty: number + lockedQty: number + usableQty: number + singlePrice: number + amount: number + putInTime: Date + frozen: string + frozenReason: string + lastTransNumber: string + weight: number + area: number + volume: number +} + +export const getTransactionBalancePage = async (params) => { + params.areaCode = "DIFF"; + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/transaction/senior', data }) + } else { + return await request.get({ url: `/wms/transaction/page_balance`, params }) + } +} + +// 查询库存余额列表(包括已冻结,已失效的物料) +export const getBalancePageAll = async (params) => { + params.locationCode = "DIFF"; + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/balanceDIFF/seniorAll', data }) + } else { + return await request.get({ url: `/wms/balanceDIFF/pageAll`, params }) + } +} + +// 导出库存余额 Excel +export const exportBalance = async (params) => { + params.locationCode = "DIFF"; + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/balanceDIFF/export-excel-senior`, data }) + } else { + return await request.download({ url: `/wms/balanceDIFF/export-excel`, params }) + } +} + + +// 查询库存余额列表(包括已冻结,已失效的物料) +export const getBalancePageAllDiff = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/balanceDIFF/seniorAll', data }) + } else { + return await request.get({ url: `/wms/balanceDIFF/pageAll`, params }) + } +} +// 查询库存余额列表增加物料筛选条件 +export const getBalanceItemPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/balanceDIFF/seniorItems', data }) + } else { + return await request.get({ url: `/wms/balanceDIFF/pageItems`, params }) + } +} + diff --git a/src/api/wms/differenceRequestDetail/index.ts b/src/api/wms/differenceRequestDetail/index.ts new file mode 100644 index 000000000..669a8b057 --- /dev/null +++ b/src/api/wms/differenceRequestDetail/index.ts @@ -0,0 +1,62 @@ +import request from '@/config/axios' + +export interface DifferenceRequestDetailVO { + id: number + packingNumber: string + containerNumber: string + batch: string + fromLocationCode: string + inventoryStatus: string + masterId: number + number: string + itemCode: string + remark: string + siteId: string + itemName: string + itemDesc1: string + itemDesc2: string + qty: number + uom: string + concurrencyStamp: number +} + +// 查询差异出库申请子列表 +export const getDetailPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/difference-request-detail/senior', data }) + } else { + return await request.get({ url: `/wms/difference-request-detail/page`, params }) + } +} + +// 查询差异出库申请子详情 +export const getDetail = async (id: number) => { + return await request.get({ url: `/wms/difference-request-detail/get?id=` + id }) +} + +// 新增差异出库申请子 +export const createDetail = async (data: DifferenceRequestDetailVO) => { + return await request.post({ url: `/wms/difference-request-detail/create`, data }) +} + +// 修改差异出库申请子 +export const updateDetail = async (data: DifferenceRequestDetailVO) => { + return await request.put({ url: `/wms/difference-request-detail/update`, data }) +} + +// 删除差异出库申请子 +export const deleteDetail = async (id: number) => { + return await request.delete({ url: `/wms/difference-request-detail/delete?id=` + id }) +} + +// 导出差异出库申请子 Excel +export const exportDetail = async (params) => { + return await request.download({ url: `/wms/difference-request-detail/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/difference-request-detail/get-import-template' }) +} diff --git a/src/api/wms/differenceRequestMain/index.ts b/src/api/wms/differenceRequestMain/index.ts new file mode 100644 index 000000000..65ab44f38 --- /dev/null +++ b/src/api/wms/differenceRequestMain/index.ts @@ -0,0 +1,87 @@ +import request from '@/config/axios' + +export interface DifferenceRequestMainVO { + id: number + number: string + businessType: string + remark: string + reason: string + reasonCode: string + usageCode: string + usageDescription: string + departmentCode: string + status: string + autoCommit: string + autoAgree: string + autoExecute: string + extraProperties: string + siteId: string + requestTime: Date + dueTime: Date + concurrencyStamp: number + ruleUserId: number + serialNumber: string +} + +// 查询差异出库申请主列表 +export const getMainPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/difference-request-main/senior', data }) + } else { + return await request.get({ url: `/wms/difference-request-main/page`, params }) + } +} + +// 查询差异出库申请主详情 +export const getMain = async (id: number) => { + return await request.get({ url: `/wms/difference-request-main/get?id=` + id }) +} + +// 新增差异出库申请主 +export const createMain = async (data: DifferenceRequestMainVO) => { + return await request.post({ url: `/wms/difference-request-main/create`, data }) +} + +// 修改差异出库申请主 +export const updateMain = async (data: DifferenceRequestMainVO) => { + return await request.put({ url: `/wms/difference-request-main/update`, data }) +} + +// 删除差异出库申请主 +export const deleteMain = async (id: number) => { + return await request.delete({ url: `/wms/difference-request-main/delete?id=` + id }) +} + +// 导出差异出库申请主 Excel +export const exportMain = async (params) => { + return await request.download({ url: `/wms/difference-request-main/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/difference-request-main/get-import-template' }) +} + +// 关闭 +export const closeMain = async (id: number) => { + return await request.put({ url: `/wms/difference-request-main/close?id=` + id }) +} +// 提交 +export const submitMain = async (id: number) => { + return await request.put({ url: `/wms/difference-request-main/submit?id=` + id }) +} +// 处理 +export const handleMain = async (id: number) => { + return await request.put({ url: `/wms/difference-request-main/handle?id=` + id }) +} +// 审批通过 +export const agreeMain = async (id: number) => { + return await request.put({ url: `/wms/difference-request-main/agree?id=` + id }) +} +//审批拒绝 +export const abortMain = async (id: number) => { + return await request.put({ url: `/wms/difference-request-main/refused?id=` + id }) +} + diff --git a/src/views/wms/inventoryManage/balanceDifference/balance.data.ts b/src/views/wms/inventoryManage/balanceDifference/balance.data.ts new file mode 100644 index 000000000..8b1edc9c1 --- /dev/null +++ b/src/views/wms/inventoryManage/balanceDifference/balance.data.ts @@ -0,0 +1,853 @@ +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: true + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + hiddenSearchHigh: true,// 高级筛选中隐藏 + // isSearch: true + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + hiddenSearchHigh: true,// 高级筛选中隐藏 + // isSearch: true + }, + { + label: '物料类型', + field: 'itemType', + sort: 'custom', + dictType: DICT_TYPE.ITEM_TYPE, + dictClass: 'string', + isSearch: true, + table: { + width: 100 + } + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true + }, + { + label: '供应商批次', + field: 'altBatch', + sort: 'custom', + table: { + width: 150 + }, + isSearch: false, + isTable:false, + isDetail:false, + isForm:false + }, + { + 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: 'containerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable:false + // }, + { + label: '库存数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber' + } + }, + // { + // label: '器具号', + // field: 'containerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '库位代码', + field: 'locationCode', + sort: 'custom', + table: { + width: 150 + }, + // isSearch: true + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + } + }, + // { + // label: '库区类型', + // field: 'areaType', + // sort: 'custom', + // dictType: DICT_TYPE.AREA_TYPE, + // dictClass: 'string', + // isTable: true, + // table: { + // width: 150 + // } + // }, + + // { + // label: '仓库代码', + // field: 'warehouseCode', + // sort: 'custom', + // table: { + // width: 150 + // } + // }, + // { + // label: '库位组代码', + // field: 'locationGroupCode', + // sort: 'custom', + // table: { + // width: 150 + // } + // }, + // { + // label: '库区代码', + // field: 'areaCode', + // sort: 'custom', + // table: { + // width: 150 + // } + // }, + // { + // label: 'ERP库位代码', + // field: 'erpLocationCode', + // dictType: DICT_TYPE.ERP_LOCATION, + // dictClass: 'string', + // isTable: false, + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '替代批次', + // field: 'altBatch', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable: false, + // }, + // { + // label: '标准体积', + // field: 'standardVolume', + // sort: 'custom', + // form: { + // component: 'InputNumber', + // value: 0, + // componentProps: { + // min: 0, + // precision:2 + // } + // }, + // table:{ + // width: 120 + // } + // }, + // { + // 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: 'steelCoilNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // tableForm: { + // disabled: false + // }, + // isTable:false, + // isDetail:false, + // isForm:false + // }, + // { + // label: '炉号', + // field: 'heatNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // tableForm: { + // disabled: false + // }, + // isTable:false, + // isDetail:false, + // isForm:false + // }, + // { + // label: '热处理日期', + // field: 'heatTreatmentDate', + // formatter: dateFormatter2, + // detail: { + // dateFormat: 'YYYY-MM-DD' + // }, + // sort: 'custom', + // table: { + // width: 180 + // }, + // form: { + // component: 'DatePicker', + // componentProps: { + // style: {width: '100%'}, + // type: 'date', + // dateFormat: 'YYYY-MM-DD', + // valueFormat: 'x', + // } + // }, + // tableForm: { + // type: 'FormDate', + // dateFormat: 'YYYY-MM-DD', + // valueFormat: 'x', + // }, + // isTable:false, + // isDetail:false, + // isForm:false + // }, + // { + // label: '有效日期', + // field: 'effectiveDate', + // formatter: dateFormatter2, + // detail: { + // dateFormat: 'YYYY-MM-DD' + // }, + // sort: 'custom', + // table: { + // width: 180 + // }, + // form: { + // component: 'DatePicker', + // componentProps: { + // style: {width: '100%'}, + // type: 'date', + // dateFormat: 'YYYY-MM-DD', + // valueFormat: 'x', + // } + // }, + // tableForm: { + // type: 'FormDate', + // dateFormat: 'YYYY-MM-DD', + // valueFormat: 'x', + // }, + // isTable:false, + // isDetail:false, + // isForm:false + // }, + // { + // 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: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, + { + 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: 250, + // 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 MesRawMaterialConsumptionInfo = useCrudSchemas(reactive([ + + + + { + label: '物品代码', + field: 'itemCode', + sort: 'custom', + + isSearch: true + }, + { + label: '物品名称', + field: 'itemName', + sort: 'custom', + + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + + isSearch: true + }, + + { + label: 'DMC码', + field: 'dmcCode', + sort: 'custom', + + isSearch: true + }, + + { + label: '激光码', + field: 'laserCode', + sort: 'custom', + + isSearch: true + }, + { + label: '生产日期', + field: 'produceDate', + formatter: dateFormatter, + isSearch: true, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + + }, + +])) +// 表单校验 +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/balanceDifference/index.vue b/src/views/wms/inventoryManage/balanceDifference/index.vue new file mode 100644 index 000000000..53832e1db --- /dev/null +++ b/src/views/wms/inventoryManage/balanceDifference/index.vue @@ -0,0 +1,444 @@ + + + diff --git a/src/views/wms/inventoryManage/differenceRecord/differenceRecord.data.ts b/src/views/wms/inventoryManage/differenceRecord/differenceRecord.data.ts new file mode 100644 index 000000000..c00a24bd4 --- /dev/null +++ b/src/views/wms/inventoryManage/differenceRecord/differenceRecord.data.ts @@ -0,0 +1,195 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +// 表单校验 +export const DifferenceRecordMainRules = reactive({ + autoCommit: [required], + autoAgree: [required], + autoExecute: [required], + concurrencyStamp: [required] +}) + +export const DifferenceRecordMain = useCrudSchemas( + reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + isSearch: true, + table: { + width: 180, + // fixed: 'right' + } + }, + { + label: '申请单据号', + field: 'requestNumber', + sort: 'custom', + isSearch: true, + table: { + width: 180, + // fixed: 'right' + } + } + // { + // label: '申请时间', + // field: 'requestTime', + // sort: 'custom', + // formatter: dateFormatter, + // 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: { + // type: 'datetime', + // valueFormat: 'x' + // } + // } + // }, + // { + // label: '截止时间', + // field: 'dueTime', + // sort: 'custom', + // formatter: dateFormatter, + // // 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')] + // } + // }, + // form: { + // component: 'DatePicker', + // componentProps: { + // type: 'datetime', + // valueFormat: 'x' + // } + // } + // }, + ]) +) +// 表单校验 +export const DifferenceRecordDetailRules = reactive({ + batch: [required], + fromLocationCode: [required], + inventoryStatus: [required], + masterId: [required], + itemCode: [required], + concurrencyStamp: [required] +}) + +export const DifferenceRecordDetail = useCrudSchemas( + reactive([ + { + label: '物料代码', + field: 'itemCode', + sort: 'custom',table: { + width: 150 + }, + isSearch: true + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + }, + // { + // label: '物料类型', + // dictType: DICT_TYPE.ITEM_TYPE, + // field: 'itemType', + // // hiddenInMain: true, + // // isSearch: true, + // // tableForm: { + // // type: 'Select', + // // disabled: true + // // }, + // width: 100 + // }, + { + label: '出库数量', + field: 'qty', + sort: 'custom', + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + sort: 'custom', + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + isSearch: true + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + sort: 'custom', + form: { + component: 'Radio' + } + }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + 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')] + } + }, + isForm: false + } + ]) +) diff --git a/src/views/wms/inventoryManage/differenceRecord/index.vue b/src/views/wms/inventoryManage/differenceRecord/index.vue new file mode 100644 index 000000000..399f6b4b5 --- /dev/null +++ b/src/views/wms/inventoryManage/differenceRecord/index.vue @@ -0,0 +1,273 @@ + + + diff --git a/src/views/wms/inventoryManage/differenceRequest/differenceRequest.data.ts b/src/views/wms/inventoryManage/differenceRequest/differenceRequest.data.ts new file mode 100644 index 000000000..d251ad2e7 --- /dev/null +++ b/src/views/wms/inventoryManage/differenceRequest/differenceRequest.data.ts @@ -0,0 +1,342 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import * as LocationApi from '@/api/dbc/location' +import { Location } from '@/views/dbc/location/location.data' +import * as BalanceApi from '@/api/wms/balanceDifference' +import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' + +// 表单校验 +export const DifferenceRequestMainRules = reactive({ + // toLocationCode: [required] +}) + +export const DifferenceRequestMain = useCrudSchemas( + reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + isSearch: true, + isForm: false, + table: { + width: 200, + // fixed: 'right' + } + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + sort: 'custom', + isSearch: true, + isForm: false, + table: { + width: 100, + // fixed: 'right' + } + }, + // { + // label: '到库位代码', + // field: 'toLocationCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // // isSearch: true, + // isForm: false, + // isTable: false, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // enterSearch: false, + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择到库位代码', // 输入框占位文本 + // searchField: 'code', // 查询弹窗赋值字段 + // searchTitle: '到库位代码', // 查询弹窗标题 + // searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + // searchPage: LocationApi.selectBusinessTypeOutLocation, // 查询弹窗所需分页方法 + // searchCondition: [ + // { + // key: 'businessType', + // value: 'CustomerReject', + // isMainValue: false + // }, + // { + // key: 'isIn', + // value: 'in', + // isMainValue: false + // } + // ], + // verificationParams: [ + // { + // key: 'code', + // action: '==', + // value: '', + // isMainValue: false, + // isSearch: true, + // isFormModel: true + // } + // ] // 失去焦点校验参数 + // } + // } + // }, + ]) +) + +// 表单校验 +export const DifferenceRequestDetailRules = reactive({ + itemCode: [required] +}) + +export const DifferenceRequestDetail = useCrudSchemas( + reactive([ + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + isSearch: true, + table: { + width: 150 + }, + tableForm: { + multiple: true, //多选 + disabled: true, + isInpuFocusShow: false, // 开启查询弹窗 + searchListPlaceholder: '请输入包装号', + searchField: 'itemCode', + searchTitle: '库存余额信息', + searchAllSchemas: Balance.allSchemas, + searchPage: BalanceApi.getBalanceItemPage, + searchCondition: [ + { + key: 'available', + value: 'TRUE', + action: '==', + isSearch: true, + isMainValue: false + }, + { + key: 'businessType', + value: 'UnplannedDeliver', + action: '==', + isSearch: true, + isMainValue: false + }, + { + key: 'inOrOut', + value: 'out', + action: '==', + isSearch: true, + isMainValue: false + }, + { + key: 'locationCode', + value: 'DIFF', + action: '==', + isSearch: true, + isMainValue: false + } + ] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请输入包装号', + searchField: 'packingNumber', + searchTitle: '库存余额信息', + searchAllSchemas: Balance.allSchemas, + searchPage: BalanceApi.getBalanceItemPage, + searchCondition: [ + { + key: 'available', + value: 'TRUE', + action: '==', + isSearch: true, + isMainValue: false + }, + { + key: 'businessType', + value: 'UnplannedDeliver', + action: '==', + isSearch: true, + isMainValue: false + }, + { + key: 'inOrOut', + value: 'out', + action: '==', + isSearch: true, + isMainValue: false + },{ + key: 'locationCode', + value: 'DIFF', + action: '==', + isSearch: true, + isMainValue: false + } + ] + } + } + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + isSearch: true, + table: { + width: 150 + }, + tableForm: { + disabled: true + } + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + } + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + tableForm: { + disabled: true + } + }, + // { + // label: '物料类型', + // dictType: DICT_TYPE.ITEM_TYPE, + // field: 'itemType', + // // hiddenInMain: true, + // // isSearch: true, + // // tableForm: { + // // type: 'Select', + // // disabled: true + // // }, + // width: 100 + // }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: true + } + }, + { + label: '出库数量', + field: 'requestQty', + sort: 'custom', + tableForm: { + type: 'InputNumber', + componentProps: { + min: 0, + precision: 2 + } + } + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + isSearch: true, + tableForm: { + disabled: true + } + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + // isSearch: true, + tableForm: { + disabled: true + } + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + sort: 'custom', + // isSearch: true, + tableForm: { + type: 'Select', + disabled: true + } + }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + // isSearch: true + isTableForm: false, + tableForm: { + disabled: true + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + 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')] + } + }, + isTableForm: false, + isForm: false, + tableForm: { + disabled: true + } + }, + { + label: '创建人', + field: 'creator', + isForm: false, + isDetail: false, + isTableForm: false, + tableForm: { + disabled: true + } + }, + { + label: '操作', + field: 'action', + isForm: false, + isDetail: false, + table: { + width: 200, + fixed: 'right' + }, + isTableForm: false, + tableForm: { + disabled: true + } + } + ]) +) diff --git a/src/views/wms/inventoryManage/differenceRequest/index.vue b/src/views/wms/inventoryManage/differenceRequest/index.vue new file mode 100644 index 000000000..060191b22 --- /dev/null +++ b/src/views/wms/inventoryManage/differenceRequest/index.vue @@ -0,0 +1,476 @@ + + +