1(self.webpackChunk=self.webpackChunk||[]).push([[7094],{14197:function(e){e.exports=function(){"use strict";var e={grid:0,filterTarget:null,limit:{x:null,y:null},threshold:0,setCursor:!1,setPosition:!0,smoothDrag:!0,useGPU:!0,onDrag:s,onDragStart:s,onDragEnd:s},t={transform:function(){for(var e=" -o- -ms- -moz- -webkit-".split(" "),t=document.body.style,a=e.length;a--;){var i=e[a]+"transform";if(i in t)return i}}()},a={assign:function(){for(var e=arguments[0],t=arguments.length,a=1;a<t;a++){var i=arguments[a];for(var n in i)e[n]=i[n]}return e},bind:function(e,t){return function(){e.apply(t,arguments)}},on:function(e,t,i){if(t&&i)a.addEvent(e,t,i);else if(t)for(var n in t)a.addEvent(e,n,t[n])},off:function(e,t,i){if(t&&i)a.removeEvent(e,t,i);else if(t)for(var n in t)a.removeEvent(e,n,t[n])},limit:function(e,t){return t instanceof Array?e<(t=[+t[0],+t[1]])[0]?e=t[0]:e>t[1]&&(e=t[1]):e=+t,e},addEvent:"attachEvent"in Element.prototype?function(e,t,a){e.attachEvent("on"+t,a)}:function(e,t,a){e.addEventListener(t,a,!1)},removeEvent:"attachEvent"in Element.prototype?function(e,t,a){e.detachEvent("on"+t,a)}:function(e,t,a){e.removeEventListener(t,a)}};function i(t,i){var n=this,l=a.bind(n.start,n),o=a.bind(n.drag,n),s=a.bind(n.stop,n);if(!r(t))throw new TypeError("Draggable expects argument 0 to be an Element");i=a.assign({},e,i),a.assign(n,{element:t,handle:i.handle&&r(i.handle)?i.handle:t,handlers:{start:{mousedown:l,touchstart:l},move:{mousemove:o,mouseup:s,touchmove:o,touchend:s}},options:i}),n.initialize()}function n(e){return parseInt(e,10)}function l(e){return"currentStyle"in e?e.currentStyle:getComputedStyle(e)}function o(e){return null!=e}function r(e){return e instanceof Element||"undefined"!=typeof HTMLDocument&&e instanceof HTMLDocument}function s(){}return a.assign(i.prototype,{setOption:function(e,t){var a=this;return a.options[e]=t,a.initialize(),a},get:function(){var e=this.dragEvent;return{x:e.x,y:e.y}},set:function(e,t){var a=this,i=a.dragEvent;return i.original={x:i.x,y:i.y},a.move(e,t),a},dragEvent:{started:!1,x:0,y:0},initialize:function(){var e,i=this,n=i.element,o=(i.handle,n.style),r=l(n),s=i.options,p=t.transform,d=i._dimensions={height:"auto",left:n.offsetLeft,top:n.offsetTop,width:n.offsetWidth};s.useGPU&&p&&("none"===(e=r[p])&&(e=""),o[p]=e+" translate3d(0,0,0)"),s.setPosition&&(o.display="block",o.left=d.left+"px",o.top=d.top+"px",o.width=d.width+"px",o.height=d.height+"px",o.bottom=o.right="auto",o.margin=0,o.position="absolute"),s.setCursor&&(o.cursor="move"),i.setLimit(s.limit),a.assign(i.dragEvent,{x:d.left,y:d.top}),a.on(i.handle,i.handlers.start)},start:function(e){var t=this,i=t.getCursor(e),n=t.element;t.useTarget(e.target||e.srcElement)&&(e.preventDefault&&!e.target.getAttribute("contenteditable")?e.preventDefault():e.target.getAttribute("contenteditable")||(e.returnValue=!1),t.dragEvent.oldZindex=n.style.zIndex,n.style.zIndex=1e4,t.setCursor(i),t.setPosition(),t.setZoom(),a.on(document,t.handlers.move))},drag:function(e){var t=this,a=t.dragEvent,i=t.element,n=t._cursor,l=t._dimensions,o=t.options,r=l.zoom,s=t.getCursor(e),p=o.threshold,d=(s.x-n.x)/r+l.left,c=(s.y-n.y)/r+l.top;!a.started&&p&&Math.abs(n.x-s.x)<p&&Math.abs(n.y-s.y)<p||(a.original||(a.original={x:d,y:c}),a.started||(o.onDragStart(i,d,c,e),a.started=!0),t.move(d,c)&&o.onDrag(i,a.x,a.y,e))},move:function(e,t){var a=this,i=a.dragEvent,n=a.options,l=n.grid,o=a.element.style,r=a.limit(e,t,i.original.x,i.original.y);return!n.smoothDrag&&l&&(r=a.round(r,l)),(r.x!==i.x||r.y!==i.y)&&(i.x=r.x,i.y=r.y,o.left=r.x+"px",o.top=r.y+"px",!0)},stop:function(e){var t,i=this,n=i.dragEvent,l=i.element,o=i.options,r=o.grid;a.off(document,i.handlers.move),l.style.zIndex=n.oldZindex,o.smoothDrag&&r&&(t=i.round({x:n.x,y:n.y},r),i.move(t.x,t.y),a.assign(i.dragEvent,t)),i.dragEvent.started&&o.onDragEnd(l,n.x,n.y,e),i.reset()},reset:function(){this.dragEvent.started=!1},round:function(e){var t=this.options.grid;return{x:t*Math.round(e.x/t),y:t*Math.round(e.y/t)}},getCursor:function(e){return{x:(e.targetTouches?e.targetTouches[0]:e).clientX,y:(e.targetTouches?e.targetTouches[0]:e).clientY}},setCursor:function(e){this._cursor=e},setLimit:function(e){var t=this,i=function(e,t){return{x:e,y:t}};if(e instanceof Function)t.limit=e;else if(r(e)){var n=t._dimensions,l=e.scrollHeight-n.height,s=e.scrollWidth-n.width;t.limit=function(e,t){return{x:a.limit(e,[0,s]),y:a.limit(t,[0,l])}}}else if(e){var p={x:o(e.x),y:o(e.y)};t.limit=p.x||p.y?function(t,i){return{x:p.x?a.limit(t,e.x):t,y:p.y?a.limit(i,e.y):i}}:i}else t.limit=i},setPosition:function(){var e=this.element,t=e.style;a.assign(this._dimensions,{left:n(t.left)||e.offsetLeft,top:n(t.top)||e.offsetTop})},setZoom:function(){for(var e=this.element,t=1;e=e.offsetParent;){var a=l(e).zoom;if(a&&"normal"!==a){t=a;break}}this._dimensions.zoom=t},useTarget:function(e){var t=this.options.filterTarget;return!(t instanceof Function)||t(e)},destroy:function(){a.off(this.handle,this.handlers.start),a.off(document,this.handlers.move)}}),i}},62184:function(e,t,a){"use strict";Object.defineProperty(t,"B",{value:!0});var i=a(41827),n=a(44899),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.__extends)(t,e),t.prototype.saveTemplateConfig=function(){return(0,i.__awaiter)(this,void 0,void 0,function(){return(0,i.__generator)(this,function(e){return this.$emit("saveTemplateConfig"),[2]})})},t.prototype.previewTemplate=function(){return(0,i.__awaiter)(this,void 0,void 0,function(){return(0,i.__generator)(this,function(e){return this.$emit("previewTemplate"),[2]})})},t.prototype.changeVal=function(e){this.templateConfigInfo[e]||(this.templateConfigInfo[e]="0")},(0,i.__decorate)([(0,n.Prop)({default:{}})],t.prototype,"templateConfigInfo",void 0),(0,i.__decorate)([n.Component],t)}(n.Vue);t.A=l},95822:function(e,t){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.LABEL_CONFIGS_INFO=t.TEMPLATE_CONFIG_INFO=void 0,t.TEMPLATE_CONFIG_INFO={templateName:"模çåç§°",width:210,height:297,printingMethod:"1",colNum:1,colGap:0,rowNum:1,rowGap:0,upSpace:0,downSpace:0,leftSpace:0,rightSpace:0},t.LABEL_CONFIGS_INFO=[{title:"ååæ ç¾ä¿¡æ¯",id:"label",children:[{name:"åºåsku",id:"1",type:1,styleConfig:{width:80,height:20,fontSize:12,textAlign:"left",fontWeight:""}},{name:"åºåskuæ¡ç ",id:"2",type:7,styleConfig:{width:164,height:55,fontSize:12,textAlign:"left",fontWeight:""}},{name:"FNSKU",id:"3",type:1,styleConfig:{width:80,height:20,fontSize:12,textAlign:"left",fontWeight:""}},{name:"FNSKUæ¡ç ",id:"4",type:7,styleConfig:{width:164,height:55,fontSize:12,textAlign:"left",fontWeight:""}},{name:"FBAååæ é¢",id:"5",type:1,styleConfig:{width:80,height:20,fontSize:12,textAlign:"left",fontWeight:""}},{name:"FBAåºéºåç§°",id:"6",type:1,styleConfig:{width:80,height:20,fontSize:12,textAlign:"left",fontWeight:""}},{name:"MSKUç¼å·",id:"7",type:1,styleConfig:{width:80,height:20,fontSize:12,textAlign:"left",fontWeight:""}},{name:"MSKU夿³¨",id:"8",type:1,styleConfig:{width:80,height:20,fontSize:12,textAlign:"left",fontWeight:""}},{name:"åºåskuè±æå",id:"9",type:1,styleConfig:{width:80,height:20,fontSize:12,textAlign:"left",fontWeight:""}},{name:"åºåsku䏿åç§°",id:"14",type:1,styleConfig:{width:80,height:20,fontSize:12,textAlign:"left",fontWeight:"",whiteSpace:"nowrap"}},{name:"åºåskuä»åº",id:"10",type:1,styleConfig:{width:80,height:20,fontSize:12,textAlign:"left",fontWeight:""}},{name:"åºåskuä»ä½",id:"11",type:1,styleConfig:{width:80,height:20,fontSize:12,textAlign:"left",fontWeight:""}},{name:"ASIN",id:"12",type:1,styleConfig:{width:80,height:20,fontSize:12,textAlign:"left",fontWeight:""}},{name:"äºé©¬éä¸ç¨FNSKUæ¡ç Code128B",id:"13",type:7,styleConfig:{width:164,height:55,fontSize:12,textAlign:"left",fontWeight:""}}]},{title:"æå¾å
ç´ ",id:"element",children:[{name:"水平线",id:"18",type:3,styleConfig:{width:1e3,height:1}},{name:"åç´çº¿",id:"19",type:4,styleConfig:{width:1,height:1e3}},{name:"èªå®ææ¬",id:"20",type:5,styleConfig:{width:80,height:20,fontSize:12,textAlign:"left",fontWeight:""}}]}]},25840:function(e,t,a){"use strict";Object.defineProperty(t,"B",{value:!0});var i=a(41827),n=a(19610),l=a(53982),o=a(60899),r=a(17243),s=(0,i.__importDefault)(a(46872)),p=a(44899),d=(0,i.__importDefault)(a(1911)),c=a(95822),f=a(14197)(),m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.templateConfigInfo=(0,r.cloneDeep)(c.TEMPLATE_CONFIG_INFO),t.FBALabelInfoList=(0,r.cloneDeep)(c.LABEL_CONFIGS_INFO),t.FBALabelInfoItem=null,t.draggableCache=new Set,t.activeNames="",t.loading=!1,t.printDetail={},t.wrapperList=[],t.index=0,t}return(0,i.__extends)(t,e),Object.defineProperty(t.prototype,"labelWidth",{get:function(){var e=this.templateConfigInfo,t=e.width,a=e.colNum,i=e.colGap,n=e.rightSpace,l=(t-(e.leftSpace+n)-(a-1)*i)/a;return Number(Math.floor(100*l)/100).toFixed(2)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"labelHeight",{get:function(){var e=/macintosh|mac os x/i.test(navigator.userAgent),t=this.templateConfigInfo,a=t.height,i=t.rowNum,n=t.rowGap,l=t.upSpace,o=t.downSpace,r=(a-(l+o)-(i-1)*n)/i;return!e||l||o||(r=(a-(l+1+(o+1))-(i-1)*n)/i),Number(Math.floor(100*r)/100).toFixed(2)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"labelStyle",{get:function(){return{width:this.labelWidth+"mm",height:this.labelHeight+"mm"}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"templateIsValid",{get:function(){return!Object.entries(this.templateConfigInfo).some(function(e){return!e[1]})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isTextLabel",{get:function(){var e;return(null===(e=this.FBALabelInfoItem)||void 0===e?void 0:e.type)===l.E_FBA_LABEL_TYPE.text},enumerable:!1,configurable:!0}),t.prototype.created=function(){if(sessionStorage.getItem("print-detail")){this.printDetail=JSON.parse(sessionStorage.getItem("print-detail")),this.templateConfigInfo=this.printDetail.row.config_json.templateConfigInfo;var e=this.printDetail.row.config_json.data;this.wrapperList=e,this.wrapperList.forEach(function(e){e.style.split("; ").forEach(function(t){if(-1!=t.indexOf("inset")){var a=t.split(" ");e.y=Number(a[1].replace(/[^\d]/g,"")),e.x=Number(a[4].replace(/[^\d]/g,""))}else-1!=t.indexOf("top:")?e.y=Number(t.replace(/[^\d]/g,"")):-1!=t.indexOf("left:")&&(e.x=Number(t.replace(/[^\d]/g,"")))}),3==e.dragValue.type?e.x=0:4==e.dragValue.type&&(e.y=0)}),this.changElement()}},t.prototype.changElement=function(){var e=this;this.$nextTick(function(){document.querySelectorAll("#computed_label_wrapper .drag-item").forEach(function(t,a){var i=JSON.parse(t.dataset.dragValue).styleConfig;if(i){for(var n in t.style.whiteSpace="nowrap",i)t.style[n]=i[n]+"px","textAlign"==n?t.style.textAlign=i[n]:"fontWeight"==n?t.style.fontWeight=i[n]:"whiteSpace"
1==n?(t.style.whiteSpace=i[n],"两è¡å±ç¤º"==i[n]&&(t.style.whiteSpace="normal"),t.style.wordBreak="break-all"):"width"==n?(t.style[n]=null,e.wrapperList[a].dragValue.styleConfig.width=i[n]):"height"==n&&(t.style[n]=null,e.wrapperList[a].dragValue.styleConfig.height=i[n]);t.style.overflow="hidden"}3==e.wrapperList[a].dragValue.type?(e.wrapperList[a].x=0,t.style.background="#333"):4==e.wrapperList[a].dragValue.type&&(e.wrapperList[a].y=0,t.style.background="#333"),e.changeImg()})})},t.prototype.changeImg=function(){var e=document.getElementsByClassName("dataImg");document.getElementsByClassName("dataName").forEach(function(t,a){e[a].style.height="calc(100% - "+(t.offsetHeight+3)+"px)"})},t.prototype.handleEcho=function(e){var t=document.getElementById("computed_label_wrapper"),a=JSON.stringify(e.dragValue),i=JSON.parse(a),n=document.createElement("div"),o=i.type;t.style.borderColor="transparent",n.classList.add("drag-item",i.name+"_"+i.id),n.dataset.dragValue=a,n.title=""+i.name;var r=e.style,s="";switch(o){case l.E_FBA_LABEL_TYPE.text:n.innerHTML="<span>"+i.name+"</span>";break;case l.E_FBA_LABEL_TYPE.barCode:s=13==i.id?'<div style="width:100%;height:100%"><img class="dataImg" style="width:100%;" src="https://print.mabangerp.com/index.php?mod=main.drawBarcode&codeType=2&barcode='+Math.random().toString(16).substring(3)+'"><div class="dataName">'+i.name+"</div></div>":'<div style="width:100%;height:100%"><img class="dataImg" style="width:100%;" src="https://print.mabangerp.com/index.php?mod=main.drawBarcode&barcode='+Math.random().toString(16).substring(3)+'"><div class="dataName">'+i.name+"</div</div>",n.innerHTML=s;break;case l.E_FBA_LABEL_TYPE.lineX:case l.E_FBA_LABEL_TYPE.lineY:break;case l.E_FBA_LABEL_TYPE.customText:n.innerHTML='<p contenteditable="true">'+i.value+"</p>"}n.setAttribute("style",r),t.appendChild(n)},t.prototype.labelStyleWatch=function(e){return(0,i.__awaiter)(this,void 0,void 0,function(){var t=this;return(0,i.__generator)(this,function(a){switch(a.label){case 0:return e?((0,r.cloneDeep)(this.draggableCache).forEach(function(e){e.destroy(),t.draggableCache.delete(e)}),[4,this.$nextTick()]):[2];case 1:return a.sent(),[2]}})})},t.prototype.handleChange=function(){this.templateConfigInfo.templateName||this.$message.warning("请å
å®åçº¸å¼ å°ºå¯¸ä¿¡æ¯")},t.prototype.handleDragstart=function(e,t){e.dataTransfer.setData("text/plain",JSON.stringify(t))},t.prototype.handleDragenter=function(e){e.target.style.borderColor="red"},t.prototype.handleDragover=function(e){e.preventDefault()},t.prototype.handleDrop=function(e,t){void 0===t&&(t=!1);var a=t?JSON.stringify(this.FBALabelInfoItem):e.dataTransfer.getData("text/plain"),i=JSON.parse(a),n=e.offsetX,l=e.offsetY,o={style:"user-select:none;left:"+n+"px;top:"+l+"px;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis",dragValue:i,x:n,y:l};this.wrapperList.push(o),this.changElement()},t.prototype.handleDrop2=function(e,t){var a=this;void 0===t&&(t=!1);var i=document.getElementById("computed_label_wrapper"),n=i.getBoundingClientRect(),o=n.width,r=n.height,s=t?JSON.stringify(this.FBALabelInfoItem):e.dataTransfer.getData("text/plain"),p=JSON.parse(s),d=document.createElement("div"),c=p.type;i.style.borderColor="transparent",d.classList.add("drag-item",p.name+"_"+p.id),d.dataset.dragValue=s,d.title=""+p.name;var m=e.offsetX,u=e.offsetY;if(t){var g=i.getElementsByClassName("active")[0].style,h=g.left,y=g.top;m=parseInt(h),u=parseInt(y)+2}var v="user-select:none;left:"+m+"px;top:"+u+"px;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis",b={x:[0,o-10],y:[0,r-10]},C=p.styleConfig;if(C)for(var I in b.x=[0,o-10],b.y=[0,r-10],C)v+=";"+I+":"+C[I]+"px;";var _,w="";switch(c){case l.E_FBA_LABEL_TYPE.text:d.innerHTML="<span>"+p.name+"</span>",1!=p.type&&5!=p.type||(v+=";text-overflow: unset;height:auto");break;case l.E_FBA_LABEL_TYPE.barCode:w=13==p.id?'<div style="width:100%;height:100%"><img class="dataImg" style="width:100%;" src="https://print.mabangerp.com/index.php?mod=main.drawBarcode&codeType=2&barcode='+Math.random().toString(16).substring(3)+'"><div class="dataName">'+p.name+"</div></div>":'<div style="width:100%;height:100%"><img class="dataImg" style="width:100%;" src="https://print.mabangerp.com/index.php?mod=main.drawBarcode&barcode='+Math.random().toString(16).substring(3)+'"><div class="dataName">'+p.name+"</div</div>",d.innerHTML=w;break;case l.E_FBA_LABEL_TYPE.lineX:v+="width:100%;height:1px;background-color:#333",m=0;break;case l.E_FBA_LABEL_TYPE.lineY:v+=";width:1px;height:100%;background-color:#333",u=0;break;case l.E_FBA_LABEL_TYPE.customText:d.innerHTML='<p contenteditable="true">'+p.name+"</p>"}d.setAttribute("style",v),i.appendChild(d),(_=c===l.E_FBA_LABEL_TYPE.lineX||c===l.E_FBA_LABEL_TYPE.lineY?new f(d):new f(d,{limit:b})).set(m,u),this.draggableCache.add(_),c!==l.E_FBA_LABEL_TYPE.lineX&&c!==l.E_FBA_LABEL_TYPE.lineY&&this.$nextTick(function(){a.changeImg(),_.destroy(),a.draggableCache.delete(_)})},t.prototype.onResizstop=function(e){this.wrapperList[this.index].dragValue.styleConfig.width=e.width,this.FBALabelInfoItem.styleConfig.width=e.width,this.wrapperList[this.index].dragValue.styleConfig.height=e.height,this.FBALabelInfoItem.styleConfig.height=e.height},t.prototype.updateLabelStyle=function(){if(this.FBALabelInfoItem){var e=document.querySelectorAll("#computed_label_wrapper .drag-item")[this.index],t=this.FBALabelInfoItem.styleConfig;if(t){for(var a in t)e.style[a]=t[a]+"px","textAlign"==a?e.style.textAlign=t[a]:"fontWeight"==a?e.style.fontWeight=t[a]:"whiteSpace"
1==a?(e.style.whiteSpace=t[a],"两è¡å±ç¤º"==t[a]&&(e.style.whiteSpace="normal"),e.style.wordBreak="break-all"):"width"==a?(e.style[a]=null,this.wrapperList[this.index].dragValue.styleConfig.width=t[a]):"height"==a&&(e.style[a]=null,this.wrapperList[this.index].dragValue.styleConfig.height=t[a]);this.$forceUpdate()}e.dataset.dragValue=JSON.stringify(this.FBALabelInfoItem),20==this.FBALabelInfoItem.id&&(this.FBALabelInfoItem.value=this.FBALabelInfoItem.name,this.wrapperList[this.index].dragValue.value=this.FBALabelInfoItem.name),this.changeImg(),5==this.FBALabelInfoItem.type&&(this.wrapperList[this.index].dragValue.name=this.FBALabelInfoItem.name,this.$forceUpdate())}},t.prototype.handleRemoveItem=function(){this.wrapperList.splice(this.index,1),this.changElement()},t.prototype.copyTextLabel=function(){var e={x:this.wrapperList[this.index].x,y:this.wrapperList[this.index].y-20,style:this.wrapperList[this.index].style,dragValue:this.wrapperList[this.index].dragValue};this.wrapperList.push(e),this.changElement()},t.prototype.previewTemplate=function(){var e=document.querySelectorAll("#computed_label_wrapper > .drag-item"),t=[];if(e.forEach(function(e){var a=JSON.parse(e.dataset.dragValue||"{}"),i=e.style.cssText;if(a.type===l.E_FBA_LABEL_TYPE.customText){var n=e.querySelector('p[contenteditable="true"]');a.value=(null==n?void 0:n.textContent)||a.name}t.push({dragValue:a,style:i})}),sessionStorage.setItem("print-review",JSON.stringify({data:t,templateConfigInfo:this.templateConfigInfo,labelStyle:this.labelStyle})),!this.templateConfigInfo.templateName)return this.$message.warning("请å
å®åçº¸å¼ å°ºå¯¸ä¿¡æ¯"),!1;o.authUtils.openThirdPage("print-review")},t.prototype.saveTemplateConfig=function(){return(0,i.__awaiter)(this,void 0,void 0,function(){var e,t,a,o,r;return(0,i.__generator)(this,function(i){switch(i.label){case 0:if(e=document.querySelectorAll("#computed_label_wrapper > .drag-item"),t=[],e.forEach(function(e){var a=JSON.parse(e.dataset.dragValue||"{}"),i=e.style.cssText;if(a.type===l.E_FBA_LABEL_TYPE.customText){var n=e.querySelector('p[contenteditable="true"]');a.value=(null==n?void 0:n.textContent)||a.name}t.push({dragValue:a,style:i})}),sessionStorage.setItem("print-review",JSON.stringify({data:t,templateConfigInfo:this.templateConfigInfo,labelStyle:this.labelStyle})),!this.templateConfigInfo.templateName)return this.$message.warning("请å
å®åçº¸å¼ å°ºå¯¸ä¿¡æ¯"),[2,!1];a={name:this.templateConfigInfo.templateName,config_json:JSON.parse(sessionStorage.getItem("print-review"))},i.label=1;case 1:return i.trys.push([1,9,,10]),this.loading=!0,o="",sessionStorage.getItem("print-detail")?"edit"!=this.printDetail.type?[3,3]:(a.id=this.printDetail.row.id,[4,(0,n.templateSizeSave)(a)]):[3,6];case 2:return o=i.sent(),[3,5];case 3:return[4,(0,n.templateSizeAdd)(a)];case 4:o=i.sent(),i.label=5;case 5:return[3,8];case 6:return[4,(0,n.templateSizeAdd)(a)];case 7:o=i.sent(),i.label=8;case 8:return this.loading=!1,200!=o.code?[2,this.$message.error(o.msg)]:(this.$message.success("æä½æå"),window.close(),[3,10]);case 9:return r=i.sent(),this.loading=!1,this.$message.error((null==r?void 0:r.message)||"æä½å¤±è´¥"),[3,10];case 10:return[2]}})})},t.prototype.handleClickItem=function(e){var t=document.querySelectorAll("#computed_label_wrapper .drag-item");this.index=e;var a=t[e];a&&(this.FBALabelInfoItem=JSON.parse(a.dataset.dragValue||"{}"),this.$forceUpdate())},t.prototype.findDragItemElement=function(e){for(var t=e.target;t;){if(t.classList.contains("drag-item"))return t;t=t.parentElement}},(0,i.__decorate)([(0,p.Watch)("labelStyle",{deep:!0})],t.prototype,"labelStyleWatch",null),(0,i.__decorate)([(0,p.Component)({components:{TemplateHeaderConfig:d.default,VueDragResize:s.default}})],t)}(p.Vue);t.A=m},53982:function(e,t){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.E_FBA_LABEL_TYPE=void 0,(a=t.E_FBA_LABEL_TYPE||(t.E_FBA_LABEL_TYPE={}))[a.text=1]="text",a[a.image=2]="image",a[a.lineX=3]="lineX",a[a.lineY=4]="lineY",a[a.customText=5]="customText",a[a.circle=6]="circle",a[a.barCode=7]="barCode",a[a.qrCode=8]="qrCode"},1911:function(e,t,a){"use strict";a.r(t),a.d(t,{__esModule:function(){return n.B},default:function(){return o}});var i=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("nav",{staticClass:"header"},[t("div",{staticClass:"row"},[t("div",{staticClass:"item mr-0"},[t("div",{staticClass:"title"},[e._v("模çåç§°")]),t("el-input",{attrs:{size:"small",placeholder:"请è¾å
¥"},model:{value:e.templateConfigInfo.templateName,callback:function(t){e.$set(e.templateConfigInfo,"templateName",t)},expression:"templateConfigInfo.templateName"}})],1),t("div",{staticClass:"item"},[t("div",{staticClass:"title"},[e._v("æå°æ¹å¼")]),t("el-select",{attrs:{placeholder:"æå°æ¹å¼",size:"small"},model:{value:e.templateConfigInfo.printingMethod,callback:function(t){e.$set(e.templateConfigInfo,"printingMethod",t)},expression:"templateConfigInfo.printingMethod"}},[t("el-option",{attrs:{value:"1",label:"ä»å·¦å°å³"}}),t("el-option",{attrs:{value:"2",label:"ä»ä¸å°ä¸"}})],1)],1),t("div",{staticClass:"item mr-0"},[t("div",{staticClass:"title"},[e._v("çº¸å¼ å°ºå¯¸å®½(mm)")]),t("el-input-number",{attrs:{size:"small",placeholder:"请è¾å
¥",precision:2,min:0},on:{blur:function(t){return e.changeVal("width")}},model:{value:e.templateConfigInfo.width,callback:function(t){e.$set(e.templateConfigInfo,"width",t)},expression:"templateConfigInfo.width"}})],1),t("div",{staticClass:"item"},[t("div",{staticClass:"title"},[e._v("é«(mm)")]),t("el-input-number",{attrs:{size:"small",placeholder:"请è¾å
¥",precision:2,min:0},on:{blur:function(t){return e.changeVal("height")}},model:{value:e.templateConfigInfo.height,callback:function(t){e.$set(e.templateConfigInfo,"height",t)},expression:"templateConfigInfo.height"}})],1),t("div",{staticClass:"item"},[t("div",{staticClass:"title"},[e._v("çº¸å¼ æå°åæ°(mm)")]),t("el-input-number",{attrs:{size:"small",placeholder:"请è¾å
¥",precision:0,min:1},on:{blur:function(t){return e.changeVal("colNum")}},model:{value:e.templateConfigInfo.colNum,callback:function(t){e.$set(e.templateConfigInfo,"colNum",t)},expression:"templateConfigInfo.colNum"}})],1),t("div",{staticClass:"item"},[t("div",{staticClass:"title"},[e._v("åé´è·(mm)")]),t("el-input-number",{attrs:{size:"small",placeholder:"请è¾å
¥",precision:2},on:{blur:function(t){return e.changeVal("colGap")}},model:{value:e.templateConfigInfo.colGap,callback:function(t){e.$set(e.templateConfigInfo,"colGap",t)},expression:"templateConfigInfo.colGap"}})],1),t("el-button",{staticClass:"w-100",attrs:{size:"small",type:"primary"},on:{click:e.previewTemplate}},[e._v("é¢è§")])],1),t("div",{staticClass:"row"},[t("div",{staticClass:"item"},[t("div",{staticClass:"title"},[e._v("çº¸å¼ æå°è¡æ°")]),t("el-input-number",{attrs:{size:"small",placeholder:"请è¾å
¥",precision:0,min:1},on:{blur:function(t){return e.changeVal("rowNum")}},model:{value:e.templateConfigInfo.rowNum,callback:function(t){e.$set(e.templateConfigInfo,"rowNum",t)},expression:"templateConfigInfo.rowNum"}})],1),t("div",{staticClass:"item"},[t("div",{staticClass:"title"},[e._v("è¡é´è·(mm)")]),t("el-input-number",{attrs:{size:"small",placeholder:"请è¾å
¥",precision:2},on:{blur:function(t){return e.changeVal("rowGap")}},model:{value:e.templateConfigInfo.rowGap,callback:function(t){e.$set(e.templateConfigInfo,"rowGap",t)},expression:"templateConfigInfo.rowGap"}})],1),t("div",{staticClass:"item mr-0"},[t("div",{staticClass:"title"},[e._v("çº¸å¼ é´è·ä¸(mm)")]),t("el-input-number",{attrs:{size:"small",placeholder:"请è¾å
¥",precision:2},on:{blur:function(t){return e.changeVal("upSpace")}},model:{value:e.templateConfigInfo.upSpace,callback:function(t){e.$set(e.templateConfigInfo,"upSpace",t)},expression:"templateConfigInfo.upSpace"}})],1),t("div",{staticClass:"item mr-0"},[t("div",{staticClass:"title"},[e._v("ä¸(mm)")]),t("el-input-number",{attrs:{size:"small",placeholder:"请è¾å
¥",precision:2},on:{blur:function(t){return e.changeVal("downSpace")}},model:{value:e.templateConfigInfo.downSpace,callback:function(t){e.$set(e.templateConfigInfo,"downSpace",t)},expression:"templateConfigInfo.downSpace"}})],1),t("div",{staticClass:"item mr-0"},[t("div",{staticClass:"title"},[e._v("å·¦(mm)")]),t("el-input-number",{attrs:{size:"small",placeholder:"请è¾å
¥",precision:2},on:{blur:function(t){return e.changeVal("leftSpace")}},model:{value:e.templateConfigInfo.leftSpace,callback:function(t){e.$set(e.templateConfigInfo,"leftSpace",t)},expression:"templateConfigInfo.leftSpace"}})],1),t("div",{staticClass:"item"},[t("div",{staticClass:"title"},[e._v("å³(mm)")]),t("el-input-number",{attrs:{size:"small",placeholder:"请è¾å
¥",precision:2},on:{blur:function(t){return e.changeVal("rightSpace")}},model:{value:e.templateConfigInfo.rightSpace,callback:function(t){e.$set(e.templateConfigInfo,"rightSpace",t)},expression:"templateConfigInfo.rightSpace"}})],1),t("el-button",{staticClass:"w-100",attrs:{size:"small",type:"primary"},on:{click:e.saveTemplateConfig}},[e._v("ä¿å")])],1)])};i._withStripped=!0;var n=a(62184),l=n.A,o=(0,a(67658).A)(l,i,[],!1,null,"8ce2019c",null).exports},84713:function(e,t,a){"use strict";a.r(t),a.d(t,{__esModule:function(){return n.B},default:function(){return o}});var i=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{staticClass:"print-template-add"},[t("TemplateHeaderConfig",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{templateConfigInfo:e.templateConfigInfo},on:{previewTemplate:e.previewTemplate,saveTemplateConfig:e.saveTemplateConfig}}),t("main",{staticClass:"template-config"},[t("section",{staticClass:"left"},[t("el-collapse",{attrs:{accordion:""},on:{change:e.handleChange},model:{value:e.activeNames,callback:function(t){e.activeNames=t},expression:"activeNames"}},[e._l(e.FBALabelInfoList,function(a){return[t("el-collapse-item",{key:a.id,attrs:{title:a.title,name:a.id}},e._l(a.children,function(a){return t("div",{key:a.id,staticClass:"label",attrs:{draggable:""},on:{dragstart:function(t){return e.handleDragstart(t,a)}}},[t("span",{attrs:{title:a.name}},[e._v(e._s(a.name))])])}),0)]})],2)],1),t("section",{staticClass:"label-wrapper"},[[t("div",{staticClass:"label-info"},[t("b",[e._v("æ ç¾å®½ï¼"+e._s(e.labelWidth||"-")+"mm")]),t("b",{staticClass:"ml-20"},[e._v("æ ç¾é«ï¼"+e._s(e.labelHeight||"-")+"mm")])]),t("div",{style:e.labelStyle,attrs:{id:"c
1omputed_label_wrapper"},on:{dragenter:e.handleDragenter,dragover:e.handleDragover,drop:e.handleDrop}},e._l(e.wrapperList,function(a,i){return t("VueDragResize",{key:a.dragValue.id+i,staticClass:"drag-item",attrs:{"data-drag-value":JSON.stringify(a.dragValue),title:a.dragValue.name,w:a.dragValue.styleConfig.width,h:a.dragValue.styleConfig.height,x:a.x,y:a.y,minw:1,minh:1,parentLimitation:!0,"data-id":a.dragValue.id},on:{clicked:function(t){return e.handleClickItem(i)},resizestop:e.onResizstop}},[t("div",{staticStyle:{width:"100%",height:"100%"}},[1===a.dragValue.type?t("span",{attrs:{"data-name":a.dragValue.name,"data-value":a.dragValue.value}},[e._v(" "+e._s(a.dragValue.value||a.dragValue.name)+" ")]):3===a.dragValue.type||4===a.dragValue.type?t("span"):5===a.dragValue.type?t("span",[e._v(e._s(a.dragValue.value||a.dragValue.name))]):7===a.dragValue.type?t("div",{staticStyle:{width:"100%",height:"100%"}},[13==a.dragValue.id?t("img",{staticClass:"dataImg",staticStyle:{width:"100%"},attrs:{src:"https://print.mabangerp.com/index.php?mod=main.drawBarcode&codeType=2&barcode="+a.dragValue.value}}):t("img",{staticClass:"dataImg",staticStyle:{width:"100%"},attrs:{src:"https://print.mabangerp.com/index.php?mod=main.drawBarcode&barcode="+a.dragValue.value}}),t("div",{staticClass:"dataName"},[e._v(e._s(a.dragValue.value||a.dragValue.name))])]):t("span",[e._v(e._s(a.dragValue.name))])])])}),1)]],2),t("section",{staticClass:"right"},[e.FBALabelInfoItem?[3!=e.FBALabelInfoItem.type&&4!=e.FBALabelInfoItem.type?t("div",{staticClass:"label-info"},[t("header",{staticClass:"header"},[t("b",[e._v(e._s(e.FBALabelInfoItem.name))])]),t("el-form",{staticClass:"mt-20",attrs:{size:"mini","label-width":"100px"}},[5==e.FBALabelInfoItem.type?t("el-form-item",{attrs:{label:"èªå®ææ¬"}},[t("el-input",{attrs:{size:"mini"},on:{change:e.updateLabelStyle},model:{value:e.FBALabelInfoItem.name,callback:function(t){e.$set(e.FBALabelInfoItem,"name",t)},expression:"FBALabelInfoItem.name"}})],1):e._e(),t("el-form-item",{attrs:{label:"宽(px)"}},[t("el-input-number",{attrs:{size:"mini",min:0},on:{change:e.updateLabelStyle},model:{value:e.FBALabelInfoItem.styleConfig.width,callback:function(t){e.$set(e.FBALabelInfoItem.styleConfig,"width",t)},expression:"FBALabelInfoItem.styleConfig.width"}})],1),t("el-form-item",{attrs:{label:"é«(px)"}},[t("el-input-number",{attrs:{size:"mini",min:0},on:{change:e.updateLabelStyle},model:{value:e.FBALabelInfoItem.styleConfig.height,callback:function(t){e.$set(e.FBALabelInfoItem.styleConfig,"height",t)},expression:"FBALabelInfoItem.styleConfig.height"}})],1),t("el-form-item",{attrs:{label:"åä½å¤§å°(px)"}},[t("el-input-number",{attrs:{size:"mini",min:12,max:40},on:{change:e.updateLabelStyle},model:{value:e.FBALabelInfoItem.styleConfig.fontSize,callback:function(t){e.$set(e.FBALabelInfoItem.styleConfig,"fontSize",t)},expression:"FBALabelInfoItem.styleConfig.fontSize"}})],1),1==e.FBALabelInfoItem.type||5==e.FBALabelInfoItem.type?t("el-form-item",{attrs:{label:"å±ç¤ºè¡æ°"}},[t("el-select",{attrs:{size:"mini"},on:{change:e.updateLabelStyle},model:{value:e.FBALabelInfoItem.styleConfig.whiteSpace,callback:function(t){e.$set(e.FBALabelInfoItem.styleConfig,"whiteSpace",t)},expression:"FBALabelInfoItem.styleConfig.whiteSpace"}},[t("el-option",{attrs:{value:"nowrap",label:"åè¡å±ç¤º"}}),5==e.FBALabelInfoItem.id?t("el-option",{attrs:{value:"两è¡å±ç¤º",label:"两è¡å±ç¤º"}}):e._e(),t("el-option",{attrs:{value:"normal",label:"å¤è¡å±ç¤º"}})],1)],1):e._e(),t("el-form-item",{attrs:{label:"坹齿¹å¼"}},[t("el-select",{attrs:{size:"mini"},on:{change:e.updateLabelStyle},model:{value:e.FBALabelInfoItem.styleConfig.textAlign,callback:function(t){e.$set(e.FBALabelInfoItem.styleConfig,"textAlign",t)},expression:"FBALabelInfoItem.styleConfig.textAlign"}},[t("el-option",{attrs:{value:"left",label:"左对é½"}}),t("el-option",{attrs:{value:"center",label:"å±
ä¸å¯¹é½"}}),t("el-option",{attrs:{value:"right",label:"å³å¯¹é½"}})],1)],1),7!=e.FBALabelInfoItem.type?t("el-form-item",{staticStyle:{"text-align":"left"},attrs:{label:""}}
1,[t("el-checkbox",{attrs:{"false-label":"","true-label":"bold",size:"mini"},on:{change:e.updateLabelStyle},model:{value:e.FBALabelInfoItem.styleConfig.fontWeight,callback:function(t){e.$set(e.FBALabelInfoItem.styleConfig,"fontWeight",t)},expression:"FBALabelInfoItem.styleConfig.fontWeight"}},[e._v("æåå ç²")])],1):e._e()],1)],1):t("div",{staticClass:"label-info"},[t("header",{staticClass:"header"},[t("b",[e._v(e._s(e.FBALabelInfoItem.name))])])]),t("div",{staticClass:"footer"},[t("el-button",{attrs:{size:"small",type:"danger"},on:{click:e.handleRemoveItem}},[e._v("å é¤")])],1)]:e._e()],2)])],1)};i._withStripped=!0;var n=a(25840),l=n.A,o=(0,a(67658).A)(l,i,[],!1,null,"796625da",null).exports}}]); 2//# sourceMappingURL=chunk-7094.3231315a.js.map?site=amazon
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.