1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<template>
<el-dialog
center
:title="$t('修改跟进状态')"
:visible="show"
@close="customerFollowUpdateStatusClose"
width="30%">
<div style="width: 100%;min-height: 60px;text-align: center">
<el-form label-width="120px">
<el-col :span="20">
<el-form-item :label="$t('跟进状态')">
<el-select v-model="status" :placeholder="$t('请选择')" size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_FOLLOWUP_STATUS)" :key="dict.value"
:label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)"/>
</el-select>
</el-form-item>
</el-col>
</el-form>
<!-- <el-select clearable v-model="status" :placeholder="$t('请选择')" size="small" >-->
<!-- <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_FOLLOWUP_STATUS)" :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value" />-->
<!-- </el-select>-->
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="$emit('update:show',false)">{{ $t('取 消') }}</el-button>
<el-button type="primary" @click="submit">{{ $t('确 定') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import {DICT_TYPE, getDictDatas, getDictDatas2} from "@/utils/dict";
import {getCustomerFollowupList, updateCustomerFollowupStatus} from "@/api/ecw/customerFollow";
export default {
name: "customerFollowUpdateStatus",
props: {
show: {
type: Boolean,
default: false
},
followupIds: [Array, String],
tableName: String
},
computed: {
isChinese() {
return this.$i18n.locale === "zh_CN"
},
getFollowupIds() {
console.log(this.followupIds, 'this.followupIds')
if (this.followupIds instanceof Array) return this.followupIds
else return this.followupIds.split(',')
}
},
data() {
return {
getDictDatas,
getDictDatas2,
DICT_TYPE,
status: null
}
},
methods: {
submit() {
if (this.status == null || this.status == undefined) {
return this.$message.warning(this.$t('请选择修改的状态!'));
}
console.log(this.followupIds, 'this.followupIds')
updateCustomerFollowupStatus({
ids: this.getFollowupIds,
status: this.status
}).then(r => {
if (r.code === 0) {
this.$message.success(this.$t('修改成功!'))
this.$emit("refresh")
this.customerFollowUpdateStatusClose()
}
})
},
customerFollowUpdateStatusClose() {
this.status = null;
this.$emit('update:show', false)
},
}
}
</script>
<style scoped>
</style>