Bladeren bron

no message

ly 1 jaar geleden
bovenliggende
commit
ead5728716

+ 32 - 33
src/views/business/entrust/workOrder/currentMonth/index.vue

@@ -285,45 +285,44 @@
   }
 
   function transEntrustHandler() {
-    proxy.$modal.confirm("确定流转到下一月?").then(() => {
-        transNext().then((res) => {
-          proxy.$modal.msgSuccess("流转成功");
-          checkCurrentMonthHandle();
-        });
-      });
-    // let currentDate = new Date().getMonth() + 1;
-    // let formattedMonth = currentDate.toString().padStart(2, '0');
-    // let month = currentMonth.value.split('-')[1];
-    // console.log(formattedMonth);
-    // if (month < formattedMonth) {
-    //   proxy.$modal.confirm("确定流转到下一月?").then(() => {
+    // proxy.$modal.confirm("确定流转到下一月?").then(() => {
     //     transNext().then((res) => {
     //       proxy.$modal.msgSuccess("流转成功");
     //       checkCurrentMonthHandle();
     //     });
     //   });
-    // } else {
-
-    //   // //真实月 != 当前月 
-    //   if (month != formattedMonth) {
-    //     proxy.$modal.msgError("每月只可流转一次");
-    //   } else {
-    //     let currentDay = new Date().getDate()
-    //     let cutoffDay = 20;
-    //     //如果当前月时间小于20号
-    //     if (currentDay < cutoffDay) {
-    //       proxy.$modal.msgError("每月20号后才能流转");
-    //     } else {
-    //       proxy.$modal.confirm("确定流转到下一月?").then(() => {
-    //         transNext().then((res) => {
-    //           proxy.$modal.msgSuccess("流转成功");
-    //           checkCurrentMonthHandle();
-    //         });
-    //       });
-    //     }
+    let currentDate = new Date().getMonth() + 1;
+    let formattedMonth = currentDate.toString().padStart(2, '0');
+    let month = currentMonth.value.split('-')[1];
+    console.log(formattedMonth);
+    if (month < formattedMonth) {
+      proxy.$modal.confirm("确定流转到下一月?").then(() => {
+        transNext().then((res) => {
+          proxy.$modal.msgSuccess("流转成功");
+          checkCurrentMonthHandle();
+        });
+      });
+    } else {
+      // //真实月 != 当前月 
+      if (month != formattedMonth) {
+        proxy.$modal.msgError("每月只可流转一次");
+      } else {
+        let currentDay = new Date().getDate()
+        let cutoffDay = 20;
+        //如果当前月时间小于20号
+        if (currentDay < cutoffDay) {
+          proxy.$modal.msgError("每月20号后才能流转");
+        } else {
+          proxy.$modal.confirm("确定流转到下一月?").then(() => {
+            transNext().then((res) => {
+              proxy.$modal.msgSuccess("流转成功");
+              checkCurrentMonthHandle();
+            });
+          });
+        }
 
-    //   }
-    // }
+      }
+    }
 
   }
 

+ 1 - 1
src/views/business/production/archiveTicket/form.vue

@@ -56,7 +56,7 @@
                   <el-card :body-style="{ padding: '0px' }">
                     <!-- <img :src="`${baseUrl}${o.fileUrl}`" class="image" style="max-width: 100%; height: 200px" @click="handleImageView(o.fileUrl)" /> -->
                     <el-image :src="`${baseUrl}${o.fileUrl}`" class="image" style="max-width: 100%; height: 200px"
-                      :preview-teleported="true" fit="contain" :preview-src-list="srcList"
+                      :preview-teleported="true" fit="contain" :preview-src-list="srcList" :initial-index="index"
                       @click="vbs(baseUrl + o.fileUrl)" />
                     <div style="padding: 14px">
                       <!-- <span>好吃的汉堡</span> -->