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

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-raw-ingoods-poReceipt-idetailed"],{"1ec5":function(t,e,a){"use strict";var i=a("4ea4");a("4160"),a("a434"),a("acd8"),a("e25e"),a("159b"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("96cf");var s=i(a("1da1")),n=i(a("d4ec")),o=i(a("bee2")),r=i(a("262e")),l=i(a("2caf")),c=a("9ab4"),d=a("60a3"),u=a("22da"),p=i(a("31aa")),f=a("b710"),m=i(a("34b3")),h=a("54a3"),v=function(t){(0,r.default)(a,t);var e=(0,l.default)(a);function a(){var t;return(0,n.default)(this,a),t=e.apply(this,arguments),t.model=p.default,t.factoryCode=h.session.factoryCode,t.locationCode="",t.candidates=["库位1","库位2","库位3"],t.number="",t.wlCode="",t.material={},t.list=[],t.LocationList=[],t.documentNo="",t.headers=f.headers,t}return(0,o.default)(a,[{key:"onReady",value:function(){var t=(0,s.default)(regeneratorRuntime.mark((function t(){var e,a,i,s,n,o,r=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.model.queryLocation(),e=JSON.parse(localStorage.getItem("__GWMS_APP_STATE_DATA__")),a=h.session.user,i=JSON.parse(localStorage.getItem("sendSpot")),s={loginName:e.session.user.loginName,sendSpot:i,factoryCode:e.session.user.factoryCode,workArea:a.list[0].workareaCode},t.next=7,this.model.queryByFactoryCodeAndWorkAreaCode(s);case 7:n=t.sent,n.forEach((function(t){var e={};e.label=t.locationCode,e.value=t.locationCode+"("+t.sendSpot+")",e.sendSpot=t.sendSpot,r.list.push(e)})),o=sessionStorage.getItem("mater"),this.material=JSON.parse(o),this.number=this.material.requestAmount,sessionStorage.removeItem("mater"),localStorage.removeItem("sendSpot"),this.material.hasOwnProperty("wllist")&&this.material.wllist.forEach((function(t){var e={value:t.wlCode},a={value:e,num:t.receiptAmount};r.LocationList.push(a)}));case 15:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"confirm",value:function(){var t=this;if(""!=this.wlCode&&""!=this.number)if(parseFloat(this.number)<=0)uni.showToast({icon:"none",title:"请输入正确的库位和数量"});else{if(0!=this.LocationList.length){this.LocationList.forEach((function(e){e.value.sendSpot==t.wlCode.sendSpot||uni.showToast({icon:"none",title:"请重新选择库位"})}));var e=0;this.LocationList.forEach((function(t){e+=parseFloat(t.num)})),e+=parseFloat(this.number);var a={value:this.wlCode,num:this.number};return this.LocationList.push(a),this.material.receiptAmount=e,void(this.number="")}if(0==this.LocationList.length){var i={value:this.wlCode,num:this.number};return this.LocationList.push(i),this.material.receiptAmount=this.number,void(this.number="")}}else uni.showToast({icon:"none",title:"请输入正确的库位和数量"})}},{key:"deleteItem",value:function(t){this.LocationList.splice(t,1)}},{key:"bookTypeChange",value:function(t){this.wlCode=t.pickerName}},{key:"Reservoir",value:function(){var t=this,e=[],a=0;this.LocationList.forEach((function(i){var s=JSON.stringify(t.material),n=JSON.parse(s);n.wlCode=i.value.label,n.receiptAmount=i.num,e.push(n);var o=parseInt(i.num);a+=o})),this.material.wllist=null,this.material.wllist=e,this.material.receiptAmount=a,sessionStorage.setItem("material",JSON.stringify(this.material)),this.redirectTo(this.page.raw.ingoods.poReceipt.detail)}}]),a}(u.BasePage);v=(0,c.__decorate)([(0,d.Component)({components:{jPicker:m.default,combox:m.default}})],v);var g=v;e.default=g},3053:function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题<EFBFBD><EFBFBD>