From 5ab59d68b27ff439aa1a946ee66735a3f29f4301 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E8=99=B9=E7=9D=BF?= <297504645@qq.com> Date: Tue, 9 May 2023 16:50:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=86=E5=88=86=E7=AE=B1=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fe/PC/src/mixins/printMixin.js | 68 ++++ fe/PC/src/router/index.js | 12 +- .../PartiallyPreparedProducts/splitLabels.vue | 381 ++++++++++++++++++ 3 files changed, 455 insertions(+), 6 deletions(-) create mode 100644 fe/PC/src/views/labelManage/PartiallyPreparedProducts/splitLabels.vue diff --git a/fe/PC/src/mixins/printMixin.js b/fe/PC/src/mixins/printMixin.js index 070b5d970..c3964a473 100644 --- a/fe/PC/src/mixins/printMixin.js +++ b/fe/PC/src/mixins/printMixin.js @@ -55,6 +55,74 @@ export function initPrintPackingCodeData(propsData,options,name,url){ return data } +//打印【箱标签-上下2个】(xiangbq_two.rdlx) +//使用位置:拆分箱标签 (splitLabels.vue) +/** + * @param {*} propsData 必填 详情数据 示例:this.propsData + * @param {*} options 自定义特殊配置值 示例:{'number':'poNumber'} (number值将传为poNumber) + * @param {*} name reportName + * @param {*} url dataUrl + * @returns + */ +export function initPrintPackingCodeTwoData(oldData,newData,options,name,url){ + if(!oldData && !newData)return {} + let _printData = {} + let _options = options ? options : {} + // 上方信息 + if(oldData){ + _printData={ + "oldTitle":oldData[_options.title] || oldData.title || "FATY 物品发运单",//上方_title + "oldSupplierSimpleName": oldData[_options.supplierSimpleName] || oldData.supplierSimpleName,//上方_供应商名称 + "oldSupplierCode": oldData[_options.supplierCode] || oldData.supplierCode,//上方_供应商代码 + "oldPoNumber": oldData[_options.poNumber] || oldData.poNumber,//上方_订单号 + "oldAsnNumber": oldData[_options.asnNumber] || oldData.asnNumber,//上方_发货单号 + "oldRemark": oldData[_options.remark] || oldData.remark,//上方_备注 + "oldPlanArriveDate":oldData[_options.planArriveDate] || oldData.planArriveDate,//上方_要求到货时间 + "oldSupplierItemName": oldData[_options.supplierItemName] || oldData.supplierItemName,//上方_零件名(供应商零件名) + "oldSupplierItemCode": oldData[_options.supplierItemCode] || oldData.supplierItemCode,//上方_零件号(供应商零件号) + "oldSpecifications": oldData[_options.specifications] || oldData.specifications,//上方_规格 + "oldProduceDate": oldData[_options.produceDate] || oldData.produceDate,//上方_生产时间 + "oldLot": oldData[_options.lot] || oldData.lot,//上方_生产批次 + "oldLocationErpCode": oldData[_options.locationErpCode] || oldData.locationErpCode,//上方_储位 + "oldItemCode": oldData[_options.itemCode] || oldData.itemCode,//上方_物品代码(ERP号) + "oldQty": oldData[_options.qty] || oldData.qty,//上方_要货数量 + 整包数量 + "oldPackingCode": oldData[_options.packingCode] || oldData.packingCode,//上方_条形码 + "oldPrintIndex":oldData[_options.printIndex] || 1,//上方_打印序列 + ..._printData + } + } + // 下方信息 + if(newData){ + _printData={ + "newTitle":newData[_options.title] || newData.title || "FATY 物品发运单",//下方_title + "newSupplierSimpleName": newData[_options.supplierSimpleName] || newData.supplierSimpleName,//下方_供应商名称 + "newSupplierCode": newData[_options.supplierCode] || newData.supplierCode,//下方_供应商代码 + "newPoNumber": newData[_options.poNumber] || newData.poNumber,//下方_订单号 + "newAsnNumber": newData[_options.asnNumber] || newData.asnNumber,//下方_发货单号 + "newRemark": newData[_options.remark] || newData.remark,//下方_备注 + "newPlanArriveDate":newData[_options.planArriveDate] || newData.planArriveDate,//下方_要求到货时间 + "newSupplierItemName": newData[_options.supplierItemName] || newData.supplierItemName,//下方_零件名(供应商零件名) + "newSupplierItemCode": newData[_options.supplierItemCode] || newData.supplierItemCode,//下方_零件号(供应商零件号) + "newSpecifications": newData[_options.specifications] || newData.specifications,//下方_规格 + "newProduceDate": newData[_options.produceDate] || newData.produceDate,//下方_生产时间 + "newLot": newData[_options.lot] || newData.lot,//下方_生产批次 + "newLocationErpCode": newData[_options.locationErpCode] || newData.locationErpCode,//下方_储位 + "newItemCode": newData[_options.itemCode] || newData.itemCode,//下方_物品代码(ERP号) + "newQty": newData[_options.qty] || newData.qty,//下方_要货数量 + 整包数量 + "newPackingCode": newData[_options.packingCode] || newData.packingCode,//下方_条形码 + "newPrintIndex":newData[_options.printIndex] || 1,//下方_打印序列 + ..._printData + } + } + let data = { + reportName: name || 'xiangbq_two.rdlx', + dataUrl: url || 'ccc', + jsonData: JSON.stringify(_printData) + }; + return data +} + + // 打印【箱标签-单页4个】 (xiangbq_many.rdlx) // 使用位置:半成品上架标签 (PartiallyPreparedProducts.vue) | 生产退库标签 (productionReturnLabel.vue) // | 创建标签 (RecycledMaterialsLabel.vue) | 到货请求 (PurchaseReceiptRequest.vue) diff --git a/fe/PC/src/router/index.js b/fe/PC/src/router/index.js index bad618de2..1464badd1 100644 --- a/fe/PC/src/router/index.js +++ b/fe/PC/src/router/index.js @@ -138,15 +138,15 @@ export const constantRoutes = [ // { // path: '/', // component: Layout, - // redirect: '/_dashboard', + // redirect: '/splitLabels', // hidden: true, // children: [{ - // path: '_dashboard', - // component: () => import('@/views/dashboard/_index'), - // name: '_dashboard', + // path: 'splitLabels', + // component: () => import('@/views/labelManage/PartiallyPreparedProducts/splitLabels.vue'), + // name: 'splitLabels', // meta: { - // title: '_dashboard', - // icon: '系统首页', + // title: 'splitLabels', + // icon: '拆分箱标签', // } // }] // }, diff --git a/fe/PC/src/views/labelManage/PartiallyPreparedProducts/splitLabels.vue b/fe/PC/src/views/labelManage/PartiallyPreparedProducts/splitLabels.vue new file mode 100644 index 000000000..413acf48d --- /dev/null +++ b/fe/PC/src/views/labelManage/PartiallyPreparedProducts/splitLabels.vue @@ -0,0 +1,381 @@ + + + + + + + + + + + + + + + 返回 + 打印 + + + + + + + + + \ No newline at end of file