diff --git a/src/api/wms/productionreturnRequestDetail/index.ts b/src/api/wms/productionreturnRequestDetail/index.ts index 66dd5921d..0b7bdd7c6 100644 --- a/src/api/wms/productionreturnRequestDetail/index.ts +++ b/src/api/wms/productionreturnRequestDetail/index.ts @@ -64,4 +64,9 @@ export const exportProductionreturnRequestDetail = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/productionreturn-request-detail/get-import-template' }) +} + +// 创建包装信息后更新子表数据packingNumber +export const updateDetailPackingNumber = async (id: number, number) => { + return await request.put({ url: '/wms/productionreturn-request-detail/updateDetailPackingNumber?id=' + id + '&number=' + number }) } \ No newline at end of file diff --git a/src/api/wms/productreceiptRequestDetail/index.ts b/src/api/wms/productreceiptRequestDetail/index.ts index 2a0430801..6f11ce799 100644 --- a/src/api/wms/productreceiptRequestDetail/index.ts +++ b/src/api/wms/productreceiptRequestDetail/index.ts @@ -69,4 +69,9 @@ export const exportProductreceiptRequestDetail = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/productreceipt-request-detail/get-import-template' }) -} \ No newline at end of file +} + +// 创建包装信息后更新子表数据packingNumber +export const updateDetailPackingNumber = async (id: number, number) => { + return await request.put({ url: '/wms/productreceipt-request-detail/updateDetailPackingNumber?id=' + id + '&number=' + number }) +} diff --git a/src/api/wms/productreceiptRequestMain/index.ts b/src/api/wms/productreceiptRequestMain/index.ts index 9a049f627..3934a8155 100644 --- a/src/api/wms/productreceiptRequestMain/index.ts +++ b/src/api/wms/productreceiptRequestMain/index.ts @@ -58,10 +58,45 @@ export const deleteProductreceiptRequestMain = async (id: number) => { // 导出制品收货申请主 Excel export const exportProductreceiptRequestMain = async (params) => { - return await request.download({ url: `/wms/productreceipt-request-main/export-excel`, params }) + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/productreceipt-request-main/export-excel-senior`, data }) + } else { + return await request.download({ url: `/wms/productreceipt-request-main/export-excel`, params }) + } } // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/productreceipt-request-main/get-import-template' }) } + +// 关闭 +export const close = (id) => { + return request.put({ url: '/wms/productreceipt-request-main/close?id=' + id }) +} + +// 重新添加 +export const reAdd = (id) => { + return request.put({ url: '/wms/productreceipt-request-main/reAdd?id=' + id }) +} + +// 提交审批 +export const submit = (id) => { + return request.put({ url: '/wms/productreceipt-request-main/submit?id=' + id }) +} + +// 驳回 +export const refused = (id) => { + return request.put({ url: '/wms/productreceipt-request-main/refused?id=' + id }) +} + +// 审批通过 +export const agree = (id) => { + return request.put({ url: '/wms/productreceipt-request-main/agree?id=' + id }) +} + +// 处理 +export const handle = (id) => { + return request.put({ url: '/wms/productreceipt-request-main/handle?id=' + id }) +} \ No newline at end of file diff --git a/src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue b/src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue index 2903750d2..4444c0470 100644 --- a/src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue +++ b/src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue @@ -77,11 +77,12 @@ const tableColumns = ref(Package.allSchemas.tableColumns) /** - * Package2 regularParams = procure采购件标签记录页面 - * Package3 regularParams = manufacture 制造件标签记录页面 - * Package4 regularParams = utensil 器具标签记录页面 + * PurchasePackage regularParams = procure采购件标签记录页面 + * ManufacturePackage regularParams = manufacture 制造件标签记录页面 + * UtensilPackage regularParams = utensil 器具标签记录页面 + * SupplierPackage regularParams = procure 供应商发货标签记录(用采购标签) */ -const regularParams = ref(route.name == 'Package2'?'procure':route.name == 'Package3'?'manufacture':route.name == 'Package4'?'utensil':'') + const regularParams = ref(route.name == 'PurchasePackage'?'procure':route.name == 'ManufacturePackage'?'manufacture':route.name == 'UtensilPackage'?'utensil':route.name == 'SupplierPackage'?'procure':'') // 字段设置 更新主列表字段 const updataTableColumns = (val) => { diff --git a/src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue b/src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue index d1759be6f..61a2347fe 100644 --- a/src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue +++ b/src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue @@ -77,11 +77,12 @@ const tableColumns = ref(Package.allSchemas.tableColumns) /** - * Package2 regularParams = procure采购件标签记录页面 - * Package3 regularParams = manufacture 制造件标签记录页面 - * Package4 regularParams = utensil 器具标签记录页面 + * PurchasePackage regularParams = procure采购件标签记录页面 + * ManufacturePackage regularParams = manufacture 制造件标签记录页面 + * UtensilPackage regularParams = utensil 器具标签记录页面 + * SupplierPackage regularParams = procure 供应商发货标签记录(用采购标签) */ -const regularParams = ref(route.name == 'Package2'?'procure':route.name == 'Package3'?'manufacture':route.name == 'Package4'?'utensil':'') +const regularParams = ref(route.name == 'PurchasePackage'?'procure':route.name == 'ManufacturePackage'?'manufacture':route.name == 'UtensilPackage'?'utensil':route.name == 'SupplierPackage'?'procure':'') // 字段设置 更新主列表字段 const updataTableColumns = (val) => { diff --git a/src/views/wms/basicDataManage/labelManage/utensilPackage/index.vue b/src/views/wms/basicDataManage/labelManage/utensilPackage/index.vue index 23f915255..b62e0bbf8 100644 --- a/src/views/wms/basicDataManage/labelManage/utensilPackage/index.vue +++ b/src/views/wms/basicDataManage/labelManage/utensilPackage/index.vue @@ -77,11 +77,12 @@ const tableColumns = ref(Package.allSchemas.tableColumns) /** - * Package2 regularParams = procure采购件标签记录页面 - * Package3 regularParams = manufacture 制造件标签记录页面 - * Package4 regularParams = utensil 器具标签记录页面 + * PurchasePackage regularParams = procure采购件标签记录页面 + * ManufacturePackage regularParams = manufacture 制造件标签记录页面 + * UtensilPackage regularParams = utensil 器具标签记录页面 + * SupplierPackage regularParams = procure 供应商发货标签记录(用采购标签) */ -const regularParams = ref(route.name == 'Package2'?'procure':route.name == 'Package3'?'manufacture':route.name == 'Package4'?'utensil':'') + const regularParams = ref(route.name == 'PurchasePackage'?'procure':route.name == 'ManufacturePackage'?'manufacture':route.name == 'UtensilPackage'?'utensil':route.name == 'SupplierPackage'?'procure':'') // 字段设置 更新主列表字段 const updataTableColumns = (val) => { diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue index 010f8a109..ade468c5e 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue @@ -348,6 +348,9 @@ const buttonTableClick = async (val, row) => { }) } else if (val == 'mainHandle') { // 处理 + if (row.packingNumber) { + isCreateLabel.value = true + } if (!isCreateLabel.value) { message.warning('请先创建标签') return @@ -453,6 +456,10 @@ const submitFormLabel = async (formType, data) => { try { detatableData.tableList.forEach(async (item) => { await PackageApi.createPackageLabel(item).then(res => { + if (res) { + // 更新申请子表数据包装号 + ProductionreturnRequestDetailApi.updateDetailPackingNumber(res.id,res.number) + } isCreateLabel.value = true message.success('创建标签成功') }).catch(err => { diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue index 945e41ed8..570fa03a8 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue @@ -69,8 +69,46 @@ :apiDelete="ProductreceiptRequestDetailApi.deleteProductreceiptRequestDetail" :Echo="Echo" @searchTableSuccessDetail="searchTableSuccessDetail" + :buttondataTable="buttondataTable" + @tableFormButton="tableFormButton" /> + + + + + + + + @@ -78,10 +116,15 @@ diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierPackage/supplierPackage.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierPackage/supplierPackage.data.ts new file mode 100644 index 000000000..c7d72ffcd --- /dev/null +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierPackage/supplierPackage.data.ts @@ -0,0 +1,420 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const PackageRules = reactive({ + number: [required], + itemCode: [required], + itemName: [required], +}) +export const Package2 = useCrudSchemas(reactive([ + { + label: '包装号', + field: 'number', + sort: 'custom', + isSearch: true, + table: { + width: 150, + fixed: 'left' + }, + }, +])) +export const Package = useCrudSchemas(reactive([ + { + label: '包装号', + field: 'number', + sort: 'custom', + isSearch: true, + table: { + width: 150, + fixed: 'left' + }, + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + isSearch: true, + table: { + width: 150, + }, + }, + { + label: '物品名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '物品描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '物品描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + isSearch: true, + table: { + width: 150, + }, + }, + { + label: '替代批次', + field: 'altBatch', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '生产日期', + field: 'produceDate', + sort: 'custom', + formatter: dateFormatter, + search: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + 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' + } + }, + table: { + width: 180, + }, + }, + { + label: '有效期(日)', + field: 'validityDays', + sort: 'custom', + form: { + component: 'InputNumber', + componentProps: { + min: 0 + }, + value: 0 + }, + table: { + width: 150, + }, + }, + { + label: '失效日期', + field: 'expireDate', + sort: 'custom', + formatter: dateFormatter, + search: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + 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' + } + }, + table: { + width: 180, + }, + }, + { + label: '计量单位', + field: 'uom', + sort: 'custom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + form: { + component: 'SelectV2' + }, + table: { + width: 150, + }, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '替代计量单位', + field: 'altUom', + sort: 'custom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + form: { + component: 'SelectV2' + }, + table: { + width: 150, + }, + }, + { + label: '替代数量', + field: 'altQty', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '转换率', + field: 'convertRate', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '标包数量', + field: 'stdPackQty', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '标包单位', + field: 'stdPackUnit', + sort: 'custom', + dictType: DICT_TYPE.PACK_UNIT, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + form: { + component: 'SelectV2' + }, + table: { + width: 150, + }, + }, + { + label: '仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '月台代码', + field: 'toDockCode', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '供应商代码', + field: 'supplierCode', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '供应商物品代码', + field: 'supplierItemCode', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '采购订单号', + field: 'poNumber', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '采购订单行', + field: 'poLine', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '采购计划单号', + field: 'rpNumber', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '发货单号', + field: 'asnNumber', + sort: 'custom', + table: { + width: 182, + }, + }, + { + label: '生产订单号', + field: 'woNumber', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '生产订单行', + field: 'woLine', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '生产线代码', + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '班组代码', + field: 'teamCode', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '班次代码', + field: 'shiftCode', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '客户代码', + field: 'customerCode', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '客户月台代码', + field: 'customerDockCode', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '客户物品代码', + field: 'customerItemCode', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '销售订单号', + field: 'soNumber', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '销售订单行', + field: 'soLine', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '质量等级', + field: 'eqLevel', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '货主代码', + field: 'ownerCode', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '重量', + field: 'weight', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '面积', + field: 'area', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '体积', + field: 'volume', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +]))