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
24 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-raw-ingoods-dnReceipt-ImportDN"],{"0886":function(e,t,a){var i=a("b713");"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var n=a("4f06").default;n("be0b13b6",i,!0,{sourceMap:!1,shadowMode:!1})},"0ae5":function(e,t,a){"use strict";var i=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=i(a("1da1")),r=i(a("d4ec")),o=i(a("bee2")),s=i(a("262e")),u=i(a("2caf")),l=a("9ab4"),c=a("60a3"),d=a("22da"),p=i(a("34b3")),f=a("54a3"),h=i(a("e007")),v=function(e){(0,s.default)(a,e);var t=(0,u.default)(a);function a(){var e;return(0,r.default)(this,a),e=t.apply(this,arguments),e.model=h.default,e.form={documentNo:""},e.material={},e.poList=[],e.materialList=[],e.every="",e.value="",e.type="text",e.border=!0,e.Cumulative=0,e.sendSpotList=[],e.receiptAmount="",e.Location=[],e.LocationList=[],e.wlCode="",e.upload=[],e}return(0,o.default)(a,[{key:"onShow",value:function(){var e=(0,n.default)(regeneratorRuntime.mark((function e(){var t,a,i,n,r,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,i=JSON.parse(localStorage.getItem("sendSpot")),n={loginName:t.session.user.loginName,sendSpot:i,factoryCode:t.session.user.factoryCode,workArea:a.list[0].workareaCode},e.next=6,this.model.queryByFactoryCodeAndWorkAreaCode(n);case 6:r=e.sent,r.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.ImportQueryOrderInfo(this.form.documentNo);case 5:t=localStorage.getItem("list"),localStorage.removeItem("list"),this.material=JSON.parse(t),this.material.forEach((function(e){var t={};t.label=e.poNo,t.value=e.poNo,a.poList.push(t)}));case 9:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"poListChoice",value:function(e){var t=this;this.material.forEach((function(a){if(a.poNo==e.pickerName.value){var i={};i.label=a.materialCode,i.value=a.materialCode,t.materialList.push(i)}}))}},{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){console.log("e>>>>>>>>>>>>>>>>>>>>>>>>",e),this.wlCode=e.pickerName}},{key:"Add",value:function(){var e=this;if(""!=this.receiptAmount&&""!=this.wlCode)if(parseFloat(this.receiptAmount)<=0)uni.showToast({icon:"none",title:"请输入大于0的数量"});else if(parseFloat(this.receiptAmount)>this.every.requestAmount)uni.showToast({icon:"none",title:"不能大于需求数量,请重新输入"});else{var t=!0;if(0!=this.sendSpotList.length&&this.sendSpotList.forEach((function(a){e.wlCode.sendSpot!=a&&(t=!1)})),1==t){var a=JSON.stringify(this.every),i=JSON.parse(a);i.wllist=null,i.receiptAmount=this.receiptAmount,i.wlCode=this.wlCode.label,this.sendSpotList.push(this.wlCode.sendSpot),console.log("this.sendSpotList",this.sendSpotList),console.log("TEM",i),this.LocationList.push(i),this.every.wllist=this.LocationList,console.log("表格数据",this.LocationList),console.log("要上传的数据",this.every),this.receiptAmount="",t=!0,this.business()}else uni.showToast({icon:"none",title:"请选择相同库位"})}else uni.showToast({icon:"none",title:"请输入正确的库位和数量"})}},{key:"deleteItem",value:function(e){this.LocationList.splice(e,1),this.every.wllist.splice(e,1),console.log("表格数据",this.LocationList),console.log("要上传