|
@@ -283,11 +283,15 @@ $(document).ready(() => {
|
|
|
},
|
|
|
setRowValueAndSum: function (data, row, col) {
|
|
|
for (const j in change.listAudits) {
|
|
|
- const sum = ZhCalc.round(ZhCalc.mul(ZhCalc.round(data.unit_price, unitPriceUnit), parseFloat(changeSpreadSheet.getValue(row, 10 + parseInt(j)*2))), totalPriceUnit);
|
|
|
- changeSpreadSheet.setValue(row, 11 + j*2, sum !== 0 ? sum : null);
|
|
|
+ const sum = ZhCalc.round(ZhCalc.mul(ZhCalc.round(data.unit_price, unitPriceUnit), parseFloat(changeSpreadSheet.getValue(row, 11 + parseInt(j)*2))), totalPriceUnit);
|
|
|
+ changeSpreadSheet.setValue(row, 12 + j*2, sum !== 0 ? sum : null);
|
|
|
}
|
|
|
// const sum = ZhCalc.round(ZhCalc.mul(data.unit_price, data.spamount), totalPriceUnit);
|
|
|
// changeSpreadSheet.setValue(row, col+1, sum !== 0 ? sum : null);
|
|
|
+ const count = changeSpreadSetting.cols.length;
|
|
|
+ if (col+1 >= count - 2) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
const rowCount = changeSpreadSheet.getRowCount();
|
|
|
// 用户的数据合计
|
|
|
let audit_sum = 0;
|
|
@@ -768,14 +772,19 @@ $(document).ready(() => {
|
|
|
}
|
|
|
validText = ZhCalc.round(validText, findDecimal(select.unit)) || 0;
|
|
|
// 判断是否 正数必须大于等于限制值,负数必须小于等于限制值,否则无法更改
|
|
|
+ select.spamount = ZhCalc.round(validText, findDecimal(select.unit)) || 0;
|
|
|
}
|
|
|
select[col.field] = validText;
|
|
|
- select.spamount = ZhCalc.round(validText, findDecimal(select.unit)) || 0;
|
|
|
|
|
|
const data = {
|
|
|
id: select.id,
|
|
|
- spamount: select.spamount,
|
|
|
+ // spamount: select.spamount,
|
|
|
};
|
|
|
+ if (col.field === 'ex_memo1' || col.field === 'ex_memo2') {
|
|
|
+ data[col.field] = select[col.field];
|
|
|
+ } else {
|
|
|
+ data.spamount = select.spamount;
|
|
|
+ }
|
|
|
console.log(data);
|
|
|
|
|
|
// 更新至服务器
|
|
@@ -785,7 +794,9 @@ $(document).ready(() => {
|
|
|
changeSpreadObj.setRowValueAndSum(select, info.row, info.col);
|
|
|
}, function () {
|
|
|
select[col.field] = orgValue;
|
|
|
- select.spamount = orgValue;
|
|
|
+ if (col.field !== 'ex_memo1' && col.field !== 'ex_memo2') {
|
|
|
+ select.spamount = orgValue;
|
|
|
+ }
|
|
|
SpreadJsObj.reLoadRowData(info.sheet, info.row);
|
|
|
changeSpreadObj.setRowValueAndSum(select, info.row, info.col);
|
|
|
});
|