1 |
- import{_ as b}from"./index.vue_vue_type_script_setup_true_lang-bec51e2c.js";import{b as I,D as _}from"./dict-a9a468ec.js";import{b as N}from"./index-48aa43a3.js";import{g as h,a as x}from"./index-904c3b07.js";import{d as T,r as d,x as U,o as i,c,a as e,F as y,A as k,k as r,t as n,aY as z,i as D}from"./index-abad4030.js";import{_ as w}from"./_plugin-vue_export-helper-1b428a4d.js";const E={key:0,style:{"text-align":"center","margin-top":"50px","font-size":"14px"}},M={class:"rating-title"},R={class:"content"},j={class:"content-image"},F={class:"image"},O=["src"],P={class:"details"},L={class:"product-model"},Y={class:"first-aftersale"},q={class:"first-aftersale"},B=["title"],C={style:{clear:"both","margin-right":"20px"}},G=w(T({__name:"AfterSale",props:{obj:{type:Object,default:()=>{}},openSource:{type:String,default:""},merId:{type:Number,default:void 0},productId:{type:Number,default:void 0},orderId:{type:Number,default:0}},setup(f){const o=f,l=d({pageNo:1,pageSize:10,merchantId:o.merId,spuId:o.productId}),m=d(0),u=async()=>{o.openSource=="Merchant"?S(l.value):o.openSource=="Spu"&&v(l.value)},p=d({}),S=async s=>{let t=await h(s);Array.isArray(t)||t==null||(t=[t]),p.value=t,m.value=t.total},v=async s=>{let t=await x(s);Array.isArray(t)||t==null||(t=[t]),p.value=t};return U(async()=>{console.log("\u516C\u5171\u552E\u540E\u9875\u9762\uFF0C\u8FDB\u6765\u7684\u7C7B\u578B\u662F:",o.openSource),o.openSource=="MemberUser"?console.log("\u505A\u76F8\u5E94\u7684\u5904\u7406"):o.openSource=="Merchant"?(u(),console.log("\u5546\u6237")):o.openSource=="Spu"?(u(),console.log("\u5546\u54C1")):o.openSource=="Order"&&(console.log(o.orderId),(async()=>{let s=await N(o.orderId);Array.isArray(s)||s==null||(s=[s]),p.value=s})())}),(s,t)=>{const A=b;return i(),c(y,null,[e(p)==null||e(p)==""?(i(),c("div",E," \u6682\u65E0\u552E\u540E\u8BB0\u5F55 ")):(i(!0),c(y,{key:1},k(e(p),a=>{var g;return i(),c("div",{class:"aftersale-container",key:a},[r("h3",M,n(a==null?void 0:a.spuName),1),r("div",R,[r("div",j,[r("div",F,[r("img",{src:a==null?void 0:a.picUrl},null,8,O)])]),r("div",P,[r("p",L,n((g=e(I)(e(_).TRADE_AFTER_SALE_STATUS,a==null?void 0:a.status))==null?void 0:g.label),1),r("p",Y,"\u9000\u6B3E\uFF1A"+n(e(z)(a==null?void 0:a.refundPrice))+"\u5143",1),r("p",q,"\u539F\u7531\uFF1A"+n((a==null?void 0:a.applyReason)||"\u65E0"),1),r("p",{class:"aftersale-comment",title:a==null?void 0:a.applyDescription},"\u63CF\u8FF0\uFF1A"+n((a==null?void 0:a.applyDescription)||"\u65E0"),9,B)])])])}),128)),r("div",C,[D(A,{limit:e(l).pageSize,"onUpdate:limit":t[0]||(t[0]=a=>e(l).pageSize=a),page:e(l).pageNo,"onUpdate:page":t[1]||(t[1]=a=>e(l).pageNo=a),total:e(m),onPagination:u},null,8,["limit","page","total"])])],64)}}}),[["__scopeId","data-v-133f22c3"]]);export{G as A};
|