王总上门按摩后台代码
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
8.2 KiB

webpackJsonp([71],{FOvI:function(e,t){},R43M:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a("Xxa5"),s=a.n(r),n=a("exGp"),i=a.n(n),o=a("PJh5"),c=a.n(o),l={data:function(){return{userTypeList:[{id:0,title:"全部"},{id:1,title:"审核中"},{id:2,title:"已通过"},{id:3,title:"已驳回"}],statusText:{1:{type:"info",text:"审核中"},2:{type:"",text:"已通过"},3:{type:"danger",text:"已驳回"}},loading:!1,searchForm:{page:1,limit:10,type:2,name:"",check_status:0},tableData:[],total:0,count:{}}},activated:function(){this.getTableDataList(1)},methods:{resetForm:function(e){this.$refs[e].resetFields(),this.getTableDataList(1)},handleSizeChange:function(e){this.searchForm.limit=e,this.handleCurrentChange(1)},handleCurrentChange:function(e){this.searchForm.page=e,this.getTableDataList()},toChange:function(e){var t=this;return i()(s.a.mark(function a(){return s.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:t.searchForm.status=e,t.getTableDataList(1);case 2:case"end":return a.stop()}},a,t)}))()},getTableDataList:function(e){var t=this;return i()(s.a.mark(function a(){var r,n,i;return s.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return e&&(t.searchForm.page=1),t.tableData=[],t.loading=!0,a.next=5,t.$api.service.serviceList(t.searchForm);case 5:if(r=a.sent,n=r.code,i=r.data,t.loading=!1,200===n){a.next=11;break}return a.abrupt("return");case 11:i.data.map(function(e){var t=e.check_text;e.check_text=t&&t.length>0?t.replace(/\n/g,"<br>"):"没有填写原因哦"}),t.tableData=i.data,t.total=i.total;case 14:case"end":return a.stop()}},a,t)}))()},confirmDel:function(e){var t=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(){t.updateItem(e,-1)}).catch(function(){})},updateItem:function(e,t){var a=this;return i()(s.a.mark(function r(){return s.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:a.$api.service.serviceUpdate({id:e,status:t}).then(function(e){if(200===e.code)a.$message.success(a.$t(-1===t?"tips.successDel":"tips.successOper")),-1===t&&(a.searchForm.page=a.searchForm.page<Math.ceil((a.total-1)/a.searchForm.limit)?a.searchForm.page:Math.ceil((a.total-1)/a.searchForm.limit),a.getTableDataList());else{if(-1===t)return;a.getTableDataList()}});case 1:case"end":return r.stop()}},r,a)}))()}},filters:{handleTime:function(e,t){return 1===t?c()(1e3*e).format("YYYY-MM-DD"):2===t?c()(1e3*e).format("HH:mm:ss"):c()(1e3*e).format("YYYY-MM-DD HH:mm:ss")}}},u={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"lb-store-service"},[a("top-nav"),e._v(" "),a("div",{staticClass:"page-main"},[a("el-row",{staticClass:"page-top-operate"},[a("lb-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:e.$route.name+"-add",expression:"`${$route.name}-add`"}],attrs:{type:"primary",icon:"el-icon-plus"},on:{click:function(t){return e.$router.push("/store/service/edit")}}},[e._v(e._s(e.$t("menu.ServiceAdd")))])],1),e._v(" "),a("el-row",{staticClass:"page-search-form"},[a("el-form",{ref:"searchForm",attrs:{inline:!0,model:e.searchForm},nativeOn:{submit:function(e){e.preventDefault()}}},[a("el-form-item",{attrs:{label:"输入查询",prop:"name"}},[a("el-input",{attrs:{placeholder:"请输入服务名称"},model:{value:e.searchForm.name,callback:function(t){e.$set(e.searchForm,"name",t)},expression:"searchForm.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"审核状态",prop:"check_status"}},[a("el-select",{attrs:{placeholder:"请选择"},on:{change:function(t){return e.getTableDataList(1)}},model:{value:e.searchForm.check_status,callback:function(t){e.$set(e.searchForm,"check_status",t)},expression:"searchForm.check_status"}},e._l(e.userTypeList,function(e){return a("el-option",{key:e.id,attrs:{label:e.title,value:e.id}})}),1)],1),e._v(" "),a("el-form-item",[a("lb-button",{staticStyle:{"margin-right":"5px"},attrs:{size:"medium",type:"primary",icon:"el-icon-search"},on:{click:function(t){return e.getTableDataList(1)}}},[e._v(e._s(e.$t("action.search")))]),e._v(" "),a("lb-button",{staticStyle:{"margin-right":"5px"},attrs:{size:"medium",icon:"el-icon-refresh-left"},on:{click:function(t){return e.resetForm("searchForm")}}},[e._v(e._s(e.$t("action.reset")))])],1)],1)],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData,"header-cell-style":{background:"#f5f7fa",color:"#606266"}}},[a("el-table-column",{attrs:{prop:"id",label:"ID"}}),e._v(" "),a("el-table-column",{attrs:{prop:"cover",label:"封面图"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("lb-image",{attrs:{src:e.row.cover}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"title",label:"服务名称","min-width":"120"}}),e._v(" "),a("el-table-column",{attrs:{prop:"price",label:"服务价格"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s("¥"+t.row.price)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"init_price",label:"服务原价"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s("¥"+t.row.init_price)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"time_long",label:"服务时长"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.time_long+"分钟")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"top",label:"排序值"}}),e._v(" "),a("el-table-column",{attrs:{prop:"status",label:"是否上架"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-switch",{attrs:{disabled:!e.$route.meta.pagePermission[0].auth.includes("edit"),"active-value":1,"inactive-value":0},on:{change:function(a){return e.updateItem(t.row.id,t.row.status)}},model:{value:t.row.status,callback:function(a){e.$set(t.row,"status",a)},expression:"scope.row.status"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"创建时间","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("p",[e._v(e._s(e._f("handleTime")(t.row.create_time,1)))]),e._v(" "),a("p",[e._v(e._s(e._f("handleTime")(t.row.create_time,2)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"status",label:"状态","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return t.row.check_status?[a("el-tag",{attrs:{type:e.statusText[t.row.check_status].type}},[e._v("\n "+e._s(e.statusText[t.row.check_status].text)+"\n ")]),e._v(" "),3===t.row.check_status?a("div",{staticClass:"mt-sm c-link"},[a("el-popover",{attrs:{placement:"top-start",width:"400",trigger:"hover"}},[a("div",{staticClass:"f-desc c-title",attrs:{slot:""},slot:"default"},[a("div",{staticClass:"mb-sm f-desc c-title text-bold"},[e._v("\n "+e._s(e._f("handleTime")(t.row.check_time))+"\n ")]),e._v(" "),a("div",{staticClass:"f-caption c-caption",domProps:{innerHTML:e._s(t.row.check_text)}})]),e._v(" "),a("div",{attrs:{slot:"reference"},slot:"reference"},[e._v("查看审核结果")])])],1):e._e()]:void 0}}],null,!0)}),e._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"160"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"table-operate"},[a("lb-button",{directives:[{name:"show",rawName:"v-show",value:1!==t.row.check_status,expression:"scope.row.check_status !== 1"},{name:"hasPermi",rawName:"v-hasPermi",value:e.$route.name+"-edit",expression:"`${$route.name}-edit`"}],attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(a){return e.$router.push("/store/service/edit?id="+t.row.id)}}},[e._v(e._s(e.$t("action.edit")))]),e._v(" "),a("lb-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:e.$route.name+"-delete",expression:"`${$route.name}-delete`"}],attrs:{size:"mini",plain:"",type:"danger"},on:{click:function(a){return e.confirmDel(t.row.id)}}},[e._v(e._s(e.$t("action.delete")))])],1)]}}])})],1),e._v(" "),a("lb-page",{attrs:{batch:!1,page:e.searchForm.page,pageSize:e.searchForm.limit,total:e.total},on:{handleSizeChange:e.handleSizeChange,handleCurrentChange:e.handleCurrentChange}})],1)],1)},staticRenderFns:[]};var m=a("VU/8")(l,u,!1,function(e){a("FOvI")},"data-v-45bcf3ca",null);t.default=m.exports}});