Просмотр исходного кода

管审进度修改步骤条逻辑

cyy 9 месяцев назад
Родитель
Сommit
66f0aff473
1 измененных файлов с 27 добавлено и 5 удалено
  1. 27 5
      src/views/system/jbdScan/goods/guanshenzhuangtai.vue

+ 27 - 5
src/views/system/jbdScan/goods/guanshenzhuangtai.vue

@@ -18,7 +18,10 @@
                 <div class="line">
                   <span
                     class="plan"
-                    :style="`width:${activeIndex * (100 / (stepList.length - 1)) - 100 / (stepList.length - 1) / 2}%`"
+                    :style="`width:${
+                      activeIndex * (100 / (stepList.length - 1)) -
+                      100 / (stepList.length - 1) / 2
+                    }%`"
                   />
                 </div>
                 <!-- 每步部分底部文字描述 -->
@@ -30,8 +33,8 @@
                     i.stepIndex < activeIndex || activeIndex == 100
                       ? 'step-active'
                       : i.stepIndex == activeIndex
-                        ? 'current-active'
-                        : ''
+                      ? 'current-active'
+                      : ''
                   "
                 >
                   <span class="step-num">
@@ -523,6 +526,7 @@ export default {
       //             select COUNT(*) as num from t_gsbgb where guan_lian_ji_hua_ = '${data.id_}' union all
       //             select COUNT(*) as num from t_glpsjhb where zong_wai_jian_ = '${data.id_}'`
       // const sql1 = `select COUNT(*) as num from t_glpsjhb where zong_wai_jian_ = '${data.id_}' and shi_fou_guo_shen_ ='已完成'`
+      // const sql1 = `select COUNT(*) as num from t_gsfzrbgtxb where zong_wai_jian_ = '${data.id_}' and shi_fou_guo_shen_ ='已完成'`
       await Promise.all([
         this.$common.request('query', {
           key: 'mgmtRevProgStat2',
@@ -531,13 +535,31 @@ export default {
         this.$common.request('query', {
           key: 'mgmtRevProgStat3',
           params: [data.id_]
+        }),
+        this.$common.request('query', {
+          key: 'mgmtRevProgStat6',
+          params: [data.id_]
         })
-      ]).then(([res, res1]) => {
+      ]).then(([res, res1, res2]) => {
         const panduan = res.variables.data
         const panduan1 = res1.variables.data
+        const panduan2 = res2.variables.data
         let jishu = 1
         aa: for (let i = 0; i < panduan.length; i++) {
-          if (panduan[i].num != 0) {
+          if (
+            i === 0 &&
+            this.obj[0].shi_fou_guo_shen_ === '已完成' &&
+            panduan[0].num == 0
+          ) {
+            jishu += 1
+          } else if (
+            i === 0 &&
+            panduan[0].num != 0 &&
+            panduan[1].num == 0 &&
+            panduan[0].num == panduan2[0].num
+          ) {
+            jishu += 2
+          } else if (panduan[i].num != 0) {
             jishu += 1
           } else {
             break aa