发送短信、文书送达

This commit is contained in:
tdg930622 2024-12-30 17:12:25 +08:00
parent 040927f417
commit 327b218be9
5 changed files with 512 additions and 371 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<el-dialog :visible="true" width="1300px" class="dialog-case-record" append-to-body :close-on-click-modal="false" <el-dialog :visible="true" width="1300px" class="dialog-case-record" :close-on-click-modal="false"
@close="handleClose()"> @close="handleClose()">
<div class="dialog-content dialog-case-trace"> <div class="dialog-content dialog-case-trace">

View File

@ -65,7 +65,11 @@
<el-table-column prop="receiver" label="短信接收人" show-overflow-tooltip></el-table-column> <el-table-column prop="receiver" label="短信接收人" show-overflow-tooltip></el-table-column>
<el-table-column prop="phone" label="电话号码" show-overflow-tooltip></el-table-column> <el-table-column prop="phone" label="电话号码" show-overflow-tooltip></el-table-column>
<el-table-column prop="channel" label="短信接收对象" show-overflow-tooltip></el-table-column> <el-table-column prop="channel" label="短信接收对象" show-overflow-tooltip></el-table-column>
<el-table-column prop="status" label="发送状态" show-overflow-tooltip ></el-table-column> <el-table-column prop="status" label="发送状态" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ scope.row.status.desc }}</span>
</template>
</el-table-column>
<el-table-column prop="failureReason" label="失败原因" show-overflow-tooltip></el-table-column> <el-table-column prop="failureReason" label="失败原因" show-overflow-tooltip></el-table-column>
<el-table-column prop="channel" label="操作人" show-overflow-tooltip></el-table-column> <el-table-column prop="channel" label="操作人" show-overflow-tooltip></el-table-column>
<el-table-column prop="planStartTime" label="操作时间" show-overflow-tooltip> <el-table-column prop="planStartTime" label="操作时间" show-overflow-tooltip>
@ -77,8 +81,8 @@
<el-table-column label="操作" width="150"> <el-table-column label="操作" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="flex-row align-items-center"> <div class="flex-row align-items-center">
<el-button size="mini" @click="handleDelete(scope)">重试</el-button> <el-button size="mini" @click="handleRetry(scope.row)" v-if="scope.row.status.code !== 4">重试</el-button>
<el-button size="mini" @click="handleBackCase(scope)">取消</el-button> <el-button size="mini" @click="handleCancel(scope.row)" v-if="scope.row.status.code !== 4">取消</el-button>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -100,10 +104,9 @@
</template> </template>
<script> <script>
import api from "@/services/eventTracingApi"; import api from "@/services/eventTracingApi";
import caseManagement from "@/services/caseManagement";
export default { export default {
components: { components: {},
},
props: { props: {
DialogDetail: { DialogDetail: {
type: Object, type: Object,
@ -129,7 +132,9 @@ import api from "@/services/eventTracingApi";
}, },
mounted() { mounted() {
console.log(this.DialogDetail, 'this.DialogDetail.caseNo') console.log(this.DialogDetail, 'this.DialogDetail.caseNo')
if(this.DialogDetail.caseNo !=undefined && this.DialogDetail.caseNo !=''){this.queryParam.caseNo = this.DialogDetail.caseNo} if (this.DialogDetail.caseNo != undefined && this.DialogDetail.caseNo != '') {
this.queryParam.caseNo = this.DialogDetail.caseNo
}
this.queryParam.traceId = this.DialogDetail.id this.queryParam.traceId = this.DialogDetail.id
this.getList(1) this.getList(1)
}, },
@ -168,6 +173,32 @@ import api from "@/services/eventTracingApi";
} }
}) })
}, },
handleRetry(row) {
this.$confirm("确定重试?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
if(!this.$clickThrottle()) { return }//
caseManagement.smsRetry({id: row.id}).then(res => {
this.getList(1);
this.$message.success("成功");
})
}).catch(() => {});
},
handleCancel(row) {
this.$confirm("确定取消?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
if(!this.$clickThrottle()) { return }//
caseManagement.smsCancel({id: row.id}).then(res => {
this.getList(1);
this.$message.success("成功");
})
}).catch(() => {});
},
} }
}; };
</script> </script>
@ -176,16 +207,25 @@ import api from "@/services/eventTracingApi";
padding: 16px 24px; padding: 16px 24px;
max-height: 500px max-height: 500px
} }
.department-wrap { .department-wrap {
padding: 16px 24px; padding: 16px 24px;
max-height: 250px; max-height: 250px;
.department-wrap-list { .department-wrap-list {
margin-bottom: 32px; margin-bottom: 32px;
} }
.department-wrap-list:last-child { .department-wrap-list:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
} }
.min-height350{min-height: 350px;}
.department-dept ::v-deep .el-checkbox__label {color: $color-000000} .min-height350 {
min-height: 350px;
}
.department-dept ::v-deep .el-checkbox__label {
color: $color-000000
}
</style> </style>

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<el-dialog title="批量发送短信" :visible="true" width="600px" append-to-body :close-on-click-modal="false" <el-dialog title="批量发送短信" :visible="true" width="600px" :close-on-click-modal="false"
@close="handleClose"> @close="handleClose">
<div class="dialog-content dialog-case-batch"> <div class="dialog-content dialog-case-batch">
<div class="pt-8"> <div class="pt-8">
@ -12,26 +12,26 @@
<el-col :span="24"> <el-col :span="24">
<div class="flex-row-center align-items-center height-40 mb-24"> <div class="flex-row-center align-items-center height-40 mb-24">
<span class="tabs__search-criteria-title flex-shrink-0 pr-16">短信模板</span> <span class="tabs__search-criteria-title flex-shrink-0 pr-16">短信模板</span>
<el-select v-model="ObjectInfo.methodId" <el-select v-model="ObjectInfo.scene"
placeholder="请选择还款方式" placeholder="请选择还款方式"
class="width100" @change="smsChange"> class="width100" @change="smsChange">
<el-option <el-option
v-for="item in smsOptions" v-for="item in smsOptions"
:key="item.value" :key="item.template"
:label="item.label" :label="item.template"
:value="item.value"> :value="item.template">
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
</el-col> </el-col>
<el-col :span="24"> <!-- <el-col :span="24">-->
<div class="flex-row-center align-items-center height-40 mb-24"> <!-- <div class="flex-row-center align-items-center height-40 mb-24">-->
<span class="tabs__search-criteria-title flex-shrink-0 pr-16">短信接收方</span> <!-- <span class="tabs__search-criteria-title flex-shrink-0 pr-16">短信接收方</span>-->
<el-input v-model.trim="ObjectInfo.users" <!-- <el-input v-model.trim="ObjectInfo.users"-->
clearable placeholder="请输入" disabled> <!-- clearable placeholder="请输入" disabled>-->
</el-input> <!-- </el-input>-->
</div> <!-- </div>-->
</el-col> <!-- </el-col>-->
<el-col :span="24"> <el-col :span="24">
<div class="flex-row-center align-items-center mb-24"> <div class="flex-row-center align-items-center mb-24">
<span class="tabs__search-criteria-title flex-shrink-0 pr-16">模板内容</span> <span class="tabs__search-criteria-title flex-shrink-0 pr-16">模板内容</span>
@ -52,10 +52,10 @@
</div> </div>
</template> </template>
<script> <script>
import api from "@/services/caseManagement"; import caseManagement from "@/services/caseManagement";
export default { export default {
components: { components: {},
},
props: { props: {
eventTraDialog: { eventTraDialog: {
type: Object, type: Object,
@ -66,11 +66,23 @@ import api from "@/services/caseManagement";
}, },
data() { data() {
return { return {
smsOptions:[{label:'案件受理通知',value:'notice',users:'由被申请方接收',content:'【${signName}】您与${applyName}的${issueType}已由我中心受理调解,后续我方将组织双方共同进行调解,请您关注后续电话或者短信通知'}, smsOptions: [
{label:'还款计划通知',value:'repayment-plan',users:'由被申请方接收',content:'【${signName}】您与${applyName}的${issueType}经调解已经达成初步的方案及还款计划,您可以通过如下链接查看${smallProLink}。或者您也可以直接通过搜索微信小程序“保融通调解”进入“还款记录登记”模块进行查看。'}], // {
// label: '',
// template: 'notice',
// // users: '',
// content: '${signName}${applyName}${issueType}'
// },
// {
// label: '',
// template: 'repayment-plan',
// // users: '',
// content: '${signName}${applyName}${issueType}${smallProLink}'
// }
],
ObjectInfo: { ObjectInfo: {
methodId:'notice', scene: '',
users:'', // users: '',
content: '' content: ''
}, },
tableData: [], tableData: [],
@ -79,18 +91,41 @@ import api from "@/services/caseManagement";
}; };
}, },
mounted() { mounted() {
this.smsChange() this.getSmsTemplate();
// this.smsChange();
}, },
methods: { methods: {
getSmsTemplate() {
caseManagement.getSmsTemplate().then(res => {
if (!res.code) {
this.smsOptions = res;
if (res.length){
this.ObjectInfo.scene = res[0].template;
this.ObjectInfo.content = res[0].content;
}
}
})
},
smsChange() { smsChange() {
let jsonData = this.smsOptions.find(item => { let jsonData = this.smsOptions.find(item => {
return this.ObjectInfo.methodId == item.value return this.ObjectInfo.scene == item.template
}) })
this.ObjectInfo.users = jsonData.users // this.ObjectInfo.users = jsonData.users
this.ObjectInfo.content = jsonData.content this.ObjectInfo.content = jsonData.content
}, },
handleSubmit() { handleSubmit() {
console.log(this.eventTraDialog,'eventTraDialog') // console.log(this.eventTraDialog, 'eventTraDialog')
if (!this.ObjectInfo.scene){
this.$message.warning("请选择短信模板!");
return
}
if(!this.$clickThrottle()) { return }//
let caseIdList = this.eventTraDialog.caseids;
caseManagement.smsBatchSend({...this.ObjectInfo, caseIdList: caseIdList}).then(res => {
this.$parent.getCaseInfoList(1)
this.handleClose()
this.$message.success("发送成功");
})
}, },
handleClose() { handleClose() {
this.$emit('update:eventTraDialog', null) this.$emit('update:eventTraDialog', null)
@ -103,14 +138,21 @@ import api from "@/services/caseManagement";
.dialog-case-batch { .dialog-case-batch {
padding: 16px 30px; padding: 16px 30px;
max-height: 500px; max-height: 500px;
.tabs__search-criteria-title { .tabs__search-criteria-title {
width: 100px; width: 100px;
} }
.case-batch-num { .case-batch-num {
background-color: rgba(236, 238, 241, 0.8196078431); background-color: rgba(236, 238, 241, 0.8196078431);
padding: 15px 20px; padding: 15px 20px;
border-radius: 4px; border-radius: 4px;
a{font-size: 16px;font-weight: 500;color: #C66A5B;}
a {
font-size: 16px;
font-weight: 500;
color: #C66A5B;
}
} }
} }

View File

@ -16,8 +16,9 @@
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<div class="mb-24 officelist"> <div class="mb-24 officelist">
<el-checkbox-group v-model="ObjectInfo.methodIds"> <el-checkbox-group v-model="ObjectInfo.documentTypes">
<el-checkbox border v-for="(item,index) in officeOptions" :label="item.label" :key="index" ></el-checkbox> <el-checkbox border v-for="(item,index) in officeOptions" :label="item.value"
:key="index">{{item.label}}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
</el-col> </el-col>
@ -35,10 +36,10 @@
</div> </div>
</template> </template>
<script> <script>
import api from "@/services/caseManagement"; import caseManagement from "@/services/caseManagement";
export default { export default {
components: { components: {},
},
props: { props: {
eventTraDialog: { eventTraDialog: {
type: Object, type: Object,
@ -49,30 +50,47 @@ import api from "@/services/caseManagement";
}, },
data() { data() {
return { return {
officeOptions:[{label:'调解告知书',value:'1'},{label:'调解申请书',value:'2'}, officeOptions: [
{label:'送达地址确认书',value:'3'},{label:'调解笔录',value:'4'},{label:'调解协议',value:'5'}], {label: '调解告知书', value: 'MEDIATE_NOTE'},
{label: '调解申请书', value: 'MEDIATE_APPLICATION'},
{label: '调解询问笔录', value: 'MEDIATE_RECORD'},
{label: '调解协议', value: 'MEDIATE_AGREEMENT'},
{label: '司法申请书', value: 'JUDICATURE_APPLICATION'},
{label: '司法承诺书', value: 'JUDICATURE_PROMISE'},
{label: '送达地址确认书', value: 'CONFIRMATION_OF_ADDRESS'},
{label: '身份识别报告', value: 'VERIFY_IDD'}
],
ObjectInfo: { ObjectInfo: {
methodIds:['调解告知书','调解申请书','送达地址确认书','调解笔录','调解协议'], documentTypes: ['MEDIATE_NOTE', 'MEDIATE_APPLICATION', 'MEDIATE_RECORD', 'MEDIATE_AGREEMENT',
users:'', 'JUDICATURE_APPLICATION', 'JUDICATURE_PROMISE' , 'CONFIRMATION_OF_ADDRESS', 'VERIFY_IDD'],
content:'' servedType: 'SMS'
}, },
tableData:[],
total:0,
}; };
}, },
mounted() { mounted() {
}, },
methods: { methods: {
smsChange(){ // smsChange() {
let jsonData = this.smsOptions.find(item=>{ // let jsonData = this.smsOptions.find(item => {
return this.ObjectInfo.methodId == item.value // return this.ObjectInfo.methodId == item.value
// })
// this.ObjectInfo.users = jsonData.users
// this.ObjectInfo.content = jsonData.content
// },
handleSubmit() {
if (!this.ObjectInfo.documentTypes.length){
this.$message.warning("请选择文书类型!");
return
}
if(!this.$clickThrottle()) { return }//
let caseIdList = this.eventTraDialog.caseids;
caseManagement.traceServedBatchCreate({...this.ObjectInfo, caseIdList: caseIdList}).then(res => {
this.$parent.getCaseInfoList(1)
this.handleClose()
this.$message.success("发送成功");
}) })
this.ObjectInfo.users = jsonData.users
this.ObjectInfo.content = jsonData.content
}, },
handleClose() { handleClose() {
this.$emit('update:eventTraDialog', null) this.$emit('update:eventTraDialog', null)
}, },
@ -84,20 +102,28 @@ import api from "@/services/caseManagement";
.dialog-office-batch { .dialog-office-batch {
padding: 16px 30px; padding: 16px 30px;
max-height: 500px; max-height: 500px;
.tabs__search-criteria-title { .tabs__search-criteria-title {
width: 100%; width: 100%;
} }
.case-batch-num { .case-batch-num {
background-color: rgba(236, 238, 241, 0.8196078431); background-color: rgba(236, 238, 241, 0.8196078431);
padding: 15px 20px; padding: 15px 20px;
border-radius: 4px; border-radius: 4px;
a{font-size: 16px;font-weight: 500;color: #C66A5B;}
a {
font-size: 16px;
font-weight: 500;
color: #C66A5B;
} }
}
.officelist { .officelist {
background-color: rgba(236, 238, 241, 0.8196078431); background-color: rgba(236, 238, 241, 0.8196078431);
padding: 20px 20px; padding: 20px 20px;
.el-checkbox
{ .el-checkbox {
width: 230px; width: 230px;
margin: 10px; margin: 10px;
} }

View File

@ -138,10 +138,43 @@ const caseManagementApi = {
}, },
// 短信模板
getSmsTemplate: data => {
return service.service.get(`${apiAdmin}api/trace/sms/template`, data)
},
// 发送短信
smsSend: data => {
return service.service.post(`${apiAdmin}api/trace/sms/send`, data)
},
// 重试
smsRetry: data => {
return service.service.post(`${apiAdmin}api/trace/sms/retry`, data)
},
// 取消
smsCancel: data => {
return service.service.post(`${apiAdmin}api/trace/sms/cancel`, data)
},
// 批量发送短信
smsBatchSend: data => {
return service.service.post(`${apiAdmin}api/trace/sms/batch-send`, data)
},
// 发起-文书送达
traceServedCreate: data => {
return service.service.post(`${apiAdmin}api/trace/traceServed/create`, data)
},
// 批量发起-文书送达
traceServedBatchCreate: data => {
return service.service.post(`${apiAdmin}api/trace/traceServed/batch-create`, data)
},
// 取消
traceServedBatchCancel: data => {
return service.service.post(`${apiAdmin}api/trace/traceServed/cancel`, data)
},
// 重试
traceServedBatchRetry: data => {
return service.service.post(`${apiAdmin}api/trace/traceServed/retry`, data)
},
//========================end::案件管理====================================== //========================end::案件管理======================================
} }