Browse Source

提交按周填报

Lijy 1 year ago
parent
commit
a8e96f0003

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

@@ -4,17 +4,17 @@ var path = require('path')
 //var ip = '47.101.180.183'
 // var ip = '47.100.37.243'
 // var ip = '192.168.10.2'
-// var ip = '192.168.2.13' 
+var ip = '192.168.2.63' 
 
-var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
-for (var i in ifaces) {
-    for (var j in ifaces[i]) {
-        var val = ifaces[i][j]
-        if (val.family === 'IPv4' && val.address !== '127.0.0.1') {
-            ip = val.address
-        }
-    }
-}
+// var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
+// for (var i in ifaces) {
+//     for (var j in ifaces[i]) {
+//         var val = ifaces[i][j]
+//         if (val.family === 'IPv4' && val.address !== '127.0.0.1') {
+//             ip = val.address
+//         }
+//     }
+// }
 // 1196735749
 module.exports = {
   build: {

+ 150 - 131
fhKeeper/formulahousekeeper/timesheet/index.html

@@ -1,149 +1,168 @@
 <!DOCTYPE html>
 <html>
-    <head>
-        <meta charset="utf-8">
-        <!-- 尝试清除打包缓存 -->
-        <!-- <meta http-equiv="pragram" content="no-cache">
+  <head>
+    <meta charset="utf-8" />
+    <!-- 尝试清除打包缓存 -->
+    <!-- <meta http-equiv="pragram" content="no-cache">
         <meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate">
         <meta http-equiv="expires" content="0"> -->
-        <!-- 尝试清除打包缓存 -->
-        <title>工时管家</title>
-        <link rel="shortcut icon" type="image/x-icon" href="./favicon.ico"/>
-        <link href="./static/css/public.css" rel="stylesheet" type="text/css"/>
-        <!-- 引入样式 -->
-        <link href="https://cdn.staticfile.org/element-ui/2.13.0/theme-chalk/index.css" rel="stylesheet">
-        <!-- <link rel="stylesheet" href="./static/js/element-uiCss.css"> -->
-        <!-- 接入JQ  -->
-        <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
-        <!-- <script src="./static/js/jquery.min.js"></script> -->
-        <style>
-            /* 滚动条样式修改 */
-            /*滚动条凹槽的颜色,还可以设置边框属性 */
-            ::-webkit-scrollbar-track-piece {
-                background-color:#f8f8f8;
-                -webkit-border-radius: 2em;
-                -moz-border-radius: 2em;
-                border-radius: 2em;
-            }
-            /*滚动条的宽度*/
-            ::-webkit-scrollbar {
-                width:9px;
-            height: 9px;}
-            /*滚动条的设置*/
-            ::-webkit-scrollbar-thumb {
-                background-color:#dddddd;
-                background-clip:padding-box;
-                -webkit-border-radius: 2em;
-                -moz-border-radius: 2em;
-                border-radius: 2em;}
+    <!-- 尝试清除打包缓存 -->
+    <title>工时管家</title>
+    <link rel="shortcut icon" type="image/x-icon" href="./favicon.ico" />
+    <link href="./static/css/public.css" rel="stylesheet" type="text/css" />
+    <!-- 引入样式 -->
+    <link
+      href="https://cdn.staticfile.org/element-ui/2.13.0/theme-chalk/index.css"
+      rel="stylesheet"
+    />
+    <!-- <link rel="stylesheet" href="./static/js/element-uiCss.css"> -->
+    <!-- 接入JQ  -->
+    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
+    <!-- <script src="./static/js/jquery.min.js"></script> -->
+    <style>
+      /* 滚动条样式修改 */
+      /*滚动条凹槽的颜色,还可以设置边框属性 */
+      ::-webkit-scrollbar-track-piece {
+        background-color: #f8f8f8;
+        -webkit-border-radius: 2em;
+        -moz-border-radius: 2em;
+        border-radius: 2em;
+      }
+      /*滚动条的宽度*/
+      ::-webkit-scrollbar {
+        width: 9px;
+        height: 9px;
+      }
+      /*滚动条的设置*/
+      ::-webkit-scrollbar-thumb {
+        background-color: #dddddd;
+        background-clip: padding-box;
+        -webkit-border-radius: 2em;
+        -moz-border-radius: 2em;
+        border-radius: 2em;
+      }
 
-            /*滚动条鼠标移上去*/
-            ::-webkit-scrollbar-thumb:hover {
-                background-color:#bbb;
-            }
+      /*滚动条鼠标移上去*/
+      ::-webkit-scrollbar-thumb:hover {
+        background-color: #bbb;
+      }
 
-            /*取消消息列表弹出框的内边距*/
-            .popover-self {
-                padding: 0 !important;
-            }
+      /*取消消息列表弹出框的内边距*/
+      .popover-self {
+        padding: 0 !important;
+      }
 
-            /*自定义颜色*/
-            #nprogress .bar {
-                background:#f58220 !important; 
-            }
+      /*自定义颜色*/
+      #nprogress .bar {
+        background: #f58220 !important;
+      }
 
-            .selectworktime .el-dialog__header{
-                padding-top:0;
-                padding-bottom:0;
-            }
-            .selectworktime .el-dialog__body{
-                padding-top:15px;
-            }
-            .el-dialog__headerbtn{
-                z-index: 2002;
-            }
-            .selecteorktime_datapick_popper{
-                left: 12vh !important;
-            }
-            .customsalary .el-input__inner{
-                height: 35px;
-                line-height: 35px;
-            }
-            .projectSelectPopperClass{
-                max-width: 1000px;
-            }
-            .projectSelectPopperClass li{
-                overflow: hidden;
-                white-space: nowrap;
-                text-overflow: ellipsis;
-            }
-            .projectSelectPopperClass .el-select-dropdown__item span:nth-child(1){
-                font-size: 13px;
-                height: 34px;
-                max-width: 350px;
-            }
-            .projectSelectPopperClass .el-select-dropdown__item span:nth-child(2){
-                font-size: 13px;
-                height: 34px;
-                max-width: 650px;
-                
-                text-align: right;
-            }
+      .selectworktime .el-dialog__header {
+        padding-top: 0;
+        padding-bottom: 0;
+      }
+      .selectworktime .el-dialog__body {
+        padding-top: 15px;
+      }
+      .el-dialog__headerbtn {
+        z-index: 2002;
+      }
+      .selecteorktime_datapick_popper {
+        left: 12vh !important;
+      }
+      .customsalary .el-input__inner {
+        height: 35px;
+        line-height: 35px;
+      }
+      .projectSelectPopperClass {
+        max-width: 1000px;
+      }
+      .projectSelectPopperClass li {
+        overflow: hidden;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+      }
+      .projectSelectPopperClass .el-select-dropdown__item span:nth-child(1) {
+        font-size: 13px;
+        height: 34px;
+        max-width: 350px;
+      }
+      .projectSelectPopperClass .el-select-dropdown__item span:nth-child(2) {
+        font-size: 13px;
+        height: 34px;
+        max-width: 650px;
 
-            /* 清除浮动 */
-	.clearfix:after{
-		content: ""; 
-		display: block; 
-		height: 0; 
-		clear: both; 
-		visibility: hidden;  
-	}
-	.clearfix {
-		/* 触发 hasLayout */ 
-		zoom: 1; 
-	}
-        </style>
-        <!-- <meta name="wpk-bid" content="dta_2_71020"> <script>var isDingtalk = navigator && /DingTalk/.test(navigator.userAgent);var isProductEnv = window &&window.location &&window.location.host 
+        text-align: right;
+      }
+
+      /* 清除浮动 */
+      .clearfix:after {
+        content: "";
+        display: block;
+        height: 0;
+        clear: both;
+        visibility: hidden;
+      }
+      .clearfix {
+        /* 触发 hasLayout */
+        zoom: 1;
+      }
+      .fillWeekCustom {
+        .el-dialog__body {
+          padding: 10px 20px !important;
+        }
+      }
+    </style>
+    <!-- <meta name="wpk-bid" content="dta_2_71020"> <script>var isDingtalk = navigator && /DingTalk/.test(navigator.userAgent);var isProductEnv = window &&window.location &&window.location.host 
             && window.location.host.indexOf('//127.0.0.1')===-1
             && window.location.host.indexOf('//localhost')===-1
             && window.location.host.indexOf('//192.168.')===-1
             // 如果有其它测试域名,请一起排掉,减少测试环境对生产环境监控的干扰
         if (isProductEnv) {    !(function(c,i,e,b){var h=i.createElement("script");var f=i.getElementsByTagName("script")[0];h.type="text/javascript";h.crossorigin=true;h.onload=function(){c[b]||(c[b]=new c.wpkReporter({bid:"dta_2_71020"}));c[b].installAll()};f.parentNode.insertBefore(h,f);h.src=e})(window,document,"https://g.alicdn.com/woodpeckerx/jssdk??wpkReporter.js","__wpk"); }</script> -->
-    </head>
-    <!-- 接入飞书 -->
-    <script type="text/javascript" src="https://lf1-cdn-tos.bytegoofy.com/goofy/lark/op/h5-js-sdk-1.5.16.js"></script>
-    <!-- <script src="./static/js/goofy.js"></script> -->
-    <!-- <script src="https://unpkg.com/vconsole/dist/vconsole.min.js"></script>
+  </head>
+  <!-- 接入飞书 -->
+  <script
+    type="text/javascript"
+    src="https://lf1-cdn-tos.bytegoofy.com/goofy/lark/op/h5-js-sdk-1.5.16.js"
+  ></script>
+  <!-- <script src="./static/js/goofy.js"></script> -->
+  <!-- <script src="https://unpkg.com/vconsole/dist/vconsole.min.js"></script>
     <script>
         var vConsole = new window.VConsole();
     </script> -->
-    <body>
-        <div id="app"></div>
-        <script>
-            document.body.ondrop = function(event) {
-            event.preventDefault()
-            event.stopPropagation()
-            }
-        </script>
-        <!-- 引入Vue.js -->
-        <script src="https://cdn.staticfile.org/vue/2.6.10/vue.min.js"></script>
-        <!-- <script src="./static/js/vue.min.js"></script> -->
-        <!-- 引入vuex.js -->
-        <script src="https://cdn.staticfile.org/vuex/3.0.0/vuex.min.js"></script>
-        <!-- <script src="./static/js/vuex.min.js"></script> -->
-        <!-- 引入vue-router -->
-        <script src="https://cdn.staticfile.org/vue-router/3.0.0/vue-router.min.js"></script>
-        <!-- <script src="./static/js/vue-router.min.js"></script> -->
-        <!-- 引入组件库 -->
-        <script src="https://cdn.staticfile.org/element-ui/2.13.0/index.js"></script>
-        <!-- <script src="./static/js/element-ui.js"></script> -->
-        <!-- 引入echarts -->
-        <script src="https://cdn.staticfile.org/echarts/3.8.5/echarts.min.js"></script>
-        <!-- <script src="./static/js/echarts.min.js"></script> -->
-        <!-- 引入企业微信js -->
-        <script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js" referrerpolicy="origin"></script>
-        <script src="https://open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js" referrerpolicy="origin"></script>
-        <!-- <script src="./static/js/jweixin-1.2.0.js"></script>
+  <body>
+    <div id="app"></div>
+    <script>
+      document.body.ondrop = function (event) {
+        event.preventDefault();
+        event.stopPropagation();
+      };
+    </script>
+    <!-- 引入Vue.js -->
+    <script src="https://cdn.staticfile.org/vue/2.6.10/vue.min.js"></script>
+    <!-- <script src="./static/js/vue.min.js"></script> -->
+    <!-- 引入vuex.js -->
+    <script src="https://cdn.staticfile.org/vuex/3.0.0/vuex.min.js"></script>
+    <!-- <script src="./static/js/vuex.min.js"></script> -->
+    <!-- 引入vue-router -->
+    <script src="https://cdn.staticfile.org/vue-router/3.0.0/vue-router.min.js"></script>
+    <!-- <script src="./static/js/vue-router.min.js"></script> -->
+    <!-- 引入组件库 -->
+    <script src="https://cdn.staticfile.org/element-ui/2.13.0/index.js"></script>
+    <!-- <script src="./static/js/element-ui.js"></script> -->
+    <!-- 引入echarts -->
+    <script src="https://cdn.staticfile.org/echarts/3.8.5/echarts.min.js"></script>
+    <!-- <script src="./static/js/echarts.min.js"></script> -->
+    <!-- 引入企业微信js -->
+    <script
+      src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"
+      referrerpolicy="origin"
+    ></script>
+    <script
+      src="https://open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js"
+      referrerpolicy="origin"
+    ></script>
+    <!-- <script src="./static/js/jweixin-1.2.0.js"></script>
         <script src="./static/js/jwxwork-1.0.0.js"></script> -->
-    </body>
-</html>
+  </body>
+</html>

+ 43 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -135,6 +135,7 @@
                                 <span style="float:right;">
                                     <el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReport(-1,0)">{{$t('textLink.fillInTheWork')}}</el-link>
                                     <el-link v-if="reportTimeType.type != 0 && user.companyId != yuzhongCompId" type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportss()">{{$t('textLink.fillInAWeek')}}</el-link>
+                                    <el-link v-if="reportTimeType.type != 0 && user.companyId != yuzhongCompId" type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportCustom()">按周填报2</el-link>
                                     <el-link type="primary" v-if="permissions.reportsFillOut" style="margin-right:10px;" :underline="false" @click="isSubstitude=true; fillInReport(-1,2)">{{$t('textLink.helpToFillIn')}}</el-link>
                                     <el-link type="primary" v-if="permissions.reportBatch" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReport(-1,1)">{{$t('textLink.batchFillIn')}}</el-link>
                                     <el-link type="primary" v-if="user.companyId != yuzhongCompId && (permissions.importReport || user.manageDeptId != 0)" style="margin-right:10px;" :underline="false" @click="imports()">{{$t('textLink.workHoursImport')}}</el-link>
@@ -957,6 +958,13 @@
                 <el-button type="primary" @click="submitWeekReport(0)" :loading="submitingReport">{{$t('btn.submit')}}</el-button>
             </span>
         </el-dialog>
+        <!-- 重庆物奇私人定制的按周填报 -->
+        <el-dialog :title="'按周填报'" class="fillWeekCustom" :visible.sync="fillWeekDialogVisiCustom" width="1200px" :before-close="handleClose" top="7.5vh">
+            <div class="fillWeekDialogVisiCustom">
+                <WeeklyCustomization @weekClose="fillWeekCustomClne" @weekSubmit="fillWeekCustomSubmit" :key="weekIndex" :weekParentData="weekParentData"></WeeklyCustomization>
+            </div>
+        </el-dialog>
+
         <!-- 选择时间 -->
         <el-dialog :title="$t('other.timeSelection')" :visible.sync="btnZho" width="30%" :before-close="handleClose">
             <span>{{$t('other.thisIsAPieceOfInformation')}}</span>
@@ -1882,6 +1890,9 @@
 
      // 引入自定义级联组件
     import vueCascader from "@/components/cascader.vue"
+
+    // 重庆物奇定制组件
+    import WeeklyCustomization from "./weeklyCustomization.vue"
     
     import { mapMutations } from 'vuex'
     let _that = this
@@ -1889,7 +1900,8 @@
         mixins: [dragMixin],
         components: {
             selectCat,
-            vueCascader
+            vueCascader,
+            WeeklyCustomization
         },
         data() {
             return {
@@ -2088,6 +2100,7 @@
                 batchSubFillDialog: false,
                 isSubstiS: false,
                 fillWeekDialogVisi: false,
+                fillWeekDialogVisiCustom: false,
                 zhoData: [],
                 weekDateRange: [],
                 btnZho: false,
@@ -2172,7 +2185,10 @@
 
                 workTimeForMinYi:0,
 
-                nodeModelData: localStorage.getItem('nodeModelDataKey') ? JSON.parse(localStorage.getItem('nodeModelDataKey')) : []
+                nodeModelData: localStorage.getItem('nodeModelDataKey') ? JSON.parse(localStorage.getItem('nodeModelDataKey')) : [],
+
+                weekIndex: 1,
+                weekParentData: {}
             };
         },
         watch: {
@@ -5744,6 +5760,13 @@
                     });
                 }
             },
+            fillInReportCustom() {
+                this.weekIndex++
+                this.weekParentData = {
+                    isSubstitude: this.isSubstitude
+                }
+                this.fillWeekDialogVisiCustom = true
+            },
             // 按周填报的项目筛选
             selListFun(){
                 this.selProjectList = []
@@ -7417,6 +7440,15 @@
                     })
                 })
             },
+            // 重庆物奇私人定制的按周填报弹窗关闭事件
+            fillWeekCustomClne() {
+                this.fillWeekDialogVisiCustom = false
+            },
+            fillWeekCustomSubmit() {
+                this.getReportList();
+                this.getDepartment();
+                this.getRecentlyProject()
+            },
             // 自定义事件
             selectCal(obj) {
                 console.log(obj, '传数据来源')
@@ -7499,6 +7531,15 @@
 </script>
 
 <style lang="scss" scoped>
+.fillWeekDialogVisiCustom {
+    width: 100%;
+    height: 70vh;
+}
+.fillWeekCustom {
+    .el-dialog__body {
+        padding: 20px 20px !important;
+    }
+}
 .photos {
     position: relative;
     display: flex;

+ 420 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/weeklyCustomization.vue

@@ -0,0 +1,420 @@
+<template>
+    <div class='weeklyCustomization'>
+        <div class="title">
+            <el-button @click="getCurrentWeek(-7)" size="small">&lt;&lt;</el-button>
+            <el-button @click="getCurrentWeek(0)" size="small">本周</el-button>
+            <el-button @click="getCurrentWeek(7)" size="small">&gt;&gt;</el-button>
+        </div>
+        <div class="weekcen flexColumn" v-loading="submitLoading">
+            <div class="flexColumnAuto flex1">
+                <el-table :data="weekTableData" border style="width: 100%;" height="0" :span-method="arraySpanMethod">
+                    <el-table-column prop="dateTime" label="日期" width="180">
+                        <template slot-scope="scope">
+                            <span>{{ scope.row.dateTime }}</span>
+                            (<span>{{ scope.row.weekDayTxt }}</span>)
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="项目" width="220">
+                        <template slot-scope="scope">
+                            <el-select v-model="scope.row.projectId" size="small" placeholder="请选择项目" clearable
+                                @change="changeProject(scope.row.projectId, scope.$index)" :disabled="scope.row.state == 1">
+                                <el-option v-for="item in projectList" :key="item.id" :label="item.projectName"
+                                    :value="item.id">
+                                </el-option>
+                            </el-select>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="分类" width="180">
+                        <template slot-scope="scope">
+                            <el-select v-model="scope.row.groupId" size="small" placeholder="请选择分类"
+                                @change="changeGroup(scope.row.groupId, scope.row.taskGroups, scope.$index)"
+                                :disabled="scope.row.state == 1">
+                                <el-option v-for="item in scope.row.taskGroups" :key="item.id" :label="item.name"
+                                    :value="item.id">
+                                </el-option>
+                            </el-select>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="content" label="工作内容" width="300">
+                        <template slot-scope="scope">
+                            <el-input size="small" type="textarea" :rows="1" v-model="scope.row.content"
+                                :disabled="scope.row.state == 1"></el-input>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="workingTime" label="时间(小时)" width="160">
+                        <template slot-scope="scope">
+                            <el-input-number size="small" v-model="scope.row.workingTime" :min="0" :max="12" :step="0.5"
+                                :disabled="scope.row.state == 1"></el-input-number>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="projectAuditorId" label="审批人" width="160">
+                        <template slot-scope="scope">
+                            <!-- <span v-if="user.userNameNeedTranslate != '1'">{{ scope.row.projectAuditorName }}</span>
+                            <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName'
+                                    :openid='scope.row.projectAuditorName'></ww-open-data></span> -->
+                            <span v-if="user.userNameNeedTranslate != '1'">{{ auditorNameFun(scope.row) }}</span>
+                            <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName'
+                                    :openid='scope.row.projectAuditorName'></ww-open-data></span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="state" label="状态" width="140" fixed="right">
+                        <template slot-scope="scope">
+                            <div class="controls">
+                                <el-tag v-if="scope.row.state == 0" type="warning">待审</el-tag>
+                                <el-tag v-if="scope.row.state == 1" type="success">通过</el-tag>
+                                <el-tag v-if="scope.row.state == 2" type="danger">拒绝</el-tag>
+                                <span v-if="scope.row.state != 1">
+                                    <el-link type="primary" :underline="false" class="el-icon-circle-plus-outline"
+                                        @click="insertRow(scope.$index)"></el-link>
+                                    <el-link type="primary" :underline="false" class="el-icon-delete"
+                                        @click="deleteRow(scope.$index)"></el-link>
+                                </span>
+                            </div>
+                        </template>
+                    </el-table-column>
+                </el-table>
+            </div>
+            <div class="weeklyCustomization_btn">
+                <el-button @click="handleClose()">取消</el-button>
+                <el-button @click="submitWeekData(1)">暂存</el-button>
+                <el-button type="primary" @click="submitWeekData(0)">确定</el-button>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import cloneDeep from 'lodash/cloneDeep'; // 深拷贝
+export default {
+    name: '',
+    components: {},
+    props: {
+        weekParentData: {
+            type: Object,
+            default: () => {
+                return {}
+            }
+        },
+    },
+    data() {
+        return {
+            weekTableData: [],
+            projectList: [],
+            nowTime: this.dayjs().format('YYYY-MM-DD'),
+            submitLoading: false,
+            permissions: JSON.parse(sessionStorage.getItem("permissions")),
+            user: JSON.parse(sessionStorage.getItem("user")),
+        }
+    },
+    computed: {},
+    watch: {},
+    created() { },
+    mounted() {
+        this.$set(this, 'weekTableData', [])
+        this.getCurrentWeek(0)
+        this.getProjectList()
+    },
+    methods: {
+        // 提交与暂存
+        submitWeekData(draft) { // draft 暂存(1)提交(0)
+            const newWeekData = cloneDeep(this.weekTableData)
+
+            let strArr = this.judgmentData(newWeekData)
+            console.log(strArr, '<===== strArr')
+            if (strArr.length > 0) {
+                this.$message({
+                    message: `【${strArr.join('、')}】日期填写工作时长小于系统设置的每日工作时长`,
+                    type: "error"
+                });
+                return
+            }
+
+            let formData = new FormData();
+            formData.append("draft", draft);
+            let fixation = {
+                id: -1,
+                projectId: '',
+                subProjectId: 0,
+                taskId: 0,
+                reportTimeType: 1,
+                workingTime: 0,
+                multiWorktime: 0,
+                content: '',
+                isOvertime: 0,
+                // professionProgress: [],
+                groupId: '',
+                stage: '',
+                createDate: '',
+                projectAuditorId: '',
+                basecostId: 0,
+                degreeId: -1,
+                customData: 0,
+                customText: '-',
+            }
+
+            const arr = newWeekData
+                .filter(data => data.projectId)
+                .map(data => ({
+                    ...fixation,
+                    projectId: data.projectId,
+                    createDate: data.dateTime,
+                    content: data.content,
+                    projectAuditorId: data.projectAuditorId,
+                    workingTime: data.workingTime,
+                    groupId: data.groupId,
+                    id: data.id || -1,
+                }));
+
+            arr.forEach(item => {
+                Object.entries(item).forEach(([key, value]) => {
+                    formData.append(key, value);
+                });
+            });
+
+            this.submitLoading = true
+            this.http.uploadFile(this.port.report.editPort, formData,
+                res => {
+                    this.submitLoading = false
+                    if (res.code == "ok") {
+                        this.$message({
+                            message: `${draft ? '暂存成功:' : '提交成功:'}`,
+                            type: "success"
+                        });
+                        this.$emit('weekClose')
+                        this.$emit('weekSubmit')
+                    } else {
+                        this.$message({
+                            message: `${draft ? '暂存失败:' : '提交失败:'}` + res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.submitLoading = false
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+        },
+        // 判断是否小于系统设置的每日工作时间
+        judgmentData(data) {
+            const { allday } = this.user.timeType // 系统设置的每日工作时间
+            const result = [];
+            data.forEach((item) => {
+                const date = item.dateTime;
+                const index = result.findIndex((arr) => arr[0].dateTime === date);
+
+                if (index === -1) {
+                    result.push([item]);
+                } else {
+                    result[index].push(item);
+                }
+            });
+
+            const strArr = result
+                .filter((arr) => arr[0].projectId)
+                .filter(
+                    (arr) => arr.reduce((sum, item) => sum + (+item.workingTime || 0), 0) < allday
+                )
+                .map((arr) => arr[0].dateTime);
+
+            return strArr
+        },
+        // 项目切换事件
+        changeProject(projectId, index) {
+            this.$set(this.weekTableData[index], 'projectAuditorId', '')
+            this.$set(this.weekTableData[index], 'projectAuditorName', '')
+            this.$set(this.weekTableData[index], 'groupId', '')
+            if (projectId) {
+                this.getProjectGroup(projectId, index)
+            }
+        },
+        // 分组切换事件
+        changeGroup(groupId, groupList, index) {
+            let newArr = groupList.filter(item => item.id == groupId)
+            if (!newArr[0].inchargerId) {
+                this.$message({
+                    message: `【${newArr[0].name}】分类未设置审批人,请联系该项目管理人员`,
+                    type: "error"
+                });
+                return
+            }
+            this.$set(this.weekTableData[index], 'projectAuditorId', newArr[0].inchargerId)
+            this.$set(this.weekTableData[index], 'projectAuditorName', newArr[0].inchargerName)
+        },
+        // 获取周数据
+        async getCurrentWeek(time) {
+            if (!time) {
+                this.nowTime = this.dayjs().format('YYYY-MM-DD')
+            } else {
+                this.nowTime = this.dayjs(this.nowTime).add(time, 'day').format('YYYY-MM-DD')
+            }
+            let { data } = await this.getData('/report/getWeeklyFillReportData', { targetDate: this.nowTime })
+            const { dateList, projectList, sumTimeList, cardTimeList } = data;
+            const weekTableData = dateList.flatMap(date => {
+                const { weekDayTxt, date: dateTime, reportList } = date;
+                const reports = reportList.map(report => ({ ...report, weekDayTxt, dateTime }));
+                return reports.length > 0 ? reports : [{ weekDayTxt, dateTime }];
+            });
+
+            this.weekTableData = weekTableData;
+        },
+        // 获取项目列表
+        async getProjectList() {
+            let { data } = await this.getData('/project/getProjectList')
+            this.projectList = data
+        },
+        // 获取项目下的分组
+        async getProjectGroup(projectId, index) {
+            const { isSubstitude } = this.weekParentData;
+            let { data } = await this.getData('/task-group/listProjectGroupAndAuditor', { projectId, isSubstitude: isSubstitude ? 1 : 0 })
+            if (data.length == 0) {
+                this.$message({
+                    message: '分类未设置,请联系该项目管理人员',
+                    type: "error"
+                });
+            } else if (data.length == 1) {
+                this.$set(this.weekTableData[index], 'groupId', data[0].id)
+                this.$set(this.weekTableData[index], 'projectAuditorId', data[0].inchargerId)
+                this.$set(this.weekTableData[index], 'projectAuditorName', data[0].inchargerName)
+                if (!data[0].inchargerId) {
+                    this.$message({
+                        message: `【${newArr[0].name}】分类未设置审批人,请联系该项目管理人员`,
+                        type: "error"
+                    });
+                }
+            }
+            this.$set(this.weekTableData[index], 'taskGroups', data)
+        },
+        // 插入一行
+        insertRow(index) {
+            this.weekTableData.splice(index + 1, 0, {
+                dateTime: this.weekTableData[index].dateTime,
+                weekDayTxt: this.weekTableData[index].weekDayTxt,
+                content: '',
+                workingTime: 0,
+                projectId: '',
+                projectAuditorId: '',
+                projectAuditorName: '',
+                groupId: '',
+                groupList: [],
+                approverList: [],
+            })
+        },
+        // 删除一行
+        deleteRow(index) {
+            this.weekTableData.splice(index, 1)
+        },
+        // 合并单元格
+        arraySpanMethod({ row, column, rowIndex, columnIndex }) {
+            let spanOneArr = [], concatOne = 0;
+            this.weekTableData.map((item, index) => {
+                if (index === 0) {
+                    spanOneArr.push(1);
+                } else {
+                    if (item.dateTime === this.weekTableData[index - 1].dateTime) {
+                        spanOneArr[concatOne] += 1;
+                        spanOneArr.push(0);
+                    } else {
+                        spanOneArr.push(1);
+                        concatOne = index;
+                    };
+                }
+            });
+
+            if (columnIndex === 0) {
+                const _row = spanOneArr[rowIndex];
+                const _col = _row > 0 ? 1 : 0;
+                return {
+                    rowspan: _row,
+                    colspan: _col
+                }
+            }
+        },
+        // 回显审批人名字
+        auditorNameFun(item) {
+            const { groupId, taskGroups } = item;
+
+            if (groupId) {
+                const newArr = taskGroups.filter(v => v.id === groupId);
+                return newArr.length > 0 ? newArr[0].inchargerName : '';
+            }
+
+            return '';
+        },
+        // post 方法请求二次封装
+        async getData(url, param) {
+            return new Promise((resolve, reject) => {
+                this.http.post(url, param,
+                    res => {
+                        resolve(res)
+                    },
+                    error => {
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                        reject(error)
+                    }
+                )
+            });
+        },
+        // 关闭弹窗
+        handleClose() {
+            this.$emit('weekClose')
+        },
+    },
+}
+</script>
+<style scoped lang='scss'>
+.flexColumn {
+    display: flex;
+    flex-direction: column;
+}
+
+.flexColumnAuto {
+    display: flex;
+    flex-direction: column;
+    overflow: auto;
+}
+
+.flex1 {
+    flex: 1;
+    overflow-y: auto;
+}
+
+.weeklyCustomization {
+    width: 100%;
+    height: 100%;
+
+    .title {
+        position: absolute;
+        top: 16px;
+        left: 140px;
+    }
+
+    .weekcen {
+        width: 100%;
+        height: 100%;
+    }
+
+    .weeklyCustomization_btn {
+        display: flex;
+        justify-content: flex-end;
+        padding-top: 10px;
+    }
+
+    .controls {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        width: 100%;
+
+        .el-link {
+            font-size: 18px;
+            margin-right: 5px;
+        }
+    }
+}
+</style>