| 1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-e7f1ccf6"],{"0c6b":function(t,e,n){"use strict";n.r(e),n("a4d3"),n("e01a"),n("d3b7"),n("d28b"),n("3ca3"),n("ddb0"),n("b636"),n("944a"),n("0c47"),n("23dc"),n("3410"),n("d9e2"),n("159b"),n("b0c0"),n("131a"),n("fb6a");var r=n("0122"),a=n("c964"),o=(n("a434"),n("8593")),i=n("9860"),s=(i=n.n(i),n("31b4")),c=n("6b6c");function u(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */u=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,a=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(e){l=function(t,e,n){return t[e]=n}}function d(t,e,n,r){var o,i,s,c;e=e&&e.prototype instanceof p?e:p,e=Object.create(e.prototype),r=new k(r||[]);return a(e,"_invoke",{value:(o=t,i=n,s=r,c="suspendedStart",function(t,e){if("executing"===c)throw new Error("Generator is already running");if("completed"===c){if("throw"===t)throw e;return F()}for(s.method=t,s.arg=e;;){var n=s.delegate;if(n&&(n=function t(e,n){var r=n.method,a=e.iterator[r];return void 0===a?(n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h):(r=f(a,e.iterator,n.arg),"throw"===r.type?(n.method="throw",n.arg=r.arg,n.delegate=null,h):(a=r.arg,a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)))}(n,s),n)){if(n===h)continue;return n}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if("suspendedStart"===c)throw c="completed",s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);if(c="executing",n=f(o,i,s),"normal"===n.type){if(c=s.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:s.done}}"throw"===n.type&&(c="completed",s.method="throw",s.arg=n.arg)}})}),e}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=d;var h={};function p(){}function m(){}function v(){}o={};var y=(l(o,i,(function(){return this})),Object.getPrototypeOf),g=(y=y&&y(y(L([]))),y&&y!==e&&n.call(y,i)&&(o=y),v.prototype=p.prototype=Object.create(o));function b(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){var o;a(this,"_invoke",{value:function(a,i){function s(){return new e((function(o,s){!function a(o,i,s,c){var u;o=f(t[o],t,i);if("throw"!==o.type)return(i=(u=o.arg).value)&&"object"==Object(r.a)(i)&&n.call(i,"__await")?e.resolve(i.__await).then((function(t){a("next",t,s,c)}),(function(t){a("throw",t,s,c)})):e.resolve(i).then((function(t){u.value=t,s(u)}),(function(t){return a("throw",t,s,c)}));c(o.arg)}(a,i,o,s)}))}return o=o?o.then(s,s):s()}})}function x(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 _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function L(t){if(t){var e,r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return e=-1,(r=function r(){for(;++e<t.length;)if(n.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r}).next=r}return{next:F}}function F(){return{value:void 0,done:!0}}return a(g,"constructor",{value:m.prototype=v,configurable:!0}),a(v,"constructor",{value:m,configurable:!0}),m.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){return t="function"==typeof t&&t.constructor,!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},b(w.prototype),l(w.prototype,s,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,a,o){void 0===o&&(o=Promise);var i=new w(d(e,n,r,a),o);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},b(g),l(g,c,"Generator"),l(g,i,(function(){return this})),l(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},t.values=L,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return i.type="throw",i.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var a=this.tryEntries.length-1;0<=a;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;0<=r;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}var i=(o=o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc?null:o)?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(i)},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),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),_(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,a=this.tryEntries[e];if(a.tryLoc===t)return"throw"===(n=a.completion).type&&(r=n.arg,_(a)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:L(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}i={name:"list",components:{formCreate:i.a.$form(),editFrom:s.a},data:function(){return{modals2:!1,grid:{xl:7,lg:7,md:12,sm:24,xs:24},loading:!1,formValidate:{tab_id:0,page:1,limit:20},total:0,columns1:[{title:"ID",key:"id",width:80},{title:"配置名称",key:"info",minWidth:130},{title:"字段变量",key:"menu_name",minWidth:140},{title:"字段类型",key:"type",minWidth:90},{title:"值",slot:"values",minWidth:230},{title:"是否显示",slot:"statuss",minWidth:90},{title:"操作",slot:"action",fixed:"right",minWidth:120}],FromData:null,FromRequestData:{},modalTitleSs:"",classList:[],num:0,typeFrom:{type:0,tab_id:this.$route.params.id},rules:[]}},watch:{$route:{handler:function(t,e){this.getList()},deep:!0}},mounted:function(){this.getList()},methods:{onhangeTab:function(t){this.typeFrom.type=t,this.classAdd()},classAdd:function(){var t=this;Object(o.k)(this.typeFrom).then(function(){var e=Object(a.a)(u().mark((function e(n){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1===n.data.status)return e.abrupt("return",t.$authLapse(n.data));e.next=2;break;case 2:r=n.data||{},t.FromRequestData={action:r.action,method:r.method},t.rules=r.rules,t.modals2=!0;case 6: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.l)(t.id).then(function(){var t=Object(a.a)(u().mark((function t(n){var r;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!1===n.data.status)return t.abrupt("return",e.$authLapse(n.data));t.next=2;break;case 2:r=n.data||{},e.FromRequestData={action:r.action,method:r.method},e.rules=r.rules,e.$refs.edits.modals=!0,e.modals2=!0;case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))},onSubmit:function(t){var e=this;Object(c.a)({url:this.FromRequestData.action,method:this.FromRequestData.method,data:t}).then((function(t){e.$Message.success(t.msg),setTimeout((function(){e.modals2=!1}),1e3),setTimeout((function(){e.getList()}),1500)})).catch((function(t){e.$Message.error(t.msg)}))},submitFail:function(){this.getList()},goIndex:function(){this.$router.push({path:this.$routeProStr+"/system/config/system_config_tab/index"})},configureAdd:function(){this.classAdd()},getList:function(){var t=this;this.loading=!0,this.formValidate.tab_id=this.$route.params.id,Object(o.m)(this.formValidate).then(function(){var e=Object(a.a)(u().mark((function e(n){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.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()},del:function(t,e,n){var r=this;e={title:e,num:n,url:"/setting/config/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(e).then((function(t){r.$Message.success(t.msg),r.classList.splice(n,1)})).catch((function(t){r.$Message.error(t.msg)}))},onchangeIsShow:function(t){var e=this;Object(o.j)(t.id,t.status).then(function(){var t=Object(a.a)(u().mark((function t(n){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(n.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)}))}}},n("19c8"),s=n("2877"),n=Object(s.a)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"i-layout-page-header header-title"},[n("div",{staticClass:"fl_header"},[n("router-link",{attrs:{to:{path:t.$routeProStr+"/system/config/system_config_tab/index"}}},[n("Button",{attrs:{icon:"ios-arrow-back",size:"small",type:"text"}},[t._v("返回")])],1),n("Divider",{attrs:{type:"vertical"}}),n("span",{staticClass:"ivu-page-header-title mr20",staticStyle:{padding:"0"},domProps:{textContent:t._s(t.$route.meta.title)}})],1)]),n("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[n("Row",{attrs:{type:"flex"}},[n("Col",t._b({},"Col",t.grid,!1),[n("Button",{staticClass:"mr20",attrs:{type:"primary"},on:{click:t.goIndex}},[t._v("配置分类")]),n("Button",{attrs:{type:"primary",icon:"md-add"},on:{click:t.configureAdd}},[t._v("添加配置")])],1)],1),n("Divider",{attrs:{dashed:""}}),n("Table",{ref:"table",attrs:{columns:t.columns1,data:t.classList,loading:t.loading,"no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"values",fn:function(e){var r=e.row;return e.index,["text"===r.type||"textarea"===r.type||"radio"===r.type||"checkbox"===r.type?n("span",[t._v(t._s(r.value))]):t._e(),"upload"===r.type&&3===r.upload_type?n("div",{staticClass:"valBox acea-row"},[r.value.length?n("div",t._l(r.value,(function(e,r){return n("div",{key:r,staticClass:"valPicbox acea-row row-column-around"},[n("div",{staticClass:"valPicbox_pic"},[n("Icon",{attrs:{type:"md-document"}})],1),n("span",{staticClass:"valPicbox_sp"},[t._v(t._s(e.filename))])])})),0):t._e()]):t._e(),"upload"===r.type&&3!==r.upload_type?n("div",{staticClass:"valBox acea-row"},[r.value.length?n("div",t._l(r.value,(function(e,r){return n("div",{key:r,staticClass:"valPicbox acea-row row-column-around"},[n("div",{staticClass:"valPicbox_pic"},[n("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.filepath,expression:"item.filepath"}]})]),n("span",{staticClass:"valPicbox_sp"},[t._v(t._s(e.filename))])])})),0):t._e()]):t._e()]}},{key:"statuss",fn:function(e){var r=e.row;return e.index,[n("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"}},[n("span",{attrs:{slot:"open"},slot:"open"},[t._v("显示")]),n("span",{attrs:{slot:"close"},slot:"close"},[t._v("隐藏")])])]}},{key:"action",fn:function(e){var r=e.row,a=e.index;return[n("a",{on:{click:function(e){return t.edit(r)}}},[t._v("编辑")]),n("Divider",{attrs:{type:"vertical"}}),n("a",{on:{click:function(e){return t.del(r,"删除分类",a)}}},[t._v("删除")])]}}])})],1),n("Modal",{attrs:{scrollable:"","footer-hide":"",closable:"",title:"添加配置字段","mask-closable":!1,"z-index":1,width:"700"},model:{value:t.modals2,callback:function(e){t.modals2=e},expression:"modals2"}},[n("Tabs",{staticClass:"tabsName",on:{"on-click":t.onhangeTab},model:{value:t.typeFrom.type,callback:function(e){t.$set(t.typeFrom,"type",e)},expression:"typeFrom.type"}},[n("TabPane",{attrs:{label:"文本框 ",name:"0"}}),n("TabPane",{attrs:{label:"多行文本框",name:"1"}}),n("TabPane",{attrs:{label:"单选框",name:"2"}}),n("TabPane",{attrs:{label:"文件上传",name:"3"}}),n("TabPane",{attrs:{label:"多选框",name:"4"}}),n("TabPane",{attrs:{label:"下拉框",name:"5"}})],1),0!=t.rules.length?n("form-create",{ref:"fc",staticClass:"formBox",attrs:{rule:t.rules,handleIcon:"false"},on:{submit:t.onSubmit}}):t._e()],1),n("edit-from",{ref:"edits",attrs:{FromData:t.FromData},on:{submitFail:t.submitFail}})],1)}),[],!1,null,"f24fe21a",null),e.default=n.exports},"19c8":function(t,e,n){"use strict";var r=n("389f");n.n(r).a},"2ec3":function(t,e,n){},"31b4":function(t,e,n){"use strict";var r=n("f3f3"),a=n("9860"),o=(a=n.n(a),n("6b6c")),i=n("2f62");a={name:"edit",components:{formCreate:a.a.$form()},computed:Object(r.a)({},Object(i.d)("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}}},n("9646"),r=n("2877"),i=Object(r.a)(a,(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=i.exports},"389f":function(t,e,n){},9646:function(t,e,n){"use strict";var r=n("2ec3");n.n(r).a}}]);
|