From 02c792cdc9ca7f2264b4270227ccd1c447782510 Mon Sep 17 00:00:00 2001
From: weicd <weicd@yhzhg.cn>
Date: Mon, 13 Feb 2023 02:23:56 +0000
Subject: [PATCH] Merge branch 'master' of http://192.168.1.110:5678/r/pms-upgrade into weicd

---
 eladmin-web-master/src/views/task/task/index.vue |   26 ++++++++++++++++----------
 1 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/eladmin-web-master/src/views/task/task/index.vue b/eladmin-web-master/src/views/task/task/index.vue
index 1a8e943..e993d91 100644
--- a/eladmin-web-master/src/views/task/task/index.vue
+++ b/eladmin-web-master/src/views/task/task/index.vue
@@ -93,6 +93,7 @@
                 :key="item.id"
                 :label="item.name"
                 :value="item.id"
+                :disabled="item.approveStatus == approveStatusUnrecognized"
               />
             </el-select>
           </el-form-item>
@@ -197,13 +198,13 @@
         <el-table-column :show-overflow-tooltip="true" prop="planEndTime" label="计划结束时间" width="140" />
         <el-table-column :show-overflow-tooltip="true" label="已完成 / 已分配 / 计划工时" width="160">
           <template slot-scope="scope">
-            {{ scope.row.completedHours }} / {{ scope.row.divideHours }} / {{ scope.row.planHours }}
+            {{ crud.toMaxTwoDecimalPlaces(scope.row.completedHours) }} / {{ scope.row.divideHours }} / {{ scope.row.planHours }}
           </template>
         </el-table-column>
         <el-table-column :show-overflow-tooltip="true" label="已完成 / 已分配 / 计划工作量" width="180">
           <template slot-scope="scope">
             <span>
-              {{ scope.row.completedWorkload }} / {{ scope.row.divideWorkload }} / {{ scope.row.planWorkload == null || scope.row.planWorkload == '' ? 0 : scope.row.planWorkload }}
+              {{ crud.toMaxTwoDecimalPlaces(scope.row.completedWorkload) }} / {{ scope.row.divideWorkload }} / {{ scope.row.planWorkload == null || scope.row.planWorkload == '' ? 0 : scope.row.planWorkload }}
             </span>
           </template>
         </el-table-column>
@@ -248,7 +249,7 @@
           <el-form-item label="任务名称" prop="taskName">
             {{ divideForm.taskName }}
           </el-form-item>
-          <el-form-item label="分配用户" prop="userIds">
+          <el-form-item label="分配员工" prop="userIds">
             <el-select v-model="divideForm.userIds" filterable clearable multiple placeholder="请选择" style="width: 340px;">
               <el-option
                 v-for="item in users"
@@ -256,7 +257,10 @@
                 :label="item.nickName"
                 :value="item.id"
                 :disabled="!item.enabled || divideForm.divideUserIds.includes(item.id)"
-              />
+              >
+                <span style="float: left">{{ item.nickName }}</span>
+                <span style="float: right; color: #8492a6; font-size: 13px">{{ item.levelName }}</span>
+              </el-option>
             </el-select>
           </el-form-item>
           <el-form-item label="任务开始时间" prop="taskStartDate">
@@ -311,11 +315,11 @@
   data() {
     // 指针重指向
     const _this = this
-    // 时长(千内)验证
+    // 时长(万内)验证
     var durationValidate = (rule, value, callback) => {
-      const reg = /^([0-9]|[1-9]\d{1,2})(\.\d{1,2})?$|1000$/
+      const reg = /^([0-9]|[1-9]\d{1,3})(\.\d{1,2})?$/
       if (value != null && value !== '' && !reg.test(value)) {
-        callback(new Error('请输入 一千 以内的正整数或两位小数'))
+        callback(new Error('请输入 一万 以内的正整数或两位小数'))
       } else {
         callback()
       }
@@ -384,6 +388,8 @@
       standardWorkloadUnit: constant.STANDARD_WORKLOAD_UNIT,
       // 字典:任务状态
       taskStatus: constant.TASK_STATUS,
+      // 字典:批准状态-未承认
+      approveStatusUnrecognized: constant.APPROVE_STATUS_UNRECOGNIZED,
       // CRUD状态
       crudStatusPrepared: CRUD.STATUS.PREPARED,
       // 项目列表
@@ -395,11 +401,11 @@
       // 分配表单加载
       divideLoading: false,
       // 分配表单数据
-      divideForm: { projectId: null, projectName: null, taskId: null, taskname: null, userIds: [], divideUserIds: [], taskStartDate: null, taskEndDate: null, taskHours: null, taskWorkload: null, taskStatus: null },
+      divideForm: { projectId: null, projectName: null, taskId: null, taskName: null, userIds: [], divideUserIds: [], taskStartDate: null, taskEndDate: null, taskHours: null, taskWorkload: null, taskStatus: null },
       // 分配表单验证
       divideRules: {
         userIds: [
-          { required: true, message: '分配用户不能为空', trigger: 'change' }
+          { required: true, message: '分配员工不能为空', trigger: 'change' }
         ],
         taskStartDate: [
           { required: true, message: '任务开始时间不能为空', trigger: 'change' }
@@ -544,7 +550,7 @@
       // 分配表单加载
       this.divideLoading = false
       // 分配表单数据
-      this.divideForm = { projectId: null, projectName: null, taskId: null, taskname: null, userIds: [], divideUserIds: [], taskStartDate: null, taskEndDate: null, taskHours: null, taskWorkload: null, taskStatus: null }
+      this.divideForm = { projectId: null, projectName: null, taskId: null, taskName: null, userIds: [], divideUserIds: [], taskStartDate: null, taskEndDate: null, taskHours: null, taskWorkload: null, taskStatus: null }
       // 清除表单验证
       this.$nextTick(() => {
         this.$refs['divideForm'].clearValidate()

--
Gitblit v1.9.3