import{_ as e}from"./s-goods-item.f5d79fd7.js";import{v as t,o as s,s as a,aj as o,e as l,f as r,w as i,l as m,j as n,k as d,r as u,F as c,p,m as f,i as _,D as x}from"./index-9880b451.js";import{_ as g}from"./uni-rate.ac7990fe.js";import{g as h,a as y,_ as b}from"./s-layout.dfc5b0b5.js";import{_ as j}from"./s-uploader.5e1b0e5f.js";import{_ as V}from"./_plugin-vue_export-helper.1b428a4d.js";import"./useGoods.bdd1c2ea.js";import"./index.df38848e.js";/* empty css                                                                     */const L=V({__name:"add",setup(V){const L=t({orderInfo:{},commentList:[],id:null});async function U(){for(const e of L.commentList)await o.createOrderItemComment(e);a.$router.back()}return s((async e=>{if(!e.id)return void a.$helper.toast("缺少订单信息，请检查");L.id=e.id;const{code:t,data:s}=await o.getOrder(L.id);0===t?(s.items.forEach((e=>{L.commentList.push({anonymous:!1,orderItemId:e.id,descriptionScores:5,benefitScores:5,content:"",picUrls:[]})})),L.orderInfo=s):a.$helper.toast("无待评价订单")})),(t,s)=>{const a=m(f("s-goods-item"),e),o=_,V=m(f("uni-rate"),g),S=m(f("uni-easyinput"),h),v=m(f("s-uploader"),j),w=x,I=m(f("su-fixed"),y),k=m(f("s-layout"),b);return l(),r(k,{title:"评价"},{default:i((()=>[n(o,null,{default:i((()=>[(l(!0),d(c,null,u(L.orderInfo.items,((e,t)=>(l(),r(o,{key:e.id},{default:i((()=>[n(o,null,{default:i((()=>[n(o,{class:"commont-from-wrap"},{default:i((()=>[n(a,{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:i((()=>[n(o,{class:"star-box ss-flex ss-col-center"},{default:i((()=>[n(o,{class:"star-title ss-m-r-40"},{default:i((()=>[p("商品质量")])),_:1}),n(V,{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:i((()=>[n(o,{class:"star-title ss-m-r-40"},{default:i((()=>[p("服务态度")])),_:1}),n(V,{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:i((()=>[n(S,{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:i((()=>[n(v,{url:L.commentList[t].images,"onUpdate:url":e=>L.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:i((()=>[n(o,{class:"foot_box ss-flex ss-row-center ss-col-center"},{default:i((()=>[n(w,{class:"ss-reset-button post-btn ui-BG-Main-Gradient ui-Shadow-Main",onClick:U},{default:i((()=>[p(" 发布 ")])),_:1})])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-4e0768aa"]]);export{L as default};
