瀏覽代碼

fix(create-order): 修复合同归档状态显示逻辑

- 在 admin-order-list、ContractInfo 和 order-list 组件中,增加了对合同状态的判断
- 只有当合同状态为已签署(contract_status === 1)时,才显示归档状态
- 修复了之前未考虑合同状态,导致归档状态显示不准确的问题

Signed-off-by: tangshizhe <48740614+tangshizhe@users.noreply.github.com>
tangshizhe 2 月之前
父節點
當前提交
819b23db10

+ 7 - 5
src/views/create-order/admin-order-list.vue

@@ -914,11 +914,13 @@ export default {
           align: 'center',
           align: 'center',
           render: (h, {row}) => {
           render: (h, {row}) => {
             let tip = '-'
             let tip = '-'
-            if (row.contract_archive_status === 0) {
-              tip = '未归档'
-            }
-            if (row.contract_archive_status === 1) {
-              tip = '已归档'
+            if(row.contract_status === 1) {
+              if (row.contract_archive_status === 0) {
+                tip = '未归档'
+              }
+              if (row.contract_archive_status === 1) {
+                tip = '已归档'
+              }
             }
             }
             return h('span', tip)
             return h('span', tip)
           }
           }

+ 12 - 0
src/views/create-order/components/order-detail-submodule/ContractInfo.vue

@@ -57,6 +57,18 @@ export default {
     },
     },
     contractRes () {
     contractRes () {
       return this.orderDetail?.contractRes || {}
       return this.orderDetail?.contractRes || {}
+    },
+    contractStatus() {
+      let tip = '-'
+      if(this.contractRes?.contract_status === 1) {
+        if (this.contractRes?.contract_archive_status === 0) {
+          tip = '未归档'
+        }
+        if (this.contractRes?.contract_archive_status === 1) {
+          tip = '已归档'
+        }
+      }
+      return tip
     }
     }
   },
   },
   data() {
   data() {

+ 1 - 1
src/views/create-order/components/order-detail-submodule/OrderActions.vue

@@ -262,7 +262,7 @@ export default {
         return this.orderDetail?.orderData
         return this.orderDetail?.orderData
       },
       },
       orderAuditStatus () {
       orderAuditStatus () {
-        return this.orderDetailInfo?.audit_status < 0 && this.orderDetailInfo?.audit_status !== -2
+        return this.orderDetailInfo?.audit_status < 0 && this.orderDetailInfo?.order_status !== -2
       },
       },
       newActionList () {
       newActionList () {
         const actions = {
         const actions = {

+ 6 - 0
src/views/create-order/order-detail.vue

@@ -146,6 +146,11 @@ export default {
   },
   },
   created() {
   created() {
     this.loading = true
     this.loading = true
+    const { tab } = this.$route.query
+    console.log('tab', tab)
+    if (tab) {
+      this.doRefresh(tab) 
+    }
     this.getOrderDetailFun()
     this.getOrderDetailFun()
   },
   },
   methods: {
   methods: {
@@ -168,6 +173,7 @@ export default {
     },
     },
     doSelectTabName (name = '订单详情') {
     doSelectTabName (name = '订单详情') {
       const tabKey = this.tabList.find(v => v.label === name).name
       const tabKey = this.tabList.find(v => v.label === name).name
+      console.log('tabKey', tabKey)
       this.activeTabName = tabKey
       this.activeTabName = tabKey
     }
     }
   }
   }

+ 7 - 5
src/views/create-order/order-list.vue

@@ -816,11 +816,13 @@ export default {
           align: 'center',
           align: 'center',
           render: (h, {row}) => {
           render: (h, {row}) => {
             let tip = '-'
             let tip = '-'
-            if (row.contract_archive_status === 0) {
-              tip = '未归档'
-            }
-            if (row.contract_archive_status === 1) {
-              tip = '已归档'
+            if(row.contract_status === 1) {
+              if (row.contract_archive_status === 0) {
+                tip = '未归档'
+              }
+              if (row.contract_archive_status === 1) {
+                tip = '已归档'
+              }
             }
             }
             return h('span', tip)
             return h('span', tip)
           }
           }