(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["setting"],{"0439":function(e,t,r){"use strict";r("08c1")},"04ce":function(e,t,r){"use strict";r.r(t);r("b0c0");var a=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v("设置支付方式")]),t("a-spin",{attrs:{spinning:e.isLoading}},[e._l(e.options,(function(r,a){return t("div",{key:a,staticClass:"payment-item"},[t("div",{staticClass:"item-client"},[t("div",{staticClass:"name"},[e._v(e._s(r.name))]),t("p",{staticClass:"desc"},[e._v(e._s(r.desc))])]),t("a-table",{staticClass:"item-method",attrs:{rowKey:function(t){return e.rowKey(t.key,r.client)},columns:e.columns,dataSource:r.methods,pagination:!1,bordered:""},scopedSlots:e._u([{key:"method",fn:function(r){return[t("div",{staticClass:"pay-method-item"},["huifu"===r?t("img",{staticClass:"huifu-img",attrs:{src:"/static/yinlian.png"}}):"voucher"!==r?t("span",{staticClass:"pay-icon",style:{color:e.PayMethodIcons[r].color}},[t("a-icon",{staticClass:"icon",class:[r],attrs:{component:e.PayMethodIcons[r].icon}})],1):e._e(),t("span",[e._v(e._s(e.PaymentMethodEnum[r].name||111))])])]}},{key:"template",fn:function(r,a){return[a.method===e.PaymentMethodEnum.WECHAT.value?t("a-select",{staticClass:"select-template",attrs:{placeholder:"请选择支付模板"},model:{value:a.template_id,callback:function(t){e.$set(a,"template_id",t)},expression:"item.template_id"}},[t("a-select-option",{attrs:{value:0}},[e._v("无")]),e._l(e.wechatTemplateList,(function(r,a){return t("a-select-option",{key:a,attrs:{value:r.template_id}},[e._v(e._s(r.name))])}))],2):e._e(),a.method===e.PaymentMethodEnum.ALIPAY.value?t("a-select",{staticClass:"select-template",attrs:{placeholder:"请选择支付模板"},model:{value:a.template_id,callback:function(t){e.$set(a,"template_id",t)},expression:"item.template_id"}},[t("a-select-option",{attrs:{value:0}},[e._v("无")]),e._l(e.alipayTemplateList,(function(r,a){return t("a-select-option",{key:a,attrs:{value:r.template_id}},[e._v(e._s(r.name))])}))],2):e._e(),a.method===e.PaymentMethodEnum.HUIFU.value?t("a-select",{staticClass:"select-template",attrs:{placeholder:"请选择支付模板"},model:{value:a.template_id,callback:function(t){e.$set(a,"template_id",t)},expression:"item.template_id"}},[t("a-select-option",{attrs:{value:0}},[e._v("无")]),e._l(e.huifuTemplateList,(function(r,a){return t("a-select-option",{key:a,attrs:{value:r.template_id}},[e._v(e._s(r.name))])}))],2):e._e(),a.method===e.PaymentMethodEnum.VOUCHER.value?t("a-select",{staticClass:"select-template",attrs:{placeholder:"请选择支付模板"},model:{value:a.template_id,callback:function(t){e.$set(a,"template_id",t)},expression:"item.template_id"}},[t("a-select-option",{attrs:{value:0}},[e._v("无")]),e._l(e.voucherTemplateList,(function(r,a){return t("a-select-option",{key:a,attrs:{value:r.template_id}},[e._v(e._s(r.name))])}))],2):e._e(),a.is_must_template&&e.$auth(e.createTemplatePath)?t("router-link",{staticClass:"ml-15 f-12",attrs:{to:{path:e.createTemplatePath},target:"_blank"}},[e._v("新增模板")]):e._e(),a.is_must_template?e._e():t("span",{staticClass:"f-12 c-muted-9"},[e._v("无需支付模板")])]}},{key:"enable",fn:function(r,a){return[t("a-switch",{attrs:{size:"small"},model:{value:a.is_enable,callback:function(t){e.$set(a,"is_enable",t)},expression:"item.is_enable"}})]}},{key:"default",fn:function(a,i,o){return[t("a-switch",{attrs:{size:"small",checked:i.is_default},on:{change:function(t){return e.onChangeDefault(t,o,r.methods)}}})]}}],null,!0)})],1)})),t("a-row",[t("a-col",{attrs:{offset:7}},[t("a-button",{attrs:{type:"primary",loading:e.isBtnLoading},on:{click:e.handleSubmit}},[e._v("保存")])],1)],1)],2)],1)},i=[],o=r("c7eb"),n=r("1da1"),l=r("ade3"),s=(r("99af"),r("4de4"),r("d3b7"),r("159b"),r("04b3")),c=r("b775"),u={options:"/setting.payment/options",update:"/setting.payment/update"};function d(e){return Object(c["b"])({url:u.options,method:"get",params:e})}function m(e){return Object(c["b"])({url:u.update,method:"post",data:e})}var p=r("759f"),f=r("3f9c"),h=Object(l["a"])(Object(l["a"])(Object(l["a"])(Object(l["a"])({},f["a"].ALIPAY.value,{icon:s["payAlipay"],color:"#009fe8"}),f["a"].BALANCE.value,{icon:s["payBalance"],color:"#e8a807"}),f["a"].WECHAT.value,{icon:s["payWechat"],color:"#59b64c"}),f["a"].HUIFU.value,{icon:s["payHuifu"],color:"#009fe8"}),v=[{title:"支付方式",dataIndex:"method",width:"25%",scopedSlots:{customRender:"method"}},{title:"支付模板",dataIndex:"template_id",width:"35%",scopedSlots:{customRender:"template"}},{title:"是否启用",dataIndex:"is_enable",width:"20%",scopedSlots:{customRender:"enable"}},{title:"是否为默认支付",dataIndex:"is_default",width:"20%",scopedSlots:{customRender:"default"}}],g={components:{},data:function(){return{isLoading:!1,isBtnLoading:!1,labelCol:{span:3},wrapperCol:{span:10},PaymentMethodEnum:f["a"],PayMethodIcons:h,createTemplatePath:"/setting/payment/template/create",columns:v,options:{},templateList:[]}},computed:{wechatTemplateList:function(){return this.templateList.filter((function(e){return"wechat"===e.method}))},alipayTemplateList:function(){return this.templateList.filter((function(e){return"alipay"===e.method}))},huifuTemplateList:function(){return this.templateList.filter((function(e){return"huifu"===e.method}))},voucherTemplateList:function(){return this.templateList.filter((function(e){return"voucher"===e.method}))}},created:function(){var e=this;return Object(n["a"])(Object(o["a"])().mark((function t(){return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.getDetail();case 2:return t.next=4,e.getTemplateList();case 4:case"end":return t.stop()}}),t)})))()},methods:{getDetail:function(){var e=this;return Object(n["a"])(Object(o["a"])().mark((function t(){return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.isLoading=!0,d(e.templateId).then((function(t){return e.options=t.data.options})).finally((function(){return e.isLoading=!1}));case 2:case"end":return t.stop()}}),t)})))()},getTemplateList:function(){var e=this;return Object(n["a"])(Object(o["a"])().mark((function t(){return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.isLoading=!0,t.abrupt("return",p["b"]().then((function(t){return e.templateList=t.data.list})).finally((function(){return e.isLoading=!1})));case 2:case"end":return t.stop()}}),t)})))()},rowKey:function(e,t){return"".concat(e,"-").concat(t)},onChangeDefault:function(e,t,r){r.forEach((function(e){return e.is_default=!1})),r[t].is_default=e},handleSubmit:function(e){var t=this;e.preventDefault(),this.isLoading=!0,this.isBtnLoading=!0,m({form:this.options}).then((function(e){t.$message.success(e.message,1.5),t.getDetail()})).finally((function(){t.isLoading=!1,t.isBtnLoading=!1}))}}},b=g,y=(r("6cc3"),r("2877")),_=Object(y["a"])(b,a,i,!1,null,"104067c4",null);t["default"]=_.exports},"08c1":function(e,t,r){},"08e2":function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e._self._c;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-model",{ref:"myForm",staticClass:"my-form",attrs:{model:e.record,labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-form-model-item",{attrs:{label:"开启商城客服",labelCol:e.labelCol,wrapperCol:e.wrapperCol,required:""}},[t("a-radio-group",{model:{value:e.record.enabled,callback:function(t){e.$set(e.record,"enabled",t)},expression:"record.enabled"}},[t("a-radio",{attrs:{value:1}},[e._v("开启")]),t("a-radio",{attrs:{value:0}},[e._v("关闭")])],1),t("p",{staticClass:"form-item-help"},[t("small",[e._v("开启后将在用户端商品详情页、个人中心页显示在线客服按钮")])])],1),1==e.record.enabled?t("div",[t("a-form-model-item",{attrs:{label:"在线客服方式",labelCol:e.labelCol,wrapperCol:e.wrapperCol,required:""}},[t("a-radio-group",{model:{value:e.record.provider,callback:function(t){e.$set(e.record,"provider",t)},expression:"record.provider"}},[t("a-radio",{attrs:{value:"mpwxkf"}},[e._v("微信小程序客服")]),t("a-radio",{attrs:{value:"wxqykf"}},[e._v("企业微信客服")]),t("a-radio",{attrs:{value:"ewmkf"}},[e._v("二维码客服")])],1),t("div",{directives:[{name:"show",rawName:"v-show",value:"mpwxkf"===e.record.provider,expression:"record.provider === 'mpwxkf'"}],staticClass:"form-item-help"},[t("p",{staticClass:"extra"},[e._v("仅支持微信小程序端,H5端、APP端等其他端不支持")]),t("p",{staticClass:"extra"},[t("span",[e._v("网页版客服工具:")]),t("a",{attrs:{href:"https://mpkf.weixin.qq.com",target:"_blank"}},[e._v("https://mpkf.weixin.qq.com")])])]),t("div",{directives:[{name:"show",rawName:"v-show",value:"wxqykf"===e.record.provider,expression:"record.provider === 'wxqykf'"}],staticClass:"form-item-help"},[t("p",{staticClass:"extra"},[e._v("支持微信小程序端、H5端、APP端")]),t("p",{staticClass:"extra"},[t("span",[e._v("网页版客服工具:")]),t("a",{attrs:{href:"https://work.weixin.qq.com/kf/helpdesk",target:"_blank"}},[e._v("https://work.weixin.qq.com/kf/helpdesk")])])])],1),"wxqykf"===e.record.provider?t("div",[t("a-form-model-item",{attrs:{label:"客服链接",labelCol:e.labelCol,wrapperCol:e.wrapperCol,prop:"config.wxqykf.url",rules:{required:!0,message:"请填写客服链接"}}},[t("a-input",{model:{value:e.record.config.wxqykf.url,callback:function(t){e.$set(e.record.config.wxqykf,"url",t)},expression:"record.config.wxqykf.url"}})],1),t("a-form-model-item",{attrs:{label:"企业ID",labelCol:e.labelCol,wrapperCol:e.wrapperCol,prop:"config.wxqykf.corpId",rules:{required:!0,message:"请填写企业ID"}}},[t("a-input",{model:{value:e.record.config.wxqykf.corpId,callback:function(t){e.$set(e.record.config.wxqykf,"corpId",t)},expression:"record.config.wxqykf.corpId"}})],1)],1):e._e(),"ewmkf"===e.record.provider?t("div",[t("a-form-model-item",{attrs:{label:"客服二维码",labelCol:e.labelCol,wrapperCol:e.wrapperCol,prop:"config.ewmkf.qrCodeId",rules:{required:!0,message:"请上传客服二维码",validator:e.validateQrCode}}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["qrCodeId"],expression:"['qrCodeId']"}],attrs:{defaultList:e.record.config.ewmkf.qrCode?[{preview_url:e.record.config.ewmkf.qrCode}]:[]},on:{change:function(t,r){return e.setImage(t,r,"qrCodeId")}}})],1)],1):e._e()],1):e._e(),t("a-form-model-item",{attrs:{wrapperCol:{span:e.wrapperCol.span,offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary",loading:e.confirmLoading},on:{click:e.handleSubmit}},[e._v("保存")])],1)],1)],1)],1)},i=[],o=(r("d3b7"),r("ddb0"),r("2ef0")),n=r("f585"),l=r("2af9"),s=r("35c4"),c={enabled:1,provider:"mpwxkf",config:{mpwxkf:{},wxqykf:{url:"",corpId:""},ewmkf:{qrCodeId:"",qrCode:""}}},u={components:{SelectImage:l["j"]},data:function(){return{key:s["a"].CUSTOMER.value,labelCol:{span:4},wrapperCol:{span:10},isLoading:!1,confirmLoading:!1,record:Object(o["cloneDeep"])(c)}},created:function(){this.getDetail()},methods:{getDetail:function(){var e=this;this.isLoading=!0,n["a"](this.key).then((function(t){return e.record=t.data.values})).finally((function(){return e.isLoading=!1}))},setImage:function(e,t,r){e&&(this.record.config.ewmkf[r]=e)},validateQrCode:function(e,t,r){t||r(new Error("请上传客服二维码!")),r()},handleSubmit:function(e){var t=this;this.$refs.myForm.validate((function(e){e&&(t.confirmLoading=!0,n["b"](t.key,{form:t.record}).then((function(e){t.$message.success(e.message,1.5)})).finally((function(e){return t.confirmLoading=!1})))}))}}},d=u,m=(r("1410"),r("2877")),p=Object(m["a"])(d,a,i,!1,null,"29821dc1",null);t["default"]=p.exports},1410:function(e,t,r){"use strict";r("4d93")},"147b":function(e,t,r){},"195f":function(e,t,r){},"1da1":function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));r("d3b7");function a(e,t,r,a,i,o,n){try{var l=e[o](n),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(a,i)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var n=e.apply(t,r);function l(e){a(n,i,o,l,s,"next",e)}function s(e){a(n,i,o,l,s,"throw",e)}l(void 0)}))}}},"25a8":function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e._self._c;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:["is_open",{initialValue:1,rules:[{required:!0}]}],expression:"['is_open', { initialValue: 1, rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:1}},[e._v("开启")]),t("a-radio",{attrs:{value:0}},[e._v("关闭")])],1)],1),t("a-form-item",{attrs:{label:"订单打印机",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["printer_id",{rules:[{required:!0,message:"订单打印机至少选择一个"}]}],expression:"['printer_id', { rules: [{ required: true, message: '订单打印机至少选择一个' }] }]"}],staticStyle:{width:"300px"},attrs:{placeholder:"请选择订单打印机"}},e._l(e.printerList,(function(r,a){return t("a-select-option",{key:a,attrs:{value:r.printer_id}},[e._v(e._s(r.printer_name))])})),1)],1),t("a-form-item",{attrs:{label:"订单打印方式",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-checkbox-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["order_status",{rules:[{required:!0,message:"订单打印方式至少选择一个"}]}],expression:"['order_status', { rules: [{ required: true, message: '订单打印方式至少选择一个' }] }]"}]},[t("a-checkbox",{attrs:{value:20}},[e._v("订单付款时")])],1)],1),t("a-form-item",{attrs:{wrapperCol:{span:e.wrapperCol.span,offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary","html-type":"submit"}},[e._v("提交")])],1)],1)],1)],1)},i=[],o=r("c7eb"),n=r("1da1"),l=(r("d3b7"),r("ddb0"),r("88bc")),s=r.n(l),c=r("f585"),u=r("f50c"),d=r("71b5"),m=r("ca00"),p={data:function(){return{key:"printer",labelCol:{span:4},wrapperCol:{span:10},isLoading:!1,form:this.$form.createForm(this),record:{},printerList:[],StorageEnum:d["a"]}},created:function(){var e=this;return Object(n["a"])(Object(o["a"])().mark((function t(){return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.getDetail();case 2:return t.next=4,e.getPrinterList();case 4:e.setFieldsValue();case 5:case"end":return t.stop()}}),t)})))()},methods:{getDetail:function(){var e=this;return Object(n["a"])(Object(o["a"])().mark((function t(){return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.isLoading=!0,t.abrupt("return",c["a"](e.key).then((function(t){e.record=t.data.values})).finally((function(){return e.isLoading=!1})));case 2:case"end":return t.stop()}}),t)})))()},getPrinterList:function(){var e=this;return Object(n["a"])(Object(o["a"])().mark((function t(){return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.isLoading=!0,t.abrupt("return",u["b"]().then((function(t){e.printerList=t.data.list})).finally((function(){return e.isLoading=!1})));case 2:case"end":return t.stop()}}),t)})))()},setFieldsValue:function(){var e=this.record,t=this.$nextTick,r=this.form;!Object(m["f"])(r.getFieldsValue())&&t((function(){var t=s()(e,["is_open","printer_id","order_status"]);t.printer_id=parseInt(t.printer_id),!t.printer_id&&delete t.printer_id,r.setFieldsValue(t)}))},handleSubmit:function(e){var t=this;e.preventDefault();var r=this.form.validateFields;r((function(e,r){!e&&t.onFormSubmit(r)}))},onFormSubmit:function(e){var t=this;this.isLoading=!0,c["b"](this.key,{form:e}).then((function(e){return t.$message.success(e.message,1.5)})).finally((function(){return t.isLoading=!1}))}}},f=p,h=(r("2aeb"),r("2877")),v=Object(h["a"])(f,a,i,!1,null,"29ac8f6d",null);t["default"]=v.exports},2775:function(e,t,r){},"2a66":function(e,t,r){"use strict";r.d(t,"e",(function(){return o})),r.d(t,"b",(function(){return n})),r.d(t,"a",(function(){return l})),r.d(t,"d",(function(){return s})),r.d(t,"c",(function(){return c}));var a=r("b775"),i={list:"/setting.express/list",all:"/setting.express/all",add:"/setting.express/add",edit:"/setting.express/edit",delete:"/setting.express/delete"};function o(e){return Object(a["b"])({url:i.list,method:"get",params:e})}function n(e){return Object(a["b"])({url:i.all,method:"get",params:e})}function l(e){return Object(a["b"])({url:i.add,method:"post",data:e})}function s(e){return Object(a["b"])({url:i.edit,method:"post",data:e})}function c(e){return Object(a["b"])({url:i.delete,method:"post",data:e})}},"2aeb":function(e,t,r){"use strict";r("4beb")},3267:function(e,t,r){"use strict";var a=r("5c06");t["a"]=new a["a"]([{key:"CAPTCHA",name:"短信验证码",value:"captcha"},{key:"ORDER_PAY",name:"新付款订单",value:"order_pay"}])},"35c4":function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var a=r("5c06"),i=new a["a"]([{key:"DELIVERY",name:"配送设置",value:"delivery"},{key:"TRADE",name:"交易设置",value:"trade"},{key:"STORAGE",name:"上传设置",value:"storage"},{key:"PRINTER",name:"小票打印",value:"printer"},{key:"FULL_FREE",name:"满额包邮设置",value:"full_free"},{key:"RECHARGE",name:"充值设置",value:"recharge"},{key:"POINTS",name:"积分设置",value:"points"},{key:"SUBMSG",name:"订阅消息设置",value:"submsg"},{key:"APP_THEME",name:"店铺页面风格",value:"app_theme"},{key:"PAGE_CATEGORY_TEMPLATE",name:"分类页模板",value:"page_category_template"},{key:"RECOMMENDED",name:"商品推荐设置",value:"recommended"},{key:"CUSTOMER",name:"商城客服设置",value:"customer"}])},"368a":function(e,t,r){},3833:function(e,t,r){"use strict";r.r(t);r("b0c0");var a=function(){var e=this,t=e._self._c;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-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}],attrs:{placeholder:"请输入模版名称"}})],1),t("a-form-item",{attrs:{label:"计费方式",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["method",{initialValue:10,rules:[{required:!0}]}],expression:"['method', { initialValue: 10, rules: [{ required: true }] }]"}],on:{change:e.onChangemMethod}},[t("a-radio",{attrs:{value:10}},[e._v("按件数")]),t("a-radio",{attrs:{value:20}},[e._v("按重量")])],1)],1),t("a-form-item",{attrs:{label:"配送区域及运费",labelCol:e.labelCol,wrapperCol:{span:15},required:""}},[t("a-table",{directives:[{name:"show",rawName:"v-show",value:e.ruleList.length,expression:"ruleList.length"}],staticClass:"table-rules",attrs:{columns:e.columns,dataSource:e.ruleList,pagination:!1,bordered:""},scopedSlots:e._u([{key:"region_text",fn:function(r,a,i){return[t("p",{staticClass:"content"},e._l(r,(function(r,a){return t("span",{key:a},[t("span",[e._v(e._s(r.name))]),r.citys.length?[t("span",[e._v("(")]),e._l(r.citys,(function(a,i){return t("span",{key:i,staticClass:"city-name"},[e._v(e._s(a.name)+e._s(r.citys.length>i+1?"、":""))])})),t("span",[e._v(")")])]:e._e(),t("span",[e._v(e._s(" "))])],2)})),0),t("p",{staticClass:"operation"},[t("a",{staticClass:"edit",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.handleEdit(i,a)}}},[e._v("编辑")]),t("a",{staticClass:"delete",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.handleDelete(i)}}},[e._v("删除")])])]}},{key:"first",fn:function(r,a){return[t("a-input-number",{attrs:{min:10==e.method?1:.01,precision:10==e.method?0:2},model:{value:a.first,callback:function(t){e.$set(a,"first",t)},expression:"item.first"}})]}},{key:"first_fee",fn:function(r,a){return[t("a-input-number",{attrs:{min:0,precision:2},model:{value:a.first_fee,callback:function(t){e.$set(a,"first_fee",t)},expression:"item.first_fee"}})]}},{key:"additional",fn:function(r,a){return[t("a-input-number",{attrs:{min:0,precision:10==e.method?0:2},model:{value:a.additional,callback:function(t){e.$set(a,"additional",t)},expression:"item.additional"}})]}},{key:"additional_fee",fn:function(r,a){return[t("a-input-number",{attrs:{min:0,precision:2},model:{value:a.additional_fee,callback:function(t){e.$set(a,"additional_fee",t)},expression:"item.additional_fee"}})]}}])}),t("a-button",{attrs:{icon:"environment"},on:{click:e.handleAdd}},[e._v("点击添加配送区域")])],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入排序值"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入排序值' }] }]"}],attrs:{min:0}})],1),t("a-form-item",{staticClass:"mt-20",attrs:{wrapperCol:{span:e.wrapperCol.span,offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary","html-type":"submit",loading:e.isBtnLoading}},[e._v("提交")])],1)],1),t("AreasModal",{ref:"AreasModal",on:{handleSubmit:e.handleAreaSubmit}})],1)],1)},i=[],o=r("5530"),n=(r("d81d"),r("a434"),r("d3b7"),r("159b"),r("88bc")),l=r.n(n),s=r("ca00"),c=r("fd0d"),u=r("967a"),d=r("caec"),m={key:0,first:1,first_fee:0,additional:0,additional_fee:0,region:[],region_text:[]},p={components:{AreasModal:c["b"]},data:function(){return{method:10,columns:[{title:"可配送区域",dataIndex:"region_text",width:"400px",scopedSlots:{customRender:"region_text"}},{title:"首件 (个)",dataIndex:"first",scopedSlots:{customRender:"first"}},{title:"运费(元)",dataIndex:"first_fee",scopedSlots:{customRender:"first_fee"}},{title:"续件 (个)",dataIndex:"additional",scopedSlots:{customRender:"additional"}},{title:"续费(元)",dataIndex:"additional_fee",scopedSlots:{customRender:"additional_fee"}}],ruleList:[],isLoading:!1,isBtnLoading:!1,labelCol:{span:3},wrapperCol:{span:10},form:this.$form.createForm(this),citysCount:null,deliveryId:null,record:{}}},created:function(){var e=this;this.deliveryId=this.$route.query.deliveryId,this.getDetail(),d["a"].getCitysCount().then((function(t){e.citysCount=t}))},watch:{method:function(e){this.updateMethod()}},methods:{getDetail:function(){var e=this,t=this.deliveryId,r=this.form;this.isLoading=!0,u["d"]({deliveryId:t}).then((function(t){var a=t.data.detail;!Object(s["f"])(r.getFieldsValue())&&r.setFieldsValue(l()(a,["name","method","sort"])),e.ruleList=a.rule.map((function(e,t){return Object(o["a"])(Object(o["a"])({},e),{},{key:t})})),e.method=a.method,e.record=a,e.isLoading=!1}))},onChangemMethod:function(e){this.method=e.target.value},updateMethod:function(){var e={10:{first:"首件 (个)",additional:"续件 (个)"},20:{first:"首重 (Kg)",additional:"续重 (Kg)"}};this.columns[1].title=e[this.method].first,this.columns[3].title=e[this.method].additional},handleAdd:function(){var e=this.ruleList.length,t=Object(o["a"])(Object(o["a"])({},m),{},{key:e}),r=this.getExcludedCityIds();if(r.length===this.citysCount)return this.$message.error("已选择了所有的区域",.8),!1;this.handleAreasModal("add",e,t,r)},handleEdit:function(e,t){var r=this.getExcludedCityIds();this.handleAreasModal("edit",e,t,r)},handleAreasModal:function(e,t,r,a){this.$refs.AreasModal.handle({scene:e,index:t,item:r},r.region,a)},getExcludedCityIds:function(){var e=[];return this.ruleList.forEach((function(t){t.region.forEach((function(t){e.push(t)}))})),e},handleAreaSubmit:function(e){var t=e.custom,r=t.scene,a=t.item;a.region=e.selectedCityIds,a.region_text=e.selectedText,"add"===r&&this.ruleList.push(a)},handleDelete:function(e){var t=this,r=this.$confirm({title:"您确定要删除该记录吗?",onOk:function(){t.ruleList.splice(e,1),r.destroy()}})},handleSubmit:function(e){var t=this;e.preventDefault();var r=this.form.validateFields,a=this.ruleList;r((function(e,r){return!e&&(0===a.length?(t.$message.error("您还没有添加配送区域及运费",.8),!1):(r.rules=a,void t.onFormSubmit(r)))}))},onFormSubmit:function(e){var t=this;this.isLoading=!0,this.isBtnLoading=!0,u["e"]({deliveryId:this.deliveryId,form:e}).then((function(e){t.$message.success(e.message,1.5),setTimeout((function(){t.$router.push("./index")}),1500)})).catch((function(){t.isBtnLoading=!1})).finally((function(){return t.isLoading=!1}))}}},f=p,h=(r("5b44"),r("2877")),v=Object(h["a"])(f,a,i,!1,null,null,null);t["default"]=v.exports},"3c76":function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var a=r("5c06"),i=new a["a"]([{key:"WECHAT",name:"微信支付",value:"wechat"},{key:"ALIPAY",name:"支付宝",value:"alipay"},{key:"BALANCE",name:"余额支付",value:"balance"},{key:"HUIFU",name:"银联支付",value:"huifu"}])},"3f9c":function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var a=r("5c06"),i=new a["a"]([{key:"WECHAT",name:"微信支付",value:"wechat"},{key:"ALIPAY",name:"支付宝",value:"alipay"},{key:"BALANCE",name:"余额支付",value:"balance"},{key:"HUIFU",name:"银联支付",value:"huifu"},{key:"VOUCHER",name:"支付凭证",value:"voucher"}])},4606:function(e,t,r){"use strict";r.r(t);r("4e82"),r("b0c0");var a=function(){var e=this,t=e._self._c;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-model",{ref:"myForm",staticClass:"my-form",attrs:{model:e.record,"label-col":e.labelCol,wrapperCol:e.wrapperCol}},[t("a-form-model-item",{attrs:{label:"支付模板名称",prop:"name",rules:[{required:!0,message:"请填写支付模板名称"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.name,callback:function(t){e.$set(e.record,"name",t)},expression:"record.name"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v("必须填写商户平台-营业执照名称,否则会影响分账功能")])])],1),t("a-form-model-item",{attrs:{label:"管理员备注",prop:"remarks"}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.remarks,callback:function(t){e.$set(e.record,"remarks",t)},expression:"record.remarks"}})],1),t("a-form-model-item",{staticClass:"mb-30",attrs:{label:"排序",prop:"sort",rules:[{required:!0,message:"请填写排序数值"}]}},[t("a-input-number",{attrs:{min:0,autocomplete:"off"},model:{value:e.record.sort,callback:function(t){e.$set(e.record,"sort",t)},expression:"record.sort"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v("数字越小越靠前")])])],1),t("a-form-model-item",{attrs:{label:"支付方式",prop:"method",rules:[{required:!0,message:"请选择支付方式"}]}},[t("a-radio-group",{attrs:{disabled:""},model:{value:e.record.method,callback:function(t){e.$set(e.record,"method",t)},expression:"record.method"}},[t("a-radio",{attrs:{value:e.PaymentMethodEnum.WECHAT.value}},[e._v(e._s(e.PaymentMethodEnum.WECHAT.name))]),t("a-radio",{attrs:{value:e.PaymentMethodEnum.ALIPAY.value}},[e._v(e._s(e.PaymentMethodEnum.ALIPAY.name))]),t("a-radio",{attrs:{value:e.PaymentMethodEnum.HUIFU.value}},[e._v(e._s(e.PaymentMethodEnum.HUIFU.name))]),t("a-radio",{attrs:{value:e.PaymentMethodEnum.VOUCHER.value}},[e._v(e._s(e.PaymentMethodEnum.VOUCHER.name))])],1),t("div",{staticClass:"form-item-help"},[e.record.method===e.PaymentMethodEnum.WECHAT.value?t("p",{staticClass:"extra"},[e._v(" 微信支付商户平台: "),t("a",{attrs:{href:"https://pay.weixin.qq.com",target:"_blank"}},[e._v("https://pay.weixin.qq.com")])]):e._e(),e.record.method===e.PaymentMethodEnum.ALIPAY.value?t("p",{staticClass:"extra"},[e._v(" 支付宝开发者平台: "),t("a",{attrs:{href:"https://open.alipay.com/dev/workspace",target:"_blank"}},[e._v("https://open.alipay.com/dev/workspace")])]):e._e()])],1),e.record.method===e.PaymentMethodEnum.WECHAT.value?t("div",{attrs:{method:e.record.method}},[t("a-form-model-item",{attrs:{label:"微信支付接口版本",prop:"config.wechat.version",rules:[{required:!0,message:"请选择微信支付接口版本"}]}},[t("a-radio-group",{on:{change:function(t){return e.clearValidate()}},model:{value:e.record.config.wechat.version,callback:function(t){e.$set(e.record.config.wechat,"version",t)},expression:"record.config.wechat.version"}},[t("a-radio",{attrs:{value:"v3"}},[t("span",[e._v("V3")]),t("a-tag",{staticClass:"ml-5",attrs:{color:"green"}},[e._v("推荐")])],1),t("a-radio",{attrs:{value:"v2"}},[e._v("V2")])],1),t("div",{staticClass:"form-item-help"},[t("small",[e._v("V2版本较老已经不再支持新出的API接口,强烈建议使用V3")])])],1),t("a-form-model-item",{attrs:{label:"微信商户号类型",prop:"config.wechat.mchType",rules:[{required:!0,message:"请选择微信商户号类型"}]}},[t("a-radio-group",{on:{change:function(t){return e.clearValidate()}},model:{value:e.record.config.wechat.mchType,callback:function(t){e.$set(e.record.config.wechat,"mchType",t)},expression:"record.config.wechat.mchType"}},[t("a-radio",{attrs:{value:"normal"}},[e._v("普通商户")]),t("a-radio",{attrs:{value:"provider"}},[e._v("子商户 (服务商模式)")])],1)],1),"normal"===e.record.config.wechat.mchType?t("div",{attrs:{mchType:e.record.config.wechat.mchType}},[t("a-form-model-item",{attrs:{label:"应用ID (AppID)",prop:"config.wechat.normal.appId",rules:[{required:!0,message:"请填写应用ID (AppID)"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.wechat.normal.appId,callback:function(t){e.$set(e.record.config.wechat.normal,"appId",t)},expression:"record.config.wechat.normal.appId"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v("微信小程序或者微信公众号的APPID,需要在哪个客户端支付就填写哪个,APP支付需要填写开放平台的应用APPID")])])],1),t("a-form-model-item",{attrs:{label:"微信商户号 (MchId)",prop:"config.wechat.normal.mchId",rules:[{required:!0,message:"请填写微信商户号 (MchId)"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.wechat.normal.mchId,callback:function(t){e.$set(e.record.config.wechat.normal,"mchId",t)},expression:"record.config.wechat.normal.mchId"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v("微信支付的商户号,纯数字格式;例如:1600000109")])])],1),t("a-form-model-item",{attrs:{label:"支付密钥 (APIKEY)",prop:"config.wechat.normal.apiKey",rules:[{required:!0,message:"请填写支付密钥 (APIKEY)"}]}},[t("a-input",{attrs:{type:"password",autocomplete:"off"},model:{value:e.record.config.wechat.normal.apiKey,callback:function(t){e.$set(e.record.config.wechat.normal,"apiKey",t)},expression:"record.config.wechat.normal.apiKey"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v('"微信支付商户平台"" - "账户中心" - "API安全" - "设置API密钥"')])])],1),t("a-form-model-item",{attrs:{label:"证书文件 (CERT)",prop:"config.wechat.normal.apiclientCert",rules:[{required:!0,message:"需要上传该文件"}]}},[t("InputFile",{attrs:{accept:".pem"},on:{change:function(t){return e.onChangeInputFile(t,arguments,"apiclientCert")}},model:{value:e.record.config.wechat.normal.apiclientCert,callback:function(t){e.$set(e.record.config.wechat.normal,"apiclientCert",t)},expression:"record.config.wechat.normal.apiclientCert"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v('请上传 "apiclient_cert.pem" 文件')])])],1),t("a-form-model-item",{attrs:{label:"证书文件 (KEY)",prop:"config.wechat.normal.apiclientKey",rules:[{required:!0,message:"需要上传该文件"}]}},[t("InputFile",{attrs:{accept:".pem"},on:{change:function(t){return e.onChangeInputFile(t,arguments,"apiclientKey")}},model:{value:e.record.config.wechat.normal.apiclientKey,callback:function(t){e.$set(e.record.config.wechat.normal,"apiclientKey",t)},expression:"record.config.wechat.normal.apiclientKey"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v('请上传 "apiclient_key.pem" 文件')])])],1)],1):e._e(),"provider"===e.record.config.wechat.mchType?t("div",{attrs:{mchType:e.record.config.wechat.mchType}},[t("a-form-model-item",{attrs:{label:"服务商应用ID (AppID)",prop:"config.wechat.provider.spAppId",rules:[{required:!0,message:"请填写服务商应用ID (AppID)"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.wechat.provider.spAppId,callback:function(t){e.$set(e.record.config.wechat.provider,"spAppId",t)},expression:"record.config.wechat.provider.spAppId"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v("请填写微信支付服务商的AppID")])])],1),t("a-form-model-item",{attrs:{label:"服务商户号 (MchId)",prop:"config.wechat.provider.spMchId",rules:[{required:!0,message:"请填写服务商户号 (MchId)"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.wechat.provider.spMchId,callback:function(t){e.$set(e.record.config.wechat.provider,"spMchId",t)},expression:"record.config.wechat.provider.spMchId"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v("微信支付服务商的商户号,纯数字格式;例如:1600000109")])])],1),t("a-form-model-item",{attrs:{label:"服务商密钥 (APIKEY)",prop:"config.wechat.provider.spApiKey",rules:[{required:!0,message:"请填写服务商密钥 (APIKEY)"}]}},[t("a-input",{attrs:{type:"password",autocomplete:"off"},model:{value:e.record.config.wechat.provider.spApiKey,callback:function(t){e.$set(e.record.config.wechat.provider,"spApiKey",t)},expression:"record.config.wechat.provider.spApiKey"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v('"微信支付商户平台"" - "账户中心" - "API安全" - "设置API密钥"')])])],1),t("a-form-model-item",{attrs:{label:"子商户应用ID (AppID)",prop:"config.wechat.provider.subAppId",rules:[{required:!0,message:"请填写子商户应用ID (AppID)"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.wechat.provider.subAppId,callback:function(t){e.$set(e.record.config.wechat.provider,"subAppId",t)},expression:"record.config.wechat.provider.subAppId"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v("微信小程序或者微信公众号的APPID,需要在哪个客户端支付就填写哪个,APP支付需要填写开放平台的应用APPID")])])],1),t("a-form-model-item",{attrs:{label:"子商户号 (MchId)",prop:"config.wechat.provider.subMchId",rules:[{required:!0,message:"请填写子商户号 (MchId)"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.wechat.provider.subMchId,callback:function(t){e.$set(e.record.config.wechat.provider,"subMchId",t)},expression:"record.config.wechat.provider.subMchId"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v("微信支付的商户号,纯数字格式;例如:1600000109")])])],1),t("a-form-model-item",{attrs:{label:"服务商证书文件 (CERT)",prop:"config.wechat.provider.spApiclientCert",rules:[{required:!0,message:"需要上传该文件"}]}},[t("InputFile",{attrs:{accept:".pem"},on:{change:function(t){return e.onChangeInputFile(t,arguments,"spApiclientCert")}},model:{value:e.record.config.wechat.provider.spApiclientCert,callback:function(t){e.$set(e.record.config.wechat.provider,"spApiclientCert",t)},expression:"record.config.wechat.provider.spApiclientCert"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v('请上传 "apiclient_cert.pem" 文件')])])],1),t("a-form-model-item",{attrs:{label:"服务商证书文件 (KEY)",prop:"config.wechat.provider.spApiclientKey",rules:[{required:!0,message:"需要上传该文件"}]}},[t("InputFile",{attrs:{accept:".pem"},on:{change:function(t){return e.onChangeInputFile(t,arguments,"spApiclientKey")}},model:{value:e.record.config.wechat.provider.spApiclientKey,callback:function(t){e.$set(e.record.config.wechat.provider,"spApiclientKey",t)},expression:"record.config.wechat.provider.spApiclientKey"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v('请上传 "apiclient_key.pem" 文件')])])],1)],1):e._e()],1):e._e(),e.record.method===e.PaymentMethodEnum.ALIPAY.value?t("div",{attrs:{method:e.record.method}},[t("a-form-model-item",{attrs:{label:"支付宝应用 (AppID)",prop:"config.alipay.appId",rules:[{required:!0,message:"请填写支付宝应用 (AppID)"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.alipay.appId,callback:function(t){e.$set(e.record.config.alipay,"appId",t)},expression:"record.config.alipay.appId"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v("支付宝分配给开发者的应用ID;例如:2021072300007148")])])],1),t("a-form-model-item",{attrs:{label:"签名算法 (signType)",prop:"config.alipay.signType",rules:[{required:!0,message:"请选择签名算法 (signType)"}]}},[t("a-radio-group",{model:{value:e.record.config.alipay.signType,callback:function(t){e.$set(e.record.config.alipay,"signType",t)},expression:"record.config.alipay.signType"}},[t("a-radio",{attrs:{value:"RSA2"}},[e._v("RSA2")]),t("a-radio",{attrs:{value:"RSA",disabled:!0}},[e._v("RSA")])],1)],1),t("a-form-model-item",{attrs:{label:"加签模式",prop:"config.alipay.signMode",rules:[{required:!0,message:"请选择加签模式"}]}},[t("a-radio-group",{model:{value:e.record.config.alipay.signMode,callback:function(t){e.$set(e.record.config.alipay,"signMode",t)},expression:"record.config.alipay.signMode"}},[t("a-radio",{attrs:{value:10}},[t("span",[e._v("公钥证书")]),t("a-tag",{staticClass:"ml-5",attrs:{color:"green"}},[e._v("推荐")])],1),t("a-radio",{attrs:{value:20}},[e._v("公钥")])],1),t("div",{staticClass:"form-item-help"},[t("small",[e._v("如需使用资金支出类的接口,则必须使用公钥证书模式")])])],1),20===e.record.config.alipay.signMode?t("div",{attrs:{method:e.record.method}},[t("a-form-model-item",{attrs:{label:"支付宝公钥 (alipayPublicKey)",prop:"config.alipay.alipayPublicKey",rules:[{required:!0,message:"请填写支付宝公钥 (alipayPublicKey)"}]}},[t("a-textarea",{attrs:{autoSize:{minRows:4,maxRows:6},autocomplete:"off"},model:{value:e.record.config.alipay.alipayPublicKey,callback:function(t){e.$set(e.record.config.alipay,"alipayPublicKey",t)},expression:"record.config.alipay.alipayPublicKey"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v('可在 "支付宝开放平台" - "应用信息" - "接口加签方式" - "支付宝公钥" 中复制')])])],1)],1):e._e(),10===e.record.config.alipay.signMode?t("div",{attrs:{method:e.record.method}},[t("a-form-model-item",{attrs:{label:"应用公钥证书",prop:"config.alipay.appCertPublicKey",rules:[{required:!0,message:"需要上传该文件"}]}},[t("InputFile",{attrs:{accept:".crt"},on:{change:function(t){return e.onChangeInputFile(t,arguments,"appCertPublicKey")}},model:{value:e.record.config.alipay.appCertPublicKey,callback:function(t){e.$set(e.record.config.alipay,"appCertPublicKey",t)},expression:"record.config.alipay.appCertPublicKey"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v('请上传 "appCertPublicKey_xxxxxxxx.crt" 文件')])])],1),t("a-form-model-item",{attrs:{label:"支付宝公钥证书",prop:"config.alipay.alipayCertPublicKey",rules:[{required:!0,message:"需要上传该文件"}]}},[t("InputFile",{attrs:{accept:".crt"},on:{change:function(t){return e.onChangeInputFile(t,arguments,"alipayCertPublicKey")}},model:{value:e.record.config.alipay.alipayCertPublicKey,callback:function(t){e.$set(e.record.config.alipay,"alipayCertPublicKey",t)},expression:"record.config.alipay.alipayCertPublicKey"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v('请上传 "alipayCertPublicKey_RSA2.crt" 文件')])])],1),t("a-form-model-item",{attrs:{label:"支付宝根证书",prop:"config.alipay.alipayRootCert",rules:[{required:!0,message:"需要上传该文件"}]}},[t("InputFile",{attrs:{accept:".crt"},on:{change:function(t){return e.onChangeInputFile(t,arguments,"alipayRootCert")}},model:{value:e.record.config.alipay.alipayRootCert,callback:function(t){e.$set(e.record.config.alipay,"alipayRootCert",t)},expression:"record.config.alipay.alipayRootCert"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v('请上传 "alipayRootCert.crt" 文件')])])],1)],1):e._e(),t("a-form-model-item",{attrs:{label:"应用私钥 (privateKey)",prop:"config.alipay.merchantPrivateKey",rules:[{required:!0,message:"请填写应用私钥 (privateKey)"}]}},[t("a-textarea",{attrs:{autoSize:{minRows:4,maxRows:6},autocomplete:"off"},model:{value:e.record.config.alipay.merchantPrivateKey,callback:function(t){e.$set(e.record.config.alipay,"merchantPrivateKey",t)},expression:"record.config.alipay.merchantPrivateKey"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v('查看 "应用私钥RSA2048-敏感数据,请妥善保管.txt" 文件,将全部内容复制到此处')])])],1)],1):e._e(),e.record.method===e.PaymentMethodEnum.HUIFU.value?t("div",{attrs:{method:e.record.method}},[t("a-form-model-item",{attrs:{label:"商户号类型",prop:"config.huifu.mchType",rules:[{required:!0,message:"请选择商户号类型"}]}},[t("a-radio-group",{on:{change:function(t){return e.clearValidate()}},model:{value:e.record.config.huifu.mchType,callback:function(t){e.$set(e.record.config.huifu,"mchType",t)},expression:"record.config.huifu.mchType"}},[t("a-radio",{attrs:{value:"normal"}},[e._v("普通商户")])],1)],1),"normal"===e.record.config.huifu.mchType?t("div",{attrs:{mchType:e.record.config.huifu.mchType}},[t("a-form-model-item",{attrs:{label:"APPID",prop:"config.huifu.normal.appid",rules:[{required:!0,message:"请填写APPID"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.huifu.normal.appid,callback:function(t){e.$set(e.record.config.huifu.normal,"appid",t)},expression:"record.config.huifu.normal.appid"}})],1),t("a-form-model-item",{attrs:{label:"APPKEY",prop:"config.huifu.normal.appkey",rules:[{required:!0,message:"请填写APPKEY"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.huifu.normal.appkey,callback:function(t){e.$set(e.record.config.huifu.normal,"appkey",t)},expression:"record.config.huifu.normal.appkey"}})],1),t("a-form-model-item",{attrs:{label:"商户编号",prop:"config.huifu.normal.mid",rules:[{required:!0,message:"请填写商户编号"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.huifu.normal.mid,callback:function(t){e.$set(e.record.config.huifu.normal,"mid",t)},expression:"record.config.huifu.normal.mid"}})],1),t("a-form-model-item",{attrs:{label:"终端号",prop:"config.huifu.normal.tid",rules:[{required:!0,message:"请填终端号"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.huifu.normal.tid,callback:function(t){e.$set(e.record.config.huifu.normal,"tid",t)},expression:"record.config.huifu.normal.tid"}})],1),t("a-form-model-item",{attrs:{label:"来源编号",prop:"config.huifu.normal.msgSrcId",rules:[{required:!0,message:"请填来源编号"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.huifu.normal.msgSrcId,callback:function(t){e.$set(e.record.config.huifu.normal,"msgSrcId",t)},expression:"record.config.huifu.normal.msgSrcId"}})],1),t("a-form-model-item",{attrs:{label:"消息来源",prop:"config.huifu.normal.msgSrc",rules:[{required:!0,message:"请填消息来源"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.huifu.normal.msgSrc,callback:function(t){e.$set(e.record.config.huifu.normal,"msgSrc",t)},expression:"record.config.huifu.normal.msgSrc"}})],1),t("a-form-model-item",{attrs:{label:"密钥(网付)",prop:"config.huifu.normal.md5Secret",rules:[{required:!0,message:"请填写支付密钥(网付)"}]}},[t("a-input",{attrs:{type:"password",autocomplete:"off"},model:{value:e.record.config.huifu.normal.md5Secret,callback:function(t){e.$set(e.record.config.huifu.normal,"md5Secret",t)},expression:"record.config.huifu.normal.md5Secret"}})],1)],1):e._e(),"provider"===e.record.config.huifu.mchType?t("div",{attrs:{mchType:e.record.config.huifu.mchType}},[t("a-form-model-item",{attrs:{label:"APPID",prop:"config.huifu.provider.spAppid",rules:[{required:!0,message:"请填写APPID"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.huifu.provider.spAppid,callback:function(t){e.$set(e.record.config.huifu.provider,"spAppid",t)},expression:"record.config.huifu.provider.spAppid"}})],1),t("a-form-model-item",{attrs:{label:"APPKEY",prop:"config.huifu.provider.syAppkey",rules:[{required:!0,message:"请填写APPKEY"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.huifu.provider.syAppkey,callback:function(t){e.$set(e.record.config.huifu.provider,"syAppkey",t)},expression:"record.config.huifu.provider.syAppkey"}})],1),t("a-form-model-item",{attrs:{label:"商户编号",prop:"config.huifu.provider.syMid",rules:[{required:!0,message:"请填写商户编号"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.huifu.provider.syMid,callback:function(t){e.$set(e.record.config.huifu.provider,"syMid",t)},expression:"record.config.huifu.provider.syMid"}})],1),t("a-form-model-item",{attrs:{label:"终端号",prop:"config.huifu.provider.syTid",rules:[{required:!0,message:"请填写终端号"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.huifu.provider.syTid,callback:function(t){e.$set(e.record.config.huifu.provider,"syTid",t)},expression:"record.config.huifu.provider.syTid"}})],1),t("a-form-model-item",{attrs:{label:"来源编号",prop:"config.huifu.provider.syMsgSrcId",rules:[{required:!0,message:"请填写来源编号"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.huifu.provider.syMsgSrcId,callback:function(t){e.$set(e.record.config.huifu.provider,"syMsgSrcId",t)},expression:"record.config.huifu.provider.syMsgSrcId"}})],1),t("a-form-model-item",{attrs:{label:"消息来源",prop:"config.huifu.provider.syMsgSrc",rules:[{required:!0,message:"请填写终端号"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.huifu.provider.syMsgSrc,callback:function(t){e.$set(e.record.config.huifu.provider,"syMsgSrc",t)},expression:"record.config.huifu.provider.syMsgSrc"}})],1),t("a-form-model-item",{attrs:{label:"密钥(网付)",prop:"config.huifu.provider.syMd5Secret",rules:[{required:!0,message:"请填写支付密钥(网付)"}]}},[t("a-input",{attrs:{type:"password",autocomplete:"off"},model:{value:e.record.config.huifu.normal.syMd5Secret,callback:function(t){e.$set(e.record.config.huifu.normal,"syMd5Secret",t)},expression:"record.config.huifu.normal.syMd5Secret"}})],1)],1):e._e()],1):e._e(),e.record.method===e.PaymentMethodEnum.VOUCHER.value?t("div",{attrs:{method:e.record.method}},[t("a-form-model-item",{attrs:{label:"微信商户名称",prop:"config.voucher.wechatMerchantName",rules:[{required:!1,message:"请填写微信商户名称"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.voucher.wechatMerchantName,callback:function(t){e.$set(e.record.config.voucher,"wechatMerchantName",t)},expression:"record.config.voucher.wechatMerchantName"}})],1),t("a-form-model-item",{attrs:{label:"微信二维码"}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["wechatQrCodeId",{rules:[{required:!1,message:"请上传微信二维码"}]}],expression:"['wechatQrCodeId', { rules: [{ required: false, message: '请上传微信二维码' }] }]"}],attrs:{defaultList:e.record.config.voucher.wechatQrCode?[{preview_url:e.record.config.voucher.wechatQrCode}]:[]},on:{change:function(t,r){return e.setImage(t,r,"wechatQrCodeId")}}})],1),t("a-form-model-item",{attrs:{label:"支付宝商户名称",prop:"config.voucher.alipayMerchantName",rules:[{required:!1,message:"请填写支付宝商户名称"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.voucher.alipayMerchantName,callback:function(t){e.$set(e.record.config.voucher,"alipayMerchantName",t)},expression:"record.config.voucher.alipayMerchantName"}})],1),t("a-form-model-item",{attrs:{label:"支付宝二维码"}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["alipayQrCodeId",{rules:[{required:!1,message:"请上传支付宝二维码"}]}],expression:"['alipayQrCodeId', { rules: [{ required: false, message: '请上传支付宝二维码' }] }]"}],attrs:{defaultList:e.record.config.voucher.alipayQrcode?[{preview_url:e.record.config.voucher.alipayQrcode}]:[]},on:{change:function(t,r){return e.setImage(t,r,"alipayQrCodeId")}}})],1),t("a-form-model-item",{attrs:{label:"快捷支付商户名称",prop:"config.voucher.quickpayMerchantName",rules:[{required:!1,message:"快捷支付商户名称"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.voucher.quickpayMerchantName,callback:function(t){e.$set(e.record.config.voucher,"quickpayMerchantName",t)},expression:"record.config.voucher.quickpayMerchantName"}})],1),t("a-form-model-item",{attrs:{label:"快捷支付二维码"}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["quickpayQrCodeId",{rules:[{required:!1,message:"请上传快捷支付二维码"}]}],expression:"['quickpayQrCodeId', { rules: [{ required: false, message: '请上传快捷支付二维码' }] }]"}],attrs:{defaultList:e.record.config.voucher.quickpayQrCode?[{preview_url:e.record.config.voucher.quickpayQrCode}]:[]},on:{change:function(t,r){return e.setImage(t,r,"quickpayQrCodeId")}}})],1)],1):e._e(),t("a-form-model-item",{attrs:{wrapperCol:{offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary",loading:e.isBtnLoading},on:{click:e.handleSubmit}},[e._v("保存")])],1)],1)],1)],1)},i=[],o=r("5530"),n=r("ade3"),l=(r("d3b7"),r("2ef0")),s=r("67e5"),c=r("759f"),u=r("2af9"),d=r("3f9c"),m={name:"",method:d["a"].WECHAT.value,sort:100,remarks:"",config:Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])({},d["a"].WECHAT.value,{mchType:"normal",version:"v3",normal:{appId:"",mchId:"",apiKey:"",apiclientCert:"",apiclientKey:""},provider:{spAppId:"",spMchId:"",spApiKey:"",subAppId:"",subMchId:"",spApiclientCert:"",spApiclientKey:""}}),d["a"].ALIPAY.value,{appId:"",signType:"RSA2",signMode:10,alipayPublicKey:"",appCertPublicKey:"",alipayCertPublicKey:"",alipayRootCert:"",merchantPrivateKey:""}),d["a"].HUIFU.value,{mchType:"normal",normal:{sysId:"",appkey:"",mid:"",tid:"",msgSrcId:"",msgSrc:"",md5Secret:""},provider:{sysId:"",syAppkey:"",syMid:"",syTid:"",syMsgSrcId:"",syMsgSrc:"",syMd5Secret:""}}),d["a"].VOUCHER.value,{wechatMerchantName:"",wechatQrCode:"",wechatQrCodeId:"",alipayMerchantName:"",alipayQrcode:"",alipayQrCodeId:"",quickpayMerchantName:"",quickpayQrCode:"",quickpayQrCodeId:""})},p={components:{InputFile:s["a"],SelectImage:u["j"]},data:function(){return{isLoading:!1,isBtnLoading:!1,labelCol:{span:3},wrapperCol:{span:10},PaymentMethodEnum:d["a"],record:Object(l["cloneDeep"])(m),uploadFiles:{apiclientCert:null,apiclientKey:null,spApiclientCert:null,spApiclientKey:null,appCertPublicKey:null,alipayCertPublicKey:null,alipayRootCert:null},templateId:null}},watch:{"$route.query.templateId":{immediate:!0,handler:function(e){this.templateId=e,this.getDetail()}}},created:function(){},methods:{getDetail:function(){var e=this;this.isLoading=!0,c["d"](this.templateId).then((function(t){e.record=Object(o["a"])(Object(o["a"])({},m),t.data.detail)})).finally((function(){return e.isLoading=!1}))},clearValidate:function(){this.$refs.myForm.clearValidate()},handleSubmit:function(e){var t=this;e.preventDefault(),this.$refs.myForm.validate((function(e){if(!e)return!1;t.onSubmitForm()}))},onChangeInputFile:function(e,t,r){var a=this.uploadFiles;null!==t[1]&&(a[r]=t[1])},setImage:function(e,t,r){e&&(this.record.config.voucher[r]=e)},onSubmitForm:function(){var e=this;this.isLoading=!0,this.isBtnLoading=!0;var t=this.buildFormData();c["e"](t).then((function(t){e.$message.success(t.message,1.5),setTimeout((function(){e.$router.push("./index")}),1500)})).catch((function(){return e.isBtnLoading=!1})).finally((function(){return e.isLoading=!1}))},buildFormData:function(){var e=this.record,t=this.uploadFiles,r=this.templateId,a=new FormData;for(var i in a.append("templateId",r),a.append("name",e.name),a.append("sort",e.sort),a.append("method",e.method),a.append("remarks",e.remarks),a.append("config",JSON.stringify(e.config)),t)null!=t[i]&&a.append(i,t[i]);return a}}},f=p,h=(r("b39f"),r("2877")),v=Object(h["a"])(f,a,i,!1,null,"3e9e8b66",null);t["default"]=v.exports},"4beb":function(e,t,r){},"4d93":function(e,t,r){},"5b44":function(e,t,r){"use strict";r("af20")},"61e5":function(e,t,r){"use strict";r.r(t);r("b0c0");var a=function(){var e=this,t=e._self._c;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-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}],attrs:{placeholder:"请输入模版名称"}})],1),t("a-form-item",{attrs:{label:"计费方式",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["method",{initialValue:10,rules:[{required:!0}]}],expression:"['method', { initialValue: 10, rules: [{ required: true }] }]"}],on:{change:e.onChangemMethod}},[t("a-radio",{attrs:{value:10}},[e._v("按件数")]),t("a-radio",{attrs:{value:20}},[e._v("按重量")])],1)],1),t("a-form-item",{attrs:{label:"配送区域及运费",labelCol:e.labelCol,wrapperCol:{span:15},required:""}},[t("a-table",{directives:[{name:"show",rawName:"v-show",value:e.ruleList.length,expression:"ruleList.length"}],staticClass:"table-rules",attrs:{columns:e.columns,dataSource:e.ruleList,pagination:!1,bordered:""},scopedSlots:e._u([{key:"region_text",fn:function(r,a,i){return[t("p",{staticClass:"content"},e._l(r,(function(r,a){return t("span",{key:a},[t("span",[e._v(e._s(r.name))]),r.citys.length?[t("span",[e._v("(")]),e._l(r.citys,(function(a,i){return t("span",{key:i,staticClass:"city-name"},[e._v(e._s(a.name)+e._s(r.citys.length>i+1?"、":""))])})),t("span",[e._v(")")])]:e._e(),t("span",[e._v(e._s(" "))])],2)})),0),t("p",{staticClass:"operation"},[t("a",{staticClass:"edit",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.handleEdit(i,a)}}},[e._v("编辑")]),t("a",{staticClass:"delete",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.handleDelete(i)}}},[e._v("删除")])])]}},{key:"first",fn:function(r,a){return[t("a-input-number",{attrs:{min:10==e.method?1:.01,precision:10==e.method?0:2},model:{value:a.first,callback:function(t){e.$set(a,"first",t)},expression:"item.first"}})]}},{key:"first_fee",fn:function(r,a){return[t("a-input-number",{attrs:{min:0,precision:2},model:{value:a.first_fee,callback:function(t){e.$set(a,"first_fee",t)},expression:"item.first_fee"}})]}},{key:"additional",fn:function(r,a){return[t("a-input-number",{attrs:{min:0,precision:10==e.method?0:2},model:{value:a.additional,callback:function(t){e.$set(a,"additional",t)},expression:"item.additional"}})]}},{key:"additional_fee",fn:function(r,a){return[t("a-input-number",{attrs:{min:0,precision:2},model:{value:a.additional_fee,callback:function(t){e.$set(a,"additional_fee",t)},expression:"item.additional_fee"}})]}}])}),t("a-button",{attrs:{icon:"environment"},on:{click:e.handleAdd}},[e._v("点击添加配送区域")])],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入排序值"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入排序值' }] }]"}],attrs:{min:0}})],1),t("a-form-item",{staticClass:"mt-20",attrs:{wrapperCol:{span:e.wrapperCol.span,offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary","html-type":"submit",loading:e.isBtnLoading}},[e._v("提交")])],1)],1),t("AreasModal",{ref:"AreasModal",on:{handleSubmit:e.handleAreaSubmit}})],1)],1)},i=[],o=r("5530"),n=(r("a434"),r("d3b7"),r("159b"),r("fd0d")),l=r("967a"),s=r("caec"),c={key:0,first:1,first_fee:0,additional:0,additional_fee:0,region:[],region_text:[]},u={components:{AreasModal:n["b"]},data:function(){return{columns:[{title:"可配送区域",dataIndex:"region_text",width:"400px",scopedSlots:{customRender:"region_text"}},{title:"首件 (个)",dataIndex:"first",scopedSlots:{customRender:"first"}},{title:"运费(元)",dataIndex:"first_fee",scopedSlots:{customRender:"first_fee"}},{title:"续件 (个)",dataIndex:"additional",scopedSlots:{customRender:"additional"}},{title:"续费(元)",dataIndex:"additional_fee",scopedSlots:{customRender:"additional_fee"}}],ruleList:[],isLoading:!1,isBtnLoading:!1,labelCol:{span:3},wrapperCol:{span:10},form:this.$form.createForm(this),method:10,citysCount:null}},created:function(){var e=this;s["a"].getCitysCount().then((function(t){e.citysCount=t}))},methods:{onChangemMethod:function(e){this.method=e.target.value;var t={10:{first:"首件 (个)",additional:"续件 (个)"},20:{first:"首重 (Kg)",additional:"续重 (Kg)"}};this.columns[1].title=t[this.method].first,this.columns[3].title=t[this.method].additional},handleAdd:function(){var e=this.ruleList.length,t=Object(o["a"])(Object(o["a"])({},c),{},{key:e}),r=this.getExcludedCityIds();if(r.length===this.citysCount)return this.$message.error("已选择了所有的区域",.8),!1;this.handleAreasModal("add",e,t,r)},handleEdit:function(e,t){var r=this.getExcludedCityIds();this.handleAreasModal("edit",e,t,r)},handleAreasModal:function(e,t,r,a){this.$refs.AreasModal.handle({scene:e,index:t,item:r},r.region,a)},getExcludedCityIds:function(){var e=[];return this.ruleList.forEach((function(t){t.region.forEach((function(t){e.push(t)}))})),e},handleAreaSubmit:function(e){var t=e.custom,r=t.scene,a=t.item;a.region=e.selectedCityIds,a.region_text=e.selectedText,"add"===r&&this.ruleList.push(a)},handleDelete:function(e){var t=this,r=this.$confirm({title:"您确定要删除该记录吗?",onOk:function(){t.ruleList.splice(e,1),r.destroy()}})},handleSubmit:function(e){var t=this;e.preventDefault();var r=this.form.validateFields,a=this.ruleList;r((function(e,r){return!e&&(0===a.length?(t.$message.error("您还没有添加配送区域及运费",.8),!1):(r.rules=a,void t.onFormSubmit(r)))}))},onFormSubmit:function(e){var t=this;this.isLoading=!0,this.isBtnLoading=!0,l["a"]({form:e}).then((function(e){t.$message.success(e.message,1.5),setTimeout((function(){t.$router.push("./index")}),1500)})).catch((function(){t.isBtnLoading=!1})).finally((function(){return t.isLoading=!1}))}}},d=u,m=(r("0439"),r("2877")),p=Object(m["a"])(d,a,i,!1,null,null,null);t["default"]=p.exports},"67ac":function(e,t,r){"use strict";r.r(t);r("b0c0");var a=function(){var e=this,t=e._self._c;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-checkbox-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["keys",{rules:[{required:!0,message:"配送方式至少选择一个"}]}],expression:"['keys', { rules: [{ required: true, message: '配送方式至少选择一个' }] }]"}]},e._l(e.items,(function(r,a){return t("a-checkbox",{key:a,attrs:{value:r.key}},[e._v(e._s(r.name))])})),1)],1),t("a-form-item",{attrs:{wrapperCol:{span:e.wrapperCol.span,offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary","html-type":"submit"}},[e._v("提交")])],1)],1)],1)],1)},i=[],o=(r("d81d"),r("d3b7"),r("b775")),n={items:"/setting.cache/items",clear:"/setting.cache/clear"};function l(){return Object(o["b"])({url:n.items,method:"get"})}function s(e){return Object(o["b"])({url:n.clear,method:"post",data:e})}var c=r("71b5"),u={data:function(){return{labelCol:{span:4},wrapperCol:{span:10},isLoading:!1,form:this.$form.createForm(this),items:{},StorageEnum:c["a"]}},created:function(){this.getItems()},methods:{getItems:function(){var e=this;this.isLoading=!0,l().then((function(t){e.items=t.data.items,e.setFieldsValue()})).finally((function(){return e.isLoading=!1}))},setFieldsValue:function(){var e=this,t=this.form.setFieldsValue;this.$nextTick((function(){t({keys:e.items.map((function(e){return e.key}))})}))},handleSubmit:function(e){var t=this;e.preventDefault();var r=this.form.validateFields;r((function(e,r){!e&&t.onFormSubmit(r)}))},onFormSubmit:function(e){var t=this;this.isLoading=!0,s({form:e}).then((function(e){return t.$message.success(e.message,1.5)})).finally((function(){return t.isLoading=!1}))}}},d=u,m=(r("8402"),r("2877")),p=Object(m["a"])(d,a,i,!1,null,"74c84ca0",null);t["default"]=p.exports},"67e5":function(e,t,r){"use strict";var a=function(){var e=this,t=e._self._c;return t("a-upload",{attrs:{beforeUpload:e.beforeUpload,remove:e.handleRemove,accept:e.accept,multiple:!1,fileList:e.fileList}},[t("a-button",[t("a-icon",{attrs:{type:"upload"}}),e._v("选择文件 ")],1)],1)},i=[],o=(r("a434"),r("b0c0"),r("4d91")),n={name:"InputFile",model:{prop:"value",event:"change"},props:{value:o["a"].string.def(""),accept:o["a"].string.def("")},data:function(){return{fileList:[]}},watch:{value:{immediate:!0,handler:function(e){e&&0===this.fileList.length&&(this.fileList=[{uid:"default",name:e}])}},fileList:function(e){var t=e.length>0?e[0]:null,r=t?t.name:null;"default"!=t.uid&&this.$emit("change",r,t)}},methods:{beforeUpload:function(e){return this.fileList=[e],!1},handleRemove:function(e){var t=this.fileList,r=t.indexOf(e);r>-1&&t.splice(r,1)}}},l=n,s=r("2877"),c=Object(s["a"])(l,a,i,!1,null,"37881c5a",null),u=c.exports;t["a"]=u},"6cc3":function(e,t,r){"use strict";r("933d")},"6d92":function(e,t,r){"use strict";r.d(t,"e",(function(){return o})),r.d(t,"d",(function(){return n})),r.d(t,"a",(function(){return l})),r.d(t,"c",(function(){return s})),r.d(t,"b",(function(){return c}));var a=r("b775"),i={list:"/retail/list",add:"/retail/add",edit:"/retail/edit",delete:"/retail/delete",orderList:"/retail/getRetailOrder"};function o(e){return Object(a["b"])({url:i.orderList,method:"get",params:e})}function n(e){return Object(a["b"])({url:i.list,method:"get",params:e})}function l(e){return Object(a["b"])({url:i.add,method:"post",data:e})}function s(e){return Object(a["b"])({url:i.edit,method:"post",data:e})}function c(e){return Object(a["b"])({url:i.delete,method:"post",data:e})}},"71b5":function(e,t,r){"use strict";var a=r("5c06");t["a"]=new a["a"]([{key:"LOCAL",name:"本地",value:"local"},{key:"QINIU",name:"七牛云",value:"qiniu"},{key:"ALIYUN",name:"阿里云",value:"aliyun"},{key:"QCLOUD",name:"腾讯云",value:"qcloud"},{key:"EXTERNAL",name:"外部链接",value:"external"}])},"759f":function(e,t,r){"use strict";r.d(t,"f",(function(){return n})),r.d(t,"b",(function(){return l})),r.d(t,"d",(function(){return s})),r.d(t,"a",(function(){return c})),r.d(t,"e",(function(){return u})),r.d(t,"c",(function(){return d}));var a=r("5530"),i=r("b775"),o={list:"/setting.payment.template/list",all:"/setting.payment.template/all",detail:"/setting.payment.template/detail",add:"/setting.payment.template/add",edit:"/setting.payment.template/edit",delete:"/setting.payment.template/delete"};function n(e){return Object(i["b"])({url:o.list,method:"get",params:e})}function l(e){return Object(i["b"])({url:o.all,method:"get",params:e})}function s(e,t){return Object(i["b"])({url:o.detail,method:"get",params:Object(a["a"])({templateId:e},t)})}function c(e){return Object(i["b"])({headers:{"Content-Type":"multipart/form-data"},url:o.add,method:"post",data:e})}function u(e){return Object(i["b"])({headers:{"Content-Type":"multipart/form-data"},url:o.edit,method:"post",data:e})}function d(e){return Object(i["b"])({url:o.delete,method:"post",data:e})}},8054:function(e,t,r){"use strict";r("368a")},8259:function(e,t,r){"use strict";r.r(t);r("b0c0"),r("ac1f"),r("841c");var a=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("a-row",[t("a-col",{attrs:{span:6}},[t("a-button",{directives:[{name:"action",rawName:"v-action:add",arg:"add"}],attrs:{type:"primary",icon:"plus"},on:{click:e.handleAdd}},[e._v("新增")])],1),t("a-col",{attrs:{span:8,offset:10}},[t("a-input-search",{staticStyle:{"max-width":"300px","min-width":"150px",float:"right"},attrs:{placeholder:"请输入打印机名称"},on:{search:e.onSearch},model:{value:e.queryParam.search,callback:function(t){e.$set(e.queryParam,"search",t)},expression:"queryParam.search"}})],1)],1)],1),t("s-table",{ref:"table",attrs:{rowKey:"printer_id",loading:e.isLoading,columns:e.columns,data:e.loadData,pagination:e.pagination},scopedSlots:e._u([{key:"printer_type",fn:function(r){return t("span",{},[t("a-tag",[e._v(e._s(e.PrinterEnum[r].name))])],1)}},{key:"action",fn:function(r,a){return t("span",{},[t("a",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}],staticStyle:{"margin-right":"8px"},on:{click:function(t){return e.handleEdit(a)}}},[e._v("编辑")]),t("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],on:{click:function(t){return e.handleDelete(a)}}},[e._v("删除")])])}}])}),t("AddForm",{ref:"AddForm",on:{handleSubmit:e.handleRefresh}}),t("EditForm",{ref:"EditForm",on:{handleSubmit:e.handleRefresh}})],1)},i=[],o=r("5530"),n=(r("d3b7"),r("5c06")),l=new n["a"]([{key:"FEI_E_YUN",name:"飞鹅打印机",value:"FEI_E_YUN"},{key:"PRINT_CENTER",name:"365云打印",value:"PRINT_CENTER"}]),s=r("f50c"),c=r("2af9"),u=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"打印机名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["printer_name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['printer_name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),t("a-form-item",{attrs:{label:"打印机类型",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["printer_type",{initialValue:e.PrinterEnum.FEI_E_YUN.value,rules:[{required:!0}]}],expression:"['printer_type', { initialValue: PrinterEnum.FEI_E_YUN.value, rules: [{ required: true }] }]"}]},e._l(e.PrinterEnum.data,(function(r,a){return t("a-radio",{key:a,attrs:{value:r.value}},[e._v(e._s(r.name))])})),1)],1),e.form.getFieldValue("printer_type")==e.PrinterEnum.FEI_E_YUN.value?t("div",{class:e.PrinterEnum.FEI_E_YUN.value},[t("a-form-item",{attrs:{label:"USER",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"飞鹅云后台注册用户名"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["printer_config.USER",{rules:[{required:!0}]}],expression:"['printer_config.USER', { rules: [{ required: true }] }]"}]})],1),t("a-form-item",{attrs:{label:"UKEY",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"飞鹅云后台登录生成的UKEY"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["printer_config.UKEY",{rules:[{required:!0}]}],expression:"['printer_config.UKEY', { rules: [{ required: true }] }]"}]})],1),t("a-form-item",{attrs:{label:"打印机编号",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"打印机编号为9位数字,查看飞鹅打印机底部贴纸上面的编号"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["printer_config.SN",{rules:[{required:!0}]}],expression:"['printer_config.SN', { rules: [{ required: true } ] }]"}]})],1)],1):e._e(),e.form.getFieldValue("printer_type")==e.PrinterEnum.PRINT_CENTER.value?t("div",{class:e.PrinterEnum.PRINT_CENTER.value},[t("a-form-item",{attrs:{label:"打印机编号",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["printer_config.deviceNo",{rules:[{required:!0}]}],expression:"['printer_config.deviceNo', { rules: [{ required: true }] }]"}]})],1),t("a-form-item",{attrs:{label:"打印机秘钥",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["printer_config.key",{rules:[{required:!0}]}],expression:"['printer_config.key', { rules: [{ required: true }] }]"}]})],1)],1):e._e(),t("a-form-item",{attrs:{label:"打印联数",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"同一订单,打印的次数"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["print_times",{initialValue:1,rules:[{required:!0,message:"请输入打印联数"}]}],expression:"['print_times', { initialValue: 1, rules: [{ required: true, message: '请输入打印联数' }] }]"}],attrs:{min:0}})],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入排序值"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入排序值' }] }]"}],attrs:{min:0}})],1)],1)],1)],1)},d=[],m=r("2ef0"),p=r.n(m),f={data:function(){return{title:"新增打印机",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),PrinterEnum:l}},methods:{add:function(){this.visible=!0,this.setFieldsValue()},setFieldsValue:function(){var e=this.form.setFieldsValue;this.$nextTick((function(){e({printer_type:l.FEI_E_YUN.value})}))},handleSubmit:function(e){var t=this;e.preventDefault();var r=this.form.validateFields;r((function(e,r){!e&&t.onFormSubmit(r)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,s["a"]({form:e}).then((function(r){t.$message.success(r.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(){return t.confirmLoading=!1}))}}},h=f,v=r("2877"),g=Object(v["a"])(h,u,d,!1,null,null,null),b=g.exports,y=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"打印机名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["printer_name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['printer_name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),t("a-form-item",{attrs:{label:"打印机类型",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["printer_type",{initialValue:e.PrinterEnum.FEI_E_YUN.value,rules:[{required:!0}]}],expression:"['printer_type', { initialValue: PrinterEnum.FEI_E_YUN.value, rules: [{ required: true }] }]"}]},e._l(e.PrinterEnum.data,(function(r,a){return t("a-radio",{key:a,attrs:{value:r.value}},[e._v(e._s(r.name))])})),1)],1),e.form.getFieldValue("printer_type")==e.PrinterEnum.FEI_E_YUN.value?t("div",{class:e.PrinterEnum.FEI_E_YUN.value},[t("a-form-item",{attrs:{label:"USER",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"飞鹅云后台注册用户名"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["printer_config.USER",{rules:[{required:!0}]}],expression:"['printer_config.USER', { rules: [{ required: true }] }]"}]})],1),t("a-form-item",{attrs:{label:"UKEY",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"飞鹅云后台登录生成的UKEY"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["printer_config.UKEY",{rules:[{required:!0}]}],expression:"['printer_config.UKEY', { rules: [{ required: true }] }]"}]})],1),t("a-form-item",{attrs:{label:"打印机编号",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"打印机编号为9位数字,查看飞鹅打印机底部贴纸上面的编号"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["printer_config.SN",{rules:[{required:!0}]}],expression:"['printer_config.SN', { rules: [{ required: true }] }]"}]})],1)],1):e._e(),e.form.getFieldValue("printer_type")==e.PrinterEnum.PRINT_CENTER.value?t("div",{class:e.PrinterEnum.PRINT_CENTER.value},[t("a-form-item",{attrs:{label:"打印机编号",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["printer_config.deviceNo",{rules:[{required:!0}]}],expression:"['printer_config.deviceNo', { rules: [{ required: true }] }]"}]})],1),t("a-form-item",{attrs:{label:"打印机秘钥",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["printer_config.key",{rules:[{required:!0}]}],expression:"['printer_config.key', { rules: [{ required: true }] }]"}]})],1)],1):e._e(),t("a-form-item",{attrs:{label:"打印联数",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"同一订单,打印的次数"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["print_times",{initialValue:1,rules:[{required:!0,message:"请输入打印联数"}]}],expression:"['print_times', { initialValue: 1, rules: [{ required: true, message: '请输入打印联数' }] }]"}],attrs:{min:0}})],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入排序值"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入排序值' }] }]"}],attrs:{min:0}})],1)],1)],1)],1)},_=[],C={data:function(){return{title:"编辑打印机",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),PrinterEnum:l,record:{}}},methods:{edit:function(e){this.visible=!0,this.record=e,this.setFieldsValue()},setFieldsValue:function(){var e=this,t=this.form.setFieldsValue;this.$nextTick((function(){t(p.a.pick(e.record,["printer_name","printer_type","print_times","sort"])),e.$nextTick((function(){t(p.a.pick(e.record,["printer_config"]))}))}))},handleSubmit:function(e){var t=this;e.preventDefault();var r=this.form.validateFields;r((function(e,r){!e&&t.onFormSubmit(r)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,s["d"]({printerId:this.record.printer_id,form:e}).then((function(r){t.$message.success(r.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(){return t.confirmLoading=!1}))}}},w=C,x=Object(v["a"])(w,y,_,!1,null,null,null),I=x.exports,k={name:"Index",components:{STable:c["d"],AddForm:b,EditForm:I},data:function(){var e=this;return{queryParam:{},isLoading:!1,PrinterEnum:l,columns:[{title:"打印机ID",dataIndex:"printer_id"},{title:"打印机名称",dataIndex:"printer_name"},{title:"打印机类型",dataIndex:"printer_type",scopedSlots:{customRender:"printer_type"}},{title:"排序",dataIndex:"sort"},{title:"添加时间",dataIndex:"create_time"},{title:"操作",dataIndex:"action",width:"180px",scopedSlots:{customRender:"action"}}],loadData:function(t){return s["e"](Object(o["a"])(Object(o["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))}}},created:function(){},methods:{handleAdd:function(){this.$refs.AddForm.add()},handleEdit:function(e){this.$refs.EditForm.edit(e)},handleDelete:function(e){var t=this,r=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return s["c"]({printerId:e["printer_id"]}).then((function(e){t.$message.success(e.message,1.5),t.handleRefresh()})).finally((function(e){return r.destroy()}))}})},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(e)},onSearch:function(){this.handleRefresh(!0)}}},q=k,S=Object(v["a"])(q,a,i,!1,null,null,null);t["default"]=S.exports},8402:function(e,t,r){"use strict";r("195f")},"88bc":function(e,t,r){(function(t){var r=1/0,a=9007199254740991,i="[object Arguments]",o="[object Function]",n="[object GeneratorFunction]",l="[object Symbol]",s="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,u=s||c||Function("return this")();function d(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function m(e,t){var r=-1,a=e?e.length:0,i=Array(a);while(++r0&&r(l)?t>1?C(l,t-1,r,a,i):p(i,l):a||(i[i.length]=l)}return i}function w(e,t){return e=Object(e),x(e,t,(function(t,r){return r in e}))}function x(e,t,r){var a=-1,i=t.length,o={};while(++a-1&&e%1==0&&e<=a}function F(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function M(e){return!!e&&"object"==typeof e}function O(e){return"symbol"==typeof e||M(e)&&v.call(e)==l}var N=I((function(e,t){return null==e?{}:w(e,m(C(t,1),q))}));e.exports=N}).call(this,r("c8ba"))},"930b":function(e,t,r){"use strict";var a=r("5c06");t["a"]=new a["a"]([{key:"PENDING",name:"待支付",value:10},{key:"SUCCESS",name:"支付成功",value:20}])},"933d":function(e,t,r){},"967a":function(e,t,r){"use strict";r.d(t,"f",(function(){return o})),r.d(t,"b",(function(){return n})),r.d(t,"d",(function(){return l})),r.d(t,"a",(function(){return s})),r.d(t,"e",(function(){return c})),r.d(t,"c",(function(){return u}));var a=r("b775"),i={list:"/setting.delivery/list",all:"/setting.delivery/all",detail:"/setting.delivery/detail",add:"/setting.delivery/add",edit:"/setting.delivery/edit",delete:"/setting.delivery/delete"};function o(e){return Object(a["b"])({url:i.list,method:"get",params:e})}function n(e){return Object(a["b"])({url:i.all,method:"get",params:e})}function l(e){return Object(a["b"])({url:i.detail,method:"get",params:e})}function s(e){return Object(a["b"])({url:i.add,method:"post",data:e})}function c(e){return Object(a["b"])({url:i.edit,method:"post",data:e})}function u(e){return Object(a["b"])({url:i.delete,method:"post",data:e})}},"96ef":function(e,t,r){"use strict";r.r(t);r("ac1f"),r("841c");var a=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("a-row",[t("a-col",{attrs:{span:6}},[e.$auth("/setting/delivery/template/create")?t("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:e.handleAdd}},[e._v("新增")]):e._e()],1),t("a-col",{attrs:{span:8,offset:10}},[t("a-input-search",{staticStyle:{"max-width":"300px","min-width":"150px",float:"right"},attrs:{placeholder:"请输入运费模板名称"},on:{search:e.onSearch},model:{value:e.queryParam.search,callback:function(t){e.$set(e.queryParam,"search",t)},expression:"queryParam.search"}})],1)],1)],1),t("s-table",{ref:"table",attrs:{rowKey:"delivery_id",loading:e.isLoading,columns:e.columns,data:e.loadData,pagination:e.pagination},scopedSlots:e._u([{key:"method",fn:function(r){return t("span",{},[t("span",[e._v(e._s(10==r?"按件数":"按重量"))])])}},{key:"action",fn:function(r,a){return t("span",{},[e.$auth("/setting/delivery/template/update")?t("a",{staticStyle:{"margin-right":"8px"},on:{click:function(t){return e.handleEdit(a)}}},[e._v("编辑")]):e._e(),t("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],on:{click:function(t){return e.handleDelete(a)}}},[e._v("删除")])])}}])})],1)},i=[],o=r("5530"),n=(r("d3b7"),r("967a")),l=r("2af9"),s={name:"Index",components:{STable:l["d"]},data:function(){var e=this;return{queryParam:{},isLoading:!1,columns:[{title:"模板ID",dataIndex:"delivery_id"},{title:"模板名称",dataIndex:"name"},{title:"计费方式",dataIndex:"method",scopedSlots:{customRender:"method"}},{title:"排序",dataIndex:"sort"},{title:"添加时间",dataIndex:"create_time"},{title:"操作",dataIndex:"action",width:"180px",scopedSlots:{customRender:"action"}}],loadData:function(t){return n["f"](Object(o["a"])(Object(o["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))}}},created:function(){},methods:{handleAdd:function(){this.$router.push("./create")},handleEdit:function(e){this.$router.push({path:"./update",query:{deliveryId:e.delivery_id}})},handleDelete:function(e){var t=this,r=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return n["c"]({deliveryId:e["delivery_id"]}).then((function(e){t.$message.success(e.message,1.5),t.handleRefresh()})).finally((function(e){return r.destroy()}))}})},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(e)},onSearch:function(){this.handleRefresh(!0)}}},c=s,u=r("2877"),d=Object(u["a"])(c,a,i,!1,null,null,null);t["default"]=d.exports},a2b9:function(e,t,r){},a6b6:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e._self._c;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.closeHours",{rules:[{required:!0,message:"不能为空"}]}],expression:"['order.closeHours', { rules: [{ required: true, message: '不能为空' }] }]"}],staticClass:"fl-l",attrs:{min:0,precision: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,precision: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,precision: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:{wrapperCol:{span:e.wrapperCol.span,offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary","html-type":"submit"}},[e._v("提交")])],1)],1)],1)],1)},i=[],o=(r("d3b7"),r("ddb0"),r("88bc")),n=r.n(o),l=r("f585"),s=r("ca00"),c={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,l["a"](this.key).then((function(t){e.record=t.data.values,e.setFieldsValue()})).finally((function(){return e.isLoading=!1}))},setFieldsValue:function(){var e=this.record,t=this.$nextTick,r=this.form;!Object(s["f"])(r.getFieldsValue())&&t((function(){r.setFieldsValue({freight_rule:e.freight_rule,order:n()(e.order,["closeHours","receive_days","refund_days"])})}))},handleSubmit:function(e){var t=this;e.preventDefault();var r=this.form.validateFields;r((function(e,r){!e&&t.onFormSubmit(r)}))},onFormSubmit:function(e){var t=this;this.isLoading=!0,l["b"](this.key,{form:e}).then((function(e){return t.$message.success(e.message,1.5)})).finally((function(){return t.isLoading=!1}))}}},u=c,d=(r("8054"),r("2877")),m=Object(d["a"])(u,a,i,!1,null,"71cc8672",null);t["default"]=m.exports},a755:function(e,t,r){"use strict";r.r(t);r("4e82"),r("b0c0");var a=function(){var e=this,t=e._self._c;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-model",{ref:"myForm",staticClass:"my-form",attrs:{model:e.record,"label-col":e.labelCol,wrapperCol:e.wrapperCol}},[t("a-form-model-item",{attrs:{label:"支付模板名称",prop:"name",rules:[{required:!0,message:"请填写支付模板名称"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.name,callback:function(t){e.$set(e.record,"name",t)},expression:"record.name"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v("必须填写商户平台-营业执照名称,否则会影响分账功能")])])],1),t("a-form-model-item",{attrs:{label:"管理员备注",prop:"remarks"}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.remarks,callback:function(t){e.$set(e.record,"remarks",t)},expression:"record.remarks"}})],1),t("a-form-model-item",{staticClass:"mb-30",attrs:{label:"排序",prop:"sort",rules:[{required:!0,message:"请填写排序数值"}]}},[t("a-input-number",{attrs:{min:0,autocomplete:"off"},model:{value:e.record.sort,callback:function(t){e.$set(e.record,"sort",t)},expression:"record.sort"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v("数字越小越靠前")])])],1),t("a-form-model-item",{attrs:{label:"支付方式",prop:"method",rules:[{required:!0,message:"请选择支付方式"}]}},[t("a-radio-group",{on:{change:function(t){return e.clearValidate()}},model:{value:e.record.method,callback:function(t){e.$set(e.record,"method",t)},expression:"record.method"}},[t("a-radio",{attrs:{value:e.PaymentMethodEnum.WECHAT.value}},[e._v(e._s(e.PaymentMethodEnum.WECHAT.name))]),t("a-radio",{attrs:{value:e.PaymentMethodEnum.ALIPAY.value}},[e._v(e._s(e.PaymentMethodEnum.ALIPAY.name))]),t("a-radio",{attrs:{value:e.PaymentMethodEnum.HUIFU.value}},[e._v(e._s(e.PaymentMethodEnum.HUIFU.name))]),t("a-radio",{attrs:{value:e.PaymentMethodEnum.VOUCHER.value}},[e._v(e._s(e.PaymentMethodEnum.VOUCHER.name))])],1),t("div",{staticClass:"form-item-help"},[t("p",{staticClass:"extra"},[e._v("保存以后支付方式将不可修改,请谨慎操作")]),e.record.method===e.PaymentMethodEnum.WECHAT.value?t("p",{staticClass:"extra"},[e._v(" 微信支付商户平台: "),t("a",{attrs:{href:"https://pay.weixin.qq.com",target:"_blank"}},[e._v("https://pay.weixin.qq.com")])]):e._e(),e.record.method===e.PaymentMethodEnum.ALIPAY.value?t("p",{staticClass:"extra"},[e._v(" 支付宝开发者平台: "),t("a",{attrs:{href:"https://open.alipay.com/dev/workspace",target:"_blank"}},[e._v("https://open.alipay.com/dev/workspace")])]):e._e()])],1),e.record.method===e.PaymentMethodEnum.WECHAT.value?t("div",{attrs:{method:e.record.method}},[t("a-form-model-item",{attrs:{label:"微信支付接口版本",prop:"config.wechat.version",rules:[{required:!0,message:"请选择微信支付接口版本"}]}},[t("a-radio-group",{on:{change:function(t){return e.clearValidate()}},model:{value:e.record.config.wechat.version,callback:function(t){e.$set(e.record.config.wechat,"version",t)},expression:"record.config.wechat.version"}},[t("a-radio",{attrs:{value:"v3"}},[t("span",[e._v("V3")]),t("a-tag",{staticClass:"ml-5",attrs:{color:"green"}},[e._v("推荐")])],1),t("a-radio",{attrs:{value:"v2"}},[e._v("V2")])],1),t("div",{staticClass:"form-item-help"},[t("small",[e._v("V2版本较老已经不再支持新出的API接口,强烈建议使用V3")])])],1),t("a-form-model-item",{attrs:{label:"微信商户号类型",prop:"config.wechat.mchType",rules:[{required:!0,message:"请选择微信商户号类型"}]}},[t("a-radio-group",{on:{change:function(t){return e.clearValidate()}},model:{value:e.record.config.wechat.mchType,callback:function(t){e.$set(e.record.config.wechat,"mchType",t)},expression:"record.config.wechat.mchType"}},[t("a-radio",{attrs:{value:"normal"}},[e._v("普通商户")]),t("a-radio",{attrs:{value:"provider"}},[e._v("子商户 (服务商模式)")])],1)],1),"normal"===e.record.config.wechat.mchType?t("div",{attrs:{mchType:e.record.config.wechat.mchType}},[t("a-form-model-item",{attrs:{label:"应用ID (AppID)",prop:"config.wechat.normal.appId",rules:[{required:!0,message:"请填写应用ID (AppID)"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.wechat.normal.appId,callback:function(t){e.$set(e.record.config.wechat.normal,"appId",t)},expression:"record.config.wechat.normal.appId"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v("微信小程序或者微信公众号的APPID,需要在哪个客户端支付就填写哪个,APP支付需要填写开放平台的应用APPID")])])],1),t("a-form-model-item",{attrs:{label:"微信商户号 (MchId)",prop:"config.wechat.normal.mchId",rules:[{required:!0,message:"请填写微信商户号 (MchId)"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.wechat.normal.mchId,callback:function(t){e.$set(e.record.config.wechat.normal,"mchId",t)},expression:"record.config.wechat.normal.mchId"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v("微信支付的商户号,纯数字格式;例如:1600000109")])])],1),t("a-form-model-item",{attrs:{label:"支付密钥 (APIKEY)",prop:"config.wechat.normal.apiKey",rules:[{required:!0,message:"请填写支付密钥 (APIKEY)"}]}},[t("a-input",{attrs:{type:"password",autocomplete:"off"},model:{value:e.record.config.wechat.normal.apiKey,callback:function(t){e.$set(e.record.config.wechat.normal,"apiKey",t)},expression:"record.config.wechat.normal.apiKey"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v('"微信支付商户平台"" - "账户中心" - "API安全" - "设置API密钥"')])])],1),t("a-form-model-item",{attrs:{label:"证书文件 (CERT)",prop:"config.wechat.normal.apiclientCert",rules:[{required:!0,message:"需要上传该文件"}]}},[t("InputFile",{attrs:{accept:".pem"},on:{change:function(t){return e.onChangeInputFile(t,arguments,"apiclientCert")}},model:{value:e.record.config.wechat.normal.apiclientCert,callback:function(t){e.$set(e.record.config.wechat.normal,"apiclientCert",t)},expression:"record.config.wechat.normal.apiclientCert"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v('请上传 "apiclient_cert.pem" 文件')])])],1),t("a-form-model-item",{attrs:{label:"证书文件 (KEY)",prop:"config.wechat.normal.apiclientKey",rules:[{required:!0,message:"需要上传该文件"}]}},[t("InputFile",{attrs:{accept:".pem"},on:{change:function(t){return e.onChangeInputFile(t,arguments,"apiclientKey")}},model:{value:e.record.config.wechat.normal.apiclientKey,callback:function(t){e.$set(e.record.config.wechat.normal,"apiclientKey",t)},expression:"record.config.wechat.normal.apiclientKey"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v('请上传 "apiclient_key.pem" 文件')])])],1)],1):e._e(),"provider"===e.record.config.wechat.mchType?t("div",{attrs:{mchType:e.record.config.wechat.mchType}},[t("a-form-model-item",{attrs:{label:"服务商应用ID (AppID)",prop:"config.wechat.provider.spAppId",rules:[{required:!0,message:"请填写服务商应用ID (AppID)"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.wechat.provider.spAppId,callback:function(t){e.$set(e.record.config.wechat.provider,"spAppId",t)},expression:"record.config.wechat.provider.spAppId"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v("请填写微信支付服务商的AppID")])])],1),t("a-form-model-item",{attrs:{label:"服务商户号 (MchId)",prop:"config.wechat.provider.spMchId",rules:[{required:!0,message:"请填写服务商户号 (MchId)"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.wechat.provider.spMchId,callback:function(t){e.$set(e.record.config.wechat.provider,"spMchId",t)},expression:"record.config.wechat.provider.spMchId"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v("微信支付服务商的商户号,纯数字格式;例如:1600000109")])])],1),t("a-form-model-item",{attrs:{label:"服务商密钥 (APIKEY)",prop:"config.wechat.provider.spApiKey",rules:[{required:!0,message:"请填写服务商密钥 (APIKEY)"}]}},[t("a-input",{attrs:{type:"password",autocomplete:"off"},model:{value:e.record.config.wechat.provider.spApiKey,callback:function(t){e.$set(e.record.config.wechat.provider,"spApiKey",t)},expression:"record.config.wechat.provider.spApiKey"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v('"微信支付商户平台"" - "账户中心" - "API安全" - "设置API密钥"')])])],1),t("a-form-model-item",{attrs:{label:"子商户应用ID (AppID)",prop:"config.wechat.provider.subAppId",rules:[{required:!0,message:"请填写子商户应用ID (AppID)"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.wechat.provider.subAppId,callback:function(t){e.$set(e.record.config.wechat.provider,"subAppId",t)},expression:"record.config.wechat.provider.subAppId"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v("微信小程序或者微信公众号的APPID,需要在哪个客户端支付就填写哪个,APP支付需要填写开放平台的应用APPID")])])],1),t("a-form-model-item",{attrs:{label:"子商户号 (MchId)",prop:"config.wechat.provider.subMchId",rules:[{required:!0,message:"请填写子商户号 (MchId)"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.wechat.provider.subMchId,callback:function(t){e.$set(e.record.config.wechat.provider,"subMchId",t)},expression:"record.config.wechat.provider.subMchId"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v("微信支付的商户号,纯数字格式;例如:1600000109")])])],1),t("a-form-model-item",{attrs:{label:"服务商证书文件 (CERT)",prop:"config.wechat.provider.spApiclientCert",rules:[{required:!0,message:"需要上传该文件"}]}},[t("InputFile",{attrs:{accept:".pem"},on:{change:function(t){return e.onChangeInputFile(t,arguments,"spApiclientCert")}},model:{value:e.record.config.wechat.provider.spApiclientCert,callback:function(t){e.$set(e.record.config.wechat.provider,"spApiclientCert",t)},expression:"record.config.wechat.provider.spApiclientCert"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v('请上传 "apiclient_cert.pem" 文件')])])],1),t("a-form-model-item",{attrs:{label:"服务商证书文件 (KEY)",prop:"config.wechat.provider.spApiclientKey",rules:[{required:!0,message:"需要上传该文件"}]}},[t("InputFile",{attrs:{accept:".pem"},on:{change:function(t){return e.onChangeInputFile(t,arguments,"spApiclientKey")}},model:{value:e.record.config.wechat.provider.spApiclientKey,callback:function(t){e.$set(e.record.config.wechat.provider,"spApiclientKey",t)},expression:"record.config.wechat.provider.spApiclientKey"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v('请上传 "apiclient_key.pem" 文件')])])],1)],1):e._e()],1):e._e(),e.record.method===e.PaymentMethodEnum.ALIPAY.value?t("div",{attrs:{method:e.record.method}},[t("a-form-model-item",{attrs:{label:"支付宝应用 (AppID)",prop:"config.alipay.appId",rules:[{required:!0,message:"请填写支付宝应用 (AppID)"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.alipay.appId,callback:function(t){e.$set(e.record.config.alipay,"appId",t)},expression:"record.config.alipay.appId"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v("支付宝分配给开发者的应用ID;例如:2021072300007148")])])],1),t("a-form-model-item",{attrs:{label:"签名算法 (signType)",prop:"config.alipay.signType",rules:[{required:!0,message:"请选择签名算法 (signType)"}]}},[t("a-radio-group",{model:{value:e.record.config.alipay.signType,callback:function(t){e.$set(e.record.config.alipay,"signType",t)},expression:"record.config.alipay.signType"}},[t("a-radio",{attrs:{value:"RSA2"}},[e._v("RSA2")]),t("a-radio",{attrs:{value:"RSA",disabled:!0}},[e._v("RSA")])],1)],1),t("a-form-model-item",{attrs:{label:"加签模式",prop:"config.alipay.signMode",rules:[{required:!0,message:"请选择加签模式"}]}},[t("a-radio-group",{model:{value:e.record.config.alipay.signMode,callback:function(t){e.$set(e.record.config.alipay,"signMode",t)},expression:"record.config.alipay.signMode"}},[t("a-radio",{attrs:{value:10}},[t("span",[e._v("公钥证书")]),t("a-tag",{staticClass:"ml-5",attrs:{color:"green"}},[e._v("推荐")])],1),t("a-radio",{attrs:{value:20}},[e._v("公钥")])],1),t("div",{staticClass:"form-item-help"},[t("small",[e._v("如需使用资金支出类的接口,则必须使用公钥证书模式")])])],1),20===e.record.config.alipay.signMode?t("div",{attrs:{method:e.record.method}},[t("a-form-model-item",{attrs:{label:"支付宝公钥 (alipayPublicKey)",prop:"config.alipay.alipayPublicKey",rules:[{required:!0,message:"请填写支付宝公钥 (alipayPublicKey)"}]}},[t("a-textarea",{attrs:{autoSize:{minRows:4,maxRows:6},autocomplete:"off"},model:{value:e.record.config.alipay.alipayPublicKey,callback:function(t){e.$set(e.record.config.alipay,"alipayPublicKey",t)},expression:"record.config.alipay.alipayPublicKey"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v('可在 "支付宝开放平台" - "应用信息" - "接口加签方式" - "支付宝公钥" 中复制')])])],1)],1):e._e(),10===e.record.config.alipay.signMode?t("div",{attrs:{method:e.record.method}},[t("a-form-model-item",{attrs:{label:"应用公钥证书",prop:"config.alipay.appCertPublicKey",rules:[{required:!0,message:"需要上传该文件"}]}},[t("InputFile",{attrs:{accept:".crt"},on:{change:function(t){return e.onChangeInputFile(t,arguments,"appCertPublicKey")}},model:{value:e.record.config.alipay.appCertPublicKey,callback:function(t){e.$set(e.record.config.alipay,"appCertPublicKey",t)},expression:"record.config.alipay.appCertPublicKey"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v('请上传 "appCertPublicKey_xxxxxxxx.crt" 文件')])])],1),t("a-form-model-item",{attrs:{label:"支付宝公钥证书",prop:"config.alipay.alipayCertPublicKey",rules:[{required:!0,message:"需要上传该文件"}]}},[t("InputFile",{attrs:{accept:".crt"},on:{change:function(t){return e.onChangeInputFile(t,arguments,"alipayCertPublicKey")}},model:{value:e.record.config.alipay.alipayCertPublicKey,callback:function(t){e.$set(e.record.config.alipay,"alipayCertPublicKey",t)},expression:"record.config.alipay.alipayCertPublicKey"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v('请上传 "alipayCertPublicKey_RSA2.crt" 文件')])])],1),t("a-form-model-item",{attrs:{label:"支付宝根证书",prop:"config.alipay.alipayRootCert",rules:[{required:!0,message:"需要上传该文件"}]}},[t("InputFile",{attrs:{accept:".crt"},on:{change:function(t){return e.onChangeInputFile(t,arguments,"alipayRootCert")}},model:{value:e.record.config.alipay.alipayRootCert,callback:function(t){e.$set(e.record.config.alipay,"alipayRootCert",t)},expression:"record.config.alipay.alipayRootCert"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v('请上传 "alipayRootCert.crt" 文件')])])],1)],1):e._e(),t("a-form-model-item",{attrs:{label:"应用私钥 (privateKey)",prop:"config.alipay.merchantPrivateKey",rules:[{required:!0,message:"请填写应用私钥 (privateKey)"}]}},[t("a-textarea",{attrs:{autoSize:{minRows:4,maxRows:6},autocomplete:"off"},model:{value:e.record.config.alipay.merchantPrivateKey,callback:function(t){e.$set(e.record.config.alipay,"merchantPrivateKey",t)},expression:"record.config.alipay.merchantPrivateKey"}}),t("div",{staticClass:"form-item-help"},[t("small",[e._v('查看 "应用私钥RSA2048-敏感数据,请妥善保管.txt" 文件,将全部内容复制到此处')])])],1)],1):e._e(),e.record.method===e.PaymentMethodEnum.HUIFU.value?t("div",{attrs:{method:e.record.method}},[t("a-form-model-item",{attrs:{label:"商户号类型",prop:"config.huifu.mchType",rules:[{required:!0,message:"请选择商户号类型"}]}},[t("a-radio-group",{on:{change:function(t){return e.clearValidate()}},model:{value:e.record.config.huifu.mchType,callback:function(t){e.$set(e.record.config.huifu,"mchType",t)},expression:"record.config.huifu.mchType"}},[t("a-radio",{attrs:{value:"normal"}},[e._v("普通商户")])],1)],1),"normal"===e.record.config.huifu.mchType?t("div",{attrs:{mchType:e.record.config.huifu.mchType}},[t("a-form-model-item",{attrs:{label:"APPID",prop:"config.huifu.normal.appid",rules:[{required:!0,message:"请填写APPID"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.huifu.normal.appid,callback:function(t){e.$set(e.record.config.huifu.normal,"appid",t)},expression:"record.config.huifu.normal.appid"}})],1),t("a-form-model-item",{attrs:{label:"APPKEY",prop:"config.huifu.normal.appkey",rules:[{required:!0,message:"请填写APPKEY"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.huifu.normal.appkey,callback:function(t){e.$set(e.record.config.huifu.normal,"appkey",t)},expression:"record.config.huifu.normal.appkey"}})],1),t("a-form-model-item",{attrs:{label:"商户编号",prop:"config.huifu.normal.mid",rules:[{required:!0,message:"请填写商户编号"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.huifu.normal.mid,callback:function(t){e.$set(e.record.config.huifu.normal,"mid",t)},expression:"record.config.huifu.normal.mid"}})],1),t("a-form-model-item",{attrs:{label:"终端号",prop:"config.huifu.normal.tid",rules:[{required:!0,message:"请填终端号"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.huifu.normal.tid,callback:function(t){e.$set(e.record.config.huifu.normal,"tid",t)},expression:"record.config.huifu.normal.tid"}})],1),t("a-form-model-item",{attrs:{label:"来源编号",prop:"config.huifu.normal.msgSrcId",rules:[{required:!0,message:"请填来源编号"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.huifu.normal.msgSrcId,callback:function(t){e.$set(e.record.config.huifu.normal,"msgSrcId",t)},expression:"record.config.huifu.normal.msgSrcId"}})],1),t("a-form-model-item",{attrs:{label:"消息来源",prop:"config.huifu.normal.msgSrc",rules:[{required:!0,message:"请填消息来源"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.huifu.normal.msgSrc,callback:function(t){e.$set(e.record.config.huifu.normal,"msgSrc",t)},expression:"record.config.huifu.normal.msgSrc"}})],1),t("a-form-model-item",{attrs:{label:"密钥(网付)",prop:"config.huifu.normal.md5Secret",rules:[{required:!0,message:"请填写支付密钥(网付)"}]}},[t("a-input",{attrs:{type:"password",autocomplete:"off"},model:{value:e.record.config.huifu.normal.md5Secret,callback:function(t){e.$set(e.record.config.huifu.normal,"md5Secret",t)},expression:"record.config.huifu.normal.md5Secret"}})],1)],1):e._e(),"provider"===e.record.config.huifu.mchType?t("div",{attrs:{mchType:e.record.config.huifu.mchType}},[t("a-form-model-item",{attrs:{label:"APPID",prop:"config.huifu.provider.spAppid",rules:[{required:!0,message:"请填写APPID"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.huifu.provider.spAppid,callback:function(t){e.$set(e.record.config.huifu.provider,"spAppid",t)},expression:"record.config.huifu.provider.spAppid"}})],1),t("a-form-model-item",{attrs:{label:"APPKEY",prop:"config.huifu.provider.syAppkey",rules:[{required:!0,message:"请填写APPKEY"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.huifu.provider.syAppkey,callback:function(t){e.$set(e.record.config.huifu.provider,"syAppkey",t)},expression:"record.config.huifu.provider.syAppkey"}})],1),t("a-form-model-item",{attrs:{label:"商户编号",prop:"config.huifu.provider.syMid",rules:[{required:!0,message:"请填写商户编号"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.huifu.provider.syMid,callback:function(t){e.$set(e.record.config.huifu.provider,"syMid",t)},expression:"record.config.huifu.provider.syMid"}})],1),t("a-form-model-item",{attrs:{label:"终端号",prop:"config.huifu.provider.syTid",rules:[{required:!0,message:"请填写终端号"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.huifu.provider.syTid,callback:function(t){e.$set(e.record.config.huifu.provider,"syTid",t)},expression:"record.config.huifu.provider.syTid"}})],1),t("a-form-model-item",{attrs:{label:"来源编号",prop:"config.huifu.provider.syMsgSrcId",rules:[{required:!0,message:"请填写来源编号"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.huifu.provider.syMsgSrcId,callback:function(t){e.$set(e.record.config.huifu.provider,"syMsgSrcId",t)},expression:"record.config.huifu.provider.syMsgSrcId"}})],1),t("a-form-model-item",{attrs:{label:"消息来源",prop:"config.huifu.provider.syMsgSrc",rules:[{required:!0,message:"请填写终端号"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.huifu.provider.syMsgSrc,callback:function(t){e.$set(e.record.config.huifu.provider,"syMsgSrc",t)},expression:"record.config.huifu.provider.syMsgSrc"}})],1),t("a-form-model-item",{attrs:{label:"密钥(网付)",prop:"config.huifu.provider.syMd5Secret",rules:[{required:!0,message:"请填写支付密钥(网付)"}]}},[t("a-input",{attrs:{type:"password",autocomplete:"off"},model:{value:e.record.config.huifu.normal.syMd5Secret,callback:function(t){e.$set(e.record.config.huifu.normal,"syMd5Secret",t)},expression:"record.config.huifu.normal.syMd5Secret"}})],1)],1):e._e()],1):e._e(),e.record.method===e.PaymentMethodEnum.VOUCHER.value?t("div",{attrs:{method:e.record.method}},[t("a-form-model-item",{attrs:{label:"微信商户名称",prop:"config.voucher.wechatMerchantName",rules:[{required:!1,message:"请填写微信商户名称"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.voucher.wechatMerchantName,callback:function(t){e.$set(e.record.config.voucher,"wechatMerchantName",t)},expression:"record.config.voucher.wechatMerchantName"}})],1),t("a-form-model-item",{attrs:{label:"微信二维码"}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["wechatQrCodeId",{rules:[{required:!1,message:"请上传微信二维码"}]}],expression:"['wechatQrCodeId', { rules: [{ required: false, message: '请上传微信二维码' }] }]"}],on:{change:function(t,r){return e.setImage(t,r,"wechatQrCodeId")}}})],1),t("a-form-model-item",{attrs:{label:"支付宝商户名称",prop:"config.voucher.alipayMerchantName",rules:[{required:!1,message:"请填写支付宝商户名称"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.voucher.alipayMerchantName,callback:function(t){e.$set(e.record.config.voucher,"alipayMerchantName",t)},expression:"record.config.voucher.alipayMerchantName"}})],1),t("a-form-model-item",{attrs:{label:"支付宝二维码",prop:"config.voucher.alipayQrcode"}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["alipayQrCodeId",{rules:[{required:!1,message:"请上传支付宝二维码"}]}],expression:"['alipayQrCodeId', { rules: [{ required: false, message: '请上传支付宝二维码' }] }]"}],on:{change:function(t,r){return e.setImage(t,r,"alipayQrCodeId")}}})],1),t("a-form-model-item",{attrs:{label:"快捷支付商户名称",prop:"config.voucher.quickpayMerchantName",rules:[{required:!1,message:"快捷支付商户名称"}]}},[t("a-input",{attrs:{autocomplete:"off"},model:{value:e.record.config.voucher.quickpayMerchantName,callback:function(t){e.$set(e.record.config.voucher,"quickpayMerchantName",t)},expression:"record.config.voucher.quickpayMerchantName"}})],1),t("a-form-model-item",{attrs:{label:"快捷支付二维码"}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["quickpayQrCodeId",{rules:[{required:!1,message:"请上传快捷支付二维码"}]}],expression:"['quickpayQrCodeId', { rules: [{ required: false, message: '请上传快捷支付二维码' }] }]"}],on:{change:function(t,r){return e.setImage(t,r,"quickpayQrCodeId")}}})],1)],1):e._e(),t("a-form-model-item",{attrs:{wrapperCol:{offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary",loading:e.isBtnLoading},on:{click:e.handleSubmit}},[e._v("保存")])],1)],1)],1)],1)},i=[],o=r("ade3"),n=(r("d3b7"),r("2ef0")),l=r("67e5"),s=r("2af9"),c=r("759f"),u=r("3f9c"),d={name:"",method:u["a"].WECHAT.value,sort:100,remarks:"",config:Object(o["a"])(Object(o["a"])(Object(o["a"])(Object(o["a"])({},u["a"].WECHAT.value,{mchType:"normal",version:"v3",normal:{appId:"",mchId:"",apiKey:"",apiclientCert:"",apiclientKey:""},provider:{spAppId:"",spMchId:"",spApiKey:"",subAppId:"",subMchId:"",spApiclientCert:"",spApiclientKey:""}}),u["a"].ALIPAY.value,{appId:"",signType:"RSA2",signMode:10,alipayPublicKey:"",appCertPublicKey:"",alipayCertPublicKey:"",alipayRootCert:"",merchantPrivateKey:""}),u["a"].HUIFU.value,{mchType:"normal",normal:{sysId:"",appkey:"",mid:"",tid:"",msgSrcId:"",msgSrc:"",md5Secret:""},provider:{sysId:"",syAppkey:"",syMid:"",syTid:"",syMsgSrcId:"",syMsgSrc:"",syMd5Secret:""}}),u["a"].VOUCHER.value,{wechatMerchantName:"",wechatQrCode:"",wechatQrCodeId:"",alipayMerchantName:"",alipayQrcode:"",alipayQrCodeId:"",quickpayMerchantName:"",quickpayQrCode:"",quickpayQrCodeId:""})},m={components:{InputFile:l["a"],SelectImage:s["j"]},data:function(){return{isLoading:!1,isBtnLoading:!1,labelCol:{span:3},wrapperCol:{span:10},PaymentMethodEnum:u["a"],record:Object(n["cloneDeep"])(d),uploadFiles:{apiclientCert:null,apiclientKey:null,spApiclientCert:null,spApiclientKey:null,appCertPublicKey:null,alipayCertPublicKey:null,alipayRootCert:null}}},created:function(){},methods:{clearValidate:function(){this.$refs.myForm.clearValidate()},handleSubmit:function(e){var t=this;e.preventDefault(),this.$refs.myForm.validate((function(e){if(!e)return!1;t.onSubmitForm()}))},onChangeInputFile:function(e,t,r){var a=this.uploadFiles;null!==t[1]&&(a[r]=t[1])},setImage:function(e,t,r){this.record.config.voucher[r]=e},onSubmitForm:function(){var e=this;this.isLoading=!0,this.isBtnLoading=!0;var t=this.buildFormData();c["a"](t).then((function(t){e.$message.success(t.message,1.5),setTimeout((function(){e.$router.push("./index")}),1500)})).catch((function(){return e.isBtnLoading=!1})).finally((function(){return e.isLoading=!1}))},buildFormData:function(){var e=this.record,t=this.uploadFiles,r=new FormData;for(var a in r.append("name",e.name),r.append("sort",e.sort),r.append("method",e.method),r.append("remarks",e.remarks),r.append("config",JSON.stringify(e.config)),t)null!=t[a]&&r.append(a,t[a]);return r}}},p=m,f=(r("bc4e"),r("2877")),h=Object(f["a"])(p,a,i,!1,null,"59144dd5",null);t["default"]=h.exports},a85e:function(e,t,r){"use strict";r.r(t);r("b0c0");var a=function(){var e=this,t=e._self._c;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",{staticClass:"mb-20",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 }] }]"}],on:{change:e.onChangeEngine}},e._l(e.record.engine,(function(r,a){return t("a-radio",{key:a,attrs:{value:a}},[t("span",[e._v(e._s(r.name))]),"aliyun"===a?t("a-tag",{staticClass:"ml-5",attrs:{color:"green"}},[e._v("推荐")]):e._e()],1)})),1),e.form.getFieldValue("default")?t("div",{staticClass:"form-item-help"},[t("small",[e._v("短信平台管理地址:")]),t("a",{attrs:{href:e.record.engine[e.form.getFieldValue("default")].website,target:"_blank"}},[e._v(e._s(e.record.engine[e.form.getFieldValue("default")].website))])]):e._e()],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),t("div",{directives:[{name:"show",rawName:"v-show",value:"qcloud"===e.form.getFieldValue("default"),expression:"form.getFieldValue('default') === 'qcloud'"}]},[t("a-form-item",{attrs:{label:"SdkAppID",labelCol:e.labelCol,wrapperCol:e.wrapperCol,required:""}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["engine.qcloud.SdkAppID"],expression:"[`engine.qcloud.SdkAppID`]"}]})],1),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.qcloud.AccessKeyId"],expression:"[`engine.qcloud.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.qcloud.AccessKeySecret"],expression:"[`engine.qcloud.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.qcloud.sign"],expression:"[`engine.qcloud.sign`]"}]})],1)],1),t("div",{directives:[{name:"show",rawName:"v-show",value:"qiniu"===e.form.getFieldValue("default"),expression:"form.getFieldValue('default') === 'qiniu'"}]},[t("a-form-item",{attrs:{label:"AccessKey",labelCol:e.labelCol,wrapperCol:e.wrapperCol,required:""}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["engine.qiniu.AccessKey"],expression:"[`engine.qiniu.AccessKey`]"}]})],1),t("a-form-item",{attrs:{label:"SecretKey",labelCol:e.labelCol,wrapperCol:e.wrapperCol,required:""}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["engine.qiniu.SecretKey"],expression:"[`engine.qiniu.SecretKey`]"}]})],1)],1),e._l(e.record["scene"],(function(r,a){return t("div",{key:a},[t("a-divider",{attrs:{orientation:"left"}},[e._v(e._s(r.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.".concat(a,".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[a].contentPractical))])]),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.".concat(a,".templateCode")],expression:"[`scene.${index}.templateCode`]"}]}),t("div",{staticClass:"form-item-help"},[t("small",[e._v("例如:SMS_139800030")])])],1),void 0!==e.record.scene[a].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.".concat(a,".acceptPhone")],expression:"[`scene.${index}.acceptPhone`]"}]})],1):e._e()],1)})),t("a-form-item",{attrs:{wrapperCol:{span:e.wrapperCol.span,offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary","html-type":"submit"}},[e._v("提交")])],1)],2)],1)],1)},i=[],o=(r("d3b7"),r("4d63"),r("ac1f"),r("25f0"),r("5319"),r("ddb0"),r("2ef0")),n=r("ca00"),l=r("f585"),s=r("3267"),c={data:function(){return{SettingSmsSceneEnum:s["a"],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,l["a"](this.key).then((function(t){e.record=t.data.values,e.setFieldsValue()})).finally((function(){return e.isLoading=!1}))},onChangeEngine:function(e){var t=this,r=e.target.value;for(var a in t.record.scene){var i=t.record.scene[a];i.contentPractical=t.onVsprintf(i.content,i.variables[r])}},onVsprintf:function(e,t){for(var r=new RegExp("%s"),a=0;a0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(e)},handleSearch:function(e){var t=this;e.preventDefault(),this.searchForm.validateFields((function(e,r){e||(t.queryParam=Object(o["a"])(Object(o["a"])({},t.queryParam),r),t.handleRefresh(!0))}))}}},f=p,h=(r("bb0a"),r("2877")),v=Object(h["a"])(f,a,i,!1,null,"ed0288a2",null);t["default"]=v.exports},af20:function(e,t,r){},b39f:function(e,t,r){"use strict";r("2775")},bb0a:function(e,t,r){"use strict";r("a2b9")},bb50:function(e,t,r){"use strict";r.r(t);r("b0c0");var a=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("a-row",[t("a-col",{attrs:{span:5}},[e.$auth("/setting/payment/template/create")?t("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:function(t){return e.handleAdd()}}},[e._v("新增")]):e._e()],1)],1)],1),t("s-table",{ref:"table",attrs:{rowKey:"template_id",loading:e.isLoading,columns:e.columns,data:e.loadData,pagination:e.pagination},scopedSlots:e._u([{key:"method",fn:function(r){return t("span",{},[t("a-tag",[e._v(e._s(e.PaymentMethodEnum[r].name))])],1)}},{key:"remarks",fn:function(r){return t("span",{},[e._v(e._s(r||"--"))])}},{key:"action",fn:function(r,a){return t("div",{staticClass:"actions"},[e.$auth("/setting/payment/template/update")?t("a",{on:{click:function(t){return e.handleEdit(a)}}},[e._v("编辑")]):e._e(),t("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],on:{click:function(t){return e.handleDelete(a)}}},[e._v("删除")])])}}])})],1)},i=[],o=r("5530"),n=(r("d3b7"),r("3f9c")),l=r("759f"),s=r("2af9"),c={name:"Index",components:{STable:s["d"]},data:function(){var e=this;return{PaymentMethodEnum:n["a"],queryParam:{},isLoading:!1,columns:[{title:"模板ID",dataIndex:"template_id"},{title:"模板名称",dataIndex:"name"},{title:"支付方式",dataIndex:"method",scopedSlots:{customRender:"method"}},{title:"备注信息",dataIndex:"remarks",scopedSlots:{customRender:"remarks"}},{title:"排序",dataIndex:"sort"},{title:"添加时间",dataIndex:"create_time"},{title:"更新时间",dataIndex:"update_time"},{title:"操作",dataIndex:"action",width:"180px",scopedSlots:{customRender:"action"}}],loadData:function(t){return l["f"](Object(o["a"])(Object(o["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))}}},created:function(){},methods:{handleAdd:function(){this.$router.push({path:"./create"})},handleEdit:function(e){this.$router.push({path:"./update",query:{templateId:e.template_id}})},handleDelete:function(e){var t=this,r=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return l["c"]({templateId:e.template_id}).then((function(e){t.$message.success(e.message,1.5),t.handleRefresh()})).finally((function(e){return r.destroy()}))}})},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(e)},onSearch:function(){this.handleRefresh(!0)}}},u=c,d=r("2877"),m=Object(d["a"])(u,a,i,!1,null,null,null);t["default"]=m.exports},bc4e:function(e,t,r){"use strict";r("c5b9")},c2e1:function(e,t,r){"use strict";r.r(t);r("b0c0");var a=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("a-row",{staticClass:"row-item-search"},[t("a-form",{staticClass:"search-form",attrs:{layout:"inline"}},[t("a-form-item",{attrs:{label:"售卖名称"}},[t("a-input",{attrs:{placeholder:"请输入售卖名称"},model:{value:e.queryParam.retail_name,callback:function(t){e.$set(e.queryParam,"retail_name",t)},expression:"queryParam.retail_name"}})],1),t("a-form-item",{attrs:{label:"售卖类型"}},[t("a-select",{attrs:{placeholder:"请选择售卖类型"},model:{value:e.queryParam.retail_type,callback:function(t){e.$set(e.queryParam,"retail_type",t)},expression:"queryParam.retail_type"}},e._l([{retail_type:10,name:"零售商城"},{retail_type:20,name:"批发商城"}],(function(r,a){return t("a-select-option",{key:a,attrs:{value:r.retail_type}},[e._v(e._s(r.name))])})),1)],1),t("a-form-item",{staticClass:"search-btn"},[t("a-button",{attrs:{type:"primary",icon:"search"},on:{click:e.handleSearch}},[e._v("搜索")])],1)],1)],1)],1),t("div",{staticClass:"table-operator"},[t("a-button",{directives:[{name:"action",rawName:"v-action:add",arg:"add"}],attrs:{type:"primary",icon:"plus"},on:{click:e.handleAdd}},[e._v("新增")])],1),t("s-table",{ref:"table",attrs:{rowKey:"merchant_id",columns:e.columns,data:e.loadData,pagination:e.pagination,scroll:{x:1450}},scopedSlots:e._u([{key:"retail_type",fn:function(r,a){return t("span",{},[e._v(" "+e._s(10==a.retail_type?"零售商城":"批发商城")+" ")])}},{key:"retail_status",fn:function(r,a){return t("span",{},[t("a-tag",{staticClass:"cur-p",attrs:{color:10==r?"green":"red"}},[e._v(e._s(10==r?"展示":"隐藏"))])],1)}},{key:"action",fn:function(r,a){return t("span",{},[[t("a",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}],staticStyle:{"margin-right":"8px"},on:{click:function(t){return e.handleEdit(a)}}},[e._v("编辑")]),t("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],on:{click:function(t){return e.handleDelete(a)}}},[e._v("删除")])]],2)}}])}),t("AddForm",{ref:"AddForm",on:{handleSubmit:function(t){return e.handleRefresh(!0)}}}),t("EditForm",{ref:"EditForm",on:{handleSubmit:function(t){return e.handleRefresh()}}})],1)},i=[],o=r("c7eb"),n=r("1da1"),l=r("5530"),s=(r("d3b7"),r("6d92")),c=r("2af9"),u=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:"新增商户",width:920,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-model-item",{attrs:{label:"售卖类型",labelCol:e.labelCol,wrapperCol:e.wrapperCol,required:""}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["retail_type",{initialValue:10,rules:[{required:!0}]}],expression:"['retail_type', { initialValue: 10, rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:10}},[e._v("零售商城")]),t("a-radio",{attrs:{value:20}},[e._v("批发商城")])],1)],1),t("a-form-item",{attrs:{label:"售卖名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["retail_name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['retail_name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),t("a-form-item",{attrs:{label:"售卖现价",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["retail_current_price",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"[\n 'retail_current_price',\n { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] },\n ]"}]})],1),t("a-form-item",{attrs:{label:"售卖原价",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["retail_original_price",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"[\n 'retail_original_price',\n { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] },\n ]"}]})],1),t("a-form-item",{attrs:{label:"买两年优惠价",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["retail_discounts",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['retail_discounts', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),t("a-form-model-item",{attrs:{label:"售卖状态",labelCol:e.labelCol,wrapperCol:e.wrapperCol,required:""}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["retail_status",{initialValue:10,rules:[{required:!0}]}],expression:"['retail_status', { initialValue: 10, rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:10}},[e._v("展示")]),t("a-radio",{attrs:{value:20}},[e._v("隐藏")])],1)],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true }] }]"}],attrs:{min:0}})],1)],1)],1)],1)},d=[],m=(r("a15b"),{components:{SelectImage:c["j"]},props:{},data:function(){return{accountList:[],title:"",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this)}},methods:{add:function(){this.visible=!0},handleSubmit:function(e){var t=this;e.preventDefault();var r=this.form.validateFields;r((function(e,r){e||t.onFormSubmit(r)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,s["a"]({form:Object(l["a"])(Object(l["a"])({},e),{},{license_img_id:e.license_img_id&&(Array.isArray(e.license_img_id)?e.license_img_id.join(","):e.license_img_id)||""})}).then((function(r){t.$message.success(r.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(e){t.confirmLoading=!1}))}}}),p=m,f=r("2877"),h=Object(f["a"])(p,u,d,!1,null,null,null),v=h.exports,g=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:"新增商户",width:920,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-model-item",{attrs:{label:"售卖类型",labelCol:e.labelCol,wrapperCol:e.wrapperCol,required:""}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["retail_type"],expression:"['retail_type']"}]},[t("a-radio",{attrs:{value:10}},[e._v("零售商城")]),t("a-radio",{attrs:{value:20}},[e._v("批发商城")])],1)],1),t("a-form-item",{attrs:{label:"售卖名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["retail_name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['retail_name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),t("a-form-item",{attrs:{label:"售卖现价",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["retail_current_price",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"[\n 'retail_current_price',\n { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] },\n ]"}]})],1),t("a-form-item",{attrs:{label:"售卖原价",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["retail_original_price",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"[\n 'retail_original_price',\n { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] },\n ]"}]})],1),t("a-form-item",{attrs:{label:"买两年优惠价",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["retail_discounts",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['retail_discounts', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),t("a-form-model-item",{attrs:{label:"售卖状态",labelCol:e.labelCol,wrapperCol:e.wrapperCol,required:""}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["retail_status"],expression:"['retail_status']"}]},[t("a-radio",{attrs:{value:10}},[e._v("展示")]),t("a-radio",{attrs:{value:20}},[e._v("隐藏")])],1)],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true }] }]"}],attrs:{min:0}})],1)],1)],1)],1)},b=[],y={components:{SelectImage:c["j"]},props:{},data:function(){return{accountList:[],title:"",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),info:{}}},methods:{add:function(e){this.visible=!0,this.info=e,this.setFieldsValue()},setFieldsValue:function(){var e=this,t=this.form.setFieldsValue;this.$nextTick((function(){t(_.pick(e.info,["retail_name","retail_type","retail_original_price","retail_current_price","sort","retail_status","retail_discounts"]))}))},handleSubmit:function(e){var t=this;e.preventDefault();var r=this.form.validateFields;r((function(e,r){e||t.onFormSubmit(r)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,s["c"]({retailPriceId:this.info["retail_price_id"],form:Object(l["a"])({},e)}).then((function(r){t.$message.success(r.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(e){t.confirmLoading=!1}))}}},C=y,w=Object(f["a"])(C,g,b,!1,null,null,null),x=w.exports,I={components:{STable:c["d"],AddForm:v,EditForm:x},data:function(){var e=this;return{queryParam:{retail_type:"",retail_name:""},loadData:function(t){return s["d"](Object(l["a"])(Object(l["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))},columns:[{title:"商城id",dataIndex:"retail_price_id"},{title:"售卖名称",width:"150px",dataIndex:"retail_name",scopedSlots:{customRender:"retail_name"}},{title:"售卖类型",dataIndex:"retail_type",scopedSlots:{customRender:"retail_type"}},{title:" 售卖现价",dataIndex:"retail_current_price",scopedSlots:{customRender:"retail_current_price"}},{title:"售卖原价",dataIndex:"retail_original_price",scopedSlots:{customRender:"retail_original_price"}},{title:"买两年优惠价",dataIndex:"retail_discounts"},{title:"售卖状态",dataIndex:"retail_status",scopedSlots:{customRender:"retail_status"}},{title:"添加时间",dataIndex:"create_time"},{title:"操作",dataIndex:"action",scopedSlots:{customRender:"action"}}]}},created:function(){},methods:{handleAdd:function(){var e=this;return Object(n["a"])(Object(o["a"])().mark((function t(){return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$refs.AddForm.add();case 1:case"end":return t.stop()}}),t)})))()},handleEdit:function(e){var t=this;return Object(n["a"])(Object(o["a"])().mark((function r(){return Object(o["a"])().wrap((function(r){while(1)switch(r.prev=r.next){case 0:t.$refs.EditForm.add(e);case 1:case"end":return r.stop()}}),r)})))()},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(e)},handleSearch:function(e){this.handleRefresh(!0)},handleDelete:function(e){var t=this,r=this.$confirm({title:"您确定要删除该商户吗?",content:"删除后不可恢复",onOk:function(){return s["b"]({retailPriceId:[e["retail_price_id"]]}).then((function(e){t.$message.success(e.message,1.5),t.handleRefresh(!0)})).finally((function(){return r.destroy()}))}})}}},k=I,q=Object(f["a"])(k,a,i,!1,null,null,null);t["default"]=q.exports},c5b9:function(e,t,r){},c7eb:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));r("a4d3"),r("e01a"),r("b636"),r("d28b"),r("944a"),r("fb6a"),r("b0c0"),r("0c47"),r("23dc"),r("3410"),r("131a"),r("d3b7"),r("3ca3"),r("159b"),r("ddb0");var a=r("53ca");function i(){ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ i=function(){return t};var e,t={},r=Object.prototype,o=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},l="function"==typeof Symbol?Symbol:{},s=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",u=l.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,r){return e[t]=r}}function m(e,t,r,a){var i=t&&t.prototype instanceof y?t:y,o=Object.create(i.prototype),l=new $(a||[]);return n(o,"_invoke",{value:A(e,r,l)}),o}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=m;var f="suspendedStart",h="suspendedYield",v="executing",g="completed",b={};function y(){}function _(){}function C(){}var w={};d(w,s,(function(){return this}));var x=Object.getPrototypeOf,I=x&&x(x(F([])));I&&I!==r&&o.call(I,s)&&(w=I);var k=C.prototype=y.prototype=Object.create(w);function q(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function r(i,n,l,s){var c=p(e[i],e,n);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==Object(a["a"])(d)&&o.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,l,s)}),(function(e){r("throw",e,l,s)})):t.resolve(d).then((function(e){u.value=e,l(u)}),(function(e){return r("throw",e,l,s)}))}s(c.arg)}var i;n(this,"_invoke",{value:function(e,a){function o(){return new t((function(t,i){r(e,a,t,i)}))}return i=i?i.then(o,o):o()}})}function A(t,r,a){var i=f;return function(o,n){if(i===v)throw Error("Generator is already running");if(i===g){if("throw"===o)throw n;return{value:e,done:!0}}for(a.method=o,a.arg=n;;){var l=a.delegate;if(l){var s=P(l,a);if(s){if(s===b)continue;return s}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(i===f)throw i=g,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);i=v;var c=p(t,r,a);if("normal"===c.type){if(i=a.done?g:h,c.arg===b)continue;return{value:c.arg,done:a.done}}"throw"===c.type&&(i=g,a.method="throw",a.arg=c.arg)}}}function P(t,r){var a=r.method,i=t.iterator[a];if(i===e)return r.delegate=null,"throw"===a&&t.iterator["return"]&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),b;var o=p(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,b;var n=o.arg;return n?n.done?(r[t.resultName]=n.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):n:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function $(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function F(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,n=function r(){for(;++i=0;--i){var n=this.tryEntries[i],l=n.completion;if("root"===n.tryLoc)return a("end");if(n.tryLoc<=this.prev){var s=o.call(n,"catchLoc"),c=o.call(n,"finallyLoc");if(s&&c){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if("throw"===a.type){var i=a.arg;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,a){return this.delegate={iterator:F(t),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=e),b}},t}},f4eb:function(e,t,r){"use strict";r.r(t);r("ac1f"),r("841c");var a=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("a-row",[t("a-col",{attrs:{span:6}},[t("a-button",{directives:[{name:"action",rawName:"v-action:add",arg:"add"}],attrs:{type:"primary",icon:"plus"},on:{click:e.handleAdd}},[e._v("新增")])],1),t("a-col",{attrs:{span:8,offset:10}},[t("a-input-search",{staticStyle:{"max-width":"300px","min-width":"150px",float:"right"},attrs:{placeholder:"请输入物流公司名称"},on:{search:e.onSearch},model:{value:e.queryParam.search,callback:function(t){e.$set(e.queryParam,"search",t)},expression:"queryParam.search"}})],1)],1)],1),t("s-table",{ref:"table",attrs:{rowKey:"express_id",loading:e.isLoading,columns:e.columns,data:e.loadData,pagination:e.pagination},scopedSlots:e._u([{key:"action",fn:function(r,a){return t("span",{staticClass:"actions"},[t("a",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}],on:{click:function(t){return e.handleEdit(a)}}},[e._v("编辑")]),t("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],on:{click:function(t){return e.handleDelete(a)}}},[e._v("删除")])])}}])}),t("AddForm",{ref:"AddForm",on:{handleSubmit:e.handleRefresh}}),t("EditForm",{ref:"EditForm",on:{handleSubmit:e.handleRefresh}})],1)},i=[],o=r("5530"),n=(r("d3b7"),r("2a66")),l=r("2af9"),s=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"物流公司名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["express_name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['express_name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),t("a-form-item",{attrs:{label:"公司编码(快递100)",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["kuaidi100_code",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['kuaidi100_code', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}],attrs:{placeholder:"用于快递100查询物流信息API"}}),t("p",{staticClass:"form-item-help"},[t("small",[t("span",[e._v("请参照")]),t("a",{attrs:{href:"https://api.kuaidi100.com/manager/page/document/kdbm",target:"_blank"}},[e._v("物流公司编码表")])])])],1),t("a-form-item",{attrs:{label:"公司编码(快递鸟)",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["kdniao_code",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['kdniao_code', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}],attrs:{placeholder:"用于快递鸟打印电子面单API"}}),t("p",{staticClass:"form-item-help"},[t("small",[t("span",[e._v("请参照")]),t("a",{attrs:{href:"http://www.kdniao.com/documents",target:"_blank"}},[e._v("快递鸟接口支持快递公司编码.xlsx")])])])],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入排序值"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入排序值' }] }]"}],attrs:{min:0}})],1)],1)],1)],1)},c=[],u={data:function(){return{title:"新增物流公司",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this)}},methods:{add:function(){this.visible=!0},handleSubmit:function(e){var t=this;e.preventDefault();var r=this.form.validateFields;r((function(e,r){!e&&t.onFormSubmit(r)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,n["a"]({form:e}).then((function(r){t.$message.success(r.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(){return t.confirmLoading=!1}))}}},d=u,m=r("2877"),p=Object(m["a"])(d,s,c,!1,null,null,null),f=p.exports,h=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"物流公司名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["express_name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['express_name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),t("a-form-item",{attrs:{label:"公司编码(快递100)",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["kuaidi100_code",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['kuaidi100_code', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}],attrs:{placeholder:"用于快递100查询物流信息API"}}),t("p",{staticClass:"form-item-help"},[t("small",[t("span",[e._v("请参照")]),t("a",{attrs:{href:"https://api.kuaidi100.com/manager/page/document/kdbm",target:"_blank"}},[e._v("物流公司编码表")])])])],1),t("a-form-item",{attrs:{label:"公司编码(快递鸟)",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["kdniao_code",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['kdniao_code', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}],attrs:{placeholder:"用于快递鸟打印电子面单API"}}),t("p",{staticClass:"form-item-help"},[t("small",[t("span",[e._v("请参照")]),t("a",{attrs:{href:"http://www.kdniao.com/documents",target:"_blank"}},[e._v("快递鸟接口支持快递公司编码.xlsx")])])])],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入排序值"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入排序值' }] }]"}],attrs:{min:0}})],1)],1)],1)],1)},v=[],g=r("88bc"),b=r.n(g),y={data:function(){return{title:"编辑物流公司",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),record:{}}},methods:{edit:function(e){this.visible=!0,this.record=e,this.setFieldsValue()},setFieldsValue:function(){var e=this,t=this.form.setFieldsValue;this.$nextTick((function(){t(b()(e.record,["express_name","kuaidi100_code","kdniao_code","sort"]))}))},handleSubmit:function(e){var t=this;e.preventDefault();var r=this.form.validateFields;r((function(e,r){!e&&t.onFormSubmit(r)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,n["d"]({expressId:this.record.express_id,form:e}).then((function(r){t.$message.success(r.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(){return t.confirmLoading=!1}))}}},_=y,C=Object(m["a"])(_,h,v,!1,null,null,null),w=C.exports,x={name:"Index",components:{STable:l["d"],AddForm:f,EditForm:w},data:function(){var e=this;return{queryParam:{},isLoading:!1,columns:[{title:"物流公司ID",dataIndex:"express_id"},{title:"物流公司名称",dataIndex:"express_name"},{title:"公司编码(快递100)",dataIndex:"kuaidi100_code"},{title:"公司编码(快递鸟)",dataIndex:"kdniao_code"},{title:"排序",dataIndex:"sort"},{title:"添加时间",dataIndex:"create_time"},{title:"操作",dataIndex:"action",width:"180px",scopedSlots:{customRender:"action"}}],loadData:function(t){return n["e"](Object(o["a"])(Object(o["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))}}},created:function(){},methods:{handleAdd:function(){this.$refs.AddForm.add()},handleEdit:function(e){this.$refs.EditForm.edit(e)},handleDelete:function(e){var t=this,r=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return n["c"]({expressId:e.express_id}).then((function(e){t.$message.success(e.message,1.5),t.handleRefresh()})).finally((function(e){return r.destroy()}))}})},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(e)},onSearch:function(){this.handleRefresh(!0)}}},I=x,k=Object(m["a"])(I,a,i,!1,null,null,null);t["default"]=k.exports},f50c:function(e,t,r){"use strict";r.d(t,"e",(function(){return o})),r.d(t,"b",(function(){return n})),r.d(t,"a",(function(){return l})),r.d(t,"d",(function(){return s})),r.d(t,"c",(function(){return c}));var a=r("b775"),i={list:"/setting.printer/list",all:"/setting.printer/all",add:"/setting.printer/add",edit:"/setting.printer/edit",delete:"/setting.printer/delete"};function o(e){return Object(a["b"])({url:i.list,method:"get",params:e})}function n(e){return Object(a["b"])({url:i.all,method:"get",params:e})}function l(e){return Object(a["b"])({url:i.add,method:"post",data:e})}function s(e){return Object(a["b"])({url:i.edit,method:"post",data:e})}function c(e){return Object(a["b"])({url:i.delete,method:"post",data:e})}},f585:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return l}));var a=r("5530"),i=r("b775"),o={detail:"/setting/detail",update:"/setting/update"};function n(e){return Object(i["b"])({url:o.detail,method:"get",params:{key:e}})}function l(e,t){return Object(i["b"])({url:o.update,method:"post",data:Object(a["a"])({key:e},t)})}}}]);