|
|
@@ -9,7 +9,8 @@
|
|
|
<div class="lineGrey"></div>
|
|
|
<div class="lineGrey"></div>
|
|
|
<!-- 客诉详情 -->
|
|
|
- <infoDetail :infoData="infoData" v-if="infoData"> </infoDetail>
|
|
|
+ <infoDetail v-if="infoData" :infoData="infoData" :customerClassify="customerClassifyOption">
|
|
|
+ </infoDetail>
|
|
|
<!-- 客诉记录 -->
|
|
|
<complaintLog
|
|
|
v-if="infoData && infoData.customerClueInfoComplaintList.length"
|
|
|
@@ -37,11 +38,28 @@
|
|
|
</van-cell-group>
|
|
|
<!-- 跟进任务填写 -->
|
|
|
<div class="assign" v-if="infoData && infoData.isClose != 1">
|
|
|
+ <!-- <div class="assign"> -->
|
|
|
<!-- 来电分类 -->
|
|
|
<div class="complaintType">
|
|
|
<div class="typeItem">
|
|
|
- <div class="label">来电分类一</div>
|
|
|
- <div class="value"></div>
|
|
|
+ <van-field
|
|
|
+ readonly
|
|
|
+ clickable
|
|
|
+ name="picker"
|
|
|
+ :value="customerClassifyValue"
|
|
|
+ label="来电分类一"
|
|
|
+ placeholder="点击选择来电分类一"
|
|
|
+ @click="showPicker1 = true" />
|
|
|
+ </div>
|
|
|
+ <div class="typeItem">
|
|
|
+ <van-field
|
|
|
+ readonly
|
|
|
+ clickable
|
|
|
+ name="picker"
|
|
|
+ :value="customerSubClassifyValue"
|
|
|
+ label="来电分类二"
|
|
|
+ placeholder="点击选择来电分类二"
|
|
|
+ @click="showPicker2 = true" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- <div class="followUp required">跟进结果</div> -->
|
|
|
@@ -64,17 +82,36 @@
|
|
|
class="dialogz">
|
|
|
<followUpHistory :historyId="historyId" :showView="showView"></followUpHistory>
|
|
|
</van-dialog>
|
|
|
+ <van-popup v-model="showPicker1" position="bottom">
|
|
|
+ <van-picker
|
|
|
+ show-toolbar
|
|
|
+ value-key="dictLabel"
|
|
|
+ :columns="customerClassifyOption"
|
|
|
+ @confirm="onConfirm1"
|
|
|
+ @cancel="showPicker1 = false" />
|
|
|
+ </van-popup>
|
|
|
+ <van-popup v-model="showPicker2" position="bottom">
|
|
|
+ <van-picker
|
|
|
+ show-toolbar
|
|
|
+ value-key="dictLabel"
|
|
|
+ :columns="customerSubClassifyOption"
|
|
|
+ @confirm="onConfirm2"
|
|
|
+ @cancel="showPicker2 = false" />
|
|
|
+ </van-popup>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getComplaintCustomerClueInfoById } from '@/api/complaintDetail';
|
|
|
+import {
|
|
|
+ getComplaintCustomerClueInfoById,
|
|
|
+ insertCustomerClueAnswerKs,
|
|
|
+} from '@/api/complaintDetail';
|
|
|
import infoDetail from './infoDetail.vue';
|
|
|
import complaintLog from './complaintLog.vue';
|
|
|
-import { insertFollowCustomerClueAnswer } from '@/api/assignAwait';
|
|
|
import { mapState } from 'vuex';
|
|
|
import radioGroup from './radioGroup';
|
|
|
import followUpHistory from './followUpHistory';
|
|
|
+import { getDictOption } from '@/api/index';
|
|
|
|
|
|
export default {
|
|
|
name: 'complaintDetail',
|
|
|
@@ -100,6 +137,14 @@ export default {
|
|
|
requiredMessage: '', //必填提示信息
|
|
|
showView: false,
|
|
|
historyId: '',
|
|
|
+ customerClassifyValue: '',
|
|
|
+ customerClassify: '',
|
|
|
+ customerSubClassifyValue: '',
|
|
|
+ customerSubClassify: '',
|
|
|
+ showPicker1: false,
|
|
|
+ showPicker2: false,
|
|
|
+ customerClassifyOption: [],
|
|
|
+ customerSubClassifyOption: [],
|
|
|
};
|
|
|
},
|
|
|
watch: {},
|
|
|
@@ -109,6 +154,26 @@ export default {
|
|
|
this.getComplaintCustomerClueInfoByIdFun();
|
|
|
},
|
|
|
methods: {
|
|
|
+ async getCustomerClassify() {
|
|
|
+ let option = await getDictOption({}, 'customer_classify');
|
|
|
+ this.customerClassifyOption = option.data || [];
|
|
|
+ // 来电分类一
|
|
|
+ let item = this.customerClassifyOption.find(
|
|
|
+ (val) => val.dictValue == this.infoData.customerClassify
|
|
|
+ );
|
|
|
+ this.customerClassifyValue = item.dictLabel || '';
|
|
|
+ this.customerClassify = item.dictValue;
|
|
|
+ },
|
|
|
+ async getCustomerSubClassify() {
|
|
|
+ let option = await getDictOption({}, 'customer_sub_classify');
|
|
|
+ this.customerSubClassifyOption = option.data || [];
|
|
|
+ // 来电分类二
|
|
|
+ let item = this.customerSubClassifyOption.find(
|
|
|
+ (val) => val.dictValue == this.infoData.customerSubClassify
|
|
|
+ );
|
|
|
+ this.customerSubClassifyValue = item.dictLabel || '';
|
|
|
+ this.customerSubClassify = item.dictValue;
|
|
|
+ },
|
|
|
getComplaintCustomerClueInfoByIdFun() {
|
|
|
this.toastLoading(0, '加载中...', true);
|
|
|
this.id = this.$route.query.id;
|
|
|
@@ -121,6 +186,8 @@ export default {
|
|
|
// response.data.customerClue.customerClueItemList[0].customerClueInfoId = this.id;
|
|
|
this.taskGather = response.data.customerClue.customerClueItemList;
|
|
|
}
|
|
|
+ this.getCustomerClassify();
|
|
|
+ this.getCustomerSubClassify();
|
|
|
} else {
|
|
|
this.$toast(res.msg);
|
|
|
}
|
|
|
@@ -136,15 +203,19 @@ export default {
|
|
|
let customerClueItemList = [];
|
|
|
// 每一个层级都是一道题的题目,子级就是题,被选中和填写的题要带上题目一块上传(题的同级也要上传)
|
|
|
// 第一级题目下的题默认都要上传
|
|
|
- let params = { customerClueItemList: [] };
|
|
|
+ let params = {
|
|
|
+ customerClueItemList: [],
|
|
|
+ customerClassify: this.customerClassify,
|
|
|
+ customerSubClassify: this.customerSubClassify,
|
|
|
+ };
|
|
|
params.customerClueItemList.push(...this.deepClone(this.taskGather, 0));
|
|
|
// let optionList = this.taskGather[0].customerClueOptionList;
|
|
|
this.filterOption(this.taskGather, params);
|
|
|
- console.log(params);
|
|
|
+ console.log(JSON.stringify(params));
|
|
|
// 必填验证
|
|
|
if (this.requiredFlag) {
|
|
|
this.toastLoading(0, '加载中...', true);
|
|
|
- insertFollowCustomerClueAnswer(params).then((res) => {
|
|
|
+ insertCustomerClueAnswerKs(params).then((res) => {
|
|
|
this.toastLoading().clear();
|
|
|
if (res.code == 200) {
|
|
|
this.$toast(res.msg);
|
|
|
@@ -232,6 +303,16 @@ export default {
|
|
|
this.historyId = val;
|
|
|
this.showView = true;
|
|
|
},
|
|
|
+ onConfirm1(value) {
|
|
|
+ this.customerClassifyValue = value.dictLabel;
|
|
|
+ this.customerClassify = value.dictValue;
|
|
|
+ this.showPicker1 = false;
|
|
|
+ },
|
|
|
+ onConfirm2(value) {
|
|
|
+ this.customerSubClassifyValue = value.dictLabel;
|
|
|
+ this.customerSubClassify = value.dictValue;
|
|
|
+ this.showPicker2 = false;
|
|
|
+ },
|
|
|
onClickLeft() {
|
|
|
this.$router.go(-1);
|
|
|
},
|
|
|
@@ -288,5 +369,9 @@ export default {
|
|
|
overflow-y: auto;
|
|
|
}
|
|
|
}
|
|
|
+ .van-cell {
|
|
|
+ font-size: 15px;
|
|
|
+ color: #000;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|