(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-6eda"],{"+mvG":function(t,e,o){},"14Xm":function(t,e,o){t.exports=o("cSMa")},D3Ub:function(t,e,o){"use strict";e.__esModule=!0;var a=function(t){return t&&t.__esModule?t:{default:t}}(o("4d7F"));e.default=function(t){return function(){var e=t.apply(this,arguments);return new a.default(function(t,o){return function r(n,i){try{var s=e[n](i),c=s.value}catch(t){return void o(t)}if(!s.done)return a.default.resolve(c).then(function(t){r("next",t)},function(t){r("throw",t)});t(c)}("next")})}}},cBws:function(t,e,o){"use strict";o.r(e);var a=o("14Xm"),r=o.n(a),n=o("gDS+"),i=o.n(n),s=o("D3Ub"),c=o.n(s),l=o("FVHZ");o("EVdn");window.$=window.jQuery=o("EVdn");var u={components:{Screenfull:l.a},data:function(){return{dialogVisible:!1,mastData:{},form:{name:"",region:"",date1:"",date2:"",delivery:!1,type:[],resource:"",desc:""},isFullscreen:!1,positionCount:"",hasStorageCount:"",noStorageCount:"",productStorage:"",formData:{storage_Id:null,storageName:null,areaCode:"1"},storageList:[],storageAreaList:[]}},mounted:function(){},created:function(){this.getPostionNameSum(),this.getStorageList(),this.positionClick()},methods:{onStorageChange:function(t){var e=this;this.storageAreaList=[],this.formData.areaCode=null,this.storageData=this.storageList.find(function(e){return e.storage_Id===t}),this.formData.storageName=this.storageData.storageName;var o={storage_Id:t};this.common.ajax("/api/basicInfo/base/position/getStorageAreaList",o,function(t){e.common.showMsg(t),t.result&&(e.storageAreaList=t.data)},!0)},onStorageAreaChange:function(t){this.areaData=this.storageAreaList.find(function(e){return e.areaCode===t}),this.formData.areaCode=t,this.getPostionNameSum(),this.positionClick(),this.loadPositionData()},positionClick:function(){var t=this;$("svg g").unbind().click(function(){var e=$(this).attr("id");if(e&&-1!==e.indexOf("icon-")){var o=$(this).find("desc").html();if(o&&"输送线占用"!==o){var a=o.split(" ")[0];t.getPostionName(a)}var r=$(this).find("rect");r&&r.length&&(r.removeAttr("class"),r.attr("fill","green"))}})},onSubmit:function(){this.$message("submit!")},onCancel:function(){this.$message({message:"cancel!",type:"warning"})},getPostionName:function(t){var e=this,o={positionName:t,storage_Id:this.formData.storage_Id};this.common.ajax("/api/wcs/getPostionName",o,function(){var t=c()(r.a.mark(function t(o){var a,n,s;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:o.result?(e.mastData=o.data.postionInfo,console.log(i()(e.mastData)),(a=o.data.productPositionList).length>0&&(n=0,s=0,a.forEach(function(t){t.validQty&&(n+=t.validQty),t.productStorage&&(s+=t.productStorage)}),e.mastData.validQty=n,e.mastData.productStorage=s,e.mastData.productName=a[0].productName,e.mastData.plateCode=a[0].plateCode,e.mastData.plateTypeCode=a[0].plateTypeCode,e.mastData.plateType=a[0].plateType,e.mastData.batchNumber=a[0].batchNumber,e.mastData.produceDate=e.common.formatDate(a[0].produceDate,"yyyy-MM-dd"),e.mastData.inStorageDate=e.common.formatDate(a[0].inStorageDate,"yyyy-MM-dd")),e.dialogVisible=!0):e.common.showMsg(o);case 1:case"end":return t.stop()}},t,e)}));return function(e){return t.apply(this,arguments)}}(),!0)},screenFullToggle:function(t){this.isFullscreen=t;var e=document.getElementById("app-box"),o=document.getElementById("app-content");t?(document.body.appendChild(o),document.body.style.overflowX="hidden",document.body.style.overflowY="hidden"):(e.appendChild(o),document.body.style.overflowX="hidden",document.body.style.overflowY="auto")},mapZoom:function(t){var e=document.getElementById("svg-box"),o=Number(e.clientWidth||538),a=Number(e.clientHeight||768);"big"===t?(e.style.width=1.25*o+"px",e.style.height=1.25*a+"px"):(e.style.width=.75*o+"px",e.style.height=.75*a+"px")},getPostionNameSum:function(){var t=this,e={areaCode:this.formData.areaCode,storage_Id:this.formData.storage_Id};this.common.ajax("/api/basicInfo/bigdata/positionShow/getPostionNameSum",e,function(e){e.result&&(t.positionCount=e.data.positionCount,t.hasStorageCount=e.data.hasStorageCount,t.noStorageCount=e.data.noStorageCount,t.productStorage=e.data.productStorage)})},getStorageList:function(){var t=this;this.common.ajax("/api/basicInfo/base/storage/getList",{appendField:"*"},function(e){t.common.showMsg(e),e.result&&(t.storageList=e.data)},!0)},loadPositionData:function(){var t={storage_Id:this.areaData.storage_Id,areaCode:this.areaData.areaCode};this.common.ajax("/api/basicInfo/base/position/loadPositionData",t,function(t){t.result&&$.each(t.data,function(t,e){if(e.productStorage>0){var o=$("svg g").find("desc:contains('"+e.positionName+"')").parent(),a=o.find("rect");a&&a.length&&(a.removeAttr("class"),a.attr("fill","green"),o.find("text").attr("fill","white"))}})})}}},f=(o("p45a"),o("KHd+")),d=Object(f.a)(u,function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"app-container",attrs:{id:"app-box"}},[o("div",{class:{"app-content":!0,fullscreen:t.isFullscreen},attrs:{id:"app-content"}},[o("el-scrollbar",{attrs:{noresize:!1,native:!1,"wrap-class":"popover-options scrollbar-wrap"}},[o("div",{staticClass:"tool-box"},[o("el-tooltip",{staticClass:"screenfull-tootip",attrs:{content:"全屏",effect:"dark",placement:"top-end"}},[o("screenfull",{staticClass:"btn-screenfull",on:{toggle:t.screenFullToggle}})],1),t._v(" "),o("el-tooltip",{staticClass:"screenfull-tootip",attrs:{content:"放大",effect:"dark",placement:"top-end"}},[o("el-button",{attrs:{type:"text",icon:"el-icon-yrt-jiahao"},on:{click:function(e){return t.mapZoom("big")}}},[t._v("放大")])],1),t._v(" "),o("el-tooltip",{staticClass:"screenfull-tootip",attrs:{content:"缩小",effect:"dark",placement:"top-end"}},[o("el-button",{attrs:{type:"text",icon:"el-icon-yrt-icon_cut"},on:{click:function(e){return t.mapZoom("small")}}},[t._v("缩小")])],1),t._v(" "),o("el-select",{attrs:{placeholder:"请选择仓库"},on:{change:function(e){return t.onStorageChange(t.formData.storage_Id)}},model:{value:t.formData.storage_Id,callback:function(e){t.$set(t.formData,"storage_Id",e)},expression:"formData.storage_Id"}},t._l(t.storageList,function(t,e){return o("el-option",{key:e,attrs:{label:t.storageName,value:t.storage_Id}})}),1),t._v(" "),o("el-select",{attrs:{placeholder:"请选择库区"},on:{change:function(e){return t.onStorageAreaChange(t.formData.areaCode)}},model:{value:t.formData.areaCode,callback:function(e){t.$set(t.formData,"areaCode",e)},expression:"formData.areaCode"}},t._l(t.storageAreaList,function(t,e){return o("el-option",{key:e,attrs:{label:t.areaCode,value:t.areaCode}})}),1),t._v(" "),o("el-button",{attrs:{type:"text"}},[t._v("货位总数:")]),t._v(" "),o("el-button",{attrs:{type:"text"}},[t._v(t._s(t.positionCount))]),t._v(" "),o("el-button",{attrs:{type:"text"}},[t._v("已用货位数:")]),t._v(" "),o("el-button",{attrs:{type:"text"}},[t._v(t._s(t.hasStorageCount))]),t._v(" "),o("el-button",{attrs:{type:"text"}},[t._v("空货位数:")]),t._v(" "),o("el-button",{attrs:{type:"text"}},[t._v(t._s(t.noStorageCount))]),t._v(" "),o("el-button",{attrs:{type:"text"}},[t._v("物料总数量:")]),t._v(" "),o("el-button",{attrs:{type:"text"}},[t._v(t._s(t.productStorage))])],1),t._v(" "),o("el-row",{staticClass:"app-el-row"},[o("el-col",{attrs:{span:19}},[o("div",{staticClass:"app-el-col",attrs:{id:"svg-box"}},[o("svg-icon",{staticStyle:{width:"100%",height:"100%"},attrs:{"icon-class":"p"+t.formData.areaCode}})],1)])],1)],1),t._v(" "),o("el-dialog",{attrs:{visible:t.dialogVisible,title:"货位详情信息",width:"30%",height:"30%"},on:{"update:visible":function(e){t.dialogVisible=e}}},[o("el-card",{staticClass:"box-card"},[o("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[o("span",[t._v("详情")])]),t._v(" "),o("el-row",[o("el-col",{attrs:{span:24}},[o("div",{staticClass:"text item"},[t._v("\n 货位编号:"+t._s(t.mastData.positionName)+"\n ")]),t._v(" "),o("div",{staticClass:"text item"},[t._v("\n 器具种类:"+t._s(t.mastData.plateType)+"\n ")]),t._v(" "),o("div",{staticClass:"text item"},[t._v("\n 种类编号:"+t._s(t.mastData.plateTypeCode)+"\n ")]),t._v(" "),o("div",{staticClass:"text item"},[t._v("\n 器具编号:"+t._s(t.mastData.plateCode)+"\n ")]),t._v(" "),o("div",{staticClass:"text item"},[t._v("\n 物料名称:"+t._s(t.mastData.productName)+"\n ")]),t._v(" "),o("div",{staticClass:"text item"},[t._v("\n 总库存数量:"+t._s(t.mastData.productStorage)+"\n ")]),t._v(" "),o("div",{staticClass:"text item"},[t._v("\n 有效库存数量:"+t._s(t.mastData.validQty)+"\n ")]),t._v(" "),o("div",{staticClass:"text item"},[t._v("\n 批次号:"+t._s(t.mastData.batchNumber)+"\n ")]),t._v(" "),o("div",{staticClass:"text item"},[t._v("\n 生产日期:"+t._s(t.mastData.produceDate||t.mastData.inStorageDate)+"\n ")])])],1)],1),t._v(" "),o("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{on:{click:function(e){t.dialogVisible=!1}}},[t._v("关 闭")])],1)],1)],1)])},[],!1,null,null,null);d.options.__file="positionShow.vue";e.default=d.exports},cSMa:function(t,e,o){var a=function(){return this}()||Function("return this")(),r=a.regeneratorRuntime&&Object.getOwnPropertyNames(a).indexOf("regeneratorRuntime")>=0,n=r&&a.regeneratorRuntime;if(a.regeneratorRuntime=void 0,t.exports=o("u4eC"),r)a.regeneratorRuntime=n;else try{delete a.regeneratorRuntime}catch(t){a.regeneratorRuntime=void 0}},p45a:function(t,e,o){"use strict";var a=o("+mvG");o.n(a).a},u4eC:function(t,e){!function(e){"use strict";var o,a=Object.prototype,r=a.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",s=n.asyncIterator||"@@asyncIterator",c=n.toStringTag||"@@toStringTag",l="object"==typeof t,u=e.regeneratorRuntime;if(u)l&&(t.exports=u);else{(u=e.regeneratorRuntime=l?t.exports:{}).wrap=b;var f="suspendedStart",d="suspendedYield",h="executing",p="completed",m={},g={};g[i]=function(){return this};var v=Object.getPrototypeOf,y=v&&v(v(j([])));y&&y!==a&&r.call(y,i)&&(g=y);var _=D.prototype=x.prototype=Object.create(g);C.prototype=_.constructor=D,D.constructor=C,D[c]=C.displayName="GeneratorFunction",u.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===C||"GeneratorFunction"===(e.displayName||e.name))},u.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,D):(t.__proto__=D,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(_),t},u.awrap=function(t){return{__await:t}},S(L.prototype),L.prototype[s]=function(){return this},u.AsyncIterator=L,u.async=function(t,e,o,a){var r=new L(b(t,e,o,a));return u.isGeneratorFunction(e)?r:r.next().then(function(t){return t.done?t.value:r.next()})},S(_),_[c]="Generator",_[i]=function(){return this},_.toString=function(){return"[object Generator]"},u.keys=function(t){var e=[];for(var o in t)e.push(o);return e.reverse(),function o(){for(;e.length;){var a=e.pop();if(a in t)return o.value=a,o.done=!1,o}return o.done=!0,o}},u.values=j,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=o,this.done=!1,this.delegate=null,this.method="next",this.arg=o,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=o)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function a(a,r){return s.type="throw",s.arg=t,e.next=a,r&&(e.method="next",e.arg=o),!!r}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(t,e){for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var n=a;break}}n&&("break"===t||"continue"===t)&&n.tryLoc<=e&&e<=n.finallyLoc&&(n=null);var i=n?n.completion:{};return i.type=t,i.arg=e,n?(this.method="next",this.next=n.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.finallyLoc===t)return this.complete(o.completion,o.afterLoc),k(o),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc===t){var a=o.completion;if("throw"===a.type){var r=a.arg;k(o)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,a){return this.delegate={iterator:j(t),resultName:e,nextLoc:a},"next"===this.method&&(this.arg=o),m}}}function b(t,e,o,a){var r=e&&e.prototype instanceof x?e:x,n=Object.create(r.prototype),i=new I(a||[]);return n._invoke=function(t,e,o){var a=f;return function(r,n){if(a===h)throw new Error("Generator is already running");if(a===p){if("throw"===r)throw n;return P()}for(o.method=r,o.arg=n;;){var i=o.delegate;if(i){var s=N(i,o);if(s){if(s===m)continue;return s}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===f)throw a=p,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=h;var c=w(t,e,o);if("normal"===c.type){if(a=o.done?p:d,c.arg===m)continue;return{value:c.arg,done:o.done}}"throw"===c.type&&(a=p,o.method="throw",o.arg=c.arg)}}}(t,o,i),n}function w(t,e,o){try{return{type:"normal",arg:t.call(e,o)}}catch(t){return{type:"throw",arg:t}}}function x(){}function C(){}function D(){}function S(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function L(t){var e;this._invoke=function(o,a){function n(){return new Promise(function(e,n){!function e(o,a,n,i){var s=w(t[o],t,a);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then(function(t){e("next",t,n,i)},function(t){e("throw",t,n,i)}):Promise.resolve(l).then(function(t){c.value=t,n(c)},i)}i(s.arg)}(o,a,e,n)})}return e=e?e.then(n,n):n()}}function N(t,e){var a=t.iterator[e.method];if(a===o){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=o,N(t,e),"throw"===e.method))return m;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var r=w(a,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,m;var n=r.arg;return n?n.done?(e[t.resultName]=n.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=o),e.delegate=null,m):n:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function j(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,n=function e(){for(;++a<t.length;)if(r.call(t,a))return e.value=t[a],e.done=!1,e;return e.value=o,e.done=!0,e};return n.next=n}}return{next:P}}function P(){return{value:o,done:!0}}}(function(){return this}()||Function("return this")())}}]);
|