소스 검색

feat: 修复业绩变更判断

zhangyuhan 3 달 전
부모
커밋
0340cd7de4
1개의 변경된 파일14개의 추가작업 그리고 1개의 파일을 삭제
  1. 14 1
      src/views/create-order/components/order-detail-submodule/OrderActions.vue

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

@@ -623,7 +623,20 @@ export default {
           break
         }
         case '业绩变更': {
-          this.$refs.backRef.performanceShow = true
+          const errorTip = ['原因:']
+
+          if (!this.orderDetail?.saleDataRes?.saleRecord?.length) {
+            errorTip.push('尚未产生业绩数据,不支持变更。')
+          }
+
+          if (errorTip.length > 1) {
+            this.$alert(errorTip.join('<br>'), '不支持新增业绩变更', {
+              confirmButtonText: '我知道了',
+              dangerouslyUseHTMLString: true
+            })
+          } else {
+            this.$refs.backRef.performanceShow = true
+          }
           break
         }
         case '红冲': {