(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["setting"],{"447d":function(e,a,t){"use strict";t("f533")},"5ad2":function(e,a,t){},"5c06":function(e,a,t){"use strict";var r=t("d4ec"),l=t("bee2"),n=(t("d81d"),t("b0c0"),t("dca8"),function(){function e(a){var t=this;Object(r["a"])(this,e);var l=[],n=[];if(!Array.isArray(a))throw new Error("param is not an array!");a.map((function(e){e.key&&e.name&&(l.push(e.key),n.push(e.value),t[e.key]=e,e.key!==e.value&&(t[e.value]=e))})),this.data=a,this.keyArr=l,this.valueArr=n,Object.freeze(this)}return Object(l["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"]=n},"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"}])},"88bc":function(e,a,t){(function(a){var t=1/0,r=9007199254740991,l="[object Arguments]",n="[object Function]",i="[object GeneratorFunction]",o="[object Symbol]",s="object"==typeof a&&a&&a.Object===Object&&a,u="object"==typeof self&&self&&self.Object===Object&&self,c=s||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,l=Array(r);while(++t0&&t(o)?a>1?w(o,a-1,t,r,l):p(l,o):r||(l[l.length]=o)}return l}function _(e,a){return e=Object(e),S(e,a,(function(a,t){return t in e}))}function S(e,a,t){var r=-1,l=a.length,n={};while(++r-1&&e%1==0&&e<=r}function U(e){var a=typeof e;return!!e&&("object"==a||"function"==a)}function $(e){return!!e&&"object"==typeof e}function D(e){return"symbol"==typeof e||$(e)&&b.call(e)==o}var j=k((function(e,a){return null==e?{}:_(e,m(w(a,1),N))}));e.exports=j}).call(this,t("c8ba"))},"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("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("订单完成后,用户在指定期限内可申请售后,设置0天不允许申请")])])]),t("a-divider",{attrs:{orientation:"left"}},[e._v("运费设置")]),t("a-form-item",{attrs:{label:"运费组合策略",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["freight_rule",{rules:[{required:!0}]}],expression:"['freight_rule', { rules: [{required: true}] }]"}]},[t("div",{staticClass:"radio-item"},[t("a-radio",{style:e.radioStyle,attrs:{value:"10"}},[e._v("叠加")]),t("div",{staticClass:"form-item-help"},[t("p",{staticClass:"extra"},[e._v("订单中的商品有多个运费模板时,将每个商品的运费之和订为订单总运费")])])],1),t("div",{staticClass:"radio-item"},[t("a-radio",{style:e.radioStyle,attrs:{value:"20"}},[e._v("以最低运费结算")]),t("div",{staticClass:"form-item-help"},[t("p",{staticClass:"extra"},[e._v("订单中的商品有多个运费模板时,取订单中运费最少的商品的运费计为订单总运费")])])],1),t("div",{staticClass:"radio-item"},[t("a-radio",{style:e.radioStyle,attrs:{value:"30"}},[e._v("以最高运费结算")]),t("div",{staticClass:"form-item-help"},[t("p",{staticClass:"extra"},[e._v("订单中的商品有多个运费模板时,取订单中运费最多的商品的运费计为订单总运费")])])],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)},l=[],n=(t("d3b7"),t("ddb0"),t("88bc")),i=t.n(n),o=t("f585"),s=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,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(s["e"])(t.getFieldsValue())&&a((function(){t.setFieldsValue(i()(e,["order","freight_rule"]))}))},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}))}}},c=u,d=(t("447d"),t("2877")),m=Object(d["a"])(c,r,l,!1,null,"aa90f864",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)},l=[],n=(t("d3b7"),t("ddb0"),t("88bc")),i=t.n(n),o=t("ca00"),s=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,s["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["e"])(t.getFieldsValue())&&a((function(){var a={};for(var r in e.scene)a[r]=i()(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,s["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")),v=Object(p["a"])(m,r,l,!1,null,"a7d90dde",null);a["default"]=v.exports},bee2:function(e,a,t){"use strict";function r(e,a){for(var t=0;t