import{y as e,o as t,s,ad 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-147ae61b.js";import{_ as g}from"./s-goods-item.a2741948.js";import{_ as y}from"./uni-rate.88c92569.js";import{_ as h}from"./form.c6b6ef18.js";import{_ as b}from"./s-uploader.05aea915.js";import{a as V,_ as j}from"./s-layout.21a11bc7.js";import{_ as L}from"./_plugin-vue_export-helper.1b428a4d.js";import"./useGoods.eea9c479.js";/* empty css                                                                     */const U=L({__name:"add",setup(L){const U=e({orderInfo:{},commentList:[],id:null});async function S(){p({title:"提示",content:"是否评论？",success:async function(e){if(e.confirm){for(const e of U.commentList)await o.createOrderItemComment(e);s.$router.back()}}})}return t((async e=>{if(!e.id)return void s.$helper.toast("缺少订单信息，请检查");U.id=e.id;const{code:t,data:a}=await o.getOrder(U.id);0===t?(a.items.forEach((e=>{U.commentList.push({anonymous:!1,orderItemId:e.id,descriptionScores:5,benefitScores:5,content:"",picUrls:[]})})),U.orderInfo=a):s.$helper.toast("无待评价订单")})),(e,t)=>{const s=i(f("s-goods-item"),g),o=_,p=i(f("uni-rate"),y),L=i(f("uni-easyinput"),h),v=i(f("s-uploader"),b),w=x,I=i(f("su-fixed"),V),k=i(f("s-layout"),j);return a(),l(k,{title:"评价"},{default:r((()=>[n(o,null,{default:r((()=>[(a(!0),m(u,null,d(U.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:U.commentList[t].descriptionScores,"onUpdate:modelValue":e=>U.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:U.commentList[t].benefitScores,"onUpdate:modelValue":e=>U.commentList[t].benefitScores=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),n(o,{class:"area-box"},{default:r((()=>[n(L,{inputBorder:!1,type:"textarea",maxlength:"120",autoHeight:"",modelValue:U.commentList[t].content,"onUpdate:modelValue":e=>U.commentList[t].content=e,placeholder:"宝贝满足你的期待吗？说说你的使用心得，分享给想买的他们吧~"},null,8,["modelValue","onUpdate:modelValue"]),n(o,{class:"img-box"},{default:r((()=>[n(v,{url:U.commentList[t].images,"onUpdate:url":e=>U.commentList[t].images=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-330c19e1"]]);export{U as default};
