MrShi
2024-03-05 6f1ad9bcb73a415f1d45f1adc6bdeb3e80ddf95f
company/src/components/enterprise/additionSubtractionApplication.vue
@@ -78,7 +78,7 @@
                <el-table-column
                    prop="currentFee"
                    align="center"
                    label="产生费用(元)">
                    label="已产生费用(元)">
                </el-table-column>
                <el-table-column
                    prop="fee"
@@ -184,6 +184,7 @@
    import { all } from '@/api/business/solutions'
    import { getDetail } from '@/api/business/insuranceApply'
    import { create, getChangeCountCyclePriceVO } from '@/api/business/applyChange'
    import { getDate, compareDates, getTomorrow } from '@/utils/util'
    export default {
        name: 'additionSubtractionApplication',
        extends: BaseOpera,
@@ -279,16 +280,31 @@
                getDetail(this.form.id)
                    .then(res => {
                        this.list.push(res)
                        this.item = res
                        this.endTime = res.endTime
                        this.form.solutionId = res.solutionId
                        this.form.solutionsName = res.solutionsName
                        this.pickerOptions = {
                            disabledDate(time) {
                                // - 8.64e7
                                return time.getTime() > new Date(res.endTime).getTime() || time.getTime() < new Date(res.lastChangeDate ? res.lastChangeDate : res.startTime).getTime()
                                // 当前日期大于等于生效日期并且最后一次操作时间等于空
                                if ([1,3].includes(compareDates(getDate(), res.startTime)) && !res.lastChangeDate) {
                                    return time.getTime() > new Date(res.endTime).getTime() || time.getTime() < new Date(getTomorrow()).getTime()
                                // 当前日期小于生效日期并且最后一次操作时间等于空
                                } else if (compareDates(getDate(), res.startTime) === 2 && !res.lastChangeDate) {
                                    return time.getTime() > new Date(res.endTime).getTime() || time.getTime() < new Date(res.startTime).getTime()
                                // 最后一次操作时间有值
                                } else if (res.lastChangeDate) {
                                    // 当前日期大于最后一次操作时间
                                    if ([1,3].includes(compareDates(getDate(), res.lastChangeDate))) {
                                        return time.getTime() > new Date(res.endTime).getTime() || time.getTime() < new Date(getTomorrow()).getTime()
                                    // 当前时间小于最后一次操作时间
                                    } else if (compareDates(getDate(), res.lastChangeDate) === 2) {
                                        return time.getTime() > new Date(res.endTime).getTime() || time.getTime() < new Date(res.lastChangeDate).getTime()
                                    }
                                }
                            }
                        };
                        this.changeSolution1(res.solutionId)
                        // this.changeSolution1(res.solutionId)
                    })
            },
            getSummaries(param) {
@@ -428,6 +444,7 @@
            // 切换方案
            changeSolution1(e) {
                this.company.forEach(item => {
                    console.log(item.id + '-----' + e)
                    if (item.id === e) {
                        console.log(item)
                        this.item = item
@@ -479,7 +496,7 @@
                    this.$message.warning('请选择员工')
                    return
                }
                this.$refs.confirmJobType.open('确认工种', { solutionId: this.form.solutionId })
                this.$refs.confirmJobType.open('确认工种', { solutionId: this.item.newVersionSolutionId })
            },
            // 查询全部方案
            getCompany() {
@@ -516,7 +533,6 @@
                this.seleData = e.map(item => item.name)
            },
            getValue(list) {
                console.log(list)
                if (this.activeName === '0') {
                    this.form.addDetailList.push(...list)
                } else {