Selaa lähdekoodia

Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass

zengyf 2 vuotta sitten
vanhempi
commit
4dbaedf68e

+ 3 - 3
src/views/TMS/components/importedShip/addUnloadShip.vue

@@ -101,13 +101,13 @@ export default {
       let resultArrivalDate = null
       let resultStartTime = null
       let resultEndTime = null
-      if ( !this.form.resultArrivalDate ) {
+      if (this.form.resultArrivalDate ) {
         resultArrivalDate = sjTime(this.form.resultArrivalDate)
       }
-      if (!this.form.resultStartTime) {
+      if (this.form.resultStartTime) {
         resultStartTime = sjTime(this.form.resultStartTime)
       }
-      if (!this.form.resultEndTime) {
+      if (this.form.resultEndTime) {
         resultEndTime = sjTime(this.form.resultEndTime)
       }
       let mapVal = {

+ 51 - 1
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -88,7 +88,13 @@
         </el-form-item>
         <el-form-item v-if="isShowOperate">
           <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()"
             ><i class="el-icon-edit"></i>批量更改</el-button
@@ -1395,6 +1401,10 @@ export default {
   },
   data() {
     return {
+      userId:null,
+      orgCode:null,
+      taskAllNum:0,
+      noticeInterval:null,
       exceptionHandleVisible: false,
       batchCarrierName: null,
       batchCarrierVisible: false,
@@ -1625,6 +1635,11 @@ export default {
     }
   },
   created() {
+    this.orgCode=getCookie('orgCode');
+    this.userId=getCookie('userId');
+     this.noticeInterval=setInterval(() => {
+        this.getinformation();
+    }, 1000*10);
     if (this.orgCodeList.includes(getCookie('orgCode'))) {
       this.isShowOperate = true
     }
@@ -1647,6 +1662,9 @@ export default {
         'select',
         'exceptionHandle'
       ]
+      // this.noticeInterval=setInterval(() => {
+      //   this.getinformation();
+      // }, 1000*1);
     }
     //只要涉及提交即必须设计防抖,在初始化时绑定防抖函数
     this.updateCapacityDebounce = this.debounce(() => {
@@ -1705,6 +1723,9 @@ export default {
       }
     }
   },
+  destroyed() {
+    clearInterval(this.noticeInterval)
+  },
   computed: {},
   mounted() {
     let that = this
@@ -1730,6 +1751,31 @@ export default {
   },
   computed: {},
   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) {
       if (rows.length > 1) {
         rows.splice(index, 1)
@@ -2585,6 +2631,10 @@ export default {
       if (typeof row === 'undefined') {
         row = this.steelMap
       }
+      //所有销售审核通知标记为已读
+      if(this.taskAllNum>0){
+        this.readAll();
+      }
       this.axios
         .post(
           '/api/v1/tms/getSteelReportDetailsBySmId?saleOrderMaterialId=' +