vL39.12c5fdd5.js 11 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["vL39"],{vL39:function(e,t,a){"use strict";a.r(t);var n=a("QbLZ"),r=a.n(n),o=a("t3Un");var l={data:function(){return{loading:!0,ids:[],single:!0,multiple:!0,total:0,memberInfoList:[],title:"",open:!1,queryParams:{pageNum:1,pageSize:10,companyId:void 0,name:void 0,phone:void 0,sex:void 0,stars:void 0,starsProject:void 0,cancellations:void 0,balance:void 0,remarks:void 0,deleteFlag:void 0,gmtCreate:void 0,gmtUpdate:void 0,userId:void 0,adminId:void 0},form:{},rules:{}}},created:function(){this.getList()},methods:{getList:function(){var e=this;this.loading=!0,function(e){return Object(o.a)({method:"get",params:r()({_gp:"admin.unimall.sunMemberInfo",_mt:"list"},e)})}(this.queryParams).then(function(t){e.memberInfoList=t.data.data.items,e.total=t.data.data.count,e.loading=!1})},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={id:void 0,companyId:void 0,name:void 0,phone:void 0,sex:void 0,stars:void 0,starsProject:void 0,cancellations:void 0,balance:void 0,remarks:void 0,remark:void 0,deleteFlag:void 0,gmtCreate:void 0,gmtUpdate:void 0,userId:void 0,adminId:void 0},this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleSelectionChange:function(e){this.ids=e.map(function(e){return e.id}),this.single=1!=e.length,this.multiple=!e.length},handleAdd:function(){this.reset(),this.open=!0,this.title="添加会员信息"},handleUpdate:function(e){var t=this;this.reset(),function(e){return Object(o.a)({method:"get",params:{_gp:"admin.unimall.sunMemberInfo",_mt:"get",id:e}})}(e.id||this.ids.join(",")).then(function(e){t.form=e.data.data,t.open=!0,t.title="修改会员信息"})},submitForm:function(){var e=this;this.$refs.form.validate(function(t){t&&(void 0!=e.form.id?function(e){return Object(o.a)({method:"post",params:{_gp:"admin.unimall.sunMemberInfo",_mt:"update",sunMemberInfo:e}})}(e.form).then(function(t){t.data?(e.msgSuccess("修改成功"),e.open=!1,e.getList()):e.msgError(t.msg)}):function(e){return Object(o.a)({method:"post",params:{_gp:"admin.unimall.sunMemberInfo",_mt:"add",sunMemberInfo:e}})}(e.form).then(function(t){t.data?(e.msgSuccess("新增成功"),e.open=!1,e.getList()):e.msgError(t.msg)}))})},handleDelete:function(e){var t=this,a=e.id||this.ids.join(",");this.$confirm('是否确认删除会员信息编号为"'+a+'"的数据项?',"警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){return function(e){return Object(o.a)({method:"post",params:{_gp:"admin.unimall.sunMemberInfo",_mt:"delete",id:e}})}(a)}).then(function(){t.getList(),t.msgSuccess("删除成功")}).catch(function(){})},handleExport:function(){var e=this,t=this.queryParams;this.$confirm("是否确认导出所有会员信息数据项?","警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){return function(e){return Object(o.a)({method:"get",params:r()({_gp:"admin.unimall.sunMemberInfo",_mt:"export"},e)})}(t)}).then(function(t){e.download(t.data.data)}).catch(function(){})}}},i=a("KHd+"),s=Object(i.a)(l,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("el-form",{ref:"queryForm",attrs:{model:e.queryParams,inline:!0,"label-width":"68px"}},[a("el-form-item",{attrs:{label:"姓名",prop:"name"}},[a("el-input",{attrs:{placeholder:"请输入姓名",clearable:"",size:"small"},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.handleQuery(t):null}},model:{value:e.queryParams.name,callback:function(t){e.$set(e.queryParams,"name",t)},expression:"queryParams.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"手机号",prop:"phone"}},[a("el-input",{attrs:{placeholder:"请输入手机号",clearable:"",size:"small"},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.handleQuery(t):null}},model:{value:e.queryParams.phone,callback:function(t){e.$set(e.queryParams,"phone",t)},expression:"queryParams.phone"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"服务类型",prop:"stars"}},[a("el-input",{attrs:{placeholder:"请输入服务类型",clearable:"",size:"small"},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.handleQuery(t):null}},model:{value:e.queryParams.stars,callback:function(t){e.$set(e.queryParams,"stars",t)},expression:"queryParams.stars"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"服务项目",prop:"starsProject"}},[a("el-input",{attrs:{placeholder:"请输入服务项目",clearable:"",size:"small"},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.handleQuery(t):null}},model:{value:e.queryParams.starsProject,callback:function(t){e.$set(e.queryParams,"starsProject",t)},expression:"queryParams.starsProject"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),e._v(" "),a("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),e._v(" "),a("el-row",{staticClass:"mb8",attrs:{gutter:10}},[a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["unimall:memberInfo:add"],expression:"['unimall:memberInfo:add']"}],attrs:{type:"primary",icon:"el-icon-plus",size:"mini"},on:{click:e.handleAdd}},[e._v("新增")])],1),e._v(" "),a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["unimall:memberInfo:edit"],expression:"['unimall:memberInfo:edit']"}],attrs:{type:"success",icon:"el-icon-edit",size:"mini",disabled:e.single},on:{click:e.handleUpdate}},[e._v("修改")])],1),e._v(" "),a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["unimall:memberInfo:remove"],expression:"['unimall:memberInfo:remove']"}],attrs:{type:"danger",icon:"el-icon-delete",size:"mini",disabled:e.multiple},on:{click:e.handleDelete}},[e._v("删除")])],1),e._v(" "),a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["unimall:memberInfo:export"],expression:"['unimall:memberInfo:export']"}],attrs:{type:"warning",icon:"el-icon-download",size:"mini"},on:{click:e.handleExport}},[e._v("导出")])],1)],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.memberInfoList},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"姓名",align:"center",prop:"name"}}),e._v(" "),a("el-table-column",{attrs:{label:"手机号",align:"center",prop:"phone"}}),e._v(" "),a("el-table-column",{attrs:{label:"服务类型",align:"center",prop:"stars"}}),e._v(" "),a("el-table-column",{attrs:{label:"服务项目",align:"center",prop:"starsProject"}}),e._v(" "),a("el-table-column",{attrs:{label:"剩余服务次数",align:"center",prop:"cancellations"}}),e._v(" "),a("el-table-column",{attrs:{label:"余额",align:"center",prop:"balance"}}),e._v(" "),a("el-table-column",{attrs:{label:"备注1",align:"center",prop:"remarks"}}),e._v(" "),a("el-table-column",{attrs:{label:"备注2",align:"center",prop:"remark"}}),e._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["unimall:memberInfo:edit"],expression:"['unimall:memberInfo:edit']"}],attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(a){e.handleUpdate(t.row)}}},[e._v("修改")]),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["unimall:memberInfo:remove"],expression:"['unimall:memberInfo:remove']"}],attrs:{size:"mini",type:"text",icon:"el-icon-delete"},on:{click:function(a){e.handleDelete(t.row)}}},[e._v("删除")])]}}])})],1),e._v(" "),a("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}}),e._v(" "),a("el-dialog",{attrs:{title:e.title,visible:e.open,width:"500px"},on:{"update:visible":function(t){e.open=t}}},[a("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"80px"}},[a("el-form-item",{attrs:{label:"姓名",prop:"name"}},[a("el-input",{attrs:{placeholder:"请输入姓名"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"手机号",prop:"phone"}},[a("el-input",{attrs:{placeholder:"请输入手机号"},model:{value:e.form.phone,callback:function(t){e.$set(e.form,"phone",t)},expression:"form.phone"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"服务类型",prop:"stars"}},[a("el-input",{attrs:{placeholder:"请输入服务类型"},model:{value:e.form.stars,callback:function(t){e.$set(e.form,"stars",t)},expression:"form.stars"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"服务项目",prop:"starsProject"}},[a("el-input",{attrs:{placeholder:"请输入服务项目"},model:{value:e.form.starsProject,callback:function(t){e.$set(e.form,"starsProject",t)},expression:"form.starsProject"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"服务次数",prop:"cancellations"}},[a("el-input",{attrs:{placeholder:"请输入剩余服务次数"},model:{value:e.form.cancellations,callback:function(t){e.$set(e.form,"cancellations",t)},expression:"form.cancellations"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"余额",prop:"balance"}},[a("el-input",{attrs:{placeholder:"请输入余额"},model:{value:e.form.balance,callback:function(t){e.$set(e.form,"balance",t)},expression:"form.balance"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"备注1",prop:"remarks"}},[a("el-input",{attrs:{type:"textarea",placeholder:"请输入内容"},model:{value:e.form.remarks,callback:function(t){e.$set(e.form,"remarks",t)},expression:"form.remarks"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"备注2",prop:"remark"}},[a("el-input",{attrs:{type:"textarea",placeholder:"请输入内容"},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确 定")]),e._v(" "),a("el-button",{on:{click:e.cancel}},[e._v("取 消")])],1)],1)],1)},[],!1,null,null,null);s.options.__file="index.vue";t.default=s.exports}}]);