Browse Source

bug 修复

lilei 2 years ago
parent
commit
bbbfa55ee8
2 changed files with 31 additions and 4 deletions
  1. 1 1
      public/version.json
  2. 30 3
      src/views/notice/detailModal.vue

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1664186394562
+  "version": 1664187028499
 }

+ 30 - 3
src/views/notice/detailModal.vue

@@ -15,8 +15,13 @@
         <a-descriptions-item label="公告标题">{{ detailsData&&detailsData.title||'--' }}</a-descriptions-item>
         <a-descriptions-item label="发布时间">{{ detailsData&&detailsData.releaseDate||'--' }}</a-descriptions-item>
         <a-descriptions-item label="公告内容" :span="2">
-          <div v-if="detailsData&&detailsData.content" v-html="detailsData.content" class="editor-box"></div>
-          <span v-else>--</span>
+          <div style="display:flex;">
+            <div v-if="detailsData&&detailsData.content" v-html="detailsData.content" class="editor-box"></div>
+            <span v-else>--</span>
+            <a-button v-if="detailsData&&detailsData.type=='tx'" @click="toAction(detailsData)" size="small" type="link" class="button-info">
+              {{ detailsData.extInfo.bizType == 'SHELF_REPLENISH' ? '立即处理':'点击查看' }}
+            </a-button>
+          </div>
         </a-descriptions-item>
         <a-descriptions-item label="图片" :span="2" v-if="detailsData.type !== 'tx'">
           <div style="display: flex;">
@@ -81,7 +86,7 @@ export default {
       let str = ''
       if (this.detailsData && this.detailsData.toAppName == '1,2') {
         str = '所有'
-      } else if (this.detailsData && this.detailsData.toAppName == '2') {
+      } else if (this.detailsData && this.detailsData.toAppName == '2' || this.detailsData.type == 'tx') {
         str = '经销商'
       } else if (this.detailsData && this.detailsData.toAppName == '1') {
         str = '总部'
@@ -119,11 +124,33 @@ export default {
       noticeUserDetail({ id: this.itemId }).then(res => {
         if (res.status == 200) {
           this.detailsData = res.data
+          if (this.detailsData.extInfo) {
+            this.detailsData.extInfo = JSON.parse(this.detailsData.extInfo)
+          }
         } else {
           this.detailsData = null
         }
       })
     },
+    toAction (data) {
+      // 急送订单
+      if (this.detailsData.extInfo.bizType == 'TEMP_ORDER') {
+        this.$router.push({ name: 'salesDetail', params: { sn: this.detailsData.extInfo.bizSn } })
+      }
+      // 补货订单
+      if (this.detailsData.extInfo.bizType == 'SHELF_REPLENISH') {
+        this.$router.push({ name: 'replenishmentManagement', query: { bizType: 'WAIT_CONFIRM' } })
+      }
+      // 货架订单
+      if (this.detailsData.extInfo.bizType == 'SHELF_ORDER') {
+        this.$router.push({ name: 'shelfOrderDetail', params: { sn: this.detailsData.extInfo.bizSn } })
+      }
+      // 货架异常
+      if (this.detailsData.extInfo.bizType == 'SHELF_WARN') {
+        this.$router.push({ name: 'shelfOrderList', query: { bizType: 'SHELF_WARN', shelfSn: this.detailsData.extInfo.bizSn } })
+      }
+      this.isShow = false
+    },
     // 查看大图
     getPreview (url) {
       this.previewImage = url