Browse Source

提交上海代码

Lijy 1 week ago
parent
commit
7310b6418f

+ 64 - 0
fhKeeper/formulahousekeeper/timesheet/src/components/filePreview.vue

@@ -0,0 +1,64 @@
+<template>
+  <div>
+    <!-- 只有 Word 和 Excel 使用 iframe 预览 -->
+    <el-dialog
+      :visible.sync="dialogVisible"
+      width="100%"
+      :before-close="handleClose"
+      append-to-body
+      fullscreen
+    >
+      <div v-if="isOfficeFile">
+        <iframe :src="iframeSrc" width="100%" height="808px" frameborder="0"></iframe>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'FilePreview',
+  props: {
+    url: {
+      type: String,
+      required: true
+    }
+  },
+  data() {
+    return {
+      dialogVisible: false
+    };
+  },
+  computed: {
+    fileExtension() {
+      const queryRemoved = this.url.split('?')[0];
+      return queryRemoved.split('.').pop().toLowerCase();
+    },
+    isPdf() {
+      // return this.fileExtension === 'pdf';
+      return !(['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx'].includes(this.fileExtension));
+    },
+    isOfficeFile() {
+      return ['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx'].includes(this.fileExtension);
+    },
+    iframeSrc() {
+      if (this.isOfficeFile) {
+        return `https://view.officeapps.live.com/op/embed.aspx?src=${encodeURIComponent(this.url)}`;
+      }
+      return '';
+    }
+  },
+  methods: {
+    handleClose() {
+      this.dialogVisible = false;
+    }
+  },
+  mounted() {
+    if (this.isPdf) {
+      window.open(this.url, '_blank');
+    } else if (this.isOfficeFile) {
+      this.dialogVisible = true;
+    }
+  }
+};
+</script>

+ 4 - 0
fhKeeper/formulahousekeeper/timesheet/src/permissions.js

@@ -36,6 +36,7 @@ const StringUtil = {
         contractImport: false, // 导入合同 // 
         contractType: false, // 合同类型管理 // 
         contractAudit: false, // 审核合同 // 
+        contractStampDuty: false, // 印花税管理 //
 
         // 组织架构
         structurePersonnel: false, // 人员成本管理 (月成本,时薪,操作) //
@@ -118,6 +119,7 @@ const StringUtil = {
         reportAllTimelyTaskHours: false,  // 全部项目任务工时填报及时表 //
         reportRartTimelyTaskHours: false, // 部分项目任务工时填报及时表 //
         reportOnProductionAndManufacturingCosts: false, // 生产制造成本表 //
+        reportTheNumberOfWorkingHoursStatistics: false, // 工作包令号工时统计表 //
 
         // 请假模块
         leaveFil : false, // 请假填报 // 
@@ -314,6 +316,8 @@ const StringUtil = {
 
         arr[i] == '隐藏工时数' ? obj.reportHideWorkingHours = true : ''
         arr[i] == '生产制造成本表' ? obj.reportOnProductionAndManufacturingCosts = true : ''
+        arr[i] == '印花税管理' ? obj.contractStampDuty = true : ''
+        arr[i] == '工作包令号工时统计表' ? obj.reportTheNumberOfWorkingHoursStatistics = true : ''
     }
     return obj
   }

File diff suppressed because it is too large
+ 827 - 654
fhKeeper/formulahousekeeper/timesheet/src/views/contract/components/customContract.vue


+ 78 - 5
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -54,6 +54,7 @@
                   <el-menu-item index="1-32" v-if="permissions.reportMonthlyFinancialWorkSchedule" @click="ssl(31)"><p>月度财务工时表</p></el-menu-item>
                   <el-menu-item index="1-33" v-if="permissions.reportAllTimelyTaskHours || permissions.reportRartTimelyTaskHours" @click="ssl(32)"><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-submenu>
               </el-menu>
           </el-col>
@@ -1713,6 +1714,39 @@
               <el-table-column prop="salesCost" align="center" width="160" label="销售费用-工资"></el-table-column>
             </el-table>
           </template>
+
+          <!-- 工作包令号工时统计表 -->
+          <template v-if="ins == 34">
+            <el-table key="34" border :data="workPackageOrderNumber.dataList" highlight-current-row v-loading="workPackageOrderNumberLoading" :height="+tableHeight" style="width: 100%;" :max-height="+tableHeight + 50">
+              <el-table-column label="统计时间(h)" header-align="center">
+                <el-table-column label="成员信息" header-align="center">
+                  <el-table-column prop="roleName" label="角色" align="center" width="120"></el-table-column>
+                  <el-table-column prop="name" label="姓名" align="center" width="120">
+                    <template slot-scope="scope" >
+                      <span v-if="user.userNameNeedTranslate == '1'">
+                        <TranslationOpenDataText type='userName' :openid='scope.row.name'></TranslationOpenDataText>
+                      </span>
+                      <span v-if="user.userNameNeedTranslate != '1'">
+                        {{scope.row.name}}
+                      </span>
+                    </template>
+                  </el-table-column>
+                </el-table-column>
+                <el-table-column label="工作包令号" header-align="center">
+                  <el-table-column label="主飞控" header-align="center">
+                    <el-table-column :prop="item" :label="item"  width="200" align="center" v-for="(item,index) in (workPackageOrderNumber.mainFlyNumStrs || [])" :key="index"></el-table-column>
+                  </el-table-column>
+                  <el-table-column label="自动飞行" header-align="center">
+                    <el-table-column :prop="item" :label="item"  width="200" align="center" v-for="(item,index) in (workPackageOrderNumber.autoNumStrs || [])" :key="index"></el-table-column>
+                  </el-table-column>
+                  <el-table-column label="高升力" header-align="center">
+                    <el-table-column :prop="item" :label="item"  width="200" align="center" v-for="(item,index) in (workPackageOrderNumber.highNumStrs || [])" :key="index"></el-table-column>
+                  </el-table-column>
+                </el-table-column>
+              </el-table-column>
+              <el-table-column prop="sumTime" label="合计" align="center" width="120"></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">
@@ -2143,12 +2177,12 @@ export default {
     return {
       themeColor: getThemeColor(),
       screeningCondition: { // 筛选条件的判断
-        project: [4, 8, 9, 10, 11, 14, 15, 17, 19, 20, 21, 22, 28, 30, 31], // 项目筛选条件 (不等于)
+        project: [4, 8, 9, 10, 11, 14, 15, 17, 19, 20, 21, 22, 28, 30, 31,34], // 项目筛选条件 (不等于)
         months: [14, 15], // 月份筛选条件 (等于)
         monthRange: [19, 30], // 月份区间筛选条件 (等于)
         staff: [6, 8, 9, 19, 11, 14, 18, 23, 25, 26,28, 30, 32], // 人员筛选条件 (等于)
         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,33], // 时间段筛选条件 (等于)
+        timePeriod: [5, 6, 8, 9, 10, 11, 12, 16, 17, 18, 20, 21, 22, 24, 25, 26,28,33,34], // 时间段筛选条件 (等于)
       },
       efficentList:[],
       groupNames: [],
@@ -2207,14 +2241,14 @@ export default {
       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('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'),
       this.$t('projectbalancesheet'),this.$t('customerprojectincomestatement'),this.$t('projectphasetimesheet'),
       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('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,
       user: JSON.parse(sessionStorage.user),
@@ -2410,6 +2444,14 @@ export default {
 
       manufacturingCost: [],
       manufacturingCostLoading: false,
+
+      workPackageOrderNumber: {
+        mainFlyNumStrs: [],
+        highNumStrs: [],
+        dataList: [],
+        autoNumStrs: []
+      },
+      workPackageOrderNumberLoading: false,
     };
   },
   computed: {},
@@ -2607,6 +2649,8 @@ export default {
       if(this.permissions.reportFTEPlanAll || this.permissions.reportFTEPlanPart) {this.ssl(30);this.takCompletedStatus = '1-31';return} else
       if(this.permissions.reportMonthlyFinancialWorkSchedule) {this.ssl(31);this.takCompletedStatus = '1-32';return} else
       if(this.permissions.reportAllTimelyTaskHours || this.permissions.reportRartTimelyTaskHours) {this.ssl(32);this.takCompletedStatus = '1-33';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
       {this.allWrong = false}
     },
     rowspan(spanArr,position,spanName,dataItem = [],fields=false){
@@ -2911,7 +2955,7 @@ export default {
                 this.getGroupWorktimeAll()
             },
             getList(e) {
-              let noUserList = [16, 17, 18, 19, 20, 21, 22, 24, 25, 26,27,29,30,31,32,33]
+              let noUserList = [16, 17, 18, 19, 20, 21, 22, 24, 25, 26,27,29,30,31,32,33, 34]
               if(this.ins == 24) {
                 if(this.tabsType == 'all') {
                   this.rangeDatas = []
@@ -3020,6 +3064,9 @@ export default {
                 if (this.ins == 33) {
                   this.getManufacturingCost();
                 }
+                if(this.ins == 34) {
+                  this.getWorkPackageOrderNumber()
+                }
             },
       exportExcel() {
         var url = "/project";
@@ -3287,6 +3334,11 @@ export default {
           sl.projectId = this.proJuctId
           sl.startDate = this.rangeDatas[0]
           sl.endDate = this.rangeDatas[1]
+        } else if(this.ins == 34) {
+          fName = `工作包令号工时统计表.xlsx`
+          url = `/project/exportWorkOrderNumStatistics`
+          sl.startDate = this.rangeDatas[0]
+          sl.endDate = this.rangeDatas[1]
         }
         this.exportReportLoading = true
           this.http.post(url, sl,
@@ -4524,6 +4576,9 @@ export default {
       if(this.ins == 33) {
         this.getManufacturingCost()
       }
+      if(this.ins == 34) {
+        this.getWorkPackageOrderNumber()
+      }
     },
     getTaskPlanAndRealCost() {
       this.listLoading = true;
@@ -5335,6 +5390,24 @@ export default {
         this.manufacturingCostLoading = false
       })
     },
+
+    // 工作包令号工时统计表
+    getWorkPackageOrderNumber() {
+      let sl = {
+        pageIndex: this.page,
+        pageSize: this.size,
+        startDate: this.rangeDatas[0],
+        endDate: this.rangeDatas[1],
+      }
+      this.workPackageOrderNumberLoading = true
+      this.postData(`/project/getWorkOrderNumStatistics`, { ...sl }).then(res => { 
+        // this.workPackageOrderNumber = res.data || []
+        this.workPackageOrderNumber = res.data
+        this.total = res.data.totalCount
+      }).finally(() => {
+        this.workPackageOrderNumberLoading = false
+      })
+    },
     
     // 任务工时填报及时表开始合并
     timelyFormForFillingInTaskHoursSpanMethod({ row, column, rowIndex }) {

+ 45 - 8
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -1017,16 +1017,24 @@
             </div>
         </el-dialog>
         <!-- 主项目配置 -->
-        <el-dialog :title="$t('masterprojectmanagement')" show-header="false" v-if="mainProjectDialog" :visible.sync="mainProjectDialog" :close-on-click-modal="false" customClass="customWidth" width="800px">
+        <el-dialog :title="$t('masterprojectmanagement')" show-header="false" v-if="mainProjectDialog" :visible.sync="mainProjectDialog" :close-on-click-modal="false" customClass="customWidth" width="1000px">
             <el-table :data="mainProjectList" highlight-current-row  height="400" style="width: 100%;">
                 <el-table-column type="index" width="60" :label="$t('headerTop.serialNumber')">
                     <template slot-scope="scope" >
                             {{scope.$index+1+(page-1)*size}}
                         </template>
                 </el-table-column>
-                <el-table-column prop="code" :label="$t('bian-hao')" ></el-table-column>
-                <el-table-column prop="name" :label="$t('names')" ></el-table-column>
-                <el-table-column prop="categoryName" :label="$t('fen-lei-ming-cheng')" ></el-table-column>
+                <el-table-column prop="code" :label="'主项目编号'" ></el-table-column>
+                <el-table-column prop="name" :label="'主项目名称'" ></el-table-column>
+                <el-table-column prop="workOrderNum" :label="'工作包令号'" v-if="user.companyId == '4215'" width="200px"></el-table-column>
+                <el-table-column prop="workOrderNumType" :label="'包令号类型'" v-if="user.companyId == '4215'" width="120px">
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.workOrderNumType == 0">主飞控</span>
+                        <span v-if="scope.row.workOrderNumType == 1">自动飞行</span>
+                        <span v-if="scope.row.workOrderNumType == 2">高升力</span>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="categoryName" :label="$t('fen-lei-ming-cheng')"></el-table-column>
                 <el-table-column :label="$t('operation')" width="150">
                     <template slot-scope="scope" >
                         <el-button size="small" type="primary" @click="addManPro(scope.row)">{{ $t('bian-ji') }}</el-button>
@@ -1189,9 +1197,19 @@
                 <el-form-item :label="$t('mainProjectNo')">
                     <el-input v-model="addMainForm.code" :placeholder="$t('peaseenterthe')" clearable></el-input>
                 </el-form-item>
-                <el-form-item :label="$t('mainProjectName')" prop="name">
+                <el-form-item :label="$t('mainProjectName')">
                     <el-input v-model="addMainForm.name" :placeholder="$t('peaseenterthe')" clearable></el-input>
                 </el-form-item>
+                <el-form-item :label="'工作包令号'" v-if="user.companyId == 4215">
+                    <el-input v-model="addMainForm.workOrderNum" :placeholder="$t('peaseenterthe')" clearable maxlength="40"></el-input>
+                </el-form-item>
+                <el-form-item :label="'包令号类型'" v-if="user.companyId == 4215">
+                    <el-select v-model="addMainForm.workOrderNumType" :placeholder="$t('defaultText.pleaseChoose')" clearable >
+                        <el-option label="主飞控" :value="0"></el-option>
+                        <el-option label="自动飞行" :value="1"></el-option>
+                        <el-option label="高升力" :value="2"></el-option>
+                    </el-select>
+                </el-form-item>
                 <el-form-item :label="$t('projectclassification')">
                     <el-select v-model="addMainForm.categoryId" :placeholder="$t('defaultText.pleaseChoose')" clearable >
                         <el-option v-for="item in baseClfList" :key="item.id" :label="item.name" :value="item.id"></el-option>
@@ -1970,7 +1988,9 @@ a {
                     name:'',
                     id:'',
                     code: '',
-                    categoryId: ''
+                    categoryId: '',
+                    workOrderNum: '',
+                    workOrderNumType: ''
                 },
                 addPanthForm: {
                     id: '',
@@ -2790,19 +2810,36 @@ a {
             addManPro(row) {
                 this.addFlgmainProjectDialog = true
                 if(!row) {
-                    this.addMainForm = {
+                    let obj = {
                         name: '',
                         id: '',
                         code: '',
                         categoryId: ''
                     }
-                } else {
+                    if(this.user.companyId == '4215') {
+                        obj.workOrderNum = ''
+                        obj.workOrderNumType = ''
+                    }
                     this.addMainForm = {
+                        ...obj
+                    }
+                    
+                } else {
+                    let obj = {
                         id: row.id,
                         code: row.code,
                         name: row.name,
                         categoryId: row.categoryId,
                     }
+
+                    if(this.user.companyId == '4215') {
+                        obj.workOrderNum = row.workOrderNum
+                        obj.workOrderNumType =row.workOrderNumType
+                    }
+
+                    this.addMainForm = {
+                        ...obj
+                    }
                 }
             },
             addPanthPro(row) {