ggooalice 2 年 前
コミット
d50f4df093

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/config/index.js

@@ -2,7 +2,7 @@ var path = require('path')
 
 //  var ip = '127.0.0.1'
 // var ip = '192.168.2.9'
-var ip = '192.168.2.39'
+var ip = '192.168.2.30'
 
 // var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
 // for (var i in ifaces) {

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

@@ -84,8 +84,15 @@
           <span>{{scope.row.startDate ? scope.row.startDate + ' ~ ' + scope.row.endDate : ''}}</span>
         </template>
       </el-table-column>
+      <el-table-column label="合同要求" prop="contractReq" min-width="240" show-overflow-tooltip></el-table-column>
+      <el-table-column label="里程碑进度" prop="milepost" min-width="280">
+        <template slot-scope="scope">
+          <span>{{scope.row.milepost ? scope.row.milepost.name + '\u3000完成时间:' + scope.row.milepost.finishDate : ''}}</span>
+        </template>
+      </el-table-column>
       <el-table-column label="人员需求" prop="membReq" min-width="280"></el-table-column>
       <el-table-column label="任务需求" prop="taskReq" min-width="280"></el-table-column>
+      <el-table-column label="参与部门进度" prop="departmentSpeed" min-width="280"></el-table-column>
       <el-table-column label="操作" width="120" align="center" fixed="right">
         <template slot-scope="scope">
           <el-button @click="demandEdit(scope.row)" size="small">修改</el-button>
@@ -129,6 +136,12 @@
       <el-form-item label="任务需求">
         <el-input style="width:350px" v-model="editParameter.taskReq" clearable></el-input>
       </el-form-item>
+      <el-form-item label="合同要求">
+        <el-input style="width:350px" v-model="editParameter.contractReq" clearable></el-input>
+      </el-form-item>
+      <el-form-item label="部门进度">
+        <el-input style="width:350px" v-model="editParameter.departmentSpeed" clearable></el-input>
+      </el-form-item>
     </el-form>
     <div slot="footer" class="dialog-footer">
               <el-button type="default" @click="demandEditDialog = false">取消</el-button>
@@ -305,6 +318,7 @@ export default {
 
       handleSizeChange(val){
         this.pageSize = val
+        this.pageIndex = 1
         this.getDemandList()
       },
       handleCurrentChange(val){
@@ -325,6 +339,7 @@ export default {
         this.editParameter.endDate = this.editDate2
         delete this.editParameter.reStartDate
         delete this.editParameter.reEndDate
+        delete this.editParameter.milepost
         this.http.post('/project-requirement/addOrMod',this.editParameter,
         res => {
           if(res.code == 'ok'){

+ 19 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/settings/timetype.vue

@@ -224,6 +224,10 @@
             <p style="margin-left:10px;color:#666;">自定义日报填报列表</p>
             <el-switch style="margin-left: 40px" v-model="timeType.customDegreeActive" active-color="#13ce66" inactive-color="#ff4949"> </el-switch>
             <span style="margin-left:10px;color:#999;">开启后系统可按该字段数据进行分类统计工时成本</span>
+            <template v-if="timeType.customDegreeActive">
+            <el-switch style="margin-left: 40px" v-model="timeType.customDegreeStatus" active-color="#13ce66" inactive-color="#ff4949"> </el-switch>
+            <span style="margin-left:10px;color:#999;">是否为必填项</span>
+            </template>
         </div>
         <el-row v-if="timeType.customDegreeActive" :gutter="20" style="padding-top:10px;width:100%;margin:0 auto;padding-left:10px;padding-right:10px;">
             <el-col :span="24" >
@@ -244,6 +248,10 @@
             <p style="margin-left:10px;color:#666;"><span>自定义日报填报数值</span></p>
             <el-switch style="margin-left: 40px" v-model="timeType.customDataActive" active-color="#13ce66" inactive-color="#ff4949"> </el-switch>
             <span style="margin-left:10px;color:#999;">开启后可按项目,部门和人员统计该数值</span>
+            <template v-if="timeType.customDataActive">
+            <el-switch style="margin-left: 40px" v-model="timeType.customDataStatus" active-color="#13ce66" inactive-color="#ff4949"> </el-switch>
+            <span style="margin-left:10px;color:#999;">是否为必填项</span>
+            </template>
         </div>
         <el-row v-if="timeType.customDataActive && user.company.packageProject==1" :gutter="20" style="padding-top:10px;width:100%;margin:0 auto;padding-left:10px;padding-right:10px;">
             <el-col :span="24" >
@@ -262,6 +270,10 @@
             <p style="margin-left:10px;color:#666;"><span>自定义日报填报文本</span></p>
             <el-switch style="margin-left: 40px" v-model="timeType.customTextActive" active-color="#13ce66" inactive-color="#ff4949"> </el-switch>
             <span style="margin-left:10px;color:#999;">开启后可员工可额外填写该信息</span>
+            <template v-if="timeType.customTextActive">
+            <el-switch style="margin-left: 40px" v-model="timeType.customTextStatus" active-color="#13ce66" inactive-color="#ff4949"> </el-switch>
+            <span style="margin-left:10px;color:#999;">是否为必填项</span>
+            </template>
         </div>
         <el-row v-if="timeType.customTextActive" :gutter="20" style="padding-top:10px;width:100%;margin:0 auto;padding-left:10px;padding-right:10px;">
             <el-col :span="24" >
@@ -891,6 +903,10 @@
                             }
                         }
                         delete param.userList
+                        param.customTextStatus = param.customTextStatus && param.customTextActive ? 1 : 0
+                        param.customDegreeStatus = param.customDegreeStatus && param.customDegreeActive ? 1 : 0
+                        param.customDataStatus = param.customDataStatus && param.customDataActive ? 1 : 0
+                        
                         // console.log(param, '将要提交的值')
                         // return
                         this.http.post('/time-type/save',param,
@@ -933,6 +949,9 @@
                             this.timeType = res.data;
                             this.timeType.fillOvertime = this.timeType.fillOvertime ? true : false
                             this.timeType.lockWorktime = this.timeType.lockWorktime ? true : false
+                            this.timeType.customTextStatus = this.timeType.customTextStatus ? true : false
+                            this.timeType.customDegreeStatus = this.timeType.customDegreeStatus ? true : false
+                            this.timeType.customDataStatus = this.timeType.customDataStatus ? true : false
                             this.timeChange();
                             let userlist = res.data.userList
                             this.whiteList = []

+ 33 - 30
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -374,18 +374,18 @@
                         </el-select>
                     </el-form-item>
                     <!-- 相关维度/自定义维度 -->
-                    <el-form-item :label="yonghuUser.customDegreeName" v-if="domain.projectId && yonghuUser.customDegreeActive == 1">
+                    <el-form-item :label="yonghuUser.customDegreeName" v-if="domain.projectId && yonghuUser.customDegreeActive == 1" :rules="user.timeType.customDegreeStatus == 1 && domain.wuduList.length != 0 ? { required: true, message: '请选择' + yonghuUser.customDegreeName, trigger: ['change','blur'] } : {}" :prop="'domains.' + index + '.degreeId'">
                         <el-select v-model="domain.degreeId" clearable placeholder="请选择" :disabled="!canEdit">
                             <el-option v-for="item in domain.wuduList" :key="item.value" :label="item.name" :value="item.id">
                             </el-option>
                         </el-select>
                     </el-form-item>
                     <!-- 相关数值 -->
-                    <el-form-item :label="yonghuUser.customDataName" v-if="yonghuUser.customDataActive == 1">
+                    <el-form-item :label="yonghuUser.customDataName" v-if="yonghuUser.customDataActive == 1" :prop="'domains.' + index + '.customData'" :rules="user.timeType.customDataStatus == 1 ? { required: true, message: '请选择' + yonghuUser.customDataName, trigger: ['change','blur'] } : {}">
                         <el-input-number :id="'numberData_'+index" :disabled="!canEdit" v-model="domain.customData" style="width:200px;" @keyup.native="restrictNumber('numberData_'+index)"></el-input-number>
                     </el-form-item>
                     <!-- 自定义文本 -->
-                    <el-form-item :label="yonghuUser.customTextName + '123'" v-if="yonghuUser.customTextActive == 1">
+                    <el-form-item :label="yonghuUser.customTextName" v-if="yonghuUser.customTextActive == 1" :prop="'domains.' + index + '.customText'" :rules="user.timeType.customTextStatus == 1 ? { required: true, message: '请填写' + yonghuUser.customTextName, trigger: ['change','blur'] } : {}">
                         <el-input :disabled="!canEdit" v-model="domain.customText" style="width:75%;margin-right:7%" maxlength="25" show-word-limit></el-input>
                     </el-form-item>
                     <el-form-item v-if="reportTimeType.type == 3" label="用时占比" :prop="'domains.' + index + '.'+timeFields[reportTimeType.type]"
@@ -493,18 +493,18 @@
                             </span>
                         </el-form-item>
                         <!-- 相关维度 -->
-                        <el-form-item :label="yonghuUser.customDegreeName" v-if="domain.projectId && yonghuUser.customDegreeActive == 1">
+                        <el-form-item :label="yonghuUser.customDegreeName" v-if="domain.projectId && yonghuUser.customDegreeActive == 1" :rules="user.timeType.customDegreeStatus == 1 && domain.wuduList.length != 0 ? { required: true, message: '请选择' + yonghuUser.customDegreeName, trigger: ['change','blur'] } : {}" :prop="'domains.' + index + '.degreeId'">
                             <el-select v-model="domain.degreeId" clearable placeholder="请选择">
                                 <el-option v-for="item in domain.wuduList" :key="item.value" :label="item.name" :value="item.id">
                                 </el-option>
                             </el-select>
                         </el-form-item>
                         <!-- 相关数值 -->
-                        <el-form-item :label="yonghuUser.customDataName" v-if="domain.projectId && yonghuUser.customDataActive == 1">
+                        <el-form-item :label="yonghuUser.customDataName" v-if="domain.projectId && yonghuUser.customDataActive == 1" :prop="'domains.' + index + '.customData'" :rules="user.timeType.customDataStatus == 1 ? { required: true, message: '请选择' + yonghuUser.customDataName, trigger: ['change','blur'] } : {}">
                             <el-input-number :id="'numberData_'+index" v-model="domain.customData" style="width:200px;" @keyup.native="restrictNumber('numberData_'+index)"></el-input-number>
                         </el-form-item>
                         <!-- 自定义文本 -->
-                        <el-form-item :label="yonghuUser.customTextName" v-if="yonghuUser.customTextActive == 1">
+                        <el-form-item :label="yonghuUser.customTextName" v-if="yonghuUser.customTextActive == 1" :prop="'domains.' + index + '.customText'" :rules="user.timeType.customTextStatus == 1 ? { required: true, message: '请填写' + yonghuUser.customTextName, trigger: ['change','blur'] } : {}">
                             <el-input :disabled="!canEdit" v-model="domain.customText" style="width:75%;margin-right:7%" maxlength="25" show-word-limit></el-input>
                         </el-form-item>
                         <!--项目管理专业版模式下,项目下的近期执行的任务 -->
@@ -3678,23 +3678,6 @@
             guanbi() {
                 this.falsss = false
             },
-            // wuduLists(id) {
-            //     this.http.post('/project/getDegreeList',{ 
-            //         projectId: id,
-            //     },
-            //     res => {
-            //         if (res.code == "ok") {
-            //             return res.data
-            //         } 
-            //     },
-            //     error => {
-            //         this.$message({
-            //             message: error,
-            //             type: "error"
-            //         });
-            //         }
-            //     );
-            // },
 
             // 打开日报填写
             fillInReport(i, isBatch) {
@@ -3826,13 +3809,33 @@
             // 按周填报里内容的填写点击确定
             btnTianxiaes() {
                 if (this.zhoBao.projectAuditorId) {
-                    this.tianxieDialogVisible = false
-                    var zhong = this.zhoData
-                    zhong[this.zhoBaoIdx][this.zhoBaoName] = this.zhoBao
-                    this.zhoData = zhong
-                    if(this.reportTimeType.type == 1) this.zhoXuan(this.zhoBao, this.zhoBaoIdx)
-                    if(this.reportTimeType.type == 2) this.zhoTimes(this.zhoBao, this.zhoBaoIdx)
-                    if(this.reportTimeType.type == 3) this.addBli(this.zhoBao, this.zhoBaoIdx)
+                    
+                    let errtips = ''
+                    if(this.user.timeType.customDegreeStatus == 1 && this.zhoBao.wuduList.length != 0 && !this.zhoBao.degreeId) {
+                        errtips += this.user.timeType.customDegreeName + '、'
+                    }
+                    if(this.user.timeType.customDataStatus == 1 && !this.zhoBao.customData){
+                        errtips += this.user.timeType.customDataName + '、'
+                    }
+                    if(this.user.timeType.customTextStatus == 1 && !this.zhoBao.customText){
+                        errtips += this.user.timeType.customTextName + '、'
+                    }
+                    if(errtips != ''){
+                        errtips = errtips.substring(0,errtips.length - 1)
+                        this.$message({
+                            message: '请对' + errtips + '进行填写',
+                            type: 'error'
+                        })
+                    }else {
+                        this.tianxieDialogVisible = false
+                        var zhong = this.zhoData
+                        zhong[this.zhoBaoIdx][this.zhoBaoName] = this.zhoBao
+                        this.zhoData = zhong
+                        if(this.reportTimeType.type == 1) this.zhoXuan(this.zhoBao, this.zhoBaoIdx)
+                        if(this.reportTimeType.type == 2) this.zhoTimes(this.zhoBao, this.zhoBaoIdx)
+                        if(this.reportTimeType.type == 3) this.addBli(this.zhoBao, this.zhoBaoIdx)
+                    }
+                    
                 } else {
                     this.$message({
                         message: '请选择审核人',

+ 94 - 91
fhKeeper/formulahousekeeper/timesheet_h5/package-lock.json

@@ -1694,7 +1694,8 @@
         },
         "ansi-regex": {
           "version": "5.0.0",
-          "resolved": "",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
+          "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
           "dev": true
         },
         "semver": {
@@ -1812,9 +1813,63 @@
         },
         "ansi-regex": {
           "version": "5.0.0",
-          "resolved": "",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
+          "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
           "dev": true
         },
+        "ansi-styles": {
+          "version": "4.3.0",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-convert": "^2.0.1"
+          }
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        },
+        "color-name": {
+          "version": "1.1.4",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+          "dev": true,
+          "optional": true
+        },
+        "emojis-list": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz",
+          "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==",
+          "dev": true,
+          "optional": true
+        },
+        "has-flag": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+          "dev": true,
+          "optional": true
+        },
+        "loader-utils": {
+          "version": "2.0.2",
+          "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
+          "integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "big.js": "^5.2.2",
+            "emojis-list": "^3.0.0",
+            "json5": "^2.1.2"
+          }
+        },
         "minimist": {
           "version": "1.2.5",
           "resolved": "https://registry.npm.taobao.org/minimist/download/minimist-1.2.5.tgz",
@@ -1844,6 +1899,41 @@
           "requires": {
             "ansi-regex": "^5.0.0"
           }
+        },
+        "supports-color": {
+          "version": "7.2.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "has-flag": "^4.0.0"
+          }
+        },
+        "vue-loader-v16": {
+          "version": "npm:vue-loader@16.8.3",
+          "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
+          "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "chalk": "^4.1.0",
+            "hash-sum": "^2.0.0",
+            "loader-utils": "^2.0.0"
+          },
+          "dependencies": {
+            "chalk": {
+              "version": "4.1.2",
+              "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+              "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "ansi-styles": "^4.1.0",
+                "supports-color": "^7.1.0"
+              }
+            }
+          }
         }
       }
     },
@@ -12025,94 +12115,6 @@
         }
       }
     },
-    "vue-loader-v16": {
-      "version": "npm:vue-loader@16.8.3",
-      "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
-      "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
-      "dev": true,
-      "optional": true,
-      "requires": {
-        "chalk": "^4.1.0",
-        "hash-sum": "^2.0.0",
-        "loader-utils": "^2.0.0"
-      },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
-          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
-          "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
-          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
-          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
-          "dev": true,
-          "optional": true
-        },
-        "emojis-list": {
-          "version": "3.0.0",
-          "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz",
-          "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==",
-          "dev": true,
-          "optional": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
-          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
-          "dev": true,
-          "optional": true
-        },
-        "loader-utils": {
-          "version": "2.0.2",
-          "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
-          "integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "big.js": "^5.2.2",
-            "emojis-list": "^3.0.0",
-            "json5": "^2.1.2"
-          }
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
-          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
-      }
-    },
     "vue-router": {
       "version": "3.5.1",
       "resolved": "https://registry.npm.taobao.org/vue-router/download/vue-router-3.5.1.tgz?cache=0&sync_timestamp=1617697843139&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-router%2Fdownload%2Fvue-router-3.5.1.tgz",
@@ -13064,7 +13066,8 @@
       "dependencies": {
         "ansi-regex": {
           "version": "5.0.0",
-          "resolved": "",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
+          "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
           "dev": true
         },
         "cliui": {

+ 23 - 12
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue

@@ -77,17 +77,15 @@
 
 
                     <!-- 相关维度 -->
-                    <van-field :value="item.weiduName" v-if="item.projectId && user.timeType.customDegreeActive == 1"  readonly  name="id" clickable :label="user.timeType.customDegreeName" placeholder="请选择" @click="clickPickers(index)"/>
+                    <van-field :value="item.weiduName" v-if="item.projectId && user.timeType.customDegreeActive == 1"  readonly  name="id" clickable :label="user.timeType.customDegreeName" placeholder="请选择" @click="clickPickers(index,item)"/>
                     <van-popup v-model="item.showPickDegree" position="bottom">
                         <van-picker show-toolbar :columns="item.wuduList" value-key="name" @confirm="choseProjects" @cancel="item.showPickDegree = false;$forceUpdate()" />
                     </van-popup>
 
                     <!-- 自定义数值 -->
-                    <van-field v-if="user.timeType.customDataActive==1" type="number" :disabled="!canEdit" v-model="item.customData" :label="user.timeType.customDataName" 
-                         placeholder="请输入数字" ></van-field> 
+                    <van-field v-if="user.timeType.customDataActive==1" type="number" :disabled="!canEdit" v-model="item.customData" :label="user.timeType.customDataName" placeholder="请输入数字" :rules="user.timeType.customDataStatus ? [{ required: true, message: '请选择' + user.timeType.customDataName }] : []"></van-field> 
                     <!-- 自定义文本 -->
-                    <van-field v-if="user.timeType.customTextActive==1" :disabled="!canEdit" v-model="item.customText" :label="user.timeType.customTextName" 
-                         placeholder="请输入" maxlength="25"></van-field> 
+                    <van-field v-if="user.timeType.customTextActive==1" :disabled="!canEdit" v-model="item.customText" :label="user.timeType.customTextName" placeholder="请输入" maxlength="25" :rules="user.timeType.customTextStatus ? [{ required: true, message: '请选择' + user.timeType.customTextName }] : []"></van-field> 
 
                     <van-cell title="专业进度" v-if="user.company.packageEngineering == 1">
                     </van-cell>
@@ -474,6 +472,7 @@
                 //清空分组和阶段
                 domainItem.stage = null;
                 domainItem.groupId = null;
+                domainItem.weiduName = null;
 
                 this.showPickerUserddp = false;
                 //获取子项目
@@ -488,7 +487,7 @@
 
                 // 获取1相关维度
                 this.getTaskList(domainItem.projectId)
-
+                this.dimension(domainItem.projectId)
                 //获取相关日报提交选择人
                 domainItem.projectAuditorId = null;
                 domainItem.projectAuditorName = null;
@@ -1020,6 +1019,8 @@
                 // console.log(i, item, this.form)
                 this.proIdx = i
                 this.showPickerUserddp = true
+                // console.log(item);
+                // this.dimension()
                 // this.$router.push({
                 //     path: '/search',
                 //     query: {
@@ -1029,12 +1030,14 @@
                 //     }
                 // });
             },
-            clickPickers(i) {
+            clickPickers(i,item) {
+                console.log('wudulist',item.wuduList);
                 if (!this.canEdit) return;
                 this.clickIndex = i;
-                this.form.domains[this.clickIndex].showPickDegree = true;
-                var proId = this.form.domains[this.clickIndex].projectId
-                this.dimension(proId)
+                // item.showPickDegree = true;
+                this.$set(item,'showPickDegree',true)
+                // var proId = this.form.domains[this.clickIndex].projectId
+                // this.dimension(proId)
             },
             //选择任务
             clickPickerTask(i) {
@@ -1055,10 +1058,12 @@
 
             choseProjects(value, index) {
                 // console.log(value)
+                if(value){
                 this.form.domains[this.clickIndex].weiduName = value.name;
                 this.form.domains[this.clickIndex].degreeId = value.id;
+                
+                this.$forceUpdate();}
                 this.form.domains[this.clickIndex].showPickDegree = false;
-                this.$forceUpdate();
             },
 
             choseSubProject(value, index) {
@@ -1318,7 +1323,13 @@
                         if(this.form.domains[i].degreeId) {
                             formData.append("degreeId", this.form.domains[i].degreeId);
                         } else {
-                            formData.append("degreeId", -1);
+                            if(this.user.timeType.customDegreeStatus && this.form.domains[i].wuduList.length){
+                                this.$toast.fail('请选择' + this.user.timeType.customDegreeName)
+                                return
+                            }else{
+                                formData.append("degreeId", -1);
+                            }
+                            
                         }
                     } else {
                         formData.append("degreeId", -1);

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

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