You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
12 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-raw-ingoods-poReceipt-idetailed"],{"1ec5":function(t,e,a){"use strict";var i=a("4ea4");a("4160"),a("a434"),a("acd8"),a("e25e"),a("159b"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("96cf");var n=i(a("1da1")),s=i(a("d4ec")),o=i(a("bee2")),r=i(a("262e")),l=i(a("2caf")),c=a("9ab4"),d=a("60a3"),u=a("22da"),p=i(a("31aa")),f=a("b710"),v=i(a("34b3")),h=a("54a3"),m=function(t){(0,r.default)(a,t);var e=(0,l.default)(a);function a(){var t;return(0,s.default)(this,a),t=e.apply(this,arguments),t.model=p.default,t.factoryCode=h.session.factoryCode,t.locationCode="",t.number="",t.wlCode="",t.material={},t.list=[],t.LocationList=[],t.documentNo="",t.headers=f.headers,t}return(0,o.default)(a,[{key:"onReady",value:function(){var t=(0,n.default)(regeneratorRuntime.mark((function t(){var e,a,i,n,s,o=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.model.queryLocation(),e=JSON.parse(uni.getStorageSync("__GWMS_APP_STATE_DATA__")),a=JSON.parse(uni.getStorageSync("sendSpot")),i={loginName:e.session.user.loginName,sendSpot:a,factoryCode:e.session.user.factoryCode,workArea:h.session.workareaCode},t.next=6,this.model.queryByFactoryCodeAndWorkAreaCode(i);case 6:n=t.sent,n.forEach((function(t){var e={};e.label=t.locationCode,e.value=t.locationCode+"("+t.sendSpot+")",e.sendSpot=t.sendSpot,o.list.push(e)})),s=uni.getStorageSync("mater"),this.material=JSON.parse(s),this.number=this.material.requestAmount,uni.removeStorageSync("mater"),uni.removeStorageSync("sendSpot"),"wllist"in this.material&&this.material.wllist.forEach((function(t){var e={value:t.wlCode},a={value:e,num:t.receiptAmount};o.LocationList.push(a)}));case 14:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"confirm",value:function(){var t=this;if(""!=this.wlCode&&""!=this.number)if(parseFloat(this.number)<=0)uni.showToast({icon:"none",title:"请输入正确的库位和数量"});else{if(0!=this.LocationList.length){this.LocationList.forEach((function(e){e.value.sendSpot==t.wlCode.sendSpot||uni.showToast({icon:"none",title:"请重新选择库位"})}));var e=0;this.LocationList.forEach((function(t){e+=parseFloat(t.num)})),e+=parseFloat(this.number);var a={value:this.wlCode,num:this.number};return this.LocationList.push(a),this.material.receiptAmount=e,void(this.number="")}if(0==this.LocationList.length){var i={value:this.wlCode,num:this.number};return this.LocationList.push(i),this.material.receiptAmount=this.number,void(this.number="")}}else uni.showToast({icon:"none",title:"请输入正确的库位和数量"})}},{key:"deleteItem",value:function(t){this.LocationList.splice(t,1)}},{key:"bookTypeChange",value:function(t){this.wlCode=t.pickerName}},{key:"Reservoir",value:function(){var t=this,e=[],a=0;this.LocationList.forEach((function(i){var n=JSON.stringify(t.material),s=JSON.parse(n);s.wlCode=i.value.label,s.receiptAmount=i.num,e.push(s);var o=parseInt(i.num);a+=o})),this.material.wllist=null,this.material.wllist=e,this.material.receiptAmount=a,uni.setStorageSync("material",JSON.stringify(this.material)),this.redirectTo(this.page.raw.ingoods.poReceipt.detail)}}]),a}(u.BasePage);m=(0,c.__decorate)([(0,d.Component)({components:{jPicker:v.default,combox:v.default}})],m);var b=m;e.default=b},2652:function(t,e,a){var i=a("c1f92");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=a("4f06").default;n("69c24884",i,!0,{sourceMap:!1,shadowMode:!1})},"4fbd":function(t,e,a){"use strict";a.r(e);var i=a("ac7b"),n=a("c969");for(var s in n)["default"].indexOf(s)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(s);a("a6d8");var o,r=a("f0c5"),l=Object(r["a"])(n["default"],i["b"],i["c"],!1,null,"2b7e6094",null,!1,i["a"],o);e["default"]=l.exports},a6d8:function(t,e,a){"use strict";var i=a("2652"),n=a.n(i);n.a},ac7b:function(t,e,a){"use strict";a.d(e,"b",(function(){return n})),a.d(e,"c",(function(){return s})),a.d(e,"a",(function(){return i}));var i={uIcon:a("f86b").default,uButton:a("d9ad")