chunk-1eed673a.d7ffc2f4.js 15 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-1eed673a","chunk-2d0e488e"],{"1d84":function(t,e,a){"use strict";a.r(e);var r=a("c7eb"),i=a("1da1"),l=a("5530"),n=(a("99af"),a("d3b7"),a("2f62")),o=a("9144"),s=a("c24f"),c=a("3f2a");o={name:"index",components:{cardList:o.default},data:function(){return{cardModal:!1,id:0,grid:{xl:7,lg:7,md:12,sm:24,xs:24},tbody:[],total:0,gradeFrom:{title:"",page:1,limit:15},loading:!1,modal:!1,formValidate:{id:0,title:"",total_num:1,use_day:1,status:1,remark:""},modal2:!1,modal3:!1,qrcode:null,fapi:{}}},computed:Object(l.a)(Object(l.a)({},Object(n.d)("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:"80px"},labelPosition:function(){return this.isMobile?"top":"right"}}),created:function(){this.getMemberBatch(this.gradeFrom)},methods:{getMemberBatch:function(){var t=this;this.loading=!0,Object(s.S)(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(s.t)(t.id,{field:"status",value:t.status}).then((function(t){e.$message.success(t.msg)})).catch((function(t){e.$message.error(t.msg)}))},export:function(t){var e=this;return Object(i.a)(Object(r.a)().mark((function a(){var i,l,n,o,s;return Object(r.a)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return i=[],l=[],n=[],o="",a.next=3,e.getExcelData(t.id);case 3:s=a.sent,o=o||s.filename,l.length||(l=s.fileKey),i.length||(i=s.header),n=n.concat(s.export),e.$exportExcel(i,l,o,n);case 9:case"end":return a.stop()}}),a)})))()},getExcelData:function(t){return new Promise((function(e,a){Object(c.h)(t).then((function(t){e(t.data)}))}))},changeMenu:function(t,e){switch(e){case"1":this.formValidate.id=t.id,this.formValidate.title=t.title,this.modal=!0;break;case"2":this.id=t.id,this.cardModal=!0;break;case"3":this.export(t)}},addBatch:function(){this.modal=!0,this.formValidate.id=0,this.formValidate.title=""},onSubmit:function(){var t=this;this.formValidate.id?Object(s.t)(this.formValidate.id,{field:"title",value:this.formValidate.id,remark:this.formValidate.remark}).then((function(e){t.modal=!1,t.$message.success(e.msg),t.getMemberBatch()})).catch((function(e){t.$message.error(e.msg)})):Object(s.s)(this.formValidate.id,this.formValidate).then((function(e){t.modal=!1,t.$message.success(e.msg),t.getMemberBatch()})).catch((function(e){t.$message.error(e.msg)}))},onSubmit2:function(t){},getMemberScan:function(){var t=this;Object(s.U)().then((function(e){t.qrcode=e.data,t.modal3=!0})).catch((function(e){t.$message.error(e.msg)}))}}},a("b13f"),l=a("2877"),n=Object(l.a)(o,(function(){var t=this,e=t._self._c;return e("div",[e("el-card",{staticClass:"ivu-mt",attrs:{bordered:!1,shadow:"never","body-style":{padding:0}}},[e("div",{staticClass:"padding-add"},[e("el-form",{attrs:{model:t.gradeFrom,inline:"","label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[e("el-form-item",{attrs:{label:"批次名称:","label-for":"title"}},[e("el-input",{staticClass:"form_content_width",attrs:{clearable:"",placeholder:"请输入批次名称"},model:{value:t.gradeFrom.title,callback:function(e){t.$set(t.gradeFrom,"title",e)},expression:"gradeFrom.title"}})],1),e("el-form-item",[e("el-button",{attrs:{type:"primary"},on:{click:t.userSearchs}},[t._v("查询")])],1)],1)],1)]),e("el-card",{staticClass:"mt16",attrs:{bordered:!1,shadow:"never"}},[e("el-button",{attrs:{type:"primary"},on:{click:t.addBatch}},[t._v("添加批次")]),e("el-button",{on:{click:t.getMemberScan}},[t._v("卡密使用页面二维码")]),e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"mt14",attrs:{data:t.tbody,"highlight-current-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"}},[e("el-table-column",{attrs:{label:"编号",width:"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.id))])]}}])}),e("el-table-column",{attrs:{label:"批次名称","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.title))])]}}])}),e("el-table-column",{attrs:{label:"体验天数","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.use_day))])]}}])}),e("el-table-column",{attrs:{label:"发卡总数量","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.total_num))])]}}])}),e("el-table-column",{attrs:{label:"使用数量","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.use_num))])]}}])}),e("el-table-column",{attrs:{label:"制卡时间","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.add_time))])]}}])}),e("el-table-column",{attrs:{label:"是否激活","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-switch",{attrs:{"active-value":1,"inactive-value":0,value:a.row.status,size:"large"},on:{change:function(e){return t.onchangeIsShow(a.row)}},model:{value:a.row.status,callback:function(e){t.$set(a.row,"status",e)},expression:"scope.row.status"}})]}}])}),e("el-table-column",{attrs:{label:"备注","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.remark))])]}}])}),e("el-table-column",{attrs:{label:"制卡时间","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.add_time))])]}}])}),e("el-table-column",{attrs:{label:"操作",fixed:"right",width:"120"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-dropdown",{attrs:{size:"small",transfer:!0},on:{command:function(e){return t.changeMenu(a.row,e,a.$index)}}},[e("span",{staticClass:"el-dropdown-link"},[t._v("更多"),e("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("el-dropdown-item",{attrs:{command:"1"}},[t._v("编辑批次名")]),e("el-dropdown-item",{attrs:{command:"2"}},[t._v("查看卡列表")]),e("el-dropdown-item",{attrs:{command:"3"}},[t._v("导出")])],1)],1)]}}])})],1),e("div",{staticClass:"acea-row row-right page"},[t.total?e("pagination",{attrs:{total:t.total,page:t.gradeFrom.page,limit:t.gradeFrom.limit},on:{"update:page":function(e){return t.$set(t.gradeFrom,"page",e)},"update:limit":function(e){return t.$set(t.gradeFrom,"limit",e)},pagination:t.getMemberBatch}}):t._e()],1)],1),e("el-dialog",{attrs:{visible:t.modal,width:"540px",title:"".concat(t.formValidate.id?"编辑":"添加","批次")},on:{"update:visible":function(e){t.modal=e}}},[e("el-form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":"80px"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("el-form-item",{attrs:{label:"批次名称:"}},[e("el-input",{staticClass:"w100",attrs:{placeholder:"请输入批次名称","element-id":"unit_name"},model:{value:t.formValidate.title,callback:function(e){t.$set(t.formValidate,"title",e)},expression:"formValidate.title"}})],1),t.formValidate.id?e("el-form-item",{attrs:{label:"备注:"}},[e("el-input",{staticClass:"w100",attrs:{type:"textarea",placeholder:"请输入备注"},model:{value:t.formValidate.remark,callback:function(e){t.$set(t.formValidate,"remark",e)},expression:"formValidate.remark"}})],1):t._e(),t.formValidate.id?t._e():[e("el-form-item",{attrs:{label:"制卡数量:"}},[e("el-input-number",{staticClass:"perW10",attrs:{controls:!1,placeholder:"请输入制卡数量","element-id":"sort",precision:0,max:1e5,min:1},model:{value:t.formValidate.total_num,callback:function(e){t.$set(t.formValidate,"total_num",e)},expression:"formValidate.total_num"}})],1),e("el-form-item",{attrs:{label:"体验天数:"}},[e("el-input-number",{staticClass:"perW10",attrs:{controls:!1,placeholder:"请输入体验天数","element-id":"sort",precision:0,max:1e5,min:1},model:{value:t.formValidate.use_day,callback:function(e){t.$set(t.formValidate,"use_day",e)},expression:"formValidate.use_day"}})],1),e("el-form-item",{attrs:{label:"是否激活:"}},[e("el-radio-group",{attrs:{"element-id":"status"},model:{value:t.formValidate.status,callback:function(e){t.$set(t.formValidate,"status",e)},expression:"formValidate.status"}},[e("el-radio",{staticClass:"radio",attrs:{label:1}},[t._v("激活")]),e("el-radio",{attrs:{label:0}},[t._v("冻结")])],1)],1),e("el-form-item",{attrs:{label:"备注:"}},[e("el-input",{staticClass:"w100",attrs:{type:"textarea",placeholder:"请输入备注"},model:{value:t.formValidate.remark,callback:function(e){t.$set(t.formValidate,"remark",e)},expression:"formValidate.remark"}})],1)]],2),e("div",{staticClass:"acea-row row-right"},[e("el-button",{on:{click:function(e){t.modal=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.onSubmit()}}},[t._v("提交")])],1)],1),e("el-dialog",{attrs:{visible:t.cardModal,title:"卡列表",width:"1000px"},on:{"update:visible":function(e){t.cardModal=e}}},[t.cardModal?e("cardList",{attrs:{id:t.id}}):t._e()],1),e("el-dialog",{attrs:{visible:t.modal3,title:"二维码",width:"540px"},on:{"update:visible":function(e){t.modal3=e}}},[t.qrcode?e("div",{staticClass:"acea-row row-around"},[t.qrcode&&t.qrcode.wechat_img?e("div",{staticClass:"acea-row row-column-around row-between-wrapper"},[e("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"QRpic"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.qrcode.wechat_img,expression:"qrcode.wechat_img"}]})]),e("span",{staticClass:"mt10"},[t._v("公众号二维码")])]):t._e(),t.qrcode&&t.qrcode.routine?e("div",{staticClass:"acea-row row-column-around row-between-wrapper"},[e("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"QRpic"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.qrcode.routine,expression:"qrcode.routine"}]})]),e("span",{staticClass:"mt10"},[t._v("小程序二维码")])]):t._e()]):t._e()])],1)}),[],!1,null,"3936d762",null);e.default=n.exports},"3f2a":function(t,e,a){"use strict";a.d(e,"g",(function(){return i})),a.d(e,"d",(function(){return l})),a.d(e,"c",(function(){return n})),a.d(e,"e",(function(){return o})),a.d(e,"a",(function(){return s})),a.d(e,"b",(function(){return c})),a.d(e,"f",(function(){return d})),a.d(e,"h",(function(){return u}));var r=a("6b6c");function i(t){return Object(r.a)({url:"/export/user_list",method:"get",params:t})}function l(t){return Object(r.a)({url:"/export/order_list",method:"get",params:t})}function n(t){return Object(r.a)({url:"/export/order_delivery_list",method:"get",params:t})}function o(t){return Object(r.a)({url:"/export/product_list",method:"get",params:t})}function s(t){return Object(r.a)({url:"/export/bargain_list",method:"get",params:t})}function c(t){return Object(r.a)({url:"/export/combination_list",method:"get",params:t})}function d(t){return Object(r.a)({url:"/export/seckill_list",method:"get",params:t})}function u(t){return Object(r.a)({url:"/export/member_card/".concat(t),method:"get"})}},9130:function(t,e,a){},9144:function(t,e,a){"use strict";a.r(e);var r=a("5530"),i=a("c24f"),l=a("2f62");r={name:"card",props:{id:{default:0}},data:function(){return{data1:[],loading:!1,total:0,table:{page:1,limit:15,card_number:"",phone:"",is_use:""}}},computed:Object(r.a)(Object(r.a)({},Object(l.d)("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:"80px"},labelPosition:function(){return this.isMobile?"top":"right"}}),created:function(){this.getMemberCard()},methods:{onchangeIsShow:function(t){var e=this;t={card_id:t.id,status:t.status};Object(i.v)(t).then((function(t){e.$message.success(t.msg),e.getMemberCard()})).catch((function(t){e.$message.error(t.msg)}))},getMemberCard:function(){var t=this;this.loading=!0,Object(i.T)(this.id,this.table).then((function(e){t.loading=!1,t.data1=e.data.list,t.total=e.data.count})).catch((function(e){t.loading=!1,t.$message.error(e.msg)}))},formSubmit:function(){this.table.page=1,this.getMemberCard()}}},l=a("2877"),a=Object(l.a)(r,(function(){var t=this,e=t._self._c;return e("div",[e("el-form",{ref:"formData",attrs:{model:t.table,"label-width":t.labelWidth,"label-position":"right",inline:""},nativeOn:{submit:function(t){t.preventDefault()}}},[e("el-form-item",{attrs:{label:"卡号:"}},[e("el-input",{staticClass:"form_content_width",attrs:{placeholder:"请输入卡号"},model:{value:t.table.card_number,callback:function(e){t.$set(t.table,"card_number",e)},expression:"table.card_number"}})],1),e("el-form-item",{attrs:{label:"手机号:"}},[e("el-input",{staticClass:"form_content_width",attrs:{placeholder:"请输入手机号"},model:{value:t.table.phone,callback:function(e){t.$set(t.table,"phone",e)},expression:"table.phone"}})],1),e("el-form-item",{attrs:{label:"是否领取:"}},[e("el-select",{staticClass:"form_content_width",attrs:{clearable:""},model:{value:t.table.is_use,callback:function(e){t.$set(t.table,"is_use",e)},expression:"table.is_use"}},[e("el-option",{attrs:{value:"1",label:"已领取"}}),e("el-option",{attrs:{value:"0",label:"未领取"}})],1)],1),e("el-form-item",[e("el-button",{attrs:{type:"primary"},on:{click:t.formSubmit}},[t._v("搜索")])],1)],1),e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"table",attrs:{data:t.data1,"highlight-current-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"}},[e("el-table-column",{attrs:{label:"编号","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.id))])]}}])}),e("el-table-column",{attrs:{label:"卡号","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.card_number))])]}}])}),e("el-table-column",{attrs:{label:"密码","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.card_password))])]}}])}),e("el-table-column",{attrs:{label:"领取人名称","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.username||"-"))])]}}])}),e("el-table-column",{attrs:{label:"领取人电话","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.phone||"-"))])]}}])}),e("el-table-column",{attrs:{label:"领取时间","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.use_time))])]}}])}),e("el-table-column",{attrs:{label:"是否激活","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-switch",{attrs:{"active-value":1,"inactive-value":0,value:a.row.status,size:"large"},on:{change:function(e){return t.onchangeIsShow(a.row)}},model:{value:a.row.status,callback:function(e){t.$set(a.row,"status",e)},expression:"scope.row.status"}})]}}])})],1),e("div",{staticClass:"acea-row row-right page"},[t.total?e("pagination",{attrs:{total:t.total,page:t.table.page,limit:t.table.limit},on:{"update:page":function(e){return t.$set(t.table,"page",e)},"update:limit":function(e){return t.$set(t.table,"limit",e)},pagination:t.getMemberCard}}):t._e()],1)],1)}),[],!1,null,null,null);e.default=a.exports},b13f:function(t,e,a){"use strict";a("9130")}}]);