|
|
@@ -416,6 +416,17 @@
|
|
|
<el-table-column label="流失时间" align="center" prop="lossTime" width="100px" />
|
|
|
<el-table-column label="删除时间" align="center" prop="delTime" width="100px" />
|
|
|
<el-table-column label="注册时间" align="center" prop="registerTime" width="100px" />
|
|
|
+ <el-table-column label="首次登录App时间" align="center" prop="firstLoginAppTime" width="165px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.firstLoginAppTime">{{ parseTime(scope.row.firstLoginAppTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
+ <span v-else>未绑定</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="首次登录奖励地址" align="center" prop="firstLoginRewardAddress" width="180px" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.firstLoginRewardAddress || '-' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="备注电话号码" align="center" prop="remarkMobiles" width="150px">
|
|
|
<template slot-scope="scope">
|
|
|
<div v-for="i in JSON.parse(scope.row.remarkMobiles)" :key="i">{{i}}</div>
|
|
|
@@ -454,7 +465,7 @@
|
|
|
<el-tag v-else type="info"> 未绑定</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="修改" align="center" class-name="small-padding fixed-width" width="120px" fixed="right">
|
|
|
+ <el-table-column label="修改" align="center" class-name="small-padding fixed-width" width="200px" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
v-show="scope.row.status==0||scope.row.status==2"
|
|
|
@@ -470,6 +481,18 @@
|
|
|
icon="el-icon-user-solid"
|
|
|
@click="handleAppellation(scope.row)"
|
|
|
>修改客户称呼</el-button>
|
|
|
+ <el-tooltip :disabled="!!scope.row.fsUserId" content="未绑定小程序会员,无法修改奖励地址" placement="top">
|
|
|
+ <span class="table-action-btn-wrap">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-location-outline"
|
|
|
+ :disabled="!scope.row.fsUserId"
|
|
|
+ @click="handleFirstLoginRewardAddress(scope.row)"
|
|
|
+ v-hasPermi="['qw:externalContact:edit', 'qw:externalContact:myEdit']"
|
|
|
+ >修改奖励地址</el-button>
|
|
|
+ </span>
|
|
|
+ </el-tooltip>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120px" fixed="right">
|
|
|
@@ -997,6 +1020,31 @@
|
|
|
<el-button type="primary" @click="submitStatusForm">提 交</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ title="修改首次登录奖励地址"
|
|
|
+ :visible.sync="firstLoginRewardDialog.open"
|
|
|
+ width="600px"
|
|
|
+ append-to-body
|
|
|
+ @closed="resetFirstLoginRewardDialog"
|
|
|
+ >
|
|
|
+ <el-form ref="firstLoginRewardFormRef" :model="firstLoginRewardForm" :rules="firstLoginRewardRules" label-width="130px">
|
|
|
+ <el-form-item label="奖励地址" prop="firstLoginRewardAddress">
|
|
|
+ <el-input
|
|
|
+ v-model="firstLoginRewardForm.firstLoginRewardAddress"
|
|
|
+ type="textarea"
|
|
|
+ :rows="6"
|
|
|
+ placeholder="请输入收货/联系地址;留空并确定可清空。trim 后不超过 2000 字。"
|
|
|
+ maxlength="2000"
|
|
|
+ show-word-limit
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="firstLoginRewardDialog.open = false">取 消</el-button>
|
|
|
+ <el-button type="primary" :loading="firstLoginRewardDialog.loading" @click="submitFirstLoginRewardAddress">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -1018,7 +1066,8 @@ import {
|
|
|
setCustomerCourseSop,
|
|
|
getCustomerCourseSop,
|
|
|
setCustomerCourseSopList,
|
|
|
- syncMyExternalContact, unBindUserId, updateExternalContactCall,exportMyExternalContact,updateExternalContactStatus,getWatchLogList
|
|
|
+ syncMyExternalContact, unBindUserId, updateExternalContactCall,exportMyExternalContact,updateExternalContactStatus,getWatchLogList,
|
|
|
+ updateFirstLoginRewardAddress
|
|
|
} from '@/api/qw/externalContact'
|
|
|
import info from "@/views/qw/externalContact/info.vue";
|
|
|
import {getMyQwUserList, getMyQwCompanyList, handleInputAuthAppKey, updateUser} from "@/api/qw/user";
|
|
|
@@ -1077,6 +1126,30 @@ export default {
|
|
|
{required: true, message: '状态不能为空', trigger: 'change'}
|
|
|
]
|
|
|
},
|
|
|
+ firstLoginRewardDialog: {
|
|
|
+ open: false,
|
|
|
+ loading: false,
|
|
|
+ original: ''
|
|
|
+ },
|
|
|
+ firstLoginRewardForm: {
|
|
|
+ id: null,
|
|
|
+ firstLoginRewardAddress: ''
|
|
|
+ },
|
|
|
+ firstLoginRewardRules: {
|
|
|
+ firstLoginRewardAddress: [
|
|
|
+ {
|
|
|
+ validator(rule, value, callback) {
|
|
|
+ const t = (value || '').trim()
|
|
|
+ if (t.length > 2000) {
|
|
|
+ callback(new Error('地址去掉首尾空格后长度不能超过 2000 个字符'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
collection:{
|
|
|
titile:"信息采集",
|
|
|
open:false,
|
|
|
@@ -2066,6 +2139,65 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
+ handleFirstLoginRewardAddress(row) {
|
|
|
+ if (!row.fsUserId) {
|
|
|
+ this.msgWarning('未绑定小程序会员')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.firstLoginRewardForm.id = row.id
|
|
|
+ this.firstLoginRewardForm.firstLoginRewardAddress =
|
|
|
+ row.firstLoginRewardAddress == null ? '' : String(row.firstLoginRewardAddress)
|
|
|
+ this.firstLoginRewardDialog.original = this.firstLoginRewardForm.firstLoginRewardAddress
|
|
|
+ this.firstLoginRewardDialog.open = true
|
|
|
+ this.$nextTick(() => {
|
|
|
+ if (this.$refs.firstLoginRewardFormRef) {
|
|
|
+ this.$refs.firstLoginRewardFormRef.clearValidate()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ resetFirstLoginRewardDialog() {
|
|
|
+ this.firstLoginRewardForm.id = null
|
|
|
+ this.firstLoginRewardForm.firstLoginRewardAddress = ''
|
|
|
+ this.firstLoginRewardDialog.original = ''
|
|
|
+ this.$nextTick(() => {
|
|
|
+ if (this.$refs.firstLoginRewardFormRef) {
|
|
|
+ this.$refs.firstLoginRewardFormRef.clearValidate()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ submitFirstLoginRewardAddress() {
|
|
|
+ this.$refs.firstLoginRewardFormRef.validate(valid => {
|
|
|
+ if (!valid) return
|
|
|
+ const nextVal = (this.firstLoginRewardForm.firstLoginRewardAddress || '').trim()
|
|
|
+ const hadVal = (this.firstLoginRewardDialog.original || '').trim()
|
|
|
+ const doSubmit = () => {
|
|
|
+ this.firstLoginRewardDialog.loading = true
|
|
|
+ updateFirstLoginRewardAddress({
|
|
|
+ id: this.firstLoginRewardForm.id,
|
|
|
+ firstLoginRewardAddress: nextVal
|
|
|
+ }).then(() => {
|
|
|
+ this.msgSuccess('保存成功')
|
|
|
+ const row = this.externalContactList.find(r => r.id === this.firstLoginRewardForm.id)
|
|
|
+ if (row) {
|
|
|
+ row.firstLoginRewardAddress = nextVal || null
|
|
|
+ }
|
|
|
+ this.firstLoginRewardDialog.open = false
|
|
|
+ }).finally(() => {
|
|
|
+ this.firstLoginRewardDialog.loading = false
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (!nextVal && hadVal) {
|
|
|
+ this.$confirm('确定清空奖励地址?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => doSubmit()).catch(() => {})
|
|
|
+ } else {
|
|
|
+ doSubmit()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
handleAppellation(val){
|
|
|
this.callOpen.open=true;
|
|
|
this.callOpenFrom.stageStatus=val.stageStatus;
|
|
|
@@ -2442,6 +2574,9 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
+.table-action-btn-wrap {
|
|
|
+ display: inline-block;
|
|
|
+}
|
|
|
/* CSS 样式 */
|
|
|
.tag-container {
|
|
|
display: flex;
|