|
@@ -129,20 +129,21 @@
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="最新跟进结果" prop="status" class="is-required">
|
|
|
<el-radio-group v-model="formData.status">
|
|
|
- <el-radio label="ING">继续跟进</el-radio>
|
|
|
- <el-radio label="END">无需跟进</el-radio>
|
|
|
+ <el-radio :disabled="status == 'END'" label="ING">继续跟进</el-radio>
|
|
|
+ <el-radio :disabled="status == 'END'" label="END">无需跟进</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="备注" prop="remark" :rules="[{ required: true, message: `请输入备注内容`, trigger: 'blur' }]">
|
|
|
- <el-input type="textarea" :rows="3" v-model="formData.remark" placeholder="请输入"></el-input>
|
|
|
+ <el-input type="textarea" :rows="3" :disabled="status == 'END'" v-model="formData.remark" placeholder="请输入"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<div class="table">
|
|
|
+ <div>跟进记录</div><br/>
|
|
|
<el-table :data="formData.records" element-loading-text="Loading" border fit highlight-current-row stripe>
|
|
|
<el-table-column prop="status" label="跟进结果" align="center">
|
|
|
<template slot-scope="scope">
|
|
@@ -150,15 +151,15 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="remark" label="备注" align="center"></el-table-column>
|
|
|
- <el-table-column prop="updateBy" align="center" label="跟进人" ></el-table-column>
|
|
|
- <el-table-column prop="updateTime" align="center" label="跟进时间" ></el-table-column>
|
|
|
+ <el-table-column prop="createBy" align="center" label="跟进人" ></el-table-column>
|
|
|
+ <el-table-column prop="createTime" align="center" label="跟进时间" ></el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</el-card>
|
|
|
<div class="page-footer">
|
|
|
<div class="footer">
|
|
|
<el-button size="small" type="info" @click="goBack">返回</el-button>
|
|
|
- <el-button v-if="formType == 0 || formData.status == 'ING'" size="small" type="primary" @click="submit()">提交</el-button>
|
|
|
+ <el-button v-if="formType == 0 || status == 'ING'" size="small" type="primary" @click="submit()">提交</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -184,8 +185,10 @@
|
|
|
userMobile: '',
|
|
|
userMobile2: '',
|
|
|
userAddress: '',
|
|
|
-
|
|
|
+ status: '',
|
|
|
+ remark: ''
|
|
|
},
|
|
|
+ status: '',
|
|
|
companyName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
|
|
|
rules: {
|
|
|
userMobile: [
|
|
@@ -226,7 +229,11 @@
|
|
|
async getDetail(){
|
|
|
const that = this
|
|
|
getDetail({promotionActivityId: this.id}).then( async res => {
|
|
|
- Object.assign(this.formData, res.data)
|
|
|
+ Object.assign(this.formData, res.data, {
|
|
|
+ active: {id: res.data.promotionQuestionnaireId}
|
|
|
+ })
|
|
|
+ this.status = res.data.status
|
|
|
+ this.getActiveDetail(res.data.promotionQuestionnaireId,res.data.items)
|
|
|
})
|
|
|
},
|
|
|
getActiveList(){
|
|
@@ -234,19 +241,34 @@
|
|
|
this.activeList = res.data.records
|
|
|
})
|
|
|
},
|
|
|
- getActiveDetail(id){
|
|
|
+ getActiveDetail(id,items){
|
|
|
getActiveDetail({id}).then(res => {
|
|
|
res.data.promotionQuestionnaireItems.forEach(item=>{
|
|
|
item.answer = JSON.parse(item.answer)
|
|
|
- item.inputValue = '';
|
|
|
- item.answer.forEach(it => {
|
|
|
- it.active = false;
|
|
|
- })
|
|
|
+ if(items){
|
|
|
+ items.forEach(it=>{
|
|
|
+ item.answer.forEach(it1 => {
|
|
|
+ JSON.parse(it.answer).forEach(it2 => {
|
|
|
+ if(it1.option_value == it2.option_value && it2.active){
|
|
|
+ it1.active = true;
|
|
|
+ }else{
|
|
|
+ it.active = false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ item.inputValue = '';
|
|
|
+ item.answer.forEach(it => {
|
|
|
+ it.active = false;
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
this.activeItems = res.data.promotionQuestionnaireItems
|
|
|
})
|
|
|
},
|
|
|
clickOption(index, idx) {
|
|
|
+ if(this.id){return false}
|
|
|
// 单选题
|
|
|
if(this.activeItems[index].type == 1) {
|
|
|
this.activeItems[index].answer.forEach((item, ind_) => {
|
|
@@ -292,7 +314,7 @@
|
|
|
}
|
|
|
}
|
|
|
add({
|
|
|
- promotionActivityId: this.formData.promotionActivityId,
|
|
|
+ promotionQuestionnaireId: this.formData.promotionActivityId,
|
|
|
userName: this.formData.userName,
|
|
|
linkName: this.formData.linkName,
|
|
|
userMobile: this.formData.userMobile,
|
|
@@ -305,7 +327,7 @@
|
|
|
this.goBack()
|
|
|
}
|
|
|
})
|
|
|
- }else if(this.formType == 1){
|
|
|
+ }else{
|
|
|
follow({
|
|
|
ids: [this.id],
|
|
|
status: this.formData.status,
|