<template>
|
<view class="container" style="height: auto;">
|
<view style="margin: 0.5rem;">
|
<button @click="toTab(1)" class="mini-btn" style="margin-right: 10px;" type="default"
|
size="mini">素材下载</button>
|
<button class="mini-btn" style="background-color: cornflowerblue; margin-right: 10px;" type="primary"
|
size="mini">短信审核</button>
|
<button @click="toTab(3)" class="mini-btn" type="default" size="mini">微信朋友圈</button>
|
</view>
|
|
<v-tabs v-model="currentTab" :tabs="tabList" :pills="true" line-height="0" activeColor="#fff"
|
@change="changeTab" pillsColor="#FF928F" :fixed="true"></v-tabs>
|
<cc-pullScroolView class="pullScrollView" ref="pullScroll" :enablePullDown="false" :back-top="false">
|
<view>
|
<view v-if="smsList.length>0" class="orders-list d-flex flex-column w-100"
|
style="padding: 20rpx; padding-bottom: 0;">
|
<view class="order-item" v-for="(item, index) in smsList" :key="index"
|
style="margin-bottom: 30rpx;">
|
<list-cell :hover="false">
|
<view class="w-100 d-flex align-items-center">
|
<view @tap="copy(item.id)" class="flex-fill d-flex flex-column" style="width: 60%;">
|
<view class="font-size-lg text-color-base" style="margin-bottom: 20rpx;">
|
{{ item.mobile }}
|
</view>
|
<view style="display: flex;">
|
<view class="font-size-sm text-color-assist taskid-show">任务编号:{{ item.id }}
|
</view>
|
<view @click="copy(item.id)" style="color: #919293;">复制</view>
|
</view>
|
<view style="display: flex;">
|
<view class="font-size-sm text-color-assist taskid-show">
|
创建时间:{{item.createtime }}
|
</view>
|
</view>
|
<view style="display: flex;">
|
<view class="font-size-sm text-color-assist taskid-show">
|
{{ item.wantsendtype== '1' ? '立即发送' : ('定时发送:' + item.wantsendtime) }}
|
</view>
|
</view>
|
<view style="display: flex;">
|
<view class="font-size-sm text-color-assist taskid-show">
|
共{{ item.sendcount }}条短信
|
</view>
|
</view>
|
</view>
|
<view class="font-size-lg text-color-primary" style="font-size: 14px;">
|
{{ getSmsStatus(item.sendstatus) }}
|
</view>
|
</view>
|
</list-cell>
|
<list-cell :hover="false" last>
|
<view class="w-100 d-flex flex-column">
|
<view class="w-100 font-size-lg text-color-base" style="margin-bottom: 20rpx;">
|
{{ item.smscontent}}
|
</view>
|
<view class="d-flex justify-content-between align-items-center"
|
style="margin-bottom: 30rpx;">
|
<!-- <view class="font-size-sm text-color-assist">
|
{{item.wantsendtime}}
|
</view> -->
|
<view class="d-flex font-size-sm text-color-base align-items-center">
|
<view style="display: flex;">
|
<button type="primary"
|
style="background-color: #ef1913; margin-right: 5rem;"
|
@click="shenhe(item,1)">通过</button><button type="primary"
|
@click="shenhe(item,2)">驳回</button>
|
</view>
|
</view>
|
</view>
|
<view class="d-flex align-items-center justify-content-end">
|
<!-- <view style="margin-right: 10rpx;">
|
<button type="primary" plain size="mini">查看回复</button>
|
</view> -->
|
|
</view>
|
</view>
|
</list-cell>
|
</view>
|
</view>
|
|
</view>
|
</cc-pullScroolView>
|
</view>
|
</template>
|
|
<script>
|
import comUtils from '@/utils/ComUtils.js'
|
export default {
|
data() {
|
return {
|
currentTab: 0,
|
memberid: '',
|
tabList: ['待审核', '驳回', '已通过', ],
|
smsTypeList: [{
|
id: '0',
|
name: '待审核'
|
}, {
|
id: '2',
|
name: '驳回'
|
}, {
|
id: '1',
|
name: '已通过'
|
}],
|
smsList: [],
|
curPageNum: 1,
|
pageCount: 10,
|
totalNum: 0,
|
checkType: ''
|
}
|
},
|
onLoad(option) {
|
this.checkId();
|
},
|
|
// 上拉加载
|
onReachBottom() {
|
if (this.curPageNum * this.pageCount < this.totalNum) {
|
// 数据为加载完
|
this.$refs.pullScroll.showUpLoading();
|
this.curPageNum++;
|
this.getTemplateData();
|
}
|
},
|
methods: {
|
toTab(tabtype) {
|
var url = '';
|
switch (tabtype) {
|
case 1:
|
url = '/pages/ad_page/product_sc';
|
break;
|
case 2:
|
url = '/pages/ad_page/sms_examine';
|
break;
|
case 3:
|
url = '/pages/ad_page/wx_pyqset';
|
break;
|
}
|
uni.navigateTo({
|
url: url
|
})
|
},
|
//检查白名单
|
checkId() {
|
var openId = uni.getStorageSync('smsopenid');
|
var whiteid = comUtils.getAllowdId(status);
|
if (openId == "" || whiteid.indexOf(openId) < 0) {
|
uni.reLaunch({
|
url: '/pages/emptypage/nopermissions'
|
})
|
} else {
|
this.getTemplateData();
|
}
|
},
|
copy(taskid) {
|
uni.setClipboardData({
|
data: taskid,
|
success: function() {
|
uni.showToast({
|
title: '复制成功',
|
icon: 'none'
|
});
|
}
|
});
|
},
|
//审核
|
shenhe(record, shStatus) {
|
var txt = shStatus == 1 ? '确定通过吗?' : '确定驳回吗?';
|
var that = this;
|
uni.showModal({
|
title: '提示',
|
content: txt,
|
success: ({
|
confirm
|
}) => {
|
if (confirm) {
|
uni.showLoading({
|
title: '处理中...'
|
})
|
let param = {
|
id: record.id,
|
shstatus: shStatus
|
};
|
that.$http.post('/smsapi/SmsBusiness/UpdateSmsSendShStatus', param).then(e => {
|
uni.hideLoading();
|
if (e.result) {
|
uni.showToast({
|
title: '操作成功!',
|
icon: 'none'
|
});
|
} else {
|
uni.showToast({
|
title: '操作失败!',
|
icon: 'none'
|
});
|
}
|
this.smsList = [];
|
this.getTemplateData();
|
|
}).catch(function(err) {
|
uni.hideLoading()
|
console.log(err);
|
})
|
|
}
|
}
|
})
|
},
|
getSmsStatus(status) {
|
return comUtils.getBackSmsStatus(status);
|
},
|
changeTab(index) {
|
this.currentTab = index;
|
this.smsList = [];
|
this.curPageNum = 1;
|
this.totalNum = 0;
|
this.getTemplateData();
|
},
|
//发短信
|
toSend(record) {
|
uni.navigateTo({
|
url: '/pages/sendsms/index?templateTxt=' + record.templetecontent
|
})
|
},
|
getTemplateData() {
|
let templateId = "";
|
templateId = this.smsTypeList[this.currentTab].id;
|
let param = {
|
PageNo: this.curPageNum,
|
PageSize: this.pageCount,
|
SmsStatus: templateId,
|
MemberId: this.memberid
|
}
|
uni.showLoading({
|
title: '加载中'
|
})
|
this.$http.post('/smsapi/SmsBusiness/GetShSmsSend', param).then(e => {
|
this.totalNum = e.result.totalCount;
|
this.smsList = this.smsList.concat(e.result.data);
|
if (this.curPageNum * this.pageCount >= this.totalNum) {
|
// 如果是最后一页
|
this.$refs.pullScroll.finish();
|
} else {
|
// 不是最后一页
|
this.$refs.pullScroll.success();
|
}
|
uni.hideLoading()
|
}).catch(function(err) {
|
uni.hideLoading()
|
console.log(err);
|
})
|
|
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
page {
|
|
height: 100%;
|
}
|
|
.taskid-show {
|
text-overflow: ellipsis;
|
overflow: hidden;
|
white-space: nowrap;
|
width: 80%;
|
}
|
|
.container {
|
display: flex;
|
flex-direction: column;
|
padding: 0.4rem;
|
}
|
|
.uni-flex {
|
display: flex;
|
}
|
|
.uni-flex-row {
|
@extend .uni-flex;
|
flex-direction: row;
|
box-sizing: border-box;
|
}
|
|
/* 列表footer */
|
.uni-footer {
|
@extend .uni-flex-row;
|
justify-content: right;
|
margin-top: $uni-spacing-col-lg;
|
}
|
|
.uni-footer-text {
|
font-size: 14px;
|
color: $uni-text-color-grey;
|
margin-left: 5px;
|
color: #FF928F;
|
font-weight: 700;
|
}
|
</style>
|