1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-c769"],{CKZS:function(e,t,n){"use strict";n.r(t);var a=n("cWMS"),i=n("z9W1"),r={data:function(){return{billList:[],isCZ:!1,loading:!0,ids:[],single:!0,multiple:!0,total:0,managementList:[],title:"",open:!1,open1:!1,queryParams:{page:1,limit: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:{getList:function(){var e=this;this.loading=!0,Object(a.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.page=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="添加会员管理"},handleUpdate1:function(e,t){var n=this,a=e.id||this.ids.join(",");Object(i.e)({xiaofeiId:a}).then(function(e){n.form=e.data.data,n.open1=!0,n.billList=e.data.data.items;for(var t=0;t<n.billList.length;t++)n.billList[t].gmtCreate=n.parseTime(n.billList[t].gmtCreate,"{y}-{m}-{d} {h}:{i}:{s}")})},handleUpdate:function(e,t){var n=this;this.reset();var i=e.id||this.ids.join(",");Object(a.e)(i).then(function(e){n.form=e.data.data,n.open=!0,n.form.cartEndTime=n.parseTime(n.form.cartEndTime,"{y}-{m}-{d}")}),2==t?(this.isCZ=!0,this.title="充值"):(this.isCZ=!1,this.title="修改会员管理")},submitForm:function(){var e=this;this.$refs.form.validate(function(t){if(t){if(!e.form.userName)return void e.msgError("姓名不能为空!");if(!e.form.phone)return void e.msgError("手机号不能为空!");if(!e.form.cartNo)return void e.msgError("卡号不能为空!");if(!e.form.cartName)return void e.msgError("卡名称不能为空!");void 0!=e.form.id?e.isCZ?Object(a.b)({id:e.form.id,money:e.form.money}).then(function(t){t.data?(e.msgSuccess("充值成功"),Object(i.a)({xiaofeiId:e.form.id,serviceObject:1,money:e.form.money,remark1:e.form.userName,remark2:e.form.phone,remark3:e.form.cartNo}).then(function(t){t.data?(e.msgSuccess("充值记录添加成功"),e.open=!1,e.getList()):e.msgError(t.msg)})):e.msgError(t.msg)}):(e.form.status="正常",Object(a.g)(e.form).then(function(t){t.data?(e.msgSuccess("修改成功"),e.open=!1,e.getList()):e.msgError(t.msg)})):(e.form.remark1=e.form.money,e.form.status="正常",Object(a.a)(e.form).then(function(t){if(t.data){if(!t.data.data)return void e.msgError("手机号或卡号重复");e.msgSuccess("新增成功"),e.open=!1,e.getList()}else e.msgError(t.msg)}))}})},handleDelete:function(e){var t=this,n=e.id||this.ids.join(",");this.$confirm('是否确认删除会员管理编号为"'+n+'"的数据项?',"警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){return Object(a.c)(n)}).then(function(){t.getList(),t.msgSuccess("删除成功")}).catch(function(){})},handleDelete1:function(e){var t=this,n=e.id||this.ids.join(",");this.$confirm('是否确认注销会员管理编号为"'+n+'"的数据项?',"警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){return Object(a.g)({id:n,status:"已注销"})}).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(a.d)(t)}).then(function(t){e.download(t.data.data)}).catch(function(){})}}},o=n("KHd+"),l=Object(o.a)(r,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"app-container"},[n("el-form",{ref:"queryForm",attrs:{model:e.queryParams,inline:!0,"label-width":"68px"}},[n("el-form-item",{attrs:{label:"姓名",prop:"userName"}},[n("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.userName,callback:function(t){e.$set(e.queryParams,"userName",t)},expression:"queryParams.userName"}})],1),e._v(" "),n("el-form-item",{attrs:{label:"手机号",prop:"phone"}},[n("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(" "),n("el-form-item",{attrs:{label:"卡号",prop:"cartNo"}},[n("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.cartNo,callback:function(t){e.$set(e.queryParams,"cartNo",t)},expression:"queryParams.cartNo"}})],1),e._v(" "),n("el-form-item",[n("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),e._v(" "),n("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),e._v(" "),n("el-row",{staticClass:"mb8",attrs:{gutter:10}},[n("el-col",{attrs:{span:1.5}},[n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["unimall:management:add"],expression:"['unimall:management:add']"}],attrs:{type:"primary",icon:"el-icon-plus",size:"mini"},on:{click:e.handleAdd}},[e._v("新增")])],1),e._v(" "),n("el-col",{attrs:{span:1.5}},[n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["unimall:management:edit"],expression:"['unimall:management:edit']"}],attrs:{disabled:e.single,type:"success",icon:"el-icon-edit",size:"mini"},on:{click:e.handleUpdate}},[e._v("修改")])],1),e._v(" "),n("el-col",{attrs:{span:1.5}},[n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["unimall:management:export"],expression:"['unimall:management:export']"}],attrs:{type:"warning",icon:"el-icon-download",size:"mini"},on:{click:e.handleExport}},[e._v("导出")])],1)],1),e._v(" "),n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.managementList},on:{"selection-change":e.handleSelectionChange}},[n("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),e._v(" "),n("el-table-column",{attrs:{label:"姓名",align:"center",prop:"userName"}}),e._v(" "),n("el-table-column",{attrs:{label:"手机号",align:"center",prop:"phone"}}),e._v(" "),n("el-table-column",{attrs:{label:"卡名称",align:"center",prop:"cartName"}}),e._v(" "),n("el-table-column",{attrs:{label:"卡号",align:"center",prop:"cartNo"}}),e._v(" "),n("el-table-column",{attrs:{label:"卡到期时间",align:"center",prop:"cartEndTime",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("span",[e._v(e._s(e.parseTime(t.row.cartEndTime)))])]}}])}),e._v(" "),n("el-table-column",{attrs:{label:"余额",align:"center",prop:"money"}}),e._v(" "),n("el-table-column",{attrs:{label:"累计充值",align:"center",prop:"leiChong"}}),e._v(" "),n("el-table-column",{attrs:{label:"累计消费",align:"center",prop:"leiXiao"}}),e._v(" "),n("el-table-column",{attrs:{label:"状态",align:"center",prop:"status"}}),e._v(" "),n("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width",width:"400px"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(n){e.handleUpdate(t.row,1)}}},[e._v("修改")]),e._v(" "),n("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(n){e.handleUpdate(t.row,2)}}},[e._v("充值")]),e._v(" "),n("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(n){e.handleUpdate1(t.row)}}},[e._v("账单")]),e._v(" "),n("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-delete"},on:{click:function(n){e.handleDelete1(t.row)}}},[e._v("注销")])]}}])})],1),e._v(" "),n("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],attrs:{total:e.total,page:e.queryParams.page,limit:e.queryParams.limit},on:{"update:page":function(t){e.$set(e.queryParams,"page",t)},"update:limit":function(t){e.$set(e.queryParams,"limit",t)},pagination:e.getList}}),e._v(" "),n("el-dialog",{attrs:{visible:e.open1,title:"账单",width:"500px"},on:{"update:visible":function(t){e.open1=t}}},e._l(e.billList,function(t,a){return n("div",{key:a},[n("div",{staticClass:"row",staticStyle:{"margin-bottom":"10px"}},[n("span",[e._v(e._s(t.gmtCreate))]),e._v(" "),n("span",[e._v(e._s(1==t.serviceObject?"充值":"消费"))]),e._v(" "),n("span",[e._v(e._s(t.money)+"元")])])])})),e._v(" "),n("el-dialog",{attrs:{title:e.title,visible:e.open,width:"500px"},on:{"update:visible":function(t){e.open=t}}},[n("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"100px"}},[n("el-form-item",{attrs:{label:"姓名",prop:"userName"}},[n("el-input",{attrs:{disabled:e.isCZ,placeholder:"请输入姓名"},model:{value:e.form.userName,callback:function(t){e.$set(e.form,"userName",t)},expression:"form.userName"}})],1),e._v(" "),n("el-form-item",{attrs:{label:"手机号",prop:"phone"}},[n("el-input",{attrs:{disabled:e.isCZ,placeholder:"请输入手机号"},model:{value:e.form.phone,callback:function(t){e.$set(e.form,"phone",t)},expression:"form.phone"}})],1),e._v(" "),n("el-form-item",{attrs:{label:"卡名称",prop:"cartName"}},[n("el-input",{attrs:{disabled:e.isCZ,placeholder:"请输入卡名称"},model:{value:e.form.cartName,callback:function(t){e.$set(e.form,"cartName",t)},expression:"form.cartName"}})],1),e._v(" "),n("el-form-item",{attrs:{label:"卡号",prop:"cartNo"}},[n("el-input",{attrs:{disabled:e.isCZ,placeholder:"请输入卡号"},model:{value:e.form.cartNo,callback:function(t){e.$set(e.form,"cartNo",t)},expression:"form.cartNo"}})],1),e._v(" "),e.isCZ?n("el-form-item",{attrs:{label:"余额",prop:"money"}},[n("el-input",{attrs:{placeholder:"请输入金额"},model:{value:e.form.money,callback:function(t){e.$set(e.form,"money",t)},expression:"form.money"}})],1):e._e(),e._v(" "),n("el-form-item",{attrs:{label:"卡到期时间",prop:"cartEndTime"}},[n("el-date-picker",{staticStyle:{width:"100%"},attrs:{disabled:e.isCZ,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(" "),n("el-form-item",{attrs:{label:"",prop:"gmtCreate"}})],1),e._v(" "),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确 定")]),e._v(" "),n("el-button",{on:{click:e.cancel}},[e._v("取 消")])],1)],1)],1)},[],!1,null,null,null);l.options.__file="index.vue";t.default=l.exports},cWMS:function(e,t,n){"use strict";n.d(t,"f",function(){return o}),n.d(t,"e",function(){return l}),n.d(t,"a",function(){return s}),n.d(t,"b",function(){return m}),n.d(t,"g",function(){return c}),n.d(t,"c",function(){return u}),n.d(t,"d",function(){return d});var a=n("QbLZ"),i=n.n(a),r=n("t3Un");function o(e){return Object(r.a)({method:"get",params:i()({_gp:"admin.unimall.memberManagement",_mt:"list"},e)})}function l(e){return Object(r.a)({method:"get",params:{_gp:"admin.unimall.memberManagement",_mt:"get",id:e}})}function s(e){return Object(r.a)({method:"post",params:{_gp:"admin.unimall.memberManagement",_mt:"add",memberManagement:e}})}function m(e){return Object(r.a)({method:"post",params:{_gp:"admin.unimall.memberManagement",_mt:"chongzhi",memberManagement:e}})}function c(e){return Object(r.a)({method:"post",params:{_gp:"admin.unimall.memberManagement",_mt:"update",memberManagement:e}})}function u(e){return Object(r.a)({method:"post",params:{_gp:"admin.unimall.memberManagement",_mt:"delete",id:e}})}function d(e){return Object(r.a)({method:"get",params:i()({_gp:"admin.unimall.memberManagement",_mt:"export"},e)})}},z9W1:function(e,t,n){"use strict";n.d(t,"e",function(){return o}),n.d(t,"d",function(){return l}),n.d(t,"a",function(){return s}),n.d(t,"f",function(){return m}),n.d(t,"b",function(){return c}),n.d(t,"c",function(){return u});var a=n("QbLZ"),i=n.n(a),r=n("t3Un");function o(e){return Object(r.a)({method:"get",params:i()({_gp:"admin.unimall.moneyHis",_mt:"list"},e)})}function l(e){return Object(r.a)({method:"get",params:{_gp:"admin.unimall.moneyHis",_mt:"get",id:e}})}function s(e){return Object(r.a)({method:"post",params:{_gp:"admin.unimall.moneyHis",_mt:"add",moneyHis:e}})}function m(e){return Object(r.a)({method:"post",params:{_gp:"admin.unimall.moneyHis",_mt:"update",moneyHis:e}})}function c(e){return Object(r.a)({method:"post",params:{_gp:"admin.unimall.moneyHis",_mt:"delete",id:e}})}function u(e){return Object(r.a)({method:"get",params:i()({_gp:"admin.unimall.moneyHis",_mt:"export"},e)})}}}]);
|