Parcourir la source

加个查看查看未分摊公共工时

Lijy il y a 3 semaines
Parent
commit
34f28e4bb2

+ 59 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -268,7 +268,8 @@
                 工单结算日期{{ obtainMonthlyFinancialModificationDate ? '(修改日期)' : '' }}:
                 <template v-if="!obtainMonthlyFinancialModificationDate">
                   {{ obtainMonthlyFinancialStatementsRows.timesheetDate }}
-                  <el-link type="primary" :underline="false" style="margin-left: 15px;" @click="modificationDate()">修改日期</el-link>
+                  <el-link type="primary" :underline="false" style="margin: 0 15px 0 15px;" @click="modificationDate()">修改日期</el-link>
+                  <el-link type="primary" :underline="false" @click="unallocatedPublicWorkingHours()">查看未分摊公共工时</el-link>
                 </template>
                 <template v-else>
                   <el-date-picker v-model="obtainMonthlyFinancialsRowsDates" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" size="small" :clearable="false" style="margin-right: 15px;width: 160px"></el-date-picker>
@@ -2067,6 +2068,34 @@
             <el-button type="primary" @click="immediate()">确认发送</el-button>
           </span>
         </el-dialog>
+
+        <!-- 查看未分摊公共工时 -->
+        <el-dialog title="查看未分摊公共工时" :visible.sync="unallocatedPublicWorkingHoursVisable" width="680px" top="5.6vh" :before-close="handleClose">
+          <div>
+            <el-table :data="unallocatedPublicWorkingHoursList" border height="400px" style="width: 100%">
+              <el-table-column prop="userReportDeptName" label="部门">
+                <template slot-scope="scope">
+                  <div>
+                    <span v-if="user.userNameNeedTranslate == '1'">
+                      <TranslationOpenDataText type='departmentName' :openid='scope.row.userReportDeptName'></TranslationOpenDataText>
+                    </span>
+                    <span v-if="user.userNameNeedTranslate != '1'">
+                      {{scope.row.userReportDeptName}}
+                    </span>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column prop="workingTime" label="未分摊公共工时(小时)">
+                <template slot-scope="scope">
+                  {{  (scope.row.workingTime || 0).toFixed(2)  }}
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+          <span slot="footer" class="dialog-footer">
+            <el-button @click="unallocatedPublicWorkingHoursVisable = false">关闭</el-button>
+          </span>
+        </el-dialog>
   </section>
 </template>
 
@@ -2355,6 +2384,10 @@ export default {
       timelyReportingOfTaskHoursList: [],
       timelyReportingOfTaskHoursLoading: false,
       isItAWorkOrderValue: '',
+
+      unallocatedPublicWorkingHoursVisable: false,
+      unallocatedPublicWorkingHoursList: [],
+      unallocatedPublicWorkingHoursLoading: false,
     };
   },
   computed: {},
@@ -2439,6 +2472,31 @@ export default {
       }
   },
   methods: {
+    unallocatedPublicWorkingHours() {
+      this.unallocatedPublicWorkingHoursVisable = true
+      this.unallocatedPublicWorkingHoursLoading = true
+      this.http.post('/finance-monthly-worktime/getUnDistriibutedPublicTime', {
+        fmwId: this.obtainMonthlyFinancialStatementsRows.id || ''
+      },
+      res => {
+          this.unallocatedPublicWorkingHoursLoading = false
+          if (res.code == "ok") {
+              this.unallocatedPublicWorkingHoursList = res.data || []
+          } else {
+              this.$message({
+              message: res.msg,
+              type: "error"
+              });
+          }
+      },
+      error => {
+          this.unallocatedPublicWorkingHoursLoading = false
+          this.$message({
+              message: error,
+              type: "error"
+          });
+      });
+    },
     expensesSummaries(param) {
       const { columns, data } = param;
         const sums = [];