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

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-raw-ingoods-dnReceipt-ImportDN"],{"0ae5":function(e,t,i){"use strict";var n=i("4ea4");i("a623"),i("4de4"),i("7db0"),i("4160"),i("13d5"),i("a434"),i("acd8"),i("159b"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(i("5530")),a=n(i("2909"));i("96cf");var o=n(i("1da1")),s=n(i("d4ec")),c=n(i("bee2")),u=n(i("262e")),l=n(i("2caf")),d=i("9ab4"),p=i("60a3"),f=i("22da"),h=n(i("34b3")),m=i("54a3"),v=n(i("e007")),g=i("8b71"),y=i("110c"),w=function(e){(0,u.default)(i,e);var t=(0,l.default)(i);function i(){var e;return(0,s.default)(this,i),e=t.apply(this,arguments),e.model=v.default,e.form={documentNo:""},e.material=[],e.poList=[],e.materialList=[],e.every={},e.everyIndex="",e.value="",e.headers=g.headers,e.type="text",e.DNReceivingList=[],e.border=!0,e.receiptAmount="",e.Location=[],e.LocationList=[],e.wl={value:null},e.poNo=null,e.requestAmount=null,e}return(0,c.default)(i,[{key:"onShow",value:function(){var e=(0,o.default)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.queryLoction();case 2:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"queryLoction",value:function(){var e=(0,o.default)(regeneratorRuntime.mark((function e(){var t,i,n,r,a=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.Location=[],t=JSON.parse(uni.getStorageSync("sendSpot")),i=this.model.orderInInfoList.find((function(e){return e.poNo==a.poNo&&e.materialCode==a.every.materialCode})),uni.setStorageSync("sendSpot",JSON.stringify(i.sendSpot)),n={loginName:m.session.loginName,sendSpot:t,factoryCode:m.session.factoryCode,workArea:m.session.workareaCode},e.next=7,this.model.queryByFactoryCodeAndWorkAreaCode(n);case 7:r=e.sent,r.forEach((function(e){var t={};t.label=e.locationCode,t.value=e.locationCode+"("+e.sendSpot+")",t.sendSpot=e.sendSpot,a.Location.push(t)})),this.wl=this.Location[0];case 10:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"initLocation",value:function(){var e=(0,o.default)(regeneratorRuntime.mark((function e(t){var i,n,r,a,o,s,c=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return console.log("condition>>>>>>>>>>>>>>>>>>.",t),i=[],n=JSON.parse(uni.getStorageSync("__GWMS_APP_STATE_DATA__")),r=JSON.parse(uni.getStorageSync("sendSpot")),a=this.model.orderInInfoList.find((function(e){return e.poNo==c.poNo&&e.materialCode==c.every.materialCode})),uni.setStorageSync("sendSpot",JSON.stringify(a.sendSpot)),o={loginName:n.session.user.loginName,sendSpot:r,factoryCode:n.session.user.factoryCode,workArea:m.session.workareaCode},e.next=9,this.model.queryByFactoryCodeAndWorkAreaCode(o);case 9:return s=e.sent,console.log(">>>>>>>>>>>>>>",s),s.forEach((function(e){if(e.sendSpot===t.sendSpot){var n={};n.label=e.locationCode,n.value=e.locationCode+"("+e.sendSpot+")",n.sendSpot=e.sendSpot,i.push(n)}})),e.abrupt("return",i);case 13:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"query",value:function(){var e=(0,o.default)(regeneratorRuntime.mark((function e(){var t,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.empty(),this.form.documentNo){e.next=4;break}return this.customToast(this.$t("message.Commission_tips1")),e.abrupt("return");case 4:return e.next=6,this.model.ImportQueryOrderInfo(this.form.documentNo);case 6:if("1"!=v.default.code){e.next=21;break}if(0!=this.model.orderInInfoList.length){e.next=10;break}return this.empty(),e.abrupt("return");case 10:uni.showToast({title:this.$t("message.successful"),duration:2e3,image:"/static/icons/icon-51.png"}),t=uni.getStorageSync("list"),uni.removeStorageSync("list"),this.material=JSON.parse(t),this.DNReceivingList=JSON.parse(t),this.DNReceivingList.forEach((function(e){e.wllist=[]})),this.poList=(0,a.default)(this.DNReceivingList),i=this.re