|
|
@@ -50,152 +50,9 @@
|
|
|
</van-cell-group>
|
|
|
<!-- 批量采购 -->
|
|
|
<template v-if="infoData && infoData.isClose != 1">
|
|
|
- <template v-if="infoData.cid == 5">
|
|
|
- <div class="taskGather" v-if="taskGather">
|
|
|
- <radioGroup :clueOptionList="taskGather"></radioGroup>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <div class="container" style="width: 94%; margin: 0px auto; border-radius: 6px">
|
|
|
- <van-form ref="form">
|
|
|
- <div v-for="(item, index) in collectionItemList" :key="index">
|
|
|
- <div v-if="item.answerType == 'sz' && totalMoneyFlag" class="formLabel z-cell">
|
|
|
- <van-cell>
|
|
|
- <template #title>
|
|
|
- <span class="van-f-red">*</span>{{ item.customerClueName }}
|
|
|
- <!-- <span style="font-size: 12px; color: #888">{{ item.remark }}</span> -->
|
|
|
- </template>
|
|
|
- </van-cell>
|
|
|
- <van-field
|
|
|
- class="fieldNumber"
|
|
|
- v-model="item.answerValue"
|
|
|
- :placeholder="item.remark"
|
|
|
- type="number"
|
|
|
- @input="numberFn(item, index)"></van-field>
|
|
|
- </div>
|
|
|
- <div v-if="item.answerType == 'rq'" class="formLabel z-cell">
|
|
|
- <van-cell>
|
|
|
- <template #title>
|
|
|
- <span v-if="item.isMust == 0" class="van-f-red">*</span
|
|
|
- >{{ item.customerClueName
|
|
|
- }}<span style="font-size: 14px; color: #ccc">{{ item.remark }}</span>
|
|
|
- </template>
|
|
|
- </van-cell>
|
|
|
- <van-field
|
|
|
- v-model="item.answerValue"
|
|
|
- clickable
|
|
|
- name="calendar"
|
|
|
- placeholder="点击选择日期"
|
|
|
- readonly
|
|
|
- @click="showCalendarClick(index)" />
|
|
|
- <p
|
|
|
- style="
|
|
|
- color: #444;
|
|
|
- font-size: 12px;
|
|
|
- margin: 0;
|
|
|
- padding: 10px 0;
|
|
|
- text-align: right;
|
|
|
- "></p>
|
|
|
- </div>
|
|
|
- <div v-if="item.answerType == 'zp'" class="formLabel z-cell">
|
|
|
- <van-cell>
|
|
|
- <template #title>
|
|
|
- <span v-if="item.isMust == 0" class="van-f-red">*</span
|
|
|
- >{{ item.customerClueName }}
|
|
|
- </template>
|
|
|
- </van-cell>
|
|
|
- <van-row gutter="10" style="margin-bottom: 10px">
|
|
|
- <p style="margin-top: 0">
|
|
|
- <span style="font-size: 12px; color: #888">{{ item.remark }}</span>
|
|
|
- </p>
|
|
|
- <delete-upload-img :imgs="item.fileInfoList"></delete-upload-img>
|
|
|
- <upload-img
|
|
|
- :uploadid="uploadid2"
|
|
|
- @newimgarr="newimgarr1"
|
|
|
- imgText="上传照片"
|
|
|
- :indexImg="index"
|
|
|
- :customId="item.customerClueId"
|
|
|
- :summaryId="item.customerClueItemId"
|
|
|
- @click="imgClick(item, index)"></upload-img>
|
|
|
- </van-row>
|
|
|
- </div>
|
|
|
- <div v-if="item.answerType == 'wb' && showv" class="formLabel z-cell formLabeltext">
|
|
|
- <van-cell>
|
|
|
- <template #title>
|
|
|
- <span class="van-f-red" v-if="requ">*</span>{{ item.customerClueName }}
|
|
|
- </template>
|
|
|
- </van-cell>
|
|
|
- <van-field
|
|
|
- v-model="item.answerValue"
|
|
|
- :formatter="formatter"
|
|
|
- :placeholder="item.remark"
|
|
|
- rows="1"
|
|
|
- autosize
|
|
|
- type="textarea"></van-field>
|
|
|
- <!-- <p style="color: #444;font-size: 12px;margin: 0;padding:10px 0;text-align: right">{{ item.remark }}</p>-->
|
|
|
- </div>
|
|
|
- <div
|
|
|
- v-if="item.answerType == 'wb' && showvnum"
|
|
|
- class="formLabel z-cell formLabeltext">
|
|
|
- <van-cell>
|
|
|
- <template #title>
|
|
|
- <span class="van-f-red" v-if="requ">*</span>{{ item.customerClueName }}
|
|
|
- </template>
|
|
|
- </van-cell>
|
|
|
- <van-field
|
|
|
- type="digit"
|
|
|
- v-model="item.answerValue"
|
|
|
- maxlength="10"
|
|
|
- :formatter="formatter"
|
|
|
- :placeholder="item.remark"></van-field>
|
|
|
- <!-- <p style="color: #444;font-size: 12px;margin: 0;padding:10px 0;text-align: right">{{ item.remark }}</p>-->
|
|
|
- </div>
|
|
|
- <div v-if="item.answerType == 'duox'" class="formLabel z-cell">
|
|
|
- <van-cell>
|
|
|
- <template #title>
|
|
|
- <span v-if="item.isMust == 0" class="van-f-red">*</span
|
|
|
- >{{ item.customerClueName }}
|
|
|
- </template>
|
|
|
- </van-cell>
|
|
|
- <z-checkbox
|
|
|
- :answerType="item.answerType"
|
|
|
- :checkboxval="item.answerValue"
|
|
|
- :collectionType="item.customOptionList"
|
|
|
- :textc="item.customerClueId"
|
|
|
- :zCheckboxcolumns="item.customerClueOptionList"
|
|
|
- @zSelectVal="zSelectVal"></z-checkbox>
|
|
|
- </div>
|
|
|
- <div v-if="item.answerType == 'dx'" class="formLabel z-cell">
|
|
|
- <van-cell>
|
|
|
- <template #title>
|
|
|
- <span v-if="item.isMust == 0" class="van-f-red">*</span
|
|
|
- >{{ item.customerClueName }}
|
|
|
- </template>
|
|
|
- </van-cell>
|
|
|
- <van-field>
|
|
|
- <template #input>
|
|
|
- <z-radio
|
|
|
- :answerType="item.answerType"
|
|
|
- :collectionType="item.collectionType"
|
|
|
- :radio="item.answerValue"
|
|
|
- :textc="item.customerClueId"
|
|
|
- :Tindex="index"
|
|
|
- :zRadiocolumns="item.customerClueOptionList"
|
|
|
- @zSelectVal="zSelectVal"></z-radio>
|
|
|
- </template>
|
|
|
- </van-field>
|
|
|
- </div>
|
|
|
- <br />
|
|
|
- </div>
|
|
|
- <div style="height: auto" v-if="tipSHow">
|
|
|
- <p style="color: orange; margin: 6px 16px; font-size: 14px">
|
|
|
- <van-icon name="info-o" /> {{ tipText }}
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- <br />
|
|
|
- </van-form>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
+ <div class="taskGather" v-if="taskGather">
|
|
|
+ <radioGroup :clueOptionList="taskGather"></radioGroup>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<br />
|
|
|
<div v-if="infoData && infoData.isClose != 1" class="tc" style="padding: 0 16px">
|
|
|
@@ -900,108 +757,12 @@ export default {
|
|
|
},
|
|
|
onLoad() {},
|
|
|
onSubmit() {
|
|
|
- if (this.infoData.cid == '5') {
|
|
|
- // Mixins
|
|
|
- this.purchaseSubmit((data) => {
|
|
|
- var form = {
|
|
|
- isClose: this.infoData.isClose,
|
|
|
- followUpResult: this.infoData.followUpResult,
|
|
|
- customerClueItemList: data.customerClueItemList,
|
|
|
- };
|
|
|
- this.toastLoading(0, '加载中...', true);
|
|
|
- insertCustomerClueAnswer(form).then((res) => {
|
|
|
- this.toastLoading().clear();
|
|
|
- if (res.code == 200) {
|
|
|
- if (this.$route.query.token != undefined) {
|
|
|
- window.location.replace(window.location.origin + '/mobile/clew');
|
|
|
- } else {
|
|
|
- store.dispatch('setRefreshClewPage', true);
|
|
|
- // 返回上一页不会刷新页面
|
|
|
- this.$router.go(-1);
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.$toast(res.msg);
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- } else {
|
|
|
- for (var c = 0; c < this.collectionAnswerlisd.length; c++) {
|
|
|
- for (var b = 0; b < this.collectionItemList.length; b++) {
|
|
|
- if (this.collectionAnswerlisd[c].id == this.collectionItemList[b].customId) {
|
|
|
- this.collectionItemList[b].customOptionList = this.collectionAnswerlisd[c].value;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- for (var i = 0; i < this.collectionItemList.length; i++) {
|
|
|
- this.collectionItemList[i].customerClueInfoId = this.infoData.customerClueInfoId;
|
|
|
- }
|
|
|
- if (
|
|
|
- this.collectionItemList[0].customerClueOptionList[1].value == 'N' &&
|
|
|
- this.collectionItemList[0].customerClueOptionList[0].value == 'N'
|
|
|
- ) {
|
|
|
- this.$toast('请选择回访电话是否接通');
|
|
|
- return;
|
|
|
- }
|
|
|
- var show = false;
|
|
|
- var textshow = false;
|
|
|
- for (var i1 = 0; i1 < this.collectionItemList[1].customerClueOptionList.length; i1++) {
|
|
|
- if (this.collectionItemList[1].customerClueOptionList[i1].value == 'Y') {
|
|
|
- show = true;
|
|
|
- if (
|
|
|
- this.collectionItemList[1].customerClueOptionList[i1].customerClueOption.indexOf(
|
|
|
- '跟进中'
|
|
|
- ) == -1
|
|
|
- ) {
|
|
|
- if (this.collectionItemList[2].answerValue.trim() == '') {
|
|
|
- textshow = true;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- if (!show) {
|
|
|
- this.$toast('请选择跟进结果');
|
|
|
- return;
|
|
|
- }
|
|
|
- if (
|
|
|
- this.collectionItemList[0].customerClueOptionList[1].value == 'Y' &&
|
|
|
- this.collectionItemList[1].customerClueOptionList[1].value == 'N' &&
|
|
|
- this.collectionItemList[1].customerClueOptionList[0].value == 'N'
|
|
|
- ) {
|
|
|
- this.$toast('当您的回访电话未接通,跟进结果请选择 “跟进中”或者“没有意向”');
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- if (textshow) {
|
|
|
- if (
|
|
|
- this.collectionItemList[1].customerClueOptionList[2].value == 'Y' ||
|
|
|
- this.collectionItemList[1].customerClueOptionList[3].value == 'Y'
|
|
|
- ) {
|
|
|
- this.$toast('请输入10位' + this.collectionItemList[2].customerClueName);
|
|
|
- } else {
|
|
|
- this.$toast('请输入' + this.collectionItemList[2].customerClueName);
|
|
|
- }
|
|
|
- return;
|
|
|
- }
|
|
|
- if (this.showvnum) {
|
|
|
- if (this.collectionItemList[2].answerValue.trim().length < 10) {
|
|
|
- this.$toast('请输入10位' + this.collectionItemList[2].customerClueName);
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- // 出货总金额必填校验
|
|
|
- if (this.totalMoneyFlag) {
|
|
|
- let obj = this.collectionItemList.find(
|
|
|
- (item) => item.customerClueName == '出货总金额' && item.answerType == 'sz'
|
|
|
- );
|
|
|
- if (!obj.answerValue) {
|
|
|
- this.$toast('请输入' + obj.customerClueName);
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
+ // Mixins
|
|
|
+ this.purchaseSubmit((data) => {
|
|
|
var form = {
|
|
|
- isClose: this.isClose,
|
|
|
- followUpResult: this.followUpResult,
|
|
|
- customerClueItemList: this.collectionItemList,
|
|
|
+ isClose: this.infoData.isClose,
|
|
|
+ followUpResult: this.infoData.followUpResult,
|
|
|
+ customerClueItemList: data.customerClueItemList,
|
|
|
};
|
|
|
this.toastLoading(0, '加载中...', true);
|
|
|
insertCustomerClueAnswer(form).then((res) => {
|
|
|
@@ -1018,7 +779,7 @@ export default {
|
|
|
this.$toast(res.msg);
|
|
|
}
|
|
|
});
|
|
|
- }
|
|
|
+ });
|
|
|
},
|
|
|
getThreeDaysAgo() {
|
|
|
let myDate = new Date();
|