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
25 KiB
JavaScript
1 line
25 KiB
JavaScript
2 years ago
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-raw-ingoods-dnReceipt-ImportDN"],{"0ae5":function(e,t,i){"use strict";var n=i("4ea4");i("a623"),i("4160"),i("a434"),i("acd8"),i("159b"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i("96cf");var a=n(i("1da1")),r=n(i("d4ec")),o=n(i("bee2")),s=n(i("262e")),u=n(i("2caf")),l=i("9ab4"),c=i("60a3"),d=i("22da"),p=n(i("34b3")),f=i("54a3"),h=n(i("e007")),v=function(e){(0,s.default)(i,e);var t=(0,u.default)(i);function i(){var e;return(0,r.default)(this,i),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)(i,[{key:"onReady",value:function(){var e=(0,a.default)(regeneratorRuntime.mark((function e(){var t,i,n,a,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__")),i=f.session.user,n=JSON.parse(localStorage.getItem("sendSpot")),a={loginName:t.session.user.loginName,sendSpot:n,factoryCode:t.session.user.factoryCode,workArea:i.list[0].workareaCode},e.next=6,this.model.queryByFactoryCodeAndWorkAreaCode(a);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,a.default)(regeneratorRuntime.mark((function e(){var t,i=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:this.$t("message.Commission_tips1")}),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,i.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(i){if(i.poNo==e.pickerName.value){var n={};n.label=i.materialCode,n.value=i.materialCode,t.materialList.push(n)}}))}},{key:"materialChoice",value:function(e){var t=this;this.material.forEach((function(i){i.materialCode!=e.pickerName.value||(t.every=i)}))}},{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:this.$t("message.Commission_tips3")});else if(parseFloat(this.receiptAmount)>this.every.requestAmount)uni.showToast({icon:"none",title:this.$t("message.Commission_tips4")});else{var t=!0;if(0!=this.sendSpotList.length&&this.sendSpotList.forEach((function(i){e.wlCode.sendSpot!=i&&(t=!1)})),1==t){var i=JSON.stringify(this.every),n=JSON.parse(i);n.wllist=null,n.receiptAmount=this.receiptAmount,n.wlCode=this.wlCode.label,this.sendSpotList.push(this.wlCode.sendSpot),console.log("this.sendSpotList",this.sendSpotList),console.log("TEM",n),this.LocationList.push(n),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:this.$t("message._tips5")})}else uni.showToast({icon:"none",title:this.$t("message.Commission_tips2")})}},{key:"deleteItem",value:function(e){this.LocationList.splice(e,1),this.every.wllist.splice(e,1),console.log("表格数据",this.LocationList),console.log("要上传的数据",this.every),this.business()}},{key:"onSubmit",value:function(){var e=(0,a.default)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wra
|