|
@@ -320,7 +320,7 @@
|
|
|
<div class="form-group">
|
|
|
<label>单独设置</label>
|
|
|
<div class="row">
|
|
|
- <div class="col-auto mt-1">
|
|
|
+ <div class="col-auto pr-0">
|
|
|
<div class="form-group form-check pl-0">
|
|
|
<div class="custom-control custom-switch">
|
|
|
<input type="checkbox" class="custom-control-input" id="decimal-pay">
|
|
@@ -338,6 +338,34 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="row mt-1">
|
|
|
+ <div class="col-auto pr-0">
|
|
|
+ <div class="form-group form-check pl-0">
|
|
|
+ <div class="custom-control custom-switch">
|
|
|
+ <input type="checkbox" class="custom-control-input" id="decimal-extra">
|
|
|
+ <label class="custom-control-label" for="decimal-extra">其他台账</label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-4">
|
|
|
+ <div class="input-group input-group-sm">
|
|
|
+ <div class="input-group-prepend">
|
|
|
+ <span class="input-group-text">数量</span>
|
|
|
+ </div>
|
|
|
+ <input type="number" class="form-control" value="2" id="decimal-extra-qty"
|
|
|
+ oninput="limitDecimal(this)" min="0" max="6">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-4">
|
|
|
+ <div class="input-group input-group-sm">
|
|
|
+ <div class="input-group-prepend">
|
|
|
+ <span class="input-group-text">金额</span>
|
|
|
+ </div>
|
|
|
+ <input type="number" class="form-control" value="2" id="decimal-extra-tp"
|
|
|
+ oninput="limitDecimal(this)" min="0" max="4">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="modal-footer">
|
|
@@ -399,7 +427,7 @@
|
|
|
<div class="form-group">
|
|
|
<label>单独设置</label>
|
|
|
<div class="row">
|
|
|
- <div class="col-auto mt-1">
|
|
|
+ <div class="col-auto pr-0">
|
|
|
<div class="form-group form-check pl-0">
|
|
|
<div class="custom-control custom-switch">
|
|
|
<input type="checkbox" class="custom-control-input" id="decimal-pay" readonly="">
|
|
@@ -416,6 +444,32 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="row mt-1">
|
|
|
+ <div class="col-auto pr-0">
|
|
|
+ <div class="form-group form-check pl-0">
|
|
|
+ <div class="custom-control custom-switch">
|
|
|
+ <input type="checkbox" class="custom-control-input" id="decimal-extra" readonly="">
|
|
|
+ <label class="custom-control-label" for="decimal-extra">其他台账</label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-4">
|
|
|
+ <div class="input-group input-group-sm">
|
|
|
+ <div class="input-group-prepend">
|
|
|
+ <span class="input-group-text">数量</span>
|
|
|
+ </div>
|
|
|
+ <input type="number" class="form-control" value="2" id="decimal-extra-qty" readonly="">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-4">
|
|
|
+ <div class="input-group input-group-sm">
|
|
|
+ <div class="input-group-prepend">
|
|
|
+ <span class="input-group-text">金额</span>
|
|
|
+ </div>
|
|
|
+ <input type="number" class="form-control" value="2" id="decimal-extra-tp" readonly="">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="modal-footer">
|
|
@@ -645,7 +699,7 @@
|
|
|
$('#supervision2-date').val(property.construction_unit.supervision2.date);
|
|
|
|
|
|
// 技术参数
|
|
|
- $('#load-level').find("option:contains('" + property.tech_param.loadLevel + "')").attr("selected",true);;
|
|
|
+ $('#load-level').find("option:contains('" + property.tech_param.loadLevel + "')").attr("selected",true);
|
|
|
$('#length').val(property.tech_param.loadLength);
|
|
|
$('#start-peg').val(property.tech_param.startPeg);
|
|
|
$('#end-peg').val(property.tech_param.endPeg);
|
|
@@ -716,9 +770,29 @@
|
|
|
function loadCalculateProperty () {
|
|
|
$('#decimal-up').val(property.decimal.up);
|
|
|
$('#decimal-tp').val(property.decimal.tp);
|
|
|
+
|
|
|
$('#decimal-pay')[0].checked = property.decimal.pay;
|
|
|
$('#decimal-pay-tp').val(property.decimal.payTp);
|
|
|
+ $('#decimal-pay-tp')[0].disabled = !property.decimal.pay;
|
|
|
+
|
|
|
+ $('#decimal-extra')[0].checked = property.decimal.extra;
|
|
|
+ $('#decimal-extra-tp').val(property.decimal.extraTp);
|
|
|
+ $('#decimal-extra-tp')[0].disabled = !property.decimal.extra;
|
|
|
+ $('#decimal-extra-qty').val(property.decimal.extraQty);
|
|
|
+ $('#decimal-extra-qty')[0].disabled = !property.decimal.extra;
|
|
|
}
|
|
|
+ $('#decimal-pay').change(() => {
|
|
|
+ console.log(!$('#decimal-pay')[0].checked);
|
|
|
+ $('#decimal-pay-tp')[0].disabled = !$('#decimal-pay')[0].checked;
|
|
|
+ console.log($('#decimal-pay-tp')[0].disabled);
|
|
|
+ });
|
|
|
+ $('#decimal-extra').change(() => {
|
|
|
+ console.log(!$('#decimal-extra')[0].checked);
|
|
|
+ $('#decimal-extra-qty')[0].disabled = !$('#decimal-extra')[0].checked;
|
|
|
+ $('#decimal-extra-tp')[0].disabled = !$('#decimal-extra')[0].checked;
|
|
|
+ console.log($('#decimal-extra-qty')[0].disabled);
|
|
|
+ console.log($('#decimal-extra-tp')[0].disabled);
|
|
|
+ });
|
|
|
$('#bd-set-2').on('show.bs.modal', function () {
|
|
|
loadCalculateProperty();
|
|
|
});
|
|
@@ -729,6 +803,9 @@
|
|
|
tp: _.toNumber($('#decimal-tp').val()),
|
|
|
pay: $('#decimal-pay')[0].checked,
|
|
|
payTp: _.toNumber($('#decimal-pay-tp').val()),
|
|
|
+ extra: $('#decimal-extra')[0].checked,
|
|
|
+ extraQty: _.toNumber($('#decimal-extra-qty').val()),
|
|
|
+ extraTp: _.toNumber($('#decimal-extra-tp').val()),
|
|
|
}
|
|
|
};
|
|
|
if (ledgerChecked) {
|
|
@@ -757,6 +834,25 @@
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
+ if (property.decimal.extra) {
|
|
|
+ if (!prop.decimal.extra) {
|
|
|
+ toastr.warning('第一期已审批完成,不可取消其他台账单独设置');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (prop.decimal.extraQty < property.decimal.extraQty) {
|
|
|
+ toastr.warning('第一期已审批完成,单独设置的其他台账小数位数,不可小于' + property.decimal.extraQty);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (prop.decimal.extraTp < property.decimal.extraTp) {
|
|
|
+ toastr.warning('第一期已审批完成,单独设置的其他台账小数位数,不可小于' + property.decimal.extraTp);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (prop.decimal.extra) {
|
|
|
+ toastr.warning('第一期已审批完成,合同支付不可单独设置');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
const tenderId = window.location.pathname.split('/')[2];
|
|
|
postData('/tender/' + tenderId + '/save', prop, function (data) {
|