|
@@ -11,14 +11,10 @@
|
|
|
<!-- 表头工具栏 -->
|
|
<!-- 表头工具栏 -->
|
|
|
<template v-slot:toolbar>
|
|
<template v-slot:toolbar>
|
|
|
<el-button type="primary" @click="openEdit('add', {})">添加</el-button>
|
|
<el-button type="primary" @click="openEdit('add', {})">添加</el-button>
|
|
|
- <el-button type="primary" @click="save">确认修改</el-button>
|
|
|
|
|
|
|
+ <!-- <el-button type="primary" @click="save">确认修改</el-button> -->
|
|
|
</template>
|
|
</template>
|
|
|
<template v-slot:content="{ row }">
|
|
<template v-slot:content="{ row }">
|
|
|
- <el-link
|
|
|
|
|
- type="primary"
|
|
|
|
|
- :underline="false"
|
|
|
|
|
- @click="openEdit('view', row)"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-link type="primary" :underline="false" @click="openDetail(row)">
|
|
|
{{ row.content }}</el-link
|
|
{{ row.content }}</el-link
|
|
|
>
|
|
>
|
|
|
</template>
|
|
</template>
|
|
@@ -48,23 +44,22 @@
|
|
|
</template>
|
|
</template>
|
|
|
</ele-pro-table>
|
|
</ele-pro-table>
|
|
|
<AddFollowDialog ref="addFollowDialogRef" @done="done"></AddFollowDialog>
|
|
<AddFollowDialog ref="addFollowDialogRef" @done="done"></AddFollowDialog>
|
|
|
|
|
+ <followDetailDialog ref="contactDetailDialogRef"></followDetailDialog>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
- import {
|
|
|
|
|
- getTableList,
|
|
|
|
|
- deleteInformation
|
|
|
|
|
- } from '@/api/saleManage/businessFollow';
|
|
|
|
|
|
|
+ import { deleteInformation } from '@/api/saleManage/businessFollow';
|
|
|
|
|
|
|
|
import AddFollowDialog from './addFollowDialog.vue';
|
|
import AddFollowDialog from './addFollowDialog.vue';
|
|
|
import { contactUpdate } from '@/api/saleManage/contact';
|
|
import { contactUpdate } from '@/api/saleManage/contact';
|
|
|
-
|
|
|
|
|
import { contactDetail } from '@/api/saleManage/contact';
|
|
import { contactDetail } from '@/api/saleManage/contact';
|
|
|
|
|
+ import followDetailDialog from './followDetailDialog.vue';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
- AddFollowDialog
|
|
|
|
|
|
|
+ AddFollowDialog,
|
|
|
|
|
+ followDetailDialog
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
data() {
|
|
@@ -149,7 +144,6 @@
|
|
|
]
|
|
]
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
openEdit(type, row, index) {
|
|
openEdit(type, row, index) {
|
|
|
this.$refs.addFollowDialogRef.open(
|
|
this.$refs.addFollowDialogRef.open(
|
|
@@ -161,45 +155,56 @@
|
|
|
this.$refs.addFollowDialogRef.$refs.form &&
|
|
this.$refs.addFollowDialogRef.$refs.form &&
|
|
|
this.$refs.addFollowDialogRef.$refs.form.clearValidate();
|
|
this.$refs.addFollowDialogRef.$refs.form.clearValidate();
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
|
|
+ openDetail(row) {
|
|
|
|
|
+ this.$refs.contactDetailDialogRef.open(row);
|
|
|
|
|
+ },
|
|
|
async init(row) {
|
|
async init(row) {
|
|
|
this.form = row;
|
|
this.form = row;
|
|
|
this.list = row.base.opportunityFollowupList;
|
|
this.list = row.base.opportunityFollowupList;
|
|
|
},
|
|
},
|
|
|
handleBankDel(row, index) {
|
|
handleBankDel(row, index) {
|
|
|
- console.log(row);
|
|
|
|
|
-
|
|
|
|
|
- // deleteInformation([row])
|
|
|
|
|
|
|
+ deleteInformation([row.id]).then((res) => {
|
|
|
|
|
+ this.$message.success('删除成功!');
|
|
|
|
|
+ this.getList();
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
// this.list.splice(index, 1);
|
|
// this.list.splice(index, 1);
|
|
|
// this.save();
|
|
// this.save();
|
|
|
},
|
|
},
|
|
|
- done({ data, type, index }) {
|
|
|
|
|
- data.linkId = data.linkId.toString();
|
|
|
|
|
- if (type == 'add') {
|
|
|
|
|
- this.list.unshift(data);
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$set(this.list, index, data);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ getList() {
|
|
|
|
|
+ contactDetail(this.form.base.id).then((res) => {
|
|
|
|
|
+ this.list = res.base.opportunityFollowupList;
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
- save() {
|
|
|
|
|
- console.log(this.form);
|
|
|
|
|
-
|
|
|
|
|
- this.form.base.opportunityFollowupList = this.list;
|
|
|
|
|
- contactUpdate(this.form)
|
|
|
|
|
- .then((res) => {
|
|
|
|
|
- this.$message.success('修改成功');
|
|
|
|
|
-
|
|
|
|
|
- contactDetail(this.form.base.id).then((res) => {
|
|
|
|
|
- this.list = res.base.opportunityFollowupList;
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- this.$emit('success');
|
|
|
|
|
- })
|
|
|
|
|
- .catch((e) => {
|
|
|
|
|
- //this.loading = false;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ done() {
|
|
|
|
|
+ this.getList();
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // done({ data, type, index }) {
|
|
|
|
|
+ // data.linkId = data.linkId.toString();
|
|
|
|
|
+ // if (type == 'add') {
|
|
|
|
|
+ // this.list.unshift(data);
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // this.$set(this.list, index, data);
|
|
|
|
|
+ // }
|
|
|
|
|
+ // },
|
|
|
|
|
+ // save() {
|
|
|
|
|
+ // this.form.base.opportunityFollowupList = this.list;
|
|
|
|
|
+ // contactUpdate(this.form)
|
|
|
|
|
+ // .then((res) => {
|
|
|
|
|
+ // this.$message.success('修改成功');
|
|
|
|
|
+
|
|
|
|
|
+ // contactDetail(this.form.base.id).then((res) => {
|
|
|
|
|
+ // this.list = res.base.opportunityFollowupList;
|
|
|
|
|
+ // });
|
|
|
|
|
+
|
|
|
|
|
+ // this.$emit('success');
|
|
|
|
|
+ // })
|
|
|
|
|
+ // .catch((e) => {
|
|
|
|
|
+ // //this.loading = false;
|
|
|
|
|
+ // });
|
|
|
|
|
+ // }
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|