gaoshp
2024-11-07 75f876f747dc3acba0c0aa0d792b2d1678ad0036
修改取消排班逻辑
已修改1个文件
16 ■■■■ 文件已修改
src/views/console/base/Add.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/console/base/Add.vue
@@ -1,7 +1,7 @@
<!--
 * @Date: 2024-05-04 16:37:48
 * @LastEditors: gaoshp
 * @LastEditTime: 2024-10-09 23:30:14
 * @LastEditTime: 2024-11-07 21:45:28
 * @FilePath: /cps-web/src/views/console/base/Add.vue
-->
<template>
@@ -533,8 +533,20 @@
            }
        },
        planCancel() {
            // 取消排班只能取消当前时间之后的排班
            let now = moment(moment().format('YYYY-MM-DD')).valueOf()
            this.months.forEach((item, i) => {
                item.attributes = item.attributes.slice(0, 2)
                // item.attributes = item.attributes.slice(0, 2)
                item.attributes = item.attributes.map((v, i) => {
                    if (i > 1) {
                        v.dates = v.dates.filter(c => {
                            if (moment(c).valueOf() <= now) {
                                return true
                            }
                        })
                    }
                    return v
                })
            })
        },
        save() {