1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-833d"],{cWMS:function(e,t,a){"use strict";a.d(t,"f",function(){return i}),a.d(t,"e",function(){return l}),a.d(t,"a",function(){return m}),a.d(t,"b",function(){return s}),a.d(t,"g",function(){return c}),a.d(t,"c",function(){return u}),a.d(t,"d",function(){return d});var n=a("QbLZ"),r=a.n(n),o=a("t3Un");function i(e){return Object(o.a)({method:"get",params:r()({_gp:"admin.unimall.memberManagement",_mt:"list"},e)})}function l(e){return Object(o.a)({method:"get",params:{_gp:"admin.unimall.memberManagement",_mt:"get",id:e}})}function m(e){return Object(o.a)({method:"post",params:{_gp:"admin.unimall.memberManagement",_mt:"add",memberManagement:e}})}function s(e){return Object(o.a)({method:"post",params:{_gp:"admin.unimall.memberManagement",_mt:"chongzhi",memberManagement:e}})}function c(e){return Object(o.a)({method:"post",params:{_gp:"admin.unimall.memberManagement",_mt:"update",memberManagement:e}})}function u(e){return Object(o.a)({method:"post",params:{_gp:"admin.unimall.memberManagement",_mt:"delete",id:e}})}function d(e){return Object(o.a)({method:"get",params:r()({_gp:"admin.unimall.memberManagement",_mt:"export"},e)})}},e7Nh:function(e,t,a){"use strict";a.r(t);var n=a("cWMS"),r={data:function(){return{loading:!0,ids:[],single:!0,multiple:!0,total:0,managementList:[],title:"",open:!1,queryParams:{pageNum:1,pageSize:10,companyId:void 0,userName:void 0,phone:void 0,cartName:void 0,cartNo:void 0,cartEndTime:void 0,money:void 0,cartTime:void 0,leiChong:void 0,leiXiao:void 0,status:void 0,remark1:void 0,remark2:void 0,remark3:void 0,deleteFlag:void 0,gmtCreate:void 0,gmtUpdate:void 0,userId:void 0,adminId:void 0},form:{},rules:{deleteFlag:[{required:!0,message:"0:否(默认) 1:是不能为空",trigger:"blur"}]}}},created:function(){this.getList()},methods:{getSummaries:function(e){var t=e.columns,a=e.data,n=[];return t.forEach(function(e,t){if(0!==t){if(6==t){var r=a.map(function(t){return Number(t[e.property])});r.every(function(e){return isNaN(e)})?n[t]="N/A":(n[t]=r.reduce(function(e,t){var a=Number(t);return isNaN(a)?e:e+t},0),n[t]+=" 元")}}else n[t]="总价"}),n},getList:function(){var e=this;this.loading=!0,Object(n.f)(this.queryParams).then(function(t){e.managementList=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,userName:void 0,phone:void 0,cartName:void 0,cartNo:void 0,cartEndTime:void 0,money:void 0,cartTime:void 0,leiChong:void 0,leiXiao:void 0,status:"0",remark1:void 0,remark2:void 0,remark3: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();var a=e.id||this.ids.join(",");Object(n.e)(a).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?Object(n.g)(e.form).then(function(t){t.data?(e.msgSuccess("修改成功"),e.open=!1,e.getList()):e.msgError(t.msg)}):Object(n.a)(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 Object(n.c)(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 Object(n.d)(t)}).then(function(t){e.download(t.data.data)}).catch(function(){})}}},o=a("KHd+"),i=Object(o.a)(r,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.managementList,"summary-method":e.getSummaries,"show-summary":""},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"100",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"姓名",align:"center",prop:"userName"}}),e._v(" "),a("el-table-column",{attrs:{label:"手机号",align:"center",prop:"phone"}}),e._v(" "),a("el-table-column",{attrs:{label:"卡名称",align:"center",prop:"cartName"}}),e._v(" "),a("el-table-column",{attrs:{label:"卡号",align:"center",prop:"cartNo"}}),e._v(" "),a("el-table-column",{attrs:{label:"卡到期时间",align:"center",prop:"cartEndTime",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e.parseTime(t.row.cartEndTime)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"金额",align:"center",prop:"money"}}),e._v(" "),a("el-table-column",{attrs:{label:"累计充值",align:"center",prop:"leiChong"}}),e._v(" "),a("el-table-column",{attrs:{label:"状态",align:"center",prop:"status"}}),e._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width",width:"200px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(a){e.handleUpdate(t.row)}}},[e._v("修改")]),e._v(" "),a("el-button",{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":"100px"}},[a("el-form-item",{attrs:{label:"姓名",prop:"userName"}},[a("el-input",{attrs:{placeholder:"请输入姓名"},model:{value:e.form.userName,callback:function(t){e.$set(e.form,"userName",t)},expression:"form.userName"}})],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:"cartName"}},[a("el-input",{attrs:{placeholder:"请输入卡名称"},model:{value:e.form.cartName,callback:function(t){e.$set(e.form,"cartName",t)},expression:"form.cartName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"卡号",prop:"cartNo"}},[a("el-input",{attrs:{placeholder:"请输入卡号"},model:{value:e.form.cartNo,callback:function(t){e.$set(e.form,"cartNo",t)},expression:"form.cartNo"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"卡到期时间",prop:"cartEndTime"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{clearable:"",size:"small",type:"date","value-format":"yyyy-MM-dd",placeholder:"选择卡到期时间"},model:{value:e.form.cartEndTime,callback:function(t){e.$set(e.form,"cartEndTime",t)},expression:"form.cartEndTime"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"金额",prop:"money"}},[a("el-input",{attrs:{placeholder:"请输入金额"},model:{value:e.form.money,callback:function(t){e.$set(e.form,"money",t)},expression:"form.money"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"",prop:"gmtCreate"}})],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);i.options.__file="index.vue";t.default=i.exports}}]);
|