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 @@