This commit is contained in:
linfso 2024-12-10 13:00:43 +08:00
parent 12a5502ab4
commit 5a86cef7c5
5 changed files with 238 additions and 28 deletions

View File

@ -20,6 +20,26 @@ export function getTopNoticeListByUserId(query) {
})
}
export function getPublicNoticeList(query) {
return request({
url: '/system/notice/getPublicNoticeList',
method: 'get',
params: query
})
}
// 查询用户公告列表
export function addReadTimes(data) {
return request({
url: '/system/notice/addReadTimes',
method: 'post',
data: data
})
}
// 查询公告详细
export function getNotice(noticeId) {
return request({

View File

@ -24,17 +24,24 @@
<i class="el-icon-bell"></i>
<!-- <i :class="[item.icon, 'xd-notice-item-icon']"></i> -->
</div>
<div class="xd-item-content">
<div class="ele-elip notice-title">{{ item.noticeTitle }}</div>
<div class="ele-text-secondary ele-elip notice-time">{{ item.createTime }}</div>
<div class="xd-item-content" @click="showNotice(item)">
<div v-if="item.blRead==0" class="ele-elip notice-title">{{ item.noticeTitle }}</div>
<div v-if="item.blRead==1" class="ele-elip notice-has-read-title">{{ item.noticeTitle }}</div>
<div class="ele-text-secondary ele-elip notice-time" style="display: inline-flex;width: 100%;">
<div style="text-align: left;width: 70%">{{ item.createTime }} </div>
<div style="text-align: right;width: 30%"><span v-if="item.blRead==1">已读</span>
<span v-if="item.blRead==0">未读</span>
</div>
</div>
</div>
</div>
</div>
<!-- <div v-if="alertList.length" class="ele-cell xd-notice-actions">
<div v-if="alertList.length" class="ele-cell xd-notice-actions">
<div class="xd-item-content" @click="clear('notice')">清空通知</div>
<el-divider direction="vertical" class="line-color-light"/>
<div class="xd-item-content" @click="more('notice')">查看更多</div>
</div> -->
</div>
<el-empty v-if="!alertList.length" description="没有最新消息" />
</el-tab-pane>
<el-tab-pane name="sysNoticeTab" label="系统消息">
@ -69,7 +76,7 @@
import {Notification} from "element-ui";
import Speech from 'speak-tts'
import {getTopNoticeListByUserId} from "@/api/system/notice";
import {getTopNoticeListByUserId,addReadTimes,getPublicNoticeList} from "@/api/system/notice";
export default {
name: 'TopNotice',
data() {
@ -88,7 +95,7 @@ export default {
computed: {
// 所有消息数量
allNum() {
return this.noticeList.length;
return this.alertList.length;
},
newNotice(){
return 0;
@ -98,7 +105,7 @@ export default {
window.addEventListener("click", this.setCanPlayTone);
this.initXDNoticSdk();
this.speechInit();
this.getNoticeUserList();
this.initUserNotice();
},
methods: {
@ -144,12 +151,17 @@ export default {
// this.printerStatusMessage="通知组件已断开!";
},
onMessage(evt){
let that=this;
console.log("===>onMessage==>",evt)
if(evt==null||evt==undefined)
return;
if(evt==null||evt==undefined){
return;
}
this.playTone();
var messageBody = evt;
var messageBody = evt.title;
let noticeId= evt.noticeId;
this.$notify.closeAll();
this.speech.speak({ text: messageBody }).then(() => {
@ -165,14 +177,41 @@ export default {
duration: 0,
onClick: function () {
// 点击跳转的页面
// this.addReadTimes
that.$notify.closeAll();
this.setAddReadTimes(noticeId);
},
});
},
getNoticeUserList() {
getTopNoticeListByUserId().then(response => {
this.noticeList=response.rows;
})
setAddReadTimes(noticeId){
addReadTimes({"noticeId":noticeId}).then(response => {
console.log("读取成功");
this.initUserNotice();
});
},
initUserNotice() {
// 获取通知信息
getTopNoticeListByUserId().then(response => {
this.alertList=response.rows;
});
// 获取公告信息
getPublicNoticeList().then(response => {
this.noticeList=response.rows;
});
},
showNotice(item){
console.log("==showNotice===>xxx===>",item);
this.setAddReadTimes(item.noticeId);
},
// notificationInfo(messageBody) {
// // this.speech.speak({ text: messageBody }).then(() => {
// // console.log("读取成功");
@ -339,10 +378,16 @@ export default {
}
.notice-title{
color:#025cd9;
font-weight: 500;
color:#000;
font-weight: 600;
}
.notice-has-read-title{
color:gray;
font-weight: 400;
}
.ele-text-secondary {
margin-top: 5px;
font-size: 13px;

View File

@ -254,8 +254,8 @@
</el-row>
</el-form>
<div style="text-align: center;margin-bottom: 10px;">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button type="primary" @click="submitFormAndContinue">保存并继续开票</el-button>
<el-button type="primary" @click="submitForm" >确 定</el-button>
<el-button type="primary" @click="submitFormAndContinue" >保存并继续开票</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
@ -290,6 +290,9 @@ export default {
loading: false,
lastestLoading: false,
blCanotSubmit:false,
lastestInvoiceRecordList:[],
lastestTotal:0,
latestQueryParams:{
@ -676,11 +679,13 @@ export default {
// this.$emit("on-changed");
// });
} else {
this.blCanotSubmit=true;
addEmisSettleInvoiceRecord(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
let empName=this.$store.getters.empName;
let message=empName+" 提交了开票申请,请及时开票!";
this.noticeToEmpUser("padmin,88888042,88888047,88888034,88888059,88888083",message);
// let empName=this.$store.getters.empName;
// let message=empName+" 提交了开票申请,请及时开票!";
// this.noticeToEmpUser("padmin,88888042,88888047,88888034,88888059,88888083",message);
this.blCanotSubmit=false;
if(isContinue){
this.form.openBillScope='1';

View File

@ -473,12 +473,152 @@ export default {
if (j === 'index') {
return ++index
}
if (j === 'processStatus') {
let blDestConfirmedStr='';
let blCenterConfirmedStr='';
if(v['blDestConfirmed'] == 0){
blDestConfirmedStr='未确认';
}
else if(v['blDestConfirmed'] == 1){
blDestConfirmedStr='网点确认';
}
else if(v['blCenterConfirmed'] == 2){
blDestConfirmedStr='网点驳回';
}
if(v['blCenterConfirmed'] == 0){
blCenterConfirmedStr='未审核';
}
else if(v['blCenterConfirmed'] == 1){
blCenterConfirmedStr='中心审核通过';
}
else if(v['blCenterConfirmed'] == 2){
blCenterConfirmedStr='中心驳回';
}
return blDestConfirmedStr+" " + blCenterConfirmedStr;
}
if (j === 'kjlx') {
return v['sendSiteName']+'--'+v['dispatchUnderlingSiteName'];
return v['waybillDetail']['sendSiteName']+'--'+v['waybillDetail']['dispatchUnderlingSiteName'];
}
if (j === 'fjr') {
return v['sendName']+'--'+v['receiveName'];
}
if (j === 'waybillDetail.sendSiteName') {
return v['waybillDetail']['sendSiteName'];
}
if (j === 'waybillDetail.sendDate') {
return v['waybillDetail']['sendDate'];
}
if (j === 'waybillDetail.sendCompany') {
return v['waybillDetail']['sendCompany'];
}
if (j === 'waybillDetail.transLineTypeName') {
return v['waybillDetail']['transLineTypeName'];
}
if (j === 'waybillDetail.productTypeName') {
return v['waybillDetail']['productTypeName'];
}
if (j === 'waybillDetail.sendName') {
return v['waybillDetail']['sendName'];
}
if (j === 'waybillDetail.parcelQty') {
return v['waybillDetail']['parcelQty'];
}
if (j === 'waybillDetail.billWeight') {
return v['waybillDetail']['billWeight'];
}
if (j === 'waybillDetail.volumeWeight') {
return v['waybillDetail']['volumeWeight'];
}
if (j === 'waybillDetail.totalVolume') {
return v['waybillDetail']['totalVolume'];
}
if (j === 'waybillDetail.settlementWeight') {
return v['waybillDetail']['settlementWeight'];
}
if (j === 'waybillDetail.freight') {
return v['waybillDetail']['freight'];
}
if (j === 'waybillDetail.realFee') {
return v['waybillDetail']['realFee'];
}
if (j === 'waybillDetail.remark') {
return v['waybillDetail']['remark'];
}
if (j === 'waybillDetail.feeRemark') {
return v['waybillDetail']['feeRemark'];
}
if (j === 'waybillDetail.salesmen') {
return v['waybillDetail']['salesmen'];
}
if (j === 'waybillDetail.payee') {
return v['waybillDetail']['payee'];
}
if (j === 'waybillDetail.payee') {
return v['waybillDetail']['payee'];
}
if (j === 'waybillDetail.problemTypeName') {
return v['waybillDetail']['problemTypeName'];
}
if (j === 'waybillDetail.problemCause') {
return v['waybillDetail']['problemCause'];
}
if (j === 'waybillDetail.sendDate') {
return v['waybillDetail']['sendDate'];
}
if (j === 'waybillDetail.registerSiteName') {
return v['waybillDetail']['registerSiteName'];
}
if (j === 'waybillDetail.registerManName') {
return v['waybillDetail']['registerManName'];
}
if (j === 'waybillDetail.dispatchUnderlingSiteName') {
return v['waybillDetail']['dispatchUnderlingSiteName'];
}
if (j === 'waybillDetail.parcelQty') {
return v['waybillDetail']['parcelQty'];
}
if (j === 'waybillDetail.destinationName') {
return v['waybillDetail']['destinationName'];
}
if (j === 'waybillDetail.sendMobile') {
return "";
}
if (j === 'custName') {
let paymentType=v['paymentType'];
if(paymentType==2 || paymentType==4 || paymentType==5 ){
@ -536,8 +676,8 @@ export default {
return '未签收';
}
}
if (j === 'paymentType') {
return this.selectDictLabel(this.dict.type.emis_payment_type,v[j]);
if (j === 'waybillDetail.paymentType') {
return this.selectDictLabel(this.dict.type.emis_payment_type,v['waybillDetail']['paymentType']);
}
return v[j]
}))

View File

@ -254,9 +254,9 @@ export default {
addEmisWaybillAjustApply(this.form).then(response => {
this.$modal.msgSuccess("申请成功");
let empName=this.$store.getters.empName;
let message=empName+" 提交了费用审核,请及时审批,单号:"+this.form.billCode;
this.noticeToEmpUser("padmin,88888042,88888047,88888034,88888059,88888083",message);
// let empName=this.$store.getters.empName;
// let message=empName+" 提交了费用审核,请及时审批,单号:"+this.form.billCode;
// this.noticeToEmpUser("padmin,88888042,88888047,88888034,88888059,88888083",message);
this.$emit("on-changed");
});