chunk-6eeb5c0c.401c3090.js 9.6 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-6eeb5c0c"],{"31b4":function(t,e,a){"use strict";var r=a("9860"),n=a.n(r),i=a("b6bd"),s=a("2f62");function o(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,r)}return a}function c(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var l={name:"edit",components:{formCreate:n.a.$form()},computed:function(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?o(a,!0).forEach((function(e){c(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):o(a).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}({},Object(s.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,a=this;(setTimeout((function(){a.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){a.$parent.getList(),a.$Message.success(t.msg),a.modals=!1,setTimeout((function(){a.$emit("submitFail")}),1e3)})).catch((function(t){a.$Message.error(t.msg)})))},cancel:function(){this.type=0}}},u=(a("cf4e"),a("2877")),d=Object(u.a)(l,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.FromData?a("div",[a("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?a("div",{staticClass:"radio acea-row row-middle"},[a("div",{staticClass:"name ivu-form-item-content"},[t._v("优惠券类型")]),a("Radio-group",{on:{"on-change":t.couponsType},model:{value:t.type,callback:function(e){t.type=e},expression:"type"}},[a("Radio",{attrs:{label:0}},[t._v("通用券")]),a("Radio",{attrs:{label:1}},[t._v("品类券")]),a("Radio",{attrs:{label:2}},[t._v("商品券")])],1)],1):t._e()],a("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,"9db30b62",null);e.a=d.exports},5916:function(t,e,a){"use strict";var r=a("eeda");a.n(r).a},c59c:function(t,e,a){"use strict";a.r(e);var r=a("a34a"),n=a.n(r),i=a("2f62"),s=a("31b4"),o=a("8593"),c=a("d708");function l(t,e,a,r,n,i,s){try{var o=t[i](s),c=o.value}catch(t){return void a(t)}o.done?e(c):Promise.resolve(c).then(r,n)}function u(t){return function(){var e=this,a=arguments;return new Promise((function(r,n){var i=t.apply(e,a);function s(t){l(i,r,n,s,o,"next",t)}function o(t){l(i,r,n,s,o,"throw",t)}s(void 0)}))}}function d(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,r)}return a}function f(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var m={name:"configTab",components:{editFrom:s.a},data:function(){return{roterPre:c.a.roterPre,grid:{xl:7,lg:7,md:12,sm:24,xs:24},loading:!1,formValidate:{status:"",page:1,limit:100,title:""},total:0,FromData:null,classId:0,classList:[]}},computed:function(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?d(a,!0).forEach((function(e){f(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):d(a).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}({},Object(i.e)("admin/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:75},labelPosition:function(){return this.isMobile?"top":"right"}}),mounted:function(){this.getList()},methods:{goList:function(t){this.$router.push({path:this.roterPre+"/system/config/system_config_tab/list/"+t.id})},classAdd:function(){var t=this;Object(o.g)().then(function(){var e=u(n.a.mark((function e(a){return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.FromData=a.data,t.$refs.edits.modals=!0;case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$Message.error(e.msg)}))},edit:function(t){var e=this;Object(o.h)(t.id).then(function(){var t=u(n.a.mark((function t(a){return n.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!1!==a.data.status){t.next=2;break}return t.abrupt("return",e.$authLapse(a.data));case 2:e.FromData=a.data,e.$refs.edits.modals=!0;case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))},del:function(t,e,a){var r=this,n={title:e,num:a,url:"setting/config_class/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(n).then((function(t){r.$Message.success(t.msg),r.classList.splice(a,1),r.classList.length||(r.formValidate.page=1==r.formValidate.page?1:r.formValidate.page-1),r.getList()})).catch((function(t){r.$Message.error(t.msg)}))},getList:function(){var t=this;this.loading=!0,this.formValidate.status=this.formValidate.status||"",Object(o.i)(this.formValidate).then(function(){var e=u(n.a.mark((function e(a){var r;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=a.data,t.classList=r.list,t.total=r.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.formValidate.page=t,this.getList()},userSearchs:function(){this.formValidate.page=1,this.getList()},submitFail:function(){},onchangeIsShow:function(t){var e=this,a={id:t.id,status:t.status};Object(o.V)(a).then(function(){var t=u(n.a.mark((function t(a){return n.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(a.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)}))}}},p=(a("5916"),a("2877")),h=Object(p.a)(m,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":"",padding:0}},[a("div",{staticClass:"new_card_pd"},[a("Form",{ref:"formValidate",attrs:{model:t.formValidate,inline:"","label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[a("FormItem",{attrs:{label:"是否显示:"}},[a("Select",{staticClass:"input-add",attrs:{placeholder:"请选择",clearable:""},model:{value:t.formValidate.status,callback:function(e){t.$set(t.formValidate,"status",e)},expression:"formValidate.status"}},[a("Option",{attrs:{value:"1"}},[t._v("显示")]),a("Option",{attrs:{value:"0"}},[t._v("不显示")])],1)],1),a("FormItem",{attrs:{label:"分类名称:","label-for":"status2"}},[a("Input",{staticClass:"input-add mr14",attrs:{placeholder:"请输入分类名称"},model:{value:t.formValidate.title,callback:function(e){t.$set(t.formValidate,"title",e)},expression:"formValidate.title"}}),a("Button",{attrs:{type:"primary"},on:{click:t.userSearchs}},[t._v("查询")])],1)],1)],1)]),a("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[a("Button",{staticClass:"mr20",attrs:{type:"primary"},on:{click:t.classAdd}},[t._v("添加配置分类")]),a("vxe-table",{ref:"xTable",staticClass:"ivu-mt",attrs:{border:!1,"highlight-hover-row":"","highlight-current-row":"","row-id":"id",loading:t.loading,"header-row-class-name":"false","tree-config":{children:"children",reserve:!0},data:t.classList}},[a("vxe-table-column",{attrs:{field:"id",title:"ID",tooltip:"",width:"80"}}),a("vxe-table-column",{attrs:{field:"title","tree-node":"",title:"分类名称","min-width":"150"}}),a("vxe-table-column",{attrs:{field:"eng_title",title:"分类字段","min-width":"150"}}),a("vxe-table-column",{attrs:{field:"statuss",title:"状态","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return[a("i-switch",{attrs:{value:r.status,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.onchangeIsShow(r)}},model:{value:r.status,callback:function(e){t.$set(r,"status",e)},expression:"row.status"}},[a("span",{attrs:{slot:"open"},slot:"open"},[t._v("显示")]),a("span",{attrs:{slot:"close"},slot:"close"},[t._v("隐藏")])])]}}])}),a("vxe-table-column",{attrs:{field:"action",title:"操作",width:"180",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row,n=e.index;return[a("a",{on:{click:function(e){return t.goList(r)}}},[t._v("配置列表")]),a("Divider",{attrs:{type:"vertical"}}),a("a",{on:{click:function(e){return t.edit(r)}}},[t._v("编辑")]),a("Divider",{attrs:{type:"vertical"}}),a("a",{on:{click:function(e){return t.del(r,"删除分类",n)}}},[t._v("删除")])]}}])})],1),a("div",{staticClass:"acea-row row-right page"},[a("Page",{attrs:{total:t.total,current:t.formValidate.page,"show-elevator":"","show-total":"","page-size":t.formValidate.limit},on:{"on-change":t.pageChange}})],1)],1),a("edit-from",{ref:"edits",attrs:{FromData:t.FromData},on:{submitFail:t.submitFail}})],1)}),[],!1,null,"121d066c",null);e.default=h.exports},cf4e:function(t,e,a){"use strict";var r=a("f047");a.n(r).a},eeda:function(t,e,a){},f047:function(t,e,a){}}]);