Merge remote-tracking branch 'origin/master'
commit
61137a4f1f
|
@ -448,7 +448,7 @@ function bindChangeableInput() {
|
||||||
$(".input-changeable-amount").change(function () {
|
$(".input-changeable-amount").change(function () {
|
||||||
var amount = parseInt($(this).val());
|
var amount = parseInt($(this).val());
|
||||||
//找到对应的单价和税率
|
//找到对应的单价和税率
|
||||||
var price = f2($(this).parent().parent().find(".input-changeable-price").val());
|
var price = f5($(this).parent().parent().find(".input-changeable-price").val());
|
||||||
var taxRate = f2($(this).parent().parent().find(".input-changeable-tax-rate").val());
|
var taxRate = f2($(this).parent().parent().find(".input-changeable-tax-rate").val());
|
||||||
console.log(amount, price, taxRate);
|
console.log(amount, price, taxRate);
|
||||||
|
|
||||||
|
@ -473,7 +473,7 @@ function bindChangeableInput() {
|
||||||
var taxRate = f2($(this).val());
|
var taxRate = f2($(this).val());
|
||||||
//找到对应的数量和单价
|
//找到对应的数量和单价
|
||||||
var amount = parseInt($(this).parent().parent().find(".input-changeable-amount").val());
|
var amount = parseInt($(this).parent().parent().find(".input-changeable-amount").val());
|
||||||
var price = f2($(this).parent().parent().find(".input-changeable-price").val());
|
var price = f5($(this).parent().parent().find(".input-changeable-price").val());
|
||||||
console.log(amount, price, taxRate);
|
console.log(amount, price, taxRate);
|
||||||
|
|
||||||
$(this).parent().parent().find(".input-changeable-total-tax-exclude").val(f2Fixed(amount * price / (1 + taxRate / 100)));
|
$(this).parent().parent().find(".input-changeable-total-tax-exclude").val(f2Fixed(amount * price / (1 + taxRate / 100)));
|
||||||
|
|
|
@ -141,7 +141,7 @@ function calIncomeAndCost() {
|
||||||
var $incomeDeviceTaxExclude = $("input[name='incomeDeviceTaxExclude']");
|
var $incomeDeviceTaxExclude = $("input[name='incomeDeviceTaxExclude']");
|
||||||
if(val == "自定义"){
|
if(val == "自定义"){
|
||||||
$("input[name='incomeDeviceTaxExclude']").attr('readonly',false);
|
$("input[name='incomeDeviceTaxExclude']").attr('readonly',false);
|
||||||
$incomeDeviceTaxExclude.val("");
|
$("input[name='incomeDeviceTaxExclude']").attr("required",true);
|
||||||
}else if(val == "请选择税率"){
|
}else if(val == "请选择税率"){
|
||||||
$("input[name='incomeDeviceTaxExclude']").attr('readonly',true);
|
$("input[name='incomeDeviceTaxExclude']").attr('readonly',true);
|
||||||
$incomeDeviceTaxExclude.val("");
|
$incomeDeviceTaxExclude.val("");
|
||||||
|
@ -175,6 +175,7 @@ function calIncomeAndCost() {
|
||||||
var $incomeEngineerTaxExclude = $("input[name='incomeEngineerTaxExclude']");
|
var $incomeEngineerTaxExclude = $("input[name='incomeEngineerTaxExclude']");
|
||||||
if(val == "自定义"){
|
if(val == "自定义"){
|
||||||
$("input[name='incomeEngineerTaxExclude']").attr('readonly',false)
|
$("input[name='incomeEngineerTaxExclude']").attr('readonly',false)
|
||||||
|
$("input[name='incomeEngineerTaxExclude']").attr("required",true);
|
||||||
}else if(val == "请选择税率"){
|
}else if(val == "请选择税率"){
|
||||||
$("input[name='incomeEngineerTaxExclude']").attr('readonly',true);
|
$("input[name='incomeEngineerTaxExclude']").attr('readonly',true);
|
||||||
$incomeEngineerTaxExclude.val("");
|
$incomeEngineerTaxExclude.val("");
|
||||||
|
@ -207,7 +208,8 @@ function calIncomeAndCost() {
|
||||||
let val = $('#incomeServiceSelect option:selected').val();
|
let val = $('#incomeServiceSelect option:selected').val();
|
||||||
var $incomeServiceTaxExclude = $("input[name='incomeServiceTaxExclude']");
|
var $incomeServiceTaxExclude = $("input[name='incomeServiceTaxExclude']");
|
||||||
if(val == "自定义"){
|
if(val == "自定义"){
|
||||||
$("input[name='incomeServiceTaxExclude']").attr('readonly',false)
|
$("input[name='incomeServiceTaxExclude']").attr('readonly',false);
|
||||||
|
$("input[name='incomeServiceTaxExclude']").attr("required",true);
|
||||||
}else if(val == "请选择税率"){
|
}else if(val == "请选择税率"){
|
||||||
$("input[name='incomeServiceTaxExclude']").attr('readonly',true);
|
$("input[name='incomeServiceTaxExclude']").attr('readonly',true);
|
||||||
$incomeServiceTaxExclude.val("");
|
$incomeServiceTaxExclude.val("");
|
||||||
|
@ -241,6 +243,7 @@ function calIncomeAndCost() {
|
||||||
var $costPurchaseDeviceTaxExclude = $("input[name='costPurchaseDeviceTaxExclude']");
|
var $costPurchaseDeviceTaxExclude = $("input[name='costPurchaseDeviceTaxExclude']");
|
||||||
if(val == "自定义"){
|
if(val == "自定义"){
|
||||||
$("input[name='costPurchaseDeviceTaxExclude']").attr('readonly',false)
|
$("input[name='costPurchaseDeviceTaxExclude']").attr('readonly',false)
|
||||||
|
$("input[name='costPurchaseDeviceTaxExclude']").attr("required",true);
|
||||||
}else if(val == "请选择税率"){
|
}else if(val == "请选择税率"){
|
||||||
$("input[name='costPurchaseDeviceTaxExclude']").attr('readonly',true);
|
$("input[name='costPurchaseDeviceTaxExclude']").attr('readonly',true);
|
||||||
$costPurchaseDeviceTaxExclude.val("");
|
$costPurchaseDeviceTaxExclude.val("");
|
||||||
|
@ -274,6 +277,7 @@ function calIncomeAndCost() {
|
||||||
var $costPurchaseBuildTaxExclude = $("input[name='costPurchaseBuildTaxExclude']");
|
var $costPurchaseBuildTaxExclude = $("input[name='costPurchaseBuildTaxExclude']");
|
||||||
if(val == "自定义"){
|
if(val == "自定义"){
|
||||||
$("input[name='costPurchaseBuildTaxExclude']").attr('readonly',false)
|
$("input[name='costPurchaseBuildTaxExclude']").attr('readonly',false)
|
||||||
|
$("input[name='costPurchaseBuildTaxExclude']").attr("required",true);
|
||||||
}else if(val == "请选择税率"){
|
}else if(val == "请选择税率"){
|
||||||
$("input[name='costPurchaseBuildTaxExclude']").attr('readonly',true);
|
$("input[name='costPurchaseBuildTaxExclude']").attr('readonly',true);
|
||||||
$costPurchaseBuildTaxExclude.val("");
|
$costPurchaseBuildTaxExclude.val("");
|
||||||
|
@ -307,6 +311,7 @@ function calIncomeAndCost() {
|
||||||
var $costPurchaseServiceTaxExclude = $("input[name='costPurchaseServiceTaxExclude']");
|
var $costPurchaseServiceTaxExclude = $("input[name='costPurchaseServiceTaxExclude']");
|
||||||
if(val == "自定义"){
|
if(val == "自定义"){
|
||||||
$("input[name='costPurchaseServiceTaxExclude']").attr('readonly',false)
|
$("input[name='costPurchaseServiceTaxExclude']").attr('readonly',false)
|
||||||
|
$("input[name='costPurchaseServiceTaxExclude']").attr("required",true);
|
||||||
}else if(val == "请选择税率"){
|
}else if(val == "请选择税率"){
|
||||||
$("input[name='costPurchaseServiceTaxExclude']").attr('readonly',true);
|
$("input[name='costPurchaseServiceTaxExclude']").attr('readonly',true);
|
||||||
$costPurchaseServiceTaxExclude.val("");
|
$costPurchaseServiceTaxExclude.val("");
|
||||||
|
@ -340,6 +345,7 @@ function calIncomeAndCost() {
|
||||||
var $costOtherOtherTaxExclude = $("input[name='costOtherOtherTaxExclude']");
|
var $costOtherOtherTaxExclude = $("input[name='costOtherOtherTaxExclude']");
|
||||||
if(val == "自定义"){
|
if(val == "自定义"){
|
||||||
$("input[name='costOtherOtherTaxExclude']").attr('readonly',false)
|
$("input[name='costOtherOtherTaxExclude']").attr('readonly',false)
|
||||||
|
$("input[name='costOtherOtherTaxExclude']").attr("required",true);
|
||||||
}else if(val == "请选择税率"){
|
}else if(val == "请选择税率"){
|
||||||
$("input[name='costOtherOtherTaxExclude']").attr('readonly',true);
|
$("input[name='costOtherOtherTaxExclude']").attr('readonly',true);
|
||||||
$costOtherOtherTaxExclude.val("");
|
$costOtherOtherTaxExclude.val("");
|
||||||
|
@ -373,6 +379,7 @@ function calIncomeAndCost() {
|
||||||
var $costPurchaseOtherTaxExclude = $("input[name='costPurchaseOtherTaxExclude']");
|
var $costPurchaseOtherTaxExclude = $("input[name='costPurchaseOtherTaxExclude']");
|
||||||
if(val == "自定义"){
|
if(val == "自定义"){
|
||||||
$("input[name='costPurchaseOtherTaxExclude']").attr('readonly',false)
|
$("input[name='costPurchaseOtherTaxExclude']").attr('readonly',false)
|
||||||
|
$("input[name='costPurchaseOtherTaxExclude']").attr("required",true);
|
||||||
}else if(val == "请选择税率"){
|
}else if(val == "请选择税率"){
|
||||||
$("input[name='costPurchaseOtherTaxExclude']").attr('readonly',true);
|
$("input[name='costPurchaseOtherTaxExclude']").attr('readonly',true);
|
||||||
$costPurchaseOtherTaxExclude.val("");
|
$costPurchaseOtherTaxExclude.val("");
|
||||||
|
|
|
@ -203,7 +203,6 @@
|
||||||
<td><input type="text" class="number" maxlength="16" name="incomeDeviceTaxExclude" readonly></td>
|
<td><input type="text" class="number" maxlength="16" name="incomeDeviceTaxExclude" readonly></td>
|
||||||
<td>
|
<td>
|
||||||
<select data-am-selected name="incomeDeviceSelect" id="incomeDeviceSelect">
|
<select data-am-selected name="incomeDeviceSelect" id="incomeDeviceSelect">
|
||||||
<option value="请选择税率">请选择税率</option>
|
|
||||||
<option value="0">0%</option>
|
<option value="0">0%</option>
|
||||||
<option value="0.01">1%</option>
|
<option value="0.01">1%</option>
|
||||||
<option value="0.03">3%</option>
|
<option value="0.03">3%</option>
|
||||||
|
@ -221,7 +220,6 @@
|
||||||
<td><input type="text" class="number" maxlength="16" name="incomeEngineerTaxExclude" readonly></td>
|
<td><input type="text" class="number" maxlength="16" name="incomeEngineerTaxExclude" readonly></td>
|
||||||
<td>
|
<td>
|
||||||
<select data-am-selected name="incomeEngineerSelect" id="incomeEngineerSelect">
|
<select data-am-selected name="incomeEngineerSelect" id="incomeEngineerSelect">
|
||||||
<option value="请选择税率">请选择税率</option>
|
|
||||||
<option value="0">0%</option>
|
<option value="0">0%</option>
|
||||||
<option value="0.01">1%</option>
|
<option value="0.01">1%</option>
|
||||||
<option value="0.03">3%</option>
|
<option value="0.03">3%</option>
|
||||||
|
@ -239,7 +237,6 @@
|
||||||
<td><input type="text" class="number" maxlength="16" name="incomeServiceTaxExclude" readonly></td>
|
<td><input type="text" class="number" maxlength="16" name="incomeServiceTaxExclude" readonly></td>
|
||||||
<td>
|
<td>
|
||||||
<select data-am-selected name="incomeServiceSelect" id="incomeServiceSelect">
|
<select data-am-selected name="incomeServiceSelect" id="incomeServiceSelect">
|
||||||
<option value="请选择税率">请选择税率</option>
|
|
||||||
<option value="0">0%</option>
|
<option value="0">0%</option>
|
||||||
<option value="0.01">1%</option>
|
<option value="0.01">1%</option>
|
||||||
<option value="0.03">3%</option>
|
<option value="0.03">3%</option>
|
||||||
|
@ -278,7 +275,6 @@
|
||||||
<td><input type="text" class="number" maxlength="16" name="costPurchaseDeviceTaxExclude" readonly></td>
|
<td><input type="text" class="number" maxlength="16" name="costPurchaseDeviceTaxExclude" readonly></td>
|
||||||
<td>
|
<td>
|
||||||
<select data-am-selected name="costPurchaseDeviceSelect" id="costPurchaseDeviceSelect">
|
<select data-am-selected name="costPurchaseDeviceSelect" id="costPurchaseDeviceSelect">
|
||||||
<option value="请选择税率">请选择税率</option>
|
|
||||||
<option value="0">0%</option>
|
<option value="0">0%</option>
|
||||||
<option value="0.01">1%</option>
|
<option value="0.01">1%</option>
|
||||||
<option value="0.03">3%</option>
|
<option value="0.03">3%</option>
|
||||||
|
@ -297,7 +293,6 @@
|
||||||
<td><input type="text" class="number" maxlength="16" name="costPurchaseBuildTaxExclude" readonly></td>
|
<td><input type="text" class="number" maxlength="16" name="costPurchaseBuildTaxExclude" readonly></td>
|
||||||
<td>
|
<td>
|
||||||
<select data-am-selected name="costPurchaseBuildSelect" id="costPurchaseBuildSelect">
|
<select data-am-selected name="costPurchaseBuildSelect" id="costPurchaseBuildSelect">
|
||||||
<option value="请选择税率">请选择税率</option>
|
|
||||||
<option value="0">0%</option>
|
<option value="0">0%</option>
|
||||||
<option value="0.01">1%</option>
|
<option value="0.01">1%</option>
|
||||||
<option value="0.03">3%</option>
|
<option value="0.03">3%</option>
|
||||||
|
@ -316,7 +311,6 @@
|
||||||
<td><input type="text" class="number" maxlength="16" name="costPurchaseServiceTaxExclude" readonly></td>
|
<td><input type="text" class="number" maxlength="16" name="costPurchaseServiceTaxExclude" readonly></td>
|
||||||
<td>
|
<td>
|
||||||
<select data-am-selected name="costPurchaseServiceSelect" id="costPurchaseServiceSelect">
|
<select data-am-selected name="costPurchaseServiceSelect" id="costPurchaseServiceSelect">
|
||||||
<option value="请选择税率">请选择税率</option>
|
|
||||||
<option value="0">0%</option>
|
<option value="0">0%</option>
|
||||||
<option value="0.01">1%</option>
|
<option value="0.01">1%</option>
|
||||||
<option value="0.03">3%</option>
|
<option value="0.03">3%</option>
|
||||||
|
@ -335,7 +329,6 @@
|
||||||
<td><input type="text" class="number" maxlength="16" name="costPurchaseOtherTaxExclude" readonly></td>
|
<td><input type="text" class="number" maxlength="16" name="costPurchaseOtherTaxExclude" readonly></td>
|
||||||
<td>
|
<td>
|
||||||
<select data-am-selected name="costPurchaseOtherSelect" id="costPurchaseOtherSelect">
|
<select data-am-selected name="costPurchaseOtherSelect" id="costPurchaseOtherSelect">
|
||||||
<option value="请选择税率">请选择税率</option>
|
|
||||||
<option value="0">0%</option>
|
<option value="0">0%</option>
|
||||||
<option value="0.01">1%</option>
|
<option value="0.01">1%</option>
|
||||||
<option value="0.03">3%</option>
|
<option value="0.03">3%</option>
|
||||||
|
@ -363,7 +356,6 @@
|
||||||
<td><input type="text" class="number" maxlength="16" name="costOtherOtherTaxExclude" readonly></td>
|
<td><input type="text" class="number" maxlength="16" name="costOtherOtherTaxExclude" readonly></td>
|
||||||
<td>
|
<td>
|
||||||
<select data-am-selected name="costOtherOtherSelect" id="costOtherOtherSelect">
|
<select data-am-selected name="costOtherOtherSelect" id="costOtherOtherSelect">
|
||||||
<option value="请选择税率">请选择税率</option>
|
|
||||||
<option value="0">0%</option>
|
<option value="0">0%</option>
|
||||||
<option value="0.01">1%</option>
|
<option value="0.01">1%</option>
|
||||||
<option value="0.03">3%</option>
|
<option value="0.03">3%</option>
|
||||||
|
@ -467,26 +459,11 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var incomeDeviceTaxExclude = $("input[name='incomeDeviceTaxExclude']").val();
|
|
||||||
var incomeEngineerTaxExclude = $("input[name='incomeEngineerTaxExclude']").val();
|
|
||||||
var incomeServiceTaxExclude = $("input[name='incomeServiceTaxExclude']").val();
|
|
||||||
var costPurchaseDeviceTaxExclude = $("input[name='costPurchaseDeviceTaxExclude']").val();
|
|
||||||
var costPurchaseBuildTaxExclude = $("input[name='costPurchaseBuildTaxExclude']").val();
|
|
||||||
var costPurchaseServiceTaxExclude = $("input[name='costPurchaseServiceTaxExclude']").val();
|
|
||||||
var costOtherOtherTaxExclude = $("input[name='costOtherOtherTaxExclude']").val();
|
|
||||||
|
|
||||||
if(incomeDeviceTaxExclude && incomeEngineerTaxExclude && incomeServiceTaxExclude
|
|
||||||
&& costPurchaseDeviceTaxExclude && costPurchaseBuildTaxExclude && costPurchaseServiceTaxExclude && costOtherOtherTaxExclude){
|
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
$("#saveDraft").attr('disabled', false);
|
$("#saveDraft").attr('disabled', false);
|
||||||
}, 5000);
|
}, 5000);
|
||||||
$("#pmsForm").attr("action","${base}/project/estimateAddSave");
|
$("#pmsForm").attr("action","${base}/project/estimateAddSave");
|
||||||
$("#pmsForm").submit();
|
$("#pmsForm").submit();
|
||||||
}else {
|
|
||||||
alert("请完善不含税金额");
|
|
||||||
$("#saveDraft").attr('disabled',false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
});
|
||||||
$("#saveApprove").click(function () {
|
$("#saveApprove").click(function () {
|
||||||
|
@ -505,26 +482,11 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var incomeDeviceTaxExclude = $("input[name='incomeDeviceTaxExclude']").val();
|
|
||||||
var incomeEngineerTaxExclude = $("input[name='incomeEngineerTaxExclude']").val();
|
|
||||||
var incomeServiceTaxExclude = $("input[name='incomeServiceTaxExclude']").val();
|
|
||||||
var costPurchaseDeviceTaxExclude = $("input[name='costPurchaseDeviceTaxExclude']").val();
|
|
||||||
var costPurchaseBuildTaxExclude = $("input[name='costPurchaseBuildTaxExclude']").val();
|
|
||||||
var costPurchaseServiceTaxExclude = $("input[name='costPurchaseServiceTaxExclude']").val();
|
|
||||||
var costOtherOtherTaxExclude = $("input[name='costOtherOtherTaxExclude']").val();
|
|
||||||
|
|
||||||
if(incomeDeviceTaxExclude && incomeEngineerTaxExclude && incomeServiceTaxExclude
|
|
||||||
&& costPurchaseDeviceTaxExclude && costPurchaseBuildTaxExclude && costPurchaseServiceTaxExclude && costOtherOtherTaxExclude){
|
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
$("#saveApprove").attr('disabled', false);
|
$("#saveApprove").attr('disabled', false);
|
||||||
}, 5000);
|
}, 5000);
|
||||||
$("#pmsForm").attr("action","${base}/project/estimateAddSave");
|
$("#pmsForm").attr("action","${base}/project/estimateAddSaveAndApprove");
|
||||||
$("#pmsForm").submit();
|
$("#pmsForm").submit();
|
||||||
}else {
|
|
||||||
alert("请完善不含税金额");
|
|
||||||
$("#saveApprove").attr('disabled',false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue