| <template> | 
|     <GlobalWindow | 
|             :title="title" | 
|             width="40%" | 
|             :visible.sync="visible" | 
|             :confirm-working="isWorking" | 
|             @confirm="confirm" | 
|     > | 
|         <el-form ref="form" :model="form" label-width="130px"> | 
|             <el-form-item label="填写申请说明"> | 
|                 <el-input type="textarea" v-model="form.remark"></el-input> | 
|             </el-form-item> | 
|         </el-form> | 
|     </GlobalWindow> | 
| </template> | 
|   | 
| <script> | 
|     import BaseOpera from '@/components/base/BaseOpera' | 
|     import GlobalWindow from '@/components/common/GlobalWindow' | 
|     import { applyChangeOpt } from '@/api/business/applyChange' | 
|   | 
|     export default { | 
|         name: 'add_subtract_return', | 
|         extends: BaseOpera, | 
|         components: { GlobalWindow }, | 
|         data () { | 
|             return { | 
|                 // 表单数据 | 
|                 form: { | 
|                     id: null, | 
|                     remark: '' | 
|                 } | 
|             } | 
|         }, | 
|         created () { | 
|             this.config({ | 
|                 api: '/business/insurance', | 
|                 'field.id': 'id' | 
|             }) | 
|         }, | 
|         methods: { | 
|             open (title, target) { | 
|                 this.title = title | 
|                 this.visible = true | 
|                 this.$nextTick(() => { | 
|                     this.$refs.form.resetFields() | 
|                     this.form[this.configData['field.id']] = null | 
|                 }) | 
|                 this.$nextTick(() => { | 
|                     for (const key in this.form) { | 
|                         this.form[key] = target[key] | 
|                     } | 
|                 }) | 
|             }, | 
|             confirm() { | 
|                 this.isWorking = true | 
|                 applyChangeOpt({ applyId: this.form.id, optIllustration: this.form.remark, optType: 3 }) | 
|                     .then(res => { | 
|                         this.visible = false | 
|                         this.$tip.apiSuccess('操作成功') | 
|                         this.$emit('success') | 
|                     }) | 
|                     .catch(e => { | 
|                         this.$tip.apiFailed(e) | 
|                     }) | 
|                     .finally(() => { | 
|                         this.isWorking = false | 
|                     }) | 
|             } | 
|         } | 
|     } | 
| </script> |