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
23 KiB
JavaScript
1 line
23 KiB
JavaScript
2 years ago
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-raw-commission-entrant-index"],{"0d7d":function(e,t,a){"use strict";a.r(t);var r=a("af12"),n=a("2e1d");for(var i in n)["default"].indexOf(i)<0&&function(e){a.d(t,e,(function(){return n[e]}))}(i);a("4640");var o,u=a("f0c5"),s=Object(u["a"])(n["default"],r["b"],r["c"],!1,null,"a54c18f8",null,!1,r["a"],o);t["default"]=s.exports},"1b63":function(e,t,a){"use strict";var r=a("4ea4");a("a623"),a("4160"),a("a434"),a("acd8"),a("159b"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a("96cf");var n=r(a("1da1")),i=r(a("d4ec")),o=r(a("bee2")),u=r(a("262e")),s=r(a("2caf")),l=a("9ab4"),c=a("60a3"),d=a("22da"),p=r(a("34b3")),f=a("54a3"),h=r(a("3c24")),v=function(e){(0,u.default)(a,e);var t=(0,s.default)(a);function a(){var e;return(0,i.default)(this,a),e=t.apply(this,arguments),e.model=h.default,e.form={documentNo:""},e.material={},e.materialList=[],e.list=[],e.every="",e.value="",e.type="text",e.border=!0,e.nowAmount="",e.Location=[],e.wlCode="",e}return(0,o.default)(a,[{key:"onShow",value:function(){var e=(0,n.default)(regeneratorRuntime.mark((function e(){var t,a,r,n,i,o=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=JSON.parse(localStorage.getItem("__GWMS_APP_STATE_DATA__")),a=f.session.user,r=JSON.parse(localStorage.getItem("sendSpot")),n={loginName:t.session.user.loginName,sendSpot:r,factoryCode:t.session.user.factoryCode,workArea:a.list[0].workareaCode},e.next=6,this.model.queryByFactoryCodeAndWorkAreaCode(n);case 6:i=e.sent,i.forEach((function(e){var t={};t.label=e.locationCode,t.value=e.locationCode+"("+e.sendSpot+")",t.sendSpot=e.sendSpot,o.Location.push(t)}));case 8:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"query",value:function(){var e=(0,n.default)(regeneratorRuntime.mark((function e(){var t,a=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(""!=this.form.documentNo){e.next=3;break}return uni.showToast({icon:"none",title:"请输入单号"}),e.abrupt("return");case 3:return e.next=5,this.model.queryOutsourcing(this.form.documentNo);case 5:t=e.sent,this.material=t.data,this.material.forEach((function(e){var t={};t.label=e.materialCode,t.value=e.materialCode,a.materialList.push(t)}));case 8:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"materialChoice",value:function(e){var t=this;this.material.forEach((function(a){a.materialCode!=e.pickerName.value||(t.every=a)}))}},{key:"LocationChoice",value:function(e){this.wlCode=e.pickerName}},{key:"Add",value:function(){if(""!=this.nowAmount&&""!=this.wlCode)if(parseFloat(this.nowAmount)<=0)uni.showToast({icon:"none",title:"请输入大于0的数量"});else if(parseFloat(this.nowAmount)>this.every.poAmount)uni.showToast({icon:"none",title:"不能大于需求数量,请重新输入"});else{var e={wlCode:this.wlCode.label,nowAmount:this.nowAmount};this.list.push(e),this.business()}else uni.showToast({icon:"none",title:"请输入正确的库位和数量"})}},{key:"deleteItem",value:function(e){this.list.splice(e,1),this.business()}},{key:"onSubmit",value:function(){var e=(0,n.default)(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return null!=this.list&&0!=this.list.length||uni.showToast({icon:"none",title:"请确保所选物料已分配库位"}),t={poNo:this.form.documentNo,materialCode:this.every.materialCode,loginName:f.session.loginName,factoryCode:f.session.factoryCode,list:this.list},e.next=4,this.model.submitOutsourcing(t);case 4:this.list=[],this.wlCode="",this.nowAmount="",this.every="",this.materialList=[];case 9:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"bill",value:function(){this.redirectTo(this.page.raw.ingoods.dnReceipt.bill)}},{key:"business",value:function(){var e=0;this.list.forEach((function(t){e+=parseFloat(t.nowAmount)})),this.every.receiptAmo
|