CRMEB/crmeb/public/admin/system_static/js/chunk-4f2c2164.30d5533a.js
2023-04-06 18:14:33 +08:00

1 line
8.0 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-4f2c2164"],{"2ec3":function(t,e,a){},"31b4":function(t,e,a){"use strict";var n=a("f3f3"),i=a("9860"),o=(i=a.n(i),a("6b6c")),r=a("2f62");i={name:"edit",components:{formCreate:i.a.$form()},computed:Object(n.a)({},Object(r.e)("userLevel",["taskId","levelId"])),props:{FromData:{type:Object,default:null},update:{type:Boolean,default:!0}},data:function(){return{modals:!1,type:0,loading:!1,config:{global:{upload:{props:{onSuccess:function(t,e){200===t.status?e.url=t.data.src:this.Message.error(t.msg)}}}}}}},methods:{couponsType:function(){this.$parent.addType(this.type)},onSubmit:function(t){var e=this;this.loading||(this.loading=!0,Object(o.a)({url:this.FromData.action,method:this.FromData.method,data:t}).then((function(t){e.update&&e.$parent.getList(),e.$Message.success(t.msg),e.modals=!1,setTimeout((function(){e.$emit("submitFail"),e.loading=!1}),1e3)})).catch((function(t){e.loading=!1,e.$Message.error(t.msg)})))},cancel:function(){this.type=0}}},a("9646"),n=a("2877"),r=Object(n.a)(i,(function(){var t=this,e=t.$createElement;e=t._self._c||e;return t.FromData?e("div",[e("Modal",{attrs:{scrollable:"","footer-hide":"",closable:"",title:t.FromData.title,"z-index":1,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:{submit:t.onSubmit}})],2)],1):t._e()}),[],!1,null,"5cc97a38",null);e.a=r.exports},9646:function(t,e,a){"use strict";var n=a("2ec3");a.n(n).a},c59c:function(t,e,a){"use strict";a.r(e);var n=a("c964"),i=a("f3f3"),o=(a("96cf"),a("2f62")),r=a("31b4"),s=a("8593");r={name:"configTab",components:{editFrom:r.a},data:function(){return{tabconfig:{children:"children",reserve:!0,accordion:!0},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:Object(i.a)(Object(i.a)({},Object(o.e)("media",["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.$routeProStr+"/system/config/system_config_tab/list/"+t.id})},classAdd:function(){var t=this;Object(s.g)().then(function(){var e=Object(n.a)(regeneratorRuntime.mark((function e(a){return regeneratorRuntime.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(s.h)(t.id).then(function(){var t=Object(n.a)(regeneratorRuntime.mark((function t(a){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!1===a.data.status)return t.abrupt("return",e.$authLapse(a.data));t.next=2;break;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 n=this;e={title:e,num:a,url:"setting/config_class/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(e).then((function(t){n.$Message.success(t.msg),n.getList()})).catch((function(t){n.$Message.error(t.msg)}))},getList:function(){var t=this;this.loading=!0,this.formValidate.status=this.formValidate.status||"",Object(s.i)(this.formValidate).then(function(){var e=Object(n.a)(regeneratorRuntime.mark((function e(a){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=a.data,t.classList=n.list,t.total=n.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;t={id:t.id,status:t.status};Object(s.bb)(t).then(function(){var t=Object(n.a)(regeneratorRuntime.mark((function t(a){return regeneratorRuntime.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)}))}}},i=a("2877"),o=Object(i.a)(r,(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":""}},[a("Form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[a("Row",{attrs:{type:"flex",gutter:24}},[a("Col",t._b({},"Col",t.grid,!1),[a("FormItem",{attrs:{label:"是否显示:"}},[a("Select",{attrs:{placeholder:"请选择",clearable:""},on:{"on-change":t.userSearchs},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)],1),a("Col",t._b({},"Col",t.grid,!1),[a("FormItem",{attrs:{label:"分类名称:","label-for":"status2"}},[a("Input",{attrs:{search:"","enter-button":"",placeholder:"请输入分类名称"},on:{"on-search":t.userSearchs},model:{value:t.formValidate.title,callback:function(e){t.$set(t.formValidate,"title",e)},expression:"formValidate.title"}})],1)],1)],1),a("Row",{attrs:{type:"flex"}},[a("Col",t._b({},"Col",t.grid,!1),[a("Button",{staticClass:"mr20",attrs:{type:"primary",icon:"md-add"},on:{click:t.classAdd}},[t._v("添加配置分类")])],1)],1)],1),a("vxe-table",{ref:"xTable",staticClass:"vxeTable mt25",attrs:{border:!1,"highlight-hover-row":"","highlight-current-row":"",loading:t.loading,"tree-config":t.tabconfig,data:t.classList,"row-id":"id"}},[a("vxe-table-column",{attrs:{field:"id",title:"ID",tooltip:"",width:"60"}}),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 n=e.row;return[a("i-switch",{attrs:{value:n.status,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.onchangeIsShow(n)}},model:{value:n.status,callback:function(e){t.$set(n,"status",e)},expression:"row.status"}},[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:"操作","min-width":"150",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row,i=e.index;return[a("a",{on:{click:function(e){return t.goList(n)}}},[t._v("配置列表")]),a("Divider",{attrs:{type:"vertical"}}),a("a",{on:{click:function(e){return t.edit(n)}}},[t._v("编辑")]),a("Divider",{attrs:{type:"vertical"}}),a("a",{on:{click:function(e){return t.del(n,"删除分类",i)}}},[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:{update:!0,FromData:t.FromData},on:{submitFail:t.submitFail}})],1)}),[],!1,null,"45ceeb22",null);e.default=o.exports}}]);