chunk-23e4.623210e8.js 10 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-23e4"],{n6fY:function(e,t,a){"use strict";a.r(t);var r=a("z9W1"),i={data:function(){return{loading:!0,ids:[],single:!0,multiple:!0,total:0,moneyHisList:[],title:"",open:!1,queryParams:{page:1,limit:10,xiaofeiId:void 0,companyId:void 0,serviceObject:void 0,money: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:{xiaofeiId:[{required:!0,message:"不能为空",trigger:"blur"}],deleteFlag:[{required:!0,message:"0:否(默认) 1:是不能为空",trigger:"blur"}]}}},created:function(){this.getList()},methods:{getSummaries:function(e){if(this.queryParams.serviceObject){var t=e.columns,a=e.data,r=[];return t.forEach(function(e,t){if(0!==t){if(5==t){var i=a.map(function(t){return Number(t[e.property])});i.every(function(e){return isNaN(e)})?r[t]="N/A":(r[t]=i.reduce(function(e,t){var a=Number(t);return isNaN(a)?e:e+t},0),r[t]+=" 元")}}else r[t]="总价"}),r}},getList:function(){var e=this;this.loading=!0,Object(r.e)(this.queryParams).then(function(t){e.moneyHisList=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,xiaofeiId:void 0,companyId:void 0,serviceObject:void 0,money: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="添加充值消费记录"},handleUpdate:function(e){var t=this;this.reset();var a=e.id||this.ids.join(",");Object(r.d)(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(r.f)(e.form).then(function(t){t.data?(e.msgSuccess("修改成功"),e.open=!1,e.getList()):e.msgError(t.msg)}):Object(r.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(r.b)(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(r.c)(t)}).then(function(t){e.download(t.data.data)}).catch(function(){})}}},n=a("KHd+"),o=Object(n.a)(i,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:"充值1消费2",prop:"serviceObject","label-width":"100px"}},[a("el-input",{attrs:{placeholder:"请输入充值1消费2",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.serviceObject,callback:function(t){e.$set(e.queryParams,"serviceObject",t)},expression:"queryParams.serviceObject"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"",prop:"gmtCreate"}},[a("el-date-picker",{staticStyle:{width:"200px"},attrs:{clearable:"",size:"small",type:"date","value-format":"yyyy-MM-dd",placeholder:"选择时间"},model:{value:e.queryParams.gmtCreate,callback:function(t){e.$set(e.queryParams,"gmtCreate",t)},expression:"queryParams.gmtCreate"}})],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:moneyHis:remove"],expression:"['unimall:moneyHis:remove']"}],attrs:{disabled:e.multiple,type:"danger",icon:"el-icon-delete",size:"mini"},on:{click:e.handleDelete}},[e._v("删除")])],1)],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.moneyHisList,"summary-method":e.getSummaries,"show-summary":""},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:"remark1"}}),e._v(" "),a("el-table-column",{attrs:{label:"电话",align:"center",prop:"remark2"}}),e._v(" "),a("el-table-column",{attrs:{label:"卡号",align:"center",prop:"remark3"}}),e._v(" "),a("el-table-column",{attrs:{label:"消费",align:"center",prop:"gmtCreate",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(1==t.row.serviceObject?"充值":"消费"))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"金额",align:"center",prop:"money"}}),e._v(" "),a("el-table-column",{attrs:{label:"时间",align:"center",prop:"gmtCreate",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e.parseTime(t.row.gmtCreate)))])]}}])}),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:moneyHis:remove"],expression:"['unimall:moneyHis: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.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(" "),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:"companyId"}},[a("el-input",{attrs:{placeholder:"请输入"},model:{value:e.form.companyId,callback:function(t){e.$set(e.form,"companyId",t)},expression:"form.companyId"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"充值1消费2",prop:"serviceObject"}},[a("el-input",{attrs:{placeholder:"请输入充值1消费2"},model:{value:e.form.serviceObject,callback:function(t){e.$set(e.form,"serviceObject",t)},expression:"form.serviceObject"}})],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:"状态"}},[a("el-radio-group",{model:{value:e.form.status,callback:function(t){e.$set(e.form,"status",t)},expression:"form.status"}},[a("el-radio",{attrs:{label:"1"}},[e._v("请选择字典生成")])],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"备注1",prop:"remark1"}},[a("el-input",{attrs:{type:"textarea",placeholder:"请输入内容"},model:{value:e.form.remark1,callback:function(t){e.$set(e.form,"remark1",t)},expression:"form.remark1"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"备注2",prop:"remark2"}},[a("el-input",{attrs:{type:"textarea",placeholder:"请输入内容"},model:{value:e.form.remark2,callback:function(t){e.$set(e.form,"remark2",t)},expression:"form.remark2"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"备注3",prop:"remark3"}},[a("el-input",{attrs:{type:"textarea",placeholder:"请输入内容"},model:{value:e.form.remark3,callback:function(t){e.$set(e.form,"remark3",t)},expression:"form.remark3"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"",prop:"gmtCreate"}},[a("el-date-picker",{staticStyle:{width:"200px"},attrs:{clearable:"",size:"small",type:"date","value-format":"yyyy-MM-dd",placeholder:"选择"},model:{value:e.form.gmtCreate,callback:function(t){e.$set(e.form,"gmtCreate",t)},expression:"form.gmtCreate"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"",prop:"gmtUpdate"}},[a("el-date-picker",{staticStyle:{width:"200px"},attrs:{clearable:"",size:"small",type:"date","value-format":"yyyy-MM-dd",placeholder:"选择"},model:{value:e.form.gmtUpdate,callback:function(t){e.$set(e.form,"gmtUpdate",t)},expression:"form.gmtUpdate"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"",prop:"userId"}},[a("el-input",{attrs:{placeholder:"请输入"},model:{value:e.form.userId,callback:function(t){e.$set(e.form,"userId",t)},expression:"form.userId"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"",prop:"adminId"}},[a("el-input",{attrs:{placeholder:"请输入"},model:{value:e.form.adminId,callback:function(t){e.$set(e.form,"adminId",t)},expression:"form.adminId"}})],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);o.options.__file="index.vue";t.default=o.exports},z9W1:function(e,t,a){"use strict";a.d(t,"e",function(){return o}),a.d(t,"d",function(){return l}),a.d(t,"a",function(){return s}),a.d(t,"f",function(){return m}),a.d(t,"b",function(){return c}),a.d(t,"c",function(){return u});var r=a("QbLZ"),i=a.n(r),n=a("t3Un");function o(e){return Object(n.a)({method:"get",params:i()({_gp:"admin.unimall.moneyHis",_mt:"list"},e)})}function l(e){return Object(n.a)({method:"get",params:{_gp:"admin.unimall.moneyHis",_mt:"get",id:e}})}function s(e){return Object(n.a)({method:"post",params:{_gp:"admin.unimall.moneyHis",_mt:"add",moneyHis:e}})}function m(e){return Object(n.a)({method:"post",params:{_gp:"admin.unimall.moneyHis",_mt:"update",moneyHis:e}})}function c(e){return Object(n.a)({method:"post",params:{_gp:"admin.unimall.moneyHis",_mt:"delete",id:e}})}function u(e){return Object(n.a)({method:"get",params:i()({_gp:"admin.unimall.moneyHis",_mt:"export"},e)})}}}]);