From e2265c678fe520841dd0096da6007a1d84ec8724 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Wed, 20 Dec 2023 16:55:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E5=93=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wms/moveManage/itemChange/index.vue | 226 ++++++++ .../moveManage/itemChange/itemChange.data.ts | 484 ++++++++++++++++++ .../productdismantleRequestMain/index.vue | 8 + 3 files changed, 718 insertions(+) create mode 100644 src/views/wms/moveManage/itemChange/index.vue create mode 100644 src/views/wms/moveManage/itemChange/itemChange.data.ts diff --git a/src/views/wms/moveManage/itemChange/index.vue b/src/views/wms/moveManage/itemChange/index.vue new file mode 100644 index 000000000..122b9ecaf --- /dev/null +++ b/src/views/wms/moveManage/itemChange/index.vue @@ -0,0 +1,226 @@ + + + \ No newline at end of file diff --git a/src/views/wms/moveManage/itemChange/itemChange.data.ts b/src/views/wms/moveManage/itemChange/itemChange.data.ts new file mode 100644 index 000000000..55c74cbca --- /dev/null +++ b/src/views/wms/moveManage/itemChange/itemChange.data.ts @@ -0,0 +1,484 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +import * as OwnerApi from '@/api/wms/owner' +import { Owner } from '@/views/wms/basicDataManage/orderManage/owner/owner.data' + +/** + * @returns {Array} 物品调整 + */ +export const ItemChange = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + isForm: false, + isTableForm: false, + isTable: false + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + isSearch: true, + }, + // 可修改 + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + isSearch: true, + }, + { + label: '器具代码', + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, + // 可修改 + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + precision: 6 + } + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, + { + label: '库位代码', + field: 'locationCode', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + isSearch: true, + }, + { + label: '仓库代码', + field: 'warehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, + // 可修改 + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '库位组代码', + field: 'locationGroupCode', + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, + { + label: '库区代码', + field: 'areaCode', + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, + { + label: 'ERP库位代码', + field: 'erpLocationCode', + dictType: DICT_TYPE.ERP_LOCATION, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, + { + label: '替代批次', + field: 'altBatch', + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, + { + label: '到货日期', + field: 'arriveDate', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + } + }, + isForm: false + }, + { + label: '生产日期', + field: 'produceDate', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + } + }, + isForm: false + }, + // 可修改 + { + label: '失效日期', + field: 'expireDate', + 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: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + } + }, + // 可修改 + { + label: '货主代码', + field: 'ownerCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择货主代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '货主信息', // 查询弹窗标题 + searchAllSchemas: Owner.allSchemas, // 查询弹窗所需类 + searchPage: OwnerApi.getOwnerPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: '锁定数量', + field: 'lockedQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + isForm: false + }, + { + label: '可用数量', + field: 'usableQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + isForm: false + }, + { + label: '单价', + field: 'singlePrice', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + isForm: false + }, + { + label: '金额', + field: 'amount', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + isForm: false + }, + { + 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', + } + }, + isForm: false + }, + { + 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' + } + }, + isForm: false + }, + { + label: '冻结原因', + field: 'frozenReason', + dictType: DICT_TYPE.FROZEN_REASON, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, + { + label: '重量', + field: 'weight', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + isForm: false + }, + { + label: '面积', + field: 'area', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + isForm: false + }, + { + label: '体积', + field: 'volume', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, + isForm: false + }, + { + label: '最后事务号', + field: 'lastTransNumber', + 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 + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, + { + 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, + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 100, + fixed: 'right' + }, + } +])) + +// 表单校验 +export const ItemChangeRules = 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' } + // ], +}) \ No newline at end of file diff --git a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue index 6e24cfdd2..8f8d020c2 100644 --- a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue +++ b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue @@ -180,7 +180,15 @@ const buttonOperationClick = async (row, label, index)=> { DialogTitle.value = '物品代码:【' + row.itemCode + '】 Bom 信息' bomModelVisible.value = true await getDetailListBom() + // console.log(183, detatableDataBom.tableList) detatableDataBom.tableList.map(item => { + // TODO: 需要限制 最大输入数 由于不同条数,统一应用一个配置,需要详细分析之后再做修改 + // 修改 tableform 属性 + // BomDismantle.allSchemas.tableFormColumns.map(itemColumns => { + // if(itemColumns.field == 'qty') { + // itemColumns.tableForm.max = item.qty + // } + // }) item.rowId = index if(tableData.value[index].childList) { tableData.value[index].childList.forEach(itemChild => {