333
schangxiang@126.com
2025-09-19 18966e02fb573c7e2bb0c6426ed792b38b910940
1
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-07b5"],{"14Xm":function(t,e,r){t.exports=r("cSMa")},"4VR8":function(t,e,r){},"9y9p":function(module,__webpack_exports__,__webpack_require__){"use strict";var babel_runtime_core_js_promise__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("4d7F"),babel_runtime_core_js_promise__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(babel_runtime_core_js_promise__WEBPACK_IMPORTED_MODULE_0__),babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("14Xm"),babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__),babel_runtime_core_js_get_iterator__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("FyfS"),babel_runtime_core_js_get_iterator__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(babel_runtime_core_js_get_iterator__WEBPACK_IMPORTED_MODULE_2__),babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("D3Ub"),babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__),_xkeshi_vue_barcode__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("q+Mi");__webpack_exports__.a={name:"PrintBarcode",components:{barcode:_xkeshi_vue_barcode__WEBPACK_IMPORTED_MODULE_4__.a},data:function(){return{LODOP:null}},mounted:function(){this.init()},methods:{init:function init(){var _this=this;return babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3___default()(babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(){var printType,columList,code,LODOP,isIE,LODOP_OBJ,LODOP_EM,positionNames,_iteratorNormalCompletion,_didIteratorError,_iteratorError,_iterator,_step,positionName,_code,key,value,tableData,_tableData,_iteratorNormalCompletion2,_didIteratorError2,_iteratorError2,_iterator2,_step2,item,productInfo;return babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:return printType=localStorage.getItem("printType"),_context.next=3,_this.getColumnList();case 3:return columList=_context.sent,_context.next=6,_this.getLodopTemplate(printType);case 6:if(code=_context.sent,code||(code="{}"),LODOP=null,isIE=navigator.userAgent.indexOf("MSIE")>=0||navigator.userAgent.indexOf("Trident")>=0,LODOP_OBJ=document.getElementById("LODOP"),LODOP_EM=document.getElementById("LODOP_EM"),LODOP=isIE?LODOP_OBJ:LODOP_EM,_this.LODOP=LODOP,LODOP.SET_LICENSES("达令心潮(北京)商贸有限公司","B95259F540E2C256132EC7CE6AB55737","",""),"货位条码打印"!==printType){_context.next=38;break}for(positionNames=localStorage.getItem("positionNames").split(","),_iteratorNormalCompletion=!0,_didIteratorError=!1,_iteratorError=void 0,_context.prev=20,_iterator=babel_runtime_core_js_get_iterator__WEBPACK_IMPORTED_MODULE_2___default()(positionNames);!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=!0)positionName=_step.value,LODOP.NewPage(),_code=code.replace("PRINT_INITA(0,","SET_PRINT_PAGESIZE("),key="{货位名称}",value=positionName,_code=_code.replace(key,value),eval(_code);_context.next=28;break;case 24:_context.prev=24,_context.t0=_context.catch(20),_didIteratorError=!0,_iteratorError=_context.t0;case 28:_context.prev=28,_context.prev=29,!_iteratorNormalCompletion&&_iterator.return&&_iterator.return();case 31:if(_context.prev=31,!_didIteratorError){_context.next=34;break}throw _iteratorError;case 34:return _context.finish(31);case 35:return _context.finish(28);case 36:_context.next=71;break;case 38:if(tableData=localStorage.getItem("tableData"),tableData){_context.next=42;break}return _this.$message.error("没有可生成的数据"),_context.abrupt("return");case 42:_tableData=JSON.parse(tableData),_iteratorNormalCompletion2=!0,_didIteratorError2=!1,_iteratorError2=void 0,_context.prev=46,_iterator2=babel_runtime_core_js_get_iterator__WEBPACK_IMPORTED_MODULE_2___default()(_tableData);case 48:if(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done){_context.next=57;break}return item=_step2.value,_context.next=52,_this.getProductInfo(item.product_Id);case 52:productInfo=_context.sent,_this.createBarcode(LODOP,item,code,columList,productInfo);case 54:_iteratorNormalCompletion2=!0,_context.next=48;break;case 57:_context.next=63;break;case 59:_context.prev=59,_context.t1=_context.catch(46),_didIteratorError2=!0,_iteratorError2=_context.t1;case 63:_context.prev=63,_context.prev=64,!_iteratorNormalCompletion2&&_iterator2.return&&_iterator2.return();case 66:if(_context.prev=66,!_didIteratorError2){_context.next=69;break}throw _iteratorError2;case 69:return _context.finish(66);case 70:return _context.finish(63);case 71:LODOP.SET_SHOW_MODE("PREVIEW_IN_BROWSE",!0),LODOP.PREVIEW();case 73:case"end":return _context.stop()}},_callee,_this,[[20,24,28,36],[29,,31,35],[46,59,63,71],[64,,66,70]])}))()},getColumnList:function(){var t=this;return new babel_runtime_core_js_promise__WEBPACK_IMPORTED_MODULE_0___default.a(function(e,r){t.common.ajax("/api/sys/print/getColumnList",{},function(o){t.common.showMsg(o),o.result?e(o.data):r()},!0)})},getLodopTemplate:function(t){var e=this;return new babel_runtime_core_js_promise__WEBPACK_IMPORTED_MODULE_0___default.a(function(r,o){var n={sendBillName:t};e.common.ajax("/api/sys/print/getLodopTemplate",n,function(t){e.common.showMsg(t),t.result?r(t.data.designConent):o()},!0)})},getProductInfo:function(t){var e=this;return new babel_runtime_core_js_promise__WEBPACK_IMPORTED_MODULE_0___default.a(function(r,o){var n={id:t};e.common.ajax("/api/basicInfo/base/productInfo/getById",n,function(t){e.common.showMsg(t),t.result?r(t.data):o()},!0)})},createBarcode:function createBarcode(LODOP,item,code,columList,productInfo){for(var _this5=this,_loop=function _loop(i){LODOP.NewPage();var _code=code.replace("PRINT_INITA(0,","SET_PRINT_PAGESIZE("),_iteratorNormalCompletion3=!0,_didIteratorError3=!1,_iteratorError3=void 0;try{for(var _iterator3=babel_runtime_core_js_get_iterator__WEBPACK_IMPORTED_MODULE_2___default()(columList),_step3;!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=!0){var colInfo=_step3.value,key="{"+colInfo.columnComment+"}",columnName=_this5.common.caseStyle(colInfo.columnName),value=item[columnName]||(productInfo?productInfo[columnName]:"");_code=_code.replace(key,value)}}catch(t){_didIteratorError3=!0,_iteratorError3=t}finally{try{!_iteratorNormalCompletion3&&_iterator3.return&&_iterator3.return()}finally{if(_didIteratorError3)throw _iteratorError3}}var keyValues=localStorage.getItem("keyValues");keyValues&&(keyValues=JSON.parse(keyValues),keyValues.forEach(function(t){var e="{"+t.key+"}",r=t.value;_code=_code.replace(e,r)})),eval(_code)},i=0;i<item.quantity;i++)_loop(i)},print:function(){this.LODOP.PRINT()},setting:function(){window.open("/#/inbound/purchase/print-barcode-setting")}}}},D3Ub:function(t,e,r){"use strict";e.__esModule=!0;var o=function(t){return t&&t.__esModule?t:{default:t}}(r("4d7F"));e.default=function(t){return function(){var e=t.apply(this,arguments);return new o.default(function(t,r){return function n(a,i){try{var _=e[a](i),c=_.value}catch(t){return void r(t)}if(!_.done)return o.default.resolve(c).then(function(t){n("next",t)},function(t){n("throw",t)});t(c)}("next")})}}},cSMa:function(t,e,r){var o=function(){return this}()||Function("return this")(),n=o.regeneratorRuntime&&Object.getOwnPropertyNames(o).indexOf("regeneratorRuntime")>=0,a=n&&o.regeneratorRuntime;if(o.regeneratorRuntime=void 0,t.exports=r("u4eC"),n)o.regeneratorRuntime=a;else try{delete o.regeneratorRuntime}catch(t){o.regeneratorRuntime=void 0}},ibbC:function(t,e,r){"use strict";var o=r("4VR8");r.n(o).a},tzO6:function(t,e,r){"use strict";r.r(e);var o=r("9y9p").a,n=(r("ibbC"),r("KHd+")),a=Object(n.a)(o,function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"print-container"},[this._m(0),this._v(" "),e("el-button",{staticClass:"no-print",attrs:{type:"primary"},on:{click:this.print}},[this._v("打印")]),this._v(" "),e("el-button",{staticClass:"no-print",attrs:{type:"primary"},on:{click:this.setting}},[this._v("设置模板")])],1)},[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"margin-bottom-20"},[e("object",{attrs:{id:"LODOP",classid:"clsid:2105C259-1E0C-4534-8141-A753534CB4CA",width:"800",height:"600"}},[e("param",{attrs:{name:"Caption",value:"显示区"}}),this._v(" "),e("param",{attrs:{name:"Border",value:"0"}}),this._v(" "),e("param",{attrs:{name:"Color",value:"white"}}),this._v(" "),e("embed",{attrs:{id:"LODOP_EM",type:"application/x-print-lodop",width:"800",height:"600",pluginspage:"/upload/install_lodop32.exe"}})])])}],!1,null,"ef48cc62",null);a.options.__file="print-barcode.vue";e.default=a.exports},u4eC:function(t,e){!function(e){"use strict";var r,o=Object.prototype,n=o.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",_=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag",u="object"==typeof t,s=e.regeneratorRuntime;if(s)u&&(t.exports=s);else{(s=e.regeneratorRuntime=u?t.exports:{}).wrap=O;var l="suspendedStart",p="suspendedYield",f="executing",h="completed",m={},d={};d[i]=function(){return this};var E=Object.getPrototypeOf,v=E&&E(E(T([])));v&&v!==o&&n.call(v,i)&&(d=v);var y=P.prototype=b.prototype=Object.create(d);x.prototype=y.constructor=P,P.constructor=x,P[c]=x.displayName="GeneratorFunction",s.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===x||"GeneratorFunction"===(e.displayName||e.name))},s.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,P):(t.__proto__=P,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(y),t},s.awrap=function(t){return{__await:t}},L(w.prototype),w.prototype[_]=function(){return this},s.AsyncIterator=w,s.async=function(t,e,r,o){var n=new w(O(t,e,r,o));return s.isGeneratorFunction(e)?n:n.next().then(function(t){return t.done?t.value:n.next()})},L(y),y[c]="Generator",y[i]=function(){return this},y.toString=function(){return"[object Generator]"},s.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var o=e.pop();if(o in t)return r.value=o,r.done=!1,r}return r.done=!0,r}},s.values=T,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(M),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(o,n){return _.type="throw",_.arg=t,e.next=o,n&&(e.method="next",e.arg=r),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],_=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),M(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var o=r.completion;if("throw"===o.type){var n=o.arg;M(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,o){return this.delegate={iterator:T(t),resultName:e,nextLoc:o},"next"===this.method&&(this.arg=r),m}}}function O(t,e,r,o){var n=e&&e.prototype instanceof b?e:b,a=Object.create(n.prototype),i=new C(o||[]);return a._invoke=function(t,e,r){var o=l;return function(n,a){if(o===f)throw new Error("Generator is already running");if(o===h){if("throw"===n)throw a;return k()}for(r.method=n,r.arg=a;;){var i=r.delegate;if(i){var _=D(i,r);if(_){if(_===m)continue;return _}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===l)throw o=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=f;var c=g(t,e,r);if("normal"===c.type){if(o=r.done?h:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=h,r.method="throw",r.arg=c.arg)}}}(t,r,i),a}function g(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}function b(){}function x(){}function P(){}function L(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function w(t){var e;this._invoke=function(r,o){function a(){return new Promise(function(e,a){!function e(r,o,a,i){var _=g(t[r],t,o);if("throw"!==_.type){var c=_.arg,u=c.value;return u&&"object"==typeof u&&n.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,a,i)},function(t){e("throw",t,a,i)}):Promise.resolve(u).then(function(t){c.value=t,a(c)},i)}i(_.arg)}(r,o,e,a)})}return e=e?e.then(a,a):a()}}function D(t,e){var o=t.iterator[e.method];if(o===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,D(t,e),"throw"===e.method))return m;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var n=g(o,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,m;var a=n.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function T(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function e(){for(;++o<t.length;)if(n.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=r,e.done=!0,e};return a.next=a}}return{next:k}}function k(){return{value:r,done:!0}}}(function(){return this}()||Function("return this")())}}]);