| 1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-5872c6dd"],{"078f":function(e,t,r){e.exports={primary:"#4073fa",white:"#fff",asideMenuWidth:"150px",headerHeight:"64px"}},"192a":function(e,t,r){"use strict";r.d(t,"A",(function(){return s})),r.d(t,"v",(function(){return i})),r.d(t,"x",(function(){return o})),r.d(t,"z",(function(){return l})),r.d(t,"n",(function(){return n})),r.d(t,"u",(function(){return d})),r.d(t,"t",(function(){return c})),r.d(t,"y",(function(){return _})),r.d(t,"m",(function(){return f})),r.d(t,"r",(function(){return u})),r.d(t,"s",(function(){return m})),r.d(t,"p",(function(){return p})),r.d(t,"q",(function(){return h})),r.d(t,"o",(function(){return v})),r.d(t,"f",(function(){return b})),r.d(t,"e",(function(){return g})),r.d(t,"a",(function(){return y})),r.d(t,"g",(function(){return w})),r.d(t,"c",(function(){return x})),r.d(t,"h",(function(){return D})),r.d(t,"b",(function(){return C})),r.d(t,"i",(function(){return S})),r.d(t,"d",(function(){return k})),r.d(t,"w",(function(){return O})),r.d(t,"j",(function(){return j})),r.d(t,"k",(function(){return $})),r.d(t,"l",(function(){return z}));var a=r("f175");const s=()=>a.a.get("/order.order/otherLists"),i=e=>a.a.get("/order.order/detail",{params:e}),o=e=>a.a.get("/order.order/lists",{params:e}),l=e=>a.a.post("/order.order/orderRemarks",e),n=e=>a.a.post("/order.order/cancel",e),d=e=>a.a.get("/order.order/deliveryInfo",{params:e}),c=e=>a.a.post("/order.order/delivery",e),_=e=>a.a.get("/order.order/logistics",{params:e}),f=e=>a.a.post("/order.order/addressEdit",e),u=e=>a.a.post("/order.order/confirm",e),m=e=>a.a.post("/order.order/confirmOfflinePay",e),p=e=>a.a.post("/order.order/changeExpressPrice",e),h=e=>a.a.post("/order.order/changePrice",e),v=e=>a.a.post("/order.order/changeDelivery",e),b=e=>a.a.get("/after_sale.after_sale/lists",{params:e}),g=e=>a.a.get("/after_sale.after_sale/detail",{params:e}),y=e=>a.a.post("/after_sale.after_sale/agree",e),w=e=>a.a.post("/after_sale.after_sale/refuse",e),x=e=>a.a.post("/after_sale.after_sale/confirmGoods",e),D=e=>a.a.post("/after_sale.after_sale/refuseGoods",e),C=e=>a.a.post("/after_sale.after_sale/agreeRefund",e),S=e=>a.a.post("/after_sale.after_sale/refuseRefund",e),k=e=>a.a.post("/after_sale.after_sale/confirmRefund",e),O=e=>a.a.post("/order.DeliveryBatch/delivery",e),j=e=>a.a.get("/order.DeliveryBatch/index",{params:e}),$=e=>a.a.get("/order.DeliveryBatch/down",{params:e}),z=e=>a.a.get("/order.DeliveryBatch/down2",{params:e})},3044:function(e,t,r){"use strict";r("30cd")},"30cd":function(e,t,r){},"4ba2":function(e,t,r){"use strict";r.r(t);r("14d9"),r("13d5"),r("0643"),r("76d6"),r("4e3e"),r("a573"),r("9d4a");var a=r("9ab4"),s=r("1b40"),i=r("0a6d"),o=r("5cf7"),l=r("ffae"),n=r("6ddb"),d=r("192a");let c=class extends s.e{constructor(){super(...arguments),this.id=0,this.orderData={after_sale:{id:2,order_id:1,user_id:1,sn:"20210809184530062266134",refund_type:2,refund_type_desc:"商品售后",refund_method:1,refund_method_desc:"仅退款",status:1,status_desc:"售后中",refund_reason:"7天无理由",refund_remark:"",refund_image:"",create_time:"2021-08-09 18:45:30",express_name:"",invoice_no:"",express_remark:"",express_image:""},return_goods_info:{user_sn:"100001",user_nickname:"测试用户",user_mobile:"13800138000"},order_info:{order_status:3,order_status_desc:"已完成",sn:"SN0001",order_type:0,order_type_desc:"普通订单",order_terminal:1,order_terminal_desc:"微信小程序",create_time:"2021-08-05 16:35:31",pay_status:1,pay_status_desc:"已支付",pay_way:1,pay_way_desc:"微信支付",pay_time:"——",confirm_take_time:"——"},goods_info:{order_goods:[{item_image:"",spec_value_str:"黑色,L码",goods_name:"小米10青春版",goods_image:"",goods_price:"20.00",goods_num:1,total_price:null,discount_price:null,total_pay_price:"80.00",refund_amount:"50.00"}],order_goods_sum:{sum_refund_amount:50,sum_total_pay_price:80,sum_discount_price:0,sum_total_price:0,sum_goods_num:1}},after_sale_log:[{operator_role:3,operator_id:1,content:"卖家已确认退款,售后退款中",create_time:"2021-08-09 20:29:14",operator_name:"ljj"},{operator_role:3,operator_id:1,content:"卖家已同意,等待退款",create_time:"2021-08-09 20:24:57",operator_name:"ljj"},{operator_role:2,operator_id:1,content:"买家发起商品售后,等待卖家同意",create_time:"2021-08-09 18:45:30",operator_name:"测试用户"}],btns:{agree_btn:!1,refuse_btn:!1,refuse_goods_btn:!1,confirm_goods_btn:!1,agree_refund_btn:!0,refuse_refund:!0,change_btn:!1}},this.reason="",this.refund_total_amount="",this.refund_way="1"}toUserDetail(){this.$router.push({path:"/user/user_details",query:{id:this.orderData.after_sale.user_id}})}reviews(e){window.open(e)}getOrderDetail(){Object(d.e)({id:this.id}).then(e=>{this.orderData=e,this.refund_total_amount=e.goods_info.order_goods_sum.sum_refund_amount})}afterSaleAgree(){Object(d.a)({id:this.id}).then(e=>{this.getOrderDetail()})}afterSaleRefuse(){Object(d.g)({id:this.id}).then(e=>{this.getOrderDetail()})}afterSaleConfirmGoods(){Object(d.c)({id:this.id}).then(e=>{this.getOrderDetail()})}afterSaleRefuseGoods(){Object(d.h)({id:this.id}).then(e=>{this.getOrderDetail()})}afterSaleAgreeRefund(){Object(d.b)({id:this.id}).then(e=>{this.getOrderDetail()})}afterSaleRefuseRefund(){Object(d.i)({id:this.id}).then(e=>{this.getOrderDetail()})}afterSaleConfirmRefund(){Object(d.d)({id:this.id,refund_way:this.refund_way,refund_total_amount:this.refund_total_amount}).then(e=>{this.getOrderDetail()})}toOrder(e){this.$router.push({path:"/order/order_detail",query:{id:e}})}getSummaries(e){const{columns:t,data:r}=e,a=[];return t.forEach((e,t)=>{if(0===t)return void(a[0]="总价");const s=r.map(t=>Number(t[e.property]));if(!s.every(e=>isNaN(e))){if(1==t)return;a[t]=s.reduce((e,t)=>{const r=Number(t);return isNaN(r)?e:e+t},0),2!==t&&(a[t]="¥"+a[t])}}),a}created(){this.id=this.$route.query.id,this.id&&this.getOrderDetail(),this.afterSaleConfirmRefund=Object(n.h)(this.afterSaleConfirmRefund,1e3)}};c=Object(a.a)([Object(s.a)({components:{LsDialog:i.a,AreaSelect:o.a,OrderLogistics:l.a}})],c);var _=c,f=(r("3044"),r("2877")),u=Object(f.a)(_,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("header",[r("div",{staticClass:"ls-card"},[r("el-page-header",{attrs:{content:"售后详情"},on:{back:function(t){return e.$router.go(-1)}}})],1),r("div",{staticClass:"flex m-t-24"},[r("div",{staticClass:"ls-card flex flex-wrap col-stretch"},[r("div",{staticStyle:{width:"100%"}},[r("div",{staticClass:"nr weight-500 title"},[e._v("售后信息")]),r("div",{staticClass:"flex col-top p-20"},[r("el-form",{ref:"form",attrs:{model:e.orderData,"label-width":"120px",size:"small"}},[r("el-form-item",{attrs:{label:"售后状态"}},[r("div",[e._v(" "+e._s(e.orderData.after_sale.status_desc)+" ")]),e.orderData.after_sale.refund_image?r("el-image",{staticStyle:{width:"50px",height:"50px"},attrs:{fit:"fit",src:e.orderData.after_sale.refund_image}}):e._e()],1),r("el-form-item",{attrs:{label:"售后单号"}},[e._v(" "+e._s(e.orderData.after_sale.sn||"")+" ")]),r("el-form-item",{attrs:{label:"售后类型"}},[e._v(" "+e._s(e.orderData.after_sale.refund_type_desc)+" ")]),r("el-form-item",{attrs:{label:"售后数量"}},[e._v(" "+e._s(e.orderData.goods_info.order_goods_sum.sum_goods_num||0)+" ")]),r("el-form-item",{attrs:{label:"申请时间"}},[e._v(" "+e._s(e.orderData.after_sale.create_time)+" ")]),r("el-form-item",{attrs:{label:"退款凭证"}},e._l(e.orderData.after_sale.voucher,(function(t,a){return r("div",{key:a,staticClass:"inline m-r-10"},[r("el-image",{staticStyle:{width:"50px",height:"50px"},attrs:{src:t,fit:"fit"},on:{click:function(r){return e.reviews(t)}}})],1)})),0)],1),r("el-form",{ref:"form",staticStyle:{"margin-left":"15vw"},attrs:{model:e.orderData,"label-width":"120px",size:"small"}},[r("el-form-item",{attrs:{label:"订单编号"}},[r("span",{staticClass:"order pointer",on:{click:function(t){return e.toOrder(e.orderData.after_sale.order_id)}}},[e._v(" "+e._s(e.orderData.order_info.sn||"")+" ")])]),r("el-form-item",{attrs:{label:"售后原因"}},[e._v(" "+e._s(e.orderData.after_sale.refund_reason)+" ")]),r("el-form-item",{attrs:{label:"售后方式"}},[e._v(" "+e._s(e.orderData.after_sale.refund_method_desc)+" ")]),r("el-form-item",{attrs:{label:"退款金额"}},[e._v(" ¥"+e._s(e.orderData.goods_info.order_goods_sum.sum_refund_amount)+" ")]),2!==e.orderData.order_info.delivery_type?r("el-form-item",{attrs:{label:"发货状态"}},[e._v(" "+e._s(e.orderData.order_info.express_status_desc)+" ")]):e._e(),2==e.orderData.order_info.delivery_type?r("el-form-item",{attrs:{label:"核销状态"}},[e._v(" "+e._s(0==e.orderData.order_info.verification_status?"待核销":"已核销")+" ")]):e._e(),r("el-form-item",{staticStyle:{"padding-right":"20px","word-break":"break-all"},attrs:{label:"退款说明"}},[e._v(" "+e._s(e.orderData.after_sale.refund_remark||"-")+" ")])],1)],1)]),r("div",{staticClass:"flex col-bottom",staticStyle:{width:"100%"}},[r("div",{staticClass:"border-top flex col-bottom row-left p-t-24",staticStyle:{width:"100%"}},[e.orderData.btns.agree_btn?r("ls-dialog",{staticClass:"inline m-l-24",attrs:{title:"同意售后",width:"20vw"},on:{confirm:e.afterSaleAgree}},[r("el-button",{attrs:{slot:"trigger",size:"small",type:"primary"},slot:"trigger"},[e._v("同意售后")]),r("div",[e._v("提示:售后同意")])],1):e._e(),e.orderData.btns.refuse_btn?r("ls-dialog",{staticClass:"inline m-l-24",attrs:{title:"拒绝售后",width:"20vw"},on:{confirm:e.afterSaleRefuse}},[r("el-button",{staticStyle:{},attrs:{slot:"trigger",size:"small"},slot:"trigger"},[e._v("拒绝售后")]),r("div",[e._v("提示:请填写拒绝售后的原因")]),r("div",{staticClass:"flex m-t-12"},[r("span",{staticClass:"inline m-b-24",staticStyle:{width:"70px"}},[e._v("拒绝原因")]),r("el-input",{staticClass:"m-t-10",attrs:{type:"textarea",rows:2,placeholder:"请输入拒绝原因"},model:{value:e.reason,callback:function(t){e.reason=t},expression:"reason"}})],1)],1):e._e(),e.orderData.btns.confirm_goods_btn?r("ls-dialog",{staticClass:"inline m-l-24",attrs:{title:"确认收货",width:"20vw"},on:{confirm:e.afterSaleConfirmGoods}},[r("el-button",{attrs:{slot:"trigger",size:"small",type:"primary"},slot:"trigger"},[e._v("确认收货")]),r("div",[e._v("提示:确认收货")])],1):e._e(),e.orderData.btns.refuse_goods_btn?r("ls-dialog",{staticClass:"inline m-l-24",attrs:{title:"拒绝收货",width:"20vw"},on:{confirm:e.afterSaleRefuseGoods}},[r("el-button",{staticStyle:{},attrs:{slot:"trigger",size:"small"},slot:"trigger"},[e._v("拒绝收货")]),r("div",[e._v("提示:请填写拒绝收货的原因")]),r("div",{staticClass:"flex m-t-12"},[r("span",{staticClass:"inline m-b-24",staticStyle:{width:"70px"}},[e._v("拒绝原因")]),r("el-input",{staticClass:"m-t-10",attrs:{type:"textarea",rows:2,placeholder:"请输入拒绝原因"},model:{value:e.reason,callback:function(t){e.reason=t},expression:"reason"}})],1)],1):e._e(),e.orderData.btns.change_btn?r("ls-dialog",{staticClass:"inline m-l-24",attrs:{title:"确认退款",width:"20vw"},on:{confirm:e.afterSaleConfirmRefund}},[r("el-button",{attrs:{slot:"trigger",size:"small",type:"primary"},slot:"trigger"},[e._v("确认退款")]),r("div",{staticClass:"m-t-12"},[e._v(" 退款方式: "),r("el-radio",{attrs:{label:"1"},model:{value:e.refund_way,callback:function(t){e.refund_way=t},expression:"refund_way"}},[e._v("原路退回")]),r("el-radio",{attrs:{label:"2"},model:{value:e.refund_way,callback:function(t){e.refund_way=t},expression:"refund_way"}},[e._v("退回余额")])],1),r("div",{staticClass:"m-t-12"},[e._v(" 退款金额: "),r("span",{staticStyle:{color:"red"}},[e._v("¥"+e._s(e.orderData.goods_info.order_goods_sum.sum_refund_amount))])])],1):e._e(),e.orderData.btns.agree_refund_btn?r("ls-dialog",{staticClass:"inline m-l-24",attrs:{title:"同意退款",width:"20vw"},on:{confirm:e.afterSaleAgreeRefund}},[r("el-button",{attrs:{slot:"trigger",size:"small",type:"primary"},slot:"trigger"},[e._v("同意退款")]),r("div",[e._v("提示:该笔订单通过微信支付付款,同意售后申请后,退款将自动原路退回会员账户。")]),r("div",{staticClass:"m-t-12"},[e._v(" 退货方式: "+e._s(e.orderData.after_sale.refund_method_desc)+" ")]),r("div",{staticClass:"m-t-12"},[e._v(" 退款金额: "),r("span",{staticStyle:{color:"red"}},[e._v("¥"+e._s(e.orderData.goods_info.order_goods_sum.sum_refund_amount))])])],1):e._e(),e.orderData.btns.refuse_refund?r("ls-dialog",{staticClass:"inline m-l-24",attrs:{title:"拒绝退款",width:"20vw"},on:{confirm:e.afterSaleRefuseRefund}},[r("el-button",{staticStyle:{},attrs:{slot:"trigger",size:"small"},slot:"trigger"},[e._v("拒绝退款")]),r("div",[e._v("提示:请与会员协商后确认拒绝申请,会员可再次发起退款。")]),r("div",{staticClass:"m-t-12"},[e._v(" 退货方式: "+e._s(e.orderData.after_sale.refund_method_desc)+" ")]),r("div",{staticClass:"m-t-12"},[e._v(" 退款金额: "),r("span",{staticStyle:{color:"red"}},[e._v("¥"+e._s(e.orderData.goods_info.order_goods_sum.sum_refund_amount))])]),r("div",{staticClass:"flex m-t-12"},[r("span",{staticClass:"inline m-b-24",staticStyle:{width:"70px"}},[e._v("拒绝原因")]),r("el-input",{staticClass:"m-t-10",attrs:{type:"textarea",rows:2,placeholder:"请输入拒绝原因"},model:{value:e.reason,callback:function(t){e.reason=t},expression:"reason"}})],1)],1):e._e()],1)])])])]),r("section",[r("div",{staticClass:"ls-card m-t-24 flex flex-wrap col-stretch",staticStyle:{height:"auto"}},[r("div",{staticStyle:{width:"100%"}},[r("div",{staticClass:"nr weight-500 m-b-20 title"},[e._v("买家信息")]),r("el-form",{ref:"form",staticClass:"flex",attrs:{model:e.orderData,"label-width":"120px",size:"small"}},[r("el-form-item",{attrs:{label:"买家昵称"}},[r("div",{staticClass:"order pointer",on:{click:function(t){return e.toUserDetail()}}},[e._v(" "+e._s(e.orderData.return_goods_info.user_nickname)+"("+e._s(e.orderData.return_goods_info.user_sn)+") ")])])],1)],1)]),r("div",{staticClass:"ls-card m-t-24"},[r("div",{staticClass:"nr weight-500 m-b-20 title"},[e._v("商品信息")]),r("el-table",{ref:"paneTable",staticStyle:{width:"100%"},attrs:{data:e.orderData.goods_info.order_goods,size:"mini","summary-method":e.getSummaries}},[r("el-table-column",{attrs:{label:"商品信息","min-width":"240"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",{staticClass:"flex m-t-10"},[r("el-image",{staticClass:"flex-none",staticStyle:{width:"58px",height:"58px"},attrs:{src:t.row.goods_image}}),r("div",{staticClass:"m-l-8 flex-1"},[r("div",{staticClass:"line-2"},[e._v(" "+e._s(t.row.goods_name)+" ")]),t.row.supplier_name?r("div",{staticClass:"line-2 muted"},[e._v(" 供应商:"+e._s(t.row.supplier_name)+" ")]):e._e(),r("div",{staticClass:"xs muted"},[e._v(" "+e._s(t.row.spec_value_str)+" ")])])],1)]}}])}),r("el-table-column",{attrs:{prop:"original_price",label:"商品价格","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v("¥"+e._s(t.row.original_price))])]}}])}),r("el-table-column",{attrs:{prop:"goods_num",label:"购买数量","min-width":"80"}}),r("el-table-column",{attrs:{label:"商品总额",prop:"total_amount","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v("¥"+e._s(t.row.total_amount))])]}}])}),r("el-table-column",{attrs:{label:"优惠金额",prop:"total_pay_price","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("¥"+e._s(t.row.total_discount))]}}])}),r("el-table-column",{attrs:{label:"订单调整",prop:"total_pay_price","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("¥"+e._s(t.row.change_price))]}}])}),r("el-table-column",{attrs:{label:"实付金额",prop:"total_pay_price","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("¥"+e._s(t.row.total_pay_price))]}}])}),r("el-table-column",{attrs:{label:"操作","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"text",size:"small"},on:{click:function(t){return e.toOrder(e.orderData.after_sale.order_id)}}},[e._v("查看订单")])]}}])})],1)],1)]),r("footer",{staticClass:"col-top"},[e.orderData.after_sale.express_name?r("div",{staticClass:"ls-card m-t-24",staticStyle:{height:"auto"}},[r("div",{staticStyle:{width:"100%"}},[r("div",{staticClass:"nr weight-500 m-b-20 title"},[e._v("退货信息")]),r("el-form",{ref:"form",attrs:{model:e.orderData,"label-width":"120px",size:"small"}},[r("el-form-item",{attrs:{label:"快递公司"}},[e._v(" "+e._s(e.orderData.after_sale.express_name)+" ")]),r("el-form-item",{attrs:{label:"快递单号"}},[e._v(" "+e._s(e.orderData.after_sale.invoice_no)+" ")]),r("el-form-item",{attrs:{label:"退货时间"}},[e._v(" "+e._s(e.orderData.after_sale.express_time)+" ")])],1)],1)]):e._e(),r("div",{staticClass:"ls-card m-t-24"},[r("div",{staticClass:"nr weight-500 m-b-20 title"},[e._v("售后日志")]),r("el-table",{ref:"paneTable",staticStyle:{width:"100%"},attrs:{data:e.orderData.after_sale_log,size:"mini"}},[r("el-table-column",{attrs:{label:"操作人",prop:"operator_name",width:"155"}}),r("el-table-column",{attrs:{prop:"content",label:"操作事件","min-width":"220"}}),r("el-table-column",{attrs:{prop:"create_time",label:"操作时间","min-width":"180"}})],1)],1)])])}),[],!1,null,"69dd1d56",null);t.default=u.exports},5016:function(e,t,r){"use strict";r("078f")},"5cf7":function(e,t,r){"use strict";var a=r("9ab4"),s=r("0463"),i=r("1b40");let o=class extends i.e{constructor(){super(...arguments),this.options=s.a}get areaValue(){return[this.province,this.city,this.district]}set areaValue(e){this.$emit("update:province",e[0]),this.$emit("update:city",e[1]),this.$emit("update:district",e[2])}};Object(a.a)([Object(i.c)()],o.prototype,"province",void 0),Object(a.a)([Object(i.c)()],o.prototype,"city",void 0),Object(a.a)([Object(i.c)()],o.prototype,"district",void 0),Object(a.a)([Object(i.c)({default:"380px"})],o.prototype,"width",void 0),o=Object(a.a)([i.a],o);var l=o,n=r("2877"),d=Object(n.a)(l,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"area-select"},[r("el-cascader",{style:{width:e.width},attrs:{options:e.options},model:{value:e.areaValue,callback:function(t){e.areaValue=t},expression:"areaValue"}})],1)}),[],!1,null,null,null);t.a=d.exports},a573:function(e,t,r){"use strict";r("ab43")},ab43:function(e,t,r){"use strict";var a=r("23e7"),s=r("d024");a({target:"Iterator",proto:!0,real:!0,forced:r("c430")},{map:s})},d024:function(e,t,r){"use strict";var a=r("c65b"),s=r("59ed"),i=r("825a"),o=r("46c4"),l=r("c5cc"),n=r("9bdd"),d=l((function(){var e=this.iterator,t=i(a(this.next,e));if(!(this.done=!!t.done))return n(e,this.mapper,[t.value,this.counter++],!0)}));e.exports=function(e){return i(this),s(e),new d(o(this),{mapper:e})}},ffae:function(e,t,r){"use strict";r("14d9"),r("0643"),r("2382"),r("fffc"),r("9a9a");var a=r("9ab4"),s=r("1b40"),i=r("192a");let o=class extends s.e{constructor(){super(...arguments),this.visible=!1,this.fullscreenLoading=!1,this.orderData={traces:{}},this.form={send_type:1,express_id:"",invoice_no:"",remark:"",delivery_content:"",delivery_content_type:"0",delivery_content1:[],pay_way:""}}getOrderDeliveryInfo(){Object(i.u)({id:this.id}).then(e=>{this.orderData=e,this.form.delivery_content=e.delivery_content,this.fullscreenLoading=!1})}getOrderLogistics(){Object(i.y)({id:this.id}).then(e=>{this.orderData=e,this.fullscreenLoading=!1})}handleAdd(){this.form.delivery_content1.push({name:"",content:""})}handleDel(e){this.form.delivery_content1=this.form.delivery_content1.filter((t,r)=>r!=e)}orderDelivery(){4==this.orderData.order_type&&(this.form={delivery_content_type:this.form.delivery_content_type,delivery_content:this.form.delivery_content,delivery_content1:this.form.delivery_content1}),Object(i.t)({id:this.id,...this.form}).then(e=>{this.$emit("update","")})}handleEvent(e){if("cancel"===e&&this.close(),"confirm"===e){if(this.hasInAfterSalesGoods())return;if(this.flag)if(4==this.orderData.order_type){const e=this.form.delivery_content1.some(e=>""==e.name||""==e.content);if(""==this.form.delivery_content.trim()&&e)return this.$message.error("请输入发货内容")}else if(1==this.form.send_type){if(""==this.form.express_id)return this.$message.error("请选择快递公司");if(""==this.form.invoice_no)return this.$message.error("请填写快递单号")}if(2==this.orderData.pay_way&&1==this.form.send_type&&4!=this.orderData.order_type&&this.checkExpress())return;this.orderDelivery(),this.close()}}async handlesendChange(){try{if(1==this.form.send_type){if(""==this.form.express_id)return this.$message.error("请选择快递公司");if(""==this.form.invoice_no)return this.$message.error("请填写快递单号");const e=this.orderData.express.find(e=>e.id==this.form.express_id);await this.$confirm("仅允许修改一次发货信息,请确认快递信息:"+e.name+"-"+this.form.invoice_no),await Object(i.o)({id:this.id,...this.form})}else 2==this.form.send_type&&(await this.$confirm("仅允许修改一次发货信息,是否修改为无需快递"),this.form={express_id:"",invoice_no:"",delivery_content:this.form.delivery_content},await Object(i.o)({id:this.id,...this.form}))}catch(e){}this.close(),this.$emit("update","")}onTrigger(){this.fullscreenLoading=!0,1==this.flag?this.getOrderDeliveryInfo():this.getOrderLogistics(),this.visible=!0}close(){this.visible=!1}handleChange(e){this.form.delivery_content=e.trim()}checkExpress(){let e=this.orderData.express.find(e=>e.id==this.form.express_id);return""==e.code&&(this.$alert('<div>所选的物流公司未填写:<span style="color: red">快递编码</span>,将会影响同步微信小程序发货信息的录入,是否继续发货?</div>',"温馨提示",{dangerouslyUseHTMLString:!0,distinguishCancelAndClose:!1,showCancelButton:!0,cancelButtonText:"继续发货",confirmButtonText:"前往设置",showClose:!1}).then(()=>{this.toexpress(e.id)}).catch(()=>{this.orderDelivery(),this.close()}),!0)}hasInAfterSalesGoods(){let e=this.orderData.order_goods.filter(e=>1===e.after_sale_status);return!!e.length&&(this.$alert(`<div>商品:<span style="color: red">${e[0].goods_name} </span>当前处于售后中,请前往处理</div>`,"温馨提示",{dangerouslyUseHTMLString:!0,distinguishCancelAndClose:!0,showCancelButton:!0,confirmButtonText:"前往处理"}).then(()=>{this.toAfterSalesDetail(e[0].after_sale_id)}).catch(()=>{}),!0)}toAfterSalesDetail(e){this.close(),this.$router.push({path:"/order/after_sales_detail",query:{id:e}})}toexpress(e){this.close(),this.$router.push({path:"/setting/delivery/express_edit",query:{id:e}})}};Object(a.a)([Object(s.c)({default:"5vh"})],o.prototype,"top",void 0),Object(a.a)([Object(s.c)({default:"0"})],o.prototype,"id",void 0),Object(a.a)([Object(s.c)({default:!0})],o.prototype,"flag",void 0),Object(a.a)([Object(s.c)({default:""})],o.prototype,"isShow",void 0),Object(a.a)([Object(s.c)()],o.prototype,"orderType",void 0),Object(a.a)([Object(s.c)({default:0})],o.prototype,"express_again",void 0),o=Object(a.a)([s.a],o);var l=o,n=(r("5016"),r("2877")),d=Object(n.a)(l,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("div",{staticClass:"ls-dialog__trigger",on:{click:e.onTrigger}},[e._t("trigger")],2),r("el-dialog",{attrs:{"coustom-class":"ls-dialog__content",title:1==e.flag?"发货":"物流查询",visible:e.visible,width:"60vw",top:e.top,"append-to-body":!0,center:"","before-close":e.close,"close-on-click-modal":!1}},[r("div",{directives:[{name:"loading",rawName:"v-loading",value:0==e.orderData.length,expression:"orderData.length == 0"}],staticStyle:{height:"70vh","overflow-x":"hidden"}},[r("div",[r("div",{staticClass:"nr weight-500 m-b-20"},[e._v("商品信息")]),r("el-table",{ref:"paneTable1",attrs:{data:e.orderData.order_goods,size:"mini"}},[r("el-table-column",{attrs:{label:"商品信息","min-width":"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",{staticClass:"flex m-t-10"},[r("el-image",{staticClass:"flex-none",staticStyle:{width:"58px",height:"58px"},attrs:{src:t.row.goods_image}}),r("div",{staticClass:"m-l-8 flex-1"},[r("div",{staticClass:"line-2"},[e._v(e._s(t.row.goods_name))])])],1)]}}])}),r("el-table-column",{attrs:{prop:"spec_value_str",label:"商品规格","min-width":"150"}}),r("el-table-column",{attrs:{prop:"goods_num",label:"购买数量","min-width":"120"}}),r("el-table-column",{attrs:{prop:"after_sale_status_desc",label:"售后状态","min-width":"120"}})],1)],1),1==e.flag?r("div",{staticClass:"m-t-30"},[r("div",{staticClass:"nr weight-500 m-b-20"},[e._v("收货信息")]),r("div",{staticClass:"flex"},[r("div",{staticClass:"m-r-24"},[e._v("收货人: "+e._s(e.orderData.contact))]),r("div",{staticClass:"m-r-24"},[e._v("收货人手机号码: "+e._s(e.orderData.mobile))]),r("div",{staticClass:"m-r-24"},[e._v("收货人地址: "+e._s(e.orderData.delivery_address))])])]):e._e(),1==e.flag?r("div",{staticClass:"m-t-30"},[4==e.orderType?[r("div",{staticClass:"nr weight-500 m-b-20"},[e._v("商品发货")]),r("el-form",{ref:"form",attrs:{model:e.form,size:"small","label-width":"80px"}},[r("el-form-item",{attrs:{label:"发货类型"}},[r("el-radio-group",{model:{value:e.form.delivery_content_type,callback:function(t){e.$set(e.form,"delivery_content_type",t)},expression:"form.delivery_content_type"}},[r("el-radio",{attrs:{label:"0"}},[e._v("固定内容")]),r("el-radio",{attrs:{label:"1"}},[e._v("自定义内容")])],1)],1),r("el-form-item",{attrs:{label:"发货内容"}},[0==e.form.delivery_content_type?r("el-input",{staticClass:"m-t-10",staticStyle:{"max-width":"520px",width:"100%"},attrs:{type:"textarea",rows:7,placeholder:"请输入内容"},on:{change:e.handleChange},model:{value:e.form.delivery_content,callback:function(t){e.$set(e.form,"delivery_content",t)},expression:"form.delivery_content"}}):r("div",[r("el-table",{ref:"table",attrs:{size:"mini",data:e.form.delivery_content1}},[r("el-table-column",{attrs:{label:"名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-input",{attrs:{placeholder:"请输入"},model:{value:t.row.name,callback:function(r){e.$set(t.row,"name",r)},expression:"scope.row.name"}})]}}],null,!1,3954185638)}),r("el-table-column",{attrs:{label:"内容"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-input",{attrs:{placeholder:"请输入"},model:{value:t.row.content,callback:function(r){e.$set(t.row,"content",r)},expression:"scope.row.content"}})]}}],null,!1,185179560)}),r("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"danger"},on:{click:function(r){return e.handleDel(t.$index)}}},[e._v("删除")])]}}],null,!1,3531492676)})],1),r("el-button",{attrs:{type:"text"},on:{click:e.handleAdd}},[e._v("添加字段")])],1)],1)],1)]:[r("div",{staticClass:"nr weight-500 m-b-20"},[e._v("物流配送")]),r("el-form",{ref:"form",attrs:{model:e.form,"label-width":"80px",size:"small"}},[r("el-form-item",{attrs:{label:"配送方式"}},[r("el-radio",{attrs:{label:1},model:{value:e.form.send_type,callback:function(t){e.$set(e.form,"send_type",t)},expression:"form.send_type"}},[e._v("需要物流")]),r("el-radio",{attrs:{label:2},model:{value:e.form.send_type,callback:function(t){e.$set(e.form,"send_type",t)},expression:"form.send_type"}},[e._v("无需物流")])],1),1==e.form.send_type?r("el-form-item",{attrs:{label:"物流公司"}},[r("el-input",{staticStyle:{"max-width":"520px",width:"100%"},attrs:{placeholder:"请输入快递单号"},model:{value:e.form.invoice_no,callback:function(t){e.$set(e.form,"invoice_no",t)},expression:"form.invoice_no"}},[r("template",{slot:"prepend"},[r("div",[r("el-select",{staticStyle:{width:"120px"},attrs:{placeholder:"请选择"},model:{value:e.form.express_id,callback:function(t){e.$set(e.form,"express_id",t)},expression:"form.express_id"}},e._l(e.orderData.express,(function(e,t){return r("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1)])],2)],1):e._e(),r("el-form-item",{attrs:{label:"发货备注"}},[r("el-input",{staticClass:"m-t-10",staticStyle:{"max-width":"520px",width:"100%"},attrs:{type:"textarea",rows:7,placeholder:"请输入内容"},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1)]],2):e._e(),0==e.flag?r("div",{staticClass:"m-t-30"},[r("div",{staticClass:"nr weight-500 m-b-20"},[e._v("物流信息")]),r("div",{staticClass:"flex"},[r("div",{staticClass:"m-r-24"},[e._v("发货时间: "+e._s(e.orderData.express_time))]),r("div",{staticClass:"m-r-24"},[e._v("物流公司: "+e._s(e.orderData.express_name||"无"))]),r("div",{staticClass:"m-r-24"},[e._v("物流单号 "+e._s(e.orderData.invoice_no||"无"))])])]):e._e(),0==e.flag?r("div",{staticClass:"m-t-30"},[r("div",{staticClass:"nr weight-500 m-b-20"},[e._v("物流轨迹")]),1==e.orderData.send_type?r("div",[r("el-table",{ref:"paneTable",staticStyle:{width:"100%"},attrs:{data:e.orderData.traces,size:"mini"}},[r("el-table-column",{attrs:{label:"日期",prop:"0","min-width":"205"}}),r("el-table-column",{attrs:{label:"轨迹",prop:"1","min-width":"405"}})],1)],1):r("div",{staticClass:"nr weight-500 m-t-60 flex row-center"},[e._v("无需物流")])]):e._e()]),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{size:"small"},on:{click:function(t){return e.handleEvent("cancel")}}},[e._v("取消")]),1==e.flag&&0==e.express_again?r("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.handleEvent("confirm")}}},[e._v("发货")]):e._e(),1==e.flag&&1==e.express_again?r("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.handlesendChange}},[e._v("重新发货")]):e._e(),0==e.flag&&0==e.express_again?r("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.handleEvent("cancel")}}},[e._v("确认")]):e._e()],1)])],1)}),[],!1,null,null,null);t.a=d.exports}}]);
|