(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7b782dac"],{"329e":function(t,e,r){"use strict";r.d(e,"j",(function(){return s})),r.d(e,"g",(function(){return o})),r.d(e,"a",(function(){return l})),r.d(e,"b",(function(){return i})),r.d(e,"d",(function(){return n})),r.d(e,"e",(function(){return c})),r.d(e,"f",(function(){return d})),r.d(e,"h",(function(){return u})),r.d(e,"i",(function(){return p})),r.d(e,"c",(function(){return h})),r.d(e,"k",(function(){return b})),r.d(e,"l",(function(){return y})),r.d(e,"m",(function(){return f}));var a=r("66a5");const s=t=>Object(a["a"])({url:"/shopapi/order/page",method:"post",data:t}),o=t=>Object(a["a"])({url:"/shopapi/order/detail",method:"post",data:t}),l=t=>Object(a["a"])({url:"/shopapi/order/price/calculate",method:"post",data:t}),i=t=>Object(a["a"])({url:"/shopapi/order/price/calculateForOrder",method:"post",data:t}),n=t=>Object(a["a"])({url:"/shopapi/order/create",method:"post",data:t}),c=t=>Object(a["a"])({url:"/shopapi/order/create_for_design",method:"post",data:t}),d=t=>Object(a["a"])({url:"/shopapi/order/create_from_cart",method:"post",data:t}),u=t=>Object(a["a"])({url:"/shopapi/order/importOrder",method:"post",data:t}),p=t=>Object(a["a"])({url:"/shopapi/order/onHold",method:"post",data:t}),h=t=>Object(a["a"])({url:"/shopapi/order/cancel",method:"post",data:t}),b=t=>Object(a["a"])({url:"/shopapi/order/shipping/update",method:"post",data:t}),y=t=>Object(a["a"])({url:"/shopapi/order/updateItemLevelFittings",method:"post",data:t}),f=t=>Object(a["a"])({url:"/shopapi/order/updateOrderLevelFittings",method:"post",data:t})},"74a1":function(t,e,r){},b813:function(t,e,r){"use strict";r("74a1")},fc4a:function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"order-page default-main"},[r("div",{staticClass:"order-card order-query",attrs:{shadow:"always"}},[r("el-row",{attrs:{gutter:50}},[r("el-col",{staticClass:"order-query-item",attrs:{span:6}},[r("el-input",{attrs:{placeholder:"Shine Order Number"},model:{value:t.query.orderNo,callback:function(e){t.$set(t.query,"orderNo",e)},expression:"query.orderNo"}})],1),r("el-col",{staticClass:"order-query-item",attrs:{span:6}},[r("el-input",{attrs:{placeholder:"Tracking Number"},model:{value:t.query.trackingNumber,callback:function(e){t.$set(t.query,"trackingNumber",e)},expression:"query.trackingNumber"}})],1),r("el-col",{staticClass:"order-query-item",attrs:{span:6}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"All Order Status",clearable:""},model:{value:t.query.status,callback:function(e){t.$set(t.query,"status",e)},expression:"query.status"}},t._l(t.orderStatusList,(function(t){return r("el-option",{key:t.status,attrs:{label:t.label,value:t.status}})})),1)],1),r("el-col",{staticClass:"order-query-item",attrs:{span:6}},[r("el-date-picker",{staticStyle:{width:"100%"},attrs:{"value-format":"yyyy-MM-dd",type:"daterange","range-separator":"To","start-placeholder":"Start Date","end-placeholder":"End Date"},model:{value:t.currentSelectDate,callback:function(e){t.currentSelectDate=e},expression:"currentSelectDate"}})],1),r("el-col",{staticClass:"order-query-item button-box",attrs:{span:6}},[r("el-button",{staticClass:"button-box-item",attrs:{type:"primary",loading:t.searchLoading},on:{click:t.search}},[t._v("Search")]),r("el-button",{staticClass:"button-box-item",attrs:{loading:t.resetLoading},on:{click:t.reset}},[t._v("Reset")])],1)],1)],1),r("div",{staticClass:"order-card order-list"},[r("div",{staticClass:"order-list-top"},[r("el-row",{attrs:{gutter:50}},[r("el-col",{staticClass:"button-box",attrs:{span:6}},[r("el-button",{staticClass:"button-box-item",attrs:{type:"primary"},on:{click:t.paypal}},[t._v("Payment")]),r("el-button",{staticClass:"button-box-item",staticStyle:{visibility:"hidden"}},[t._v("Import Order")])],1)],1)],1),r("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.orderList,"tooltip-effect":"dark",stripe:""},on:{"selection-change":t.handleSelectionChange,"row-click":function(e){return t.toDetail(e.orderNo)}}},[r("el-table-column",{attrs:{type:"selection",width:"55"}}),r("el-table-column",{attrs:{prop:"orderNo",label:"Shine Orders No",align:"center"}}),1===t.currentShop.shopType?r("el-table-column",{attrs:{prop:"storeOrderNo",label:"Shopify No",align:"center"}}):t._e(),r("el-table-column",{attrs:{prop:"status",label:"Status",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("div",{style:[{"font-weight":"bold"},{color:t.statusColor(e.row.status,t.orderStatusList)}]},[t._v(t._s(t._f("statusFilters")(e.row.status,t.orderStatusList)))])]}}])}),r("el-table-column",{attrs:{prop:"addDate",label:"Order Date",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t._f("datetimeFormatter")(e.row.addDate)))]}}])}),r("el-table-column",{attrs:{prop:"totalPrice",label:"Total Cost",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("div",{staticStyle:{"font-weight":"bold"}},[t._v("$"+t._s(e.row.totalPrice))])]}}])}),r("el-table-column",{attrs:{label:"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-link",{staticStyle:{"font-weight":"bold"},attrs:{type:"primary"},on:{click:function(r){return t.toDetail(e.row.orderNo)}}},[t._v("Detail")])]}}])})],1),r("el-pagination",{staticClass:"pagination",attrs:{background:"",layout:"prev, pager, next, sizes","page-sizes":[10,20,30,40],total:t.query.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1),r("PaypalDialog",{attrs:{"order-price-list":t.orderPriceList,"order-ids":t.orderIds,"show-wallet-payment":!0},model:{value:t.showPaypal,callback:function(e){t.showPaypal=e},expression:"showPaypal"}})],1)},s=[],o=r("329e"),l=r("de73"),i=r("2f62"),n={name:"OrderList",components:{PaypalDialog:l["a"]},filters:{statusFilters(t,e){return e.find(e=>e.status===t).label}},data(){return{orderList:[],orderPriceList:[],currentSelectDate:[],query:{keyword:"",status:"",startDate:"",endDate:"",total:0,current:1,size:10},orderStatusList:[{status:1,label:"Pending",color:"#7469F0"},{status:2,label:"Confirmed",color:"#36CB78"},{status:3,label:"In production",color:"#36CA78"},{status:4,label:"Partial Shipment",color:"#0BD1E9"},{status:5,label:"All Shipments",color:"#0BD1E9"},{status:6,label:"On hold",color:"#EE7777"},{status:7,label:"Cancelled",color:"#EE7777"}],searchLoading:!1,resetLoading:!1,showPaypal:!1,orderIds:[]}},computed:{statusColor(){return(t,e)=>e.find(e=>e.status===t).color},...Object(i["b"])("user",{currentShop:"getCurrentShop"})},created(){this.getOrderList()},methods:{async getOrderList(){const t=Object.assign([],this.currentSelectDate),e=Object.assign({},this.query);e.startDate=t[0],e.endDate=t[1];const r=await Object(o["j"])(e);this.orderList=r.data.records,this.query.total=r.data.total},async reset(){this.resetLoading=!0,this.query=this.$options.data().query,this.currentSelectDate=[];try{await this.getOrderList()}finally{this.resetLoading=!1}},async search(){this.searchLoading=!0,this.query.current=1;try{await this.getOrderList()}finally{this.searchLoading=!1}},paypal(){this.orderIds.length?this.showPaypal=!0:this.$message.info("Please select order")},async inportOrder(t){const{uid:e}=t,r=await Object(o["h"])({fileId:e});console.log(r)},toDetail(t){this.callNewPage("/Orders/"+t)},handleSelectionChange(t){this.orderIds=t.filter(t=>1===t.status).map(t=>t.id),this.orderPriceList=t.filter(t=>1===t.status).map(t=>t.totalPrice)},handleSizeChange(t){this.query.size=t,this.getOrderList()},handleCurrentChange(t){this.query.current=t,this.getOrderList()}}},c=n,d=(r("b813"),r("2877")),u=Object(d["a"])(c,a,s,!1,null,"0feb803b",null);e["default"]=u.exports}}]);