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
30 KiB
JavaScript
1 line
30 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("45fc"),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")),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")),b=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.value="",e.type="text",e.border=!0,e.receiptAmount="",e.Location=[],e.newLocation=[],e.LocationList=[],e.wl={value:null},e.poNo=null,e.requestAmount=null,e.upload=[],e}return(0,c.default)(i,[{key:"onReady",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:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}()},{key:"initLocation",value:function(){var e=(0,o.default)(regeneratorRuntime.mark((function e(){var t,i,n,a,r=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=JSON.parse(localStorage.getItem("sendSpot")),n={loginName:t.session.user.loginName,sendSpot:i,factoryCode:t.session.user.factoryCode,workArea:m.session.workareaCode},e.next=5,this.model.queryByFactoryCodeAndWorkAreaCode(n);case 5:a=e.sent,a.forEach((function(e){console.log("res is:",a);var t={};t.label=e.locationCode,t.value=e.locationCode+"("+e.sendSpot+")",t.sendSpot=e.sendSpot,r.Location.push(t)}));case 7:case"end":return e.stop()}}),e,this)})));function 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.form.documentNo){e.next=3;break}return uni.showToast({icon:"none",title:this.$t("message.Commission_tips1")}),e.abrupt("return");case 3:return this.initLocation(),e.next=6,this.model.ImportQueryOrderInfo(this.form.documentNo);case 6:"1"==v.default.code&&uni.showToast({icon:"none",title:this.$t("message.successful")}),t=localStorage.getItem("list"),localStorage.removeItem("list"),this.material=JSON.parse(t),this.poList=(0,r.default)(this.material),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 15: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.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.materialChoice({pickerName:this.materialList.find((function(){return!0}))})}},{key:"materialChoice",
|