333
schangxiang@126.com
2025-09-19 18966e02fb573c7e2bb0c6426ed792b38b910940
1
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-72fd"],{NPwc:function(e,t,a){"use strict";a.r(t);var n=a("FyfS"),r=a.n(n),l=a("GQeE"),o=a.n(l),i=a("t2rG"),s=a.n(i),c=a("qYYa"),d=a("q+Mi"),p=a("suWR"),u=a.n(p),f={name:"PrintBase",components:{Draggable:s.a,DraggableResizable:c.a,VueBarcode:d.a,VueQrcode:u.a},data:function(){return{BASE_API:"http://192.168.0.189",config:{pickOrder_fields:[],pickOrder_fontSize:18,pickOrder_productName_length:20},isFullContainerLoad:!1,barcodeOptions:{format:"CODE128",width:1.5,height:30,displayValue:!0,text:"",fontOptions:"",font:"monospace",textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:14,background:"#ffffff",lineColor:"#000000",marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,flat:null},dataList:[]}},computed:{showCol:function(){var e=this;return function(t){return e.config.pickOrder_fields.some(function(e){return e===t})}}},created:function(){this.getConfig(),this.loadModuleData()},methods:{getConfig:function(){var e=this,t={keys:o()(this.config).join(",")};this.common.ajax("/api/sys/param/getConfig",t,function(t){e.common.showMsg(t),t.data.forEach(function(t){var a=t.value03;e.common.isNumber(t.value03)&&(a=parseInt(t.value03)),"pickOrder_fields"===t.value02?(e.config.pickOrder_fields=a?a.split(","):[],e.config.pickOrder_fields.forEach(function(t,a){e.config.pickOrder_fields[a]=t})):e.$set(e.config,t.value02,a)})},this.$refs.container)},loadModuleData:function(){var e=this,t={ids:this.$route.params.ids.split(",")};this.common.ajax("/api/outbound/orderPrint/printPickBill2",t,function(t){if(e.common.showMsg(t),t.result){e.dataList=t.data;var a=!0,n=!1,l=void 0;try{for(var o,i=r()(e.dataList);!(a=(o=i.next()).done);a=!0){var s=o.value;e.getSpanArr(s)}}catch(e){n=!0,l=e}finally{try{!a&&i.return&&i.return()}finally{if(n)throw l}}}},!0)},produceDateFormater:function(e,t){return this.common.formatDate(e.produceDate,"yyyy-MM-dd")},printBill:function(){window.print()},getSpanArr:function(e){var t=!0,a=!1,n=void 0;try{for(var l,o=r()([{fieldName:"positionName",label:"货位",isSum:!1},{fieldName:"productModel",label:"条形码",isSum:!1},{fieldName:"productName",label:"物料名称",isSum:!1},{fieldName:"productSpec",label:"物料规格",isSum:!1},{fieldName:"smallUnit",label:"小单位",isSum:!1},{fieldName:"quantityOrderOrign",label:"拣货数量",isSum:!0}]);!(t=(l=o.next()).done);t=!0){var i=l.value;this.getSpanArrSub(i,e)}}catch(e){a=!0,n=e}finally{try{!t&&o.return&&o.return()}finally{if(a)throw n}}},getSpanArrSub:function(e,t){for(var a=t.details,n=[],r=0,l=0;l<a.length;l++)if(0===l){var o={pos:r=0,colSpan:1};e.isSum&&(o.spanTotal=a[l][e.fieldName]),n.push(o)}else if(a[l].positionName===a[l-1].positionName&&a[l].productModel===a[l-1].productModel&&a[l].productName===a[l-1].productName&&a[l].productSpec===a[l-1].productSpec){var i=n.find(function(e){return e.pos===r});e.isSum&&(i.spanTotal+=a[l][e.fieldName]),i.colSpan+=1;n.push({pos:-1,colSpan:0})}else{var s={pos:++r,colSpan:1};e.isSum&&(s.spanTotal=a[l][e.fieldName]),n.push(s)}t.spanArr||(t.spanArr=[]),t.spanArr.push({fieldName:e.fieldName,label:e.label,spanList:n})},objectSpanMethod:function(e,t){var a=t.column,n=t.rowIndex;if("货位"===a.label||"物料名称"===a.label||"条形码"===a.label||"物料规格"===a.label||"小单位"===a.label||"拣货数量"===a.label){var r=e.spanArr.find(function(e){return e.label===a.label});if(r){var l=r.spanList[n].colSpan;return{rowspan:l,colspan:l>0?1:0}}return{rowspan:1,colspan:1}}return{rowspan:1,colspan:1}},showSubTitle:function(e){return e.printInfo.subBatch?e.printInfo.areaCode+"区":e.printInfo.isFullContainerLoad?"整拣":"零拣"}}},m=(a("z8oY"),a("KHd+")),v=Object(m.a)(f,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{ref:"container",staticClass:"print-list-container"},[e._l(e.dataList,function(t,n){return a("div",{key:n,staticClass:"canvas-container page-next"},[a("h1",[e._v("出库拣配单( "+e._s(e.showSubTitle(t))+")")]),e._v(" "),a("div",{staticClass:"canvas-content"},[a("div",{staticClass:"barcode-box"},[a("vue-barcode",{attrs:{value:t.printInfo.orderPrintCode,options:e.barcodeOptions}})],1),e._v(" "),a("el-row",{staticClass:"header"},[a("div",{staticClass:"col"},[a("span",{staticClass:"title"},[e._v("波次号:")]),e._v(" "),a("span",{staticClass:"value"},[e._v(e._s(t.printInfo.orderPrintCode))])]),e._v(" "),a("div",{staticClass:"col"},[a("span",{staticClass:"title"},[e._v("货主:")]),e._v(" "),a("span",{staticClass:"value"},[e._v(e._s(t.printInfo.consignorName))])]),e._v(" "),a("div",{staticClass:"col"},[a("span",{staticClass:"title"},[e._v("仓库:")]),e._v(" "),a("span",{staticClass:"value"},[e._v(e._s(t.printInfo.storageName))])]),e._v(" "),a("div",{staticClass:"col"},[a("span",{staticClass:"title"},[e._v("时间:")]),e._v(" "),a("span",{staticClass:"value"},[e._v(e._s(e.common.formatDate(t.printInfo.createDate,"yyyy-MM-dd HH:mm:ss")))])]),e._v(" "),a("div",{staticClass:"col"},[a("span",{staticClass:"title"},[e._v("创建人:")]),e._v(" "),a("span",{staticClass:"value"},[e._v(e._s(t.printInfo.creator))])]),e._v(" "),a("div",{staticClass:"col"},[a("span",{staticClass:"title"},[e._v("订单数:")]),e._v(" "),a("span",{staticClass:"value"},[e._v(e._s(t.printInfo.orderCount))])])]),e._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.details,"span-method":function(a){return e.objectSpanMethod(t,a)},border:""}},[e.showCol("positionName")?a("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"positionName",label:"货位",width:"100"}}):e._e(),e._v(" "),e.showCol("productModel")?a("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"productModel",label:"条形码",width:"120"}}):e._e(),e._v(" "),e.showCol("productName")?a("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"productName",label:"物料名称"}}):e._e(),e._v(" "),e.showCol("productSpec")?a("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"productSpec",label:"物料规格",width:"70"}}):e._e(),e._v(" "),e.showCol("smallUnit")?a("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"smallUnit",label:"小单位",width:"60"}}):e._e(),e._v(" "),e.showCol("bigUnit")?a("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"bigUnit",label:"大单位",width:"60"}}):e._e(),e._v(" "),e.showCol("quantityOrderOrign")?a("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"quantityOrderOrign",label:"拣货数量",width:"70"},scopedSlots:e._u([{key:"default",fn:function(a){return[e._v("\n            "+e._s(t.spanArr.find(function(e){return"拣货数量"===e.label}).spanList[a.$index].spanTotal)+"\n          ")]}}],null,!0)}):e._e(),e._v(" "),e.showCol("allotPositionName")?a("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"allotPositionName",label:"配货位",width:"60"}}):e._e(),e._v(" "),e.showCol("allotQty")?a("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"quantityOrderOrign",label:"配货数量",width:"70"}}):e._e(),e._v(" "),e.showCol("orderCode")?a("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"orderCode",label:"销售订单",width:"125"}}):e._e(),e._v(" "),e.showCol("storeOrderCode")?a("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"storeOrderCode",label:"店铺单号 ",width:"120"}}):e._e(),e._v(" "),e.showCol("produceDate")?a("el-table-column",{attrs:{formatter:e.produceDateFormater,"header-align":"center",align:"center",prop:"produceDate",label:"生产日期"}}):e._e(),e._v(" "),e.showCol("remark")?a("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"remark",label:"订单备注"}}):e._e(),e._v(" "),e.showCol("salePrice")?a("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"salePrice",label:"售价",width:"70"}}):e._e(),e._v(" "),e.showCol("rowTotal")?a("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"rowTotal",label:"金额",width:"70"}}):e._e(),e._v(" "),e.showCol("giftMessage")?a("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"giftMessage",label:"客户留言"}}):e._e()],1)],1)])}),e._v(" "),a("el-form",{staticClass:"form padding-20 no-print"},[a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:e.printBill}},[e._v("打印")])],1)],1)],2)},[],!1,null,"f19c6e56",null);v.options.__file="order-pick-bill-print.vue";t.default=v.exports},xSzV:function(e,t,a){},z8oY:function(e,t,a){"use strict";var n=a("xSzV");a.n(n).a}}]);