import{y as e,o as t,s,ac as o,e as a,f as l,w as r,l as i,j as n,k as m,r as d,F as u,t as c,U as p,m as f,i as _,G as x}from"./index-9aa72eed.js";import{_ as b}from"./s-goods-item.61fdff9d.js";import{_ as g}from"./uni-rate.2f50b1a4.js";import{_ as y}from"./form.c66b5271.js";import{_ as h}from"./s-uploader.b509c885.js";import{a as U,_ as V}from"./s-layout.bffb18b8.js";import{_ as j}from"./_plugin-vue_export-helper.1b428a4d.js";import"./useGoods.ce02ada2.js";/* empty css                                                                     */const L=j({__name:"add",setup(j){const L=e({orderInfo:{},commentList:[],id:null});async function S(){p({title:"提示",content:"是否评论？",success:async function(e){if(e.confirm){for(const e of L.commentList)await o.createOrderItemComment(e);s.$router.back()}}})}return t((async e=>{if(!e.id)return void s.$helper.toast("缺少订单信息，请检查");L.id=e.id;const{code:t,data:a}=await o.getOrder(L.id);0===t?(a.items.forEach((e=>{L.commentList.push({anonymous:!1,orderItemId:e.id,descriptionScores:5,benefitScores:5,content:"",picUrls:[]})})),L.orderInfo=a):s.$helper.toast("无待评价订单")})),(e,t)=>{const s=i(f("s-goods-item"),b),o=_,p=i(f("uni-rate"),g),j=i(f("uni-easyinput"),y),v=i(f("s-uploader"),h),w=x,I=i(f("su-fixed"),U),k=i(f("s-layout"),V);return a(),l(k,{title:"评价"},{default:r((()=>[n(o,null,{default:r((()=>[(a(!0),m(u,null,d(L.orderInfo.items,((e,t)=>(a(),l(o,{key:e.id},{default:r((()=>[n(o,null,{default:r((()=>[n(o,{class:"commont-from-wrap"},{default:r((()=>[n(s,{img:e.picUrl,title:e.spuName,skuText:e.properties.map((e=>e.valueName)).join(" "),price:e.payPrice,num:e.count},null,8,["img","title","skuText","price","num"])])),_:2},1024),n(o,{class:"form-item"},{default:r((()=>[n(o,{class:"star-box ss-flex ss-col-center"},{default:r((()=>[n(o,{class:"star-title ss-m-r-40"},{default:r((()=>[c("商品质量")])),_:1}),n(p,{modelValue:L.commentList[t].descriptionScores,"onUpdate:modelValue":e=>L.commentList[t].descriptionScores=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),n(o,{class:"star-box ss-flex ss-col-center"},{default:r((()=>[n(o,{class:"star-title ss-m-r-40"},{default:r((()=>[c("服务态度")])),_:1}),n(p,{modelValue:L.commentList[t].benefitScores,"onUpdate:modelValue":e=>L.commentList[t].benefitScores=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),n(o,{class:"area-box"},{default:r((()=>[n(j,{inputBorder:!1,type:"textarea",maxlength:"120",autoHeight:"",modelValue:L.commentList[t].content,"onUpdate:modelValue":e=>L.commentList[t].content=e,placeholder:"宝贝满足你的期待吗？说说你的使用心得，分享给想买的他们吧~"},null,8,["modelValue","onUpdate:modelValue"]),n(o,{class:"img-box"},{default:r((()=>[n(v,{url:L.commentList[t].picUrls,"onUpdate:url":e=>L.commentList[t].picUrls=e,fileMediatype:"image",limit:"9",mode:"grid",imageStyles:{width:"168rpx",height:"168rpx"}},null,8,["url","onUpdate:url"])])),_:2},1024)])),_:2},1024)])),_:2},1024)])),_:2},1024)])),_:2},1024)))),128))])),_:1}),n(I,{bottom:"",placeholder:""},{default:r((()=>[n(o,{class:"foot_box ss-flex ss-row-center ss-col-center"},{default:r((()=>[n(w,{class:"ss-reset-button post-btn ui-BG-Main-Gradient ui-Shadow-Main",onClick:S},{default:r((()=>[c(" 发布 ")])),_:1})])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-b2bb001b"]]);export{L as default};
