From 3fee8832ca52667b26f702255677d62775ce5cd6 Mon Sep 17 00:00:00 2001 From: nidapeng <jp@doumee.com> Date: 星期二, 09 四月 2024 19:06:40 +0800 Subject: [PATCH] 提交一把 --- company/src/components/business/ApplyChangeDetails.vue | 261 ++++++++++++++++++++++++++-------------------------- 1 files changed, 130 insertions(+), 131 deletions(-) diff --git a/company/src/components/business/ApplyChangeDetails.vue b/company/src/components/business/ApplyChangeDetails.vue index 5ac1140..c6725e8 100644 --- a/company/src/components/business/ApplyChangeDetails.vue +++ b/company/src/components/business/ApplyChangeDetails.vue @@ -92,138 +92,137 @@ </template> <script> - import BaseOpera from '@/components/base/BaseOpera' - import GlobalWindow from '@/components/common/GlobalWindow' - import {getChangeDetailList, exportJiajianBaoExcel} from "@/api/business/insuranceApply"; - import {check } from "@/api/business/applyChange"; - import {exportComFiles} from "@/api/business/company"; - export default { - name: 'ApplyChangeDetails', - extends: BaseOpera, - components: { GlobalWindow }, - data () { - return { - model:{}, - apply:{}, - type:0, - detailList:[], - // 琛ㄥ崟鏁版嵁 - form: { - id: null, - dealBackApply:0, - checkInfo: '' - }, - // 楠岃瘉瑙勫垯 - rules: { - }, - reverse: false, - tableData: [] - } - }, - created () { - this.config({ - api: '/business/insuranceApply', - 'field.id': 'id' - }) - }, - methods: { - open(title,target,target2,target3){ - this.title=title - this.visible=true - this.apply = target - this.model = target2 - this.form.id=target2.id - this.type=target3 - this.getDetailListDo() - }, - check (type) { - this.form.dealBackApply = type - this.$dialog.messageConfirm('纭杩涜璇ユ搷浣滃悧锛�') - .then(() => { - this.isWorking = true - check(this.form) - .then(response => { - this.visible = false - this.$emit('success') - }).catch(err => { - this.$tip.apiFailed(err) - }) - }) - .catch(() => { - }) - }, - getDetailListDo() { - this.detailList = [] - var that = this - getChangeDetailList({applyChangeId: this.model.id}) - .then(res => { - var addDetailList = [] - var delDetailList = [] - res.forEach(item1 => { - if (item1.type == 1) { - delDetailList.push(item1); - } else { - addDetailList.push(item1); - } - }) - var index = addDetailList.length > delDetailList.length?addDetailList.length : delDetailList.length - for (var i = 0;i<index;i++) { - var addModel = addDetailList.length > i?addDetailList[i]:{} - var delModel = delDetailList.length > i?delDetailList[i]:{} - that.detailList.push({add:addModel,del:delModel}); - } - }).catch(err => {}) - }, - exportDetail(){ - this.$dialog.exportConfirm('纭瀵煎嚭璇﹀崟鍚楋紵') - .then(() => { - this.isWorking = true - exportJiajianBaoExcel({ id: this.model.id }) - .then(response => { - this.download(response) - }) - .catch(e => { - console.log(e) - this.$message.error('鏁版嵁涓嬭浇澶辫触锛�') - }) - .finally(() => { - this.isWorking = false - }) - }) - .catch(() => { - }) - }, - exportComFilesDo(){ - this.$dialog.exportConfirm('纭瀵煎嚭浼佷笟璇佷欢鍚楋紵') - .then(() => { - this.isWorking = true - exportComFiles({ id: this.apply.companyId }) - .then(response => { - this.download(response) - }) - .catch(e => { - console.log(e) - this.$message.error('鏁版嵁涓嬭浇澶辫触锛�') - }) - }) - .catch(() => { - }) - - }, - handleSizeChange(val) { - console.log(`姣忛〉 ${val} 鏉); - }, - handleCurrentChange(val) { - console.log(`褰撳墠椤�: ${val}`); - }, - handleClick(tab, event) { - console.log(tab, event); - }, - onSubmit() { - - } - } +import BaseOpera from '@/components/base/BaseOpera' +import GlobalWindow from '@/components/common/GlobalWindow' +import { getChangeDetailList, exportJiajianBaoExcel } from '@/api/business/insuranceApply' +import { check } from '@/api/business/applyChange' +import { exportComFiles } from '@/api/business/company' +export default { + name: 'ApplyChangeDetails', + extends: BaseOpera, + components: { GlobalWindow }, + data () { + return { + model: {}, + apply: {}, + type: 0, + detailList: [], + // 琛ㄥ崟鏁版嵁 + form: { + id: null, + dealBackApply: 0, + checkInfo: '' + }, + // 楠岃瘉瑙勫垯 + rules: { + }, + reverse: false, + tableData: [] } + }, + created () { + this.config({ + api: '/business/insuranceApply', + 'field.id': 'id' + }) + }, + methods: { + open (title, target, target2, target3) { + this.title = title + this.visible = true + this.apply = target + this.model = target2 + this.form.id = target2.id + this.type = target3 + this.getDetailListDo() + }, + check (type) { + this.form.dealBackApply = type + this.$dialog.messageConfirm('纭杩涜璇ユ搷浣滃悧锛�') + .then(() => { + this.isWorking = true + check(this.form) + .then(response => { + this.visible = false + this.$emit('success') + }).catch(err => { + this.$tip.apiFailed(err) + }) + }) + .catch(() => { + }) + }, + getDetailListDo () { + this.detailList = [] + var that = this + getChangeDetailList({ applyChangeId: this.model.id }) + .then(res => { + var addDetailList = [] + var delDetailList = [] + res.forEach(item1 => { + if (item1.type == 1) { + delDetailList.push(item1) + } else { + addDetailList.push(item1) + } + }) + var index = addDetailList.length > delDetailList.length ? addDetailList.length : delDetailList.length + for (var i = 0; i < index; i++) { + var addModel = addDetailList.length > i ? addDetailList[i] : {} + var delModel = delDetailList.length > i ? delDetailList[i] : {} + that.detailList.push({ add: addModel, del: delModel }) + } + }).catch(err => {}) + }, + exportDetail () { + this.$dialog.exportConfirm('纭瀵煎嚭璇﹀崟鍚楋紵') + .then(() => { + this.isWorking = true + exportJiajianBaoExcel({ id: this.model.id }) + .then(response => { + this.download(response) + }) + .catch(e => { + console.log(e) + this.$message.error('鏁版嵁涓嬭浇澶辫触锛�') + }) + .finally(() => { + this.isWorking = false + }) + }) + .catch(() => { + }) + }, + exportComFilesDo () { + this.$dialog.exportConfirm('纭瀵煎嚭浼佷笟璇佷欢鍚楋紵') + .then(() => { + this.isWorking = true + exportComFiles({ id: this.apply.companyId }) + .then(response => { + this.download(response) + }) + .catch(e => { + console.log(e) + this.$message.error('鏁版嵁涓嬭浇澶辫触锛�') + }) + }) + .catch(() => { + }) + }, + handleSizeChange (val) { + console.log(`姣忛〉 ${val} 鏉) + }, + handleCurrentChange (val) { + console.log(`褰撳墠椤�: ${val}`) + }, + handleClick (tab, event) { + console.log(tab, event) + }, + onSubmit () { + + } + } +} </script> <style lang="scss" scoped> -- Gitblit v1.9.3