|
|
@@ -17,8 +17,14 @@
|
|
|
<span v-if="infoData.isClose == -1">未跟进</span>
|
|
|
</div>
|
|
|
<!-- 转交 -->
|
|
|
- <!-- v-if="infoData.customerClueStatus == 0 && postName && postName == '区域家装销售负责人'" -->
|
|
|
- <van-button type="info" size="small" plain class="centerBtn" @click="showPicker = true">
|
|
|
+ <!-- -->
|
|
|
+ <van-button
|
|
|
+ v-if="infoData.customerClueStatus == 0 && postName && postName == '区域家装销售负责人'"
|
|
|
+ type="info"
|
|
|
+ size="small"
|
|
|
+ plain
|
|
|
+ class="centerBtn"
|
|
|
+ @click="showPicker = true">
|
|
|
转交下属
|
|
|
</van-button>
|
|
|
</assignAwaitDetail>
|
|
|
@@ -45,12 +51,9 @@
|
|
|
<!-- 跟进任务填写 -->
|
|
|
<div class="assign">
|
|
|
<div class="followUp required">跟进结果</div>
|
|
|
- <!-- <div
|
|
|
- class="taskGather"
|
|
|
- v-if="taskGather && taskGather.customerClueItemList.customerClueOptionList">
|
|
|
- <radioGroup
|
|
|
- :clueOptionList="taskGather.customerClueItemList.customerClueOptionList"></radioGroup>
|
|
|
- </div> -->
|
|
|
+ <div class="taskGather" v-if="taskGather && taskGather">
|
|
|
+ <radioGroup :clueOptionList="taskGather"></radioGroup>
|
|
|
+ </div>
|
|
|
<div v-if="infoData.isClose != 1" class="tc" style="padding: 0 16px">
|
|
|
<van-button class="submitBtn" block type="info" color="#0057ba" @click="onSubmit">
|
|
|
提交
|
|
|
@@ -87,6 +90,7 @@ import {
|
|
|
selectCustomerClueInfoById,
|
|
|
selectSubUserList,
|
|
|
allocationSubCustomer,
|
|
|
+ insertFollowCustomerClueAnswer,
|
|
|
} from '@/api/assignAwait';
|
|
|
import { mapState } from 'vuex';
|
|
|
import radioGroup from './radioGroup';
|
|
|
@@ -154,7 +158,8 @@ export default {
|
|
|
getSelectCustomerClueInfoById() {
|
|
|
selectCustomerClueInfoById({ customerClueInfoId: this.id }).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
- this.taskGather = res.data;
|
|
|
+ // res.data.customerClue.searchValue.customerClueItemList
|
|
|
+ this.taskGather = res.data.customerClue.customerClueItemList;
|
|
|
} else {
|
|
|
this.$toast(res.msg);
|
|
|
}
|
|
|
@@ -189,18 +194,44 @@ export default {
|
|
|
this.showView = true;
|
|
|
},
|
|
|
onSubmit() {
|
|
|
- // allocationCustomer({
|
|
|
- // userId: this.assignUserItem.userId || '', // string 用户ID
|
|
|
- // customerClueInfoId: this.id, // string 客资主键ID
|
|
|
- // customerClassify: this.activaAssignTypeItem.dictValue || '', // string 客资类型,(取值页面字典选择的值 jz_customer_type)
|
|
|
- // }).then((res) => {
|
|
|
- // if (res.code == 200) {
|
|
|
- // this.$toast(res.msg);
|
|
|
- // this.onClickLeft();
|
|
|
- // } else {
|
|
|
- // this.$toast(res.msg);
|
|
|
- // }
|
|
|
- // });
|
|
|
+ // 没有选择跟进记录
|
|
|
+ if (!this.taskGather[0].searchValue) {
|
|
|
+ this.$toast('请选择跟进结果');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let customerClueItemList = [];
|
|
|
+ // 每一个层级都是一道题的题目,子级就是题,被选中和填写的题要带上题目一块上传(题的同级也要上传)
|
|
|
+ // 第一级题目下的题默认都要上传
|
|
|
+ this.copyData(this.taskGather);
|
|
|
+ // 过滤最外层题目
|
|
|
+ let topOptionList = this.taskGather[0].customerClueOptionList.find(
|
|
|
+ (val) => val.customerClueOptionId == this.taskGather[0].searchValue
|
|
|
+ );
|
|
|
+ // console.log(topOptionList);
|
|
|
+ // insertFollowCustomerClueAnswer({ customerClueItemList: [this.taskGather] }).then((res) => {
|
|
|
+ // if (res.code == 200) {
|
|
|
+ // this.$toast(res.msg);
|
|
|
+ // } else {
|
|
|
+ // this.$toast(res.msg);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ },
|
|
|
+ copyData(data) {
|
|
|
+ for (let i = 0; i < data.length; i++) {
|
|
|
+ console.log(data[i]);
|
|
|
+ // numbersCopy = [];
|
|
|
+ // const target = Array.isArray(source) ? [] : {};
|
|
|
+ // for (const key in data[0]) {
|
|
|
+ // if (Object.prototype.hasOwnProperty.call(data[0], key)) {
|
|
|
+ // if (typeof data[0][key] === 'object' && data[0][key] !== null) {
|
|
|
+ // target[key] = deepClone(data[0][key]);
|
|
|
+ // } else {
|
|
|
+ // target[key] = data[0][key];
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // return target;
|
|
|
+ }
|
|
|
},
|
|
|
// 校验错误返回信息
|
|
|
onFailed(errorInfo) {
|