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
39 KiB
JavaScript
1 line
39 KiB
JavaScript
2 years ago
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-raw-ingoods-dnReceipt-ImportDN"],{"06c5":function(e,t,i){"use strict";i("a630"),i("fb6a"),i("d3b7"),i("25f0"),i("3ca3"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var n=a(i("6b75"));function a(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(e){if("string"===typeof e)return(0,n.default)(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?(0,n.default)(e,t):void 0}}},"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 a=n(i("5530")),r=n(i("2909"));i("96cf");var o=n(i("1da1")),s=n(i("d4ec")),l=n(i("bee2")),c=n(i("262e")),u=n(i("2caf")),d=i("9ab4"),p=i("60a3"),f=i("22da"),h=n(i("34b3")),v=i("54a3"),m=n(i("e007")),g=i("8b71"),b=function(e){(0,c.default)(i,e);var t=(0,u.default)(i);function i(){var e;return(0,s.default)(this,i),e=t.apply(this,arguments),e.model=m.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,l.default)(i,[{key:"initLocation",value:function(){var e=(0,o.default)(regeneratorRuntime.mark((function e(t){var i,n,a,r,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return console.log("condition>>>>>>>>>>>>>>>>>>.",t),i=[],n=JSON.parse(localStorage.getItem("__GWMS_APP_STATE_DATA__")),a=JSON.parse(localStorage.getItem("sendSpot")),r={loginName:n.session.user.loginName,sendSpot:a,factoryCode:n.session.user.factoryCode,workArea:v.session.workareaCode},e.next=7,this.model.queryByFactoryCodeAndWorkAreaCode(r);case 7:return o=e.sent,console.log(">>>>>>>>>>>>>>",o),o.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 11: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"!=m.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({icon:"success",title:this.$t("message.successful")}),t=localStorage.getItem("list"),localStorage.removeItem("list"),this.material=JSON.parse(t),this.DNReceivingList=JSON.parse(t),this.DNReceivingList.forEach((function(e){e.wllist=[]})),this.poList=(0,r.default)(this.DNReceivingList),i=this.removeDuplicates(this.poList,"poNo"),i.forEach((function(e){e.label=e.poNo,e.value=e.poNo})),this.poList=i,this.poListChoice({pickerName:this.poList.find((function(){return!0}))});case 21:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"removeDuplicates",value:function(e,t){var i={},n=[];return n=e.reduce((function(e,n){return!i[n[t]]&&(i[n[t]]=e.push(n)),e}),[]),n}},{key:"totalLocation",value:function(e){var t=e.reduce((function(e,t){return e+ +t.receiptAmount}),0);return t}},{key:"poListChoice",value:function(e){this.receiptAmount="",this.poNo=e.pickerName.value,this.materialList=JSON.parse(JSON.stringify(this.removeDuplicates(this.material,"materialCode"))),this.materialList=this.materialList.filter((function(t){if(t.poNo==e.pickerName.value)return t.label=t.materialCode,t.value=t.materialCode,!0})),this.materialCho
|