|  | @@ -202,9 +202,11 @@ $(document).ready(() => {
 | 
												
													
														
															|  |                  getColor: function (sheet, data, col, defaultColor) {
 |  |                  getColor: function (sheet, data, col, defaultColor) {
 | 
												
													
														
															|  |                      if (col.field === 'uamount') {
 |  |                      if (col.field === 'uamount') {
 | 
												
													
														
															|  |                          if (!data.vamount) {
 |  |                          if (!data.vamount) {
 | 
												
													
														
															|  | -                            return (data.uamount && data.uamount > 0) ? '#ff6f5c' : defaultColor;
 |  | 
 | 
												
													
														
															|  | 
 |  | +                            return (data.uamount && math.abs(data.uamount) > 0) ? '#ff6f5c' : defaultColor;
 | 
												
													
														
															|  |                          } else if (data.uamount) {
 |  |                          } else if (data.uamount) {
 | 
												
													
														
															|  | -                            return data.uamount > data.vamount ? '#ff6f5c' : defaultColor;
 |  | 
 | 
												
													
														
															|  | 
 |  | +                            return data.vamount > 0
 | 
												
													
														
															|  | 
 |  | +                                ? data.uamount > data.vamount ? '#ff6f5c' : defaultColor
 | 
												
													
														
															|  | 
 |  | +                                : data.uamount < data.vamount ? '#ff6f5c' : defaultColor;
 | 
												
													
														
															|  |                          } else {
 |  |                          } else {
 | 
												
													
														
															|  |                              return defaultColor;
 |  |                              return defaultColor;
 | 
												
													
														
															|  |                          }
 |  |                          }
 | 
												
											
												
													
														
															|  | @@ -298,7 +300,14 @@ $(document).ready(() => {
 | 
												
													
														
															|  |                  for (const c of self.displayChanges) {
 |  |                  for (const c of self.displayChanges) {
 | 
												
													
														
															|  |                      if (c.uamount) {
 |  |                      if (c.uamount) {
 | 
												
													
														
															|  |                          const vamount = (!c.vamount || checkZero(c.vamount)) ? 0 : c.vamount;
 |  |                          const vamount = (!c.vamount || checkZero(c.vamount)) ? 0 : c.vamount;
 | 
												
													
														
															|  | -                        if (c.uamount > vamount) {
 |  | 
 | 
												
													
														
															|  | 
 |  | +                        if (vamount > 0 && c.uamount < 0) {
 | 
												
													
														
															|  | 
 |  | +                            toastr.error('变更令:' + c.code + ' 下,请勿进行负变更');
 | 
												
													
														
															|  | 
 |  | +                            return;
 | 
												
													
														
															|  | 
 |  | +                        } else if (vamount < 0 && c.uamount > 0) {
 | 
												
													
														
															|  | 
 |  | +                            toastr.error('变更令:' + c.code + ' 下,请勿进行正变更');
 | 
												
													
														
															|  | 
 |  | +                            return;
 | 
												
													
														
															|  | 
 |  | +                        }
 | 
												
													
														
															|  | 
 |  | +                        if ((vamount > 0 && c.uamount > vamount) || (vamount < 0 && c.uamount < vamount)) {
 | 
												
													
														
															|  |                              toastr.error('变更令:' + c.code + ' 超计,请修改本期计量后,再提交');
 |  |                              toastr.error('变更令:' + c.code + ' 超计,请修改本期计量后,再提交');
 | 
												
													
														
															|  |                              return;
 |  |                              return;
 | 
												
													
														
															|  |                          }
 |  |                          }
 |