|
@@ -88,7 +88,13 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item v-if="isShowOperate">
|
|
<el-form-item v-if="isShowOperate">
|
|
<el-button type="primary" @click="operation()"
|
|
<el-button type="primary" @click="operation()"
|
|
- ><i class="el-icon-edit"></i>更改</el-button
|
|
|
|
|
|
+ >
|
|
|
|
+ <i class="el-icon-edit"></i>更改
|
|
|
|
+ <span>
|
|
|
|
+ <!-- || orgCode!='chengyunshang' -->
|
|
|
|
+ <el-badge :value="taskAllNum" :max="99" :hidden="taskAllNum < 1 "></el-badge>
|
|
|
|
+ </span>
|
|
|
|
+ </el-button
|
|
>
|
|
>
|
|
<!-- <el-button type="primary" @click="batchoperation()"
|
|
<!-- <el-button type="primary" @click="batchoperation()"
|
|
><i class="el-icon-edit"></i>批量更改</el-button
|
|
><i class="el-icon-edit"></i>批量更改</el-button
|
|
@@ -1395,6 +1401,10 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ userId:null,
|
|
|
|
+ orgCode:null,
|
|
|
|
+ taskAllNum:0,
|
|
|
|
+ noticeInterval:null,
|
|
exceptionHandleVisible: false,
|
|
exceptionHandleVisible: false,
|
|
batchCarrierName: null,
|
|
batchCarrierName: null,
|
|
batchCarrierVisible: false,
|
|
batchCarrierVisible: false,
|
|
@@ -1625,6 +1635,11 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
|
|
+ this.orgCode=getCookie('orgCode');
|
|
|
|
+ this.userId=getCookie('userId');
|
|
|
|
+ this.noticeInterval=setInterval(() => {
|
|
|
|
+ this.getinformation();
|
|
|
|
+ }, 1000*10);
|
|
if (this.orgCodeList.includes(getCookie('orgCode'))) {
|
|
if (this.orgCodeList.includes(getCookie('orgCode'))) {
|
|
this.isShowOperate = true
|
|
this.isShowOperate = true
|
|
}
|
|
}
|
|
@@ -1647,6 +1662,9 @@ export default {
|
|
'select',
|
|
'select',
|
|
'exceptionHandle'
|
|
'exceptionHandle'
|
|
]
|
|
]
|
|
|
|
+ // this.noticeInterval=setInterval(() => {
|
|
|
|
+ // this.getinformation();
|
|
|
|
+ // }, 1000*1);
|
|
}
|
|
}
|
|
//只要涉及提交即必须设计防抖,在初始化时绑定防抖函数
|
|
//只要涉及提交即必须设计防抖,在初始化时绑定防抖函数
|
|
this.updateCapacityDebounce = this.debounce(() => {
|
|
this.updateCapacityDebounce = this.debounce(() => {
|
|
@@ -1705,6 +1723,9 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ destroyed() {
|
|
|
|
+ clearInterval(this.noticeInterval)
|
|
|
|
+ },
|
|
computed: {},
|
|
computed: {},
|
|
mounted() {
|
|
mounted() {
|
|
let that = this
|
|
let that = this
|
|
@@ -1730,6 +1751,31 @@ export default {
|
|
},
|
|
},
|
|
computed: {},
|
|
computed: {},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ //获取通知数量
|
|
|
|
+ getinformation() {
|
|
|
|
+ this.axios
|
|
|
|
+ .post('/api/v1/ams/getNoticeAll', { userId: this.userId })
|
|
|
|
+ .then(res => {
|
|
|
|
+ let taskAllNum = 0;
|
|
|
|
+ res.data.data.forEach((e)=>{
|
|
|
|
+ if(e.insertusername=='销售审核' && e.status==0){
|
|
|
|
+ taskAllNum++;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ this.taskAllNum=taskAllNum;
|
|
|
|
+ console.log("未接收数目:",this.taskAllNum);
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ readAll() {
|
|
|
|
+ this.axios
|
|
|
|
+ .post('/api/v1/ams/readAll', {
|
|
|
|
+ userId: this.userId,
|
|
|
|
+ insertUserName: '销售审核'
|
|
|
|
+ })
|
|
|
|
+ .then(res => {
|
|
|
|
+ this.taskAllNum = 0
|
|
|
|
+ })
|
|
|
|
+ },
|
|
deleteRow(index, rows) {
|
|
deleteRow(index, rows) {
|
|
if (rows.length > 1) {
|
|
if (rows.length > 1) {
|
|
rows.splice(index, 1)
|
|
rows.splice(index, 1)
|
|
@@ -2585,6 +2631,10 @@ export default {
|
|
if (typeof row === 'undefined') {
|
|
if (typeof row === 'undefined') {
|
|
row = this.steelMap
|
|
row = this.steelMap
|
|
}
|
|
}
|
|
|
|
+ //所有销售审核通知标记为已读
|
|
|
|
+ if(this.taskAllNum>0){
|
|
|
|
+ this.readAll();
|
|
|
|
+ }
|
|
this.axios
|
|
this.axios
|
|
.post(
|
|
.post(
|
|
'/api/v1/tms/getSteelReportDetailsBySmId?saleOrderMaterialId=' +
|
|
'/api/v1/tms/getSteelReportDetailsBySmId?saleOrderMaterialId=' +
|