徐总多门店
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 lines
39 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-5373e7ba"],{"31b4":function(t,e,r){"use strict";var n=r("9860"),o=r.n(n),i=r("b6bd"),a=r("2f62");function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(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 c(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=u(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==u(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var l={name:"edit",components:{formCreate:o.a.$form()},computed:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){c(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},Object(a.e)("admin/userLevel",["taskId","levelId"])),props:{FromData:{type:Object,default:null},userEdit:{type:Number,default:0}},data:function(){return{modals:!1,type:0,config:{global:{upload:{props:{onSuccess:function(t,e){200===t.status?e.url=t.data.src:this.Message.error(t.msg)}}}}},isDisable:!1}},methods:{couponsType:function(){this.$parent.addType(this.type)},onSubmit:function(t){var e,r=this;(setTimeout((function(){r.isDisable=!1}),1e3),this.isDisable)||(this.isDisable=!0,e=t,Object(i.a)({url:this.FromData.action,method:this.FromData.method,data:e}).then((function(t){r.$parent.getList(),r.$Message.success(t.msg),r.modals=!1,setTimeout((function(){r.$emit("submitFail")}),1e3)})).catch((function(t){r.$Message.error(t.msg)})))},cancel:function(){this.type=0}}},f=(r("c262"),r("2877")),h=Object(f.a)(l,(function(){var t=this,e=t._self._c;return t.FromData?e("div",[e("Modal",{class:t.userEdit?"userEdit":"",attrs:{scrollable:"","footer-hide":"",closable:"",title:t.FromData.title,width:"700"},on:{"on-cancel":t.cancel},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[["/marketing/coupon/save.html"===t.FromData.action?e("div",{staticClass:"radio acea-row row-middle"},[e("div",{staticClass:"name ivu-form-item-content"},[t._v("优惠券类型")]),e("Radio-group",{on:{"on-change":t.couponsType},model:{value:t.type,callback:function(e){t.type=e},expression:"type"}},[e("Radio",{attrs:{label:0}},[t._v("通用券")]),e("Radio",{attrs:{label:1}},[t._v("品类券")]),e("Radio",{attrs:{label:2}},[t._v("商品券")])],1)],1):t._e()],e("form-create",{ref:"fc",staticClass:"formBox",attrs:{option:t.config,rule:Array.from(t.FromData.rules),handleIcon:"false"},on:{"on-submit":t.onSubmit}})],2)],1):t._e()}),[],!1,null,"2850396f",null);e.a=h.exports},"33ca":function(t,e,r){"use strict";r("99a2")},"5cbd":function(t,e,r){"use strict";r.r(e);var n=r("2f62"),o=r("c24f"),i=r("31b4");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */u=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:S(t,r,u)}),a}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var m="suspendedStart",p="suspendedYield",v="executing",g="completed",b={};function y(){}function w(){}function _(){}var O={};f(O,s,(function(){return this}));var j=Object.getPrototypeOf,x=j&&j(j(D([])));x&&x!==r&&n.call(x,s)&&(O=x);var L=_.prototype=y.prototype=Object.create(O);function k(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function F(t,e){function r(o,i,u,s){var c=d(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==a(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,u,s)}),(function(t){r("throw",t,u,s)})):e.resolve(f).then((function(t){l.value=t,u(l)}),(function(t){return r("throw",t,u,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=m;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var s=P(u,n);if(s){if(s===b)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===m)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var c=d(e,r,n);if("normal"===c.type){if(o=n.done?g:p,c.arg===b)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=g,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(a(e)+" is not iterable")}return w.prototype=_,o(L,"constructor",{value:_,configurable:!0}),o(_,"constructor",{value:w,configurable:!0}),w.displayName=f(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,f(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},k(F.prototype),f(F.prototype,c,(function(){return this})),e.AsyncIterator=F,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new F(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(L),f(L,l,"Generator"),f(L,s,(function(){return this})),f(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,b):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),b},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},e}function s(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}function c(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){s(i,n,o,a,u,"next",t)}function u(t){s(i,n,o,a,u,"throw",t)}a(void 0)}))}}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 f(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function h(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=a(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==a(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var d={name:"task",components:{editFrom:i.a},data:function(){return{grid:{xl:10,lg:10,md:12,sm:24,xs:24},modals:!1,levelFrom:{is_show:"",name:"",page:1,limit:20},total:0,levelLists:[],loading:!1,columns1:[{title:"ID",key:"id",sortable:!0,width:80},{title:"等级名称",key:"level_name",minWidth:100},{title:"任务名称",key:"name",minWidth:120},{title:"排序",sort:"grade",sortable:!0,minWidth:100},{title:"是否显示",slot:"is_shows",minWidth:110},{title:"务必达成",slot:"is_musts",minWidth:135},{title:"任务说明",key:"illustrate",minWidth:120},{title:"操作",slot:"action",fixed:"right",minWidth:120}],FromData:null,ids:0,modalTitleSs:"",titleType:"task"}},computed:f(f(f({},Object(n.e)("admin/layout",["isMobile"])),Object(n.e)("admin/userLevel",["levelId"])),{},{labelWidth:function(){return this.isMobile?void 0:75},labelPosition:function(){return this.isMobile?"top":"right"}}),methods:f(f({},Object(n.d)("admin/userLevel",["getTaskId","getlevelId"])),{},{add:function(){this.ids="",this.getFrom()},getFrom:function(){var t=this,e={id:this.ids,level_id:this.levelId};this.$modalForm(Object(o.f)(e)).then((function(){return t.getList()}))},edit:function(t){this.ids=t.id,this.getFrom()},handleReset:function(){this.modals=!1},userSearchs:function(){this.getList()},getList:function(){var t=this;this.loading=!0,this.levelFrom.is_show=this.levelFrom.is_show||"",Object(o.P)(this.levelId,this.levelFrom).then(function(){var e=c(u().mark((function e(r){var n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.data,t.levelLists=n.list,t.total=r.data.count,t.loading=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},pageChange:function(t){this.levelFrom.page=t,this.getList()},onchangeIsShow:function(t){var e=this,r={id:t.id,is_show:t.is_show};Object(o.L)(r).then(function(){var t=c(u().mark((function t(r){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(r.msg);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))},onchangeIsMust:function(t){var e=this,r={id:t.id,is_must:t.is_must};Object(o.K)(r).then(function(){var t=c(u().mark((function t(r){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(r.msg);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))},submitFail:function(){this.getList()},del:function(t,e,r){var n=this,o={title:e,num:r,url:"user/user_level/delete_task/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(o).then((function(t){n.$Message.success(t.msg),n.levelLists.splice(r,1)})).catch((function(t){n.$Message.error(t.msg)}))}})},m=r("2877"),p=Object(m.a)(d,(function(){var t=this,e=t._self._c;return e("Modal",{attrs:{"z-index":1,scrollable:"","footer-hide":"",closable:"",title:"等级任务","mask-closable":!1,width:"950"},on:{"on-cancel":t.handleReset},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[e("Form",{ref:"levelFrom",attrs:{model:t.levelFrom,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[e("Row",{attrs:{type:"flex",gutter:24}},[e("Col",t._b({},"Col",t.grid,!1),[e("FormItem",{attrs:{label:"状态:"}},[e("Select",{attrs:{placeholder:"是否显示",clearable:""},on:{"on-change":t.userSearchs},model:{value:t.levelFrom.is_show,callback:function(e){t.$set(t.levelFrom,"is_show",e)},expression:"levelFrom.is_show"}},[e("Option",{attrs:{value:"1"}},[t._v("显示")]),e("Option",{attrs:{value:"0"}},[t._v("不显示")])],1)],1)],1),e("Col",t._b({},"Col",t.grid,!1),[e("FormItem",{attrs:{label:"任务名称:",prop:"status2","label-for":"status2"}},[e("Input",{staticStyle:{width:"100%"},attrs:{search:"","enter-button":"",placeholder:"请输入任务名称"},on:{"on-search":t.userSearchs},model:{value:t.levelFrom.name,callback:function(e){t.$set(t.levelFrom,"name",e)},expression:"levelFrom.name"}})],1)],1)],1)],1),e("Divider",{attrs:{dashed:""}}),e("Row",{attrs:{type:"flex"}},[e("Col",t._b({staticClass:"mb15"},"Col",t.grid,!1),[e("Button",{attrs:{type:"primary",icon:"md-add"},on:{click:t.add}},[t._v("添加等级任务")])],1),e("Col",{staticClass:"userAlert",attrs:{span:"24"}},[e("Alert",{attrs:{"show-icon":"",closable:""}},[t._v("添加等级任务,任务类型中的{$num}会自动替换成限定数量+系统预设的单位生成任务名")])],1)],1),e("Divider",{attrs:{dashed:""}}),e("Table",{ref:"table",attrs:{columns:t.columns1,data:t.levelLists,loading:t.loading,"no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"is_shows",fn:function(r){var n=r.row;return r.index,[e("i-switch",{attrs:{value:n.is_show,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.onchangeIsShow(n)}},model:{value:n.is_show,callback:function(e){t.$set(n,"is_show",e)},expression:"row.is_show"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("显示")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("隐藏")])])]}},{key:"is_musts",fn:function(r){var n=r.row;return r.index,[e("i-switch",{attrs:{value:n.is_must,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.onchangeIsMust(n)}},model:{value:n.is_must,callback:function(e){t.$set(n,"is_must",e)},expression:"row.is_must"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("全部完成")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("达成其一")])])]}},{key:"action",fn:function(r){var n=r.row,o=r.index;return[e("a",{on:{click:function(e){return t.edit(n)}}},[t._v("编辑 | ")]),e("a",{on:{click:function(e){return t.del(n,"删除等级任务",o)}}},[t._v(" 删除")])]}}])}),e("div",{staticClass:"acea-row row-right page"},[e("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"","page-size":t.levelFrom.limit},on:{"on-change":t.pageChange}})],1),e("edit-from",{ref:"edits",attrs:{FromData:t.FromData,titleType:t.titleType},on:{submitFail:t.submitFail}})],1)}),[],!1,null,"95adbe0c",null).exports;function v(t){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */g=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:S(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",d="suspendedYield",m="executing",p="completed",b={};function y(){}function w(){}function _(){}var O={};c(O,a,(function(){return this}));var j=Object.getPrototypeOf,x=j&&j(j(D([])));x&&x!==r&&n.call(x,a)&&(O=x);var L=_.prototype=y.prototype=Object.create(O);function k(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function F(t,e){function r(o,i,a,u){var s=f(t[o],t,i);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==v(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,u)}))}u(s.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=h;return function(i,a){if(o===m)throw Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var s=P(u,n);if(s){if(s===b)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var c=f(e,r,n);if("normal"===c.type){if(o=n.done?p:d,c.arg===b)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(v(e)+" is not iterable")}return w.prototype=_,o(L,"constructor",{value:_,configurable:!0}),o(_,"constructor",{value:w,configurable:!0}),w.displayName=c(_,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,c(t,s,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},k(F.prototype),c(F.prototype,u,(function(){return this})),e.AsyncIterator=F,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new F(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(L),c(L,s,"Generator"),c(L,a,(function(){return this})),c(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,b):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),b},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},e}function b(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}function y(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){b(i,n,o,a,u,"next",t)}function u(t){b(i,n,o,a,u,"throw",t)}a(void 0)}))}}function w(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 _(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?w(Object(r),!0).forEach((function(e){O(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function O(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=v(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==v(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var j={name:"user_level",components:{editFrom:i.a,taskList:p},data:function(){return{grid:{xl:7,lg:7,md:12,sm:24,xs:24},loading:!1,columns1:[{title:"等级",key:"grade",minWidth:100},{title:"等级图标",slot:"icons",minWidth:100},{title:"等级名称",key:"name",minWidth:120},{title:"享受折扣(%)",key:"discount",minWidth:100},{title:"解锁经验值",key:"exp_num",minWidth:100},{title:"是否显示",slot:"is_shows",minWidth:120},{title:"等级说明",key:"explain",minWidth:120},{title:"操作",slot:"action",fixed:"right",width:120}],levelFrom:{is_show:"",title:"",page:1,limit:10},levelLists:[],total:0,FromData:null,imgName:"",visible:!1,levelId:0,modalTitleSs:"",titleType:"level",modelTask:!1,num:0}},created:function(){this.getList()},computed:_(_({},Object(n.e)("admin/layout",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:96},labelPosition:function(){return this.isMobile?"top":"right"}}),methods:_(_({},Object(n.d)("admin/userLevel",["getlevelId"])),{},{changeMenu:function(t,e,r){switch(this.levelId=t.id,e){case"1":this.getlevelId(this.levelId),this.$refs.tasks.modals=!0,this.$refs.tasks.getList();break;default:this.del(t,"删除等级",r)}},del:function(t,e,r){var n=this,o={title:e,num:r,url:"user/user_level/delete/".concat(t.id),method:"put",ids:""};this.$modalSure(o).then((function(t){n.$Message.success(t.msg),n.levelLists.splice(r,1),n.levelLists.length||(n.levelFrom.page=1==n.levelFrom.page?1:n.levelFrom.page-1),n.getList()})).catch((function(t){n.$Message.error(t.msg)}))},onchangeIsShow:function(t){var e=this,r={id:t.id,is_show:t.is_show};Object(o.J)(r).then(function(){var t=y(g().mark((function t(r){return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(r.msg);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))},getList:function(){var t=this;this.loading=!0,this.levelFrom.is_show=this.levelFrom.is_show||"",Object(o.s)(this.levelFrom).then(function(){var e=y(g().mark((function e(r){var n;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.data,t.levelLists=n.list,t.total=r.data.count,t.loading=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},pageChange:function(t){this.levelFrom.page=t,this.getList()},add:function(){var t=this;this.levelId=0,this.$modalForm(Object(o.e)({id:this.levelId})).then((function(){return t.getList()}))},edit:function(t){var e=this;this.levelId=t.id,this.$modalForm(Object(o.e)({id:this.levelId})).then((function(){return e.getList()})),this.getlevelId(this.levelId)},userSearchs:function(){this.levelFrom.page=1,this.getList()},submitFail:function(){this.getList()}})},x=(r("33ca"),Object(m.a)(j,(function(){var t=this,e=t._self._c;return e("div",[e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":"",padding:0}},[e("div",{staticClass:"new_card_pd"},[e("Form",{ref:"levelFrom",attrs:{model:t.levelFrom,inline:"","label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{label:"状态:","label-for":"status1"}},[e("Select",{staticStyle:{width:"250px"},attrs:{placeholder:"请选择",clearable:"","element-id":"status1"},on:{"on-change":t.userSearchs},model:{value:t.levelFrom.is_show,callback:function(e){t.$set(t.levelFrom,"is_show",e)},expression:"levelFrom.is_show"}},[e("Option",{attrs:{value:"1"}},[t._v("显示")]),e("Option",{attrs:{value:"0"}},[t._v("不显示")])],1)],1),e("FormItem",{attrs:{label:"等级名称:","label-for":"title"}},[e("Input",{staticStyle:{width:"250px","margin-right":"14px"},attrs:{placeholder:"请输入等级名称"},model:{value:t.levelFrom.title,callback:function(e){t.$set(t.levelFrom,"title",e)},expression:"levelFrom.title"}}),e("Button",{attrs:{type:"primary"},on:{click:t.userSearchs}},[t._v("查询")])],1)],1)],1)]),e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[e("Button",{directives:[{name:"auth",rawName:"v-auth",value:["admin-user-level_add"],expression:"['admin-user-level_add']"}],attrs:{type:"primary"},on:{click:t.add}},[t._v("添加会员等级")]),e("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns1,data:t.levelLists,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"icons",fn:function(t){var r=t.row;return t.index,[e("viewer",[e("div",{staticClass:"tabBox_img"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:r.icon,expression:"row.icon"}]})])])]}},{key:"is_forevers",fn:function(r){var n=r.row;return r.index,[e("i-switch",{attrs:{value:n.is_forever,"true-value":1,"false-value":0,disabled:!0,size:"large"},model:{value:n.is_forever,callback:function(e){t.$set(n,"is_forever",e)},expression:"row.is_forever"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("永久")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("非永久")])])]}},{key:"is_pays",fn:function(r){var n=r.row;return r.index,[e("i-switch",{attrs:{value:n.is_pay,"true-value":1,"false-value":0,disabled:!0,size:"large"},model:{value:n.is_pay,callback:function(e){t.$set(n,"is_pay",e)},expression:"row.is_pay"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("付费")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("免费")])])]}},{key:"is_shows",fn:function(r){var n=r.row;return r.index,[e("i-switch",{attrs:{value:n.is_show,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.onchangeIsShow(n)}},model:{value:n.is_show,callback:function(e){t.$set(n,"is_show",e)},expression:"row.is_show"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("显示")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("隐藏")])])]}},{key:"action",fn:function(r){var n=r.row,o=r.index;return[e("a",{on:{click:function(e){return t.edit(n)}}},[t._v("编辑")]),e("Divider",{attrs:{type:"vertical"}}),e("a",{on:{click:function(e){return t.changeMenu(n,2,o)}}},[t._v("删除")])]}}])}),e("div",{staticClass:"acea-row row-right page"},[e("Page",{attrs:{total:t.total,current:t.levelFrom.page,"show-elevator":"","show-total":"","page-size":t.levelFrom.limit},on:{"on-change":t.pageChange}})],1)],1),e("task-list",{ref:"tasks"})],1)}),[],!1,null,"5906bf54",null));e.default=x.exports},"99a2":function(t,e,r){},c24f:function(t,e,r){"use strict";r.d(e,"X",(function(){return o})),r.d(e,"N",(function(){return i})),r.d(e,"M",(function(){return a})),r.d(e,"k",(function(){return u})),r.d(e,"r",(function(){return s})),r.d(e,"d",(function(){return c})),r.d(e,"h",(function(){return l})),r.d(e,"g",(function(){return f})),r.d(e,"q",(function(){return h})),r.d(e,"s",(function(){return d})),r.d(e,"J",(function(){return m})),r.d(e,"P",(function(){return p})),r.d(e,"L",(function(){return v})),r.d(e,"K",(function(){return g})),r.d(e,"f",(function(){return b})),r.d(e,"e",(function(){return y})),r.d(e,"n",(function(){return w})),r.d(e,"R",(function(){return _})),r.d(e,"p",(function(){return O})),r.d(e,"Q",(function(){return j})),r.d(e,"cb",(function(){return x})),r.d(e,"U",(function(){return L})),r.d(e,"S",(function(){return k})),r.d(e,"T",(function(){return F})),r.d(e,"W",(function(){return S})),r.d(e,"V",(function(){return P})),r.d(e,"Y",(function(){return E})),r.d(e,"v",(function(){return I})),r.d(e,"w",(function(){return T})),r.d(e,"Z",(function(){return D})),r.d(e,"i",(function(){return $})),r.d(e,"bb",(function(){return C})),r.d(e,"C",(function(){return M})),r.d(e,"db",(function(){return N})),r.d(e,"m",(function(){return W})),r.d(e,"ab",(function(){return G})),r.d(e,"F",(function(){return z})),r.d(e,"B",(function(){return R})),r.d(e,"A",(function(){return A})),r.d(e,"z",(function(){return B})),r.d(e,"D",(function(){return U})),r.d(e,"y",(function(){return Y})),r.d(e,"x",(function(){return J})),r.d(e,"u",(function(){return K})),r.d(e,"t",(function(){return q})),r.d(e,"o",(function(){return H})),r.d(e,"l",(function(){return Q})),r.d(e,"G",(function(){return V})),r.d(e,"I",(function(){return X})),r.d(e,"eb",(function(){return Z})),r.d(e,"O",(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,"fb",(function(){return ot})),r.d(e,"j",(function(){return it})),r.d(e,"c",(function(){return at})),r.d(e,"H",(function(){return ut}));var n=r("b6bd");function o(t){return Object(n.a)({url:"user/user",method:"get",params:t})}function i(t){return Object(n.a)({url:"setting/config/user/".concat(t),method:"get"})}function a(t,e){return Object(n.a)({url:"setting/config/user/".concat(t),method:"post",data:e})}function u(t){return Object(n.a)({url:"user/user/".concat(t,"/edit"),method:"get"})}function s(t){return Object(n.a)({url:"user/set_status/".concat(t.status,"/").concat(t.id),method:"put"})}function c(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 f(t){return Object(n.a)({url:"user/user/".concat(t),method:"get"})}function h(t){return Object(n.a)({url:"user/one_info/".concat(t.id),method:"get",params:t.datas})}function d(t){return Object(n.a)({url:"user/user_level/vip_list",method:"get",params:t})}function m(t){return Object(n.a)({url:"user/user_level/set_show/".concat(t.id,"/").concat(t.is_show),method:"PUT"})}function p(t,e){return Object(n.a)({url:"user/user_level/task/".concat(t),method:"get",params:e})}function v(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 b(t){return Object(n.a)({url:"/user/user_level/create_task",method:"get",params:t})}function y(t){return Object(n.a)({url:"user/user_level/create",method:"get",params:t})}function w(t){return Object(n.a)({url:"user/give_level/".concat(t),method:"get"})}function _(t){return Object(n.a)({url:"user/user_group/list",method:"get",params:t})}function O(t){return Object(n.a)({url:"user/user_group/add/".concat(t),method:"get"})}function j(t){return Object(n.a)({url:"setting/update_admin",method:"PUT",data:t})}function x(t){return Object(n.a)({url:"user/set_group",method:"post",data:t})}function L(t){return Object(n.a)({url:"user/user_label",method:"get",params:t})}function k(t,e){return Object(n.a)({url:"user/user_label/add/".concat(t),method:"get",params:e})}function F(t){return Object(n.a)({url:"user/user_label_cate/all",method:"get",params:t})}function S(t){return Object(n.a)({url:"user/user_label_cate/".concat(t,"/edit"),method:"get"})}function P(t){return Object(n.a)({url:"user/user_label_cate/create",method:"get"})}function E(t){return Object(n.a)({url:"/user/member_batch/index",method:"get",params:t})}function I(t,e){return Object(n.a)({url:"/user/member_batch/save/".concat(t),method:"post",data:e})}function T(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 $(t,e){return Object(n.a)({url:"/export/memberCard/".concat(t),method:"get",params:e})}function C(){return Object(n.a)({url:"/user/member/ship",method:"get"})}function M(t,e){return Object(n.a)({url:"/user/member_ship/save/".concat(t),method:"post",data:e})}function N(){return Object(n.a)({url:"/user/user/syncUsers",method:"get"})}function W(){return Object(n.a)({url:"/user/user/create",method:"get"})}function G(){return Object(n.a)({url:"/user/member_scan",method:"get"})}function z(t,e){return Object(n.a)({url:"user/label/".concat(t),method:"post",data:e})}function R(t){return Object(n.a)({url:"user/member_right/save/".concat(t.id),method:"post",data:t})}function A(){return Object(n.a)({url:"user/member/right",method:"get"})}function B(t){return Object(n.a)({url:"/user/member/record",method:"get",params:t})}function U(){return Object(n.a)({url:"user/member/ship_select",method:"get"})}function Y(t){return Object(n.a)({url:"user/member_card/set_status",method:"get",params:t})}function J(t){return Object(n.a)({url:"user/member_ship/set_ship_status",method:"get",params:t})}function K(t,e){return Object(n.a)({url:"user/member_agreement/save/".concat(t),method:"post",data:e})}function q(){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 Q(t){return Object(n.a)({url:"user/label/".concat(t),method:"get"})}function V(t){return Object(n.a)({url:"user/save_set_label",method:"put",data:t})}function X(t){return Object(n.a)({url:"setting/info",method:"get"})}function Z(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 ot(){return Object(n.a)({url:"user/synchro/work/label",method:"get"})}function it(t){return Object(n.a)({url:"user/user/extend_info/".concat(t),method:"get"})}function at(t){return Object(n.a)({url:"user/batch_process",method:"post",data:t})}function ut(t,e){return Object(n.a)({url:"/user/member/save/content/".concat(t),method:"post",data:e})}},c262:function(t,e,r){"use strict";r("c54c")},c54c:function(t,e,r){}}]);