فهرست منبع

Merge remote-tracking branch 'origin/master'

yusm 8 ماه پیش
والد
کامیت
4e68d57202

+ 5 - 4
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ContractController.java

@@ -3,6 +3,7 @@ package com.management.platform.controller;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.management.platform.entity.Contract;
+import com.management.platform.entity.ContractCustom;
 import com.management.platform.entity.Project;
 import com.management.platform.entity.User;
 import com.management.platform.mapper.ProjectMapper;
@@ -74,16 +75,16 @@ public class ContractController {
      * 新增合同
      */
     @RequestMapping("/addContract")
-    public HttpRespMsg addContract (HttpServletRequest request,Contract contract, String paymentListStr){
-        return contractService.addContract(request,contract, paymentListStr);
+    public HttpRespMsg addContract (HttpServletRequest request, Contract contract, ContractCustom custom, String paymentListStr){
+        return contractService.addContract(request,contract, custom, paymentListStr);
     }
 
     /**
      * 编辑合同
      */
     @RequestMapping("/editContract")
-    public HttpRespMsg editContract (HttpServletRequest request,Contract contract, String paymentListStr){
-        return contractService.editContract(request,contract, paymentListStr);
+    public HttpRespMsg editContract (HttpServletRequest request,Contract contract,ContractCustom custom, String paymentListStr){
+        return contractService.editContract(request,contract, custom, paymentListStr);
     }
 
     /**

+ 2 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/ContractCustom.java

@@ -147,8 +147,8 @@ public class ContractCustom extends Model<ContractCustom> {
     /**
      * 合同状态(是否结清):1-履约中,2-履约结束
      */
-    @TableField("status")
-    private Integer status;
+    @TableField("finish_status")
+    private Integer finishStatus;
 
     /**
      * 印花税税目

+ 3 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/ContractService.java

@@ -2,6 +2,7 @@ package com.management.platform.service;
 
 import com.management.platform.entity.Contract;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.management.platform.entity.ContractCustom;
 import com.management.platform.util.HttpRespMsg;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.multipart.MultipartFile;
@@ -23,9 +24,9 @@ public interface ContractService extends IService<Contract> {
 
     HttpRespMsg ExportContract(HttpServletRequest request, String number, String name, String typeName, Integer status, String startDate, String endDate, String paymentStartDate, String paymentEndDate);
 
-    HttpRespMsg addContract(HttpServletRequest request, Contract contract, String paymentListStr);
+    HttpRespMsg addContract(HttpServletRequest request, Contract contract, ContractCustom custom, String paymentListStr);
 
-    HttpRespMsg editContract(HttpServletRequest request, Contract contract, String paymentListStr);
+    HttpRespMsg editContract(HttpServletRequest request, Contract contract, ContractCustom custom, String paymentListStr);
 
     HttpRespMsg importContract(HttpServletRequest request, MultipartFile file);
 

+ 21 - 4
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ContractServiceImpl.java

@@ -156,6 +156,8 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
             }
             ArrayList<ContractPageVO> contractPageVOS = new ArrayList<>();
             List<Map<String, Object>> contractLogs = contractLogMapper.selectMsg(user.getCompanyId());
+            List<ContractCustom> customList = contractCustomMapper.selectList(new QueryWrapper<ContractCustom>().in("contract_id", contractCollect));
+
             for (Contract contract : contracts) {
                 ContractPageVO contractPageVO = new ContractPageVO();
                 List<ContractDocument> files = new ArrayList<>();
@@ -200,6 +202,11 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
                     }
                 }
                 contractPageVO.setFiles(files);
+                for (ContractCustom custom : customList) {
+                    if (contract.getId().equals(custom.getContractId())){
+                        contractPageVO.setCustomData(custom);
+                    }
+                }
                 contractPageVOS.add(contractPageVO);
             }
             HashMap<String, Object> map = new HashMap<>();
@@ -316,7 +323,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
      * @return
      */
     @Override
-    public HttpRespMsg addContract(HttpServletRequest request, Contract contract, String paymentListStr) {
+    public HttpRespMsg addContract(HttpServletRequest request, Contract contract, ContractCustom custom, String paymentListStr) {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         User user = userMapper.selectById(request.getHeader("token"));
         List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "新增合同");
@@ -349,6 +356,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
         contract.setCompanyId(user.getCompanyId());
         contractMapper.insert(contract);
 
+
         if (StringUtils.isNotBlank(paymentListStr)){
             List<ContractPayment> contractPaymentList = JSON.parseArray(paymentListStr, ContractPayment.class);
             BigDecimal bg = new BigDecimal("0");
@@ -372,6 +380,9 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
         contractLog.setType(0);
         contractLog.setMsg("创建了合同。");
         contractLogMapper.insert(contractLog);
+
+        custom.setContractId(contract.getId());
+        contractCustomMapper.insert(custom);
         httpRespMsg.msg = MessageUtils.message("contract.addSuc");
         httpRespMsg.data = contract.getId();
         return httpRespMsg;
@@ -384,7 +395,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
      * @return
      */
     @Override
-    public HttpRespMsg editContract(HttpServletRequest request, Contract contract, String paymentListStr) {
+    public HttpRespMsg editContract(HttpServletRequest request, Contract contract, ContractCustom custom, String paymentListStr) {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         User user = userMapper.selectById(request.getHeader("token"));
         List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "管理全部合同");
@@ -393,6 +404,10 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
             return httpRespMsg;
         }
         try {
+            if (contract.getId() == null) {
+                httpRespMsg.setError(MessageUtils.message("name.idNullError"));
+                return httpRespMsg;
+            }
             if (StringUtils.isBlank(contract.getName())){
                 //名称不可为空
                 httpRespMsg.setError(MessageUtils.message("name.nullNameError"));
@@ -455,6 +470,8 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
             contractLog.setType(1);
             contractLog.setMsg("编辑了合同。");
             contractLogMapper.insert(contractLog);
+            custom.setContractId(contract.getId());
+            contractCustomMapper.updateById(custom);
             httpRespMsg.msg = MessageUtils.message("contract.editSuc");
             return httpRespMsg;
         }catch (NullPointerException e) {
@@ -808,9 +825,9 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
                 String status = row.getCell(26)==null?null:row.getCell(26).getStringCellValue();
                 if (StringUtils.isNotBlank(status)){
                     if ("履约中".equals(status)) {
-                        customItem.setStatus(1);
+                        customItem.setFinishStatus(1);
                     } else {
-                        customItem.setStatus(2);
+                        customItem.setFinishStatus(2);
                     }
                 }
                 String remarks = row.getCell(27)==null?null:row.getCell(27).getStringCellValue();

+ 1 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/i18n/messages.properties

@@ -49,6 +49,7 @@ Company.nameRepeatByParam=名称[{0}]已存在
 name.nameRepeatByParam={0}名称重复
 name.CategoryNameRepeat=分类名称已存在
 #其他
+name.idNullError=id不能为空
 other.error=发生其他错误
 other.errorByParameter=发生其他错误{0}
 other.update=更新失败

+ 1 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/i18n/messages_en_US.properties

@@ -48,6 +48,7 @@ name.nameRepeat=The name already exists.
 Company.nameRepeatByParam=The name ['{0}'] already exists.
 name.nameRepeatByParam=Duplicate {0} name.
 name.CategoryNameRepeat=Category name already exists.
+name.idNullError=ID cannot be empty.
 #其他
 other.error=Other errors occurred.
 other.errorByParameter=Other error {0} occurred.

+ 2 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ContractCustomMapper.xml

@@ -24,13 +24,13 @@
         <result column="reserved_bill_number" property="reservedBillNumber" />
         <result column="total_payed_amounts" property="totalPayedAmounts" />
         <result column="pending_amounts" property="pendingAmounts" />
-        <result column="status" property="status" />
+        <result column="finish_status" property="finishStatus" />
         <result column="stamp_duty_items" property="stampDutyItems" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        contract_id, customer_org, customer_contact, customer_phone, use_department, funds_source, undertaker, agent, sign_date, filings_date, tax_rate, amounts_no_tax, currency, payed_amount, pay_way, bill_number, reserved_amounts, reserved_bill_number, total_payed_amounts, pending_amounts, status, stamp_duty_items
+        contract_id, customer_org, customer_contact, customer_phone, use_department, funds_source, undertaker, agent, sign_date, filings_date, tax_rate, amounts_no_tax, currency, payed_amount, pay_way, bill_number, reserved_amounts, reserved_bill_number, total_payed_amounts, pending_amounts, finish_status, stamp_duty_items
     </sql>
 
 </mapper>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1147 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/contract/components/contractManagement.vue


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1334 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/contract/components/customContract.vue


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 23 - 1135
fhKeeper/formulahousekeeper/timesheet/src/views/contract/index.vue


+ 19 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -135,9 +135,10 @@
                                 </span>
                                 <span style="float:right;">
                                     <el-link type="primary" v-if="user.timeType.enableNewWeeklyfill != 1" 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 && user.timeType.enableNewWeeklyfill != 1 && user.companyId != 3092" 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 && user.timeType.enableNewWeeklyfill != 1 && user.companyId != 3092 && user.timeType.enableNewWeeklyfill != 2" type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportss()">{{$t('textLink.fillInAWeek')}}</el-link>
                                     <el-link v-if="user.timeType.enableNewWeeklyfill == 1" type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportCustom()">{{ $t('textLink.fillInAWeek') }}</el-link>
-                                    <!-- <el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportCustom()">按周填报</el-link> -->
+                                    <!-- <el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportCustom()">按周填报123</el-link> -->
+                                    <el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;weekIndex++,fillWeekDialogVisiCustomTwo=true" v-if="user.timeType.enableNewWeeklyfill==2">按周填报</el-link>
                                     <el-link type="primary" v-if="user.companyId != 5978 && permissions.reportsFillOut && user.timeType.enableNewWeeklyfill != 1" style="margin-right:10px;" :underline="false" @click="isSubstitude=true; fillInReport(-1,2)">{{$t('textLink.helpToFillIn')}}</el-link>
                                     <!-- 苏州景昱,按周填报的模式进行代填日报 -->
                                     <el-link type="primary" v-if="user.companyId == 5978 && permissions.reportsFillOut && user.timeType.enableNewWeeklyfill != 1" style="margin-right:10px;" :underline="false" @click="isSubstitude=true; fillInReportss();">{{$t('textLink.helpToFillIn')}}</el-link>
@@ -1063,6 +1064,13 @@
             </div>
         </el-dialog>
 
+        <!-- enableNewWeeklyfill==2 -->
+        <el-dialog :title="$t('textLink.fillInAWeek')" class="fillWeekCustom" :visible.sync="fillWeekDialogVisiCustomTwo" width="1400px" :before-close="handleClose" top="7.5vh">
+            <div class="fillWeekDialogVisiCustom">
+                <NewWeeklyCustomization @weekClose="fillWeekCustomClneTwo" @weekSubmit="fillWeekCustomSubmit" :key="weekIndex" :weekParentData="weekParentData"></NewWeeklyCustomization>
+            </div>
+        </el-dialog>
+
         <!-- 选择时间 -->
         <el-dialog :title="$t('other.timeSelection')" :visible.sync="btnZho" width="30%" :before-close="handleClose">
             <span>{{$t('other.thisIsAPieceOfInformation')}}</span>
@@ -2190,6 +2198,9 @@
 
     // 威派格定制转移工时
     import TransferWorkingHours from "./transferWorkingHours.vue"
+
+    // 新的按周填报
+    import NewWeeklyCustomization from "./newWeeklyCustomization.vue"
     
     import { mapMutations } from 'vuex'
     let _that = this
@@ -2200,7 +2211,8 @@
             vueCascader,
             WeeklyCustomization,
             vueMultipleDept,
-            TransferWorkingHours
+            TransferWorkingHours,
+            NewWeeklyCustomization
         },
         data() {
             return {
@@ -2409,6 +2421,7 @@
                 isSubstiS: false,
                 fillWeekDialogVisi: false,
                 fillWeekDialogVisiCustom: false,
+                fillWeekDialogVisiCustomTwo: false,
                 zhoData: [],
                 weekDateRange: [],
                 btnZho: false,
@@ -8711,6 +8724,9 @@
             fillWeekCustomClne() {
                 this.fillWeekDialogVisiCustom = false
             },
+            fillWeekCustomClneTwo() {
+                this.fillWeekDialogVisiCustomTwo = false
+            },
             fillWeekCustomSubmit() {
                 this.getReportList();
                 this.getDepartment();

+ 430 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/newWeeklyCustomization.vue

@@ -0,0 +1,430 @@
+<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">{{ $t('time.thisWeek') }}</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="$t('weekDay.date')" width="180">
+                        <template slot-scope="scope">
+                            <span>{{ scope.row.dateTime }}</span>
+                            (<span>{{ scope.row.weekDayTxt }}</span>)
+                        </template>
+                    </el-table-column>
+                    <el-table-column :label="$t('other.project')" width="220">
+                        <template slot-scope="scope">
+                            <el-select v-model="scope.row.projectId" size="small" :placeholder="$t('defaultText.pleaseSelectSnItem')" clearable
+                                @change="changeProject(scope.row.projectId, scope.$index)"
+                                :disabled="scope.row.state == 1 || scope.row.state == 0 || !scope.row.canFill">
+                                <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 prop="content" :label="$t('gongZuoNeiRong')">
+                        <template slot-scope="scope">
+                            <el-input size="small" type="textarea" :rows="2" v-model="scope.row.content"
+                                :disabled="scope.row.state == 1 || scope.row.state == 0 || !scope.row.canFill"
+                                resize="none"></el-input>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="workingTime" :label="$t('shiJianXiaoShi')" 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 || scope.row.state == 0 || !scope.row.canFill"></el-input-number>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="state" :label="$t('state.states')" width="140" fixed="right">
+                        <template slot-scope="scope">
+                            <div class="controls">
+                                <el-tag v-if="scope.row.state == 0" type="warning">{{ $t('daiShen') }}</el-tag>
+                                <el-tag v-if="scope.row.state == 1" type="success">{{ $t('btn.through') }}</el-tag>
+                                <el-tag v-if="scope.row.state == 2" type="danger">{{ $t('juJue') }}</el-tag>
+                                <span v-if="scope.row.state != 1 && scope.row.canFill">
+                                    <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)" v-if="!scope.row.isDelete"></el-link>
+                                </span>
+                            </div>
+                        </template>
+                    </el-table-column>
+                </el-table>
+            </div>
+            <div class="weeklyCustomization_btn">
+                <el-button @click="handleClose()">{{ $t('quXiao') }}</el-button>
+                <el-button @click="submitWeekData(1)">{{ $t('zanCun') }}</el-button>
+                <el-button type="primary" @click="submitWeekData(0)">{{ $t('tiJiao') }}</el-button>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import cloneDeep from 'lodash/cloneDeep'; // 深拷贝
+export default {
+    name: '',
+    components: {},
+    props: {
+        weekParentData: {
+            type: Object,
+            default: () => {
+                return {}
+            }
+        },
+    },
+    data() {
+        return {
+            summaryContent: null,
+            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)
+            const { allday } = this.user.timeType // 系统设置的每日工作时间
+            if (strArr.length > 0) {
+                this.$message({
+                    message: `【${strArr.join('、')}】`+this.$t('tianXieGongShiHeJiFei')+` ${allday}`+ this.$t('time.hour'),
+                    type: "error"
+                });
+                return
+            }
+
+            let formData = new FormData();
+            formData.append("draft", draft);
+            formData.append('summary', this.summaryContent);
+            let fixation = {
+                id: -1,
+                projectId: '',
+                subProjectId: 0,
+                taskId: 0,
+                reportTimeType: 1,
+                workingTime: 0,
+                multiWorktime: 0,
+                content: '',
+                isOvertime: 0,
+                createDate: '',
+                basecostId: 0,
+                degreeId: -1,
+                customData: 0,
+                customText: '-',
+            }
+
+            let arr = newWeekData
+                .filter(data => data.projectId)
+                .map(data => ({
+                    ...fixation,
+                    projectId: data.projectId,
+                    createDate: data.dateTime,
+                    content: data.content ? data.content : '',
+                    projectAuditorId: data.projectAuditorId,
+                    workingTime: data.workingTime,
+                    groupId: data.groupId,
+                    id: data.id || -1,
+                }));
+
+            arr.forEach(item => { 
+                delete item.groupId
+            })
+                
+            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 ? this.$t('message.Temporarysuccess') : this.$t('message.submittedSuccessfully')}`,
+                            type: "success"
+                        });
+                        this.$emit('weekClose')
+                        this.$emit('weekSubmit')
+                    } else {
+                        this.$message({
+                            message: `${draft ? this.$t('zanCunShiBai') : this.$t('tiJiaoShiBai')}` + res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.submitLoading = false
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+        },
+        // 判断是否小于系统设置的每日工作时间
+        judgmentData(data) {
+            const { allday } = this.user.timeType // 系统设置的每日工作时间
+            console.log(allday, '<======= 填写日报时长allday')
+            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}】`+this.$t('fenZuWeiSheZhiShenPiRenQingLianXiGaiXiangMuGuanLiRenYuan'),
+                    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 })
+            console.log(JSON.parse(JSON.stringify(data)), '<===== 处理之前的')
+            this.summaryContent = data.summary;
+            data.dateList.forEach(dateItem => {
+                const reportList = dateItem.reportList;
+                reportList.forEach(report => {
+                    const { state, taskGroups } = report;
+                    console.log(state, taskGroups);
+                    if(state != 1 && state != 0 && taskGroups && taskGroups.length > 0) {
+                        console.log('执行');
+                        report.projectAuditorId = taskGroups[0].inchargerId;
+                        report.projectAuditorName = taskGroups[0].inchargerName;
+                    }
+                    if(state == 1 && state == 0 && taskGroups && taskGroups.length > 0) {
+                        taskGroups[0].inchargerId = report.projectAuditorId;
+                        taskGroups[0].inchargerName = report.projectAuditorName;
+                    }
+                });
+            });
+            console.log(data, '<===== 处理之后的')
+            const { dateList, projectList, sumTimeList, cardTimeList } = data;
+            const weekTableData = dateList.flatMap(date => {
+                const { weekDayTxt, date: dateTime, reportList, canFill } = date;
+                const reports = reportList.map(report => ({ ...report, weekDayTxt, dateTime, canFill }));
+                return reports.length > 0 ? reports : [{ weekDayTxt, dateTime, canFill }];
+            });
+            let sumSet = new Set();
+            weekTableData.forEach(obj => {
+                obj.isDelete = sumSet.has(obj.dateTime) ? false : true;
+                sumSet.add(obj.dateTime);
+            });
+            this.weekTableData = weekTableData;
+            console.log(weekTableData, '<========== weekTableData')
+        },
+        // 获取项目列表
+        async getProjectList() {
+            let { data } = await this.getData('/project/getProjectList', { forReport: 1 })
+            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: this.$t('fenZuWeiSheZhiQingLianXiGaiXiangMuGuanLiRenYuan'),
+        //             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: `【${data[0].name}】`+this.$t('fenZuWeiSheZhiShenPiRenQingLianXiGaiXiangMuGuanLiRenYuan'),
+        //                 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: [],
+                canFill: 1,
+                isDelete: false
+            })
+        },
+        // 删除一行
+        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>