王总上门按摩后台代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

1 lines
16 KiB

webpackJsonp([16],{PRcg:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a("mvHQ"),r=a.n(n),i=a("Xxa5"),s=a.n(i),o=a("exGp"),l=a.n(o),c=a("PJh5"),u=a.n(c),m={data:function(){return{statusOptions:[{label:"全部",value:0},{label:"五星",value:5},{label:"四星",value:4},{label:"三星",value:3},{label:"二星",value:2},{label:"一星",value:1}],statusType:{1:"退款申请中",2:"同意退款",3:"拒绝退款"},loading:{list:!1,technician:!1},searchForm:{list:{page:1,limit:10,coach_name:"",goods_name:"",star:0,order_id:0},technician:{page:1,limit:10,status:2,auth_status:2,name:""}},tableData:{list:[],technician:[]},total:{list:0,technician:0},showDialog:{add:!1,technician:!1},startObj:["不满意","一般","满意","很满意","非常满意"],subForm:{star:5,text:"",coach_id:"",coach_name:"",label:[]},subFormRules:{star:{required:!0,type:"number",message:"请选择评价星级",trigger:"blur"},text:{required:!0,validator:this.$reg.isNotNull,text:"评价内容",reg_type:2,trigger:"blur"},coach_id:{required:!0,type:"number",message:"请选择"+this.$t("action.attendantName"),trigger:"blur"}},currentRow:{}}},created:function(){var t=this;return l()(s.a.mark(function e(){var a,n;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.$route.query.id,n=void 0===a?0:a,t.searchForm.order_id=n,e.next=4,t.getBaseInfo();case 4:t.getTableDataList(1,"list");case 5:case"end":return e.stop()}},e,t)}))()},methods:{getBaseInfo:function(){var t=this;return l()(s.a.mark(function e(){var a,n,r;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$api.shop.lableList();case 2:if(a=e.sent,n=a.code,r=a.data,200===n){e.next=7;break}return e.abrupt("return");case 7:r.map(function(t){t.is_check=!1}),t.base_label=r;case 9:case"end":return e.stop()}},e,t)}))()},resetForm:function(t){var e=t+"Form";this.$refs[e].resetFields(),this.searchForm.list.order_id=0,this.getTableDataList(1,t)},handleSizeChange:function(t,e){this.searchForm[e].limit=t,this.handleCurrentChange(1,e)},handleCurrentChange:function(t,e){this.searchForm[e].page=t,this.getTableDataList("",e)},getTableDataList:function(t,e){var a=this;return l()(s.a.mark(function n(){var i,o,l,c,u,m,d;return s.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return t&&(a.searchForm[e].page=1),a.loading[e]=!0,i=JSON.parse(r()(a.searchForm[e])),o={list:{methodKey:"shop",methodModel:"commentList"},technician:{methodKey:"technician",methodModel:"coachList"}}[e],l=o.methodKey,c=o.methodModel,n.next=7,a.$api[l][c](i);case 7:if(u=n.sent,m=u.code,d=u.data,a.loading[e]=!1,200===m){n.next=13;break}return n.abrupt("return");case 13:a.tableData[e]=d.data,a.total[e]=d.total;case 15:case"end":return n.stop()}},n,a)}))()},confirmDel:function(t){var e=this;this.$confirm(this.$t("tips.confirmDelete"),this.$t("tips.reminder"),{confirmButtonText:this.$t("action.comfirm"),cancelButtonText:this.$t("action.cancel"),type:"warning"}).then(function(){e.updateItem(t,-1)}).catch(function(){})},updateItem:function(t,e){var a=this;return l()(s.a.mark(function n(){return s.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:a.$api.shop.commentUpdate({id:t,status:e}).then(function(t){200===t.code&&(a.$message.success(a.$t(-1===e?"tips.successDel":"tips.successOper")),-1===e&&(a.searchForm.list.page=a.searchForm.list.page<Math.ceil((a.total.list-1)/a.searchForm.list.limit)?a.searchForm.list.page:Math.ceil((a.total.list-1)/a.searchForm.list.limit),a.getTableDataList("","list")))});case 1:case"end":return n.stop()}},n,a)}))()},toShowDialog:function(t){var e=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{star:5,text:"",coach_id:"",coach_name:"",label:[]};return l()(s.a.mark(function n(){return s.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if("add"!==t){n.next=4;break}e.subForm=a,n.next=8;break;case 4:return e.currentRow={},e.searchForm.technician.name="",n.next=8,e.getTableDataList(1,t);case 8:e.showDialog[t]=!e.showDialog[t];case 9:case"end":return n.stop()}},n,e)}))()},checkStar:function(t){this.subForm.star=t},toChangeItem:function(t){var e=this.base_label[t].id,a=JSON.parse(r()(this.subForm.label)),n=a&&a.length>0?a.findIndex(function(t){return t===e}):-1;-1!==n?a.splice(n,1):a.push(e),this.subForm.label=a},handleTableChange:function(t){this.currentRow=t},handleDialogConfirm:function(){if(null!==this.currentRow&&this.currentRow.id){var t=this.currentRow,e=t.id,a=t.coach_name;this.subForm.coach_id=e,this.subForm.coach_name=a,this.showDialog.technician=!1}else this.$message.error("请选择"+this.$t("action.attendantName"))},submitFormInfo:function(){var t=this;return l()(s.a.mark(function e(){var a,n,i;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=!0,t.$refs.subForm.validate(function(t){t||(a=!1)}),!a){e.next=14;break}return delete(n=JSON.parse(r()(t.subForm))).coach_name,e.next=7,t.$api.shop.addComment(n);case 7:if(i=e.sent,200===i.code){e.next=11;break}return e.abrupt("return");case 11:t.$message.success(t.$t("tips.successSub")),t.showDialog.add=!1,t.getTableDataList("","list");case 14:case"end":return e.stop()}},e,t)}))()}},filters:{handleTime:function(t,e){return 1===e?u()(1e3*t).format("YYYY-MM-DD"):2===e?u()(1e3*t).format("HH:mm:ss"):u()(1e3*t).format("YYYY-MM-DD HH:mm:ss")}}},d={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"lb-shop-refund"},[a("top-nav"),t._v(" "),a("div",{staticClass:"page-main"},[a("el-row",{staticClass:"page-top-operate"},[a("lb-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:t.$route.name+"-add",expression:"`${$route.name}-add`"}],attrs:{size:"medium",type:"primary",icon:"el-icon-plus"},on:{click:function(e){return t.toShowDialog("add")}}},[t._v(t._s(t.$t("menu.ShopEvaluateAdd")))])],1),t._v(" "),a("el-row",{staticClass:"page-search-form"},[a("el-form",{ref:"listForm",attrs:{inline:!0,model:t.searchForm.list},nativeOn:{submit:function(t){t.preventDefault()}}},[a("el-form-item",{attrs:{label:t.$t("action.attendantName")+"名称",prop:"coach_name"}},[a("el-input",{attrs:{placeholder:"请输入"+t.$t("action.attendantName")+"名称"},model:{value:t.searchForm.list.coach_name,callback:function(e){t.$set(t.searchForm.list,"coach_name",e)},expression:"searchForm.list.coach_name"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"服务名称",prop:"goods_name"}},[a("el-input",{attrs:{placeholder:"请输入服务名称"},model:{value:t.searchForm.list.goods_name,callback:function(e){t.$set(t.searchForm.list,"goods_name",e)},expression:"searchForm.list.goods_name"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"星级",prop:"star"}},[a("el-select",{attrs:{placeholder:"请选择"},on:{change:function(e){return t.getTableDataList(1,"list")}},model:{value:t.searchForm.list.star,callback:function(e){t.$set(t.searchForm.list,"star",e)},expression:"searchForm.list.star"}},t._l(t.statusOptions,function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}),1)],1),t._v(" "),a("el-form-item",[a("lb-button",{staticStyle:{"margin-right":"5px"},attrs:{size:"medium",type:"primary",icon:"el-icon-search"},on:{click:function(e){return t.getTableDataList(1,"list")}}},[t._v(t._s(t.$t("action.search")))]),t._v(" "),a("lb-button",{staticStyle:{"margin-right":"5px"},attrs:{size:"medium",icon:"el-icon-refresh-left"},on:{click:function(e){return t.resetForm("list")}}},[t._v(t._s(t.$t("action.reset")))])],1)],1)],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading.list,expression:"loading.list"}],staticStyle:{width:"100%"},attrs:{data:t.tableData.list,"header-cell-style":{background:"#f5f7fa",color:"#606266"}}},[a("el-table-column",{attrs:{prop:"id",label:"ID",width:"80",fixed:""}}),t._v(" "),a("el-table-column",{attrs:{prop:"goods_info_text",width:"300",label:"服务项目信息"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.order_id?a("block",t._l(e.row.order_goods,function(e,n){return a("div",{key:n,staticClass:"pb-sm"},[a("div",{staticClass:"flex-warp pt-md"},[a("lb-image",{staticClass:"avatar radius-5",attrs:{src:e.goods_cover}}),t._v(" "),a("div",{staticClass:"flex-1 f-caption c-caption ml-md",staticStyle:{width:"210px"}},[a("div",{staticClass:"flex-between"},[a("div",{staticClass:"f-paragraph c-title ellipsis",class:[{"max-300":e.refund_num>0}],staticStyle:{"line-height":"1.2","margin-bottom":"4px"}},[t._v("\n "+t._s(e.goods_name)+"\n ")]),t._v(" "),e.refund_num>0?a("div",{staticClass:"f-caption c-warning"},[t._v("\n 已退x"+t._s(e.refund_num)+"\n ")]):t._e()]),t._v(" "),a("div",{staticClass:"flex-between f-caption mt-md"},[a("div",{staticClass:"c-warning ml-md"},[t._v("¥"+t._s(e.price))]),t._v(" "),a("div",[t._v("x"+t._s(e.goods_num||1))])])])],1)])}),0):a("block",[t._v("-")])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"user_id",label:"客户ID"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.order_id?e.row.user_id:"")+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"nickName",label:"客户昵称"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.order_id?e.row.nickName:"")+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"coach_name",label:t.$t("action.attendantName"),"min-width":"120"}}),t._v(" "),a("el-table-column",{attrs:{prop:"star",label:"评价星级","min-width":"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"flex-warp"},t._l(5,function(t,n){return a("i",{key:n,staticClass:"iconfont iconyduixingxingkongxin c-caption mr-sm",class:[{"iconyduixingxingshixin c-danger":n<e.row.star}]})}),0)]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"text",label:"评价内容","min-width":"400"}}),t._v(" "),a("el-table-column",{attrs:{prop:"lable_text",label:"评价标签","min-width":"300"},scopedSlots:t._u([{key:"default",fn:function(e){return t._l(e.row.lable_text,function(e,n){return a("el-tag",{key:n,staticClass:"mr-md mb-md"},[t._v(t._s(e))])})}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"create_time","min-width":"120",label:"评价时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(t._f("handleTime")(e.row.create_time,1)))]),t._v(" "),a("div",[t._v(t._s(t._f("handleTime")(e.row.create_time,2)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{width:"90px",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"table-operate"},[a("lb-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:t.$route.name+"-delete",expression:"`${$route.name}-delete`"}],attrs:{size:"mini",plain:"",type:"danger"},on:{click:function(a){return t.confirmDel(e.row.id)}}},[t._v(t._s(t.$t("action.delete")))])],1)]}}])})],1),t._v(" "),a("lb-page",{attrs:{batch:!1,page:t.searchForm.list.page,pageSize:t.searchForm.list.limit,total:t.total.list},on:{handleSizeChange:function(e){return t.handleSizeChange(e,"list")},handleCurrentChange:function(e){return t.handleCurrentChange(e,"list")}}}),t._v(" "),a("el-dialog",{attrs:{title:t.$t("menu.ShopEvaluateAdd"),visible:t.showDialog.add,width:"800px",center:""},on:{"update:visible":function(e){return t.$set(t.showDialog,"add",e)}}},[a("el-form",{ref:"subForm",staticClass:"dialog-form",attrs:{model:t.subForm,rules:t.subFormRules,"label-width":"130px"}},[a("el-form-item",{attrs:{label:"评价星级",prop:"star"}},[a("div",{staticClass:"flex-center"},[a("div",{staticClass:"flex-warp"},t._l(5,function(e,n){return a("block",{key:n},[a("i",{staticClass:"star-icon text-bold iconfont c-danger mr-sm",class:[{iconyduixingxingkongxin:t.subForm.star<1*n+1},{iconyduixingxingshixin:t.subForm.star>=1*n+1}],on:{click:function(e){return t.checkStar(1*n+1)}}})])}),1),t._v(" "),a("div",{staticClass:"flex-1 f-paragraph c-caption pl-lg"},[t._v("\n "+t._s(t.subForm.star?t.startObj[t.subForm.star-1]:"请选择星级")+"\n ")])])]),t._v(" "),a("el-form-item",{attrs:{label:"评价内容",prop:"text"}},[a("el-input",{attrs:{type:"textarea",rows:10,maxlength:"300","show-word-limit":"",resize:"none",placeholder:"请输入评价内容"},model:{value:t.subForm.text,callback:function(e){t.$set(t.subForm,"text",e)},expression:"subForm.text"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"评价标签",prop:"label"}},[a("div",{staticClass:"flex-warp f-caption c-title"},[t._l(t.base_label,function(e,n){return a("div",{key:n,staticClass:"fill-body flex-center mt-md mr-md pl-lg pr-lg cursor-pointer radius",class:[{"c-base":t.subForm.label.includes(e.id)}],staticStyle:{height:"30px"},style:{background:t.subForm.label.includes(e.id)?"#409EFF":""},on:{click:function(e){return t.toChangeItem(n)}}},[t._v("\n "+t._s(e.title)+"\n ")])}),t._v(" "),0==t.base_label.length?a("div",{staticClass:"c-link cursor-pointer",on:{click:function(e){return t.$router.push("/shop/evaluate/label")}}},[t._v("\n 暂无评价标签,请前去添加\n ")]):t._e()],2)]),t._v(" "),a("el-form-item",{attrs:{label:"选择"+t.$t("action.attendantName"),prop:"coach_id"}},[a("el-tag",{attrs:{type:t.subForm.coach_id?"primary":"danger"},on:{click:function(e){return t.toShowDialog("technician")}}},[t._v(t._s(t.subForm.coach_id?t.subForm.coach_name:"请选择"+this.$t("action.attendantName")))])],1)],1),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.showDialog.add=!1}}},[t._v("取 消")]),t._v(" "),a("el-button",{directives:[{name:"preventReClick",rawName:"v-preventReClick"}],attrs:{type:"primary"},on:{click:t.submitFormInfo}},[t._v("确 定")])],1)],1),t._v(" "),a("el-dialog",{attrs:{title:"关联"+t.$t("action.attendantName"),visible:t.showDialog.technician,width:"800px",center:""},on:{"update:visible":function(e){return t.$set(t.showDialog,"technician",e)}}},[a("el-form",{ref:"technicianForm",attrs:{inline:!0,model:t.searchForm.technician,"label-width":"70px"}},[a("el-form-item",{attrs:{label:"输入查询",prop:"name"}},[a("el-input",{staticStyle:{width:"250px"},attrs:{placeholder:"请输入"+t.$t("action.attendantName")+"姓名/手机号"},model:{value:t.searchForm.technician.name,callback:function(e){t.$set(t.searchForm.technician,"name",e)},expression:"searchForm.technician.name"}})],1),t._v(" "),a("el-form-item",[a("lb-button",{staticStyle:{"margin-right":"5px"},attrs:{size:"medium",type:"primary",icon:"el-icon-search"},on:{click:function(e){return t.getTableDataList(1,"technician")}}},[t._v(t._s(t.$t("action.search")))]),t._v(" "),a("lb-button",{staticStyle:{"margin-right":"5px"},attrs:{size:"medium",icon:"el-icon-refresh-left"},on:{click:function(e){return t.resetForm("technician")}}},[t._v(t._s(t.$t("action.reset")))])],1)],1),t._v(" "),a("el-table",{ref:"singleTable",staticStyle:{width:"100%"},attrs:{data:t.tableData.technician,"header-cell-style":{background:"#f5f7fa",color:"#606266"},"tooltip-effect":"dark","highlight-current-row":""},on:{"current-change":t.handleTableChange}},[a("el-table-column",{attrs:{prop:"id",label:t.$t("action.attendantName")+"ID"}}),t._v(" "),a("el-table-column",{attrs:{prop:"work_img",label:t.$t("action.attendantName")+"头像"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("lb-image",{attrs:{src:t.row.work_img}})]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"coach_name",label:t.$t("action.attendantName")+"姓名"}}),t._v(" "),a("el-table-column",{attrs:{prop:"mobile",label:"手机号"}})],1),t._v(" "),a("lb-page",{attrs:{batch:!1,page:t.searchForm.technician.page,pageSize:t.searchForm.technician.limit,total:t.total.technician},on:{handleSizeChange:function(e){return t.handleSizeChange(e,"technician")},handleCurrentChange:function(e){return t.handleCurrentChange(e,"technician")}}}),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.showDialog.technician=!1}}},[t._v("取 消")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.handleDialogConfirm}},[t._v("确 定")])],1)],1)],1)],1)},staticRenderFns:[]};var h=a("VU/8")(m,d,!1,function(t){a("vT9q"),a("e4Vk")},"data-v-47234d6d",null);e.default=h.exports},e4Vk:function(t,e){},vT9q:function(t,e){}});