1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-5f79be21"],{1426:function(t,e,a){"use strict";a.r(e);var i=a("2909"),o=a("c7eb"),r=a("1da1"),s=(a("a434"),a("a15b"),a("99af"),a("4e82"),a("14d9"),a("c740"),a("c4c8")),l=(a("d81d"),{props:{visible:{type:Boolean,default:!1},goods:{type:Object,default:function(){return{}}},attr:{type:Object,default:function(){return{}}},avatar:{type:Object,default:function(){return{}}},picture:{type:Array,default:function(){return[]}}},data:function(){return{formData:{avatar:"",nickname:"",comment:""},product_score:5,service_score:5,pics:[],add_time:"",visibleModal:!1}},watch:{picture:function(t){this.pics=t.map((function(t){return t.att_dir}))},visible:function(t){(this.visibleModal=t)||(this.formData.nickname="",this.formData.comment="",this.product_score=5,this.service_score=5,this.add_time="")}},methods:{removeUser:function(){this.avatar.att_dir=""},removePicture:function(t){this.$emit("removePicture",t)},onChange:function(t){this.add_time=t},callGoods:function(){this.$emit("callGoods")},callAttr:function(){this.$emit("callAttr")},callPicture:function(t){this.$emit("callPicture",t)},onOk:function(){var t,e=this;return this.goods.id?this.attr.image?this.avatar.att_dir?this.formData.nickname?this.formData.comment?this.product_score?this.service_score?(t={image:{image:this.goods.image,product_id:this.goods.id},suk:this.attr.suk,avatar:this.avatar.att_dir,nickname:this.formData.nickname,comment:this.formData.comment,product_score:this.product_score,service_score:this.service_score,pics:this.pics,add_time:this.add_time},void Object(s.E)(t).then((function(t){e.$message.success(t.msg),e.$emit("close",!1)})).catch((function(t){e.$message.error(t.msg)}))):this.$message.error("服务分数必须是1-5之间的整数"):this.$message.error("商品分数必须是1-5之间的整数"):this.$message.error("请填写评论内容"):this.$message.error("请填写用户昵称"):this.$message.error("请选择用户头像"):this.$message.error("请选择商品规格"):this.$message.error("请选择商品")},onCancel:function(){this.$emit("close",!1)}}}),n=(a("199b"),a("2877")),c=(l=Object(n.a)(l,(function(){var t=this,e=t._self._c;return e("el-dialog",{attrs:{visible:t.visibleModal,title:"添加自评",width:"720px","close-on-click-modal":!1},on:{"update:visible":function(e){t.visibleModal=e},close:t.onCancel}},[e("el-form",{attrs:{model:t.formData,"label-width":"100px","label-position":"right"}},[e("el-form-item",{attrs:{label:"商品:"}},[e("div",{staticClass:"upload-box",on:{click:t.callGoods}},[t.goods.id?e("img",{staticClass:"image",attrs:{src:t.goods.image}}):e("i",{staticClass:"el-icon-goods"})])]),t.goods.id?e("el-form-item",{attrs:{label:"商品规格:"}},[e("div",{staticClass:"upload-box",on:{click:t.callAttr}},[t.attr.image?e("img",{staticClass:"image",attrs:{src:t.attr.image}}):e("i",{staticClass:"el-icon-plus"})]),e("div",[t._v(t._s(t.attr.suk))])]):t._e(),e("el-form-item",{attrs:{label:"用户头像:"}},[e("div",{staticClass:"upload-box",on:{click:function(e){return t.callPicture("单选")}}},[t.avatar.att_dir?e("img",{staticClass:"image",attrs:{src:t.avatar.att_dir}}):t._e(),t.avatar.att_dir?e("i",{staticClass:"el-icon-error btn",on:{click:function(e){return e.stopPropagation(),t.removeUser.apply(null,arguments)}}}):e("i",{staticClass:"el-icon-user"})])]),e("el-form-item",{attrs:{label:"用户名称:"}},[e("el-input",{staticClass:"w100",attrs:{placeholder:"请输入用户名称"},model:{value:t.formData.nickname,callback:function(e){t.$set(t.formData,"nickname",e)},expression:"formData.nickname"}})],1),e("el-form-item",{attrs:{label:"评价文字:"}},[e("el-input",{staticClass:"w100",attrs:{type:"textarea",placeholder:"请输入评价文字"},model:{value:t.formData.comment,callback:function(e){t.$set(t.formData,"comment",e)},expression:"formData.comment"}})],1),e("el-form-item",{attrs:{label:"商品分数:"}},[e("el-rate",{model:{value:t.product_score,callback:function(e){t.product_score=e},expression:"product_score"}})],1),e("el-form-item",{attrs:{label:"服务分数:"}},[e("el-rate",{model:{value:t.service_score,callback:function(e){t.service_score=e},expression:"service_score"}})],1),e("el-form-item",{attrs:{label:"评价图片:"}},[e("div",{staticClass:"df-aic"},[t._l(t.picture,(function(a){return e("div",{key:a.att_id,staticClass:"upload-box"},[e("img",{staticClass:"image",attrs:{src:a.att_dir}}),e("i",{staticClass:"el-icon-error btn",on:{click:function(e){return e.stopPropagation(),t.removePicture(a.att_id)}}})])})),t.picture.length<8?e("div",{staticClass:"upload-box",on:{click:function(e){return t.callPicture("多选")}}},[e("i",{staticClass:"el-icon-picture-outline"})]):t._e()],2)]),e("el-form-item",{attrs:{label:"评价时间:"}},[e("el-date-picker",{staticStyle:{width:"414px"},attrs:{clearable:"",type:"datetime","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期"},on:{change:t.onChange},model:{value:t.add_time,callback:function(e){t.add_time=e},expression:"add_time"}})],1)],1),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:t.onCancel}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary"},on:{click:t.onOk}},[t._v("确 定")])],1)],1)}),[],!1,null,"2be3575b",null).exports,a("c4ad")),d=a("b0e7");l={name:"product_productEvaluate",components:{addReply:l,goodsList:c.default,uploadPictures:d.a},data:function(){return{templateRadio:0,modals:!1,replyModal:!1,pictureModal:!1,goodsModal:!1,attrModal:!1,grid:{xl:7,lg:10,md:12,sm:12,xs:24},gridPic:{xl:6,lg:8,md:12,sm:12,xs:12},gridBtn:{xl:4,lg:8,md:8,sm:8,xs:8},formValidate:{is_reply:"",data:"",store_name:"",key:"",order:"",account:"",product_id:void 0===this.$route.params.id?0:this.$route.params.id,page:1,limit:15},pickerOptions:this.$timeOptions,value:"45",tableList:[],goodsAddType:"",goodsData:{},attrData:{},avatarData:{},pictureData:[],selectProductAttrList:[],isChoice:"",picTit:"",tableIndex:0,total:0,loading:!1,timeVal:[],contents:{content:""},ruleInline:{content:[{required:!0,message:"请输入回复内容",trigger:"blur"}]},rows:{}}},computed:{},created:function(){0==this.$route.query.is_reply&&(this.formValidate.is_reply=this.$route.query.is_reply),this.getList()},watch:{"$route.params.id":function(t,e){this.formValidate.product_id=0,this.getList()},replyModal:function(t){t||(this.goodsData={},this.attrData={},this.avatarData={},this.pictureData=[],this.getList())}},methods:{addRep:function(){this.replyModal=!0},getRowKey:function(t){return t.unique},getTemplateRow:function(t){this.attrData=t,this.attrModal=!1},oks:function(){var t=this;this.modals=!0,this.$refs.contents.validate((function(e){if(!e)return!1;Object(s.F)(t.contents,t.rows.id).then(function(){var e=Object(r.a)(Object(o.a)().mark((function e(a){return Object(o.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.$message.success(a.msg),t.modals=!1,t.$refs.contents.resetFields(),t.getList();case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$message.error(e.msg)}))}))},cancels:function(){this.modals=!1,this.$refs.contents.resetFields()},del:function(t,e,a){var i=this;e={title:e,num:a,url:"product/reply/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(e).then((function(t){i.$message.success(t.msg),i.tableList.splice(a,1),i.total=i.total-1})).catch((function(t){i.$message.error(t.msg)}))},reply:function(t){this.modals=!0,this.rows=t},onchangeTime:function(t){this.timeVal=t||[],this.formValidate.data=this.timeVal[0]&&this.timeVal?this.timeVal.join("-"):"",this.formValidate.page=1,this.getList()},sortMethod:function(t){"normal"===t.order?(this.formValidate.key="",this.formValidate.order=""):(this.formValidate.key=t.key,this.formValidate.order=t.order),this.getList()},close:function(t){this.replyModal=t,this.attrData={},this.templateRadio=""},selectChange:function(t){this.formValidate.data=t,this.timeVal=[],this.formValidate.page=1,this.getList()},getList:function(){var t=this;this.loading=!0,this.formValidate.is_reply=this.formValidate.is_reply||"",this.formValidate.store_name=this.formValidate.store_name||"",Object(s.A)(this.formValidate).then(function(){var e=Object(r.a)(Object(o.a)().mark((function e(a){var i;return Object(o.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=a.data,t.tableList=i.list,t.total=a.data.count,t.loading=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$message.error(e.msg)}))},userSearchs:function(){this.formValidate.page=1,this.getList()},search:function(){},callGoods:function(){this.goodsModal=!0},callAttr:function(){this.attrModal=!0},getProductId:function(t){this.goodsData=t,this.goodsModal=!1,this.attrData.unique="",this.templateRadio="",this.attrData={}},getPic:function(t){this.avatarData=t,this.pictureModal=!1},getPicD:function(t){var e=Object(i.a)(this.pictureData);(e=e.concat(t)).sort((function(t,e){return t.att_id-e.att_id}));for(var a=[],o=0;o<e.length;o++)e[o+1]&&e[o].att_id!=e[o+1].att_id&&a.push(e[o]),e[o+1]||a.push(e[o]);this.pictureData=a,this.pictureModal=!1},callPicture:function(t){this.isChoice=t,this.pictureModal=!0},removePicture:function(t){var e=this.pictureData.findIndex((function(e){return e.att_id===t}));this.pictureData.splice(e,1)}}},a("c947"),c=Object(n.a)(l,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"article-manager"},[e("el-card",{staticClass:"ivu-mt",attrs:{bordered:!1,shadow:"never","body-style":{padding:0}}},[e("div",{staticClass:"padding-add"},[e("el-form",{ref:"formValidate",attrs:{model:t.formValidate,inline:"","label-width":"80px","label-position":"left"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("el-form-item",{attrs:{label:"评论时间:"}},[e("el-date-picker",{staticClass:"mr20",staticStyle:{width:"250px"},attrs:{clearable:"",type:"daterange",format:"yyyy/MM/dd","value-format":"yyyy/MM/dd","start-placeholder":"开始日期","end-placeholder":"结束日期","picker-options":t.pickerOptions},on:{change:t.onchangeTime},model:{value:t.timeVal,callback:function(e){t.timeVal=e},expression:"timeVal"}})],1),e("el-form-item",{attrs:{label:"评价状态:"}},[e("el-select",{staticClass:"form_content_width",attrs:{placeholder:"请选择",clearable:""},on:{change:t.userSearchs},model:{value:t.formValidate.is_reply,callback:function(e){t.$set(t.formValidate,"is_reply",e)},expression:"formValidate.is_reply"}},[e("el-option",{attrs:{value:"1",label:"已回复"}}),e("el-option",{attrs:{value:"0",label:"未回复"}})],1)],1),e("el-form-item",{attrs:{label:"商品信息:","label-for":"store_name"}},[e("el-input",{staticClass:"form_content_width",attrs:{placeholder:"请输入商品ID或者商品信息",clearable:""},model:{value:t.formValidate.store_name,callback:function(e){t.$set(t.formValidate,"store_name",e)},expression:"formValidate.store_name"}})],1),e("el-form-item",{attrs:{label:"用户名称:","label-for":"account"}},[e("el-input",{staticClass:"form_content_width",attrs:{"enter-button":"",placeholder:"请输入",clearable:""},model:{value:t.formValidate.account,callback:function(e){t.$set(t.formValidate,"account",e)},expression:"formValidate.account"}})],1),e("el-form-item",[e("el-button",{attrs:{type:"primary"},on:{click:t.userSearchs}},[t._v("搜索")])],1)],1)],1)]),e("el-card",{staticClass:"ivu-mt mt16",attrs:{bordered:!1,shadow:"never"}},[e("el-row",[e("el-col",t._b({},"el-col",t.grid,!1),[e("el-button",{directives:[{name:"auth",rawName:"v-auth",value:["product-reply-save_fictitious_reply"],expression:"['product-reply-save_fictitious_reply']"}],attrs:{type:"primary"},on:{click:t.addRep}},[t._v("添加自评")])],1)],1),e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"table",staticClass:"ivu-mt mt14",attrs:{data:t.tableList,"empty-text":"暂无数据"},on:{"on-sort-change":t.sortMethod}},[e("el-table-column",{attrs:{label:"评论ID",width:"80"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.id))])]}}])}),e("el-table-column",{attrs:{label:"商品信息","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("div",{staticClass:"imgPic acea-row row-middle"},[e("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"pictrue"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:a.row.image,expression:"scope.row.image"}]})]),e("div",{staticClass:"info line2"},[t._v(t._s(a.row.store_name))])])]}}])}),e("el-table-column",{attrs:{label:"规格","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.suk))])]}}])}),e("el-table-column",{attrs:{label:"用户名称","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.nickname))])]}}])}),e("el-table-column",{attrs:{label:"评分","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.score))])]}}])}),e("el-table-column",{attrs:{label:"评价内容","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("div",{staticClass:"mb5 content_font"},[t._v(t._s(a.row.comment))]),t._l(a.row.pics||[],(function(t,a){return e("div",{directives:[{name:"viewer",rawName:"v-viewer"}],key:a,staticClass:"pictrue mr10"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t,expression:"item"}],attrs:{src:t}})])}))]}}])}),e("el-table-column",{attrs:{label:"回复内容","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.merchant_reply_content))])]}}])}),e("el-table-column",{attrs:{label:"评价时间","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.add_time))])]}}])}),e("el-table-column",{attrs:{label:"操作",fixed:"right",width:"120"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("a",{on:{click:function(e){return t.reply(a.row)}}},[t._v("回复")]),e("el-divider",{attrs:{direction:"vertical"}}),e("a",{on:{click:function(e){return t.del(a.row,"删除评论",a.$index)}}},[t._v("删除")])]}}])})],1),e("div",{staticClass:"acea-row row-right page"},[t.total?e("pagination",{attrs:{total:t.total,page:t.formValidate.page,limit:t.formValidate.limit},on:{"update:page":function(e){return t.$set(t.formValidate,"page",e)},"update:limit":function(e){return t.$set(t.formValidate,"limit",e)},pagination:t.getList}}):t._e()],1)],1),e("el-dialog",{attrs:{visible:t.modals,scrollable:"",title:"回复内容",width:"720px"},on:{"update:visible":function(e){t.modals=e}}},[e("el-form",{ref:"contents",attrs:{model:t.contents,rules:t.ruleInline,"label-position":"right"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("el-form-item",{attrs:{prop:"content"}},[e("el-input",{attrs:{type:"textarea",rows:4,placeholder:"请输入回复内容"},model:{value:t.contents.content,callback:function(e){t.$set(t.contents,"content",e)},expression:"contents.content"}})],1)],1),e("div",{attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{type:"primary"},on:{click:t.oks}},[t._v("确定")]),e("el-button",{on:{click:t.cancels}},[t._v("取消")])],1)],1),e("addReply",{attrs:{visible:t.replyModal,goods:t.goodsData,attr:t.attrData,avatar:t.avatarData,picture:t.pictureData},on:{close:t.close,callGoods:t.callGoods,callAttr:t.callAttr,callPicture:t.callPicture,removePicture:t.removePicture}}),e("el-dialog",{attrs:{visible:t.goodsModal,title:"选择商品",width:"1000px"},on:{"update:visible":function(e){t.goodsModal=e}}},[t.replyModal?e("goodsList",{on:{getProductId:t.getProductId}}):t._e()],1),e("el-dialog",{attrs:{visible:t.attrModal,title:"选择商品规格",width:"1000px"},on:{"update:visible":function(e){t.attrModal=e}}},[e("el-table",{ref:"table",attrs:{"row-key":t.getRowKey,data:t.goodsData.attrs,height:"500"}},[e("el-table-column",{attrs:{label:"",width:"60"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-radio",{attrs:{label:a.row.unique},nativeOn:{change:function(e){return t.getTemplateRow(a.row)}},model:{value:t.templateRadio,callback:function(e){t.templateRadio=e},expression:"templateRadio"}},[t._v(" ")])]}}])}),e("el-table-column",{attrs:{label:"图片",width:"120"},scopedSlots:t._u([{key:"default",fn:function(t){return[e("div",{staticClass:"product-data"},[e("img",{staticClass:"image",attrs:{src:t.row.image}})])]}}])}),e("el-table-column",{attrs:{label:"规格","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.suk))])]}}])}),e("el-table-column",{attrs:{label:"售价","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.ot_price))])]}}])}),e("el-table-column",{attrs:{label:"优惠价","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.price))])]}}])})],1)],1),e("el-dialog",{attrs:{visible:t.pictureModal,width:"950px",title:"上传商品图","close-on-click-modal":!1},on:{"update:visible":function(e){t.pictureModal=e}}},[t.pictureModal?e("uploadPictures",{attrs:{isChoice:t.isChoice,gridBtn:t.gridBtn,gridPic:t.gridPic},on:{getPic:t.getPic,getPicD:t.getPicD}}):t._e()],1)],1)}),[],!1,null,"4930a355",null);e.default=c.exports},"199b":function(t,e,a){"use strict";a("b2b6")},"379e":function(t,e,a){},"4e82":function(t,e,a){"use strict";var i=a("23e7"),o=a("e330"),r=a("59ed"),s=a("7b0b"),l=a("07fa"),n=a("083a"),c=a("577e"),d=a("d039"),u=a("addb"),m=a("a640"),f=a("04d1"),p=a("d998"),h=a("2d00"),v=a("512ce"),g=[],b=o(g.sort),_=o(g.push),y=(a=d((function(){g.sort(void 0)})),o=d((function(){g.sort(null)})),m=m("sort"),!d((function(){if(h)return h<70;if(!(f&&3<f)){if(p)return!0;if(v)return v<603;for(var t,e,a,i="",o=65;o<76;o++){switch(t=String.fromCharCode(o),o){case 66:case 69:case 70:case 72:e=3;break;case 68:case 71:e=4;break;default:e=2}for(a=0;a<47;a++)g.push({k:t+a,v:e})}for(g.sort((function(t,e){return e.v-t.v})),a=0;a<g.length;a++)t=g[a].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}})));i({target:"Array",proto:!0,forced:a||!o||!m||!y},{sort:function(t){void 0!==t&&r(t);var e=s(this);if(y)return void 0===t?b(e):b(e,t);for(var a,i,o=[],d=l(e),m=0;m<d;m++)m in e&&_(o,e[m]);for(u(o,(i=t,function(t,e){return void 0===e?-1:void 0===t?1:void 0!==i?+i(t,e)||0:c(t)>c(e)?1:-1})),a=l(o),m=0;m<a;)e[m]=o[m++];for(;m<d;)n(e,m++);return e}})},b2b6:function(t,e,a){},c947:function(t,e,a){"use strict";a("379e")}}]);
|