(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5960d1e9"],{"098a":function(t,e,r){"use strict";r.r(e);var s=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"orderProgress",class:[t.orderList.length>0?"grey":"white"]},[t.$store.state.visitingTouristOrders?r("tourist-mode",{attrs:{description:t.$t("info.310")}}):r("van-skeleton",{attrs:{title:"",row:15,loading:t.loading}},[t.orderList.length>0&&0===t.pageType?r("erp-orders",{attrs:{domainUrl:t.domainUrl,orderList:t.orderList}}):t._e(),t.orderList.length>0&&1===t.pageType?r("oms-orders",{attrs:{domainUrl:t.domainUrl,orderList:t.orderList}}):t._e(),t.isEmpty?r("my-empty",{attrs:{description:t.$t("info.129")}}):t._e()],1)],1)},a=[],i=(r("99af"),r("b0c0"),r("ac1f"),r("5319"),r("96cf"),r("1da1")),o=r("5530"),n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"tourist-mode"},[r("i",{staticClass:"iconwuquanxian iconfont"}),r("div",{staticClass:"text"},[t._v(t._s(t.description))]),r("van-button",{on:{click:t.navToMyOrderPage}},[t._v(t._s(t.$t("info.92")))])],1)},c=[],d={data:function(){return{}},props:{description:{type:String,default:""}},methods:{navToMyOrderPage:function(){this.$router.replace({name:"myOrder"})}}},l=d,u=(r("f694"),r("2877")),p=Object(u["a"])(l,n,c,!1,null,"47187ce6",null),f=p.exports,g=r("1364"),h=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"orderList"},[t._l(t.orderList,(function(e,s){return r("div",{key:s,staticClass:"listItem",on:{click:function(r){return r.stopPropagation(),t.navToOrderDetail(e)}}},[r("div",{staticClass:"l-header"},[r("div",{staticClass:"orderCode"},[r("span",{staticClass:"code"},[t._v(t._s(e.Code))]),e.Urgencylevelname?r("span",{staticClass:"urgent",class:[1===e.Urgencylevel?"orange":0===e.Urgencylevel?"green":"red"]},[t._v(" ["+t._s(e.Urgencylevelname)+"] ")]):t._e()]),r("div",{staticClass:"orderDate"},[t._v(" "+t._s(e.Date)+" ")])]),r("div",{staticClass:"l-content"},[r("div",{staticClass:"row orderState"},[r("span",[t._v(t._s(t.$t("info.104"))+"："+t._s(e.ProductType))]),r("span",[t._v(t._s(e.Shopname))])]),e.Cusname?r("div",{staticClass:"row price"},[r("span",[t._v(" "+t._s(e.Cusname)+" "+t._s(e.Ordermobilephoe))])]):t._e(),r("div",{staticClass:"row price"},[r("span",[t._v(t._s(e.FullAddress))])])]),r("div",{staticClass:"l-footer"},[r("div",{staticClass:"left"},[r("div",{staticClass:"state",style:{"background-color":t.orderColorList[e.ProcessStateValue]}},[t._v(" "+t._s(e.ProcessStateName)+" ")]),e.Web3dviewUrl||e.Web3dViewUrl?r("van-icon",{attrs:{name:"photo-o"},on:{click:function(r){return r.stopPropagation(),t.navToModelDiagram(e.Web3dviewUrl,e.Web3dViewUrl)}}}):t._e()],1),r("div",{staticClass:"right"},[t._v(t._s(t.$t("info.101"))+"："+t._s(e.Deliverdate?e.Deliverdate:"--"))])])])})),r("van-divider",[t._v(t._s(t.$t("info.199")))])],2)},m=[],v=r("2909"),b=r("1f35"),y=r("466f"),_=r("2f62"),O={data:function(){return{orderColorList:Object(v["a"])(b.colorListErp),pageType:0}},props:{orderList:{type:Array,default:function(){return[]}},domainUrl:{type:String,default:""}},computed:Object(o["a"])({},Object(_["c"])(["homeQueryInfo"])),methods:{navToOrderDetail:function(t){var e=t.Autoid,r=this.homeQueryInfo.api;this.domainUrl&&(r=this.domainUrl),this.$router.push({name:"detail1",params:{api:r,autoid:e,pageType:this.pageType}})},navToModelDiagram:function(t,e){var r=t||e;if(r){var s=y["a"].getUrlParameter(r),a=s.h,i=s.v;if(a){var o={h:a};i&&(o["v"]=i),this.$router.push({name:"model",query:o})}else this.$toast.fail({message:this.$t("info.243")})}else this.$toast.fail({message:this.$t("info.313")})}}},C=O,$=(r("a4bb"),Object(u["a"])(C,h,m,!1,null,"74ada2ee",null)),E=$.exports,D=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"orderList"},[t._l(t.newOrderList,(function(e,s){return r("div",{key:s,staticClass:"listItem",on:{click:function(r){return r.stopPropagation(),t.navToOrderDetail(e)}}},[r("div",{staticClass:"l-header"},[r("div",{staticClass:"orderCode"},[r("span",{staticClass:"code"},[t._v(t._s(e.Code))])]),r("div",{staticClass:"orderDate"},[t._v(" "+t._s(e.Date||"")+" ")])]),r("div",{staticClass:"l-content"},[r("div",{staticClass:"row orderState"},[r("span",[t._v(t._s(t.$t("info.104"))+"："+t._s(e.ProductType||""))]),r("span",[t._v(t._s(e.ShopName||""))])]),e.Customer?r("div",{staticClass:"row price"},[r("span",[t._v(" "+t._s(e.Customer)+" "+t._s(e.CustomerPhone))])]):t._e(),r("div",{staticClass:"row price"},[r("span",[t._v(t._s(e.InstallAddress||""))])])]),r("div",{staticClass:"l-footer"},[r("div",{staticClass:"left"},[r("div",{staticClass:"state",style:{"background-color":e.StateColor}},[t._v(" "+t._s(e.ProcessStateText)+" ")]),e.Web3dViewUrl||e.Web3dviewUrl?r("van-icon",{attrs:{name:"photo-o"},on:{click:function(r){return r.stopPropagation(),t.navToModelDiagram(e.Web3dViewUrl,e.Web3dviewUrl)}}}):t._e()],1),r("div",{staticClass:"right"},[t._v(t._s(t.$t("info.101"))+"："+t._s(e.DeliveryDate?e.DeliveryDate:"--"))])])])})),r("van-divider",[t._v(t._s(t.$t("info.199")))])],2)},w=[],I=(r("7db0"),r("4160"),r("159b"),{data:function(){return{orderColorList:Object(v["a"])(b.colorListErp),pageType:1}},props:{orderList:{type:Array,default:function(){return[]}},domainUrl:{type:String,default:""}},computed:Object(o["a"])(Object(o["a"])({},Object(_["c"])(["homeQueryInfo"])),{},{newOrderList:function(){var t=Object(v["a"])(this.orderList);return t.forEach((function(t){var e="#4169E1",r=b.colorList.find((function(e){return e.processState===t.ProcessState}));t.StateColor=r?r.color:e})),t}}),methods:{navToOrderDetail:function(t){var e=t.AutoId,r=this.homeQueryInfo.api;this.domainUrl&&(r=this.domainUrl),this.$router.push({name:"detail1",params:{api:r,autoid:e,pageType:this.pageType}})},navToModelDiagram:function(t,e){var r=t||e;if(r){var s=y["a"].getUrlParameter(r),a=s.h,i=s.v;if(a){var o={h:a};i&&(o["v"]=i),this.$router.push({name:"model",query:o})}else this.$toast.fail({message:this.$t("info.243")})}else this.$toast.fail({message:this.$t("info.313")})}}}),L=I,P=(r("e8c3"),Object(u["a"])(L,D,w,!1,null,"fd3480b8",null)),j=P.exports,T={name:"orders",data:function(){return{loading:!0,isEmpty:!1,pageType:-1,domainUrl:"",orderList:[],isLoggedIn:!1}},components:{"my-empty":g["a"],"erp-orders":E,"oms-orders":j,"tourist-mode":f},computed:Object(o["a"])({},Object(_["c"])(["homeQueryInfo","web3dViewUrl","loginInfo","targetOrderInfo","visitingTouristOrders"])),activated:function(){this.isLoggedIn&&!this.loginInfo.isLoggedIn&&(this.isLoggedIn=!1,this.navToLoginInPage())},mounted:function(){var t=this.$store.state.loginInfo.isLoggedIn;t?(this.isLoggedIn=this.loginInfo.isLoggedIn||!1,this.visitingTouristOrders||this.initPageInfo()):this.navToLoginInPage()},methods:{navToLoginInPage:function(){this.$store.dispatch("saveTargetRouteInfo",{name:this.$route.name}),this.$router.replace({name:"login"})},initPageInfo:function(){var t=this.loginInfo,e=t.isLoggedIn,r=t.houseId;if(e)this.getOrderData3(r);else{var s=this.homeQueryInfo,a=s.api,i=s.qid,o=s.h;a&&i?this.getOrderData2(a,i):this.getOrderData1(o)}},getOrderData1:function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(e){var r,s,a,i,o,n,c=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,r={url:"".concat(this.$JsonProxy).concat(this.$AZT_API,"/data/House_").concat(e,"/house.json")},t.next=4,this.$Api.get(r);case 4:s=t.sent,a=s.LockNum,i=s.ProjectNum,o={locknum:a,projectcode:i,h:this.web3dViewUrl},n={url:this.$Api1Proxy,params:{url:"".concat(this.$QLY_API,"/api/hgerpapi.aspx?method=getorders")},data:o},this.$Api.post(n).then((function(t){var e=t.Data||{},r=e.Type,s=e.List,a=e.Url;if(!t.Result||!s||s&&0===s.length)return c.isEmpty=!0,c.loading=!1,void c.$toast({message:t.Message});s&&0===s.length&&(c.isEmpty=!0),c.pageType=r,c.orderList=s,c.domainUrl=a,c.loading=!1})),t.next=16;break;case 11:t.prev=11,t.t0=t["catch"](0),this.$toast({message:t.t0.message}),this.isEmpty=!0,this.loading=!1;case 16:case"end":return t.stop()}}),t,this,[[0,11]])})));function e(e){return t.apply(this,arguments)}return e}(),getOrderData2:function(t,e){var r=this;try{if(!t||!e)return void this.$toast({message:this.$t("info.311")});var s={url:this.$Api1Proxy,params:{url:"".concat(t,"/api/Customer/GetSaleOrderInfoByQid?qid=").concat(e)}};this.$Api.get(s).then((function(t){var e=t.Data||{},s=e.type,a=e.list;if(!t.Result||a&&0===a.length)return r.isEmpty=!0,r.loading=!1,void r.$toast({message:t.Message});a&&0===a.length&&(r.isEmpty=!0),r.domainUrl="",r.pageType=s,r.orderList=a,r.loading=!1,r.$toast.clear()}))}catch(a){this.$toast({message:a.message}),this.isEmpty=!0,this.loading=!1}},getOrderData3:function(){var t=this,e=this.loginInfo,r=e.phone,s=e.email,a=e.lockNum,i=e.projectNum;if(!a&&!i)return this.isEmpty=!0,this.loading=!1,void this.$toast(this.$t("info.312"));var o=this.targetOrderInfo,n=o.Customer,c=o.CustomerPhone,d=o.InstallAddress,l={url:this.$Api1Proxy,params:{url:"".concat(this.$QLY_API,"/api/hgerpapi.aspx?method=getorderslogin")},data:{phone:c||r,email:s,locknum:a,projectcode:i,customer:n,installaddress:d}};this.$Api.post(l).then((function(e){var r=e.Data||{},s=r.Type,a=r.List,i=r.Url;if(!e.Result||!a||a&&0===a.length)return t.isEmpty=!0,t.loading=!1,void t.$toast({message:e.Message});a&&0===a.length&&(t.isEmpty=!0),t.pageType=s,t.orderList=a,t.domainUrl=i,t.loading=!1})).catch((function(){t.isEmpty=!0,t.loading=!1}))}}},S=T,U=(r("f0bb"),Object(u["a"])(S,s,a,!1,null,"072f9262",null));e["default"]=U.exports},1364:function(t,e,r){"use strict";var s=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("van-empty",{staticClass:"custom-image",attrs:{image:t.emptyImage,description:t.description}})},a=[],i={data:function(){return{emptyImage:r("377b")}},props:{description:{type:String,default:""}}},o=i,n=(r("9090"),r("2877")),c=Object(n["a"])(o,s,a,!1,null,"ecf5875c",null);e["a"]=c.exports},"1f35":function(t){t.exports=JSON.parse('{"colorList":[{"state":0,"processState":"None","color":"#9a9a9a"},{"state":1,"processState":"DrawingCompleted","color":"#9400D3"},{"state":2,"processState":"Ordered","color":"#ff9800"},{"state":3,"processState":"Separate","color":"#3f51b5"},{"state":4,"processState":"Quoted","color":"#008B8B"},{"state":5,"processState":"Finances","color":"#00bcd4"},{"state":6,"processState":"InProduction","color":"#f44336"},{"state":7,"processState":"Packed","color":"#1E90FF"},{"state":8,"processState":"PartialDispatched","color":"#05ae0c"},{"state":9,"processState":"Dispatched","color":"#05ae0c"}],"colorListErp":["#abbac3","#82af6f","#3a87ad","#9585bf","#f89406","#FFA500","#FF83FA","#FF7F24","#EE7AE9","#EE5C42","#CD96CD","#CAE1FF","#BCEE68","#A0522D","#7D26CD","#36cccc","#63B8FF","#4EEE94","#3CB371","#1C86EE","#00CD66","#00B2EE","#218868","#A4D3EE","#912CEE","#ADFF2F","#B4EEB4","#8B4513","#76EEC6"]}')},2909:function(t,e,r){"use strict";r.d(e,"a",(function(){return c}));var s=r("6b75");function a(t){if(Array.isArray(t))return Object(s["a"])(t)}r("a4d3"),r("e01a"),r("d28b"),r("a630"),r("d3b7"),r("3ca3"),r("ddb0");function i(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}var o=r("06c5");function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(t){return a(t)||i(t)||Object(o["a"])(t)||n()}},"377b":function(t,e,r){t.exports=r.p+"static/img/empty-image.276c05f0.png"},"4dfb":function(t,e,r){},5530:function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));r("a4d3"),r("4de4"),r("4160"),r("e439"),r("dbb4"),r("b64b"),r("159b");var s=r("ade3");function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,s)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach((function(e){Object(s["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}},"7db0":function(t,e,r){"use strict";var s=r("23e7"),a=r("b727").find,i=r("44d2"),o=r("ae40"),n="find",c=!0,d=o(n);n in[]&&Array(1)[n]((function(){c=!1})),s({target:"Array",proto:!0,forced:c||!d},{find:function(t){return a(this,t,arguments.length>1?arguments[1]:void 0)}}),i(n)},9090:function(t,e,r){"use strict";r("eada")},a4bb:function(t,e,r){"use strict";r("d59b")},c65d:function(t,e,r){},d59b:function(t,e,r){},d8a6:function(t,e,r){},dbb4:function(t,e,r){var s=r("23e7"),a=r("83ab"),i=r("56ef"),o=r("fc6a"),n=r("06cf"),c=r("8418");s({target:"Object",stat:!0,sham:!a},{getOwnPropertyDescriptors:function(t){var e,r,s=o(t),a=n.f,d=i(s),l={},u=0;while(d.length>u)r=a(s,e=d[u++]),void 0!==r&&c(l,e,r);return l}})},e439:function(t,e,r){var s=r("23e7"),a=r("d039"),i=r("fc6a"),o=r("06cf").f,n=r("83ab"),c=a((function(){o(1)})),d=!n||c;s({target:"Object",stat:!0,forced:d,sham:!n},{getOwnPropertyDescriptor:function(t,e){return o(i(t),e)}})},e8c3:function(t,e,r){"use strict";r("4dfb")},eada:function(t,e,r){},f0bb:function(t,e,r){"use strict";r("c65d")},f694:function(t,e,r){"use strict";r("d8a6")}}]);