|
|
|
@ -16,6 +16,11 @@ |
|
|
|
|
<el-input v-else v-model="row.wxGroup" size="small" clearable @blur="rowChange(row)" /> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="群二维码" width="90"> |
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
<img :src="row.wxCode" width="80px" height="80px" alt="" /> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="操作" width="100"> |
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
<div> |
|
|
|
@ -23,32 +28,94 @@ |
|
|
|
|
修改群名称 |
|
|
|
|
</el-button> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<el-button type="primary" style="padding: 5px 0" text @click="row.edit = true"> |
|
|
|
|
<div v-if="['每日', '每月'].includes(row.sendFrequency)"> |
|
|
|
|
<el-button type="primary" style="padding: 5px 0" text @click="changeSendTime(row)"> |
|
|
|
|
修改发送时间 |
|
|
|
|
</el-button> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
|
|
|
|
|
<Dialog :title="`修改【${sendTimeInfo.name}】发送时间`" v-model="showSendTime" width="500px"> |
|
|
|
|
<el-text type="danger"> |
|
|
|
|
<span v-if="sendTimeInfo.sendFrequency == '每日'"> |
|
|
|
|
请按照时间格式输入,多个时间以“、”分割,如09:00、15:00、18:00 |
|
|
|
|
</span> |
|
|
|
|
<span v-else-if="sendTimeInfo.sendFrequency == '每月'"> |
|
|
|
|
请按照"日期-时间"格式输入,多个日期以“、”分割,如26-18:00、28-14:00、30-15:00、30-18:00 |
|
|
|
|
</span> |
|
|
|
|
</el-text> |
|
|
|
|
<el-input |
|
|
|
|
type="textarea" |
|
|
|
|
class="mt-20px mb-20px" |
|
|
|
|
:autosize="{ minRows: 3 }" |
|
|
|
|
v-model="sendTimeInfo.sendTime" |
|
|
|
|
placeholder="请输入" |
|
|
|
|
clearable |
|
|
|
|
/> |
|
|
|
|
<template #footer> |
|
|
|
|
<el-button :disabled="formLoading" type="primary" @click="submitSendTime">确 定</el-button> |
|
|
|
|
<el-button @click="showSendTime = false">取 消</el-button> |
|
|
|
|
</template> |
|
|
|
|
</Dialog> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script setup name="WXSetting"> |
|
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
|
|
|
|
|
|
|
const loading = ref(false) |
|
|
|
|
const tableList = ref([ |
|
|
|
|
{ |
|
|
|
|
name: '分配通知', |
|
|
|
|
sendType: [] |
|
|
|
|
sendType: [], |
|
|
|
|
sendFrequency: '每次', |
|
|
|
|
sendTime: '触发时立刻发送', |
|
|
|
|
remark: '线索分配给除本人之外的用户时,通知对方注意接收' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '发货通知', |
|
|
|
|
sendType: [] |
|
|
|
|
sendType: [], |
|
|
|
|
sendFrequency: '每次', |
|
|
|
|
sendTime: '触发时立刻发送', |
|
|
|
|
remark: '攀尼下单后,点击发货,发送发货模板到微信/群' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '审核失败通知', |
|
|
|
|
sendType: [], |
|
|
|
|
sendFrequency: '每次', |
|
|
|
|
sendTime: '触发时立刻发送', |
|
|
|
|
remark: 'crm中的回款、售后等审核失败,通知申请人' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '喜报', |
|
|
|
|
sendType: [], |
|
|
|
|
sendFrequency: '每次', |
|
|
|
|
sendTime: '触发时立刻发送', |
|
|
|
|
remark: '销售成交登记时,发送喜报到微信/群', |
|
|
|
|
wxGroup: '寻驾' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '周业绩排名', |
|
|
|
|
sendType: [], |
|
|
|
|
sendFrequency: '每日', |
|
|
|
|
sendTime: '10:00、15:00、18:00', |
|
|
|
|
remark: '发送业绩排名到微信/群', |
|
|
|
|
wxGroup: '爱顽熊' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '月业绩排名', |
|
|
|
|
sendType: [] |
|
|
|
|
sendType: [], |
|
|
|
|
sendFrequency: '每月', |
|
|
|
|
sendTime: '26-18:00、28-14:00、30-15:00、30-18:00', |
|
|
|
|
remark: '发送业绩排名到微信/群' |
|
|
|
|
} |
|
|
|
|
// { |
|
|
|
|
// name: '周报', |
|
|
|
|
// sendType: [], |
|
|
|
|
// sendFrequency: '触发时立刻发送' |
|
|
|
|
// } |
|
|
|
|
]) |
|
|
|
|
const columns = [ |
|
|
|
|
{ |
|
|
|
@ -76,6 +143,36 @@ async function rowChange(row) { |
|
|
|
|
row.edit = false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const showSendTime = ref(false) |
|
|
|
|
const sendTimeInfo = ref({}) |
|
|
|
|
function changeSendTime(row) { |
|
|
|
|
showSendTime.value = true |
|
|
|
|
sendTimeInfo.value = row |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function submitSendTime() { |
|
|
|
|
// 校验时间是否有效 |
|
|
|
|
const arr = sendTimeInfo.value.sendTime.split('、') |
|
|
|
|
if (sendTimeInfo.value.sendFrequency == '每日') { |
|
|
|
|
// 正则校验是否HH:MM |
|
|
|
|
if (arr.some((it) => !/^([01]?[0-9]|2[0-3]):[0-5][0-9]$/.test(it))) { |
|
|
|
|
message.error('请检查输入格式是否正确!!!') |
|
|
|
|
return |
|
|
|
|
} else { |
|
|
|
|
message.success('校验成功!') |
|
|
|
|
} |
|
|
|
|
} else if (sendTimeInfo.value.sendFrequency == '每月') { |
|
|
|
|
// 正则校验是否【1-31】-HH:MM |
|
|
|
|
const reg = /^([1-9]|[1-2]\d|3[01])-([01]?[0-9]|2[0-3]):[0-5][0-9]$/ |
|
|
|
|
if (arr.some((it) => !reg.test(it))) { |
|
|
|
|
message.error('请检查输入格式是否正确!!!') |
|
|
|
|
return |
|
|
|
|
} else { |
|
|
|
|
message.success('校验成功!') |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped></style> |
|
|
|
|