mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-13 11:52:51 +00:00
1 line
15 KiB
JavaScript
1 line
15 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-93a67276"],{1426:function(t,e,r){"use strict";r.r(e),r("a4d3"),r("e01a"),r("d3b7"),r("d28b"),r("3ca3"),r("ddb0"),r("b636"),r("944a"),r("0c47"),r("23dc"),r("3410"),r("d9e2"),r("159b"),r("b0c0"),r("131a"),r("fb6a");var a=r("0122"),n=r("c964"),o=(r("a434"),r("a15b"),r("c4c8"));function i(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(e){u=function(t,e,r){return t[e]=r}}function d(t,e,r,a){var o,i,s,l;e=e&&e.prototype instanceof m?e:m,e=Object.create(e.prototype),a=new k(a||[]);return n(e,"_invoke",{value:(o=t,i=r,s=a,l="suspendedStart",function(t,e){if("executing"===l)throw new Error("Generator is already running");if("completed"===l){if("throw"===t)throw e;return V()}for(s.method=t,s.arg=e;;){var r=s.delegate;if(r&&(r=function t(e,r){var a=r.method,n=e.iterator[a];return void 0===n?(r.delegate=null,"throw"===a&&e.iterator.return&&(r.method="return",r.arg=void 0,t(e,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),h):(a=f(n,e.iterator,r.arg),"throw"===a.type?(r.method="throw",r.arg=a.arg,r.delegate=null,h):(n=a.arg,n?n.done?(r[e.resultName]=n.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):n:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)))}(r,s),r)){if(r===h)continue;return r}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if("suspendedStart"===l)throw l="completed",s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);if(l="executing",r=f(o,i,s),"normal"===r.type){if(l=s.done?"completed":"suspendedYield",r.arg===h)continue;return{value:r.arg,done:s.done}}"throw"===r.type&&(l="completed",s.method="throw",s.arg=r.arg)}})}),e}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=d;var h={};function m(){}function p(){}function v(){}o={};var y=(u(o,s,(function(){return this})),Object.getPrototypeOf),g=(y=y&&y(y(L([]))),y&&y!==e&&r.call(y,s)&&(o=y),v.prototype=m.prototype=Object.create(o));function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){var o;n(this,"_invoke",{value:function(n,i){function s(){return new e((function(o,s){!function n(o,i,s,l){var c;o=f(t[o],t,i);if("throw"!==o.type)return(i=(c=o.arg).value)&&"object"==Object(a.a)(i)&&r.call(i,"__await")?e.resolve(i.__await).then((function(t){n("next",t,s,l)}),(function(t){n("throw",t,s,l)})):e.resolve(i).then((function(t){c.value=t,s(c)}),(function(t){return n("throw",t,s,l)}));l(o.arg)}(n,i,o,s)}))}return o=o?o.then(s,s):s()}})}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function L(t){if(t){var e,a=t[s];if(a)return a.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return e=-1,(a=function a(){for(;++e<t.length;)if(r.call(t,e))return a.value=t[e],a.done=!1,a;return a.value=void 0,a.done=!0,a}).next=a}return{next:V}}function V(){return{value:void 0,done:!0}}return n(g,"constructor",{value:p.prototype=v,configurable:!0}),n(v,"constructor",{value:p,configurable:!0}),p.displayName=u(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){return t="function"==typeof t&&t.constructor,!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u(t,c,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},b(w.prototype),u(w.prototype,l,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,a,n,o){void 0===o&&(o=Promise);var i=new w(d(e,r,a,n),o);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},b(g),u(g,c,"Generator"),u(g,s,(function(){return this})),u(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e,r=Object(t),a=[];for(e in r)a.push(e);return a.reverse(),function t(){for(;a.length;){var e=a.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},t.values=L,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function a(r,a){return i.type="throw",i.arg=t,e.next=r,a&&(e.method="next",e.arg=void 0),!!a}for(var n=this.tryEntries.length-1;0<=n;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.finallyLoc)}}}},abrupt:function(t,e){for(var a=this.tryEntries.length-1;0<=a;--a){var n=this.tryEntries[a];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}var i=(o=o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc?null:o)?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r,a,n=this.tryEntries[e];if(n.tryLoc===t)return"throw"===(r=n.completion).type&&(a=r.arg,x(n)),a}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}var s={name:"product_productEvaluate",data:function(){return{modals:!1,grid:{xl:7,lg:10,md:12,sm:12,xs:24},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},fromList:{title:"选择时间",custom:!0,fromTxt:[{text:"全部",val:""},{text:"今天",val:"today"},{text:"昨天",val:"yesterday"},{text:"最近7天",val:"lately7"},{text:"最近30天",val:"lately30"},{text:"本月",val:"month"},{text:"本年",val:"year"}]},value:"45",tableList:[],total:0,loading:!1,columns:[{title:"评论ID",key:"id",width:80},{title:"商品信息",slot:"info",minWidth:230},{title:"用户名称",key:"nickname",minWidth:150},{title:"评分",key:"score",sortable:!0,minWidth:90},{title:"评价内容",slot:"content",minWidth:210},{title:"回复内容",key:"merchant_reply_content",minWidth:250},{title:"评价时间",key:"add_time",sortable:!0,minWidth:150},{title:"操作",slot:"action",fixed:"right",minWidth:150}],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()}},methods:{add:function(){var t=this;this.$modalForm(Object(o.j)(this.formValidate.product_id)).then((function(){return t.getList()}))},oks:function(){var t=this;this.modals=!0,this.$refs.contents.validate((function(e){if(!e)return!1;Object(o.F)(t.contents,t.rows.id).then(function(){var e=Object(n.a)(i().mark((function e(r){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.$Message.success(r.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,r){var a=this;e={title:e,num:r,url:"product/reply/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(e).then((function(t){a.$Message.success(t.msg),a.tableList.splice(r,1),a.total=a.total-1})).catch((function(t){a.$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.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()},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(o.B)(this.formValidate).then(function(){var e=Object(n.a)(i().mark((function e(r){var a;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=r.data,t.tableList=a.list,t.total=r.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)}))},pageChange:function(t){this.formValidate.page=t,this.getList()},userSearchs:function(){this.formValidate.page=1,this.getList()},search:function(){}}};r("9df1"),r=r("2877"),r=Object(r.a)(s,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"article-manager"},[r("div",{staticClass:"i-layout-page-header header-title"},[r("div",{staticClass:"fl_header"},[t.$route.params.id?r("router-link",{attrs:{to:{path:t.$routeProStr+"/product/product_list"}}},[r("Button",{staticClass:"mr20",attrs:{icon:"ios-arrow-back",size:"small"}},[t._v("返回")])],1):t._e(),r("span",{staticClass:"ivu-page-header-title mr20"},[t._v("商品评论管理")])],1)]),r("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[r("Form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":75,"label-position":"left"},nativeOn:{submit:function(t){t.preventDefault()}}},[r("Row",{attrs:{type:"flex",gutter:24}},[r("Col",{attrs:{span:"24"}},[r("FormItem",{attrs:{label:"评论时间:"}},[r("RadioGroup",{staticClass:"mr",attrs:{type:"button"},on:{"on-change":function(e){return t.selectChange(t.formValidate.data)}},model:{value:t.formValidate.data,callback:function(e){t.$set(t.formValidate,"data",e)},expression:"formValidate.data"}},t._l(t.fromList.fromTxt,(function(e,a){return r("Radio",{key:a,attrs:{label:e.val}},[t._v(t._s(e.text))])})),1),r("DatePicker",{staticStyle:{width:"200px"},attrs:{editable:!1,value:t.timeVal,format:"yyyy/MM/dd",type:"daterange",placement:"bottom-end",placeholder:"请选择时间"},on:{"on-change":t.onchangeTime}})],1)],1),r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"评价状态:"}},[r("Select",{attrs:{placeholder:"请选择",clearable:""},on:{"on-change":t.userSearchs},model:{value:t.formValidate.is_reply,callback:function(e){t.$set(t.formValidate,"is_reply",e)},expression:"formValidate.is_reply"}},[r("Option",{attrs:{value:"1"}},[t._v("已回复")]),r("Option",{attrs:{value:"0"}},[t._v("未回复")])],1)],1)],1),t.$route.params.id?t._e():r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"商品信息:","label-for":"store_name"}},[r("Input",{attrs:{size:"default","enter-button":"",placeholder:"请输入商品ID或者商品信息",clearable:""},model:{value:t.formValidate.store_name,callback:function(e){t.$set(t.formValidate,"store_name",e)},expression:"formValidate.store_name"}})],1)],1),r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"用户名称:","label-for":"account"}},[r("Input",{attrs:{size:"default","enter-button":"",placeholder:"请输入",clearable:""},model:{value:t.formValidate.account,callback:function(e){t.$set(t.formValidate,"account",e)},expression:"formValidate.account"}})],1)],1),r("Col",{staticClass:"search",attrs:{xl:3,lg:3,md:12,sm:12,xs:24}},[r("FormItem",[r("Button",{attrs:{type:"primary",icon:"ios-search"},on:{click:t.userSearchs}},[t._v("搜索")])],1)],1)],1)],1),r("Row",{attrs:{type:"flex"}},[r("Col",t._b({},"Col",t.grid,!1),[r("Button",{directives:[{name:"auth",rawName:"v-auth",value:["product-reply-save_fictitious_reply"],expression:"['product-reply-save_fictitious_reply']"}],attrs:{type:"primary",icon:"md-add"},on:{click:t.add}},[t._v("添加自评")])],1)],1),r("Table",{ref:"table",staticClass:"ivu-mt mt25",attrs:{columns:t.columns,data:t.tableList,loading:t.loading,"no-data-text":"暂无数据","no-filtered-data-text":"暂无筛选结果"},on:{"on-sort-change":t.sortMethod},scopedSlots:t._u([{key:"info",fn:function(e){return e=e.row,[r("div",{staticClass:"imgPic acea-row row-middle"},[r("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"pictrue"},[r("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.image,expression:"row.image"}]})]),r("div",{staticClass:"info"},[t._v(t._s(e.store_name))])])]}},{key:"content",fn:function(e){return e=e.row,[r("div",{staticClass:"mb5 content_font"},[t._v(t._s(e.comment))]),t._l(e.pics||[],(function(t,e){return r("div",{directives:[{name:"viewer",rawName:"v-viewer"}],key:e,staticClass:"pictrue mr10"},[r("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t,expression:"item"}],attrs:{src:t}})])}))]}},{key:"action",fn:function(e){var a=e.row,n=e.index;return[r("a",{on:{click:function(e){return t.reply(a)}}},[t._v("回复")]),r("Divider",{attrs:{type:"vertical"}}),r("a",{on:{click:function(e){return t.del(a,"删除评论",n)}}},[t._v("删除")])]}}])}),r("div",{staticClass:"acea-row row-right page"},[r("Page",{attrs:{total:t.total,current:t.formValidate.page,"show-elevator":"","show-total":"","page-size":t.formValidate.limit},on:{"on-change":t.pageChange}})],1)],1),r("Modal",{attrs:{scrollable:"",title:"回复内容",closable:""},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[r("Form",{ref:"contents",attrs:{model:t.contents,rules:t.ruleInline,"label-position":"right"},nativeOn:{submit:function(t){t.preventDefault()}}},[r("FormItem",{attrs:{prop:"content"}},[r("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),r("div",{attrs:{slot:"footer"},slot:"footer"},[r("Button",{attrs:{type:"primary"},on:{click:t.oks}},[t._v("确定")]),r("Button",{on:{click:t.cancels}},[t._v("取消")])],1)],1)],1)}),[],!1,null,"23fd0922",null);e.default=r.exports},"9df1":function(t,e,r){"use strict";var a=r("dd92");r.n(a).a},dd92:function(t,e,r){}}]); |