|
@@ -285,45 +285,44 @@
|
|
}
|
|
}
|
|
|
|
|
|
function transEntrustHandler() {
|
|
function transEntrustHandler() {
|
|
- proxy.$modal.confirm("确定流转到下一月?").then(() => {
|
|
|
|
- transNext().then((res) => {
|
|
|
|
- proxy.$modal.msgSuccess("流转成功");
|
|
|
|
- checkCurrentMonthHandle();
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
- // let currentDate = new Date().getMonth() + 1;
|
|
|
|
- // let formattedMonth = currentDate.toString().padStart(2, '0');
|
|
|
|
- // let month = currentMonth.value.split('-')[1];
|
|
|
|
- // console.log(formattedMonth);
|
|
|
|
- // if (month < formattedMonth) {
|
|
|
|
- // proxy.$modal.confirm("确定流转到下一月?").then(() => {
|
|
|
|
|
|
+ // proxy.$modal.confirm("确定流转到下一月?").then(() => {
|
|
// transNext().then((res) => {
|
|
// transNext().then((res) => {
|
|
// proxy.$modal.msgSuccess("流转成功");
|
|
// proxy.$modal.msgSuccess("流转成功");
|
|
// checkCurrentMonthHandle();
|
|
// checkCurrentMonthHandle();
|
|
// });
|
|
// });
|
|
// });
|
|
// });
|
|
- // } else {
|
|
|
|
-
|
|
|
|
- // // //真实月 != 当前月
|
|
|
|
- // if (month != formattedMonth) {
|
|
|
|
- // proxy.$modal.msgError("每月只可流转一次");
|
|
|
|
- // } else {
|
|
|
|
- // let currentDay = new Date().getDate()
|
|
|
|
- // let cutoffDay = 20;
|
|
|
|
- // //如果当前月时间小于20号
|
|
|
|
- // if (currentDay < cutoffDay) {
|
|
|
|
- // proxy.$modal.msgError("每月20号后才能流转");
|
|
|
|
- // } else {
|
|
|
|
- // proxy.$modal.confirm("确定流转到下一月?").then(() => {
|
|
|
|
- // transNext().then((res) => {
|
|
|
|
- // proxy.$modal.msgSuccess("流转成功");
|
|
|
|
- // checkCurrentMonthHandle();
|
|
|
|
- // });
|
|
|
|
- // });
|
|
|
|
- // }
|
|
|
|
|
|
+ let currentDate = new Date().getMonth() + 1;
|
|
|
|
+ let formattedMonth = currentDate.toString().padStart(2, '0');
|
|
|
|
+ let month = currentMonth.value.split('-')[1];
|
|
|
|
+ console.log(formattedMonth);
|
|
|
|
+ if (month < formattedMonth) {
|
|
|
|
+ proxy.$modal.confirm("确定流转到下一月?").then(() => {
|
|
|
|
+ transNext().then((res) => {
|
|
|
|
+ proxy.$modal.msgSuccess("流转成功");
|
|
|
|
+ checkCurrentMonthHandle();
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ // //真实月 != 当前月
|
|
|
|
+ if (month != formattedMonth) {
|
|
|
|
+ proxy.$modal.msgError("每月只可流转一次");
|
|
|
|
+ } else {
|
|
|
|
+ let currentDay = new Date().getDate()
|
|
|
|
+ let cutoffDay = 20;
|
|
|
|
+ //如果当前月时间小于20号
|
|
|
|
+ if (currentDay < cutoffDay) {
|
|
|
|
+ proxy.$modal.msgError("每月20号后才能流转");
|
|
|
|
+ } else {
|
|
|
|
+ proxy.$modal.confirm("确定流转到下一月?").then(() => {
|
|
|
|
+ transNext().then((res) => {
|
|
|
|
+ proxy.$modal.msgSuccess("流转成功");
|
|
|
|
+ checkCurrentMonthHandle();
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|