md
This commit is contained in:
parent
9e177f8d26
commit
ded0eb623f
@ -29,18 +29,26 @@
|
|||||||
<el-form-item label="发送人" prop="sendManCode">
|
<el-form-item label="发送人" prop="sendManCode">
|
||||||
<EmisUserSimplePicker0 :placeholder="$t('发送人')" v-model="queryParams.sendManCode"></EmisUserSimplePicker0>
|
<EmisUserSimplePicker0 :placeholder="$t('发送人')" v-model="queryParams.sendManCode"></EmisUserSimplePicker0>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="发送时间" prop="sendDate">
|
<el-form-item label="发送时间" prop="createTime">
|
||||||
<elDateSimplePicker v-model="dateTimeRange" ></elDateSimplePicker>
|
<elDateSimplePicker v-model="dateTimeRange" ></elDateSimplePicker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('渠道发送状态')" prop="sendStatus">
|
||||||
|
<el-select clearable v-model="queryParams.sendStatus" placeholder="">
|
||||||
|
<el-option key="1" label="已发送" value="1"></el-option>
|
||||||
|
<el-option key="0" label="未发送" value="0"></el-option>
|
||||||
|
<el-option key="-1" label="发送异常" value="-1"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
</SearchForm>
|
</SearchForm>
|
||||||
|
|
||||||
|
|
||||||
<XdTable
|
<XdTable
|
||||||
|
|
||||||
slot="pageContent"
|
slot="pageContent"
|
||||||
slot-scope="slotProps"
|
slot-scope="slotProps"
|
||||||
:height="(slotProps.contentHeight)+'px'"
|
:height="(slotProps.contentHeight)+'px'"
|
||||||
|
|
||||||
|
ref="refTable"
|
||||||
|
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
border
|
border
|
||||||
size="mini"
|
size="mini"
|
||||||
@ -219,6 +227,7 @@ export default {
|
|||||||
total: 0,
|
total: 0,
|
||||||
// 短信发送记录表表格数据
|
// 短信发送记录表表格数据
|
||||||
emisSmsSendRecordList: [],
|
emisSmsSendRecordList: [],
|
||||||
|
selectionList:null,
|
||||||
|
|
||||||
currentId:null,
|
currentId:null,
|
||||||
openForm: false,
|
openForm: false,
|
||||||
@ -254,11 +263,6 @@ export default {
|
|||||||
/** 查询短信发送记录表列表 */
|
/** 查询短信发送记录表列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.queryParams.params = {};
|
|
||||||
if(this.queryOrderType==0){
|
|
||||||
this.queryParams.phone=this.queryParams.billCode;
|
|
||||||
this.queryParams.billCode=null;
|
|
||||||
}
|
|
||||||
listEmisSmsSendRecord(this.addDateRange(this.queryParams, this.dateTimeRange,"createTime")).then(response => {
|
listEmisSmsSendRecord(this.addDateRange(this.queryParams, this.dateTimeRange,"createTime")).then(response => {
|
||||||
this.emisSmsSendRecordList = response.rows;
|
this.emisSmsSendRecordList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
@ -278,6 +282,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
|
this.selectionList=selection;
|
||||||
this.ids = selection.map(item => item.id)
|
this.ids = selection.map(item => item.id)
|
||||||
this.single = selection.length!==1
|
this.single = selection.length!==1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
@ -327,35 +332,41 @@ export default {
|
|||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
// this.download('emis/emisSmsSendRecord/export', {
|
const loadingInstance = this.$loading({
|
||||||
// ...this.queryParams
|
|
||||||
// }, `emisSmsSendRecord_${new Date().getTime()}.xlsx`)
|
|
||||||
const loadingInstance = this.$loading({
|
|
||||||
text: '正在导出...'
|
text: '正在导出...'
|
||||||
})
|
})
|
||||||
var qParam = {...this.queryParams};
|
|
||||||
qParam.pageNum=1;
|
|
||||||
qParam.pageSize=5000;
|
|
||||||
|
|
||||||
listEmisSmsSendRecord(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
|
if(this.selectionList&&this.selectionList.length>0){
|
||||||
this.downloadLoading = false
|
this.exportData(this.selectionList,loadingInstance);
|
||||||
if (response.code === 200) {
|
}
|
||||||
const curList = response.rows
|
else{
|
||||||
import('@/vendor/Export2Excel').then(excel => {
|
let qExportParam=this.addDateRange(this.queryParams, this.dateTimeRange,"createTime");
|
||||||
const tHeader = ['id','运单号','发送站点编码','站点名称','发件人名称','发送人编码','短信类型','目标号码','短信内容','单条发送费用','发送渠道','发送时间','渠道发送状态','渠道错误代码','渠道错误信息','任务处理时间','备注','租户ID','删除标志(0代表存在','创建者','创建时间','更新者','更新时间','创建网点','更新网点',];
|
qExportParam.pageNum=1;
|
||||||
const filterVal = ['id','billCode','sendSiteCode','sendSiteName','sendManName','sendManCode','smsType','phone','content','fee','smsChannel','sendDate','sendStatus','errCode','errMsg','taskDate','remark','tenantId','delFlag','createBy','createTime','updateBy','updateTime','createSite','updateSite',];
|
qExportParam.pageSize=50000;
|
||||||
const data = this.formatJson(filterVal, curList, response.rows)
|
|
||||||
excel.export_json_to_excel({
|
listEmisSmsSendRecord(qExportParam).then(response => {
|
||||||
header: tHeader,
|
if (response.code === 200) {
|
||||||
data,
|
this.exportData(response.rows,loadingInstance);
|
||||||
filename: '短信发送记录表',
|
}
|
||||||
autoWidth: true
|
});
|
||||||
})
|
}
|
||||||
loadingInstance.close()
|
},
|
||||||
})
|
exportData(selData,loadingInstance){
|
||||||
}
|
const curList =selData
|
||||||
});
|
import('@/vendor/Export2Excel').then(excel => {
|
||||||
|
const exportParam=this.$refs.refTable.getExportParam();
|
||||||
|
const tHeader = exportParam.header;
|
||||||
|
const filterVal = exportParam.filter;
|
||||||
|
const data = this.formatJson(filterVal, curList, selData)
|
||||||
|
excel.export_json_to_excel({
|
||||||
|
header: tHeader,
|
||||||
|
data,
|
||||||
|
filename: '短信发送记录表',
|
||||||
|
autoWidth: true
|
||||||
|
})
|
||||||
|
loadingInstance.close()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
formatJson(filterVal, jsonData, resData) {
|
formatJson(filterVal, jsonData, resData) {
|
||||||
let index = 0
|
let index = 0
|
||||||
@ -363,16 +374,33 @@ export default {
|
|||||||
if (j === 'index') {
|
if (j === 'index') {
|
||||||
return ++index
|
return ++index
|
||||||
}
|
}
|
||||||
if (j === 'status') {
|
if (j === 'smsType') {
|
||||||
var statusStr='xxx'
|
if(v['smsType'] == 1){
|
||||||
if(v[j] == 10){
|
return '寄件';
|
||||||
statusStr='xxx'
|
}
|
||||||
|
else if(v['smsType'] == 2){
|
||||||
|
return '签收';
|
||||||
|
}
|
||||||
|
else if(v['smsType'] == 3){
|
||||||
|
return '问题件';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (j === 'sendStatus') {
|
||||||
|
if(v['sendStatus'] == 1){
|
||||||
|
return '已发送';
|
||||||
|
}
|
||||||
|
else if(v['sendStatus'] == 0){
|
||||||
|
return '未发送';
|
||||||
|
}
|
||||||
|
else if(v['sendStatus'] == -1){
|
||||||
|
return '发送异常';
|
||||||
}
|
}
|
||||||
return statusStr;
|
|
||||||
}
|
}
|
||||||
return v[j]
|
return v[j]
|
||||||
}))
|
}))
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/** 列索引函数 */
|
/** 列索引函数 */
|
||||||
getIndex($index) {
|
getIndex($index) {
|
||||||
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
|
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user