1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-6c562e76"],{"1d84":function(t,e,r){"use strict";r.r(e);var n=r("a34a"),a=r.n(n),u=r("2f62"),o=r("c24f"),c=r("2e83"),i=r("d708");function s(t,e,r,n,a,u,o){try{var c=t[u](o),i=c.value}catch(t){return void r(t)}c.done?e(i):Promise.resolve(i).then(n,a)}function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var m={name:"index",data:function(){return{roterPre:i.a.roterPre,grid:{xl:7,lg:7,md:12,sm:24,xs:24},columns:[{title:"编号",key:"id"},{title:"批次名称",key:"title"},{title:"体验天数",key:"use_day"},{title:"发卡总数量",key:"total_num"},{title:"使用数量",key:"use_num"},{title:"制卡时间",key:"add_time"},{title:"是否激活",slot:"status"},{title:"备注",key:"remark"},{title:"操作",slot:"action",fixed:"right"}],tbody:[],total:0,gradeFrom:{title:"",page:1,limit:15},loading:!1,modal:!1,rule:[{type:"input",field:"title",title:"批次名称",validate:[{required:!0,message:"请输入批次名称",trigger:"blur"}]},{type:"InputNumber",field:"total_num",title:"制卡数量",value:1,props:{min:1}},{type:"InputNumber",field:"use_day",title:"体验天数",value:1,props:{min:1}},{type:"radio",field:"status",title:"是否激活",value:"0",options:[{value:"0",label:"冻结"},{value:"1",label:"激活"}]},{type:"input",field:"remark",title:"备注",props:{type:"textarea"}}],modal2:!1,rule2:[{type:"hidden",field:"id",value:""},{type:"input",field:"title",title:"批次名称",value:"",validate:[{required:!0,message:"请输入批次名称",trigger:"blur"}]}],modal3:!1,qrcode:null,fapi:{}}},computed:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(r,!0).forEach((function(e){d(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},Object(u.e)("admin/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:75},labelPosition:function(){return this.isMobile?"top":"right"}}),created:function(){this.getMemberBatch(this.gradeFrom)},methods:{getMemberBatch:function(){var t=this;this.loading=!0,Object(o.X)(this.gradeFrom).then((function(e){t.loading=!1,t.tbody=e.data.list,t.total=e.data.count})).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},userSearchs:function(){this.gradeFrom.page=1,this.getMemberBatch()},onchangeIsShow:function(t){var e=this;Object(o.w)(t.id,{field:"status",value:t.status}).then((function(t){e.$Message.success(t.msg)})).catch((function(t){e.$Message.error(t.msg)}))},exports:function(){var t,e=(t=a.a.mark((function t(e){var r,n,u,o,i,s,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=[],n=[],u=[],o="",(i=JSON.parse(JSON.stringify(this.gradeFrom))).page=1,s=0;case 5:if(!(s<i.page+1)){t.next=22;break}return t.next=8,this.getExcelData(e.id,i);case 8:if(l=t.sent,o||(o=l.filename),n.length||(n=l.filekey),r.length||(r=l.header),!l.export.length){t.next=17;break}u=u.concat(l.export),i.page++,t.next=19;break;case 17:return Object(c.a)(r,n,o,u),t.abrupt("return");case 19:s++,t.next=5;break;case 22:case"end":return t.stop()}}),t,this)})),function(){var e=this,r=arguments;return new Promise((function(n,a){var u=t.apply(e,r);function o(t){s(u,n,a,o,c,"next",t)}function c(t){s(u,n,a,o,c,"throw",t)}o(void 0)}))});return function(t){return e.apply(this,arguments)}}(),getExcelData:function(t,e){return new Promise((function(r,n){Object(o.i)(t,e).then((function(t){return r(t.data)}))}))},changeMenu:function(t,e){switch(e){case"1":this.rule2[0].value=t.id,this.rule2[1].value=t.title,this.modal2=!0;break;case"2":this.$router.push({path:"".concat(this.roterPre,"/vipuser/grade/list/").concat(t.id)});break;case"3":this.exports(t)}},pageChange:function(t){this.gradeFrom.page=t,this.getMemberBatch()},addBatch:function(){this.fapi.resetFields(),this.modal=!0},onSubmit:function(t){var e=this;Object(o.v)(0,t).then((function(t){e.modal=!1,e.$Message.success(t.msg),e.getMemberBatch(),e.fapi.resetFields()})).catch((function(t){e.$Message.error(t.msg)}))},onSubmit2:function(t){var e=this;Object(o.w)(t.id,{field:"title",value:t.title}).then((function(t){e.modal2=!1,e.$Message.success(t.msg),e.getMemberBatch()})).catch((function(t){e.$Message.error(t.msg)}))},getMemberScan:function(){var t=this;this.$Spin.show(),Object(o.Z)().then((function(e){t.$Spin.hide(),t.qrcode=e.data,t.modal3=!0})).catch((function(e){t.$Spin.hide(),t.$Message.error(e.msg)}))}}},f=(r("4753"),r("2877")),h=Object(f.a)(m,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":"",padding:0}},[r("div",{staticClass:"new_card_pd"},[r("Form",{attrs:{model:t.gradeFrom,inline:"","label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[r("FormItem",{attrs:{label:"批次名称:","label-for":"title"}},[r("Input",{staticClass:"input-add mr14",attrs:{placeholder:"请输入批次名称"},model:{value:t.gradeFrom.title,callback:function(e){t.$set(t.gradeFrom,"title",e)},expression:"gradeFrom.title"}}),r("Button",{attrs:{type:"primary"},on:{click:function(e){return t.userSearchs()}}},[t._v("查询")])],1)],1)],1)]),r("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[r("Button",{staticClass:"mr20",attrs:{type:"primary"},on:{click:t.addBatch}},[t._v("添加批次")]),r("Button",{on:{click:t.getMemberScan}},[t._v("下载二维码")]),r("Table",{staticClass:"mt25",attrs:{columns:t.columns,data:t.tbody,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"status",fn:function(e){var n=e.row;return[r("i-switch",{attrs:{value:n.status,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.onchangeIsShow(n)}},model:{value:n.status,callback:function(e){t.$set(n,"status",e)},expression:"row.status"}},[r("span",{attrs:{slot:"open"},slot:"open"},[t._v("激活")]),r("span",{attrs:{slot:"close"},slot:"close"},[t._v("冻结")])])]}},{key:"action",fn:function(e){var n=e.row,a=e.index;return[[r("Dropdown",{on:{"on-click":function(e){return t.changeMenu(n,e,a)}}},[r("a",{attrs:{href:"javascript:void(0)"}},[t._v("\n 更多\n "),r("Icon",{attrs:{type:"ios-arrow-down"}})],1),r("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[r("DropdownItem",{attrs:{name:"1"}},[t._v("编辑批次名")]),r("DropdownItem",{attrs:{name:"2"}},[t._v("查看卡列表")]),r("DropdownItem",{attrs:{name:"3"}},[t._v("导出")])],1)],1)]]}}])}),r("div",{staticClass:"acea-row row-right page"},[r("Page",{attrs:{total:t.total,current:t.gradeFrom.page,"page-size":t.gradeFrom.limit,"show-elevator":"","show-total":""},on:{"on-change":t.pageChange}})],1)],1),r("Modal",{attrs:{title:"添加批次","footer-hide":"","class-name":"vertical-center-modal"},model:{value:t.modal,callback:function(e){t.modal=e},expression:"modal"}},[r("form-create",{attrs:{rule:t.rule},on:{"on-submit":t.onSubmit},model:{value:t.fapi,callback:function(e){t.fapi=e},expression:"fapi"}})],1),r("Modal",{attrs:{title:"编辑批次名","footer-hide":""},model:{value:t.modal2,callback:function(e){t.modal2=e},expression:"modal2"}},[r("form-create",{attrs:{rule:t.rule2},on:{"on-submit":t.onSubmit2}})],1),r("Modal",{attrs:{title:"二维码","footer-hide":""},model:{value:t.modal3,callback:function(e){t.modal3=e},expression:"modal3"}},[t.qrcode?r("div",{staticClass:"acea-row row-around"},[t.qrcode&&t.qrcode.wechat_img?r("div",{staticClass:"acea-row row-column-around row-between-wrapper"},[r("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"QRpic"},[r("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.qrcode.wechat_img,expression:"qrcode.wechat_img"}]})]),r("span",{staticClass:"mt10"},[t._v("公众号二维码")])]):t._e(),t.qrcode&&t.qrcode.routine?r("div",{staticClass:"acea-row row-column-around row-between-wrapper"},[r("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"QRpic"},[r("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.qrcode.routine,expression:"qrcode.routine"}]})]),r("span",{staticClass:"mt10"},[t._v("小程序二维码")])]):t._e()]):r("Spin")],1)],1)}),[],!1,null,"fbc047d4",null);e.default=h.exports},"244e":function(t,e,r){},4753:function(t,e,r){"use strict";var n=r("244e");r.n(n).a},c24f:function(t,e,r){"use strict";r.d(e,"W",(function(){return a})),r.d(e,"M",(function(){return u})),r.d(e,"L",(function(){return o})),r.d(e,"k",(function(){return c})),r.d(e,"r",(function(){return i})),r.d(e,"d",(function(){return s})),r.d(e,"h",(function(){return l})),r.d(e,"g",(function(){return d})),r.d(e,"q",(function(){return m})),r.d(e,"s",(function(){return f})),r.d(e,"I",(function(){return h})),r.d(e,"O",(function(){return b})),r.d(e,"K",(function(){return p})),r.d(e,"J",(function(){return g})),r.d(e,"f",(function(){return v})),r.d(e,"e",(function(){return _})),r.d(e,"n",(function(){return O})),r.d(e,"Q",(function(){return j})),r.d(e,"p",(function(){return w})),r.d(e,"P",(function(){return y})),r.d(e,"bb",(function(){return k})),r.d(e,"T",(function(){return x})),r.d(e,"R",(function(){return M})),r.d(e,"S",(function(){return P})),r.d(e,"V",(function(){return C})),r.d(e,"U",(function(){return S})),r.d(e,"X",(function(){return F})),r.d(e,"v",(function(){return $})),r.d(e,"w",(function(){return q})),r.d(e,"Y",(function(){return D})),r.d(e,"i",(function(){return B})),r.d(e,"ab",(function(){return I})),r.d(e,"C",(function(){return N})),r.d(e,"cb",(function(){return z})),r.d(e,"m",(function(){return E})),r.d(e,"Z",(function(){return T})),r.d(e,"F",(function(){return U})),r.d(e,"B",(function(){return J})),r.d(e,"A",(function(){return Q})),r.d(e,"z",(function(){return R})),r.d(e,"D",(function(){return W})),r.d(e,"y",(function(){return X})),r.d(e,"x",(function(){return Z})),r.d(e,"u",(function(){return A})),r.d(e,"t",(function(){return G})),r.d(e,"o",(function(){return H})),r.d(e,"l",(function(){return K})),r.d(e,"G",(function(){return L})),r.d(e,"H",(function(){return V})),r.d(e,"db",(function(){return Y})),r.d(e,"N",(function(){return tt})),r.d(e,"E",(function(){return et})),r.d(e,"b",(function(){return rt})),r.d(e,"a",(function(){return nt})),r.d(e,"eb",(function(){return at})),r.d(e,"j",(function(){return ut})),r.d(e,"c",(function(){return ot}));var n=r("b6bd");function a(t){return Object(n.a)({url:"user/user",method:"get",params:t})}function u(t){return Object(n.a)({url:"setting/config/user/".concat(t),method:"get"})}function o(t,e){return Object(n.a)({url:"setting/config/user/".concat(t),method:"post",data:e})}function c(t){return Object(n.a)({url:"user/user/".concat(t,"/edit"),method:"get"})}function i(t){return Object(n.a)({url:"user/set_status/".concat(t.status,"/").concat(t.id),method:"put"})}function s(t){return Object(n.a)({url:"marketing/coupon/grant",method:"get",params:t})}function l(t){return Object(n.a)({url:"user/edit_other/".concat(t),method:"get"})}function d(t){return Object(n.a)({url:"user/user/".concat(t),method:"get"})}function m(t){return Object(n.a)({url:"user/one_info/".concat(t.id),method:"get",params:t.datas})}function f(t){return Object(n.a)({url:"user/user_level/vip_list",method:"get",params:t})}function h(t){return Object(n.a)({url:"user/user_level/set_show/".concat(t.id,"/").concat(t.is_show),method:"PUT"})}function b(t,e){return Object(n.a)({url:"user/user_level/task/".concat(t),method:"get",params:e})}function p(t){return Object(n.a)({url:"user/user_level/set_task_show/".concat(t.id,"/").concat(t.is_show),method:"PUT"})}function g(t){return Object(n.a)({url:"user/user_level/set_task_must/".concat(t.id,"/").concat(t.is_must),method:"PUT"})}function v(t){return Object(n.a)({url:"/user/user_level/create_task",method:"get",params:t})}function _(t){return Object(n.a)({url:"user/user_level/create",method:"get",params:t})}function O(t){return Object(n.a)({url:"user/give_level/".concat(t),method:"get"})}function j(t){return Object(n.a)({url:"user/user_group/list",method:"get",params:t})}function w(t){return Object(n.a)({url:"user/user_group/add/".concat(t),method:"get"})}function y(t){return Object(n.a)({url:"setting/update_admin",method:"PUT",data:t})}function k(t){return Object(n.a)({url:"user/set_group",method:"post",data:t})}function x(t){return Object(n.a)({url:"user/user_label",method:"get",params:t})}function M(t,e){return Object(n.a)({url:"user/user_label/add/".concat(t),method:"get",params:e})}function P(t){return Object(n.a)({url:"user/user_label_cate/all",method:"get",params:t})}function C(t){return Object(n.a)({url:"user/user_label_cate/".concat(t,"/edit"),method:"get"})}function S(t){return Object(n.a)({url:"user/user_label_cate/create",method:"get"})}function F(t){return Object(n.a)({url:"/user/member_batch/index",method:"get",params:t})}function $(t,e){return Object(n.a)({url:"/user/member_batch/save/".concat(t),method:"post",data:e})}function q(t,e){return Object(n.a)({url:"/user/member_batch/set_value/".concat(t),method:"get",params:e})}function D(t,e){return Object(n.a)({url:"/user/member_card/index/".concat(t),method:"get",params:e})}function B(t,e){return Object(n.a)({url:"/export/memberCard/".concat(t),method:"get",params:e})}function I(){return Object(n.a)({url:"/user/member/ship",method:"get"})}function N(t,e){return Object(n.a)({url:"/user/member_ship/save/".concat(t),method:"post",data:e})}function z(){return Object(n.a)({url:"/user/user/syncUsers",method:"get"})}function E(){return Object(n.a)({url:"/user/user/create",method:"get"})}function T(){return Object(n.a)({url:"/user/member_scan",method:"get"})}function U(t,e){return Object(n.a)({url:"user/label/".concat(t),method:"post",data:e})}function J(t){return Object(n.a)({url:"user/member_right/save/".concat(t.id),method:"post",data:t})}function Q(){return Object(n.a)({url:"user/member/right",method:"get"})}function R(t){return Object(n.a)({url:"/user/member/record",method:"get",params:t})}function W(){return Object(n.a)({url:"user/member/ship_select",method:"get"})}function X(t){return Object(n.a)({url:"user/member_card/set_status",method:"get",params:t})}function Z(t){return Object(n.a)({url:"user/member_ship/set_ship_status",method:"get",params:t})}function A(t,e){return Object(n.a)({url:"user/member_agreement/save/".concat(t),method:"post",data:e})}function G(){return Object(n.a)({url:"user/member/agreement",method:"get"})}function H(t){return Object(n.a)({url:"user/give_level_time/".concat(t),method:"get"})}function K(t){return Object(n.a)({url:"user/label/".concat(t),method:"get"})}function L(t){return Object(n.a)({url:"user/save_set_label",method:"put",data:t})}function V(t){return Object(n.a)({url:"setting/info",method:"get"})}function Y(t){return Object(n.a)({url:"user/visit_list/".concat(t.id),method:"get",params:t.datas})}function tt(t){return Object(n.a)({url:"user/spread_list/".concat(t.id),method:"get",params:t.datas})}function et(t){return Object(n.a)({url:"user/user/".concat(t.uid),method:"put",data:t})}function rt(t,e){return Object(n.a)({url:"agent/set_agent_agreement/".concat(t),method:"post",data:e})}function nt(){return Object(n.a)({url:"agent/get_agent_agreement",method:"get"})}function at(){return Object(n.a)({url:"user/synchro/work/label",method:"get"})}function ut(t){return Object(n.a)({url:"user/user/extend_info/".concat(t),method:"get"})}function ot(t){return Object(n.a)({url:"user/batch_process",method:"post",data:t})}}}]);
|