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
12 KiB
1 lines
12 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-6af1208b"],{"012f":function(t,e,r){"use strict";r("cb20")},a53e:function(t,e,r){"use strict";r.r(e);var n=r("9860"),o=r.n(n),i=r("90e7"),a=r("b6bd"),c=r("524f");function s(t){return(s="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:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),c=new C(n||[]);return o(a,"_invoke",{value:$(t,r,c)}),a}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",g="suspendedYield",m="executing",v="completed",y={};function b(){}function w(){}function L(){}var _={};h(_,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(I([])));S&&S!==r&&n.call(S,a)&&(_=S);var k=L.prototype=b.prototype=Object.create(_);function E(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(o,i,a,c){var u=d(t[o],t,i);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==s(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.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 $(e,r,n){var o=p;return function(i,a){if(o===m)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var s=O(c,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=d(e,r,n);if("normal"===u.type){if(o=n.done?v:g,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function O(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,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=d(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;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,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function j(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 P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function I(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(s(e)+" is not iterable")}return w.prototype=L,o(k,"constructor",{value:L,configurable:!0}),o(L,"constructor",{value:w,configurable:!0}),w.displayName=h(L,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,L):(t.__proto__=L,h(t,l,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},E(T.prototype),h(T.prototype,c,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new T(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(k),h(k,l,"Generator"),h(k,a,(function(){return this})),h(k,"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=I,C.prototype={constructor:C,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(P),!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 c.type="throw",c.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],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(s&&u){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(!u)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,y):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),y},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),P(r),y}},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;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function l(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function h(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){l(i,n,o,a,c,"next",t)}function c(t){l(i,n,o,a,c,"throw",t)}a(void 0)}))}}r("c276");var f={name:"setting_setSystem",components:{formCreate:o.a.$form(),fromSubmit:c.a},data:function(){return{rules:[],option:{form:{labelWidth:185},submitBtn:{col:{span:3,push:3}},global:{upload:{props:{onSuccess:function(t,e){200===t.status?e.url=t.data.src:this.$Message.error(t.msg)}}},frame:{props:{closeBtn:!1,okBtn:!1}}}},spinShow:!1,FromData:null,currentTab:"",headerList:[],headerChildrenList:[],childrenId:"",title:""}},created:function(){this.getAllData()},watch:{$route:function(t,e){this.headerChildrenList=[],this.getAllData()},childrenId:function(){this.getFrom()}},methods:{childrenList:function(){var t=this;t.headerList.forEach((function(e){e.value.toString()===t.currentTab&&(void 0===e.children?(t.childrenId=e.id,t.headerChildrenList=[]):(t.headerChildrenList=e.children,t.childrenId=e.children.length?e.children[0].id.toString():""))}))},getHeader:function(){var t=this;return this.spinShow=!0,new Promise((function(e,r){var n=t.$route.params.tab_id,o={type:t.$route.params.type?t.$route.params.type:0,pid:n||0};Object(i.u)(o).then(function(){var r=h(u().mark((function r(n){var o;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:o=n.data.config_tab,t.headerList=o,t.currentTab=o[0].value.toString(),t.childrenList(),e(t.currentTab),t.spinShow=!1;case 6:case"end":return r.stop()}}),r)})));return function(t){return r.apply(this,arguments)}}()).catch((function(e){t.spinShow=!1,t.$Message.error(e.msg)}))}))},getFrom:function(){var t=this;return this.spinShow=!0,new Promise((function(e,r){var n="";n="3"===t.$route.params.type?t.$route.params.tab_id:t.childrenId?t.childrenId:t.currentTab;var o={tab_id:Number(n)},a="setting_logistics"===t.$route.name?"freight/config/edit_basics":"setting_distributionSet"===t.$route.name?"agent/config/edit_basics":"setting_message"===t.$route.name?"serve/sms_config/edit_basics":"setting_setSystem"===t.$route.name?"setting/config/edit_basics":"marketing/integral_config/edit_basics";Object(i.i)(o,a).then(function(){var e=h(u().mark((function e(r){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.spinShow=!1,!1!==r.data.status){e.next=3;break}return e.abrupt("return",t.$authLapse(r.data));case 3:t.FromData=r.data,t.rules=r.data.rules,t.title=r.data.title;case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.spinShow=!1,t.$Message.error(e.msg)}))}))},getAllData:function(){var t=h(u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("3"===this.$route.params.type){t.next=5;break}return t.next=3,this.getHeader();case 3:t.next=7;break;case 5:this.headerList=[],this.getFrom();case 7:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),changeTab:function(){this.childrenList()},changeChildrenTab:function(t){this.childrenId=t},onSubmit:function(t){var e=this;Object(a.a)({url:this.FromData.action,method:this.FromData.method,data:t}).then((function(t){e.$store.dispatch("admin/account/setPageTitle"),e.$Message.success(t.msg)})).catch((function(t){e.$Message.error(t.msg)}))}}},d=(r("012f"),r("2877")),p=Object(d.a)(f,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"article-manager"},[e("div",{staticClass:"i-layout-page-header"},[e("PageHeader",{staticClass:"product_tabs",attrs:{title:t.title,"hidden-breadcrumb":""}},[t.currentTab?e("div",{attrs:{slot:"content"},slot:"content"},[e("Tabs",{on:{"on-click":t.changeTab},model:{value:t.currentTab,callback:function(e){t.currentTab=e},expression:"currentTab"}},t._l(t.headerList,(function(t,r){return e("TabPane",{key:r,attrs:{icon:t.icon,label:t.label,name:t.value.toString()}})})),1)],1):t._e()])],1),e("Card",{staticClass:"ivu-mt fromBox",attrs:{bordered:!1,"dis-hover":""}},[t.headerChildrenList.length?e("Tabs",{attrs:{type:"card"},on:{"on-click":t.changeChildrenTab},model:{value:t.childrenId,callback:function(e){t.childrenId=e},expression:"childrenId"}},t._l(t.headerChildrenList,(function(t,r){return e("TabPane",{key:r,attrs:{label:t.label,name:t.id.toString()}})})),1):t._e(),0!==t.rules.length?e("form-create",{attrs:{option:t.option,rule:t.rules},on:{"on-submit":t.onSubmit}}):t._e(),t.spinShow?e("Spin",{attrs:{size:"large",fix:""}}):t._e()],1)],1)}),[],!1,null,"205bbbae",null);e.default=p.exports},cb20:function(t,e,r){}}]); |