chunk-02593b79.667250fb.js 30 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-02593b79"],{"0cd8":function(t,s,e){"use strict";var a=e("5ca1"),i=e("7b23");a(a.P+a.F*!e("2f21")([].reduce,!0),"Array",{reduce:function(t){return i(this,t,arguments.length,arguments[1],!1)}})},"1c01":function(t,s,e){var a=e("5ca1");a(a.S+a.F*!e("9e1e"),"Object",{defineProperty:e("86cc").f})},"331d":function(t,s,e){},"39d7":function(t,s,e){},"3d56":function(t,s,e){"use strict";var a=function(){var t=this,s=t._self._c;return s("div",[s("el-dialog",{attrs:{title:"收货地址",visible:t.value},on:{"update:visible":function(s){t.value=s}}},[s("address-save",{attrs:{addressData:t.addressData},on:{submitSuccess:function(s){return t.submit("submitSuccess",s)},submitError:function(s){return t.submit("submitError",s)}}})],1)],1)},i=[],r=e("6489"),n={components:{AddressSave:r["a"]},model:{prop:"show",event:"show"},props:{show:{default:!0},addressData:{default:null}},computed:{value:{get:function(){return this.show},set:function(t){this.$emit("show",t)}}},name:"address-save-dialog",data:function(){return{}},mounted:function(){},methods:{submit:function(t,s){this.$emit(t,s),"submitSuccess"===t&&(this.value=!1)}}},o=n,c=e("2877"),l=Object(c["a"])(o,a,i,!1,null,"103d1cfb",null);s["a"]=l.exports},"43f3":function(t,s,e){"use strict";e("d368")},"456d":function(t,s,e){var a=e("4bf8"),i=e("0d58");e("5eda")("keys",(function(){return function(t){return i(a(t))}}))},"48ae":function(t,s,e){"use strict";e.r(s);var a=function(){var t=this,s=t._self._c;return s("div",{staticClass:"wrap"},[s("div",{staticClass:"middle-container"},[s("div",{staticClass:"main-title-wrap"},[s("span",{staticClass:"home-page",on:{click:function(s){return t.$router.push("/")}}},[t._v("首页")]),s("img",{staticClass:"main-back-icon",attrs:{src:e("c8fc")}}),s("span",{staticClass:"current-page"},[t._v("我的订单")])]),s("div",{staticClass:"main-wrap"},[s("my-sidebar"),s("div",{staticClass:"rightsidebar"},[s("ul",{staticClass:"tab-list"},[s("li",{class:{active:""===t.params.order_status},on:{click:function(s){return t.checkStatus("")}}},[t._v("\n 全部订单"+t._s(t.orderCount.sum?"(".concat(t.orderCount.sum,")"):"")+"\n ")]),s("li",{class:{active:"waitpay"===t.params.order_status},on:{click:function(s){return t.checkStatus("waitpay")}}},[t._v("\n 待付款"+t._s(t.orderCount.waitpay?"(".concat(t.orderCount.waitpay,")"):"")+"\n ")]),s("li",{class:{active:"waitsend"===t.params.order_status},on:{click:function(s){return t.checkStatus("waitsend")}}},[t._v("\n 待发货"+t._s(t.orderCount.waitsend?"(".concat(t.orderCount.waitsend,")"):"")+"\n ")]),s("li",{class:{active:"waitconfirmdai"===t.params.order_status},on:{click:function(s){return t.checkStatus("waitconfirmdai")}}},[t._v("\n 待收货"+t._s(t.orderCount.waitconfirm?"(".concat(t.orderCount.waitconfirm,")"):"")+"\n ")]),s("li",{class:{active:"waitrate"===t.params.order_status},on:{click:function(s){return t.checkStatus("waitrate")}}},[t._v("\n 待评价"+t._s(t.orderCount.waitrate?"(".concat(t.orderCount.waitrate,")"):"")+"\n ")]),s("li",{class:{active:"-1"===t.params.order_status},on:{click:function(s){return t.checkStatus("-1")}}},[t._v("\n 退款售后\n")])]),t._m(0),"-1"!==t.params.order_status?s("ul",{staticClass:"list"},[t._l(t.list,(function(e,a){return s("li",{key:a},[s("p",{staticClass:"time"},[t._v(t._s(e.create_time))]),s("div",{staticStyle:{width:"100%",display:"flex","align-items":"center"}},[s("div",{staticStyle:{flex:"1"}},t._l(e.order_goods,(function(a,i){return s("div",{key:i,staticClass:"item-module"},[s("div",{staticClass:"item-big"},[s("div",{staticClass:"msg-module"},[s("img",{staticClass:"produt-img",attrs:{src:t.BASE_URL+a.sku_image}}),s("div",{staticClass:"msg-module-sidebar"},[s("p",{staticClass:"produt-title"},[t._v(t._s(a.sku_name))]),t._l(a.sku_spec_format,(function(e,a){return s("p",{key:a,staticClass:"produt-msg"},[t._v("\n "+t._s(e.spec_name)+":"+t._s(e.spec_value_name)+"\n ")])})),s("p",{staticClass:"produt-tag"})],2)])]),s("div",{staticClass:"price-box"},[s("span",{staticClass:"produt-price"},[t._v("¥ "+t._s(a.price))]),s("span",{staticClass:"produt-price-del"},[t._v("¥ "+t._s(a.cost_price))])]),s("div",{staticClass:"calc-box"},[s("span",{staticClass:"calc-num"},[t._v(t._s(a.num))])]),s("div",{staticClass:"commodity-operation"},[0===e.order_status?s("span",{staticClass:"operation",on:{click:function(s){return t.close(e.order_id)}}},[t._v("取消订单")]):4===e.order_status?s("span",{staticClass:"operation"},[t._v("已收货")]):s("span",{staticClass:"operation"},[t._v(t._s(a.delivery_status_name))]),0!==a.refund_status?s("span",{staticClass:"operation",staticStyle:{color:"#FF870E"}},[t._v(t._s(t.refundStatusMap[a.refund_status]||""))]):1===e.order_status?s("span",{staticClass:"operation",on:{click:function(s){return t.toRefund(e,a)}}},[t._v("申请退款")]):3===e.order_status?s("span",{staticClass:"operation",on:{click:function(s){return t.toRefund(e,a)}}},[t._v("退款/退货")]):t._e()]),s("div",{staticClass:"total-price-box"},[s("span",{staticClass:"font-1"},[t._v("¥ "+t._s(a.goods_money))]),s("span",{staticClass:"font-2"},[t._v("(运费:"+t._s(e.delivery_money)+")")])])])})),0),s("div",{staticStyle:{display:"flex","align-items":"center"}},[s("div",{staticClass:"order-status"},[s("span",{staticClass:"operation"},[t._v(t._s(e.order_status_name))]),s("span",{staticClass:"status",on:{click:function(s){return t.$router.push("/my-order-details?id=".concat(e.order_id))}}},[t._v("订单详情")])]),e.refundNum>0?s("div",{staticClass:"btn-box"}):s("div",{staticClass:"btn-box"},[0===e.order_status?[s("span",{staticClass:"btn",on:{click:function(s){return t.close(e.order_id)}}},[t._v("取消订单")]),s("span",{staticClass:"btn",on:{click:function(s){t.currentOrder=e,t.orderUpdateAddressShow=!0}}},[t._v("修改地址")]),s("button",{staticClass:"bg-btn",attrs:{type:"button"},on:{click:function(s){return t.pay(e.order_id,e.pay_money)}}},[t._v("立即付款")])]:t._e(),3===e.order_status?[s("button",{staticClass:"bg-btn",attrs:{type:"button"},on:{click:function(s){return t.takeDelivery(e.order_id)}}},[t._v("确认收货")])]:t._e(),4===e.order_status?[s("span",{staticClass:"btn",on:{click:function(s){t.currentOrder=e,t.orderApplyForInvoicingShow=!0}}},[t._v("申请开票")]),0===e.evaluate_status?s("button",{staticClass:"bg-btn",attrs:{type:"button"},on:{click:function(s){return t.$router.push("/evaluate?id=".concat(e.order_id))}}},[t._v("评价")]):t._e()]:t._e()],2)])])])})),s("normal-box",{attrs:{show:0===t.list.length}})],2):s("ul",{staticClass:"list"},[t._l(t.list,(function(e,a){return s("li",{key:a},[s("p",{staticClass:"time"},[t._v(t._s(e.create_time))]),s("div",{staticStyle:{width:"100%",display:"flex","align-items":"center"}},[s("div",{staticStyle:{flex:"1"}},[s("div",{staticClass:"item-module"},[s("div",{staticClass:"item-big"},[s("div",{staticClass:"msg-module"},[s("img",{staticClass:"produt-img",attrs:{src:t.BASE_URL+e.sku_image}}),s("div",{staticClass:"msg-module-sidebar"},[s("p",{staticClass:"produt-title"},[t._v(t._s(e.sku_name))]),s("p",{staticClass:"produt-tag"})])])]),s("div",{staticClass:"price-box"},[s("span",{staticClass:"produt-price"},[t._v("¥ "+t._s(e.price))]),s("span",{staticClass:"produt-price-del"},[t._v("¥ "+t._s(e.cost_price))])]),s("div",{staticClass:"calc-box"},[s("span",{staticClass:"calc-num"},[t._v(t._s(e.num))])]),s("div",{staticClass:"commodity-operation"},[s("span",{staticClass:"operation"},[t._v(t._s(e.delivery_status_name))])]),s("div",{staticClass:"total-price-box"},[s("span",{staticClass:"font-1"},[t._v("¥ "+t._s(e.goods_money))]),s("span",{staticClass:"font-2"},[t._v("(运费:"+t._s(e.delivery_money||"0.00")+")")])])])]),s("div",{staticStyle:{display:"flex","align-items":"center"}},[s("div",{staticClass:"order-status"},[s("span",{staticClass:"operation",staticStyle:{color:"#FF870E"}},[t._v(t._s(e.refund_status_name))]),s("span",{staticClass:"status",on:{click:function(s){return t.$router.push("/my-order-refund-details?id=".concat(e.order_id,"&order_goods_id=").concat(e.order_goods_id))}}},[t._v("订单详情")])]),s("div",{staticClass:"btn-box"})])])])})),s("normal-box",{attrs:{show:0===t.list.length}})],2)])],1)]),s("order-update-address",{on:{confirm:t.editAddress},model:{value:t.orderUpdateAddressShow,callback:function(s){t.orderUpdateAddressShow=s},expression:"orderUpdateAddressShow"}}),s("order-apply-for-invoicing",{attrs:{order:t.currentOrder},model:{value:t.orderApplyForInvoicingShow,callback:function(s){t.orderApplyForInvoicingShow=s},expression:"orderApplyForInvoicingShow"}})],1)},i=[function(){var t=this,s=t._self._c;return s("div",{staticClass:"title-row-wrap"},[s("span",{staticClass:"title-row-big"},[t._v("商品")]),s("span",{staticClass:"title-row-small"},[t._v("单价")]),s("span",{staticClass:"title-row-small"},[t._v("数量")]),s("span",{staticClass:"title-row-small"},[t._v("商品操作")]),s("span",{staticClass:"title-row-small"},[t._v("实付款")]),s("span",{staticClass:"title-row-small"},[t._v("交易状态")]),s("span",{staticClass:"title-row-small"},[t._v("交易操作")])])}],r=e("75fc"),n=(e("ac6a"),e("f3e2"),e("6d67"),e("f523")),o=e("cc9d"),c=e("a49b"),l=e("7873"),d=e("5c96"),u=(e("a18c"),e("7f7f"),function(){var t=this,s=t._self._c;return s("div",[s("el-dialog",{staticClass:"order-update-address",attrs:{title:"修改地址",visible:t.value,width:"max-content"},on:{"update:visible":function(s){t.value=s}}},[s("div",{staticClass:"edit-window"},[s("p",{staticClass:"edit-window-label"},[t._v("修改地址")]),s("p",{staticClass:"edit-window-msg"},[t._v("修改地址会影响物流时效,只能原价修改且付款后只能修改一次,若商品已发货、换仓、库存及配送变更等原因,可能会导致修改地址失败,请你谅解。")]),s("ul",{staticClass:"edit-list"},[t._l(t.list,(function(e,a){return s("li",{key:a,class:{active:t.id===e.id},on:{click:function(s){t.id=e.id,t.selectIndex=a}}},[s("span",{staticClass:"address-user-name"},[t._v(t._s(e.name))]),s("span",{staticClass:"address-msg"},[t._v(t._s(e.full_address)+" ")]),s("span",[t._v(t._s(e.mobile_show))])])})),s("normal-box",{attrs:{show:0===t.list.length}})],2),s("div",{staticClass:"edit-bottom"},[s("button",{staticClass:"add-address-btn",attrs:{type:"button"},on:{click:function(s){t.showAddAddress=!0}}},[t._v("新增地址")]),s("div",{staticClass:"edit-bottom-btn-box"},[s("button",{attrs:{type:"button"},on:{click:function(s){return t.confirm()}}},[t._v("确定")]),s("button",{staticClass:"border-btn",attrs:{type:"button"},on:{click:function(s){t.value=!1}}},[t._v("取消")])])])])]),s("address-save-dialog",{on:{submitSuccess:function(s){return t.getList()}},model:{value:t.showAddAddress,callback:function(s){t.showAddAddress=s},expression:"showAddAddress"}})],1)}),p=[],f=(e("1c01"),e("58b2"),e("8e6e"),e("d25f"),e("456d"),e("28a5"),e("bd86")),m=e("3d56");function v(t,s){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);s&&(a=a.filter((function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable}))),e.push.apply(e,a)}return e}function _(t){for(var s=1;s<arguments.length;s++){var e=null!=arguments[s]?arguments[s]:{};s%2?v(Object(e),!0).forEach((function(s){Object(f["a"])(t,s,e[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):v(Object(e)).forEach((function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(e,s))}))}return t}var h={components:{NormalBox:o["a"],AddressSaveDialog:m["a"]},model:{prop:"show",event:"show"},props:{show:{default:!0},addressId:{default:null}},watch:{addressId:function(t){this.id=t}},computed:{value:{get:function(){return this.show},set:function(t){this.$emit("show",t)}}},name:"order-update-address",data:function(){return{showAddAddress:!1,list:[],id:0}},mounted:function(){this.id=this.addressId,this.getList()},methods:{confirm:function(){if(0===this.list.length)return d["Message"].warning("请先新增地址");this.$emit("confirm",this.list[this.selectIndex])},getList:function(){var t=this;n["l"].page().then((function(s){var e=s.data;t.list=e.list.map((function(t){return _(_({},t),{},{mobile_show:t.mobile.split("").map((function(t,s){return s>2&&s<7?"*":t})).join("")})}))}))}}},b=h,g=(e("d674"),e("2877")),y=Object(g["a"])(b,u,p,!1,null,"453c2077",null),C=y.exports,A=function(){var t=this,s=t._self._c;return s("div",[s("el-dialog",{staticClass:"order-update-address",attrs:{title:"申请开票",visible:t.value,width:"max-content"},on:{"update:visible":function(s){t.value=s}}},[s("div",{staticClass:"apply-for-invoicing-window"},[s("p",{staticClass:"apply-for-invoicing-title"},[t._v("申请开票")]),s("div",{staticClass:"apply-for-invoicing-box"},[t.order.order_goods?s("img",{staticClass:"apply-for-invoicing-img",attrs:{src:t.BASE_URL+t.order.order_goods[0].sku_image}}):t._e(),s("p",{staticClass:"apply-for-invoicing-sidebar"},[s("span",{staticClass:"font-11"},[t._v("订单编号: "+t._s(t.params.order_no))]),s("span",{staticClass:"font-12"},[t._v("开票金额:¥"+t._s(t.params.invoice_price))])])]),s("div",{staticClass:"apply-for-invoicing-row"},[s("span",{staticClass:"apply-for-invoicing-name"},[t._v("发票类型: ")]),s("span",{staticClass:"apply-for-invoicing-msg"},[t._v("增值税电子普通发票")])]),s("div",{staticClass:"apply-for-invoicing-row"},[s("span",{staticClass:"apply-for-invoicing-name"},[t._v("发票抬头: ")]),s("div",{staticClass:"apply-for-invoicing-input-box"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.params.invoice_rise,expression:"params.invoice_rise"}],staticClass:"apply-for-invoicing-input",attrs:{type:"text",placeholder:"请填写需要开具发票的姓名"},domProps:{value:t.params.invoice_rise},on:{input:function(s){s.target.composing||t.$set(t.params,"invoice_rise",s.target.value)}}})])]),s("div",{staticClass:"apply-for-invoicing-btn-box"},[s("button",{attrs:{type:"button"},on:{click:function(s){return t.confirm()}}},[t._v("提交申请")]),s("button",{staticClass:"border-btn",attrs:{type:"button"},on:{click:function(s){t.value=!1}}},[t._v("不开发票")])])])])],1)},w=[],k={components:{},model:{prop:"show",event:"show"},props:{show:{default:!0},order:{default:{}}},watch:{order:function(t){this.setParams(t)}},computed:{value:{get:function(){return this.show},set:function(t){this.$emit("show",t)}}},name:"order-apply-for-invoicing",data:function(){return{BASE_URL:c["a"],params:{order_id:0,order_no:"",invoice_rise:"",invoice_type:"增值税",invoice_price:""}}},mounted:function(){this.setParams(this.order)},methods:{setParams:function(t){this.params={order_id:t.order_id,order_no:t.order_no,invoice_rise:"",invoice_type:"增值税",invoice_price:t.pay_money}},confirm:function(){var t=this;if(0===this.params.invoice_rise.length)return d["Message"].warning("请填写需要开具发票的姓名");n["o"].invoice(this.params).then((function(s){var e=s.message;d["Message"].success(e),t.value=!1}))}}},S=k,O=(e("9ae9"),Object(g["a"])(S,A,w,!1,null,"297656c5",null)),x=O.exports,j=e("325c"),N={components:{OrderApplyForInvoicing:x,OrderUpdateAddress:C,MySidebar:l["a"],NormalBox:o["a"]},data:function(){return{BASE_URL:c["a"],orderUpdateAddressShow:!1,orderApplyForInvoicingShow:!1,refundStatusMap:{1:"申请维权",2:"待退款",3:"维权结束"},orderCount:{waitpay:0,waitsend:0,waitconfirm:0,waitrate:0,sum:0},params:{order_status:"",page:1},list:[],loading:!1,noMore:!1,currentOrder:{}}},mounted:function(){var t=this;this.getList(),this.getOrderCount(),Object(j["b"])((function(){"-1"===t.params.order_status?t.getRefundList():t.getList()}))},methods:{toRefund:function(t,s){var e={goods:s,order:t};localStorage.setItem("page_apply-for-refund_data",JSON.stringify(e)),this.$router.push("/apply-for-refund")},editAddress:function(t){var s=this;console.log(t),Object(d["MessageBox"])({type:"warning",title:"提示",message:"确定修改收货地址?",showCancelButton:!0}).then((function(){n["o"].edit_address({order_id:s.currentOrder.order_id,address_id:t.id}).then((function(t){var e=t.message;d["Message"].success(e),s.checkStatus(s.params.order_status)}))}))},pay:function(t,s){var e=this;n["o"].order_pay({order_id:"".concat(t),pay_money:s,pay_type:"BALANCE"}).then((function(t){var s=t.message;d["Message"].success(s),e.checkStatus(e.params.order_status)}))},close:function(t){var s=this;Object(d["MessageBox"])({type:"warning",title:"提示",message:"确定取消订单?",showCancelButton:!0}).then((function(){n["o"].close({order_id:t}).then((function(t){var e=t.message;d["Message"].success(e),s.checkStatus(s.params.order_status)}))}))},takeDelivery:function(t){var s=this;Object(d["MessageBox"])({type:"warning",title:"提示",message:"确定确认收货?",showCancelButton:!0}).then((function(){n["o"].takeDelivery({order_id:t}).then((function(t){var e=t.message;d["Message"].success(e),s.checkStatus(s.params.order_status)}))}))},getOrderCount:function(){var t=this;n["o"].num({order_status:"waitpay,waitsend,waitconfirm,waitrate"}).then((function(s){var e=s.data;return t.orderCount=e}))},checkStatus:function(t){this.loading||(this.params.page=1,this.noMore=!1,this.params.order_status=t,"-1"===t?this.getRefundList():this.getList())},getList:function(){var t=this;this.noMore||this.loading||(this.loading=!0,n["o"].lists(this.params).then((function(s){var e=s.data,a=e.list.map((function(t){var s=!0,e=0;return t.order_goods.forEach((function(t){"string"===typeof t.sku_spec_format&&(t.sku_spec_format=JSON.parse(t.sku_spec_format||"[]")),s&&0===t.refund_status&&(s=!1),t.refund_status>0&&(e+=1)})),t["isAllRefund"]=s,t["refundNum"]=e,t}));t.list=1===t.params.page?a:[].concat(Object(r["a"])(t.list),Object(r["a"])(a)),0===a.length?t.noMore=!0:t.params.page+=1})).catch((function(){t.loading=!0,t.noMore=!0})).finally((function(){t.loading=!1,console.log(JSON.stringify(t.list,null,2))})))},getRefundList:function(){var t=this;n["q"].lists(this.params).then((function(s){var e=s.data;return t.list=e.list})).finally((function(){console.log(JSON.stringify(t.list,null,2))}))}}},R=N,B=(e("942b"),Object(g["a"])(R,a,i,!1,null,"66841c89",null));s["default"]=B.exports},5740:function(t,s){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAaCAYAAACgoey0AAAAAXNSR0IArs4c6QAAAmVJREFUSEvNlktoU1EQhv9JYmMEqVSweVna6kqiLuIDpIKCoIi4Eq2o4Ca3SVyIYlFwUbKwIFpE8JHEhRSL4BtR0HYj6LJmUwSpqIg2Ib6wXUjSmtxfEnuT29iYh4n2LufMme/8c+Y/XHG73cQ/+CKRiOgx8t/BhSeqVRM0YUUV1xv8fH1iIVLjpyBwgTyda3U9wQ5zGvdXfnwBwjXdyc91B/s3u9jb9g2NJjV/eyLP6gpml+NoWlX7jDPneQgLGvbUBcye1vmIT14Bsb9gSM9hS0e37L6VrjmYfvtSpHgPgFuDTlHQIHJQwtF+LfYbmEecFnxXt8KIl3I5NlqJreizbYSK2yCWaPu+/DDi2Jsm9D8dmf0B0aaaXbYnIDZBkAJEkVDsajlwKg4fwPMA5+nyh7eNNK/NwEv6mIr9K8Cm6c0EDN0SjvYVg7NnRQPi4xdAembkCAZgNXvWPFycyMRLg732TpDXQJhyhQyGXglGTxbC6W+1IjV1B+CG3JpABeS4hGJnM7GKXi56HTtA3gRp0RUMwqockkAga0h6netA9S5Ih+5AExBjp4TGHmuxisDZwoqtA5AHABfl4XIDtB2AIb4PZBCkWbc2CpPslIvRV/rOVAzOwn3OVVDTgyCsumfnNcDlBW1/BFj2SvjtROF1VAX+BW9pRzo1BHDZrAMmcgZWzwntCmoGzsIPtzUjOTkIcrVOeRJi8EhobOBPdqtasVaUSnsjJHEdxHZA3sNk3CWXPgyX8vhfg/MHsLXAZv4kgXfJUtCK7VROwXJzaqa4XGDVPq4UUCx/7iqulcJidebMf/VPA+RfN4ekXxQAAAAASUVORK5CYII="},"58b2":function(t,s,e){var a=e("5ca1");a(a.S+a.F*!e("9e1e"),"Object",{defineProperties:e("1495")})},"596c":function(t,s,e){},"5cea":function(t,s,e){"use strict";e("fbed")},"5eda":function(t,s,e){var a=e("5ca1"),i=e("8378"),r=e("79e5");t.exports=function(t,s){var e=(i.Object||{})[t]||Object[t],n={};n[t]=s(e),a(a.S+a.F*r((function(){e(1)})),"Object",n)}},6489:function(t,s,e){"use strict";e("7f7f");var a=function(){var t=this,s=t._self._c;return s("div",{staticClass:"add-wrap"},[s("div",{staticClass:"form-row"},[s("span",{staticClass:"form-label"},[t._v("收货人")]),s("div",{staticClass:"form-input-box"},[s("el-input",{attrs:{placeholder:"请输入姓名"},model:{value:t.params.name,callback:function(s){t.$set(t.params,"name",s)},expression:"params.name"}})],1)]),s("div",{staticClass:"form-row"},[s("span",{staticClass:"form-label"},[t._v("手机号")]),s("div",{staticClass:"form-input-box"},[s("el-input",{attrs:{placeholder:"请输入手机号"},model:{value:t.params.mobile,callback:function(s){t.$set(t.params,"mobile",s)},expression:"params.mobile"}})],1)]),s("div",{staticClass:"form-row"},[s("span",{staticClass:"form-label"},[t._v("收货地址")]),s("div",{staticClass:"form-select-box"},[s("div",{staticClass:"select-box"},[s("el-select",{attrs:{placeholder:"请选择省份"},on:{change:function(s){return t.selectAddress(0)}},model:{value:t.params.province_id,callback:function(s){t.$set(t.params,"province_id",s)},expression:"params.province_id"}},t._l(t.provinceList,(function(t,e){return s("el-option",{key:e,attrs:{label:t.name,value:t.id}})})),1)],1),s("div",{staticClass:"select-box"},[s("el-select",{attrs:{placeholder:"请选择县区"},on:{change:function(s){return t.selectAddress(1)}},model:{value:t.params.city_id,callback:function(s){t.$set(t.params,"city_id",s)},expression:"params.city_id"}},t._l(t.cityList,(function(t,e){return s("el-option",{key:e,attrs:{label:t.name,value:t.id}})})),1)],1),s("div",{staticClass:"select-box"},[s("el-select",{attrs:{placeholder:"请选择街/道"},on:{change:function(s){return t.selectAddress(2)}},model:{value:t.params.district_id,callback:function(s){t.$set(t.params,"district_id",s)},expression:"params.district_id"}},t._l(t.areaList,(function(t,e){return s("el-option",{key:e,attrs:{label:t.name,value:t.id}})})),1)],1)])]),s("div",{staticClass:"form-row-column"},[s("span",{staticClass:"form-label"},[t._v("详细位置")]),s("div",{staticClass:"form-textarea-box"},[s("el-input",{attrs:{type:"textarea",placeholder:"请输入详细位置",maxlength:"80","show-word-limit":""},model:{value:t.params.address,callback:function(s){t.$set(t.params,"address",s)},expression:"params.address"}})],1)]),s("div",{staticClass:"default-row",on:{click:function(s){t.params.is_default=1===t.params.is_default?0:1}}},[1===t.params.is_default?s("img",{attrs:{src:e("5740")}}):s("img",{attrs:{src:e("87aa")}}),t._v("\n 设为默认地址\n ")]),s("div",{staticClass:"btn-box"},[s("button",{attrs:{type:"button"},on:{click:function(s){return t.submit()}}},[t._v("保存")])])])},i=[],r=(e("1c01"),e("58b2"),e("8e6e"),e("f3e2"),e("d25f"),e("ac6a"),e("456d"),e("0cd8"),e("bd86")),n=e("f523"),o=e("325c"),c=e("5c96");function l(t,s){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);s&&(a=a.filter((function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable}))),e.push.apply(e,a)}return e}function d(t){for(var s=1;s<arguments.length;s++){var e=null!=arguments[s]?arguments[s]:{};s%2?l(Object(e),!0).forEach((function(s){Object(r["a"])(t,s,e[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):l(Object(e)).forEach((function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(e,s))}))}return t}var u={name:"address-save",props:{show:{default:!0},addressData:{default:null}},data:function(){var t={id:0,name:"",mobile:"",province_id:"",city_id:"",district_id:"",address:"",full_address:"",is_default:0},s=[["name",["notNull","请输入姓名"]],["mobile",["notNull","请输入手机号"]],["province_id",["notNull","请选择省份"]],["city_id",["notNull","请选择城市"]],["district_id",["notNull","请选择区县"]],["address",["notNull","请输入详细地址"]]],e=Object(o["d"])(t,s);return{params:t,validatorNullList:s,validatorNullResult:e,provinceList:[],provinceMap:{},cityList:[],cityMap:{},areaList:[],areaMap:{}}},mounted:function(){this.params=JSON.parse(JSON.stringify(this.addressData||d({province_id:"",city_id:"",district_id:""},this.params))),this.getAddressTree()},watch:{addressData:function(t){this.params=d({id:0,name:"",mobile:"",province_id:"",city_id:"",district_id:"",address:"",full_address:"",is_default:0},JSON.parse(JSON.stringify(t||{}))),this.params.id>0&&this.getAddressTree(0)},params:{deep:!0,handler:function(t){this.validatorNullResult=Object(o["d"])(t,this.validatorNullList)}}},methods:{submit:function(){var t=this,s=this.params;if(this.validatorNullResult.length>0)return c["Message"].warning(this.validatorNullResult[0].errMsg);s.full_address=this.provinceMap[s.province_id].name+this.cityMap[s.city_id].name+this.areaMap[s.district_id].name+s.address;var e=s.id>0?n["l"].edit:n["l"].add;e(s).then((function(){c["Message"].success(s.id>0?"更新成功":"新增成功"),t.$emit("submitSuccess",s)})).catch((function(){t.$emit("submitError",s)}))},selectAddress:function(t){t<2&&(0===t&&(this.cityList=[],this.areaList=[],this.params.city_id="",this.params.district_id=""),1===t&&(this.areaList=[],this.params.district_id=""),this.getAddressTree(t+1))},getAddressTree:function(){var t=this,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e={0:"province",1:"city",2:"area"},a={0:0,1:this.params.province_id,2:this.params.city_id},i=e[s],o=a[s];return n["a"].tree({id:o}).then((function(s){var e=s.data;t.$set(t,"".concat(i,"List"),e),t.$set(t,"".concat(i,"Map"),e.reduce((function(t,s){return d(d({},t),{},Object(r["a"])({},s.id,s))}),{}))}))}}},p=u,f=(e("43f3"),e("2877")),m=Object(f["a"])(p,a,i,!1,null,"43ec30f1",null);s["a"]=m.exports},"6d67":function(t,s,e){"use strict";var a=e("5ca1"),i=e("0a49")(1);a(a.P+a.F*!e("2f21")([].map,!0),"Array",{map:function(t){return i(this,t,arguments[1])}})},"75fc":function(t,s,e){"use strict";e.d(s,"a",(function(){return d}));var a=e("a745"),i=e.n(a),r=e("db2a");function n(t){if(i()(t))return Object(r["a"])(t)}var o=e("3953"),c=e("e630");function l(){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 d(t){return n(t)||Object(o["a"])(t)||Object(c["a"])(t)||l()}},7873:function(t,s,e){"use strict";var a=function(){var t=this,s=t._self._c;return s("ul",{staticClass:"leftsidebar"},t._l(t.list,(function(e,a){return s("li",{directives:[{name:"show",rawName:"v-show",value:!e.hide,expression:"!item.hide"}],key:a,class:{active:t.$route.path===e.path},on:{click:function(s){return t.$router.push(e.path)}}},[t._v("\n "+t._s(e.title)+"\n ")])})),0)},i=[],r=e("cb4b"),n={name:"my-sidebar",data:function(){var t=Object(r["a"])(),s=[{title:"个人信息",path:"/my"},{title:"我的权益",path:"/my-rights",hide:!(t.isLogin&&2===t.userInfo.member_type)},{title:"会员等级",path:"/membership-level"},{title:"购物车",path:"/shopping-cart"},{title:"我的订单",path:"/my-order"},{title:"账户余额",path:"/account-balance"},{title:"供应商入驻",path:"/supplier-settlement"},{title:"客服",path:"/customer-service"},{title:"使用帮助",path:"/my-use-help"},{title:"设置",path:"/set-up"}];return{list:s,loginStatus:t}},mounted:function(){},methods:{}},o=n,c=(e("5cea"),e("2877")),l=Object(c["a"])(o,a,i,!1,null,"22ec3a85",null);s["a"]=l.exports},"7b23":function(t,s,e){var a=e("d8e8"),i=e("4bf8"),r=e("626a"),n=e("9def");t.exports=function(t,s,e,o,c){a(s);var l=i(t),d=r(l),u=n(l.length),p=c?u-1:0,f=c?-1:1;if(e<2)for(;;){if(p in d){o=d[p],p+=f;break}if(p+=f,c?p<0:u<=p)throw TypeError("Reduce of empty array with no initial value")}for(;c?p>=0:u>p;p+=f)p in d&&(o=s(o,d[p],p,l));return o}},"7f7f":function(t,s,e){var a=e("86cc").f,i=Function.prototype,r=/^\s*function ([^ (]*)/,n="name";n in i||e("9e1e")&&a(i,n,{configurable:!0,get:function(){try{return(""+this).match(r)[1]}catch(t){return""}}})},"80d1":function(t,s,e){},"87aa":function(t,s){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAaCAYAAACgoey0AAAAAXNSR0IArs4c6QAAAFdJREFUSEtjNDY2/s9AB3D27FlGZGsYB9xidBdRKxBgHsPp41GLR4Oa3BAYTVywkIMXIKPZidzEhK5vNHGNJi6G0ew0mp3IDYHRAgSjACE3KInVN2ja1QD/gsAbf14pDQAAAABJRU5ErkJggg=="},"8e6e":function(t,s,e){var a=e("5ca1"),i=e("990b"),r=e("6821"),n=e("11e9"),o=e("f1ae");a(a.S,"Object",{getOwnPropertyDescriptors:function(t){var s,e,a=r(t),c=n.f,l=i(a),d={},u=0;while(l.length>u)e=c(a,s=l[u++]),void 0!==e&&o(d,s,e);return d}})},"942b":function(t,s,e){"use strict";e("331d")},"990b":function(t,s,e){var a=e("9093"),i=e("2621"),r=e("cb7c"),n=e("7726").Reflect;t.exports=n&&n.ownKeys||function(t){var s=a.f(r(t)),e=i.f;return e?s.concat(e(t)):s}},"9ae9":function(t,s,e){"use strict";e("80d1")},afec:function(t,s,e){"use strict";e("39d7")},c8fc:function(t,s){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAgCAYAAAASYli2AAAAAXNSR0IArs4c6QAAAu5JREFUSEullk1oE0EUx99kYQvSKKQVVBBqa3vwUA87223xq71ZU0Rsox7Uo1VPIggehDQXD6VXvdSiIHqJWAuNHxEkiDQknTmIiBelflzEiIiiHra7f5myKek0aTbtO86+/2/evnnvzTDOeT+ASSLaRESXpJRp2oAxzvlnADsDBhhj14QQ19fLZJZlLRBRWyWAMXYbwKiU0m0UrCI8AuAhETVp4hfRaHQ4l8v9bATKlLNlWfsZY48AtGjid4ZhxIvFovqLULYEVNbX17fbdd0MgC5N+Y2IjkopC2GIy8AAGnNddxrAQS2n/4jorBDiQT3oCqByTiQS5sLCwhSA05pYVcBVIcT4WtBVwLIz53wMQLKKeDIajV7M5XKL1cA1gcqZc34GwC0iMrUUPDcMY6RQKPzSoWsClbNt24dUWQGIadC3pmnG5+bmPq1Yr5dk9b2np6fL87zHRNShQb8ahjFUKBRkeb1uhGVHy7Jag1rdp0F/RyKRA8Vi8bVaDw1UzoODg02lUukOgFMaNCeEGGgYqAQAmG3bEwAuV0BhmmZrPp//0VCEZUAymYzMzs5+IaIdFdBuKeWbdQEty9pORO+DGbrENE2zZV0R9vb2trmumyWizoroPkopdzWcQ8dxuhcXF58SkYpw2SKRyJX5+fmJhoCqwH3fnyGiLdoJv4zH4wOpVMoPDbRt+7jv+/erDGE10oaklN9DFzbnfBTATSKKaF01S0QnpZR/Q7ce5zwJYKxKe062t7dfSKfTnv6tatmoOstkMjcAnF8lYGxMCJGqNQNWAYP2ugdgWEu+imZUCDFVC7bqUBzH2ex53gyAfk2k8nRCSplZC7YCaNv2Nt/3VY3t1UQlxtiQEKJYD7YMdByn0/O8ZwCWqr3CPpimeTifz6s2C2UsGJ6viGirljMRTGR1jYY29XJIAxjRYE9isVgim83+CU0KHNXbZpqIjpWF6l3T3Nx8rtatVm8DBexgjN0FsIcxNr6Rl5fa7D/CPDAwNR5fWQAAAABJRU5ErkJggg=="},cc9d:function(t,s,e){"use strict";var a=function(){var t=this,s=t._self._c;return t.show?s("div",{staticClass:"normal-box"},[s("img",{attrs:{src:e("e18b"),alt:""}}),t._v("\n 暂无数据\n")]):t._e()},i=[],r={props:{show:{default:!1}},name:"normal-box",data:function(){return{}}},n=r,o=(e("afec"),e("2877")),c=Object(o["a"])(n,a,i,!1,null,"9c6dfd84",null);s["a"]=c.exports},d25f:function(t,s,e){"use strict";var a=e("5ca1"),i=e("0a49")(2);a(a.P+a.F*!e("2f21")([].filter,!0),"Array",{filter:function(t){return i(this,t,arguments[1])}})},d368:function(t,s,e){},d674:function(t,s,e){"use strict";e("596c")},e18b:function(t,s,e){t.exports=e.p+"img/normal.540f7eb9.png"},f1ae:function(t,s,e){"use strict";var a=e("86cc"),i=e("4630");t.exports=function(t,s,e){s in t?a.f(t,s,i(0,e)):t[s]=e}},fbed:function(t,s,e){}}]);
  2. //# sourceMappingURL=chunk-02593b79.667250fb.js.map