f3eb6c0.js 38 KB

12
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[88,30],{523:function(e,t,r){"use strict";var n=r(2),o=r(4),l=r(80),c=r(522),d=r(319),f=r(3),m=RangeError,h=String,v=Math.floor,_=o(d),y=o("".slice),w=o(1..toFixed),O=function(e,t,r){return 0===t?r:t%2==1?O(e,t-1,r*e):O(e*e,t/2,r)},x=function(data,e,t){for(var r=-1,n=t;++r<6;)n+=e*data[r],data[r]=n%1e7,n=v(n/1e7)},A=function(data,e){for(var t=6,r=0;--t>=0;)r+=data[t],data[t]=v(r/e),r=r%e*1e7},C=function(data){for(var e=6,s="";--e>=0;)if(""!==s||0===e||0!==data[e]){var t=h(data[e]);s=""===s?t:s+_("0",7-t.length)+t}return s};n({target:"Number",proto:!0,forced:f((function(){return"0.000"!==w(8e-5,3)||"1"!==w(.9,0)||"1.25"!==w(1.255,2)||"1000000000000000128"!==w(0xde0b6b3a7640080,0)}))||!f((function(){w({})}))},{toFixed:function(e){var t,r,n,o,d=c(this),f=l(e),data=[0,0,0,0,0,0],v="",w="0";if(f<0||f>20)throw new m("Incorrect fraction digits");if(d!=d)return"NaN";if(d<=-1e21||d>=1e21)return h(d);if(d<0&&(v="-",d=-d),d>1e-21)if(r=(t=function(e){for(var t=0,r=e;r>=4096;)t+=12,r/=4096;for(;r>=2;)t+=1,r/=2;return t}(d*O(2,69,1))-69)<0?d*O(2,-t,1):d/O(2,t,1),r*=4503599627370496,(t=52-t)>0){for(x(data,0,r),n=f;n>=7;)x(data,1e7,0),n-=7;for(x(data,O(10,n,1),0),n=t-1;n>=23;)A(data,1<<23),n-=23;A(data,1<<n),x(data,1,1),A(data,2),w=C(data)}else x(data,0,r),x(data,1<<-t,0),w=C(data)+_("0",f);return w=f>0?v+((o=w.length)<=f?"0."+_("0",f-o)+w:y(w,0,o-f)+"."+y(w,o-f)):v+w}})},524:function(e,t,r){e.exports={}},528:function(e,t,r){"use strict";function n(e,t){return void 0===t&&(t=15),+parseFloat(Number(e).toPrecision(t))}function o(e){var t=e.toString().split(/[eE]/),r=(t[0].split(".")[1]||"").length-+(t[1]||0);return r>0?r:0}function l(e){if(-1===e.toString().indexOf("e"))return Number(e.toString().replace(".",""));var t=o(e);return t>0?n(Number(e)*Math.pow(10,t)):Number(e)}function c(e){_&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&console.warn(e+" is beyond boundary when transfer to integer, the results may not be accurate")}function d(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=t[0];return t.slice(1).reduce((function(t,r){return e(t,r)}),n)}}r.d(t,"c",(function(){return m})),r.d(t,"b",(function(){return h})),r.d(t,"d",(function(){return f})),r.d(t,"a",(function(){return v}));var f=d((function(e,t){var r=l(e),n=l(t),d=o(e)+o(t),f=r*n;return c(f),f/Math.pow(10,d)})),m=d((function(e,t){var r=Math.pow(10,Math.max(o(e),o(t)));return(f(e,r)+f(t,r))/r})),h=d((function(e,t){var r=Math.pow(10,Math.max(o(e),o(t)));return(f(e,r)-f(t,r))/r})),v=d((function(e,t){var r=l(e),d=l(t);return c(r),c(d),f(r/d,n(Math.pow(10,o(t)-o(e))))}));var _=!0},529:function(e,t,r){"use strict";r(524)},532:function(e,t,r){"use strict";r.r(t);r(521);var n={name:"Pagination",props:{total:{required:!0,type:Number},page:{type:Number,default:0},limit:{type:Number,default:10},layout:{type:String,default:"prev, pager, next"},background:{type:Boolean,default:!0},autoScroll:{type:Boolean,default:!0},hidden:{type:Boolean,default:!1}},computed:{currentPage:{get:function(){return this.page},set:function(e){this.$emit("update:page",e)}},pageSize:{get:function(){return this.limit},set:function(e){this.$emit("update:limit",e)}}},methods:{handleSizeChange:function(e){this.$emit("pagination",{page:this.currentPage,limit:e}),this.autoScroll&&scrollTo(0,800)},handleCurrentChange:function(e){this.$emit("pagination",{page:e,limit:this.pageSize}),this.autoScroll&&scrollTo(0,800)}}},o=(r(529),r(22)),component=Object(o.a)(n,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"pagination-container",class:{hidden:e.hidden}},[e._t("slot"),e._v(" "),t("el-pagination",e._b({attrs:{background:e.background,"current-page":e.currentPage,"page-size":e.pageSize,layout:e.layout,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"update:pageSize":function(t){e.pageSize=t},"update:page-size":function(t){e.pageSize=t},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}},"el-pagination",e.$attrs,!1))],2)}),[],!1,null,"044ef958",null);t.default=component.exports},546:function(e,t,r){"use strict";r(2)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},549:function(e,t,r){e.exports={}},562:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"h",(function(){return l})),r.d(t,"g",(function(){return d})),r.d(t,"f",(function(){return f})),r.d(t,"e",(function(){return m})),r.d(t,"b",(function(){return h})),r.d(t,"d",(function(){return v})),r.d(t,"c",(function(){return _}));r(40),r(53),r(563),r(521),r(546),r(321),r(11),r(17),r(77);var n=r(528);function o(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return 0===e?t?"$0.00":"0.00":t?"$".concat(e):"".concat(e)}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return Math.round(function(e){return parseFloat((e*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:100)).toPrecision(12))}(e,t))/t}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=Number(e);return Number.isNaN(r)?e:Object(n.a)(Math.trunc(Object(n.d)(Object(n.d)(r,t),100)),100)}var d=function(e,t,r,n){var o=Object.entries(r).filter((function(t){return e>=t[1]})),l="website_qty1";return o.length&&(l=o.pop()[0]),c(n[t][l],e)},f=function(e,form,t){return c(Object.entries(form).reduce((function(e,r){var s=0;if(/\d+/.test(r[0])&&r[1].enable){var o=r[1].colorForm.filter((function(i){return i.id===r[1].printService})),l=1;o.length&&(l=o[0].colorNumber);var c=r[1].decorationList.filter((function(i){return i.id===r[1].printService})),d=0;c.length&&(d=Object(n.c)(Number(c[0].website_setup),Object(n.d)(Number(c[0].supplier_setup),l-1))),s=Object(n.c)(s,d)}else if(r[1].length){var f=t[r[0]].filter((function(e){return r[1].includes(e.id)}));if(f.length){var m=f.reduce((function(e,t){var r=Number(t.website_setup);return[5,6].includes(t.website_setup_id)&&(r=0),Object(n.c)(e,Number.isNaN(r)?0:r)}),0);s=Object(n.c)(s,m)}}return e=Object(n.c)(e,s)}),0))},m=function(e,form,t){var r=Object.entries(t).filter((function(t){return e>=t[1]})),o="website_qty".concat(r.length),l="supplier_qty".concat(r.length),d=Object.entries(form).reduce((function(e,t){if("POA"===e)return e;var r=0;if(/\d+/.test(t[0])&&t[1].enable){var d=t[1].colorForm.filter((function(i){return i.id===t[1].printService})),f=1;d.length&&(f=d[0].colorNumber);var m=t[1].decorationList.filter((function(i){return i.id===t[1].printService})),h=c(m[0][o]);if(999===h||111===h||"number"!=typeof h)return"POA";var v=c(m[0][l]);if(999===v||111===v||"number"!=typeof v)return"POA";var _=0;m.length&&(_=Object(n.c)(h,Object(n.d)(v,f-1))),r=Object(n.c)(r,_)}return e=Object(n.c)(e,r)}),0);return c(d,e)},h=function(e,form,t,r){var o=Object.entries(t).filter((function(t){return e>=t[1]})),l="website_qty".concat(o.length),d=Object.entries(form).reduce((function(e,t){if("POA"===e)return e;var o=0;return/\d+/.test(t[0])||"packaging"===t[0]||(o=r[t[0]].filter((function(e){return t[1].includes(e.id)})).reduce((function(e,t){if("POA"===e)return e;var r=c(t[l]);return 999===r||111===r||"number"!=typeof r?(r=0,"POA"):e=Object(n.c)(e,r)}),0)),Object(n.c)(e,o)}),0);return c(d,e)},v=function(e,form,t,r){var o=Object.entries(t).filter((function(t){return e>=t[1]})),l="website_qty".concat(o.length),d=Object.entries(form).reduce((function(e,t){if("POA"===e)return e;var o=0;return/\d+/.test(t[0])||"packaging"!==t[0]||(o=r[t[0]].filter((function(e){return t[1].includes(e.id)})).reduce((function(e,t){if("POA"===e)return e;var r=c(t[l]);return 999===r||111===r||"number"!=typeof r?(r=0,"POA"):e=Object(n.c)(e,r)}),0)),Object(n.c)(e,o)}),0);return c(d,e)},_=function(e,t,r,o){var l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,d=Math.ceil(Object(n.d)(+o.unit_w_local,e)),f=Object(n.c)(1,Object(n.a)(Object(n.c)(+t.express_freight,+t.fuel),100)),m=Object(n.c)(1,Object(n.a)(Object(n.c)(+t.bag_freight,+t.fuel),100)),h=0;if(1===r.type)if(d>20){var v=Object(n.b)(d,20),_=Object(n.d)(v,+r.basic),y=Object(n.c)(+r.pickup,_);h=Object(n.d)(y,f)}else h=Object(n.d)(+r.pickup,f);else if(2===r.type){var w=Object(n.d)(d,+r.basic),O=Object(n.c)(+r.pickup,w);h=Object(n.d)(O,m)}else h=0;return c(h,l)}},563:function(e,t,r){"use strict";r(2)({target:"Math",stat:!0},{trunc:r(322)})},569:function(e,t,r){"use strict";r.r(t);r(39),r(53),r(521),r(77);var n={props:{dialogVisible:{type:Boolean,default:!1},componentVisible:{type:Number,default:2},data:{type:Object,default:function(){return{country:"Australia",name:"",phone:"",address:"",post_code:"",city:"",state:"",is_default:null}}}},data:function(){return{value:[],options:[],rules:{country:[{required:!0,message:"Please enter your country",trigger:"blur"}],name:[{required:!0,message:"Please enter your name",trigger:"blur"}],phone:[{required:!0,message:"Please enter your phone number",trigger:"blur"}],address:[{required:!0,message:"Please enter your address",trigger:"blur"}],post_code:[{required:!0,message:"Please enter post_code",trigger:"blur"}],city:[{required:!0,message:"Please enter city",trigger:"blur"}],state:[{required:!0,message:"Please enter state",trigger:"blur"}]},cityList:[{id:1,name:"Sydney"},{id:2,name:"Adelaide Mail Centre"},{id:3,name:"Melbourne"},{id:4,name:"Eastern Suburbs Mc"},{id:5,name:"Hobart"},{id:6,name:"Perth"},{id:7,name:"Launceston"},{id:8,name:"Brisbane"},{id:9,name:"Northern Suburbs Mc"},{id:10,name:"Strawberry Hills"},{id:11,name:"Springfield"},{id:12,name:"Waterloo"},{id:13,name:"Richmond"},{id:14,name:"Haymarket"},{id:15,name:"Red Hill"},{id:16,name:"Brisbane GPO Boxes"},{id:17,name:"Mayfield"},{id:18,name:"Australia Square"},{id:19,name:"Woodstock"},{id:20,name:"Sydney South"},{id:21,name:"The Gap"},{id:22,name:"Kingston"},{id:23,name:"Kensington"},{id:24,name:"Darlington"}],stateList:[{id:1,name:"Australian Capital Territory"},{id:2,name:"New South Wales"},{id:3,name:"Northern Territory"},{id:4,name:"Queensland"},{id:5,name:"South Australia"},{id:6,name:"Tasmania"},{id:7,name:"Victoria"},{id:8,name:"Western Australia"}]}},computed:{dialogFormVisible:{get:function(){return this.dialogVisible},set:function(e){this.$emit("update:dialogVisible",e)}}},methods:{submit:function(e){var t=this;this.$refs[e].validate((function(e){if(!e)return console.log("error submit!!"),!1;if(2==t.componentVisible){if(t.addAddress(),t.$route.fullPath.includes("product-builder"))return;t.$router.push({path:"/home/myDetail",query:{type:"third"}})}else 3==t.componentVisible&&(t.editAddress(),t.$router.push({path:"/home/myDetail",query:{type:"third"}}))}))},addAddress:function(){var e=this;this.$axios.post("/address/add",this.data).then((function(t){1===t.code&&(e.$notify({title:"success",message:"Submitted successfully",type:"success",duration:3e3}),e.dialogFormVisible=!1,e.update())})).catch((function(t){e.$message.error(t.response.data.msg)}))},editAddress:function(){var e=this;this.$axios.post("/address/edit",this.data).then((function(t){1===t.code&&(e.$notify({title:"success",message:"Submitted successfully",type:"success",duration:3e3}),e.dialogFormVisible=!1,e.update())})).catch((function(t){e.$message.error(t.response.data.msg)}))},update:function(){this.$emit("update",!0)}}},o=(r(583),r(22)),component=Object(o.a)(n,(function(){var e=this,t=e._self._c;return t("div",[t("el-dialog",{attrs:{"lock-scroll":!1,title:"Add address",visible:e.dialogFormVisible,width:"700px"},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[t("el-form",{ref:"ruleForm",attrs:{model:e.data,rules:e.rules}},[t("el-form-item",{attrs:{prop:"country"}},[t("label",[e._v("Country/Region")]),e._v(" "),t("el-input",{model:{value:e.data.country,callback:function(t){e.$set(e.data,"country",t)},expression:"data.country"}})],1),e._v(" "),t("el-form-item",{attrs:{prop:"name"}},[t("label",[e._v("Full name")]),e._v(" "),t("el-input",{model:{value:e.data.name,callback:function(t){e.$set(e.data,"name",t)},expression:"data.name"}})],1),e._v(" "),t("el-form-item",{attrs:{prop:"phone"}},[t("label",[e._v("Phone number")]),e._v(" "),t("el-input",{model:{value:e.data.phone,callback:function(t){e.$set(e.data,"phone",t)},expression:"data.phone"}})],1),e._v(" "),t("el-form-item",{attrs:{prop:"address"}},[t("label",[e._v("Address")]),e._v(" "),t("el-input",{attrs:{placeholder:"Street address,P.O.box,company name,c/o"},model:{value:e.data.address,callback:function(t){e.$set(e.data,"address",t)},expression:"data.address"}})],1),e._v(" "),t("el-form-item",{attrs:{prop:"post_code"}},[t("label",[e._v("Postcode")]),e._v(" "),t("el-input",{model:{value:e.data.post_code,callback:function(t){e.$set(e.data,"post_code",t)},expression:"data.post_code"}})],1),e._v(" "),t("el-form-item",{attrs:{prop:"city"}},[t("label",[e._v("City/Suburb")]),e._v(" "),t("el-input",{attrs:{placeholder:"Choose city by suburb"},model:{value:e.data.city,callback:function(t){e.$set(e.data,"city",t)},expression:"data.city"}})],1),e._v(" "),t("el-form-item",{attrs:{prop:"state"}},[t("label",[e._v("State/Territory")]),e._v(" "),t("el-input",{attrs:{placeholder:"Choose state by territory"},model:{value:e.data.state,callback:function(t){e.$set(e.data,"state",t)},expression:"data.state"}})],1),e._v(" "),t("el-form-item",{attrs:{prop:"is_default"}},[t("el-checkbox",{model:{value:e.data.is_default,callback:function(t){e.$set(e.data,"is_default",t)},expression:"data.is_default"}},[e._v("\n Make this my default address\n ")])],1),e._v(" "),t("el-form-item",[t("label",[e._v("Delivery instruction(optional)")]),e._v(" "),t("div",{staticStyle:{color:"#86d4e9","line-height":"14px"}},[t("i",{staticClass:"el-icon-arrow-down",staticStyle:{color:"#a2a2a2"}}),e._v("\n And preferences,notes,access codes and more\n ")])])],1),e._v(" "),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){return e.submit("ruleForm")}}},[e._v("Add address")])],1)],1)],1)}),[],!1,null,"443741dd",null);t.default=component.exports},583:function(e,t,r){"use strict";r(549)},584:function(e,t,r){e.exports={}},627:function(e,t,r){"use strict";r(584)},654:function(e,t,r){"use strict";r.r(t);r(65),r(521),r(216),r(46),r(11),r(32),r(79);var n=r(676),o={name:"ImageUpload",components:{draggable:r.n(n).a},props:{list:{type:Array,default:function(){return[]}},max:{type:Number,default:16},disablePreview:{type:Boolean,default:!1},width:{type:String,default:"150px"},height:{type:String,default:"150px"}},data:function(){return{imageList:[],loading:!1,uploadPercent:0,imageDialogVisible:!1,imageUrl:""}},computed:{fulled:function(){return 0}},watch:{list:function(){this.imageList=JSON.parse(JSON.stringify(this.list))}},mounted:function(){this.updateList()},methods:{handleUpload:function(e,t){var r=this;if(this.fileList=[],"ready"===e.status){this.loading=!0;var n=setInterval((function(){r.uploadPercent>=99?clearInterval(n):r.uploadPercent+=1}),100)}var o=new FormData;t.forEach((function(e){o.append("file",e.raw)})),o.append("type",1),this.$axios.post("/user_base/imagesUpload",o).then((function(t){if(200===t.result.code)return r.imageList.push({url:t.result.data,uid:e.uid}),void r.updateList();r.$message({message:t.result.message,type:"warning"})})).catch((function(e){console.log(e,"component upload image error"),r.$message.error(e.response.data.msg)})).finally((function(){r.loading=!1,r.uploadPercent=0}))},handleRemove:function(e){this.imageList.splice(e,1),this.updateList()},handlePictureCardPreview:function(e){this.imageUrl=e.url,this.imageDialogVisible=!0},updateList:function(){this.$emit("update:list",JSON.parse(JSON.stringify(this.imageList)))},end:function(){this.updateList()}}},l=(r(627),r(22)),component=Object(l.a)(o,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"com-image-upload"},[t("draggable",{staticClass:"flex start wrap",attrs:{draggable:".image-item"},on:{end:e.end},model:{value:e.imageList,callback:function(t){e.imageList=t},expression:"imageList"}},[e._l(e.imageList,(function(r,n){return t("div",{key:r.uid||n,staticClass:"image-item flex",style:{width:e.width,height:e.height}},[t("img",{attrs:{src:r.url,alt:""}}),e._v(" "),t("div",{staticClass:"action-area flex center"},[e.disablePreview?e._e():t("span",{staticClass:"action-icon",on:{click:function(t){return e.handlePictureCardPreview(r)}}},[t("i",{staticClass:"el-icon-zoom-in"})]),e._v(" "),t("span",{staticClass:"action-icon",on:{click:function(t){return e.handleRemove(n)}}},[t("i",{staticClass:"el-icon-delete"})])])])})),e._v(" "),t("el-progress",{directives:[{name:"show",rawName:"v-show",value:e.loading,expression:"loading"}],staticStyle:{margin:"8px"},attrs:{type:"circle",percentage:e.uploadPercent,width:Number(e.width.slice(0,e.width.length-2))}}),e._v(" "),t("div",{staticClass:"upload-wrap",class:{hide:e.loading||e.imageList.length>=e.max},style:{width:e.width,height:e.height}},[t("el-upload",{ref:"pictureUpload",staticClass:"custom-upload-item",attrs:{multiple:!0,limit:e.max,action:"",drag:"",accept:".jpg,.png,.jpeg","list-type":"picture-card","file-list":e.imageList,"show-file-list":!1,"auto-upload":!1,"on-remove":e.handleRemove,"on-preview":e.handlePictureCardPreview,"on-change":function(t,r){e.handleUpload(t,r)}}},[t("i",{staticClass:"el-icon-plus avatar-uploader-icon"})])],1)],2),e._v(" "),t("el-dialog",{attrs:{visible:e.imageDialogVisible},on:{"update:visible":function(t){e.imageDialogVisible=t}}},[t("img",{attrs:{width:"100%",src:e.imageUrl,alt:""}})])],1)}),[],!1,null,"049aaa02",null);t.default=component.exports},677:function(e,t,r){e.exports={}},678:function(e,t,r){e.exports={}},788:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE0AAABNCAYAAADjCemwAAAAAXNSR0IArs4c6QAAAhVJREFUeF7t3EtKA0EYxPH6FHXjCQQhg2cQ8XEM3SuufSCoZzABEV2L7vUYPhCvoExA8ARufLZMRFBM1FQITMI/20z19PxSmUmg6VC5XqHK3KqUViRVJNWlOFD9bF9SKstUoywTacwjm65KA5s/5/RWU365VZa5lgdtbHJcw8O5QoM/cJJe9fSU6f76rgxw5UHLZualOGmNkhaUX5yC9lWgMrOoiKOWKCktqX5xDBpoHXaAphmAoIFmCBgRmgaaIWBEaBpohoARoWmgGQJGhKaBZggYEZoGmiFgRGgaaIaAEaFpoBkCRoSmgWYIGBGaBpohYERoGmiGgBGhaaAZAkaEpoFmCBiRnmxasT5sZGhKSaPGJXceiZiTtPzLQIdK6azzExkjhB70+Hz1uT6uWJ8WyqZ3lAY2mi6oM87Rl5FiYWFoV/n5drHGdU2R9vryQrtxUSnWQ5XZG4UmujF+X46ZdFugvfC1bOPjTXqlaW14NQ79aBr3tLbcGvc0np7/M/v29PyM8DutNV6T32n/k+72UT35j6DbKH+ND9pfQk3eBw00Q8CI0DTQDAEjQtNAMwSMCE0DzRAwIjQNNEPAiNA00AwBI0LTQDMEjAhNA80QMCI0DTRDwIjQNNAMASNC00AzBIwITQPNEDAiNA00Q8CI0DTQDAEjwu6jBhr73BpoRSSbrUpqsqOyasrP2VG5BWtP7N39DnF70LrahZYoAAAAAElFTkSuQmCC"},790:function(e,t,r){"use strict";r(677)},791:function(e,t,r){"use strict";r(678)},855:function(e,t,r){"use strict";r.r(t);r(53),r(39),r(77);var n=r(24),o=(r(217),r(64),r(521),r(523),r(17),r(41),r(40),r(62),r(63),r(46),r(11),r(47),r(32),r(150),r(79),r(43)),l=r(569),c=r(218),d=r(654),f=r(562);function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var h={components:{addAddressDialog:l.default,"dialog-XX-success":c.default,imageUpload:d.default},data:function(){return{xxContentVisible:!1,xxContent:"success",componentVisible:1,tabName:"",tableLoading:!0,profileform:{},rules:{email:[{required:!0,message:"Please enter the email",trigger:"blur"}],company:[{required:!0,message:"Please enter the company",trigger:"blur"}],contacts:[{required:!0,message:"Please enter first name",trigger:"blur"}],last_name:[{required:!0,message:"Please enter last name",trigger:"blur"}],phone:[{required:!0,message:"Please enter the phone",trigger:"blur"}],password:[{required:!0,message:"Please enter the password",trigger:"blur"}],confirm_password:[{required:!0,message:"Please enter the confirm_password",trigger:"blur"}]},accountPasswordForm:{password:"",confirm_password:""},orderKeyword:"",selword:"",accounts_id:"",orderTotal:0,orderListQuery:{page:1,limit:20},tableData:[],dialogVisible:!1,addressTotal:0,addressListQuery:{page:1,limit:8},addressList:[],addressDetail:{},enquiryKeyword:"",enquiryList:[],enquiryListQuery:{page:1,limit:20},enquiryTotal:0,orderSelList:[],Tracking_URL:"",urlDialogShow:!1}},computed:{activeMenu:function(){var e;return null!==(e=this.$route.query.type)&&void 0!==e?e:"profile"},selShow:function(){return"all-orders"===this.activeMenu||"open-orders"===this.activeMenu}},watch:{$route:{handler:function(e){this.$utils.checkLogin()&&this.updateType()}},orderKeyword:function(){this.orderListQuery.page=1},enquiryKeyword:function(){this.enquiryListQuery.page=1}},mounted:function(){this.$utils.checkLogin()?(this.getMemberDetail(),this.updateType()):this.$router.replace("/")},methods:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({transformNumber:function(e){return Object(f.h)(Number(e)).toFixed(2)},handleClick:function(e,t){e&&this.$router.push({path:"/home/myDetail",query:{type:e}})},updateType:function(){"profile"===this.activeMenu?this.tabName="My Profile":"enquiry"===this.activeMenu?(this.tabName="My Enquiry",this.getEnquiryList()):"address"===this.activeMenu?(this.tabName="My Address",this.getAddressList()):(this.selword="","all-orders"===this.activeMenu&&(this.orderSelList=["Order Confirmed","In Production","In Transit","Order Completed"]),"open-orders"===this.activeMenu&&(this.orderSelList=["Order Confirmed","In Production","In Transit"]),this.tabName="My Orders",this.getOrdersList())},closeAddressDialog:function(){this.dialogVisible=!1},getMemberDetail:function(){var e=this;this.$axios.get("/au/member/detail").then((function(t){1===t.code&&(e.profileform=t.result,e.profileform.logo=e.profileform.logo?e.formatLogo(e.profileform.logo):[])})).catch((function(){}))},formatLogo:function(e){return[{url:e}]},onSave:function(form){var e=this;this.accountPasswordForm.confirm_password===this.accountPasswordForm.password?this.$refs[form].validate((function(t){if(!t)return console.log("error submit!!"),!1;var r,n,o={email:e.profileform.email,company:e.profileform.company,contacts:e.profileform.contacts,last_name:e.profileform.last_name,phone:e.profileform.phone,logo:null!==(r=null===(n=e.profileform.logo[0])||void 0===n?void 0:n.url)&&void 0!==r?r:""},l=!1;""!==e.accountPasswordForm.password.trim()&&(o.password=e.accountPasswordForm.password,o.confirm_password=e.accountPasswordForm.confirm_password,l=!0),e.$axios.post("/au/member/edit",o).then((function(t){1===t.code&&(e.$notify({customClass:"custom-notify-class",title:"success",message:"The profile information is modified successfully",type:"success"}),l&&setTimeout((function(){e.$store.dispatch("logout").then((function(){e.$router.push("/")}))}),500))})).catch((function(){}))})):this.$message.error("The second password is inconsistent!")},getOrdersList:function(){var e,t=this,r=this.accounts_id?this.accounts_id:null===(e=this.$store.state.userInfo)||void 0===e?void 0:e.memberCrmcomList.map((function(i){return i.id})).join(),n="all-orders"===this.activeMenu?"":"open-orders"===this.activeMenu?"Open Orders":"Closed Orders";this.tableLoading=!0,this.$axios.post("/crmdata/order_lists",{keyword:this.orderKeyword,page:this.orderListQuery.page,limit:this.orderListQuery.limit,accounts_id:r,Order_Stage:this.selword,type:n}).then((function(e){1===e.code&&(t.tableData=e.result.data,t.orderTotal=e.result.total,t.tableLoading=!1),t.$nextTick((function(){window.scroll(0,0)}))})).catch((function(){}))},goOrderDetail:function(e){var t=this.$router.resolve({path:"/home/myDetail/orderDetail",query:{id:e.sales_orders_id,crm:e.Account_Name_id}});window.open(t.href,"_blank")},getEnquiryList:function(){var e,t=this;this.tableLoading=!0,this.$axios.post("/crmdata/enquiries_lists",{keyword:this.enquiryKeyword,page:this.enquiryListQuery.page,limit:this.enquiryListQuery.limit,accounts_id:(null===(e=this.$store.state.userInfo)||void 0===e?void 0:e.crm_accounts_id)||""}).then((function(e){1===e.code&&(t.enquiryList=e.result.data,t.enquiryTotal=e.result.total,t.tableLoading=!1),t.$nextTick((function(){window.scroll(0,0)}))}))},goEnquiryDetail:function(e){var t=this.$router.resolve({path:"/home/myDetail/enquiryDetail",query:{id:e.enquiries_id}});window.open(t.href,"_blank")},getAddressList:function(){var e=this;this.$axios.get("address/list",{params:{page:this.addressListQuery.page,limit:this.addressListQuery.limit}}).then((function(t){1===t.code&&(e.addressList=t.result.data,e.addressTotal=t.result.total),e.$nextTick((function(){window.scroll(0,0)}))})).catch((function(){}))},addAddress:function(e){this.addressDetail={},this.componentVisible=e,this.dialogVisible=!0},editAddress:function(e,t){var r=this;this.$axios.get("address/detail/"+t).then((function(t){r.addressDetail=t.result,r.addressDetail.is_default=1===t.result.is_default,r.componentVisible=e,r.dialogVisible=!0})).catch((function(){}))},delAddress:function(e){var t=this;this.$axios.get("address/delete/"+e).then((function(e){t.$notify({title:"success",message:"Deleted successfully",type:"success",duration:3e3}),t.getAddressList()}))},setDefault:function(e){var t=this;this.$axios.get("address/set_default/"+e).then((function(e){t.$notify({title:"success",message:"Default address is set successfully",type:"success",duration:3e3}),t.getAddressList()}))},update:function(){this.getAddressList()},resetPassword:function(){var e=this;this.accountPasswordForm.confirm_password!==this.accountPasswordForm.password?this.$message.error("The second password is inconsistent!"):this.$axios({url:"au/member/reset",method:"POST",data:this.accountPasswordForm}).then((function(t){1===t.code&&(e.xxContentVisible=!0,e.xxContent="Password Reset Successful")})).catch((function(){}))},openTracking_URL:function(e){this.Tracking_URL=e,this.urlDialogShow=!0},handleNotification:function(){this.$router.push("/"),this.$store.dispatch("logout"),this.openDialog()}},Object(o.c)(["openDialog"]))},v=h,_=(r(790),r(791),r(22)),component=Object(_.a)(v,(function(){var e,t,n=this,o=n._self._c;return o("div",{staticClass:"com-main com-margin-auto com-fixationwidth-1400"},[o("el-breadcrumb",{attrs:{"separator-class":"el-icon-arrow-right"}},[o("el-breadcrumb-item",{attrs:{to:{path:"/"}}},[n._v("Home")]),n._v(" "),o("el-breadcrumb-item",[n._v(n._s(n.tabName))])],1),n._v(" "),o("div",{staticClass:"content"},[o("el-menu",{ref:"menu",staticClass:"el-menu-vertical",attrs:{"background-color":"#e8eaee","text-color":"#4a596c","active-text-color":"#fff","default-active":n.activeMenu},on:{select:n.handleClick}},[o("el-menu-item",{attrs:{index:"profile"}},[o("i",{staticClass:"iconfont"},[n._v("")]),n._v(" "),o("span",{attrs:{slot:"title"},slot:"title"},[n._v("My Profile")])]),n._v(" "),o("el-submenu",{attrs:{index:"order"}},[o("template",{slot:"title"},[o("i",{staticClass:"iconfont"},[n._v("")]),n._v(" "),o("span",{attrs:{slot:"title"},slot:"title"},[n._v("My Orders")])]),n._v(" "),o("el-menu-item",{attrs:{index:"all-orders"}},[n._v("All Orders")]),n._v(" "),o("el-menu-item",{attrs:{index:"open-orders"}},[n._v("Open Orders")]),n._v(" "),o("el-menu-item",{attrs:{index:"closed-orders"}},[n._v("Closed Orders")])],2)],1),n._v(" "),o("div",{staticClass:"content-right"},[o("div",{directives:[{name:"show",rawName:"v-show",value:"profile"===n.activeMenu,expression:"activeMenu === 'profile'"}]},[o("div",{staticClass:"content-form"},[o("p",{staticClass:"content-title"},[n._v(n._s(n.tabName))]),n._v(" "),o("el-form",{ref:"form",attrs:{model:n.profileform,rules:n.rules,"label-width":"220px"}},[o("el-row",[o("el-col",{attrs:{span:15}},[o("el-form-item",{attrs:{label:"Email Address",prop:"email"}},[o("el-input",{attrs:{disabled:!0},model:{value:n.profileform.email,callback:function(e){n.$set(n.profileform,"email",e)},expression:"profileform.email"}})],1)],1),n._v(" "),o("el-col",{attrs:{span:9}},[o("el-form-item",{staticClass:"upload-item",attrs:{label:"Your Logo"}},[o("image-upload",{attrs:{list:n.profileform.logo,disablePreview:!0,max:1},on:{"update:list":function(e){return n.$set(n.profileform,"logo",e)}}})],1)],1)],1),n._v(" "),o("el-form-item",{attrs:{label:"Company Name",prop:"company"}},[o("el-input",{model:{value:n.profileform.company,callback:function(e){n.$set(n.profileform,"company",e)},expression:"profileform.company"}})],1),n._v(" "),o("el-form-item",{attrs:{label:"First Name",prop:"contacts"}},[o("el-input",{model:{value:n.profileform.contacts,callback:function(e){n.$set(n.profileform,"contacts",e)},expression:"profileform.contacts"}})],1),n._v(" "),o("el-form-item",{attrs:{label:"Last Name",prop:"last_name"}},[o("el-input",{model:{value:n.profileform.last_name,callback:function(e){n.$set(n.profileform,"last_name",e)},expression:"profileform.last_name"}})],1),n._v(" "),o("el-form-item",{attrs:{label:"Contact Phone Number",prop:"phone"}},[o("el-input",{model:{value:n.profileform.phone,callback:function(e){n.$set(n.profileform,"phone",e)},expression:"profileform.phone"}})],1)],1)],1),n._v(" "),o("div",{staticClass:"content-form",staticStyle:{"margin-top":"20px"}},[o("p",{staticClass:"content-title"},[n._v("Account And Password")]),n._v(" "),o("el-form",{ref:"ruleForm",staticClass:"accountPasswordForm",attrs:{model:n.accountPasswordForm,"label-width":"220px"}},[o("el-form-item",{attrs:{label:"Enter the new password",prop:"password"}},[o("el-input",{model:{value:n.accountPasswordForm.password,callback:function(e){n.$set(n.accountPasswordForm,"password",e)},expression:"accountPasswordForm.password"}})],1),n._v(" "),o("el-form-item",{attrs:{label:"Retype the password",prop:"confirm_password"}},[o("el-input",{model:{value:n.accountPasswordForm.confirm_password,callback:function(e){n.$set(n.accountPasswordForm,"confirm_password",e)},expression:"accountPasswordForm.confirm_password"}})],1),n._v(" "),o("el-form-item",[o("el-button",{staticClass:"saveBtn",on:{click:function(e){return n.onSave("form")}}},[n._v("\n Save\n ")])],1)],1)],1)]),n._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:"enquiry"===n.activeMenu,expression:"activeMenu === 'enquiry'"}],staticClass:"content-form"},[o("p",{staticClass:"content-title"},[n._v(n._s(n.tabName))]),n._v(" "),o("div",{staticClass:"searchInput"},[o("el-input",{attrs:{placeholder:"Search your job name",clearable:""},on:{clear:n.getEnquiryList},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&n._k(e.keyCode,"enter",13,e.key,"Enter")?null:n.getEnquiryList.apply(null,arguments)}},model:{value:n.enquiryKeyword,callback:function(e){n.enquiryKeyword=e},expression:"enquiryKeyword"}},[o("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"suffix"},on:{click:n.getEnquiryList},slot:"suffix"})])],1),n._v(" "),o("el-table",{directives:[{name:"loading",rawName:"v-loading",value:n.tableLoading,expression:"tableLoading"}],staticStyle:{width:"100%"},attrs:{data:n.enquiryList,stripe:"","header-cell-style":{background:"#00213b",color:"#ffffff"}},on:{"row-click":n.goEnquiryDetail}},[o("el-table-column",{attrs:{prop:"Auto_Number",label:"Enquiry No"}}),n._v(" "),o("el-table-column",{attrs:{prop:"Enquiry_Title",label:"Job Name",width:"300"}}),n._v(" "),o("el-table-column",{attrs:{prop:"Customize_Pipeline_Stage",label:"Status"}}),n._v(" "),o("el-table-column",{attrs:{prop:"Enquiry_Created",label:"Date"},scopedSlots:n._u([{key:"default",fn:function(e){return[o("div",[n._v("\n "+n._s(n.$utils.formatTime(e.row.Sales_Order_Created,"DD/MM/YYYY",!0))+"\n ")])]}}])}),n._v(" "),o("el-table-column",{attrs:{label:"Action",width:"90",align:"center"}},[[o("el-button",{staticStyle:{"background-color":"rgb(0, 33, 59)",color:"#fff"},attrs:{size:"small",plain:""}},[n._v("View")])]],2)],1),n._v(" "),o("pagination",{directives:[{name:"show",rawName:"v-show",value:n.enquiryTotal>0,expression:"enquiryTotal > 0"}],attrs:{total:n.enquiryTotal,page:n.enquiryListQuery.page,limit:n.enquiryListQuery.limit},on:{"update:page":function(e){return n.$set(n.enquiryListQuery,"page",e)},"update:limit":function(e){return n.$set(n.enquiryListQuery,"limit",e)},pagination:n.getEnquiryList}})],1),n._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:"address"===n.activeMenu,expression:"activeMenu === 'address'"}],staticClass:"content-form"},[o("p",{staticClass:"content-title"},[n._v(n._s(n.tabName))]),n._v(" "),o("div",{staticClass:"address-content"},[o("div",{staticClass:"my-addresses add-address",on:{click:function(e){return n.addAddress(2)}}},[o("img",{attrs:{src:r(788),alt:""}}),n._v(" "),o("p",[n._v("Add address")])]),n._v(" "),n._l(n.addressList,(function(e){return o("div",{key:e.id,staticClass:"my-addresses address"},[o("div",{staticClass:"username"},[o("p",[n._v(n._s(e.name))]),n._v(" "),o("span",{directives:[{name:"show",rawName:"v-show",value:e.is_default,expression:"item.is_default"}]},[n._v("Default")])]),n._v(" "),o("div",{staticClass:"my-address-content"},[o("p",[n._v(n._s(e.state))]),n._v(" "),o("p",[n._v(n._s(e.city))]),n._v(" "),o("p",[n._v(n._s(e.address))]),n._v(" "),o("p",[n._v(n._s(e.post_code))]),n._v(" "),o("p",[n._v(n._s(e.country))]),n._v(" "),o("p",[n._v("Phone number: "+n._s(e.phone))])]),n._v(" "),o("div",{staticClass:"edit-btns"},[o("el-button",{attrs:{size:"mini"},on:{click:function(t){return n.editAddress(3,e.id)}}},[n._v("\n Edit\n ")]),n._v(" "),o("el-button",{attrs:{size:"mini"},on:{click:function(t){return n.delAddress(e.id)}}},[n._v("\n Remove\n ")]),n._v(" "),o("el-button",{directives:[{name:"show",rawName:"v-show",value:!e.is_default,expression:"!item.is_default"}],attrs:{size:"mini"},on:{click:function(t){return n.setDefault(e.id)}}},[n._v("\n Set as Default\n ")])],1)])}))],2),n._v(" "),o("pagination",{directives:[{name:"show",rawName:"v-show",value:n.addressTotal>0,expression:"addressTotal > 0"}],attrs:{total:n.addressTotal,page:n.addressListQuery.page,limit:n.addressListQuery.limit},on:{"update:page":function(e){return n.$set(n.addressListQuery,"page",e)},"update:limit":function(e){return n.$set(n.addressListQuery,"limit",e)},pagination:n.getAddressList}})],1),n._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:n.activeMenu.includes("orders"),expression:"activeMenu.includes('orders')"}],staticClass:"content-form"},[o("p",{staticClass:"content-title"},[n._v(n._s(n.tabName))]),n._v(" "),o("div",{staticClass:"searchInput"},[o("el-input",{attrs:{placeholder:"Search your job name",clearable:""},on:{clear:n.getOrdersList},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&n._k(e.keyCode,"enter",13,e.key,"Enter")?null:n.getOrdersList.apply(null,arguments)}},model:{value:n.orderKeyword,callback:function(e){n.orderKeyword=e},expression:"orderKeyword"}},[o("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"suffix"},on:{click:n.getOrdersList},slot:"suffix"})]),n._v(" "),n.selShow?o("el-select",{attrs:{filterable:"",clearable:"","default-first-option":"",placeholder:"Select the status"},model:{value:n.selword,callback:function(e){n.selword=e},expression:"selword"}},n._l(n.orderSelList,(function(option){return o("el-option",{key:option,attrs:{label:option,value:option}})})),1):n._e(),n._v(" "),(null===(e=n.$store.state.userInfo)||void 0===e||null===(e=e.memberCrmcomList)||void 0===e?void 0:e.length)>1?o("el-select",{attrs:{filterable:"",clearable:"","default-first-option":"",placeholder:"Select the CRM"},model:{value:n.accounts_id,callback:function(e){n.accounts_id=e},expression:"accounts_id"}},n._l(null===(t=n.$store.state.userInfo)||void 0===t?void 0:t.memberCrmcomList,(function(option){return o("el-option",{key:option.id,attrs:{label:option.name,value:option.id}})})),1):n._e(),n._v(" "),o("el-button",{staticStyle:{"background-color":"rgb(0, 33, 59)","border-color":"rgb(0, 33, 59)"},attrs:{type:"primary"},on:{click:n.getOrdersList}},[n._v("Submit")])],1),n._v(" "),o("el-table",{directives:[{name:"loading",rawName:"v-loading",value:n.tableLoading,expression:"tableLoading"}],staticStyle:{width:"100%"},attrs:{data:n.tableData,stripe:"","header-cell-style":{background:"#00213b",color:"#ffffff"}}},[o("el-table-column",{attrs:{prop:"Sales_Order_Title_Job_Name",label:"Job Name"}}),n._v(" "),o("el-table-column",{attrs:{width:"100",prop:"Reference",label:"Order No"}}),n._v(" "),o("el-table-column",{attrs:{width:"120",prop:"Sales_Order_Created",label:"Order Date"},scopedSlots:n._u([{key:"default",fn:function(e){return[o("div",[n._v("\n "+n._s(n.$utils.formatTime(e.row.Sales_Order_Created,"DD/MM/YYYY"))+"\n ")])]}}])}),n._v(" "),o("el-table-column",{attrs:{width:"140",prop:"Order_Stage_new",label:"Order Status"}}),n._v(" "),o("el-table-column",{attrs:{width:"160",prop:"Tracking_No_arr",label:"Tracking No#"},scopedSlots:n._u([{key:"default",fn:function(e){return[o("ul",{staticClass:"location"},n._l(e.row.Tracking_No_arr,(function(e){return o("li",{key:e.Tracking_No,on:{click:function(t){return n.openTracking_URL(e.Tracking_URL)}}},[o("i",{staticClass:"el-icon-location"}),n._v(n._s(e.Tracking_No))])})),0)]}}])}),n._v(" "),o("el-table-column",{attrs:{width:"110",prop:"Grand_Total",label:"Amount"},scopedSlots:n._u([{key:"default",fn:function(e){return[n._v("\n $"+n._s(n.transformNumber(e.row.Grand_Total))+"\n ")]}}])}),n._v(" "),o("el-table-column",{attrs:{label:"Action",width:"80",align:"center"},scopedSlots:n._u([{key:"default",fn:function(e){return[o("el-button",{staticStyle:{"background-color":"rgb(0, 33, 59)",color:"#fff"},attrs:{size:"small",plain:""},on:{click:function(t){return n.goOrderDetail(e.row)}}},[n._v("View")])]}}])})],1),n._v(" "),o("pagination",{directives:[{name:"show",rawName:"v-show",value:n.orderTotal>0,expression:"orderTotal > 0"}],attrs:{total:n.orderTotal,page:n.orderListQuery.page,limit:n.orderListQuery.limit},on:{"update:page":function(e){return n.$set(n.orderListQuery,"page",e)},"update:limit":function(e){return n.$set(n.orderListQuery,"limit",e)},pagination:n.getOrdersList}})],1)])],1),n._v(" "),o("add-address-dialog",{attrs:{dialogVisible:n.dialogVisible,data:n.addressDetail,componentVisible:n.componentVisible},on:{"update:dialogVisible":function(e){n.dialogVisible=e},"update:dialog-visible":function(e){n.dialogVisible=e},close:n.closeAddressDialog,update:n.update}}),n._v(" "),o("dialog-XX-success",{attrs:{visible:n.xxContentVisible,content:n.xxContent},on:{"update:visible":function(e){n.xxContentVisible=e},"notify-parent":n.handleNotification}}),n._v(" "),o("el-dialog",{attrs:{"lock-scroll":!1,visible:n.urlDialogShow,center:"",width:"850px",top:"20vh"},on:{"update:visible":function(e){n.urlDialogShow=e}}},[o("iframe",{staticStyle:{width:"100%",height:"500px"},attrs:{src:n.Tracking_URL,frameborder:"0"}})])],1)}),[],!1,null,"b5122ea0",null);t.default=component.exports;installComponents(component,{ImageUpload:r(654).default,Pagination:r(532).default,AddAddressDialog:r(569).default})}}]);
  2. //# sourceMappingURL=f3eb6c0.js.map