QuYueTing před 10 hodinami
rodič
revize
7d7fea4d34

+ 118 - 7
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -56,6 +56,7 @@
                   <el-menu-item index="1-34" v-if="permissions.reportOnProductionAndManufacturingCosts" @click="ssl(33)"><p>生产制造成本报表</p></el-menu-item>
                   <el-menu-item index="1-34" v-if="permissions.reportOnProductionAndManufacturingCosts" @click="ssl(33)"><p>生产制造成本报表</p></el-menu-item>
                   <el-menu-item index="1-35" v-if="permissions.reportTheNumberOfWorkingHoursStatistics" @click="ssl(34)"><p>工作包令号工时统计表</p></el-menu-item>
                   <el-menu-item index="1-35" v-if="permissions.reportTheNumberOfWorkingHoursStatistics" @click="ssl(34)"><p>工作包令号工时统计表</p></el-menu-item>
                   <el-menu-item index="1-36" v-if="permissions.reportAbnormal" @click="ssl(35)"><p>异常工时表</p></el-menu-item>
                   <el-menu-item index="1-36" v-if="permissions.reportAbnormal" @click="ssl(35)"><p>异常工时表</p></el-menu-item>
+                  <el-menu-item index="1-37" v-if="permissions.allowance" @click="ssl(36)"><p>餐补表</p></el-menu-item>
                 </el-submenu>
                 </el-submenu>
               </el-menu>
               </el-menu>
           </el-col>
           </el-col>
@@ -1847,8 +1848,73 @@
             </el-table>
             </el-table>
           </template>
           </template>
 
 
+          <!-- 餐补表 -->
+          <template v-if="ins == 36">
+            <el-table key="36" border :data="mealAllowanceList" highlight-current-row v-loading="mealAllowanceLoading" :height="+tableHeight" style="width: 100%;" :max-height="+tableHeight + 50">
+              <el-table-column prop="userName" align="center" label="姓名" width="120" fixed>
+                <template slot-scope="scope">
+                  <span v-if="user.userNameNeedTranslate == '1'">
+                    <TranslationOpenDataText type='userName' :openid='scope.row.corpwxUserid'></TranslationOpenDataText>
+                  </span>
+                  <span v-if="user.userNameNeedTranslate != '1'">
+                    {{scope.row.userName}}
+                  </span>
+                </template>
+              </el-table-column>
+              <el-table-column prop="jobNumber" align="center" label="工号" width="100"></el-table-column>
+              <el-table-column prop="departmentName" align="center" label="部门" width="150">
+                <template slot-scope="scope">
+                  <span v-if="user.userNameNeedTranslate == '1'">
+                    <TranslationOpenDataText type='departmentName' :openid='scope.row.departmentName'></TranslationOpenDataText>
+                  </span>
+                  <span v-if="user.userNameNeedTranslate != '1'">
+                    {{scope.row.departmentName}}
+                  </span>
+                </template>
+              </el-table-column>
+              <el-table-column prop="date" align="center" label="统计日期" width="120"></el-table-column>
+              <el-table-column prop="startTime" align="center" label="上班时间" width="120"></el-table-column>
+              <el-table-column prop="endTime" align="center" label="下班时间" width="120"></el-table-column>
+              <el-table-column prop="onDutyHours" align="center" label="在岗时长(h)" width="120">
+                <template slot-scope="scope">
+                  {{scope.row.onDutyHours ? scope.row.onDutyHours.toFixed(1) : '-'}}
+                </template>
+              </el-table-column>
+              <el-table-column prop="workHours" align="center" label="有效工作时长(h)" width="140">
+                <template slot-scope="scope">
+                  {{scope.row.workHours ? scope.row.workHours.toFixed(1) : '-'}}
+                </template>
+              </el-table-column>
+              <el-table-column prop="overtimeDuration" align="center" label="加班时长(h)" width="120">
+                <template slot-scope="scope">
+                  {{scope.row.overtimeDuration ? scope.row.overtimeDuration.toFixed(1) : '-'}}
+                </template>
+              </el-table-column>
+              <el-table-column prop="type" align="center" label="自动判断班次" width="120">
+                <template slot-scope="scope">
+                  {{scope.row.type == 0 ? '白班' : scope.row.type == 2 ? '小夜班' : scope.row.type == 3 ? '大夜班' : scope.row.type == 1 ? '白班' : scope.row.type == 4 ? '白班' : '-'}}
+                </template>
+              </el-table-column>
+              <el-table-column prop="type" align="center" label="是否跨凌晨" width="120">
+                <template slot-scope="scope">
+                  {{scope.row.type == 1 || scope.row.type == 2 || scope.row.type == 3 ? '是' : '否'}}
+                </template>
+              </el-table-column>
+              <el-table-column prop="allowance" align="center" label="补贴(元)" width="120">
+                <template slot-scope="scope">
+                  {{(scope.row.allowance ? scope.row.allowance.toFixed(2) : '0.00')}}
+                </template>
+              </el-table-column>
+              <el-table-column prop="type" align="center" label="补贴说明" min-width="200">
+                <template slot-scope="scope">
+                  {{scope.row.type == 0 ? '工作日加班≥ 3 小时,餐补 20 元' : scope.row.type == 1 ? '加班跨凌晨,餐补 30 元' : scope.row.type == 2 ? '小夜班,补贴 30 元' : scope.row.type == 3 ? '大夜班,补贴 50 元' : scope.row.type == 4 ? '非工作日加班,全天加班' : '-'}}
+                </template>
+              </el-table-column>
+            </el-table>
+          </template>
+
         <!--工具条-->
         <!--工具条-->
-        <el-col :span="24" class="toolbar" v-if="ins != 6 && ins != 20 && ins != 21 && tabPosition==0 && tabsType == 'all' && ins != 31 && ins != 32 && ins != 33">
+        <el-col :span="24" class="toolbar" v-if="ins != 6 && ins != 20 && ins != 21 && tabPosition==0 && tabsType == 'all' && ins != 31 && ins != 32 && ins != 33 && ins != 36">
           <el-pagination
           <el-pagination
                 v-if="ins == 12"
                 v-if="ins == 12"
                 @size-change="groupSizeChange"
                 @size-change="groupSizeChange"
@@ -2288,12 +2354,12 @@ export default {
       selectYmonth:this.dayjs(new Date()).format('YYYY-MM'),
       selectYmonth:this.dayjs(new Date()).format('YYYY-MM'),
       themeColor: getThemeColor(),
       themeColor: getThemeColor(),
       screeningCondition: { // 筛选条件的判断
       screeningCondition: { // 筛选条件的判断
-        project: [4, 8, 9, 10, 11, 14, 15, 17, 19, 20, 21, 22, 28, 30, 31,34,35], // 项目筛选条件 (不等于)
+        project: [4, 8, 9, 10, 11, 14, 15, 17, 19, 20, 21, 22, 28, 30, 31,34,35,36], // 项目筛选条件 (不等于)
         months: [14, 15], // 月份筛选条件 (等于)
         months: [14, 15], // 月份筛选条件 (等于)
         monthRange: [19, 30], // 月份区间筛选条件 (等于)
         monthRange: [19, 30], // 月份区间筛选条件 (等于)
-        staff: [6, 8, 9, 19, 11, 14, 18, 23, 25, 26,28, 30, 32, 35], // 人员筛选条件 (等于)
-        departments: [14, 15, 23,21,26,28,19, 30], // 部门筛选条件 (等于)
-        timePeriod: [5, 6, 8, 9, 10, 11, 12, 16, 17, 18, 20, 21, 22, 24, 25, 26,28,34,35], // 时间段筛选条件 (等于)
+        staff: [6, 8, 9, 19, 11, 14, 18, 23, 25, 26,28, 30, 32, 35, 36], // 人员筛选条件 (等于)
+        departments: [14, 15, 23,21,26,28,19, 30, 36], // 部门筛选条件 (等于)
+        timePeriod: [5, 6, 8, 9, 10, 11, 12, 16, 17, 18, 20, 21, 22, 24, 25, 26,28,34,35,36], // 时间段筛选条件 (等于)
       },
       },
       efficentList:[],
       efficentList:[],
       groupNames: [],
       groupNames: [],
@@ -2352,14 +2418,14 @@ export default {
       this.$t('statisticsofovertimework'),this.$t('timecostearlywarningtable'),this.$t('personneltimeallocationtable'),
       this.$t('statisticsofovertimework'),this.$t('timecostearlywarningtable'),this.$t('personneltimeallocationtable'),
       this.$t('statisticsofstafffillingintimerate'),this.$t('dailyreporttobereviewedstatistics'),this.$t('statisticsofpersonnelhours'),this.$t('taskgrouptimesheet'),this.$t('projectcostbaselinetable'),
       this.$t('statisticsofstafffillingintimerate'),this.$t('dailyreporttobereviewedstatistics'),this.$t('statisticsofpersonnelhours'),this.$t('taskgrouptimesheet'),this.$t('projectcostbaselinetable'),
       this.$t('ren-yuan-yue-du-gong-shi-biao'), this.$t('bumenchanyuqingkuang'), this.$t('ge-fen-zu-yu-jie-duan-gong-shi-biao'), this.$t('ziXiangMuGongShiChengBenBiao'), this.$t('renWuZhongQiBiao'), this.$t('fteBaoBiao'), this.$t('youXiaoGongShiShuaiBiao'), this.$t('xiangMuFenLeiGongShiZhanBiBiao'), this.$t('fenLeiGongShiMingXiBiao'),
       this.$t('ren-yuan-yue-du-gong-shi-biao'), this.$t('bumenchanyuqingkuang'), this.$t('ge-fen-zu-yu-jie-duan-gong-shi-biao'), this.$t('ziXiangMuGongShiChengBenBiao'), this.$t('renWuZhongQiBiao'), this.$t('fteBaoBiao'), this.$t('youXiaoGongShiShuaiBiao'), this.$t('xiangMuFenLeiGongShiZhanBiBiao'), this.$t('fenLeiGongShiMingXiBiao'),
-      this.$t('yuanGongXiangMuJinDuBiao'), this.$t('fenZuHaoYongJinDuBiao'), this.$t('xiangMuHaoYongJinDuBiao'), this.$t('yuanGongRenWuJinDuBiao'), this.$t('xiangMuYuGuGongShiBiao'),this.$t('yuanGongRenWuWanChengQingKuangBiao'), this.$t('taskPlanCostReport'), 'FTE计划报表', '月度财务工时表', '任务工时填报及时表', '生产制造成本报表', '工作包令号工时统计表', '异常工时表'],
+      this.$t('yuanGongXiangMuJinDuBiao'), this.$t('fenZuHaoYongJinDuBiao'), this.$t('xiangMuHaoYongJinDuBiao'), this.$t('yuanGongRenWuJinDuBiao'), this.$t('xiangMuYuGuGongShiBiao'),this.$t('yuanGongRenWuWanChengQingKuangBiao'), this.$t('taskPlanCostReport'), 'FTE计划报表', '月度财务工时表', '任务工时填报及时表', '生产制造成本报表', '工作包令号工时统计表', '异常工时表', '餐补表'],
 
 
       shuzArr: [this.$t('projectreport'),this.$t('projectTaskReport'),this.$t('projectcoststatement'),
       shuzArr: [this.$t('projectreport'),this.$t('projectTaskReport'),this.$t('projectcoststatement'),
       this.$t('projectbalancesheet'),this.$t('customerprojectincomestatement'),this.$t('projectphasetimesheet'),
       this.$t('projectbalancesheet'),this.$t('customerprojectincomestatement'),this.$t('projectphasetimesheet'),
       this.$t('statisticsofovertimework'),this.$t('timecostearlywarningtable'),this.$t('personneltimeallocationtable'),
       this.$t('statisticsofovertimework'),this.$t('timecostearlywarningtable'),this.$t('personneltimeallocationtable'),
       this.$t('employeereporttimelinessrate'),this.$t('dailyreporttobereviewedstatistics'),this.$t('statisticsofpersonnelhours'),this.$t('taskgrouptimesheet'),this.$t('projectcostbaselinetable'),
       this.$t('employeereporttimelinessrate'),this.$t('dailyreporttobereviewedstatistics'),this.$t('statisticsofpersonnelhours'),this.$t('taskgrouptimesheet'),this.$t('projectcostbaselinetable'),
       this.$t('ren-yuan-yue-du-gong-shi-biao'), this.$t('bumenchanyuqingkuang'), this.$t('ge-fen-zu-yu-jie-duan-gong-shi-biao'), this.$t('ziXiangMuGongShiChengBenBiao'), this.$t('renWuZhongQiBiao'), this.$t('fteBaoBiao'),this.$t('youXiaoGongShiShuaiBiao'), this.$t('xiangMuFenLeiGongShiZhanBiBiao'), this.$t('fenLeiGongShiMingXiBiao'),
       this.$t('ren-yuan-yue-du-gong-shi-biao'), this.$t('bumenchanyuqingkuang'), this.$t('ge-fen-zu-yu-jie-duan-gong-shi-biao'), this.$t('ziXiangMuGongShiChengBenBiao'), this.$t('renWuZhongQiBiao'), this.$t('fteBaoBiao'),this.$t('youXiaoGongShiShuaiBiao'), this.$t('xiangMuFenLeiGongShiZhanBiBiao'), this.$t('fenLeiGongShiMingXiBiao'),
-      this.$t('yuanGongXiangMuJinDuBiao'), this.$t('fenZuHaoYongJinDuBiao'), this.$t('xiangMuHaoYongJinDuBiao'), this.$t('yuanGongRenWuJinDuBiao'), this.$t('xiangMuYuGuGongShiBiao'),this.$t('yuanGongRenWuWanChengQingKuangBiao'), this.$t('taskPlanCostReport'), 'FTE计划报表', '月度财务工时表', '任务工时填报及时表', '生产制造成本报表', '工作包令号工时统计表', '异常工时表'],
+      this.$t('yuanGongXiangMuJinDuBiao'), this.$t('fenZuHaoYongJinDuBiao'), this.$t('xiangMuHaoYongJinDuBiao'), this.$t('yuanGongRenWuJinDuBiao'), this.$t('xiangMuYuGuGongShiBiao'),this.$t('yuanGongRenWuWanChengQingKuangBiao'), this.$t('taskPlanCostReport'), 'FTE计划报表', '月度财务工时表', '任务工时填报及时表', '生产制造成本报表', '工作包令号工时统计表', '异常工时表', '餐补表'],
 
 
       ins: 10000,
       ins: 10000,
       user: JSON.parse(sessionStorage.user),
       user: JSON.parse(sessionStorage.user),
@@ -2574,6 +2640,10 @@ export default {
       // 附件照片查看
       // 附件照片查看
       attachmentDialogVisible: false,
       attachmentDialogVisible: false,
       attachmentImages: [],
       attachmentImages: [],
+
+      // 餐补表
+      mealAllowanceList: [],
+      mealAllowanceLoading: false,
     };
     };
   },
   },
   computed: {},
   computed: {},
@@ -2818,6 +2888,7 @@ export default {
       if(this.permissions.reportOnProductionAndManufacturingCosts) {this.ssl(33);this.takCompletedStatus = '1-34';return} else
       if(this.permissions.reportOnProductionAndManufacturingCosts) {this.ssl(33);this.takCompletedStatus = '1-34';return} else
       if(this.permissions.reportTheNumberOfWorkingHoursStatistics) {this.ssl(34);this.takCompletedStatus = '1-35';return} else
       if(this.permissions.reportTheNumberOfWorkingHoursStatistics) {this.ssl(34);this.takCompletedStatus = '1-35';return} else
       if(this.permissions.reportAbnormal) {this.ssl(35);this.defaultActive = '1-36';return} else
       if(this.permissions.reportAbnormal) {this.ssl(35);this.defaultActive = '1-36';return} else
+      if(this.permissions.allowance) {this.ssl(36);this.defaultActive = '1-37';return} else
       {this.allWrong = false}
       {this.allWrong = false}
     },
     },
     rowspan(spanArr,position,spanName,dataItem = [],fields=false){
     rowspan(spanArr,position,spanName,dataItem = [],fields=false){
@@ -3273,6 +3344,9 @@ export default {
                 if(this.ins == 35) {
                 if(this.ins == 35) {
                   this.getAbnormalWorkHours()
                   this.getAbnormalWorkHours()
                 }
                 }
+                if(this.ins == 36) {
+                  this.getMealAllowance()
+                }
             },
             },
       exportExcel() {
       exportExcel() {
         var url = "/project";
         var url = "/project";
@@ -3552,6 +3626,17 @@ export default {
           if(this.userId) {
           if(this.userId) {
             sl.userId = this.userId
             sl.userId = this.userId
           }
           }
+        } else if(this.ins == 36) {
+          fName = `餐补表.xlsx`
+          url = `/overtime-allowance/export`
+          sl.startDate = this.rangeDatas[0]
+          sl.endDate = this.rangeDatas[1]
+          if(this.userId) {
+            sl.userId = this.userId
+          }
+          if(this.departmentIdArray.length != 0){
+            sl.departmentId = this.departmentIdArray[this.departmentIdArray.length - 1]
+          }
         }
         }
         this.exportReportLoading = true
         this.exportReportLoading = true
           this.http.post(url, sl,
           this.http.post(url, sl,
@@ -4854,6 +4939,9 @@ export default {
       else if (this.ins == 35) {
       else if (this.ins == 35) {
         this.getAbnormalWorkHours();
         this.getAbnormalWorkHours();
       }
       }
+      else if (this.ins == 36) {
+        this.getMealAllowance();
+      }
     },
     },
     getTaskPlanAndRealCost() {
     getTaskPlanAndRealCost() {
       this.listLoading = true;
       this.listLoading = true;
@@ -5709,6 +5797,29 @@ export default {
       })
       })
     },
     },
 
 
+    // 获取餐补表
+    getMealAllowance() {
+      this.mealAllowanceLoading = true
+      let parameter = {
+        pageIndex: this.page,
+        pageSize: this.size,
+        startDate: this.rangeDatas[0],
+        endDate: this.rangeDatas[1]
+      }
+      if(this.userId) {
+        parameter.userId = this.userId
+      }
+      if(this.departmentIdArray.length != 0){
+        parameter.departmentId = this.departmentIdArray[this.departmentIdArray.length - 1]
+      }
+      this.postData(`/overtime-allowance/getList`, parameter).then(res => {
+        this.mealAllowanceList = res.data.records || []
+        this.total = res.data.total || 0
+      }).finally(() => {
+        this.mealAllowanceLoading = false
+      })
+    },
+
     // 查看附件照片
     // 查看附件照片
     viewAttachments(picStr) {
     viewAttachments(picStr) {
       if (!picStr) {
       if (!picStr) {

+ 135 - 13
fhKeeper/formulahousekeeper/timesheet/src/views/project/financeComponents/salaryDetails.vue

@@ -36,7 +36,7 @@
                 <el-form-item v-if="permissions.financialProportion" style="margin-left:5px;">
                 <el-form-item v-if="permissions.financialProportion" style="margin-left:5px;">
                     <el-link type="primary" :underline="false" @click="showProjSettingDialog()"
                     <el-link type="primary" :underline="false" @click="showProjSettingDialog()"
                         v-if="user.companyId == 88">{{ $t('ApportionmentProjsetting') }}</el-link>
                         v-if="user.companyId == 88">{{ $t('ApportionmentProjsetting') }}</el-link>
-                    <el-link type="primary" :underline="false" @click="showSettingDialog()" style="margin-left:50px;">{{
+                    <el-link v-if="!user.timeType.financeTwiceAssign" type="primary" :underline="false" @click="showSettingDialog()" style="margin-left:50px;">{{
                         $t('Apportionmentratesetting') }}</el-link>
                         $t('Apportionmentratesetting') }}</el-link>
                 </el-form-item>
                 </el-form-item>
                 <el-form-item style="float:right;" v-if="permissions.financialUpload">
                 <el-form-item style="float:right;" v-if="permissions.financialUpload">
@@ -1696,14 +1696,54 @@ export default {
                             this.hasNoProjectUsers = false;
                             this.hasNoProjectUsers = false;
                         }
                         }
 
 
+                        var firstCostList = [];  // 一次分摊数据
+                        var secondCostList = []; // 无工时二次分摊数据
+                        var thirdCostList = [];  // 非项目二次分摊数据
+                        var yList = []; // 原始单一数据列表(不启用二次分摊时使用)
+                        
                         for (var i in list) {
                         for (var i in list) {
                             xList.push(list[i].project);
                             xList.push(list[i].project);
-
-                            yList.push({
-                                "value": list[i].cost,
-                                "id": list[i].id,
-                                "time": list[i].workingTime
-                            });
+                            
+                            // 如果启用了二次分摊功能
+                            if (_this.user.timeType.financeTwiceAssign) {
+                                var secondCost = list[i].secondCost || 0;
+                                var thirdCost = list[i].thirdCost || 0;
+                                var firstCost = (list[i].cost - secondCost - thirdCost).toFixed(2);
+                                
+                                firstCostList.push({
+                                    "value": firstCost,
+                                    "id": list[i].id,
+                                    "time": list[i].workingTime,
+                                    "totalCost": list[i].cost,
+                                    "secondCost": secondCost,
+                                    "thirdCost": thirdCost
+                                });
+                                
+                                secondCostList.push({
+                                    "value": secondCost,
+                                    "id": list[i].id,
+                                    "time": list[i].workingTime,
+                                    "totalCost": list[i].cost,
+                                    "secondCost": secondCost,
+                                    "thirdCost": thirdCost
+                                });
+                                
+                                thirdCostList.push({
+                                    "value": thirdCost,
+                                    "id": list[i].id,
+                                    "time": list[i].workingTime,
+                                    "totalCost": list[i].cost,
+                                    "secondCost": secondCost,
+                                    "thirdCost": thirdCost
+                                });
+                            } else {
+                                // 不启用二次分摊时,使用原来的单一数据结构
+                                yList.push({
+                                    "value": list[i].cost,
+                                    "id": list[i].id,
+                                    "time": list[i].workingTime
+                                });
+                            }
                         }
                         }
 
 
                         var myChart = echarts.init(document.getElementById("container"));
                         var myChart = echarts.init(document.getElementById("container"));
@@ -1745,8 +1785,35 @@ export default {
                             tooltip: {
                             tooltip: {
                                 trigger: 'axis',
                                 trigger: 'axis',
                                 formatter: function (params, ticket, callback) {
                                 formatter: function (params, ticket, callback) {
-                                    var res = params[0].name + "<br/>" + _this.$t('workcost') + " : " + params[0].data.value
-                                        + _this.$t('yuan') + "<br/>" + _this.$t('screening.workTime') + " : " + params[0].data.time + _this.$t('time.hour');
+                                    var res = '';
+                                    
+                                    // 如果启用了二次分摊功能
+                                    if (_this.user.timeType.financeTwiceAssign) {
+                                        var projectName = params[0].name;
+                                        var totalCost = params[0].data.totalCost;
+                                        var workTime = params[0].data.time;
+                                        var firstCost = params[0].value;
+                                        var secondCost = params.length > 1 ? params[1].value : 0;
+                                        var thirdCost = params.length > 2 ? params[2].value : 0;
+                                        
+                                        res = projectName + "<br/>" 
+                                            + _this.$t('workcost') + " : " + totalCost + _this.$t('yuan') + "<br/>"
+                                            + _this.$t('screening.workTime') + " : " + workTime + _this.$t('time.hour') + "<br/>"
+                                            + "一次分摊 : " + firstCost + _this.$t('yuan');
+                                        
+                                        if (secondCost > 0) {
+                                            res += "<br/>无工时二次分摊 : " + secondCost + _this.$t('yuan');
+                                        }
+                                        
+                                        if (thirdCost > 0) {
+                                            res += "<br/>非项目二次分摊 : " + thirdCost + _this.$t('yuan');
+                                        }
+                                    } else {
+                                        // 不启用二次分摊时,使用原来的显示方式
+                                        res = params[0].name + "<br/>" + _this.$t('workcost') + " : " + params[0].data.value
+                                            + _this.$t('yuan') + "<br/>" + _this.$t('screening.workTime') + " : " + params[0].data.time + _this.$t('time.hour');
+                                    }
+                                    
                                     _this.params = params;
                                     _this.params = params;
                                     return res;
                                     return res;
                                 }
                                 }
@@ -1762,14 +1829,69 @@ export default {
                                 axisLabel: {
                                 axisLabel: {
                                     formatter: '{value} (' + _this.$t('yuan') + ')'
                                     formatter: '{value} (' + _this.$t('yuan') + ')'
                                 }
                                 }
-                            }],
-                            series: [{
+                            }]
+                        };
+                        
+                        // 根据是否启用二次分摊功能来配置不同的图例和系列
+                        if (_this.user.timeType.financeTwiceAssign) {
+                            option.legend = {
+                                data: ['一次分摊', '无工时二次分摊', '非项目二次分摊'],
+                                top: 10,
+                                left: 'center'
+                            };
+                            option.series = [
+                                {
+                                    name: '一次分摊',
+                                    type: 'bar',
+                                    stack: 'cost',
+                                    barMaxWidth: 30,
+                                    data: firstCostList,
+                                    label: {
+                                        show: true,
+                                        position: 'inside',
+                                        formatter: function(params) {
+                                            return params.value > 0 ? params.value : '';
+                                        }
+                                    }
+                                },
+                                {
+                                    name: '无工时二次分摊',
+                                    type: 'bar',
+                                    stack: 'cost',
+                                    barMaxWidth: 30,
+                                    data: secondCostList,
+                                    label: {
+                                        show: true,
+                                        position: 'inside',
+                                        formatter: function(params) {
+                                            return params.value > 0 ? params.value : '';
+                                        }
+                                    }
+                                },
+                                {
+                                    name: '非项目二次分摊',
+                                    type: 'bar',
+                                    stack: 'cost',
+                                    barMaxWidth: 30,
+                                    data: thirdCostList,
+                                    label: {
+                                        show: true,
+                                        position: 'inside',
+                                        formatter: function(params) {
+                                            return params.value > 0 ? params.value : '';
+                                        }
+                                    }
+                                }
+                            ];
+                        } else {
+                            // 不启用二次分摊时,使用原来的单一系列
+                            option.series = [{
                                 name: _this.$t('screening.workTime') + '(h)',
                                 name: _this.$t('screening.workTime') + '(h)',
                                 type: 'bar',
                                 type: 'bar',
                                 barMaxWidth: 30,
                                 barMaxWidth: 30,
                                 data: yList,
                                 data: yList,
-                            }]
-                        };
+                            }];
+                        }
                         option && myChart.setOption(option, { notMerge: true });
                         option && myChart.setOption(option, { notMerge: true });
                         // myChart.getZr().on('click', params => {
                         // myChart.getZr().on('click', params => {
                         //     const pointInPixel = [params.offsetX, params.offsetY];
                         //     const pointInPixel = [params.offsetX, params.offsetY];