|
|
@@ -29,7 +29,7 @@
|
|
|
type="primary"
|
|
|
:underline="false"
|
|
|
icon="el-icon-edit"
|
|
|
- @click="openEdit('edit', row,$index )"
|
|
|
+ @click="openEdit('edit', row, $index)"
|
|
|
>
|
|
|
修改
|
|
|
</el-link>
|
|
|
@@ -52,162 +52,178 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import AddFollowDialog from './addFollowDialog.vue';
|
|
|
-import { contactUpdate } from '@/api/saleManage/contact';
|
|
|
-
|
|
|
-export default {
|
|
|
- components: {
|
|
|
- AddFollowDialog
|
|
|
- },
|
|
|
-
|
|
|
- data() {
|
|
|
- return {
|
|
|
- list: [],
|
|
|
- form: {},
|
|
|
- delVisible: false,
|
|
|
- columns: [
|
|
|
- {
|
|
|
- columnKey: 'index',
|
|
|
- label: '序号',
|
|
|
- type: 'index',
|
|
|
- width: 55,
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- fixed: 'left'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'content',
|
|
|
- label: '跟进内容',
|
|
|
- slot: 'content',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 200
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'stageName',
|
|
|
- label: '跟进阶段',
|
|
|
- slot: 'stageName',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 100
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'agreement',
|
|
|
- label: '达成共识',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'linkName',
|
|
|
- label: '客户联系人名称',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'nextPlan',
|
|
|
- label: '下一步计划',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'followupTime',
|
|
|
- label: '跟进时间',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110,
|
|
|
- formatter: (_row, _column, cellValue) => {
|
|
|
- return this.$util.toDateString(cellValue);
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'createTime',
|
|
|
- label: '创建时间',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110,
|
|
|
- formatter: (_row, _column, cellValue) => {
|
|
|
- return this.$util.toDateString(cellValue);
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- columnKey: 'action',
|
|
|
- label: '操作',
|
|
|
- width: 230,
|
|
|
- align: 'center',
|
|
|
- resizable: false,
|
|
|
- slot: 'action',
|
|
|
- showOverflowTooltip: true,
|
|
|
- fixed: 'right'
|
|
|
- }
|
|
|
- ]
|
|
|
- };
|
|
|
- },
|
|
|
-
|
|
|
- methods: {
|
|
|
- openEdit(type, row,index) {
|
|
|
- this.$refs.addFollowDialogRef.open(type, row, this.form.linkList,index);
|
|
|
- this.$refs.addFollowDialogRef.$refs.form &&
|
|
|
- this.$refs.addFollowDialogRef.$refs.form.clearValidate();
|
|
|
- },
|
|
|
+ import AddFollowDialog from './addFollowDialog.vue';
|
|
|
+ import { contactUpdate } from '@/api/saleManage/contact';
|
|
|
+
|
|
|
+ import { contactDetail } from '@/api/saleManage/contact';
|
|
|
|
|
|
- async init(row) {
|
|
|
- this.form = row;
|
|
|
- this.list = row.base.opportunityFollowupList;
|
|
|
+ export default {
|
|
|
+ components: {
|
|
|
+ AddFollowDialog
|
|
|
},
|
|
|
- handleBankDel(row, index) {
|
|
|
- this.list.splice(index, 1);
|
|
|
- // this.save();
|
|
|
+
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ key: '',
|
|
|
+ list: [],
|
|
|
+ form: {},
|
|
|
+ delVisible: false,
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ columnKey: 'index',
|
|
|
+ label: '序号',
|
|
|
+ type: 'index',
|
|
|
+ width: 55,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'content',
|
|
|
+ label: '跟进内容',
|
|
|
+ slot: 'content',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 200
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'stageName',
|
|
|
+ label: '跟进阶段',
|
|
|
+ slot: 'stageName',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'agreement',
|
|
|
+ label: '达成共识',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'linkName',
|
|
|
+ label: '客户联系人名称',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'nextPlan',
|
|
|
+ label: '下一步计划',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'followupTime',
|
|
|
+ label: '跟进时间',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110,
|
|
|
+ formatter: (_row, _column, cellValue) => {
|
|
|
+ return this.$util.toDateString(cellValue);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'createTime',
|
|
|
+ label: '创建时间',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110,
|
|
|
+ formatter: (_row, _column, cellValue) => {
|
|
|
+ return this.$util.toDateString(cellValue);
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ columnKey: 'action',
|
|
|
+ label: '操作',
|
|
|
+ width: 230,
|
|
|
+ align: 'center',
|
|
|
+ resizable: false,
|
|
|
+ slot: 'action',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ fixed: 'right'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
},
|
|
|
- done({data,type,index}) {
|
|
|
- data.linkId=data.linkId.toString()
|
|
|
- if(type=='add'){
|
|
|
- this.list.unshift(data);
|
|
|
- }else{
|
|
|
- this.$set(this.list,index,data)
|
|
|
+
|
|
|
+ methods: {
|
|
|
+ openEdit(type, row, index) {
|
|
|
+ this.$refs.addFollowDialogRef.open(
|
|
|
+ type,
|
|
|
+ row,
|
|
|
+ this.form.linkList,
|
|
|
+ index
|
|
|
+ );
|
|
|
+ this.$refs.addFollowDialogRef.$refs.form &&
|
|
|
+ this.$refs.addFollowDialogRef.$refs.form.clearValidate();
|
|
|
+ },
|
|
|
+
|
|
|
+ async init(row) {
|
|
|
+ this.form = row;
|
|
|
+ this.list = row.base.opportunityFollowupList;
|
|
|
+ },
|
|
|
+ handleBankDel(row, index) {
|
|
|
+ this.list.splice(index, 1);
|
|
|
+ // 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);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ 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;
|
|
|
+ });
|
|
|
}
|
|
|
- },
|
|
|
- save() {
|
|
|
- this.form.base.opportunityFollowupList = this.list
|
|
|
- contactUpdate(this.form)
|
|
|
- .then((res) => {
|
|
|
- this.$message.success('修改成功');
|
|
|
- this.$emit('success')
|
|
|
- })
|
|
|
- .catch((e) => {
|
|
|
- //this.loading = false;
|
|
|
- });
|
|
|
}
|
|
|
- }
|
|
|
-};
|
|
|
+ };
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-.tree_col {
|
|
|
- border: 1px solid #eee;
|
|
|
- padding: 10px 0;
|
|
|
- box-sizing: border-box;
|
|
|
- height: 500px;
|
|
|
- overflow: auto;
|
|
|
-}
|
|
|
-
|
|
|
-.table_col {
|
|
|
- padding-left: 10px;
|
|
|
-
|
|
|
- ::v-deep .el-table th.el-table__cell {
|
|
|
- background: #f2f2f2;
|
|
|
+ .tree_col {
|
|
|
+ border: 1px solid #eee;
|
|
|
+ padding: 10px 0;
|
|
|
+ box-sizing: border-box;
|
|
|
+ height: 500px;
|
|
|
+ overflow: auto;
|
|
|
}
|
|
|
-}
|
|
|
|
|
|
-.pagination {
|
|
|
- text-align: right;
|
|
|
- padding: 10px 0;
|
|
|
-}
|
|
|
+ .table_col {
|
|
|
+ padding-left: 10px;
|
|
|
|
|
|
-.btns {
|
|
|
- text-align: center;
|
|
|
- padding: 10px 0;
|
|
|
-}
|
|
|
+ ::v-deep .el-table th.el-table__cell {
|
|
|
+ background: #f2f2f2;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
-.topsearch {
|
|
|
- margin-bottom: 15px;
|
|
|
-}
|
|
|
+ .pagination {
|
|
|
+ text-align: right;
|
|
|
+ padding: 10px 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .btns {
|
|
|
+ text-align: center;
|
|
|
+ padding: 10px 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .topsearch {
|
|
|
+ margin-bottom: 15px;
|
|
|
+ }
|
|
|
</style>
|