瀏覽代碼

修改bug

chenrui 3 月之前
父節點
當前提交
ae91826446

+ 1 - 1
src/config/dealerManagement.js

@@ -135,7 +135,7 @@ export default {
           name: 'dealerAccountDetail',
           component: () => import(/* webpackChunkName: "dealerManagement" */ '@/views/dealerManagement/dealerAccount/detail.vue'),
           meta: {
-            title: '轮胎补贴金额',
+            title: '经销商账户明细',
             icon: 'thunderbolt',
             replaceTab: true,
             hidden: true,

+ 21 - 11
src/views/setting/tireSubsidySetting/addSubsidyModal.vue

@@ -264,24 +264,34 @@ export default {
           onOk () {
             createSubsidyRule(_this.form).then(res => {
               if (res.status == 200) {
-                _this.isShow = false
-                _this.$message.success(res.message)
-                _this.$emit('ok')
+                if (res.data && res.data === 'IN_USE') {
+                  const tipWord = '已存在【启用中】的' + (_this.pageType === 'SUBSIDY_QUARTER_FEE' ? '季' : '年') + '度增量补贴'
+                  _this.setInfoModal(tipWord)
+                } else {
+                  _this.isShow = false
+                  _this.$message.success(res.message)
+                  _this.$emit('ok')
+                }
               }
             })
           }
         })
       } else {
-        this.$info({
-          title: '提示',
-          content: '已存在【启用中】的' + (_this.pageType === 'SUBSIDY_QUARTER_FEE' ? '季' : '年') + '度增量补贴',
-          centered: true,
-          onOk () {
-            console.log('知道了')
-          }
-        })
+        const tipWord = '已存在【启用中】的' + (_this.pageType === 'SUBSIDY_QUARTER_FEE' ? '季' : '年') + '度增量补贴'
+        this.setInfoModal(tipWord)
       }
     },
+    // 提示弹窗
+    setInfoModal (tip) {
+      this.$info({
+        title: '提示',
+        content: tip,
+        centered: true,
+        onOk () {
+          console.log('知道了')
+        }
+      })
+    },
     // 重置
     resetFormData () {
       if (this.form.defaultFlag == 0) {

+ 21 - 11
src/views/setting/tireSubsidySetting/costAddModal.vue

@@ -178,24 +178,34 @@ export default {
           onOk () {
             createSubsidyRule(_this.form).then(res => {
               if (res.status == 200) {
-                _this.isShow = false
-                _this.$message.success(res.message)
-                _this.$emit('ok')
+                if (res.data && res.data === 'IN_USE') {
+                  const tipWord = '已存在【未开始】的' + (_this.pageType === 'SERVICE_FEE' ? '服务费比例' : '运费补贴')
+                  _this.setInfoModal(tipWord)
+                } else {
+                  _this.isShow = false
+                  _this.$message.success(res.message)
+                  _this.$emit('ok')
+                }
               }
             })
           }
         })
       } else {
-        this.$info({
-          title: '提示',
-          content: '已存在【未开始】的' + (_this.pageType === 'SERVICE_FEE' ? '服务费比例' : '运费补贴'),
-          centered: true,
-          onOk () {
-            console.log('知道了')
-          }
-        })
+        const tipWord = '已存在【未开始】的' + (_this.pageType === 'SERVICE_FEE' ? '服务费比例' : '运费补贴')
+        _this.setInfoModal(tipWord)
       }
     },
+    // 提示弹窗
+    setInfoModal (tip) {
+      this.$info({
+        title: '提示',
+        content: tip,
+        centered: true,
+        onOk () {
+          console.log('知道了')
+        }
+      })
+    },
     // 重置
     resetFormData () {
       if (this.form.defaultFlag == 0) {