setting.a8b5711e.js 30 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["setting"],{"0415":function(e,a,t){},"3cf7":function(e,a,t){"use strict";t("77fe")},"5ad2":function(e,a,t){},"5c06":function(e,a,t){"use strict";var r=t("d4ec"),s=t("bee2"),i=(t("d81d"),t("b0c0"),t("dca8"),function(){function e(a){var t=this;Object(r["a"])(this,e);var s=[],i=[];if(!Array.isArray(a))throw new Error("param is not an array!");a.map((function(e){e.key&&e.name&&(s.push(e.key),i.push(e.value),t[e.key]=e,e.key!==e.value&&(t[e.value]=e))})),this.data=a,this.keyArr=s,this.valueArr=i,Object.freeze(this)}return Object(s["a"])(e,[{key:"keyOf",value:function(e){return this.data[this.keyArr.indexOf(e)]}},{key:"valueOf",value:function(e){return this.data[this.valueArr.indexOf(e)]}},{key:"getNameByKey",value:function(e){var a=this.keyOf(e);if(!a)throw new Error("No enum constant"+e);return a.name}},{key:"getNameByValue",value:function(e){var a=this.valueOf(e);if(!a)throw new Error("No enum constant"+e);return a.name}},{key:"getValueByKey",value:function(e){var a=this.keyOf(e);if(!a)throw new Error("No enum constant"+e);return a.key}},{key:"getData",value:function(){return this.data}}]),e}());a["a"]=i},"5e7ea":function(e,a,t){"use strict";t.r(a);var r=function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("a-spin",{attrs:{spinning:e.isLoading}},[t("a-form",{attrs:{form:e.form},on:{submit:e.handleSubmit}},[t("a-form-item",{attrs:{label:"未支付订单自动关闭",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("div",{staticClass:"clearfix"},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["close_minutes",{rules:[{required:!0,message:"请配置订单自动关闭时间"}]}],expression:"['close_minutes', { rules: [{required: true, message: '请配置订单自动关闭时间'}] }]"}],staticClass:"fl-l",attrs:{placeholder:"请输入分钟",min:0},on:{change:e.onChange}}),t("span",{staticClass:"input-text_right"},[e._v("分钟后自动取消订单")])],1),t("div",{staticClass:"form-item-help"},[t("p",{staticClass:"extra"},[e._v("如果用户提交订单后,在设置时间内订单未付款,系统自动关闭订单,设置0分钟不自动关闭")])])]),t("a-form-item",{attrs:{"wrapper-col":{span:e.wrapperCol.span,offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary","html-type":"submit"}},[e._v("保存生效")])],1)],1)],1)],1)},s=[],i=(t("d3b7"),t("ddb0"),t("ac1f"),t("5319"),t("88bc")),l=t.n(i),n=t("f585"),o=t("ca00"),u={data:function(){return{key:"order_cancel",labelCol:{span:3},wrapperCol:{span:6},isLoading:!1,form:this.$form.createForm(this),record:{}}},created:function(){this.getDetail()},methods:{getDetail:function(){var e=this;this.isLoading=!0,n["a"](this.key).then((function(a){e.record=a.data.values,e.setFieldsValue()})).finally((function(a){e.isLoading=!1}))},setFieldsValue:function(){var e=this.record,a=this.$nextTick,t=this.form;!Object(o["f"])(t.getFieldsValue())&&a((function(){t.setFieldsValue(l()(e,["close_minutes"]))}))},handleSubmit:function(e){var a=this;e.preventDefault();var t=this.form.validateFields;t((function(e,t){!e&&a.onFormSubmit(t)}))},onFormSubmit:function(e){var a=this;this.isLoading=!0,n["b"](this.key,{form:e}).then((function(e){a.$message.success(e.message,1.5)})).finally((function(e){a.isLoading=!1}))},onChange:function(e){e.target.value=e.target.value.replace(/[^0-9]/g,"")}}},c=u,d=(t("afaf"),t("2877")),m=Object(d["a"])(c,r,s,!1,null,"13b2bb0f",null);a["default"]=m.exports},"6c95":function(e,a,t){"use strict";t.r(a);var r=function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("a-spin",{attrs:{spinning:e.isLoading}},[t("a-form",{attrs:{form:e.form},on:{submit:e.handleSubmit}},[t("div",{staticClass:"title"},[e._v("普通配送订单配置")]),t("a-form-item",{attrs:{label:"关闭售后入口",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("div",{staticClass:"clearfix"},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["refund_days",{rules:[{required:!0,message:"请配置关闭售后入口时间"}]}],expression:"['refund_days', { rules: [{required: true, message: '请配置关闭售后入口时间'}] }]"}],staticClass:"fl-l",attrs:{placeholder:"请输入天数",min:0},on:{change:e.onChange}}),t("span",{staticClass:"input-text_right"},[e._v("天")])],1),t("div",{staticClass:"form-item-help"},[t("p",{staticClass:"extra"},[e._v("签收T+配置时间 后自动关闭售后入口、订单自动确认收货(时间不能小于7天)")])])]),t("a-form-item",{attrs:{label:"自动确认收货",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("div",{staticClass:"clearfix"},[t("a-input",{staticClass:"fl-l",attrs:{placeholder:"请输入天数",min:0,disabled:""},model:{value:e.receive_days,callback:function(a){e.receive_days=a},expression:"receive_days"}}),t("span",{staticClass:"input-text_right"},[e._v("天")])],1),t("div",{staticClass:"form-item-help"},[t("p",{staticClass:"extra"},[e._v("自动确认收货时间为关闭售后入口时间")])])]),t("a-form-item",{attrs:{label:"佣金结算周期",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("div",{staticClass:"clearfix"},[t("a-input",{staticClass:"fl-l",attrs:{disabled:""},model:{value:e.commission_days,callback:function(a){e.commission_days=a},expression:"commission_days"}}),t("span",{staticClass:"input-text_right"},[e._v("天")])],1),t("div",{staticClass:"form-item-help"},[t("p",{staticClass:"extra"},[e._v("佣金结算时间为关闭售后入口时间+1天")])])]),t("a-form-item",{attrs:{"wrapper-col":{span:e.wrapperCol.span,offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary","html-type":"submit"}},[e._v("保存生效")])],1)],1),t("a-form",{attrs:{form:e.orderForm},on:{submit:e.handleSubmitOrder}},[t("div",{staticClass:"title"},[e._v("门店自提订单配置")]),t("a-form-item",{attrs:{label:"关闭售后入口",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("div",{staticClass:"clearfix"},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["refund_days",{rules:[{required:!0,message:"请配置关闭售后入口时间"}]}],expression:"['refund_days', { rules: [{required: true, message: '请配置关闭售后入口时间'}] }]"}],staticClass:"fl-l",attrs:{placeholder:"请输入天数",min:0},on:{change:e.onChange2}}),t("span",{staticClass:"input-text_right"},[e._v("天")])],1),t("div",{staticClass:"form-item-help"},[t("p",{staticClass:"extra"},[e._v("核销T+配置时间 后自动关闭售后入口、订单自动确认收货")])])]),t("a-form-item",{attrs:{label:"自动确认收货",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("div",{staticClass:"form-item-help"},[t("p",{staticClass:"extra",staticStyle:{"line-height":"40px",padding:"0",margin:"0"}},[e._v("核销成功后自动确认收货")])])]),t("a-form-item",{attrs:{label:"佣金结算周期",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("div",{staticClass:"clearfix"},[t("a-input",{staticClass:"fl-l",attrs:{disabled:""},model:{value:e.commission_days2,callback:function(a){e.commission_days2=a},expression:"commission_days2"}}),t("span",{staticClass:"input-text_right"},[e._v("天")])],1),t("div",{staticClass:"form-item-help"},[t("p",{staticClass:"extra"},[e._v("佣金结算时间为关闭售后入口时间+1天")])])]),t("a-form-item",{attrs:{"wrapper-col":{span:e.wrapperCol.span,offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary","html-type":"submit"}},[e._v("保存生效")])],1)],1)],1)],1)},s=[],i=(t("d3b7"),t("ddb0"),t("a9e3"),t("ac1f"),t("5319"),t("88bc")),l=t.n(i),n=t("f585"),o=t("ca00"),u={data:function(){return{key:"refund",labelCol:{span:3},wrapperCol:{span:8},isLoading:!1,form:this.$form.createForm(this),orderForm:this.$form.createForm(this),record:{},commission_days:0,receive_days:0,record2:{},commission_days2:0,receive_days2:0}},created:function(){this.getDetail(),this.getDetail2()},methods:{getDetail:function(){var e=this;this.isLoading=!0,n["a"](this.key).then((function(a){e.record=a.data.values,e.receive_days=a.data.values.refund_days,a.data.values.refund_days&&(e.commission_days=Number(a.data.values.refund_days)+1),e.setFieldsValue()})).finally((function(a){e.isLoading=!1}))},getDetail2:function(){var e=this;this.isLoading=!0,n["a"]("shops").then((function(a){e.record2=a.data.values,e.receive_days2=a.data.values.refund_days,a.data.values.refund_days&&(e.commission_days2=Number(a.data.values.refund_days)+1),e.setFieldsValue2()})).finally((function(a){e.isLoading=!1}))},setFieldsValue:function(){var e=this.record,a=this.$nextTick,t=this.form;!Object(o["f"])(t.getFieldsValue())&&a((function(){t.setFieldsValue(l()(e,["refund_days"]))}))},setFieldsValue2:function(){var e=this.record2,a=this.$nextTick,t=this.orderForm;!Object(o["f"])(t.getFieldsValue())&&a((function(){t.setFieldsValue(l()(e,["refund_days"]))}))},handleSubmit:function(e){var a=this;e.preventDefault();var t=this.form.validateFields;t((function(e,t){t.refund_days&&t.refund_days<7?a.$message.error("关闭售后入口时间不能小于7天",1.5):!e&&a.onFormSubmit(t)}))},onFormSubmit:function(e){var a=this;this.isLoading=!0,n["b"](this.key,{form:{refund_days:e.refund_days,receive_days:this.receive_days,commission_days:this.commission_days}}).then((function(e){a.$message.success(e.message,1.5)})).finally((function(e){a.isLoading=!1}))},onChange:function(e){e.target.value=e.target.value.replace(/[^0-9]/g,""),this.commission_days=Number(e.target.value)+1,this.receive_days=e.target.value},onChange2:function(e){e.target.value=e.target.value.replace(/[^0-9]/g,""),this.commission_days2=Number(e.target.value)+1,this.receive_days2=e.target.value},handleSubmitOrder:function(e){var a=this;e.preventDefault();var t=this.orderForm.validateFields;t((function(e,t){!e&&a.onFormSubmit2(t)}))},onFormSubmit2:function(e){var a=this;this.isLoading=!0,n["b"]("shops",{form:{refund_days:e.refund_days,receive_days:this.receive_days2,commission_days:this.commission_days2}}).then((function(e){a.$message.success("门店自提订单售后时效保存成功",1.5)})).finally((function(e){a.isLoading=!1}))}}},c=u,d=(t("d5e5"),t("2877")),m=Object(d["a"])(c,r,s,!1,null,"149e2616",null);a["default"]=m.exports},"71b5":function(e,a,t){"use strict";var r=t("5c06");a["a"]=new r["a"]([{key:"LOCAL",name:"本地",value:"local"},{key:"QINIU",name:"七牛云",value:"qiniu"},{key:"ALIYUN",name:"阿里云",value:"aliyun"},{key:"QCLOUD",name:"腾讯云",value:"qcloud"}])},"77fe":function(e,a,t){},"88bc":function(e,a,t){(function(a){var t=1/0,r=9007199254740991,s="[object Arguments]",i="[object Function]",l="[object GeneratorFunction]",n="[object Symbol]",o="object"==typeof a&&a&&a.Object===Object&&a,u="object"==typeof self&&self&&self.Object===Object&&self,c=o||u||Function("return this")();function d(e,a,t){switch(t.length){case 0:return e.call(a);case 1:return e.call(a,t[0]);case 2:return e.call(a,t[0],t[1]);case 3:return e.call(a,t[0],t[1],t[2])}return e.apply(a,t)}function m(e,a){var t=-1,r=e?e.length:0,s=Array(r);while(++t<r)s[t]=a(e[t],t,e);return s}function p(e,a){var t=-1,r=a.length,s=e.length;while(++t<r)e[s+t]=a[t];return e}var f=Object.prototype,v=f.hasOwnProperty,b=f.toString,C=c.Symbol,h=f.propertyIsEnumerable,g=C?C.isConcatSpreadable:void 0,y=Math.max;function _(e,a,t,r,s){var i=-1,l=e.length;t||(t=k),s||(s=[]);while(++i<l){var n=e[i];a>0&&t(n)?a>1?_(n,a-1,t,r,s):p(s,n):r||(s[s.length]=n)}return s}function w(e,a){return e=Object(e),x(e,a,(function(a,t){return t in e}))}function x(e,a,t){var r=-1,s=a.length,i={};while(++r<s){var l=a[r],n=e[l];t(n,l)&&(i[l]=n)}return i}function S(e,a){return a=y(void 0===a?e.length-1:a,0),function(){var t=arguments,r=-1,s=y(t.length-a,0),i=Array(s);while(++r<s)i[r]=t[a+r];r=-1;var l=Array(a+1);while(++r<a)l[r]=t[r];return l[a]=i,d(e,this,l)}}function k(e){return L(e)||F(e)||!!(g&&e&&e[g])}function N(e){if("string"==typeof e||U(e))return e;var a=e+"";return"0"==a&&1/e==-t?"-0":a}function F(e){return O(e)&&v.call(e,"callee")&&(!h.call(e,"callee")||b.call(e)==s)}var L=Array.isArray;function E(e){return null!=e&&I(e.length)&&!$(e)}function O(e){return D(e)&&E(e)}function $(e){var a=A(e)?b.call(e):"";return a==i||a==l}function I(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function A(e){var a=typeof e;return!!e&&("object"==a||"function"==a)}function D(e){return!!e&&"object"==typeof e}function U(e){return"symbol"==typeof e||D(e)&&b.call(e)==n}var V=S((function(e,a){return null==e?{}:w(e,m(_(a,1),N))}));e.exports=V}).call(this,t("c8ba"))},99804:function(e,a,t){},"9aa4":function(e,a,t){"use strict";t("cad6")},a6b6:function(e,a,t){"use strict";t.r(a);var r=function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("a-spin",{attrs:{spinning:e.isLoading}},[t("a-form",{attrs:{form:e.form},on:{submit:e.handleSubmit}},[t("div",{staticClass:"title"},[e._v("交易设置")]),t("a-form-item",{attrs:{label:"未支付订单",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("div",{staticClass:"clearfix"},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["order.close_days",{rules:[{required:!0,message:"不能为空"}]}],expression:"['order.close_days', { rules: [{required: true, message: '不能为空'}] }]"}],staticClass:"fl-l",attrs:{min:0}}),t("span",{staticClass:"input-text_right"},[e._v("小时后自动取消订单")])],1),t("div",{staticClass:"form-item-help"},[t("p",{staticClass:"extra"},[e._v("如果用户提交订单后,在设置时间内订单未付款,系统自动关闭订单,设置0小时不自动关闭")])])]),t("a-form-item",{attrs:{label:"已发货订单",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("div",{staticClass:"clearfix"},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["order.receive_days",{rules:[{required:!0,message:"不能为空"}]}],expression:"['order.receive_days', { rules: [{required: true, message: '不能为空'}] }]"}],staticClass:"fl-l",attrs:{min:0}}),t("span",{staticClass:"input-text_right"},[e._v("天后自动确认收货")])],1),t("div",{staticClass:"form-item-help"},[t("p",{staticClass:"extra"},[e._v("如果发货后的规定期间内 未确认收货,系统自动完成收货,设置0天不自动收货")])])]),t("a-form-item",{attrs:{label:"售后入口",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("div",{staticClass:"clearfix"},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["order.refund_days",{rules:[{required:!0,message:"不能为空"}]}],expression:"['order.refund_days', { rules: [{required: true, message: '不能为空'}] }]"}],staticClass:"fl-l",attrs:{min:0}}),t("span",{staticClass:"input-text_right"},[e._v("天后关闭售后入口")])],1),t("div",{staticClass:"form-item-help"},[t("p",{staticClass:"extra"},[e._v("签收+几天 后自动关闭售后入口")])])]),t("div",{staticClass:"title"},[e._v("运费设置")]),t("a-form-item",{attrs:{label:"店内佣金结算",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("div",{staticClass:"clearfix"},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["order.close_days",{rules:[{required:!0,message:"不能为空"}]}],expression:"['order.close_days', { rules: [{required: true, message: '不能为空'}] }]"}],staticClass:"fl-l",attrs:{min:0}}),t("span",{staticClass:"input-text_right"},[e._v("天")])],1),t("div",{staticClass:"form-item-help"},[t("p",{staticClass:"extra"},[e._v("请设置快递签收+几天 后结算店内佣金")])])]),t("a-form-item",{attrs:{label:"普通用户佣金结算",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("div",{staticClass:"clearfix"},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["order.receive_days",{rules:[{required:!0,message:"不能为空"}]}],expression:"['order.receive_days', { rules: [{required: true, message: '不能为空'}] }]"}],staticClass:"fl-l",attrs:{min:0}}),t("span",{staticClass:"input-text_right"},[e._v("天")])],1),t("div",{staticClass:"form-item-help"},[t("p",{staticClass:"extra"},[e._v("请设置快递签收+几天 后结算普通用户的佣金")])])]),t("a-form-item",{attrs:{label:"供应商结算",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("div",{staticClass:"clearfix"},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["order.refund_days",{rules:[{required:!0,message:"不能为空"}]}],expression:"['order.refund_days', { rules: [{required: true, message: '不能为空'}] }]"}],staticClass:"fl-l",attrs:{min:0}}),t("span",{staticClass:"input-text_right"},[e._v("天")])],1),t("div",{staticClass:"form-item-help"},[t("p",{staticClass:"extra"},[e._v("请设置快递签收+几天 后可以与供应商结算货款")])])]),t("a-form-item",{attrs:{"wrapper-col":{span:e.wrapperCol.span,offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary","html-type":"submit"}},[e._v("提交")])],1)],1)],1)],1)},s=[],i=(t("d3b7"),t("ddb0"),t("88bc")),l=t.n(i),n=t("f585"),o=t("ca00"),u={data:function(){return{key:"trade",labelCol:{span:4},wrapperCol:{span:10},isLoading:!1,form:this.$form.createForm(this),radioStyle:{display:"block",height:"30px",lineHeight:"30px"},record:{}}},created:function(){this.getDetail()},methods:{getDetail:function(){var e=this;this.isLoading=!0,n["a"](this.key).then((function(a){e.record=a.data.values,e.setFieldsValue()})).finally((function(a){e.isLoading=!1}))},setFieldsValue:function(){var e=this.record,a=this.$nextTick,t=this.form;!Object(o["f"])(t.getFieldsValue())&&a((function(){t.setFieldsValue(l()(e,["order"]))}))},handleSubmit:function(e){var a=this;e.preventDefault();var t=this.form.validateFields;t((function(e,t){!e&&a.onFormSubmit(t)}))},onFormSubmit:function(e){var a=this;this.isLoading=!0,n["b"](this.key,{form:e}).then((function(e){a.$message.success(e.message,1.5)})).finally((function(e){a.isLoading=!1}))}}},c=u,d=(t("3cf7"),t("2877")),m=Object(d["a"])(c,r,s,!1,null,"09500234",null);a["default"]=m.exports},a85e:function(e,a,t){"use strict";t.r(a);var r=function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("a-spin",{attrs:{spinning:e.isLoading}},[t("a-form",{attrs:{form:e.form},on:{submit:e.handleSubmit}},[t("a-form-item",{attrs:{label:"短信平台",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["default",{rules:[{required:!0}]}],expression:"['default', { rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:"aliyun"}},[e._v("阿里云短信")])],1),t("div",{staticClass:"form-item-help"},[t("small",{staticStyle:{"margin-right":"6px"}},[e._v("短信服务管理控制台:")]),t("a",{attrs:{href:"https://dysms.console.aliyun.com/dysms.htm",target:"_blank"}},[e._v("https://dysms.console.aliyun.com/dysms.htm")])])],1),t("div",{directives:[{name:"show",rawName:"v-show",value:"aliyun"==e.form.getFieldValue("default"),expression:"form.getFieldValue('default') == 'aliyun'"}]},[t("a-form-item",{attrs:{label:"AccessKeyId",labelCol:e.labelCol,wrapperCol:e.wrapperCol,required:""}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["engine.aliyun.AccessKeyId"],expression:"[`engine.aliyun.AccessKeyId`]"}]})],1),t("a-form-item",{attrs:{label:"AccessKeySecret",labelCol:e.labelCol,wrapperCol:e.wrapperCol,required:""}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["engine.aliyun.AccessKeySecret"],expression:"[`engine.aliyun.AccessKeySecret`]"}]})],1),t("a-form-item",{attrs:{label:"短信签名 Sign",labelCol:e.labelCol,wrapperCol:e.wrapperCol,required:""}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["engine.aliyun.sign"],expression:"[`engine.aliyun.sign`]"}]})],1)],1),e._l(e.record["scene"],(function(a,r){return t("div",{key:r},[t("a-divider",{attrs:{orientation:"left"}},[e._v(e._s(a.name))]),t("a-form-item",{attrs:{label:"是否开启",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["scene."+r+".isEnable",{rules:[{required:!0}]}],expression:"[`scene.${index}.isEnable`, { rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:!0}},[e._v("开启")]),t("a-radio",{attrs:{value:!1}},[e._v("关闭")])],1)],1),t("a-form-item",{attrs:{label:"模板内容",labelCol:e.labelCol,wrapperCol:e.wrapperCol,required:""}},[t("span",[e._v(e._s(e.record.scene[r].content))])]),t("a-form-item",{attrs:{label:"模板ID/Code",labelCol:e.labelCol,wrapperCol:e.wrapperCol,required:""}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["scene."+r+".templateCode"],expression:"[`scene.${index}.templateCode`]"}]}),t("div",{staticClass:"form-item-help"},[t("small",[e._v("例如:SMS_139800030")])])],1),void 0!==e.record.scene[r].acceptPhone?t("a-form-item",{attrs:{label:"接收手机号",labelCol:e.labelCol,wrapperCol:e.wrapperCol,required:""}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["scene."+r+".acceptPhone"],expression:"[`scene.${index}.acceptPhone`]"}]}),t("div",{staticClass:"form-item-help"},[t("small",[e._v(" 注:如需填写多个手机号,请用英文逗号 "),t("a-tag",[e._v(",")]),e._v("隔开 ")],1)])],1):e._e()],1)})),t("a-form-item",{attrs:{"wrapper-col":{span:e.wrapperCol.span,offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary","html-type":"submit"}},[e._v("提交")])],1)],2)],1)],1)},s=[],i=(t("d3b7"),t("ddb0"),t("88bc")),l=t.n(i),n=t("ca00"),o=t("f585"),u=t("5c06"),c=new u["a"]([{key:"CAPTCHA",name:"短信验证码",value:"captcha"},{key:"ORDER_PAY",name:"新付款订单",value:"order_pay"}]),d={data:function(){return{SettingSmsSceneEnum:c,key:"sms",labelCol:{span:3},wrapperCol:{span:10},isLoading:!1,form:this.$form.createForm(this),record:{}}},created:function(){this.getDetail()},methods:{getDetail:function(){var e=this;this.isLoading=!0,o["a"](this.key).then((function(a){e.record=a.data.values,e.setFieldsValue()})).finally((function(a){e.isLoading=!1}))},setFieldsValue:function(){var e=this.record,a=this.$nextTick,t=this.form;!Object(n["f"])(t.getFieldsValue())&&a((function(){var a={};for(var r in e.scene)a[r]=l()(e.scene[r],["isEnable","templateCode","acceptPhone"]);t.setFieldsValue({default:e.default,engine:e.engine,scene:a})}))},handleSubmit:function(e){var a=this;e.preventDefault();var t=this.form.validateFields;t((function(e,t){!e&&a.onFormSubmit(t)}))},onFormSubmit:function(e){var a=this;this.isLoading=!0,o["b"](this.key,{form:e}).then((function(e){a.$message.success(e.message,1.5)})).finally((function(e){a.isLoading=!1}))}}},m=d,p=(t("f4a6"),t("2877")),f=Object(p["a"])(m,r,s,!1,null,"a7d90dde",null);a["default"]=f.exports},afaf:function(e,a,t){"use strict";t("0415")},bee2:function(e,a,t){"use strict";function r(e,a){for(var t=0;t<a.length;t++){var r=a[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,a,t){return a&&r(e.prototype,a),t&&r(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}t.d(a,"a",(function(){return s}))},c5b8:function(e,a,t){"use strict";t.r(a);var r=function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("a-spin",{attrs:{spinning:e.isLoading}},[t("a-form",{attrs:{form:e.form},on:{submit:e.handleSubmit}},[t("a-form-item",{attrs:{label:"默认上传方式",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["default",{rules:[{required:!0}]}],expression:"['default', { rules: [{ required: true }] }]"}]},e._l(e.StorageEnum.data,(function(a,r){return t("a-radio",{key:r,attrs:{value:a.value}},[e._v(e._s(a.name)+" "+e._s(a.value==e.StorageEnum.LOCAL.value?"(不推荐)":""))])})),1)],1),t("div",{directives:[{name:"show",rawName:"v-show",value:e.form.getFieldValue("default")==e.StorageEnum.QINIU.value,expression:"form.getFieldValue('default') == StorageEnum.QINIU.value"}]},[t("a-form-item",{attrs:{label:"存储空间名称 Bucket",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["engine."+e.StorageEnum.QINIU.value+".bucket"],expression:"[`engine.${StorageEnum.QINIU.value}.bucket`]"}]})],1),t("a-form-item",{attrs:{label:"ACCESS_KEY AK",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["engine."+e.StorageEnum.QINIU.value+".access_key"],expression:"[`engine.${StorageEnum.QINIU.value}.access_key`]"}]})],1),t("a-form-item",{attrs:{label:"SECRET_KEY SK",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["engine."+e.StorageEnum.QINIU.value+".secret_key"],expression:"[`engine.${StorageEnum.QINIU.value}.secret_key`]"}]})],1),t("a-form-item",{attrs:{label:"空间域名 Domain",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["engine."+e.StorageEnum.QINIU.value+".domain"],expression:"[`engine.${StorageEnum.QINIU.value}.domain`]"}]})],1)],1),t("div",{directives:[{name:"show",rawName:"v-show",value:e.form.getFieldValue("default")==e.StorageEnum.ALIYUN.value,expression:"form.getFieldValue('default') == StorageEnum.ALIYUN.value"}]},[t("a-form-item",{attrs:{label:"存储空间名称 Bucket",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["engine."+e.StorageEnum.ALIYUN.value+".bucket"],expression:"[`engine.${StorageEnum.ALIYUN.value}.bucket`]"}]})],1),t("a-form-item",{attrs:{label:"AccessKeyId",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["engine."+e.StorageEnum.ALIYUN.value+".access_key_id"],expression:"[`engine.${StorageEnum.ALIYUN.value}.access_key_id`]"}]})],1),t("a-form-item",{attrs:{label:"AccessKeySecret",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["engine."+e.StorageEnum.ALIYUN.value+".access_key_secret"],expression:"[`engine.${StorageEnum.ALIYUN.value}.access_key_secret`]"}]})],1),t("a-form-item",{attrs:{label:"空间域名 Domain",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["engine."+e.StorageEnum.ALIYUN.value+".domain"],expression:"[`engine.${StorageEnum.ALIYUN.value}.domain`]"}]})],1)],1),t("div",{directives:[{name:"show",rawName:"v-show",value:e.form.getFieldValue("default")==e.StorageEnum.QCLOUD.value,expression:"form.getFieldValue('default') == StorageEnum.QCLOUD.value"}]},[t("a-form-item",{attrs:{label:"存储空间名称 Bucket",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["engine."+e.StorageEnum.QCLOUD.value+".bucket"],expression:"[`engine.${StorageEnum.QCLOUD.value}.bucket`]"}]})],1),t("a-form-item",{attrs:{label:"所属地域 Region",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["engine."+e.StorageEnum.QCLOUD.value+".region"],expression:"[`engine.${StorageEnum.QCLOUD.value}.region`]"}]})],1),t("a-form-item",{attrs:{label:"SecretId",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["engine."+e.StorageEnum.QCLOUD.value+".secret_id"],expression:"[`engine.${StorageEnum.QCLOUD.value}.secret_id`]"}]})],1),t("a-form-item",{attrs:{label:"SecretKey",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["engine."+e.StorageEnum.QCLOUD.value+".secret_key"],expression:"[`engine.${StorageEnum.QCLOUD.value}.secret_key`]"}]})],1),t("a-form-item",{attrs:{label:"空间域名 Domain",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["engine."+e.StorageEnum.QCLOUD.value+".domain"],expression:"[`engine.${StorageEnum.QCLOUD.value}.domain`]"}]})],1)],1),t("a-form-item",{attrs:{"wrapper-col":{span:e.wrapperCol.span,offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary","html-type":"submit"}},[e._v("提交")])],1)],1)],1)],1)},s=[],i=(t("d3b7"),t("ddb0"),t("88bc")),l=t.n(i),n=t("f585"),o=t("71b5"),u=t("ca00"),c={data:function(){return{key:"storage",labelCol:{span:4},wrapperCol:{span:10},isLoading:!1,form:this.$form.createForm(this),record:{},StorageEnum:o["a"]}},created:function(){this.getDetail()},methods:{getDetail:function(){var e=this;this.isLoading=!0,n["a"](this.key).then((function(a){e.record=a.data.values,e.setFieldsValue()})).finally((function(a){e.isLoading=!1}))},setFieldsValue:function(){var e=this.record,a=this.$nextTick,t=this.form;!Object(u["f"])(t.getFieldsValue())&&a((function(){t.setFieldsValue(l()(e,["default","engine"]))}))},handleSubmit:function(e){var a=this;e.preventDefault();var t=this.form.validateFields;t((function(e,t){!e&&a.onFormSubmit(t)}))},onFormSubmit:function(e){var a=this;this.isLoading=!0,n["b"](this.key,{form:e}).then((function(e){a.$message.success(e.message,1.5)})).finally((function(e){a.isLoading=!1}))}}},d=c,m=(t("9aa4"),t("2877")),p=Object(m["a"])(d,r,s,!1,null,"dd6519b2",null);a["default"]=p.exports},cad6:function(e,a,t){},d4ec:function(e,a,t){"use strict";function r(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}t.d(a,"a",(function(){return r}))},d5e5:function(e,a,t){"use strict";t("99804")},f4a6:function(e,a,t){"use strict";t("5ad2")},f585:function(e,a,t){"use strict";t.d(a,"a",(function(){return l})),t.d(a,"b",(function(){return n}));var r=t("5530"),s=t("b775"),i={detail:"/setting/detail",update:"/setting/update"};function l(e){return Object(s["b"])({url:i.detail,method:"get",params:{key:e}})}function n(e,a){return Object(s["b"])({url:i.update,method:"post",data:Object(r["a"])({key:e},a)})}}}]);