|
@@ -44,6 +44,7 @@ class ChangeAnalysis {
|
|
}
|
|
}
|
|
b.qty = _.toNumber(b.samount);
|
|
b.qty = _.toNumber(b.samount);
|
|
b.valid_qty = ZhCalc.sub(b.qty, b.used_qty);
|
|
b.valid_qty = ZhCalc.sub(b.qty, b.used_qty);
|
|
|
|
+ b.tp = ZhCalc.round(ZhCalc.mul(b.qty, b.unit_price), tenderInfo.decimal.tp);
|
|
b.pos = _.filter(change.detail.curUsedBills, {cbid: b.id});
|
|
b.pos = _.filter(change.detail.curUsedBills, {cbid: b.id});
|
|
b.cur_qty = 0;
|
|
b.cur_qty = 0;
|
|
for (const p of b.pos) {
|
|
for (const p of b.pos) {
|
|
@@ -60,7 +61,7 @@ class ChangeAnalysis {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-let changes, usedChangesId, ledger, analysis;
|
|
|
|
|
|
+let changes, usedChangesId, ledger, analysis, tenderInfo;
|
|
|
|
|
|
|
|
|
|
$(document).ready(() => {
|
|
$(document).ready(() => {
|
|
@@ -192,7 +193,7 @@ $(document).ready(() => {
|
|
// 加载变更信息和附件
|
|
// 加载变更信息和附件
|
|
const obj = $('.tab-content');
|
|
const obj = $('.tab-content');
|
|
if (change) {
|
|
if (change) {
|
|
- const inputs = $('input[type!=checkbox]', obj);
|
|
|
|
|
|
+ const inputs = $('input[type!=checkbox][type!=radio]', obj);
|
|
for (const i of inputs) {
|
|
for (const i of inputs) {
|
|
const field = $(i).attr('name');
|
|
const field = $(i).attr('name');
|
|
const text = (field && change[field]) ? change[field] : '';
|
|
const text = (field && change[field]) ? change[field] : '';
|
|
@@ -224,7 +225,7 @@ $(document).ready(() => {
|
|
// 变更性质
|
|
// 变更性质
|
|
$('select[name=quality]').val(change.quality);
|
|
$('select[name=quality]').val(change.quality);
|
|
// 变更单位
|
|
// 变更单位
|
|
- $('select[name=company]').html('<option>' + change.company ? change.company : '' + '</option>');
|
|
|
|
|
|
+ $('select[name=company]').html('<option>' + (change.company ? change.company : '') + '</option>');
|
|
// 费用承担方
|
|
// 费用承担方
|
|
$('input[name=charge][value=' + change.charge + ']').prop('checked', true);
|
|
$('input[name=charge][value=' + change.charge + ']').prop('checked', true);
|
|
// 附件
|
|
// 附件
|
|
@@ -266,6 +267,7 @@ $(document).ready(() => {
|
|
// ------------end spread界面操作方法
|
|
// ------------end spread界面操作方法
|
|
|
|
|
|
postData(window.location.pathname + '/data', null, function (result) {
|
|
postData(window.location.pathname + '/data', null, function (result) {
|
|
|
|
+ tenderInfo = result.tenderInfo;
|
|
changes = result.changes;
|
|
changes = result.changes;
|
|
usedChangesId = result.usedChangesId;
|
|
usedChangesId = result.usedChangesId;
|
|
ledger = result.ledger;
|
|
ledger = result.ledger;
|