(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/addQrcode/addBatch"],{"0eee":function(n,t,e){"use strict";(function(n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;e("cea2");function o(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var i={data:function(){var n;return n={listData:[],req:{keyword:null,materialId:null},option:{},formData:{number:1,quantity:0}},o(n,"req",{stockTagList:[],purchaseContractDetailsId:null}),o(n,"btnType",1),n},onLoad:function(n){var t=this;t.option=JSON.parse(decodeURIComponent(n.data)),console.log(t.option),t.req.purchaseContractDetailsId=t.option.contractDetailsId},methods:{delelte:function(n){this.req.stockTagList.splice(n,1)},addBatch:function(){var t=this;0!=t.req.stockTagList.length?(n.showToast({icon:"loading",title:"加载中",duration:2e3}),t.$post("/wx/createQrcode/addBatch",t.req).then((function(t){200==t.code&&(n.showToast({title:"生成成功,跳转中!"}),setTimeout((function(){wx.reLaunch({url:"/pages/home"})}),1500))}))):n.showToast({icon:"error",title:"请添加明细",duration:2e3})},submitForm:function(){var t=this;if(0!=t.formData.quantity){for(var e=0,o=0;o1.05*t.option.notArrivalQty)return void n.showToast({icon:"none",title:"已超过总数的105%,请重新输入",duration:2e3});t.req.stockTagList.push({quantity:t.formData.quantity})}else{if(e+t.formData.quantity*t.formData.num>1.05*t.option.notArrivalQty)return void n.showToast({icon:"none",title:"已超过总数的105%,请重新输入",duration:2e3});if(0==t.formData.num||!t.formData.num)return void n.showToast({icon:"none",title:"请输入二维码个数",duration:2e3});for(o=0;o