@@ -1926,6 +1926,10 @@ $(document).ready(() => {
yearmonths.push(yearmonth);
}
console.log(yearmonths);
+ if (months.length + yearmonths.length > 24) {
+ toastr.error('月信息价不能超过24个月');
+ return false;
+ }
postData(window.location.pathname + '/month/save', { type: 'adds', updateData: { yearmonths } }, function (data) {
months.push(...yearmonths);
months.sort();
@@ -46,6 +46,9 @@ module.exports = app => {
const material_month = this.ctx.material.months ? this.ctx.material.months.split(',') : [];
material_month.push(...data.yearmonths);
material_month.sort();
+ if (material_month.length > 24) {
+ throw '月信息价不能超过24个月';
if (mbList.length !== 0) {
const insertArray = [];
const updateArray = [];