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.
yanzong/public/js/user.5438b09c.js

3 lines
37 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["user"],{"03ab":function(e,t,r){"use strict";r("42ea")},"0ea6":function(e,t,r){},1158:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"}),t("a-table",{attrs:{rowKey:function(e){return e.id},columns:e.columns,"data-source":e.list,scroll:{x:1300},bordered:"",pagination:!1},scopedSlots:e._u([{key:"main_info",fn:function(r){return t("span",{},[t("p",[e._v(e._s(r.user.nick_name))]),t("p",{staticClass:"c-p"},[e._v(e._s(r.user.mobile))])])}},{key:"type",fn:function(r){return t("span",{},[1==r.type?t("p",[e._v("普通")]):t("p",[e._v("增值税")])])}},{key:"source",fn:function(r){return t("span",{},[1==r.source?t("p",[e._v("个人")]):t("p",[e._v("单位")])])}}])}),t("a-pagination",{staticStyle:{float:"right"},attrs:{"default-page-size":e.queryParam.pageSize,pageSizes:e.queryParam.pageSize,total:e.total,showSizeChanger:!0,showQuickJumper:!0,pageSizeOptions:e.pageSizeOptions,layout:"total, sizes, prev, pager, next, jumper",showTotal:e.showTotal},on:{showSizeChange:e.handleSizeChange,change:e.handlePageChange},model:{value:e.queryParam.page,callback:function(t){e.$set(e.queryParam,"page",t)},expression:"queryParam.page"}})],1)},n=[],i=(r("d3b7"),r("b775")),o={list:"/user.invoice/index"};function s(e){return Object(i["b"])({url:o.list,method:"post",params:e})}var l=r("2af9"),c=[{title:"ID",dataIndex:"id",ellipsis:!0},{title:"会员昵称/手机号",scopedSlots:{customRender:"main_info"}},{title:"发票类型",dataIndex:"type",scopedSlots:{customRender:"type"}},{title:"抬头类型",dataIndex:"source",scopedSlots:{customRender:"source"}},{title:"单位名称",dataIndex:"header"},{title:"税号",dataIndex:"duty_no"},{title:"开户银行",dataIndex:"bank_name"},{title:"银行卡号",dataIndex:"bank_no"},{title:"单位地址",dataIndex:"address"},{title:"单位电话",dataIndex:"phone"}],u={name:"Index",components:{ContentHeader:l["a"],STable:l["d"]},data:function(){return{searchForm:this.$form.createForm(this),categoryList:[],orderStatusList:[],queryParam:{order_status:"0",recovery_name:"",category_id:"",order_no:"",page:1,pageSize:15},pageSizeOptions:["15","30","50","100","200","300","400","500"],showTotal:function(e){return"共 ".concat(e," 条记录")},total:0,isLoading:!1,columns:c,selectedRowKeys:[],list:[]}},created:function(){this.fetchData()},computed:{rowSelection:function(){return{selectedRowKeys:this.selectedRowKeys,onChange:this.onSelectChange}}},methods:{onSelectChange:function(e){this.selectedRowKeys=e},handleTabs:function(e){this.queryParam.page=1,this.queryParam.order_status=e.target.value,this.fetchData()},handleSearch:function(){this.queryParam.page=1,this.fetchData()},fetchData:function(){var e=this;this.isLoading=!0,s(this.queryParam).then((function(t){e.list=t.data.list,e.total=t.data.total})).finally((function(){return e.isLoading=!1}))},handleReset:function(){this.searchForm.resetFields()},handlePageChange:function(e,t){this.queryParam.page=e,this.queryParam.pageSize=t,this.fetchData()},handleSizeChange:function(e,t){this.queryParam.page=e,this.queryParam.pageSize=t,this.fetchData()},handleRefresh:function(){this.selectedRowKeys=[],this.fetchData()}}},d=u,f=(r("c4f0"),r("2877")),m=Object(f["a"])(d,a,n,!1,null,"ac058ce2",null);t["default"]=m.exports},"1da1":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));r("d3b7");function a(e,t,r,a,n,i,o){try{var s=e[i](o),l=s.value}catch(c){return void r(c)}s.done?t(l):Promise.resolve(l).then(a,n)}function n(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function s(e){a(o,n,i,s,l,"next",e)}function l(e){a(o,n,i,s,l,"throw",e)}s(void 0)}))}}},"42ea":function(e,t,r){},"565d":function(e,t,r){},"57af":function(e,t,r){"use strict";r("96e1")},"5f30":function(e,t,r){"use strict";r("565d")},"75f1":function(e,t,r){"use strict";r.r(t);r("b0c0");var a=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("div",{staticClass:"row-item-tab clearfix"},[t("div",{staticClass:"tab-list fl-l"},[t("a-radio-group",{attrs:{defaultValue:e.queryParam.type},on:{change:e.handleTabs}},[t("a-radio-button",{attrs:{value:"0"}},[e._v("全部")]),e._l(e.typeList,(function(r,a){return t("a-radio-button",{key:a,attrs:{value:r.value}},[e._v(e._s(r.name))])}))],2)],1),t("a-button",{staticClass:"fl-l",attrs:{type:"primary",icon:"plus"},on:{click:function(t){return e.handleCreate()}}},[e._v("新增")])],1)]),e.isLoading?e._e():t("a-table",{attrs:{rowKey:"identity_id",columns:e.columns,dataSource:e.dataList,defaultExpandAllRows:!0,expandIconColumnIndex:1,pagination:!1,loading:e.isLoading},scopedSlots:e._u([{key:"month",fn:function(r){return t("span",{},[t("p",{staticClass:"twoline-hide"},[e._v(e._s(r)+"个月")])])}},{key:"action",fn:function(r,a){return t("span",{},[[t("a",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}],staticStyle:{"margin-right":"8px"},on:{click:function(t){return e.handleEdit(a)}}},[e._v("编辑")]),t("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],attrs:{icon:"delete"},on:{click:function(t){return e.handleDelete([a.identity_id])}}},[e._v("删除")])]],2)}}],null,!1,3262084385)}),t("add",{ref:"AddRef",on:{handleSubmit:e.handleRefresh}}),t("edit",{ref:"EditRef",on:{handleSubmit:e.handleRefresh}})],1)},n=[],i=r("c7eb"),o=r("1da1"),s=(r("d3b7"),r("b775")),l={list:"/user.identity/list",add:"/user.identity/add",edit:"/user.identity/edit",delete:"/user.identity/delete",typeList:"/user.identity/typeList"};function c(e){return Object(s["b"])({url:l.list,method:"post",data:e})}function u(e){return Object(s["b"])({url:l.add,method:"post",data:e})}function d(e){return Object(s["b"])({url:l.edit,method:"post",data:e})}function f(e){return Object(s["b"])({url:l.delete,method:"post",data:e})}function m(e){return Object(s["b"])({url:l.typeList,method:"post",params:e})}var h=r("2af9"),p=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:"新增",width:500,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),t("a-form-item",{attrs:{label:"价格",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["price",{initialValue:1,rules:[{required:!0,message:"请输入价格"}]}],expression:"['price', { initialValue: 1, rules: [{ required: true, message: '请输入价格' }] }]"}],attrs:{min:.01,precision:2}}),t("span",{staticClass:"ml-10"},[e._v("元")])],1),t("a-form-item",{attrs:{label:"时效",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["month",{initialValue:1,rules:[{required:!0,message:"请输入时效"}]}],expression:"['month', { initialValue: 1, rules: [{ required: true, message: '请输入时效' }] }]"}],attrs:{min:1}}),t("span",{staticClass:"ml-10"},[e._v("月")])],1),t("a-form-item",{attrs:{label:"身份",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["type",{initialValue:10,rules:[{required:!0}]}],expression:"['type', { initialValue: 10, rules: [{ required: true }] }]"}]},e._l(e.typeList,(function(r,a){return t("a-radio",{key:a,attrs:{value:r.value}},[e._v(e._s(r.name))])})),1)],1)],1)],1)],1)},v=[],b={components:{},props:{},data:function(){return{title:"",labelCol:{span:7},wrapperCol:{span:13},typeList:[],visible:!1,confirmLoading:!1,form:this.$form.createForm(this)}},methods:{add:function(){this.visible=!0,this.getTypeList()},handleSubmit:function(e){var t=this;e.preventDefault();var r=this.form.validateFields;r((function(e,r){e||t.onFormSubmit(r)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},getTypeList:function(){var e=this;this.isLoading=!0,m().then((function(t){e.typeList=t.data.list})).finally((function(){return e.isLoading=!1}))},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,u({form:e}).then((function(r){t.$message.success(r.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(e){t.confirmLoading=!1}))}}},g=b,y=r("2877"),C=Object(y["a"])(g,p,v,!1,null,null,null),w=C.exports,x=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:"编辑",width:500,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),t("a-form-item",{attrs:{label:"价格",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["price",{initialValue:1,rules:[{required:!0,message:"请输入价格"}]}],expression:"['price', { initialValue: 1, rules: [{ required: true, message: '请输入价格' }] }]"}],attrs:{min:.01,precision:2}}),t("span",{staticClass:"ml-10"},[e._v("元")])],1),t("a-form-item",{attrs:{label:"时效",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["month",{initialValue:1,rules:[{required:!0,message:"请输入时效"}]}],expression:"['month', { initialValue: 1, rules: [{ required: true, message: '请输入时效' }] }]"}],attrs:{min:1}}),t("span",{staticClass:"ml-10"},[e._v("月")])],1),t("a-form-item",{attrs:{label:"身份",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["type",{initialValue:10,rules:[{required:!0}]}],expression:"['type', { initialValue: 10, rules: [{ required: true }] }]"}]},e._l(e.typeList,(function(r,a){return t("a-radio",{key:a,attrs:{value:r.value}},[e._v(e._s(r.name))])})),1)],1)],1)],1)],1)},L=[],E={components:{},props:{},data:function(){return{title:"",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),record:{},typeList:[]}},methods:{edit:function(e){this.getTypeList(),this.visible=!0,this.record=e,this.setFieldsValue()},getTypeList:function(){var e=this;this.isLoading=!0,m().then((function(t){e.typeList=t.data.list})).finally((function(){return e.isLoading=!1}))},setFieldsValue:function(){var e=this.record,t=this.form.setFieldsValue;this.$nextTick((function(){t(_.pick(e,["name","price","month","type"]))}))},handleSubmit:function(e){var t=this;e.preventDefault();var r=this.form.validateFields;r((function(e,r){e||t.onFormSubmit(r)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,d({identityId:this.record["identity_id"],form:e}).then((function(r){t.$message.success(r.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(e){t.confirmLoading=!1}))}}},S=E,R=Object(y["a"])(S,x,L,!1,null,null,null),k=R.exports,P=[{title:"ID",dataIndex:"identity_id"},{title:"名称",dataIndex:"name"},{title:"价格",dataIndex:"price",scopedSlots:{customRender:"server_name"}},{title:"时效",dataIndex:"month",scopedSlots:{customRender:"month"}},{title:"类别",dataIndex:"type_text"},{title:"添加时间",width:"180px",dataIndex:"create_time"},{title:"操作",dataIndex:"action",width:"150px",fixed:"right",scopedSlots:{customRender:"action"}}],q={name:"Index",components:{ContentHeader:h["a"],STable:h["d"],Add:w,Edit:k},data:function(){return{searchForm:this.$form.createForm(this),queryParam:{type:"0",page:1},dataList:[],typeList:[],isLoading:!1,columns:P}},created:function(){this.$route.query.type&&(this.queryParam.type=this.$route.query.type),this.getTypeList(),this.getList()},computed:{rowSelection:function(){return{selectedRowKeys:this.selectedRowKeys,onChange:this.onSelectChange}}},methods:{getList:function(){var e=this;this.isLoading=!0,c(this.queryParam).then((function(t){e.dataList=t.data.list})).finally((function(){return e.isLoading=!1}))},onSelectChange:function(e){this.selectedRowKeys=e},handleTabs:function(e){this.queryParam.type=e.target.value,this.handleRefresh(!0)},getTypeList:function(){var e=this;this.isLoading=!0,m().then((function(t){e.typeList=t.data.list})).finally((function(){return e.isLoading=!1}))},handleDelete:function(e){var t=this,r=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return f({identityId:e}).then((function(e){t.$message.success(e.message,1.5),t.handleRefresh()})).finally((function(e){return r.destroy()}))}})},handleCreate:function(){this.$refs.AddRef.add()},handleEdit:function(e){var t=this;return Object(o["a"])(Object(i["a"])().mark((function r(){return Object(i["a"])().wrap((function(r){while(1)switch(r.prev=r.next){case 0:t.$refs.EditRef.edit(e);case 1:case"end":return r.stop()}}),r)})))()},handleRefresh:function(){this.getList()}}},O=q,T=(r("5f30"),Object(y["a"])(O,a,n,!1,null,"903cffb6",null));t["default"]=T.exports},"88bc":function(e,t,r){(function(t){var r=1/0,a=9007199254740991,n="[object Arguments]",i="[object Function]",o="[object GeneratorFunction]",s="[object Symbol]",l="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,u=l||c||Function("return this")();function d(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function f(e,t){var r=-1,a=e?e.length:0,n=Array(a);while(++r<a)n[r]=t(e[r],r,e);return n}function m(e,t){var r=-1,a=t.length,n=e.length;while(++r<a)e[n+r]=t[r];return e}var h=Object.prototype,p=h.hasOwnProperty,v=h.toString,b=u.Symbol,g=h.propertyIsEnumerable,y=b?b.isConcatSpreadable:void 0,_=Math.max;function C(e,t,r,a,n){var i=-1,o=e.length;r||(r=E),n||(n=[]);while(++i<o){var s=e[i];t>0&&r(s)?t>1?C(s,t-1,r,a,n):m(n,s):a||(n[n.length]=s)}return n}function w(e,t){return e=Object(e),x(e,t,(function(t,r){return r in e}))}function x(e,t,r){var a=-1,n=t.length,i={};while(++a<n){var o=t[a],s=e[o];r(s,o)&&(i[o]=s)}return i}function L(e,t){return t=_(void 0===t?e.length-1:t,0),function(){var r=arguments,a=-1,n=_(r.length-t,0),i=Array(n);while(++a<n)i[a]=r[t+a];a=-1;var o=Array(t+1);while(++a<t)o[a]=r[a];return o[t]=i,d(e,this,o)}}function E(e){return k(e)||R(e)||!!(y&&e&&e[y])}function S(e){if("string"==typeof e||N(e))return e;var t=e+"";return"0"==t&&1/e==-r?"-0":t}function R(e){return q(e)&&p.call(e,"callee")&&(!g.call(e,"callee")||v.call(e)==n)}var k=Array.isArray;function P(e){return null!=e&&T(e.length)&&!O(e)}function q(e){return I(e)&&P(e)}function O(e){var t=F(e)?v.call(e):"";return t==i||t==o}function T(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function F(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function I(e){return!!e&&"object"==typeof e}function N(e){return"symbol"==typeof e||I(e)&&v.call(e)==s}var j=L((function(e,t){return null==e?{}:w(e,f(C(t,1),S))}));e.exports=j}).call(this,r("c8ba"))},"96e1":function(e,t,r){},c4f0:function(e,t,r){"use strict";r("0ea6")},c7eb:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));r("a4d3"),r("e01a"),r("d3b7"),r("d28b"),r("3ca3"),r("ddb0"),r("b636"),r("944a"),r("0c47"),r("23dc"),r("3410"),r("159b"),r("b0c0"),r("131a"),r("fb6a");var a=r("53ca");function n(){
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
n=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},l=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,r){return e[t]=r}}function f(e,t,r,a){var n=t&&t.prototype instanceof y?t:y,i=Object.create(n.prototype),s=new T(a||[]);return o(i,"_invoke",{value:k(e,r,s)}),i}function m(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h="suspendedStart",p="suspendedYield",v="executing",b="completed",g={};function y(){}function _(){}function C(){}var w={};d(w,l,(function(){return this}));var x=Object.getPrototypeOf,L=x&&x(x(F([])));L&&L!==r&&i.call(L,l)&&(w=L);var E=C.prototype=y.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function r(n,o,s,l){var c=m(e[n],e,o);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==Object(a["a"])(d)&&i.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,s,l)}),(function(e){r("throw",e,s,l)})):t.resolve(d).then((function(e){u.value=e,s(u)}),(function(e){return r("throw",e,s,l)}))}l(c.arg)}var n;o(this,"_invoke",{value:function(e,a){function i(){return new t((function(t,n){r(e,a,t,n)}))}return n=n?n.then(i,i):i()}})}function k(t,r,a){var n=h;return function(i,o){if(n===v)throw new Error("Generator is already running");if(n===b){if("throw"===i)throw o;return{value:e,done:!0}}for(a.method=i,a.arg=o;;){var s=a.delegate;if(s){var l=P(s,a);if(l){if(l===g)continue;return l}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(n===h)throw n=b,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);n=v;var c=m(t,r,a);if("normal"===c.type){if(n=a.done?b:p,c.arg===g)continue;return{value:c.arg,done:a.done}}"throw"===c.type&&(n=b,a.method="throw",a.arg=c.arg)}}}function P(t,r){var a=r.method,n=t.iterator[a];if(n===e)return r.delegate=null,"throw"===a&&t.iterator["return"]&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),g;var i=m(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var o=i.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function q(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(q,this),this.reset(!0)}function F(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function r(){for(;++n<t.length;)if(i.call(t,n))return r.value=t[n],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(Object(a["a"])(t)+" is not iterable")}return _.prototype=C,o(E,"constructor",{value:C,configurable:!0}),o(C,"constructor",{value:_,configurable:!0}),_.displayName=d(C,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,C):(e.__proto__=C,d(e,u,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},S(R.prototype),d(R.prototype,c,(function(){return this})),t.AsyncIterator=R,t.async=function(e,r,a,n,i){void 0===i&&(i=Promise);var o=new R(f(e,r,a,n),i);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},S(E),d(E,u,"Generator"),d(E,l,(function(){return this})),d(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var a in t)r.push(a);return r.reverse(),function e(){for(;r.length;){var a=r.pop();if(a in t)return e.value=a,e.done=!1,e}return e.done=!0,e}},t.values=F,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(a,n){return s.type="throw",s.arg=t,r.next=a,n&&(r.method="next",r.arg=e),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],s=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var l=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(l&&c){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&i.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var n=a;break}}n&&("break"===e||"continue"===e)&&n.tryLoc<=t&&t<=n.finallyLoc&&(n=null);var o=n?n.completion:{};return o.type=e,o.arg=t,n?(this.method="next",this.next=n.finallyLoc,g):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),O(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if("throw"===a.type){var n=a.arg;O(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,a){return this.delegate={iterator:F(t),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=e),g}},t}},dab6:function(e,t,r){"use strict";r.r(t);r("b0c0");var a=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("a-row",{staticClass:"row-item-search"},[t("a-form",{staticClass:"search-form",attrs:{form:e.searchForm,layout:"inline"},on:{submit:e.handleSearch}},[t("a-form-item",{attrs:{label:"昵称/手机号"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["search"],expression:"['search']"}],attrs:{placeholder:"请输入昵称/手机号"}})],1),e.$module("user-grade")?t("a-form-item",{attrs:{label:"会员等级"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["gradeId",{initialValue:0}],expression:"['gradeId', { initialValue: 0 }]"}]},[t("a-select-option",{attrs:{value:0}},[e._v("全部")]),e._l(e.gradeList,(function(r,a){return t("a-select-option",{key:a,attrs:{value:r.grade_id}},[e._v(e._s(r.name))])}))],2)],1):e._e(),t("a-form-item",{attrs:{label:"注册时间"}},[t("a-range-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["betweenTime"],expression:"['betweenTime']"}],attrs:{format:"YYYY-MM-DD"}})],1),t("a-form-item",{staticClass:"search-btn"},[t("a-button",{attrs:{type:"primary",icon:"search","html-type":"submit"}},[e._v("搜索")])],1)],1)],1)],1),t("s-table",{ref:"table",attrs:{rowKey:"user_id",loading:e.isLoading,columns:e.columns,data:e.loadData,pagination:e.pagination},scopedSlots:e._u([{key:"avatar_url",fn:function(e){return t("span",{},[t("div",{staticClass:"avatar"},[t("img",e?{attrs:{width:"45",height:"45",src:e,alt:"用户头像"}}:{attrs:{width:"45",height:"45",src:r("889b"),alt:"用户头像"}})])])}},{key:"main_info",fn:function(r){return t("span",{},[t("p",[e._v(e._s(r.nick_name))]),t("p",{staticClass:"c-p"},[e._v(e._s(r.mobile))])])}},{key:"grade",fn:function(r){return t("span",{},[r?t("a-tag",[e._v(e._s(r.name))]):t("span",[e._v("--")])],1)}},{key:"balance",fn:function(r,a){return t("span",{},[t("p",[t("span",[e._v("余额:")]),t("span",{staticClass:"c-p"},[e._v(e._s(r))])]),t("p",[t("span",[e._v("积分:")]),t("span",{staticClass:"c-p"},[e._v(e._s(a.points))])])])}},{key:"expend_money",fn:function(r){return t("span",{},[t("span",{staticClass:"c-p"},[e._v(e._s(r))])])}},{key:"platform",fn:function(e){return t("span",{staticClass:"platform"},[t("platform-icon",{attrs:{name:e,showTips:!0,iconSize:17}})],1)}},{key:"action",fn:function(r){return t("span",{staticClass:"actions"},[e.$module("market-recharge")?t("a",{directives:[{name:"action",rawName:"v-action:recharge",arg:"recharge"}],attrs:{title:"会员充值"},on:{click:function(t){return e.handleRecharge(r)}}},[e._v("充值")]):e._e(),e.$module("user-grade")?t("a",{directives:[{name:"action",rawName:"v-action:grade",arg:"grade"}],attrs:{title:"会员等级"},on:{click:function(t){return e.handleGrade(r)}}},[e._v("等级")]):e._e(),t("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],on:{click:function(t){return e.handleDelete(r)}}},[e._v("删除")])])}}])}),t("GradeForm",{ref:"GradeForm",attrs:{gradeList:e.gradeList},on:{handleSubmit:e.handleRefresh}}),t("RechargeForm",{ref:"RechargeForm",on:{handleSubmit:e.handleRefresh}})],1)},n=[],i=r("5530"),o=(r("d3b7"),r("fa04")),s=r("fab29"),l=r("2e1c"),c=r("2af9"),u=r("8d5f"),d=function(){var e=this,t=e._self._c;return t("a-modal",{staticClass:"noborder",attrs:{title:e.title,width:520,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"会员ID",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("span",[e._v(e._s(e.record.user_id))])]),t("a-form-item",{attrs:{label:"会员身份",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["user_type",{rules:[{required:!0}]}],expression:"['user_type', { rules: [{ required: true }] }]"}],attrs:{placeholder:"请选择会员身份"},on:{change:e.setUserType}},[t("a-select-option",{attrs:{value:0}},[e._v("无身份")]),e._l(e.userTypeList,(function(r,a){return t("a-select-option",{key:a,attrs:{value:r.id}},[e._v(e._s(r.name))])}))],2)],1),e.show_date?t("a-form-item",{attrs:{label:"有效时间",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-date-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["effective_time",{rules:[{message:"请输入有效时间",required:!0}]}],expression:"['effective_time', { rules: [{message: '请输入有效时间',required: true }] }]"}],attrs:{valueFormat:"YYYY-MM-DD"}})],1):e._e(),e.show_date_fx?t("a-form-item",{attrs:{label:"有效时间",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-date-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["fx_effective_time",{rules:[{message:"请输入有效时间",required:!0}]}],expression:"['fx_effective_time', { rules: [{message: '请输入有效时间',required: true }] }]"}],attrs:{valueFormat:"YYYY-MM-DD"}})],1):e._e(),t("a-form-item",{attrs:{label:"管理员备注",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["remark",{rules:[{required:!0,message:"请输入管理员备注"}]}],expression:"['remark', { rules: [{ required: true, message: '请输入管理员备注' }] }]"}],attrs:{placeholder:"请输入管理员备注",rows:3}})],1)],1)],1)],1)},f=[],m=r("88bc"),h=r.n(m),p={components:{},props:{gradeList:{type:Array,required:!0}},data:function(){return{show_date:!1,show_date_fx:!1,title:"设置会员等级",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,fx_effective_time:"",effective_time:"",form:this.$form.createForm(this),record:{},userTypeList:[{id:10,name:"游客"},{id:20,name:"PLUS会员"},{id:30,name:"分销商"},{id:40,name:"店长"}]}},methods:{handle:function(e){this.visible=!0,this.record=e,this.fx_effective_time=e.fx_effective_time,this.effective_time=e.effective_time,30===e.user_type&&e.fx_effective_time?(this.show_date=!1,this.show_date_fx=!0):20===e.user_type||40===e.user_type&&e.effective_time?(this.show_date=!0,this.show_date_fx=!1):(this.show_date=!1,this.show_date_fx=!1),this.setFieldsValue()},setUserType:function(e){30===e?(this.show_date=!1,this.show_date_fx=!0,this.record.fx_effective_time=this.fx_effective_time):20===e||40===e?(this.show_date=!0,this.show_date_fx=!1,this.record.effective_time=this.effective_time):(this.show_date=!1,this.show_date_fx=!1),this.record.user_type=e,this.setFieldsValue()},setFieldsValue:function(){var e=this.record,t=this.form.setFieldsValue;this.$nextTick((function(){t(h()(e,["user_type","effective_time","fx_effective_time"]))})),this.form.getFieldDecorator("grade_id",{initialValue:0,preserve:!0})},handleSubmit:function(e){var t=this;e.preventDefault();var r=this.form.validateFields;r((function(e,r){!e&&t.onFormSubmit(r)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,s["b"]({userId:this.record.user_id,form:e}).then((function(r){t.$message.success(r.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(){return t.confirmLoading=!1}))}}},v=p,b=(r("03ab"),r("2877")),g=Object(b["a"])(v,d,f,!1,null,null,null),y=g.exports,_=function(){var e=this,t=e._self._c;return t("a-modal",{staticClass:"noborder",attrs:{title:e.title,width:520,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-tabs",{attrs:{activeKey:e.activeKey},on:{change:e.onChangeTabs}},[t("a-tab-pane",{key:e.RECHARGE_TYPE_BALANCE,attrs:{tab:"充值余额"}},[e.activeKey===e.RECHARGE_TYPE_BALANCE?[t("a-form-item",{staticClass:"mb-5",attrs:{label:"会员ID",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("span",[e._v(e._s(e.record.user_id))])]),t("a-form-item",{staticClass:"mb-5",attrs:{label:"当前余额",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("span",{staticClass:"c-p"},[e._v(e._s(e.record.balance))])]),t("a-form-item",{attrs:{label:"充值方式",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["".concat(e.RECHARGE_TYPE_BALANCE,".mode"),{initialValue:"inc",rules:[{required:!0}]}],expression:"[`${RECHARGE_TYPE_BALANCE}.mode`, { initialValue: 'inc', rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:"inc"}},[e._v("增加")]),t("a-radio",{attrs:{value:"dec"}},[e._v("减少")]),t("a-radio",{attrs:{value:"final"}},[e._v("最终金额")])],1)],1),t("a-form-item",{attrs:{label:"变更金额",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["".concat(e.RECHARGE_TYPE_BALANCE,".money"),{initialValue:"",rules:[{required:!0,message:"请输入变更的金额"}]}],expression:"[`${RECHARGE_TYPE_BALANCE}.money`, { initialValue: '', rules: [{ required: true, message: '请输入变更的金额' }] }]"}],attrs:{min:.01}})],1),t("a-form-item",{attrs:{label:"管理员备注",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["".concat(e.RECHARGE_TYPE_BALANCE,".remark"),{rules:[{required:!0,message:"请输入管理员备注"}]}],expression:"[`${RECHARGE_TYPE_BALANCE}.remark`, { rules: [{ required: true, message: '请输入管理员备注' }] }]"}],attrs:{placeholder:"请输入管理员备注",rows:3}})],1)]:e._e()],2),t("a-tab-pane",{key:e.RECHARGE_TYPE_POINTS,attrs:{tab:"充值积分"}},[e.activeKey===e.RECHARGE_TYPE_POINTS?[t("a-form-item",{staticClass:"mb-5",attrs:{label:"会员ID",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("span",[e._v(e._s(e.record.user_id))])]),t("a-form-item",{staticClass:"mb-5",attrs:{label:"当前积分",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("span",{staticClass:"c-p"},[e._v(e._s(e.record.points))])]),t("a-form-item",{attrs:{label:"充值方式",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["".concat(e.RECHARGE_TYPE_POINTS,".mode"),{initialValue:"inc",rules:[{required:!0}]}],expression:"[`${RECHARGE_TYPE_POINTS}.mode`, { initialValue: 'inc', rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:"inc"}},[e._v("增加")]),t("a-radio",{attrs:{value:"dec"}},[e._v("减少")]),t("a-radio",{attrs:{value:"final"}},[e._v("最终积分")])],1)],1),t("a-form-item",{attrs:{label:"变更数量",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["".concat(e.RECHARGE_TYPE_POINTS,".value"),{initialValue:"",rules:[{required:!0,message:"请输入变更的金数量"}]}],expression:"[`${RECHARGE_TYPE_POINTS}.value`, { initialValue: '', rules: [{ required: true, message: '请输入变更的金数量' }] }]"}],attrs:{min:.01}})],1),t("a-form-item",{attrs:{label:"管理员备注",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["".concat(e.RECHARGE_TYPE_POINTS,".remark"),{rules:[{required:!0,message:"请输入管理员备注"}]}],expression:"[`${RECHARGE_TYPE_POINTS}.remark`, { rules: [{ required: true, message: '请输入管理员备注' }] }]"}],attrs:{placeholder:"请输入管理员备注",rows:3}})],1)]:e._e()],2)],1)],1)],1)],1)},C=[],w="balance",x="points",L={components:{},data:function(){return{title:"会员充值",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),activeKey:w,RECHARGE_TYPE_BALANCE:w,RECHARGE_TYPE_POINTS:x,record:{}}},methods:{handle:function(e){this.visible=!0,this.record=e},onChangeTabs:function(e){this.activeKey=e},handleSubmit:function(e){var t=this;e.preventDefault();var r=this.form.validateFields;r((function(e,r){!e&&t.onFormSubmit(r)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this,r=this.record,a=this.activeKey;this.confirmLoading=!0,s["d"]({userId:r.user_id,target:a,form:e}).then((function(r){t.$message.success(r.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(){return t.confirmLoading=!1}))}}},E=L,S=(r("57af"),Object(b["a"])(E,_,C,!1,null,"2bace808",null)),R=S.exports,k=Object(o["c"])([{title:"会员ID",dataIndex:"user_id"},{title:"会员头像",dataIndex:"avatar_url",scopedSlots:{customRender:"avatar_url"}},{title:"昵称/手机号",scopedSlots:{customRender:"main_info"}},{title:"会员身份",dataIndex:"user_type_text"},{title:"余额/积分",dataIndex:"balance",scopedSlots:{customRender:"balance"}},{title:"实际消费金额",dataIndex:"expend_money",scopedSlots:{customRender:"expend_money"}},{title:"注册来源",dataIndex:"platform",scopedSlots:{customRender:"platform"}},{title:"注册时间",dataIndex:"create_time"},{title:"操作",width:"180px",scopedSlots:{customRender:"action"}}]),P={name:"Index",components:{STable:c["d"],GradeForm:y,RechargeForm:R,PlatformIcon:u["a"]},data:function(){var e=this;return{searchForm:this.$form.createForm(this),queryParam:{},isLoading:!1,columns:k,loadData:function(t){return s["c"](Object(i["a"])(Object(i["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))},gradeList:[]}},created:function(){this.getGradeList()},methods:{getGradeList:function(){var e=this;l["a"]().then((function(t){e.gradeList=t.data.list}))},handleGrade:function(e){this.$refs.GradeForm.handle(e)},handleRecharge:function(e){this.$refs.RechargeForm.handle(e)},handleDelete:function(e){var t=this,r=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return s["a"]({userId:e.user_id}).then((function(e){t.$message.success(e.message,1.5),t.handleRefresh()})).finally((function(e){return r.destroy()}))}})},handleSearch:function(e){var t=this;e.preventDefault(),this.searchForm.validateFields((function(e,r){e||(t.queryParam=Object(i["a"])(Object(i["a"])({},t.queryParam),r),t.handleRefresh(!0))}))},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(e)}}},q=P,O=(r("e232"),Object(b["a"])(q,a,n,!1,null,"0479cb85",null));t["default"]=O.exports},e232:function(e,t,r){"use strict";r("ecd2")},ecd2:function(e,t,r){}}]);