From 97d75c41a070b05e7e301e3df5a5dd0f7968cf22 Mon Sep 17 00:00:00 2001 From: chenfang Date: Fri, 8 Mar 2024 09:41:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=85=E8=A3=85=E8=A7=84=E6=A0=BC=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AD=97=E6=AE=B5=E7=88=B6=E5=8C=85=E8=A3=85?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../packageunit/packageunit.data.ts | 298 +++++++++++++++++- .../stockup/stockupMainRequest/index.vue | 61 +++- .../stockupMainRequest.data.ts | 240 +++++++++----- 3 files changed, 521 insertions(+), 78 deletions(-) diff --git a/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts b/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts index cec3bc81d..c81fe91d2 100644 --- a/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts +++ b/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts @@ -1,6 +1,274 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' import { fa } from 'element-plus/es/locale' +import * as PackageunitApi from '@/api/wms/packageunit' + +export const PackageunitCopy = useCrudSchemas(reactive([ + { + label: '包装代码', + field: 'code', + sort: 'custom', + isSearch: true, + table: { + width: 150 + }, + }, + { + label: '父包装代码', + field: 'parentCode', + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '包装名称', + field: 'name', + sort: 'custom', + isSearch: true, + table: { + width: 150 + }, + }, + { + label: '包装类型', + field: 'type', + dictType: DICT_TYPE.PACK_UNIT_TYPE, + dictClass: 'string', + sort: 'custom', + isSearch: true, + table: { + width: 150 + }, + }, + { + label: '长', + field: 'length', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '宽', + field: 'width', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '高', + field: 'height', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '重量', + field: 'weight', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '单位', + field: 'unit', + sort: 'custom', + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + table: { + width: 150 + }, + }, + { + label: '包装描述', + field: 'desc', + sort: 'custom', + isSearch: true, + table: { + width: 150 + }, + }, + { + label: '是否重复使用', + field: 'reuse', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + table: { + width: 150 + }, + }, + { + label: '是否管理包装库存', + field: 'manageBalance', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + table: { + width: 180 + }, + }, + { + label: '生效时间', + field: 'activeTime', + sort: 'custom', + table: { + width: 180 + }, + formatter: dateFormatter, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '失效时间', + field: 'expireTime', + sort: 'custom', + table: { + width: 180 + }, + formatter: dateFormatter, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + table: { + width: 180 + }, + formatter: dateFormatter, + isForm: false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '删除时间', + field: 'deletionTime', + sort: 'custom', + isForm: false, + isTable: false, + table: { + width: 180 + }, + formatter: dateFormatter, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '删除者', + field: 'deleterId', + sort: 'custom', + isForm: false, + isTable: false, + table: { + width: 150 + }, + }, + { + label: '扩展属性', + field: 'extraProperties', + sort: 'custom', + isForm: false, + isTable: false, + table: { + width: 150 + }, + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + isForm: false, + isTable: false, + table: { + width: 150 + }, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '地点', + field: 'siteId', + sort: 'custom', + isForm: false, + isTable: false, + table: { + width: 150 + }, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) export const Packageunit = useCrudSchemas(reactive([ { @@ -12,6 +280,33 @@ export const Packageunit = useCrudSchemas(reactive([ width: 150 }, }, + { + label: '父包装代码', + field: 'parentCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择父包装代码', + searchField: 'code', + searchTitle: '包装规格信息', + searchAllSchemas: PackageunitCopy.allSchemas, + searchPage: PackageunitApi.getCustomeritemPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'customerCode', + value: 'customerCode', + isMainValue: true + }] + } + } + }, { label: '包装名称', field: 'name', @@ -276,4 +571,5 @@ export const PackageunitRules = reactive({ { max: 50, message: '不得超过50个字符', trigger: 'blur' }, { required: true, message: '请输入包装描述', trigger: 'change' } ], -}) \ No newline at end of file +}) + diff --git a/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue b/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue index 29789db2e..4d7d0f5d8 100644 --- a/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue +++ b/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue @@ -28,7 +28,7 @@ v-model:sort="tableObject.sort" > @@ -44,14 +44,37 @@ @success="formsSuccess" :rules="StockupMainRequestRules" :formAllSchemas="StockupMainRequest.allSchemas" + :tableAllSchemas="StockupDetailRequest.allSchemas" + :tableFormRules="StockupDetailRequestRules" + :tableData="tableData" :apiUpdate="StockupMainRequestApi.updateStockupMainRequest" :apiCreate="StockupMainRequestApi.createStockupMainRequest" + :isBusiness="true" + fromeWhere="StockupMainRequest" + @handleAddTable="handleAddTable" + @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess" - :isBusiness="false" + @submitForm="formsSuccess" + :isShowButton = isShowButton /> - + @@ -59,8 +82,9 @@