caolin 5 months ago
commit f7e81fad0e
  1. 7
      src/api/clue/payment.js
  2. 107
      src/views/Basic/WxRobot/Setting.vue
  3. 23
      src/views/Clue/Order/Comp/Reback.vue

@ -5,7 +5,7 @@ export const getPaymentList = async (params) => {
return await request.get({ url: '/admin-api/crm/sign-pay-record/list', params })
}
// 查询(精简)列表
// 查询列表
export const getPaymentPage = async (params) => {
return await request.get({ url: '/admin-api/crm/sign-pay-record/page', params })
}
@ -45,3 +45,8 @@ export const updateApplyPayment = async (data) => {
data
})
}
// 导出
export const exportPayment = async (params) => {
return await request.download({ url: '/admin-api/crm/sign-pay-record/export-excel', params })
}

@ -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:0015:0018:00
</span>
<span v-else-if="sendTimeInfo.sendFrequency == '每月'">
请按照"日期-时间"格式输入多个日期以分割如26-18:0028-14:0030-15:0030-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>

@ -192,6 +192,7 @@
<el-form-item>
<el-button @click="handleSearch" v-hasPermi="['clue:order:return-search']">查询</el-button>
<el-button @click="handleReset" v-hasPermi="['clue:order:return-reset']">重置</el-button>
<el-button @click="handleExport" v-hasPermi="['clue:order:return-export']">导出</el-button>
<el-button @click="batchAudit" v-hasPermi="['clue:order:return-batch-audit']">
批量审核
</el-button>
@ -423,8 +424,10 @@ import DialogFeebackDetail from './DialogFeebackDetail.vue'
import DialogBatchAudit from './DialogBatchAudit.vue'
import { removeNullField } from '@/utils'
import download from '@/utils/download'
import { useAppStore } from '@/store/modules/app'
import { dateFormatter, formatDate } from '@/utils/formatTime'
import { ElLoading } from 'element-plus'
const userStore = useUserStore()
const message = useMessage() //
@ -518,6 +521,26 @@ async function getList() {
}
}
async function handleExport() {
try {
ElLoading.service({
lock: true,
text: '正在导出数据,请稍后...',
background: 'rgba(0, 0, 0, 0.7)'
})
const params = removeNullField(searchForm.value)
delete params.pageNo
delete params.pageSize
const data = await FeebackApi.exportPayment(params)
download.excel(data, `汇款记录表${new Date().getTime()}.xls`)
} finally {
setTimeout(() => {
const loadingInstance = ElLoading.service()
loadingInstance.close()
}, 400)
}
}
const batchIds = ref([])
function handleSelectionChange(val) {
batchIds.value = val.map((it) => it.id)

Loading…
Cancel
Save