王总上门按摩后台代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
11 KiB

2 months ago
webpackJsonp([64],{Ewwq:function(e,t){},mHKU:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a("mvHQ"),n=a.n(r),i=a("Xxa5"),s=a.n(i),o=a("exGp"),l=a.n(o),c=a("PJh5"),u=a.n(c),m={data:function(){return{loading:{list:!1,user:!1},sendType:{0:"活动派发",1:"平台定向派发",2:"用户领取"},searchForm:{list:{page:1,limit:10,name:""},user:{page:1,limit:10,nickName:""}},tableData:{list:[],user:[]},total:{list:0,user:0},cur_coupon:{},multipleSelection:[],showDialog:!1}},activated:function(){this.getTableDataList(1,"list")},methods:{resetForm:function(e){var t=e+"Form";this.$refs[t].resetFields(),this.getTableDataList(1,e)},handleSizeChange:function(e,t){this.searchForm[t].limit=e,this.handleCurrentChange(1,t)},handleCurrentChange:function(e,t){this.searchForm[t].page=e,this.getTableDataList("",t)},getTableDataList:function(e,t){var a=this;return l()(s.a.mark(function r(){var n,i,o,l;return s.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(e&&(a.searchForm[t].page=1),a.tableData[t]=[],a.loading[t]=!0,n=a.searchForm[t],"list"!==t){r.next=10;break}return r.next=7,a.$api.market.couponList(n);case 7:r.t0=r.sent,r.next=13;break;case 10:return r.next=12,a.$api.custom.userList(n);case 12:r.t0=r.sent;case 13:if(i=r.t0,o=i.code,l=i.data,a.loading[t]=!1,200===o){r.next=19;break}return r.abrupt("return");case 19:a.tableData[t]=l.data,a.total[t]=l.total;case 21:case"end":return r.stop()}},r,a)}))()},confirmDel:function(e){var t=this;this.$confirm(this.$t("tips.confirmDelete"),this.$t("tips.reminder"),{confirmButtonText:this.$t("action.comfirm"),cancelButtonText:this.$t("action.cancel"),type:"warning"}).then(function(){t.updateItem(e,-1)}).catch(function(){})},updateItem:function(e,t){var a=this;return l()(s.a.mark(function r(){return s.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:a.$api.market.couponUpdate({id:e,status:t}).then(function(e){if(200===e.code)a.$message.success(a.$t(-1===t?"tips.successDel":"tips.successOper")),-1===t&&(a.searchForm.list.page=a.searchForm.list.page<Math.ceil((a.total.list-1)/a.searchForm.list.limit)?a.searchForm.list.page:Math.ceil((a.total.list-1)/a.searchForm.list.limit),a.getTableDataList("","list"));else{if(-1===t)return;a.getTableDataList("","list")}});case 1:case"end":return r.stop()}},r,a)}))()},toShowDialog:function(e){var t=this;return l()(s.a.mark(function a(){return s.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return t.searchForm.user.nickName="",t.cur_coupon=JSON.parse(n()(e)),a.next=4,t.getTableDataList(1,"user");case 4:t.showDialog=!t.showDialog;case 5:case"end":return a.stop()}},a,t)}))()},handleSelectionChange:function(e){this.multipleSelection=e},handleDialogConfirm:function(){var e=this;return l()(s.a.mark(function t(){var a,r,i,o,l,c,u,m,p,d,h;return s.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!((a=JSON.parse(n()(e.multipleSelection))).length<1)){t.next=4;break}return e.$message.error("请选择用户"),t.abrupt("return");case 4:t.t0=s.a.keys(a);case 5:if((t.t1=t.t0()).done){t.next=15;break}if(r=t.t1.value,i=1*r+1,o=a[r],l=o.id,c=o.nickName,u=o.num,m=c?";用户昵称:"+c:"",void 0===u?0:u){t.next=13;break}return e.$message.error("选择用户 第"+i+"条数据:(用户ID:"+l+m+")未设置卡券数量"),t.abrupt("return");case 13:t.next=5;break;case 15:return p=a.map(function(e){return{id:e.id,num:e.num}}),d={coupon_id:e.cur_coupon.id,user:p},t.next=19,e.$api.market.couponRecordAdd(d);case 19:if(h=t.sent,200===h.code){t.next=24;break}return e.showDialog=!1,t.abrupt("return");case 24:e.$message.success("卡券派发成功"),e.getTableDataList("","list"),e.showDialog=!1;case 27:case"end":return t.stop()}},t,e)}))()}},filters:{handleTime:function(e,t){return 1===t?u()(1e3*e).format("YYYY-MM-DD"):2===t?u()(1e3*e).format("HH:mm:ss"):u()(1e3*e).format("YYYY-MM-DD HH:mm:ss")}}},p={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"lb-examine-goods"},[a("top-nav"),e._v(" "),a("div",{staticClass:"page-main"},[a("el-row",{staticClass:"page-top-operate"},[a("lb-