From cfdafcf22dbd868c9876d37efbd92b97ba014bef Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期三, 26 三月 2025 09:17:01 +0800
Subject: [PATCH] 优化
---
company/src/components/enterprise/add_subtract_return.vue | 104 ++++++++++++++++++++++++++--------------------------
1 files changed, 52 insertions(+), 52 deletions(-)
diff --git a/company/src/components/enterprise/add_subtract_return.vue b/company/src/components/enterprise/add_subtract_return.vue
index 402f62a..c066762 100644
--- a/company/src/components/enterprise/add_subtract_return.vue
+++ b/company/src/components/enterprise/add_subtract_return.vue
@@ -15,58 +15,58 @@
</template>
<script>
- import BaseOpera from '@/components/base/BaseOpera'
- import GlobalWindow from '@/components/common/GlobalWindow'
- import { applyChangeOpt } from '@/api/business/applyChange'
+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
- })
- }
- }
+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>
--
Gitblit v1.9.3