(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0aa22f"],{1071:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"main"},[n("div",{staticClass:"form-tips"},[t._v(t._s(t.page.tips))]),n("v-form",{ref:"form",attrs:{model:t.formModel,fields:t.page.form.fields},on:{submit:t.onSubmit}}),n("div",{staticClass:"fixed-box"},[n("div",{staticClass:"fixed-inner"},[n("div",{staticClass:"fixed-button",on:{click:t.handleSubmit}},[t._v("提交")])])])],1)},a=[],r=(n("ac1f"),n("5319"),n("3835")),o=n("c84f"),s=n("8477"),u=n("365c"),c={name:"Edit",components:{VForm:s["a"]},metaInfo:function(){return{title:this.page.title}},data:function(){return{formModel:{}}},watch:{$route:{immediate:!0,deep:!0,handler:function(t){var e=this;t.query.channel||this.$dialog.alert({message:"请选择事务"}).then((function(){e.$router.replace({name:"index",query:e.$route.query})}))}}},computed:{page:function(){var t=this.$route.query.channel;return o["a"][t]?o["a"][t]["edit"]:{}},channelId:function(){return this.$route.query.channel_id},viewId:function(){return this.$route.query.view_id}},methods:{handleSubmit:function(){this.$refs.form.submit()},onSubmit:function(t){var e=this;if(t.affair_id=this.channelId,t.payment_instrument){var n=Object(r["a"])(t.payment_instrument,1),i=n[0],a=void 0===i?{url:""}:i;t.payment_instrument=a.url}u["h"](this.viewId,t).then((function(t){t.success?e.$dialog.alert({confirmButtonText:"确定",message:"修改成功"}).then((function(){e.$router.push({name:"list",query:e.$route.query})})):e.$toast(t.message)}))},getDetail:function(){var t=this,e=this.$toast.loading({message:"加载中...",forbidClick:!0,duration:0});u["c"](this.viewId).then((function(n){t.formModel=n.form,e.clear()})).catch(e.clear)}},beforeMount:function(){this.getDetail()}},l=c,f=n("2877"),d=Object(f["a"])(l,i,a,!1,null,null,null);e["default"]=d.exports}}]);
//# sourceMappingURL=chunk-2d0aa22f.795f8b77.js.map