import{_ as e}from"./s-goods-item.9b7f200a.js";import{v as t,o as s,s as o,ab as a,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-219abc09.js";import{_ as g}from"./uni-rate.59c525b8.js";import{_ as b}from"./form.480ce5b4.js";import{_ as h}from"./s-uploader.85ad6ad0.js";import{a as y,_ as V}from"./s-layout.e3f07a22.js";import{_ as j}from"./_plugin-vue_export-helper.1b428a4d.js";import"./useGoods.f5223d84.js";/* empty css                                                                     */const L=j({__name:"add",setup(j){const L=t({orderInfo:{},commentList:[],id:null});async function U(){for(const e of L.commentList)await a.createOrderItemComment(e);o.$router.back()}return s((async e=>{if(!e.id)return void o.$helper.toast("缺少订单信息，请检查");L.id=e.id;const{code:t,data:s}=await a.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):o.$helper.toast("无待评价订单")})),(t,s)=>{const o=m(f("s-goods-item"),e),a=_,j=m(f("uni-rate"),g),w=m(f("uni-easyinput"),b),S=m(f("s-uploader"),h),v=x,I=m(f("su-fixed"),y),k=m(f("s-layout"),V);return l(),r(k,{title:"评价"},{default:i((()=>[n(a,null,{default:i((()=>[(l(!0),d(c,null,u(L.orderInfo.items,((e,t)=>(l(),r(a,{key:e.id},{default:i((()=>[n(a,null,{default:i((()=>[n(a,{class:"commont-from-wrap"},{default:i((()=>[n(o,{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(a,{class:"form-item"},{default:i((()=>[n(a,{class:"star-box ss-flex ss-col-center"},{default:i((()=>[n(a,{class:"star-title ss-m-r-40"},{default:i((()=>[p("商品质量")])),_:1}),n(j,{modelValue:L.commentList[t].descriptionScores,"onUpdate:modelValue":e=>L.commentList[t].descriptionScores=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),n(a,{class:"star-box ss-flex ss-col-center"},{default:i((()=>[n(a,{class:"star-title ss-m-r-40"},{default:i((()=>[p("服务态度")])),_:1}),n(j,{modelValue:L.commentList[t].benefitScores,"onUpdate:modelValue":e=>L.commentList[t].benefitScores=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),n(a,{class:"area-box"},{default:i((()=>[n(w,{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(a,{class:"img-box"},{default:i((()=>[n(S,{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(a,{class:"foot_box ss-flex ss-row-center ss-col-center"},{default:i((()=>[n(v,{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-31930964"]]);export{L as default};
