Преглед на файлове

2022.6.25 移动端超前填报

ggooalice преди 2 години
родител
ревизия
67e2d1714a
променени са 2 файла, в които са добавени 12 реда и са изтрити 12 реда
  1. 2 2
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/weekEdit.vue
  2. 10 10
      fhKeeper/formulahousekeeper/timesheet_h5/vue.config.js

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/weekEdit.vue

@@ -8,7 +8,7 @@
                 <van-grid-item>
                     <div style="width:100%">
                     <van-button @click="SwitchLastorNext(1)" size="small" style="float:left;width:50%">上周</van-button>
-                    <van-button @click="SwitchLastorNext(-1)" :disabled="weekSwitchIndex < 2" size="small" style="float:left;width:50%">下周</van-button>
+                    <van-button @click="SwitchLastorNext(-1)" :disabled="weekSwitchIndex < 2 && user.timeType.fillAhead == 0" size="small" style="float:left;width:50%">下周</van-button>
                     </div>
                 </van-grid-item>
             </van-grid>
@@ -467,7 +467,7 @@
             },
             // 周日期按钮状态
             canSelect(item){
-                if(this.weekSwitchIndex < 2){
+                if(this.weekSwitchIndex < 2 && this.user.timeType.fillAhead == 0){
                     let date = new Date()
                     if(date.getTime() > item.getTime()){
                         return false

+ 10 - 10
fhKeeper/formulahousekeeper/timesheet_h5/vue.config.js

@@ -3,18 +3,18 @@ const pxtorem = require("postcss-pxtorem");
 const path = require('path');
 const themePath = path.resolve(__dirname,'src/assets/style/theme.less');
 
-var ip = '47.101.180.183'
+// var ip = '47.101.180.183'
 // var ip = '192.168.2.30'
 // var ip = '127.0.0.1'
-// var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
-// for (var i in ifaces) {
-//     for (var j in ifaces[i]) {
-//         var val = ifaces[i][j]
-//         if (val.family === 'IPv4' && val.address !== '127.0.0.1') {
-//             ip = val.address
-//         }
-//     }
-// }
+var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
+for (var i in ifaces) {
+    for (var j in ifaces[i]) {
+        var val = ifaces[i][j]
+        if (val.family === 'IPv4' && val.address !== '127.0.0.1') {
+            ip = val.address
+        }
+    }
+}
 
 module.exports = {
     // 关闭eslint检查