|
|
@@ -10,6 +10,23 @@
|
|
|
<div class="lineGrey"></div>
|
|
|
<!-- 客诉详情 -->
|
|
|
<infoDetail v-if="infoData" :infoData="infoData" :customerClassify="customerClassifyOption">
|
|
|
+ <van-button
|
|
|
+ type="info"
|
|
|
+ v-if="infoData.customerClueStatus == 0"
|
|
|
+ style="
|
|
|
+ float: right;
|
|
|
+ background: #0057ba;
|
|
|
+ border-color: #0057ba;
|
|
|
+ color: #fff;
|
|
|
+ margin-top: -36px;
|
|
|
+ border-radius: 5px;
|
|
|
+ "
|
|
|
+ size="small"
|
|
|
+ plain
|
|
|
+ class="centerBtn"
|
|
|
+ @click="onstopVisit"
|
|
|
+ >转交其他组织</van-button
|
|
|
+ >
|
|
|
</infoDetail>
|
|
|
<!-- 客诉记录 -->
|
|
|
<complaintLog
|
|
|
@@ -36,6 +53,7 @@
|
|
|
</van-cell>
|
|
|
</div>
|
|
|
</van-cell-group>
|
|
|
+ <p v-if="infoData && infoData.isClose == 1" style="padding: 10px 0"></p>
|
|
|
<!-- 跟进任务填写 -->
|
|
|
<div class="assign" v-if="infoData && infoData.isClose != 1">
|
|
|
<!-- <div class="assign"> -->
|
|
|
@@ -72,6 +90,37 @@
|
|
|
</van-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <van-dialog v-model="show" title="转发客资" show-cancel-button :before-close="confirm">
|
|
|
+ <p>
|
|
|
+ <van-notice-bar wrapable :scrollable="false" text="一旦转交出去,则无法再查看,请确认!" />
|
|
|
+ </p>
|
|
|
+ <van-row class="serchInput">
|
|
|
+ <van-col span="24">
|
|
|
+ <van-cell
|
|
|
+ class="monthNow selectcell"
|
|
|
+ :title="companyName"
|
|
|
+ is-link
|
|
|
+ arrow-direction="down"
|
|
|
+ @click="regionClick" />
|
|
|
+ </van-col>
|
|
|
+ <van-col span="24">
|
|
|
+ <van-cell
|
|
|
+ class="monthNow selectcell"
|
|
|
+ :title="regionName"
|
|
|
+ is-link
|
|
|
+ @click="SalesRegionClick"
|
|
|
+ arrow-direction="down" />
|
|
|
+ </van-col>
|
|
|
+ <van-col span="24">
|
|
|
+ <van-cell
|
|
|
+ class="monthNow selectcell"
|
|
|
+ :title="deptName"
|
|
|
+ is-link
|
|
|
+ @click="SalesDepartmentClick"
|
|
|
+ arrow-direction="down" />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ </van-dialog>
|
|
|
<!-- 客诉跟进历史 -->
|
|
|
<van-dialog
|
|
|
v-model="showView"
|
|
|
@@ -98,6 +147,30 @@
|
|
|
@confirm="onConfirm2"
|
|
|
@cancel="showPicker2 = false" />
|
|
|
</van-popup>
|
|
|
+ <van-popup v-model="RegionShow" capture position="bottom">
|
|
|
+ <van-picker
|
|
|
+ :columns="companyList"
|
|
|
+ show-toolbar
|
|
|
+ value-key="deptName"
|
|
|
+ @cancel="RegionShow = false"
|
|
|
+ @confirm="onregionConfirm" />
|
|
|
+ </van-popup>
|
|
|
+ <van-popup v-model="SalesRegionShow" capture position="bottom">
|
|
|
+ <van-picker
|
|
|
+ :columns="regionList"
|
|
|
+ show-toolbar
|
|
|
+ value-key="deptName"
|
|
|
+ @cancel="SalesRegionShow = false"
|
|
|
+ @confirm="onSalesRegionConfirm" />
|
|
|
+ </van-popup>
|
|
|
+ <van-popup v-model="SalesDepartmentShow" capture position="bottom">
|
|
|
+ <van-picker
|
|
|
+ :columns="deptList"
|
|
|
+ show-toolbar
|
|
|
+ value-key="deptName"
|
|
|
+ @cancel="SalesDepartmentShow = false"
|
|
|
+ @confirm="onSalesDepartmentConfirm" />
|
|
|
+ </van-popup>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -105,6 +178,8 @@
|
|
|
import {
|
|
|
getComplaintCustomerClueInfoById,
|
|
|
insertCustomerClueAnswerKs,
|
|
|
+ customerClassify,
|
|
|
+ customerSubClassify,
|
|
|
} from '@/api/complaintDetail';
|
|
|
import infoDetail from './infoDetail.vue';
|
|
|
import complaintLog from './complaintLog.vue';
|
|
|
@@ -112,6 +187,7 @@ import { mapState } from 'vuex';
|
|
|
import radioGroup from './radioGroup';
|
|
|
import followUpHistory from './followUpHistory';
|
|
|
import { getDictOption } from '@/api/index';
|
|
|
+import { updateCustomerClueDept, getDeptInfo } from '@/api/clew';
|
|
|
|
|
|
export default {
|
|
|
name: 'complaintDetail',
|
|
|
@@ -145,17 +221,32 @@ export default {
|
|
|
showPicker2: false,
|
|
|
customerClassifyOption: [],
|
|
|
customerSubClassifyOption: [],
|
|
|
+ deptCode: '',
|
|
|
+ regionList: [],
|
|
|
+ deptList: [],
|
|
|
+ companyName: '',
|
|
|
+ companyCode: '',
|
|
|
+ regionName: '',
|
|
|
+ regionCode: '',
|
|
|
+ deptName: '',
|
|
|
+ show: false,
|
|
|
+ RegionShow: false,
|
|
|
+ SalesRegionShow: false,
|
|
|
+ SalesDepartmentShow: false,
|
|
|
+ companyList: [],
|
|
|
+ deptForm: { type: '', parentId: '' },
|
|
|
};
|
|
|
},
|
|
|
watch: {},
|
|
|
activated() {
|
|
|
this.id = this.$route.query.id;
|
|
|
this.postName = localStorage.getItem('postName');
|
|
|
+ this.getDeptInfo();
|
|
|
this.getComplaintCustomerClueInfoByIdFun();
|
|
|
},
|
|
|
methods: {
|
|
|
async getCustomerClassify() {
|
|
|
- let option = await getDictOption({}, 'customer_classify');
|
|
|
+ let option = await customerClassify();
|
|
|
this.customerClassifyOption = option.data || [];
|
|
|
// 来电分类一
|
|
|
let item = this.customerClassifyOption.find(
|
|
|
@@ -163,14 +254,16 @@ export default {
|
|
|
);
|
|
|
this.customerClassifyValue = item.dictLabel || '';
|
|
|
this.customerClassify = item.dictValue;
|
|
|
+ this.getCustomerSubClassify(this.customerClassify);
|
|
|
},
|
|
|
- async getCustomerSubClassify() {
|
|
|
- let option = await getDictOption({}, 'customer_sub_classify');
|
|
|
+ async getCustomerSubClassify(parentId) {
|
|
|
+ let option = await customerSubClassify({ parentId: parentId });
|
|
|
this.customerSubClassifyOption = option.data || [];
|
|
|
// 来电分类二
|
|
|
let item = this.customerSubClassifyOption.find(
|
|
|
(val) => val.dictValue == this.infoData.customerSubClassify
|
|
|
);
|
|
|
+ item = item || this.customerSubClassifyOption[0];
|
|
|
this.customerSubClassifyValue = item.dictLabel || '';
|
|
|
this.customerSubClassify = item.dictValue;
|
|
|
},
|
|
|
@@ -187,7 +280,6 @@ export default {
|
|
|
this.taskGather = response.data.customerClue.customerClueItemList;
|
|
|
}
|
|
|
this.getCustomerClassify();
|
|
|
- this.getCustomerSubClassify();
|
|
|
} else {
|
|
|
this.$toast(res.msg);
|
|
|
}
|
|
|
@@ -307,12 +399,115 @@ export default {
|
|
|
this.customerClassifyValue = value.dictLabel;
|
|
|
this.customerClassify = value.dictValue;
|
|
|
this.showPicker1 = false;
|
|
|
+ this.getCustomerSubClassify(this.customerClassify);
|
|
|
},
|
|
|
onConfirm2(value) {
|
|
|
this.customerSubClassifyValue = value.dictLabel;
|
|
|
this.customerSubClassify = value.dictValue;
|
|
|
this.showPicker2 = false;
|
|
|
},
|
|
|
+ onstopVisit() {
|
|
|
+ this.deptCode = '';
|
|
|
+ this.regionList = [];
|
|
|
+ this.deptList = [];
|
|
|
+ this.companyName = '请选择公司';
|
|
|
+ this.companyCode = '';
|
|
|
+ this.regionName = '请选择大区';
|
|
|
+ this.regionCode = '';
|
|
|
+ this.deptName = '请选择销售部';
|
|
|
+ this.show = true;
|
|
|
+ },
|
|
|
+ confirm(action, done) {
|
|
|
+ if (action === 'confirm') {
|
|
|
+ if (this.deptCode != '') {
|
|
|
+ updateCustomerClueDept({
|
|
|
+ customerClueInfoId: this.$route.query.id,
|
|
|
+ deptId: this.deptCode,
|
|
|
+ }).then((require) => {
|
|
|
+ if (require.code == 200) {
|
|
|
+ this.$toast.success('转发成功');
|
|
|
+ this.show = false;
|
|
|
+ if (this.$route.query.token != undefined) {
|
|
|
+ window.location.replace(window.location.origin + '/mobile/clew');
|
|
|
+ } else {
|
|
|
+ this.$router.go(-1);
|
|
|
+ }
|
|
|
+ return done(true);
|
|
|
+ } else {
|
|
|
+ this.$toast(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$toast('请选择要转发销售部');
|
|
|
+ return done(false);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return done(true);
|
|
|
+ this.show = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onregionConfirm(val) {
|
|
|
+ this.RegionShow = false;
|
|
|
+ this.companyName = val.deptName;
|
|
|
+ this.companyCode = val.deptId;
|
|
|
+ this.regionName = '请选择大区';
|
|
|
+ this.regionCode = '';
|
|
|
+ this.deptName = '请选择销售部';
|
|
|
+ this.deptCode = '';
|
|
|
+ this.getDeptInfo('dept', 1);
|
|
|
+ },
|
|
|
+ onSalesRegionConfirm(val) {
|
|
|
+ this.SalesRegionShow = false;
|
|
|
+ this.regionName = val.deptName;
|
|
|
+ this.regionCode = val.deptId;
|
|
|
+ if (val.deptId != '') {
|
|
|
+ this.getDeptInfo('dept', 2);
|
|
|
+ }
|
|
|
+ this.deptName = '全部销售部';
|
|
|
+ this.deptCode = '';
|
|
|
+ },
|
|
|
+ onSalesDepartmentConfirm(val) {
|
|
|
+ this.SalesDepartmentShow = false;
|
|
|
+ this.deptName = val.deptName;
|
|
|
+ if (val.deptId != '') {
|
|
|
+ this.deptCode = val.deptId;
|
|
|
+ this.getDeptInfo('user');
|
|
|
+ }
|
|
|
+ this.userName = '全部业务员';
|
|
|
+ this.userCode = '';
|
|
|
+ },
|
|
|
+ getDeptInfo(type, grade) {
|
|
|
+ this.deptForm.type = type;
|
|
|
+ if (grade == '1') {
|
|
|
+ this.deptForm.parentId = this.companyCode;
|
|
|
+ } else if (grade == '2') {
|
|
|
+ this.deptForm.parentId = this.regionCode;
|
|
|
+ } else {
|
|
|
+ this.deptForm.type = '';
|
|
|
+ this.deptForm.parentId = '';
|
|
|
+ }
|
|
|
+ getDeptInfo(this.deptForm).then((res) => {
|
|
|
+ res.data.forEach((item) => {
|
|
|
+ delete item.children;
|
|
|
+ });
|
|
|
+ if (grade == '1') {
|
|
|
+ this.regionList = res.data;
|
|
|
+ } else if (grade == '2') {
|
|
|
+ this.deptList = res.data;
|
|
|
+ } else {
|
|
|
+ this.companyList = res.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ regionClick() {
|
|
|
+ this.RegionShow = true;
|
|
|
+ },
|
|
|
+ SalesRegionClick(val) {
|
|
|
+ this.SalesRegionShow = true;
|
|
|
+ },
|
|
|
+ SalesDepartmentClick() {
|
|
|
+ this.SalesDepartmentShow = true;
|
|
|
+ },
|
|
|
onClickLeft() {
|
|
|
this.$router.go(-1);
|
|
|
},
|
|
|
@@ -333,6 +528,7 @@ export default {
|
|
|
}
|
|
|
.taskGather {
|
|
|
padding-left: 20px;
|
|
|
+ padding-bottom: 20px;
|
|
|
.title {
|
|
|
font-size: 15px;
|
|
|
font-weight: 600;
|