12345678 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-13fb10f8","chunk-2d0ab151"],{1480:function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticStyle:{"margin-top":"10px","text-align":"left"}},[i("el-form",{ref:"dialogForm",attrs:{model:e.dialogForm,rules:e.rules}},[i("el-form-item",{attrs:{label:"服务名称:",prop:"productName","label-width":e.formLabelWidth}},[i("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入名称",disabled:""},model:{value:e.productName,callback:function(t){e.productName=t},expression:"productName"}})],1),i("el-form-item",{attrs:{label:"用户昵称:",prop:"userName","label-width":e.formLabelWidth}},[i("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入用户昵称"},model:{value:e.dialogForm.userName,callback:function(t){e.$set(e.dialogForm,"userName",t)},expression:"dialogForm.userName"}})],1),i("el-form-item",{attrs:{label:"头像:",prop:"avatar","label-width":e.formLabelWidth}},[i("upload-image",{attrs:{boxSize:{width:"60px",height:"60px"},multiple:!1},model:{value:e.dialogForm.avatar,callback:function(t){e.$set(e.dialogForm,"avatar",t)},expression:"dialogForm.avatar"}})],1),i("el-form-item",{attrs:{label:"评论图片:","label-width":e.formLabelWidth}},[i("upload-image",{attrs:{multiple:!0,limit:6,modelName:"comment",boxSize:{width:"60px",height:"60px"}},model:{value:e.imageList,callback:function(t){e.imageList=t},expression:"imageList"}})],1),i("el-form-item",{attrs:{label:"满意度:",prop:"score","label-width":e.formLabelWidth}},[i("el-rate",{staticStyle:{"margin-top":"9px"},model:{value:e.dialogForm.score,callback:function(t){e.$set(e.dialogForm,"score",t)},expression:"dialogForm.score"}})],1),i("el-form-item",{attrs:{label:"评论内容:",prop:"content","label-width":e.formLabelWidth}},[i("el-input",{attrs:{type:"textarea",rows:4,maxlength:"100","show-word-limit":"",placeholder:"100字以内"},model:{value:e.dialogForm.content,callback:function(t){e.$set(e.dialogForm,"content",t)},expression:"dialogForm.content"}})],1)],1),i("div",{staticClass:"dialog-footer dialog-bottom",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:e.hideDialog}},[e._v("取 消")]),i("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleCreateSubmit()}}},[e._v("确 定")])],1)],1)},o=[],l=(i("b0c0"),i("a9e3"),i("d3b7"),i("25f0"),{name:"CommentFakeForm",props:{currentRow:{type:Object,default:null},keyNum:{type:Number,default:0}},data:function(){return{dialogEditVisible:!0,dialogCreateVisible:!1,formLabelWidth:"100px",productName:"",imageList:[],dialogForm:{userName:"",productId:"",avatar:"",content:"",images:"",score:5},rules:{userName:[{required:!0,message:"请输入用户昵称",trigger:"blur"}],avatar:[{required:!0,message:"请上传用户头像",trigger:"blur"}],content:[{required:!0,message:"请输入评论内容",trigger:"blur"}]}}},mounted:function(){},watch:{currentRow:{handler:function(e,t){this.dialogForm.productId=e.id,this.productName=e.name},immediate:!0},keyNum:{deep:!0,handler:function(e){e>0&&(this.resetForm("dialogForm"),this.dialogForm.avatar="",this.imageList=[])}}},methods:{handleCreateSubmit:function(){this.handleSubmit("/api/admin/comment/commentFake/insert")},handleSubmit:function(e){var t=this;this.validateForm()&&(this.dialogForm.images=this.imageList.toString(),this.request({url:e,method:"post",data:this.dialogForm}).then((function(e){t.msgResponse(e),setTimeout((function(){t.hideDialog()}),500)})).then((function(){t.$emit("getList")})).catch((function(){})))},validateForm:function(){var e=!1;return this.$refs.dialogForm.validate((function(t){e=t})),e},hideDialog:function(){this.$msgbox.close()}}}),s=l,r=i("2877"),n=Object(r["a"])(s,a,o,!1,null,null,null);t["default"]=n.exports},"3ea3":function(e,t,i){},7200:function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=this,i=t.$createElement,a=t._self._c||i;return a("div",{staticClass:"app-container"},[a("el-form",{directives:[{name:"show",rawName:"v-show",value:t.showSearch,expression:"showSearch"}],ref:"queryForm",attrs:{model:t.queryParams,inline:!0,"label-width":"70px"}},[a("el-form-item",{attrs:{label:"服务品类",prop:"category"}},[a("el-cascader",{attrs:{options:t.categoryList,props:t.categoryProps2,clearable:"","show-all-levels":!1},on:{change:t.handleCategoryChange},model:{value:t.categoryValue,callback:function(e){t.categoryValue=e},expression:"categoryValue"}})],1),a("el-form-item",{attrs:{label:"服务模式",prop:"serviceMode"}},[a("el-select",{staticStyle:{width:"160px"},attrs:{placeholder:"请选择服务模式",clearable:"",size:"small"},on:{change:t.handleQuery},model:{value:t.queryParams.serviceMode,callback:function(e){t.$set(t.queryParams,"serviceMode",e)},expression:"queryParams.serviceMode"}},t._l(t.serviceModes,(function(e){return a("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1),a("el-form-item",{attrs:{label:"状态",prop:"status","label-width":"45px"}},[a("el-select",{staticStyle:{width:"160px"},attrs:{placeholder:"请选择",clearable:"",size:"small"},on:{change:t.handleQuery},model:{value:t.queryParams.status,callback:function(e){t.$set(t.queryParams,"status",e)},expression:"queryParams.status"}},[a("el-option",{attrs:{label:"进行中",value:0}}),a("el-option",{attrs:{label:"待审核",value:1}}),a("el-option",{attrs:{label:"已取消",value:2}}),a("el-option",{attrs:{label:"已拒绝",value:3}})],1)],1),a("el-form-item",{attrs:{label:"店铺名称",prop:"shopName"}},[a("el-input",{staticStyle:{width:"160px"},attrs:{placeholder:"请输入店铺名称",clearable:"",size:"small"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleQuery(e)}},model:{value:t.queryParams.shopName,callback:function(e){t.$set(t.queryParams,"shopName",e)},expression:"queryParams.shopName"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"cyan",icon:"el-icon-search",size:"mini"},on:{click:t.handleQuery}},[t._v("搜索")]),a("el-button",{attrs:{type:"default",icon:"el-icon-refresh",size:"mini"},on:{click:t.resetQuery}},[t._v("重置")]),a("el-button",{attrs:{type:"primary",icon:"el-icon-plus",size:"mini"},on:{click:t.showCreateDialog}},[t._v("添加服务")])],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{data:t.tableData.list,"header-cell-style":{"text-align":"center"},"cell-style":{"text-align":"center"}},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"expand",fixed:"left",label:"",width:"40"},scopedSlots:t._u([{key:"default",fn:function(e){return[null!=e.row.image&&""!=e.row.image?a("el-col",{staticStyle:{"margin-right":"10px","margin-left":"50px"},attrs:{span:t.elColSpan}},[a("el-card",{attrs:{"body-style":{padding:"0px"}}},[a("div",{staticClass:"img-title"},[a("span",[t._v("封面图")])]),a("div",{staticStyle:{display:"flex","justify-content":"center"}},[a("el-image",{staticStyle:{"border-radius":"6px",width:"100%"},attrs:{src:e.row.image,"preview-src-list":[e.row.image],fit:"cover"}})],1)])],1):t._e(),null!=e.row.detailsImage&&""!=e.row.detailsImage?a("span",t._l(e.row.detailsImage.split(","),(function(e,i){return a("el-col",{key:i,staticStyle:{"margin-right":"10px"},attrs:{span:t.elColSpan}},[a("el-card",{attrs:{"body-style":{padding:"0px"}}},[a("div",{staticClass:"img-title"},[a("span",[t._v("详情图"+t._s(i+1))])]),a("div",{staticStyle:{display:"flex","justify-content":"center"}},[a("el-image",{staticStyle:{"border-radius":"6px",width:"100%"},attrs:{src:e,"preview-src-list":[e],fit:"cover"}})],1)])],1)})),1):t._e()]}}])}),a("el-table-column",{attrs:{type:"index",label:"编号",fixed:"left",width:"60",index:function(t){return e.queryParams.pageSize*e.queryParams.pageNum-(e.queryParams.pageSize-t-1)}}}),a("el-table-column",{attrs:{prop:"name",label:"服务名称",fixed:"left",width:"150","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"status",label:"首页推荐",width:"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{attrs:{"active-value":!0,"inactive-value":!1,"active-color":"#13ce66","inactive-color":"#ff4949"},nativeOn:{click:function(i){return t.handleChangeRecommend(e.row)}},model:{value:e.row.isRecommend,callback:function(i){t.$set(e.row,"isRecommend",i)},expression:"scope.row.isRecommend"}})]}}])}),a("el-table-column",{attrs:{prop:"status",label:"状态",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[1===e.row.status?a("span",{staticStyle:{color:"#4f9dec"}},[a("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-edit-outline"},on:{click:function(i){return t.showAuditDialog(e.row)}}},[t._v("待审核 ")])],1):t._e(),3===e.row.status?a("span",{staticStyle:{color:"#4f9dec"}},[t._v("驳回")]):t._e(),e.row.status==t.statusValue_on||e.row.status==t.statusValue_off?a("el-switch",{attrs:{"active-value":t.statusValue_on,"inactive-value":t.statusValue_off,"active-color":"#13ce66","inactive-color":"#ff4949"},on:{change:function(i){return t.handleStatusChange(e.row)}},model:{value:e.row.status,callback:function(i){t.$set(e.row,"status",i)},expression:"scope.row.status"}}):t._e()]}}])}),a("el-table-column",{attrs:{prop:"describes",label:"服务描述",width:"150","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"categoryDef",label:"品类",width:"100","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"serviceMode",label:"模式",width:"100","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"shopShortName",label:"所属店铺",width:"100","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"oldPrice",label:"原价",width:"80"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v("¥ "+t._s(i.oldPrice.toFixed(2)))])]}}])}),a("el-table-column",{attrs:{prop:"price",label:"优惠价",width:"80"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v("¥ "+t._s(i.price.toFixed(2)))])]}}])}),a("el-table-column",{attrs:{prop:"memberPrice",label:"会员价",width:"80"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v("¥ "+t._s(i.memberPrice.toFixed(2)))])]}}])}),a("el-table-column",{attrs:{prop:"unit",label:"单位",width:"80"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.unitNum+i.unit))])]}}])}),a("el-table-column",{attrs:{prop:"minNum",label:"最低时间",width:"80"}}),a("el-table-column",{attrs:{prop:"sort",label:"排序","min-width":"80"}}),a("el-table-column",{attrs:{prop:"salesNum",label:"销量",width:"80"}}),a("el-table-column",{attrs:{prop:"createTime",label:"创建时间",width:"160"}}),a("el-table-column",{attrs:{fixed:"right",label:"操作",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(i){return t.showEditDialog(e.row)}}},[t._v("编辑 ")]),a("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-delete"},on:{click:function(i){return t.handleDelete(e.row)}}},[t._v("删除 ")]),a("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-edit-outline"},on:{click:function(i){return t.showAddCommentFake(e.row)}}},[t._v("添加评论 ")])]}}])})],1),a("el-dialog",{attrs:{title:t.dialogTitle,visible:t.dialogVisible,center:"",customClass:"customWidth"},on:{close:t.onClose,"update:visible":function(e){t.dialogVisible=e}}},[a("el-form",{attrs:{model:t.dialogForm}},[a("el-row",{attrs:{type:"flex",justify:"start"}},[a("el-form-item",{attrs:{label:"主页图:","label-width":t.formLabelWidth}},[a("upload-image",{attrs:{mode:"attachment",boxSize:{width:"100px",height:"100px"},multiple:!1},model:{value:t.dialogForm.image,callback:function(e){t.$set(t.dialogForm,"image",e)},expression:"dialogForm.image"}})],1),a("el-form-item",{attrs:{label:"详情图:","label-width":t.formLabelWidth}},[a("upload-image",{attrs:{mode:"attachment",boxSize:{width:"100px",height:"100px"},multiple:!0},model:{value:t.detailsImageList,callback:function(e){t.detailsImageList=e},expression:"detailsImageList"}})],1)],1),a("el-form-item",{attrs:{label:"服务模式:","label-width":t.formLabelWidth}},[a("el-checkbox-group",{staticStyle:{display:"inline"},on:{change:t.onChangeServiceModeCbx},model:{value:t.serviceModeList,callback:function(e){t.serviceModeList=e},expression:"serviceModeList"}},t._l(t.serviceModes,(function(e,i){return a("el-checkbox",{key:i,staticStyle:{width:"100px"},attrs:{label:e}},[t._v(" "+t._s(e)+" ")])})),1)],1),a("el-form-item",{attrs:{label:"服务品类:",prop:"cateIds","label-width":t.formLabelWidth}},[a("el-cascader",{staticClass:"selWidth",attrs:{options:t.categoryList,props:t.categoryProps,"show-all-levels":!1,placeholder:"请选择服务品类",clearable:""},model:{value:t.dialogForm.cateIds,callback:function(e){t.$set(t.dialogForm,"cateIds",e)},expression:"dialogForm.cateIds"}})],1),a("el-row",{attrs:{type:"flex",justify:"start"}},[a("el-form-item",{attrs:{label:"发布人:","label-width":t.formLabelWidth}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择发布人"},on:{focus:t.showUsersDialog},model:{value:t.userName,callback:function(e){t.userName=e},expression:"userName"}})],1),a("el-form-item",{attrs:{label:"服务名称:","label-width":t.formLabelWidth}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入服务名称"},model:{value:t.dialogForm.name,callback:function(e){t.$set(t.dialogForm,"name",e)},expression:"dialogForm.name"}})],1),a("el-form-item",{attrs:{label:"服务描述:","label-width":t.formLabelWidth}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入服务描述"},model:{value:t.dialogForm.describes,callback:function(e){t.$set(t.dialogForm,"describes",e)},expression:"dialogForm.describes"}})],1)],1),a("el-row",{attrs:{type:"flex",justify:"start"}},[a("el-form-item",{attrs:{label:"发布价格:","label-width":t.formLabelWidth}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"输入发布价格",type:"number",onkeyup:"value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,2})?).*$/g, '$1')"},model:{value:t.dialogForm.oldPrice,callback:function(e){t.$set(t.dialogForm,"oldPrice",e)},expression:"dialogForm.oldPrice"}})],1),a("el-form-item",{attrs:{label:"接单价格:","label-width":t.formLabelWidth}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"输入接单价格",type:"number",onkeyup:"value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,2})?).*$/g, '$1')"},model:{value:t.dialogForm.price,callback:function(e){t.$set(t.dialogForm,"price",e)},expression:"dialogForm.price"}})],1),a("el-form-item",{attrs:{label:"会员价格:","label-width":t.formLabelWidth}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"输入发布价格",type:"number",onkeyup:"value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,2})?).*$/g, '$1')"},model:{value:t.dialogForm.memberPrice,callback:function(e){t.$set(t.dialogForm,"memberPrice",e)},expression:"dialogForm.memberPrice"}})],1)],1),a("el-row",{attrs:{type:"flex",justify:"start"}},[a("el-form-item",{attrs:{label:"最低单位:","label-width":t.formLabelWidth}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入最低单位",type:"number",min:"1",onkeyup:"value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,2})?).*$/g, '$1')"},model:{value:t.dialogForm.minNum,callback:function(e){t.$set(t.dialogForm,"minNum",e)},expression:"dialogForm.minNum"}})],1),a("el-form-item",{attrs:{label:"单位:","label-width":t.formLabelWidth}},[a("el-radio-group",{model:{value:t.dialogForm.unit,callback:function(e){t.$set(t.dialogForm,"unit",e)},expression:"dialogForm.unit"}},[a("el-radio",{attrs:{label:"小时"}},[t._v("小时")]),a("el-radio",{attrs:{label:"分钟"}},[t._v("分钟")])],1)],1),a("el-form-item",{staticStyle:{"margin-left":"55px"},attrs:{label:"单位数量:","label-width":t.formLabelWidth}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入单位数量",type:"number",min:"10",onkeyup:"value=value.replace(/^\\D*(\\d*(?:\\.\\d{0,2})?).*$/g, '$1')"},model:{value:t.dialogForm.unitNum,callback:function(e){t.$set(t.dialogForm,"unitNum",e)},expression:"dialogForm.unitNum"}})],1)],1),a("el-row",{attrs:{type:"flex",justify:"start"}},[a("el-form-item",{staticStyle:{width:"40%"},attrs:{label:"服务地区:","label-width":t.formLabelWidth}},[a("el-cascader",{staticStyle:{width:"100%"},attrs:{size:"large",options:t.regionData,placeholder:t.storeAddre,value:t.storeAddre},on:{change:t.handleAddressChange},model:{value:t.storeAddress,callback:function(e){t.storeAddress=e},expression:"storeAddress"}})],1),a("el-form-item",{staticStyle:{width:"50%"},attrs:{label:"详细地址:","label-width":t.formLabelWidth}},[a("el-input",{attrs:{placeholder:"请输入详细地址",clearable:""},nativeOn:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.setLocation(e)}},model:{value:t.dialogForm.detailsAddress,callback:function(e){t.$set(t.dialogForm,"detailsAddress",e)},expression:"dialogForm.detailsAddress"}})],1),a("el-form-item",{attrs:{label:"","label-width":"10px"}},[a("svg-icon",{staticStyle:{"font-size":"30px"},attrs:{"icon-class":"icon-dangdifill"}})],1)],1),a("el-row",{attrs:{type:"flex",justify:"start"}},[a("el-form-item",{attrs:{label:"优惠券:","label-width":t.formLabelWidth}},[a("div",{},[t._l(t.dialogForm.coupons,(function(e,i){return a("el-tag",{key:i,staticClass:"mr10 mb10",attrs:{closable:!0},on:{close:function(i){return t.handleCloseCoupon(e)}}},[t._v(t._s(e.name)+" ")])})),null==t.dialogForm.coupons||0===t.dialogForm.coupons.length?a("span",[t._v("暂无优惠券")]):t._e(),a("el-button",{staticClass:"ml0",attrs:{type:"primary",size:"mini"},on:{click:t.addCoupon}},[t._v("选择优惠券")])],2)])],1)],1),a("div",{staticStyle:{width:"100%"}},[t.mapVisible?a("div",{staticStyle:{width:"90%",height:"500px",border:"1px dashed #cccccc",margin:"0 auto","text-align":"center"},attrs:{id:"mapContainer"}}):t._e()]),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:t.hideDialog}},[t._v("取 消")]),t.dialogEditVisible?a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.handleEditSubmit()}}},[t._v("确 定")]):t._e(),t.dialogCreateVisible?a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.handleCreateSubmit()}}},[t._v("确 定")]):t._e()],1)],1),a("el-dialog",{staticStyle:{"margin-top":"200px"},attrs:{title:"服务审核",visible:t.dialogAuditVisible,center:""},on:{"update:visible":function(e){t.dialogAuditVisible=e}}},[a("el-form",{attrs:{model:t.auditForm}},[a("el-form-item",{attrs:{label:"审核类型:","label-width":t.formLabelWidth2}},[a("el-radio-group",{staticStyle:{width:"65%"},model:{value:t.auditForm.status,callback:function(e){t.$set(t.auditForm,"status",e)},expression:"auditForm.status"}},[a("el-radio",{attrs:{label:0}},[t._v("通过")]),a("el-radio",{attrs:{label:3}},[t._v("驳回")])],1)],1),a("el-form-item",{attrs:{label:"审核理由:","label-width":t.formLabelWidth2}},[a("el-input",{staticStyle:{width:"65%"},attrs:{type:"text",placeholder:"请输入审核理由"},model:{value:t.auditForm.auditContent,callback:function(e){t.$set(t.auditForm,"auditContent",e)},expression:"auditForm.auditContent"}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:t.hideDialog}},[t._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.handleAuditSubmit()}}},[t._v("确 定")])],1)],1),a("el-dialog",{attrs:{title:"用户列表",visible:t.dialogUsersVisible,center:""},on:{"update:visible":function(e){t.dialogUsersVisible=e}}},[a("el-form",{ref:"usersForm",attrs:{model:t.userParams,inline:!0}},[a("el-form-item",{attrs:{label:"手机号",prop:"phone"}},[a("el-input",{attrs:{placeholder:"请输入用户名称",clearable:"",size:"small"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleUsersQuery(e)}},model:{value:t.userParams.phone,callback:function(e){t.$set(t.userParams,"phone",e)},expression:"userParams.phone"}})],1),a("el-form-item",{attrs:{label:"用户名称",prop:"userName"}},[a("el-input",{attrs:{placeholder:"请输入用户名称",clearable:"",size:"small"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleUsersQuery(e)}},model:{value:t.userParams.userName,callback:function(e){t.$set(t.userParams,"userName",e)},expression:"userParams.userName"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"cyan",icon:"el-icon-search",size:"mini"},on:{click:t.handleUsersQuery}},[t._v("搜索")]),a("el-button",{attrs:{type:"default",icon:"el-icon-refresh",size:"mini"},on:{click:t.resetUsersQuery}},[t._v("重置")])],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{data:t.userData.list,"header-cell-style":{"text-align":"center"},"cell-style":{"text-align":"center"}},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{prop:"avatar",label:"头像",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-avatar",{attrs:{src:e.row.avatar,shape:"square",size:"medium"}})]}}])}),a("el-table-column",{attrs:{prop:"shopShortName",label:"店铺名称","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"userName",label:"用户名","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"phone",label:"手机号"}}),a("el-table-column",{attrs:{fixed:"right",label:"操作",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-user"},on:{click:function(i){return t.handleUserSelect(e.row)}}},[t._v("选择 ")])]}}])})],1),a("pagination",{directives:[{name:"show",rawName:"v-show",value:t.userData.total,expression:"userData.total"}],attrs:{total:t.userData.total,page:t.userParams.pageNum,limit:t.userParams.pageSize,"page-sizes":[5,10,20,30,40]},on:{"update:page":function(e){return t.$set(t.userParams,"pageNum",e)},"update:limit":function(e){return t.$set(t.userParams,"pageSize",e)},pagination:t.getUserList}})],1),a("pagination",{directives:[{name:"show",rawName:"v-show",value:t.tableData.total,expression:"tableData.total"}],attrs:{total:t.tableData.total,page:t.queryParams.pageNum,limit:t.queryParams.pageSize},on:{"update:page":function(e){return t.$set(t.queryParams,"pageNum",e)},"update:limit":function(e){return t.$set(t.queryParams,"pageSize",e)},pagination:t.getList}})],1)},o=[],l=(i("a15b"),i("d81d"),i("14d9"),i("a434"),i("b0c0"),i("d3b7"),i("25f0"),i("0643"),i("a573"),i("ef6c"));function s(e,t,i){void 0===i&&(i="[]"),e=e.replace(/=/g,"");var a=[];if(null==t)return a;switch(t.constructor){case String:case Number:case Boolean:a.push(encodeURIComponent(e)+"="+encodeURIComponent(t));break;case Array:t.forEach((function(t){a=a.concat(s(""+e+i+"=",t,i))}));break;case Object:Object.keys(t).forEach((function(o){var l=t[o];a=a.concat(s(e+"["+o+"]",l,i))}))}return a}function r(e){var t=[];return e.forEach((function(e){"string"==typeof e?t.push(e):t=t.concat(r(e))})),t}
- /**
- * Vue Jsonp.
- * # Carry Your World #
- *
- * @author: LancerComet
- * @license: MIT
- */function n(e,t,i){var a;if(void 0===t&&(t={}),"string"!=typeof e)throw new Error('[Vue-jsonp] Type of param "url" is not string.');if("object"!=typeof t||!t)throw new Error("[Vue-jsonp] Invalid params, should be an object.");var o="number"==typeof i?i:null!==(a=null==i?void 0:i.timeout)&&void 0!==a?a:5e3,l="[]";if("object"==typeof i){var n=i.arrayIndicator;"string"==typeof n&&(l=n)}return new Promise((function(i,a){var n="string"==typeof t.callbackQuery?t.callbackQuery:"callback",d="string"==typeof t.callbackName?t.callbackName:"jsonp_"+(Math.floor(1e5*Math.random())*Date.now()).toString(16);t[n]=d,delete t.callbackQuery,delete t.callbackName;var c=[];Object.keys(t).forEach((function(e){c=c.concat(s(e,t[e],l))}));var u=r(c).join("&"),m=function(){p(),clearTimeout(g),a({status:400,statusText:"Bad Request"})},p=function(){f.removeEventListener("error",m)},h=function(){document.body.removeChild(f),delete window[d]},g=null;o>-1&&(g=setTimeout((function(){p(),h(),a({statusText:"Request Timeout",status:408})}),o)),window[d]=function(e){clearTimeout(g),p(),h(),i(e)};var f=document.createElement("script");f.addEventListener("error",m),f.src=e+(/\?/.test(e)?"&":"?")+u,document.body.appendChild(f)}))}var d=i("1480"),c=[],u={name:"productCenter",components:{commentFakeForm:d["default"]},data:function(){return{loading:!1,ids:[],single:!0,multiple:!0,showSearch:!0,queryParams:{pageNum:1,pageSize:10,category:"",serviceMode:"",status:"",shopName:""},tableData:{list:[],total:0},categoryValue:"",categoryList:[],categoryProps:{children:"children",label:"name",value:"id",expandTrigger:"hover",multiple:!0,emitPath:!1},categoryProps2:{children:"children",label:"name",value:"id",expandTrigger:"hover",multiple:!1,emitPath:!1},statusValue_on:0,statusValue_off:2,dialogVisible:!1,dialogEditVisible:!1,dialogCreateVisible:!1,dialogTitle:"添加分类",formLabelWidth:"100px",dialogForm:{id:"",cateIds:[],cateId:"",serviceMode:"",shopId:"",name:"",price:"",memberPrice:"",oldPrice:"",image:"",detailsImage:"",userId:"",longitude:"",latitude:"",unit:"分钟",unitNum:"10",minNum:"",province:"",city:"",district:"",detailsAddress:"",describes:"",couponIds:[],coupons:[]},userName:"",longitude:"",latitude:"",mapVisible:!1,storeAddress:[],storeAddre:"请选择城市",regionData:l["regionData"],serviceModes:["上门","到店"],serviceModeList:[],detailsImageList:[],formLabelWidth2:"200px",dialogAuditVisible:!1,auditForm:{id:"",status:"",auditContent:""},userData:{list:[],total:0},userParams:{pageNum:1,pageSize:5,phone:"",userName:""},dialogUsersVisible:!1,elColSpan:3,keyNum:0}},mounted:function(){this.getCategoryList(),this.getList()},methods:{handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.categoryValue="",this.resetForm("queryForm"),this.handleQuery()},handleSelectionChange:function(e){this.ids=e.map((function(e){return e.id})),this.multiple=!e.length,this.single=1!=e.length},getList:function(){var e=this;this.loading=!0,this.request({url:"/api/admin/product/list",method:"get",params:this.queryParams}).then((function(t){e.loading=!1,200===t.code&&(e.tableData.list=t.rows,e.tableData.total=t.total)})).catch((function(){e.loading=!1}))},handleStatusChange:function(e){var t=this;this.$confirm("确定修改状态?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.request({url:"/api/admin/product/changeStatus",method:"post",params:{id:e.id,status:e.status}}).then((function(e){t.msgResponse(e)}))})).catch((function(){e.status=e.status==t.statusValue_on?t.statusValue_off:t.statusValue_on}))},handleChangeRecommend:function(e){var t=this;this.$confirm("确定修改首页推荐状态?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.request({url:"/api/admin/product/changeRecommend",method:"post",params:{id:e.id,isRecommend:e.isRecommend}}).then((function(e){t.msgResponse(e)}))})).catch((function(){e.isRecommend=!e.isRecommend}))},handleDelete:function(e){var t=this;this.$confirm("确定删除此条信息?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){return t.request({url:"/api/admin/product/fDelete",method:"post",params:{id:e.id}}).then((function(e){t.msgResponse(e)}))})).then((function(){t.handleQuery()})).catch((function(){}))},showCreateDialog:function(){for(var e in this.dialogForm)this.dialogForm[e]="";this.userName="",this.dialogForm.unit="分钟",this.dialogForm.unitNum="10",this.dialogForm.coupons=[],this.dialogForm.couponIds=[],this.detailsImageList=[],this.serviceModeList=[],this.storeAddress=[],this.storeAddre="请选择城市",this.dialogTitle="添加服务",this.dialogVisible=!0,this.dialogCreateVisible=!0,this.mapVisible&&this.getMyLocation()},showEditDialog:function(e){for(var t in this.dialogForm)this.dialogForm[t]=e[t];this.userName=e.userName,""!=this.dialogForm.detailsImage&&null!=this.dialogForm.detailsImage&&(this.detailsImageList=this.dialogForm.detailsImage.split(",")),this.dialogForm.cateIds=e.cateId.split(","),this.serviceModeList=this.dialogForm.serviceMode.split(","),this.storeAddress=[],this.storeAddre="",this.isEmpty(this.dialogForm.province)||(this.storeAddre+=this.dialogForm.province,this.storeAddre+="/"),this.isEmpty(this.dialogForm.city)||(this.storeAddre+=this.dialogForm.city,this.storeAddre+="/"),this.isEmpty(this.dialogForm.district)||(this.storeAddre+=this.dialogForm.district),this.dialogTitle="编辑服务",this.dialogVisible=!0,this.dialogEditVisible=!0,this.mapVisible&&this.getMyLocation(),this.getCouponProducts(e.id)},handleCreateSubmit:function(){this.handleSubmit("/api/admin/product/insert")},handleEditSubmit:function(){this.handleSubmit("/api/admin/product/update")},handleSubmit:function(e){var t=this;if(this.validateForm())return this.dialogForm.detailsImage=this.detailsImageList.toString(),this.dialogForm.cateId=this.dialogForm.cateIds.join(","),this.request({url:e,method:"post",data:this.dialogForm}).then((function(e){t.msgResponse(e),setTimeout((function(){t.hideDialog()}),500)})).then((function(){t.handleQuery()})).catch((function(){}))},validateForm:function(){return 0===this.dialogForm.cateIds.length?(this.$notify({title:"提示",duration:1800,type:"warning",message:"请选择服务分类"}),!1):this.isEmpty(this.dialogForm.serviceMode)?(this.$notify({title:"提示",duration:1800,type:"warning",message:"请选择服务模式"}),!1):this.isEmpty(this.dialogForm.image)?(this.$notify({title:"提示",duration:1800,type:"warning",message:"请上传服务封面图"}),!1):this.isEmpty(this.dialogForm.userId)?(this.$notify({title:"提示",duration:1800,type:"warning",message:"请选择发布人"}),!1):this.isEmpty(this.dialogForm.name)?(this.$notify({title:"提示",duration:1800,type:"warning",message:"请输入服务名称"}),!1):this.isEmpty(this.dialogForm.oldPrice)?(this.$notify({title:"提示",duration:1800,type:"warning",message:"请输入发布价格"}),!1):this.isEmpty(this.dialogForm.price)?(this.$notify({title:"提示",duration:1800,type:"warning",message:"请输入接单价格"}),!1):this.isEmpty(this.dialogForm.memberPrice)?(this.$notify({title:"提示",duration:1800,type:"warning",message:"请输入会员价格"}),!1):this.isEmpty(this.dialogForm.minNum)?(this.$notify({title:"提示",duration:1800,type:"warning",message:"请输入最低服务时间"}),!1):this.isEmpty(this.dialogForm.unitNum)?(this.$notify({title:"提示",duration:1800,type:"warning",message:"请输入单位数量"}),!1):(this.isEmpty(this.dialogForm.city),!0)},hideDialog:function(){this.onClose()},onClose:function(){this.dialogVisible=!1,this.dialogEditVisible=!1,this.dialogCreateVisible=!1,this.dialogAuditVisible=!1},delImage:function(e){this.detailsImageList.splice(e,1)},getCategoryList:function(){var e=this;this.request({url:"/api/admin/category/list",method:"get",params:{type:1,status:1,pid:0}}).then((function(t){200===t.code&&(e.categoryList=t.rows.map((function(e){return{id:e.id,name:e.name,children:e.children&&0!==e.children.length?e.children.map((function(e){return{id:e.id,name:e.name}})):null}})))})).catch((function(){e.loading=!1}))},onChangeServiceModeCbx:function(e){this.serviceModeList=e,this.dialogForm.serviceMode=e.toString()},handleAddressChange:function(e){this.dialogForm.province=l["CodeToText"][e[0]],this.dialogForm.city=l["CodeToText"][e[1]],this.dialogForm.district=l["CodeToText"][e[2]],"市辖区"==this.dialogForm.city&&(this.dialogForm.city=this.dialogForm.province,this.dialogForm.province=""),this.mapVisible?(this.dialogForm.detailsAddress="",this.setLocation()):this.dialogForm.detailsAddress=this.dialogForm.province+this.dialogForm.city+this.dialogForm.district},getMyLocation:function(){var e=new qq.maps.Geolocation("SCKBZ-KKHCD-UWB44-PBBCW-7KO4F-WLFZ4","同城上门服务系统");e.getIpLocation(this.showPosition,this.showErr)},showPosition:function(e){console.log(e),this.latitude=e.lat,this.longitude=e.lng,this.setMap()},showErr:function(e){console.log("定位失败",e),this.getMyLocation()},setMap:function(){var e=new qq.maps.LatLng(this.dialogForm.latitude,this.dialogForm.longitude),t={zoom:13,center:e,mapTypeId:qq.maps.MapTypeId.ROADMAP},i=new qq.maps.Map(document.getElementById("mapContainer"),t),a=new qq.maps.Marker({position:e,map:i}),o=this;if(o.dialogForm.longitude)l=new qq.maps.LatLng(o.dialogForm.latitude,o.dialogForm.longitude);else var l=new qq.maps.LatLng(o.latitude,o.longitude);i=new qq.maps.Map(document.getElementById("mapContainer"),{center:l,zoom:13}),a=new qq.maps.Marker({position:l,map:i}),new qq.maps.LatLngBounds;qq.maps.event.addListener(i,"click",(function(e){if(console.log(e,qq.maps),o.dialogForm.longitude=e.latLng.getLng(),o.dialogForm.latitude=e.latLng.getLat(),n("https://apis.map.qq.com/ws/geocoder/v1/?location="+e.latLng.getLat()+","+e.latLng.getLng()+"&key=SCKBZ-KKHCD-UWB44-PBBCW-7KO4F-WLFZ4&get_poi=1&output=jsonp",{myCustomUrlParam:"veryNice"}).then((function(e){console.log("response",e,e.result.address_component.city),o.dialogForm.detailsAddress=e.result.address,o.dialogForm.city=e.result.address_component.city})).catch((function(e){})).then((function(){})),c)for(var t in c)c[t].setMap(null);a?a.setPosition(e.latLng):a=new qq.maps.Marker({map:i,position:e.latLng})})),new qq.maps.Geocoder({complete:function(e){console.log(e),o.dialogForm.longitude=e.detail.location.lng,o.dialogForm.latitude=e.detail.location.lat,i.setCenter(e.detail.location);var t=new qq.maps.Marker({map:i,position:e.detail.location});c.push(t)}})},setLocation:function(){var e=this;if(this.mapVisible){var t=this.dialogForm.province+this.dialogForm.city+this.dialogForm.district+this.dialogForm.detailsAddress,i=this;n("https://apis.map.qq.com/ws/geocoder/v1/?address=="+t+"&key=SCKBZ-KKHCD-UWB44-PBBCW-7KO4F-WLFZ4&get_poi=1&output=jsonp",{myCustomUrlParam:"veryNice"}).then((function(t){"查询无结果"!=t.message?(i.dialogForm.longitude=t.result.location.lng,i.dialogForm.latitude=t.result.location.lat,i.dialogForm.city=t.result.address_components.city,i.dialogForm.detailsAddress=t.result.address_components.province+t.result.address_components.city+t.result.address_components.district+t.result.title,i.setMap()):e.$notify({title:"提示",duration:1800,message:"详细地址输入有误,请重新输入",type:"warning"})})).catch((function(e){})).then((function(){}))}},showAuditDialog:function(e){this.auditForm.id=e.id,this.auditForm.status=0,this.auditForm.auditContent="",this.dialogAuditVisible=!0},handleAuditSubmit:function(){var e=this;3!=this.auditForm.status||""!=this.auditForm.auditContent?this.request({url:"/api/admin/product/audit",method:"get",params:this.auditForm}).then((function(t){e.msgResponse(t),setTimeout((function(){e.hideDialog()}),500)})).then((function(){e.handleQuery()})).catch((function(){})):this.$notify({title:"提示",duration:1800,type:"warning",message:"请输入驳回理由"})},showUsersDialog:function(){this.handleUsersQuery(),this.dialogUsersVisible=!0},handleUserSelect:function(e){this.userName=e.userName,this.dialogForm.userId=e.userId,this.dialogForm.shopId=e.shopId,this.dialogUsersVisible=!1},getUserList:function(){var e=this;this.loading=!0,this.request({url:"/api/admin/shop/userShop/listSimple",method:"get",params:this.userParams}).then((function(t){e.loading=!1,200===t.code&&(e.userData.list=t.rows,e.userData.total=t.total,console.log(t.rows))})).catch((function(){e.loading=!1}))},handleUsersQuery:function(){this.userParams.pageNum=1,this.getUserList()},resetUsersQuery:function(){this.resetForm("usersForm"),this.handleUsersQuery()},getCouponProducts:function(e){var t=this;this.dialogForm.coupons=[],this.dialogForm.couponIds=[],this.request({url:"/api/admin/coupon/product/list",method:"get",params:{productId:e}}).then((function(e){200===e.code&&(t.dialogForm.coupons=e.rows.map((function(e){return t.dialogForm.couponIds.push(e.id),{id:e.id,name:e.name}})))})).catch((function(){}))},handleCloseCoupon:function(e){this.dialogForm.coupons.splice(this.dialogForm.coupons.indexOf(e),1),this.dialogForm.couponIds.splice(this.dialogForm.couponIds.indexOf(e.id),1)},addCoupon:function(){var e=this;this.$modalCouponList((function(t){e.dialogForm.coupons=[],e.dialogForm.couponIds=[],e.dialogForm.coupons=t.map((function(t){return e.dialogForm.couponIds.push(t.id),{id:t.id,name:t.name}}))}),!0,e.dialogForm.coupons)},handleCategoryChange:function(e){var t=null;for(var i in this.categoryList)if(this.categoryList[i].id===e){t=this.categoryList[i];break}t&&(this.queryParams.category=t.name,this.handleQuery())},showAddCommentFake:function(e){var t=this,i=this.$createElement;this.$msgbox({title:"添加虚拟评论",customClass:"comment-form-size",closeOnClickModal:!1,center:!0,showClose:!0,message:i("div",{class:""},[i("commentFakeForm",{props:{currentRow:e,keyNum:++t.keyNum},on:{getList:function(){}}})]),showCancelButton:!1,showConfirmButton:!1}).then((function(){})).catch((function(){}))}}},m=u,p=(i("a5e3"),i("2877")),h=Object(p["a"])(m,a,o,!1,null,null,null);t["default"]=h.exports},a5e3:function(e,t,i){"use strict";i("3ea3")}}]);
|