|
@@ -110,7 +110,7 @@ $(function () {
|
|
|
node.dgn_price = ZhCalc.round(ZhCalc.div(node.total_price, node.dgn_qty1), 2);
|
|
|
}
|
|
|
});
|
|
|
- baseLedgerTree.loadDatas(data);
|
|
|
+ baseLedgerTree.loadDatas(data.bills);
|
|
|
treeCalc.calculateAll(baseLedgerTree);
|
|
|
for (const d of baseLedgerTree.nodes) {
|
|
|
if (!d.b_code) {
|
|
@@ -200,8 +200,6 @@ $(function () {
|
|
|
// 判断输入位数,提示
|
|
|
if (mode === 'tp') {
|
|
|
const reg = new RegExp('^([-]?)\\d+(\\.\\d{0,'+ parseInt(tenderInfo.decimal.tp) +'})?$');
|
|
|
- console.log(reg);
|
|
|
- console.log(reg.test(validText));
|
|
|
if (validText !== null && (!reg.test(validText))) {
|
|
|
toastr.error('输入金额小数位数不能大于' + tenderInfo.decimal.tp + '位');
|
|
|
SpreadJsObj.reLoadRowData(info.sheet, info.row);
|
|
@@ -209,7 +207,6 @@ $(function () {
|
|
|
}
|
|
|
plan_gcl = select.dgn_price && select.dgn_price !== 0 ? ZhCalc.round(ZhCalc.div(validText, select.dgn_price), tenderInfo.decimal.up) : 0;
|
|
|
plan_tp = validText;
|
|
|
- select[yearmonth + '_gcl'] = plan_gcl;
|
|
|
} else {
|
|
|
const reg = new RegExp('^([-]?)\\d+(\\.\\d{0,'+ parseInt(tenderInfo.decimal.up) +'})?$');
|
|
|
if (validText !== null && (!reg.test(validText))) {
|
|
@@ -219,7 +216,6 @@ $(function () {
|
|
|
}
|
|
|
plan_gcl = validText;
|
|
|
plan_tp = select.dgn_price && select.dgn_price !== 0 ? ZhCalc.round(ZhCalc.mul(validText, select.dgn_price), tenderInfo.decimal.tp) : 0;
|
|
|
- select[yearmonth + '_tp'] = plan_tp;
|
|
|
}
|
|
|
select[col.field] = validText;
|
|
|
const updateData = {
|
|
@@ -229,9 +225,17 @@ $(function () {
|
|
|
plan_tp,
|
|
|
};
|
|
|
console.log(updateData);
|
|
|
- // postData(window.location.pathname + '/save', {type: 'mode', postData: updateData}, function (result) {
|
|
|
+ postData(window.location.pathname + '/save', {type: 'ledger_edit', postData: updateData}, function (result) {
|
|
|
+ if (mode === 'tp') {
|
|
|
+ select[yearmonth + '_gcl'] = plan_gcl;
|
|
|
+ } else {
|
|
|
+ select[yearmonth + '_tp'] = plan_tp;
|
|
|
+ }
|
|
|
+ SpreadJsObj.reLoadRowData(info.sheet, info.row);
|
|
|
+ },function () {
|
|
|
+ select[col.field] = orgValue;
|
|
|
SpreadJsObj.reLoadRowData(info.sheet, info.row);
|
|
|
- // })
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
deletePress: function (sheet) {
|