Browse Source

Merge remote-tracking branch 'origin/master'

yurk 3 năm trước cách đây
mục cha
commit
fcc804cd9a

+ 2 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/project/project_gantt.vue

@@ -50,6 +50,8 @@
           :label="reqpar1 ? item.projectName : item.name"
           :value="item.id"
           >
+          <span style="float: left;color: #8492a6;">{{ item.projectCode }}</span>
+          <span style="float: right;font-size: 13px;margin-left: 20px">{{ item.projectName }}</span>
         </el-option>
       </el-select>
       </div>

+ 24 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -3601,7 +3601,9 @@
                                 time: this.report.time
                             }
                             if(this.user.timeType.type == 1) {
-                                    this.workForm.domains[0].workingTime = this.user.timeType.allday+'.0'
+                                    var shuzhi = this.user.timeType.allday + ''
+                                    console.log('执行一次', shuzhi.indexOf('.'))
+                                    this.workForm.domains[0].workingTime = shuzhi.indexOf('.') == '-1' ? shuzhi + '.0' : shuzhi
                                 }
                             if (this.timeBasecostList && this.timeBasecostList.length > 0) {
                                 //默认给第一个,必填字段
@@ -3685,7 +3687,9 @@
                                 }],
                             }
                             if(this.user.timeType.type == 1) {
-                                this.workForm.domains[0].workingTime = this.user.timeType.allday+'.0'
+                                var shuzhi = this.user.timeType.allday + ''
+                                    console.log('执行二次')
+                                this.workForm.domains[0].workingTime = shuzhi.indexOf('.') == '-1' ? shuzhi + '.0' : shuzhi
                             }
                             // console.log(this.workForm)
                     if (this.timeBasecostList&&this.timeBasecostList.length>0) {
@@ -3795,7 +3799,7 @@
                 const millisecond = 1000 * 60 * 60 * 24
                 const minusDay = week != 0 ? week - 1 : 4
                 const monday = new Date(currentDate.getTime() - minusDay * millisecond)
-                const sunday = new Date(monday.getTime() + 4 * millisecond)
+                const sunday = new Date()
                 var stat = this.dealdate(monday)
                 var end = this.dealdate(sunday)
                 this.zhoRqi = [stat, end]
@@ -3873,7 +3877,15 @@
             // 新增日期
             newDates() {
                 // console.log(this.zhoRqi, '看卡')
+                let edate = new Date(this.zhoRqi[1])
+                let nowdate = new Date()
+                let nowdate2 = new Date(nowdate.getFullYear(),nowdate.getMonth(),nowdate.getDate())
+                if(edate >= nowdate2){
+                    return
+                }
                 this.zhoRqi[1] = this.dateChange(1, this.zhoRqi[1])
+                
+                console.log(this.zhoRqi[1]);
                 // console.log(this.zhoRqi[1])
                 var obj = {}
                 obj.zhoDataTime = this.zhoRqi[1]
@@ -4027,6 +4039,15 @@
                 }
             },
             zhoRqis() {
+                let nowdate = new Date()
+                let nowdate2 = new Date(nowdate.getFullYear(),nowdate.getMonth(),nowdate.getDate())
+                let edate = new Date(this.zhoRqi[1])
+                if(edate >= nowdate2){
+                    let emon = nowdate2.getMonth() + 1
+                    let eday = nowdate2.getDate()
+                    let edate2 = nowdate2.getFullYear() + '-' + (emon < 10 ? '0' + emon : emon) + '-' + (eday < 10 ? '0' + eday : eday)
+                    this.zhoRqi[1] = edate2
+                }
                 this.zhoData = []
                 if(this.zhoRqi) { 
                     var stime = this.zhoRqi[0]

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

@@ -92,7 +92,7 @@
                     <van-cell title="专业进度" v-if="user.company.packageEngineering == 1">
                     </van-cell>
                     <van-field :disabled="!canEdit"
-                        type="number"  :name="'progress_'+pItem.professionId" input-align="right" 
+                        type="number"  :name="'progress_'+pItem.professionId" input-align="right"  
                         v-for="pItem in item.professionProgress" :key="pItem.professionId"
                         :label="'--    '+pItem.professionName"  
                     >
@@ -937,12 +937,14 @@
                         } else {
                             this.canCancel = false;
                             this.canEdit = true;
+                            var shuzhi = this.user.timeType.allday + ''
                             //没有填报的可以点击提交
                             this.form.domains = [{
                                 id: null,
                                 projectId: "",
                                 projectName: "",
-                                workingTime: t.type==3?(t.allday).toFixed(1):"8.0",
+                                // workingTime: t.type==3?(t.allday).toFixed(1):"8.0",
+                                workingTime: t.type==3?(t.allday).toFixed(1):shuzhi.indexOf('.') == '-1' ? shuzhi + '.0' : shuzhi,
                                 content: "",
                                 state: 2,
                                 progress:100,

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

@@ -3,17 +3,17 @@ const pxtorem = require("postcss-pxtorem");
 const path = require('path');
 const themePath = path.resolve(__dirname,'src/assets/style/theme.less');
 
-// var ip = '192.168.2.2'
+var ip = '192.168.2.2'
 // 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检查