app.1668695772318.js 16 KB

1
  1. (function(e){function t(t){for(var o,r,i=t[0],c=t[1],u=t[2],l=0,d=[];l<i.length;l++)r=i[l],Object.prototype.hasOwnProperty.call(a,r)&&a[r]&&d.push(a[r][0]),a[r]=0;for(o in c)Object.prototype.hasOwnProperty.call(c,o)&&(e[o]=c[o]);p&&p(t);while(d.length)d.shift()();return s.push.apply(s,u||[]),n()}function n(){for(var e,t=0;t<s.length;t++){for(var n=s[t],o=!0,r=1;r<n.length;r++){var i=n[r];0!==a[i]&&(o=!1)}o&&(s.splice(t--,1),e=c(c.s=n[0]))}return e}var o={},r={app:0},a={app:0},s=[];function i(e){return c.p+"js/"+({}[e]||e)+".1668695772318.js"}function c(t){if(o[t])return o[t].exports;var n=o[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,c),n.l=!0,n.exports}c.e=function(e){var t=[],n={"chunk-25fe99da":1,"chunk-439966e0":1,"chunk-5190983c":1,"chunk-743c3027":1,"chunk-c89bae56":1,"chunk-4c732b19":1,"chunk-ea83faca":1};r[e]?t.push(r[e]):0!==r[e]&&n[e]&&t.push(r[e]=new Promise((function(t,n){for(var o="css/"+({}[e]||e)+"."+{"chunk-25fe99da":"d1c071e3","chunk-439966e0":"c226e69e","chunk-4b928543":"31d6cfe0","chunk-5190983c":"05b33d15","chunk-743c3027":"ef5aa059","chunk-c89bae56":"ec9984c3","chunk-4c732b19":"81fdd7e7","chunk-ea83faca":"7abf6d3f"}[e]+".css",a=c.p+o,s=document.getElementsByTagName("link"),i=0;i<s.length;i++){var u=s[i],l=u.getAttribute("data-href")||u.getAttribute("href");if("stylesheet"===u.rel&&(l===o||l===a))return t()}var d=document.getElementsByTagName("style");for(i=0;i<d.length;i++){u=d[i],l=u.getAttribute("data-href");if(l===o||l===a)return t()}var p=document.createElement("link");p.rel="stylesheet",p.type="text/css",p.onload=t,p.onerror=function(t){var o=t&&t.target&&t.target.src||a,s=new Error("Loading CSS chunk "+e+" failed.\n("+o+")");s.code="CSS_CHUNK_LOAD_FAILED",s.request=o,delete r[e],p.parentNode.removeChild(p),n(s)},p.href=a;var h=document.getElementsByTagName("head")[0];h.appendChild(p)})).then((function(){r[e]=0})));var o=a[e];if(0!==o)if(o)t.push(o[2]);else{var s=new Promise((function(t,n){o=a[e]=[t,n]}));t.push(o[2]=s);var u,l=document.createElement("script");l.charset="utf-8",l.timeout=120,c.nc&&l.setAttribute("nonce",c.nc),l.src=i(e);var d=new Error;u=function(t){l.onerror=l.onload=null,clearTimeout(p);var n=a[e];if(0!==n){if(n){var o=t&&("load"===t.type?"missing":t.type),r=t&&t.target&&t.target.src;d.message="Loading chunk "+e+" failed.\n("+o+": "+r+")",d.name="ChunkLoadError",d.type=o,d.request=r,n[1](d)}a[e]=void 0}};var p=setTimeout((function(){u({type:"timeout",target:l})}),12e4);l.onerror=l.onload=u,document.head.appendChild(l)}return Promise.all(t)},c.m=e,c.c=o,c.d=function(e,t,n){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},c.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,t){if(1&t&&(e=c(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(c.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)c.d(n,o,function(t){return e[t]}.bind(null,o));return n},c.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="/",c.oe=function(e){throw e};var u=window["webpackJsonp"]=window["webpackJsonp"]||[],l=u.push.bind(u);u.push=t,u=u.slice();for(var d=0;d<u.length;d++)t(u[d]);var p=l;s.push([0,"chunk-vendors"]),n()})({0:function(e,t,n){e.exports=n("56d7")},"0e00":function(e,t,n){e.exports=n.p+"img/out.580e5c5c.png"},1:function(e,t){},"15d9":function(e,t,n){"use strict";n("6a34")},"1e09":function(e,t,n){},2:function(e,t){},4360:function(e,t,n){"use strict";var o=n("4776"),r=n("7736"),a=n("c276"),s=n("5723");o["default"].use(r["a"]),t["a"]=new r["a"].Store({state:{hasGetInfo:!1,token:Object(a["b"])(),name:"",roleKey:"",materialCategoryId:""},mutations:{setToken(e,t){e.token=t,Object(a["d"])(t)},setName(e,t){e.name=t},setRoleKey(e,t){e.roleKey=t},setMaterialCategoryId(e,t){e.materialCategoryId=t},setHasGetInfo(e,t){e.hasGetInfo=t}},actions:{getUserInfo({state:e,commit:t}){return new Promise((e,n)=>{try{Object(s["f"])().then(n=>{0===n.code&&(t("setName",n.result.name),t("setRoleKey",n.result.roleKey),t("setMaterialCategoryId",n.result.materialCategoryId),t("setHasGetInfo",!0),e(n))}).catch(e=>{n(e)})}catch(o){n(o)}})}},modules:{}})},"45ac":function(e,t,n){},"4fcb":function(e,t,n){"use strict";n.d(t,"d",(function(){return r})),n.d(t,"m",(function(){return a})),n.d(t,"n",(function(){return s})),n.d(t,"o",(function(){return i})),n.d(t,"p",(function(){return c})),n.d(t,"l",(function(){return u})),n.d(t,"f",(function(){return l})),n.d(t,"a",(function(){return d})),n.d(t,"c",(function(){return p})),n.d(t,"q",(function(){return h})),n.d(t,"e",(function(){return m})),n.d(t,"b",(function(){return f})),n.d(t,"i",(function(){return g})),n.d(t,"k",(function(){return b})),n.d(t,"h",(function(){return y})),n.d(t,"g",(function(){return k})),n.d(t,"j",(function(){return v}));var o=n("66df");const r=(e={})=>o["a"].request({url:"/api/Integrated/GetHasTagMaterialList",data:e,method:"post"}),a=(e={})=>o["a"].request({url:"/api/Integrated/PlcStorageIn",data:e,method:"post"}),s=(e={})=>o["a"].request({url:"/api/Integrated/PlcStorageOut",data:e,method:"post"}),i=(e={})=>o["a"].request({url:"/api/Integrated/ReScan",data:e,method:"post"}),c=(e={})=>o["a"].request({url:"/api/Integrated/SendInOutState",data:e,method:"post"}),u=(e={})=>o["a"].request({url:"/api/Integrated/OpenOrCloseStorageDoor",data:e,method:"post"}),l=(e={})=>o["a"].request({url:"/api/BaseData/GetMaterialCategoryZTree",data:e,method:"post"}),d=(e={})=>o["a"].request({url:"/api/ApplyTake/Add",data:e,method:"post"}),p=(e={})=>o["a"].request({url:"/api/Integrated/GetApplyTakeStockOut",data:e,method:"post"}),h=(e={})=>o["a"].request({url:"/api/Integrated/StopIllegalWarning",data:e,method:"post"}),m=(e={})=>o["a"].request({url:"/api/Integrated/GetIllegalData",data:e,method:"post"}),f=(e={})=>o["a"].request({url:"/api/Integrated/ExchangeStorage",data:e,method:"post"}),g=(e={})=>o["a"].request({url:"/api/BaseData/GetStockHouse",data:e,method:"post"}),b=(e={})=>o["a"].request({url:"http://120.79.80.64:8055/javaApi/getV3PlanData",data:e,method:"post"}),y=(e={})=>o["a"].request({url:"/api/SupplierShip/GetPurContractPageList",data:e,method:"post"}),k=(e={})=>o["a"].request({url:"/api/SupplierShip/GetPurBatchShip",data:e,method:"post"}),v=(e={})=>o["a"].request({url:"/api/SupplierShip/GetSupplierQRCode",data:e,method:"post"})},"56d7":function(e,t,n){"use strict";n.r(t);var o=n("4776"),r=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"app"}},[t("router-view")],1)},a=[],s=(n("3b08"),n("4ff3")),i=n.n(s),c=n("e999"),u=n("8376"),l=n("57bc"),d={data(){return{connection:null}},watch:{$route:{handler(e,t){"store-in"!==t.name&&"store-out"!==t.name||window.ws&&window.ws.close()}}},methods:{checkVersion(){i.a.defaults.headers.get["Cache-Control"]="no-cache",i.a.get("/version.json").then(e=>{let t=String(e.data.version);t!==localStorage.getItem("_version")&&(localStorage.setItem("_version",t),window.location.reload())})},SRConnection(){let e=this;async function t(){try{await e.connection.start()}catch(n){setTimeout(()=>t(),5e3)}}this.connection=(new c["a"]).withUrl(`${u["a"]}/plcHub?groupName=illegalPushGroup${sessionStorage.getItem("plcCode")}`).withAutomaticReconnect().withHubProtocol(new l["a"]).build(),this.connection.on("illegalStockInOut",e=>{this.connection.invoke("ReturnSureMes",e.MesId),["warning-list","check"].includes(this.$route.name)||this.$router.push({name:"check"})}),this.connection.start().then(()=>{}).catch(e=>{t()}),this.connection.onclose(()=>{this.connection=null})}},mounted(){this.SRConnection(),this.checkVersion(),this.checkVersion(),setInterval(()=>{this.checkVersion()},1e4)}},p=d,h=(n("d802"),n("0b56")),m=Object(h["a"])(p,r,a,!1,null,null,null),f=m.exports,g=n("a18c"),b=n("4360"),y=n("13eb"),k=n.n(y),v=(n("c1aa"),n("04be")),I=n.n(v);n("1e09");o["default"].use(k.a),o["default"].config.productionTip=!1,o["default"].prototype.$dayjs=I.a,new o["default"]({router:g["a"],store:b["a"],render:e=>e(f)}).$mount("#app")},5723:function(e,t,n){"use strict";n.d(t,"c",(function(){return r})),n.d(t,"f",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"b",(function(){return i})),n.d(t,"d",(function(){return c})),n.d(t,"a",(function(){return u}));var o=n("66df");const r=(e={})=>o["a"].request({url:"/api/Account/LoginByFace",data:e,method:"post"}),a=(e={})=>o["a"].request({url:"/api/User/GetUserInfo",data:e,method:"post"}),s=(e={})=>o["a"].request({url:"/api/User/UpdateFace",data:e,method:"post"}),i=(e={})=>o["a"].request({url:"/api/Account/Login",data:e,method:"post"}),c=(e={})=>o["a"].request({url:"/api/User/LoginQuit",data:e,method:"post"}),u=(e={})=>o["a"].request({url:"/api/User/FindByFace",data:e,method:"post"})},"66df":function(e,t,n){"use strict";var o=n("4ff3"),r=n.n(o),a=n("4360"),s=n("a18c"),i=n("13eb");class c{constructor(e=baseURL){this.baseUrl=e,this.queue={}}getInsideConfig(){const e={baseURL:this.baseUrl,headers:{TargetCode:2}};return e}destroy(e){delete this.queue[e],Object.keys(this.queue).length||i["Spin"].hide()}interceptors(e,t){e.interceptors.request.use(e=>(Object.keys(this.queue).length||e.data.isHiddenSpin||i["Spin"].show({render:e=>e("div",[e("Icon",{class:"demo-spin-icon-load",props:{type:"ios-loading",size:18}}),e("div","Loading")])}),this.queue[t]=!0,!e.data&&(e.data={}),a["a"].state.token&&(e.data.token=a["a"].state.token),e),e=>Promise.reject(e)),e.interceptors.response.use(e=>{this.destroy(t);const{data:n,status:o}=e;if(200===o)return 0!==n.code&&(104===n.code?(i["Message"].error("账户信息已过期!"),this.destroy(t),s["a"].replace({name:"Home",query:{plcCode:sessionStorage.getItem("plcCode"),door:sessionStorage.getItem("door")}}),a["a"].commit("setToken","")):i["Message"].error(n.msg),this.destroy(t)),n;i["Message"].error("请求失败!"),this.destroy(t)},e=>(e.response&&(404===e.response.status?i["Message"].error("未知的请求404!\n"+t):415===e.response.status?i["Message"].error(e.response.statusText):i["Message"].error("请求失败!")),this.destroy(t),Promise.reject(e)))}request(e){const t=r.a.create();return e=Object.assign(this.getInsideConfig(),e),this.interceptors(t,e.url),t(e)}}var u=c,l={baseUrl:{dev:"http://120.79.80.64:8002",pro:"http://120.79.80.64:8002"}};const d=l.baseUrl.pro,p=new u(d);t["a"]=p},"6a34":function(e,t,n){},"76e6":function(e,t,n){e.exports=n.p+"img/stock.eff15400.png"},8376:function(e,t,n){"use strict";let o={dev:"http://120.79.80.64:8002",pro:"http://120.79.80.64:8002"};const r=o.pro;t["a"]=r},"8bf8":function(e,t,n){e.exports=n.p+"img/in.67773ecf.png"},a18c:function(e,t,n){"use strict";n("3b08");var o=n("4776"),r=n("1ceb"),a=function(){var e=this,t=e._self._c;return t("div",{staticClass:"container"},[t("div",{staticClass:"btn"},[t("Button",{attrs:{type:"primary"},on:{click:e.closeDoor}},[e._v("关门")])],1),t("div",{staticClass:"store"},[e._v(e._s(e.getStoreTitle(e.plcCode,e.door)))]),t("div",{staticClass:"title"},[e._v(e._s(e.time))]),t("div",{staticClass:"sub-title"},[e._v("请选择您要进行的操作")]),t("div",{staticClass:"menu"},[t("div",{staticClass:"item",on:{click:function(t){return e.go(0)}}},[t("img",{attrs:{src:e.inPic,alt:""}}),t("span",{staticClass:"label green"},[e._v("入库")])]),t("div",{staticClass:"item",on:{click:function(t){return e.go(1)}}},[t("img",{attrs:{src:e.outPic,alt:""}}),t("span",{staticClass:"label blue"},[e._v("出库")])]),t("div",{staticClass:"item",on:{click:function(t){return e.go(2)}}},[t("img",{attrs:{src:e.stock,alt:""}}),t("span",{staticClass:"label other"},[e._v("调仓")])])])])},s=[],i=n("8bf8"),c=n.n(i),u=n("0e00"),l=n.n(u),d=n("76e6"),p=n.n(d),h=n("4fcb"),m=n("c276"),f=n("4360"),g={name:"Home",data(){return{getStoreTitle:m["a"],inPic:c.a,outPic:l.a,stock:p.a,time:null,timer:null,plcCode:1,door:1}},methods:{closeDoor(){Object(h["l"])({token:"_token",plcCode:sessionStorage.getItem("plcCode"),e_OpenOrCloseDoor:0}).then(e=>{0===e.code&&this.$Message.info(e.msg||"操作成功!")})},go(e){return this.plcCode?this.door?(0==e?Object(h["p"])({inOutType:e,token:"_token",storageType:sessionStorage.getItem("plcCode"),storageDoor:sessionStorage.getItem("door")}):1!=e&&2!=e||Object(h["p"])({inOutType:1,token:"_token",storageType:sessionStorage.getItem("plcCode"),storageDoor:sessionStorage.getItem("door")}),void(this.$store.state.token?0==e?this.$router.replace({name:"store-in"}):1==e?this.$router.replace({name:"store-out-list"}):2==e&&this.$router.replace({name:"store-change"}):this.$router.push({name:"login",query:{type:e}}))):this.$Message.error("缺少仓库门参数"):this.$Message.error("缺少仓库参数")}},mounted(){this.$store.commit("setHasGetInfo",!1),this.plcCode=this.$route.query.plcCode,this.door=this.$route.query.door,this.title=Object(m["a"])(this.plcCode,this.door),sessionStorage.setItem("plcCode",this.plcCode),sessionStorage.setItem("door",this.door),this.time=this.$dayjs().format("HH:mm:ss"),this.timer=setInterval(()=>{this.time=this.$dayjs().format("HH:mm:ss")},1e3)},destroyed(){clearInterval(this.timer)}},b=g,y=(n("15d9"),n("0b56")),k=Object(y["a"])(b,a,s,!1,null,"4ed82897",null),v=k.exports;const I=[{path:"/",name:"Home",component:v},{path:"/login",name:"login",component:()=>Promise.all([n.e("chunk-4b928543"),n.e("chunk-743c3027")]).then(n.bind(null,"a55b"))},{path:"/store-in",name:"store-in",component:()=>n.e("chunk-25fe99da").then(n.bind(null,"97e6"))},{path:"/store-in-2",name:"store-in",component:()=>n.e("chunk-25fe99da").then(n.bind(null,"97e6"))},{path:"/store-out",name:"store-out",component:()=>Promise.all([n.e("chunk-4b928543"),n.e("chunk-5190983c")]).then(n.bind(null,"c259"))},{path:"/store-out-2",name:"store-out",component:()=>Promise.all([n.e("chunk-4b928543"),n.e("chunk-5190983c")]).then(n.bind(null,"c259"))},{path:"/store-out-list",name:"store-out-list",component:()=>n.e("chunk-ea83faca").then(n.bind(null,"f968"))},{path:"/warning-list",name:"warning-list",component:()=>n.e("chunk-439966e0").then(n.bind(null,"8668"))},{path:"/check",name:"check",component:()=>Promise.all([n.e("chunk-4b928543"),n.e("chunk-c89bae56")]).then(n.bind(null,"9fe4"))},{path:"/store-change",name:"store-change",component:()=>n.e("chunk-4c732b19").then(n.bind(null,"4e7d"))}];var S=I,C=n("13eb"),w=n.n(C);o["default"].use(r["a"]);const q=new r["a"]({routes:S,mode:"history"}),O="Home",j=r["a"].prototype.push,P=r["a"].prototype.replace;r["a"].prototype.push=function(e,t,n){return t||n?j.call(this,e,t,n):j.call(this,e).catch(e=>e)},r["a"].prototype.replace=function(e,t,n){return t||n?P.call(this,e,t,n):P.call(this,e).catch(e=>e)},q.beforeEach((e,t,n)=>{w.a.LoadingBar.start();const o=Object(m["b"])();o||["login",O,"warning-list","check"].includes(e.name)?!o&&["login",O,"warning-list","check"].includes(e.name)||f["a"].state.hasGetInfo?n():f["a"].dispatch("getUserInfo").then(e=>{n()}).catch(()=>{Object(m["d"])(""),n({name:O,query:{plcCode:sessionStorage.getItem("plcCode"),door:sessionStorage.getItem("door")}})}):n({name:O,query:{plcCode:sessionStorage.getItem("plcCode"),door:sessionStorage.getItem("door")}})}),q.afterEach(e=>{w.a.LoadingBar.finish(),window.scrollTo(0,0)});t["a"]=q},c276:function(e,t,n){"use strict";n.d(t,"d",(function(){return i})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"a",(function(){return l}));n("4ff3");var o=n("4360"),r=n("a18c"),a=n("5723");const s="integrared-token",i=e=>{sessionStorage.setItem(s,e)},c=()=>{const e=sessionStorage.getItem(s);return e||!1},u=()=>{Object(a["d"])({roleKey:o["a"].state.roleKey,token:c()}),o["a"].commit("setToken",""),o["a"].commit("setHasGetInfo",!1),r["a"].replace({name:"Home",query:{plcCode:sessionStorage.getItem("plcCode"),door:sessionStorage.getItem("door")}})},l=(e,t)=>{if(!e||!t)return"未知仓库";return 2==e?`四楼面料仓库-${t}号门`:`${e||"*"}楼面料仓-${t||"*"}号门`}},d802:function(e,t,n){"use strict";n("45ac")}});