Browse Source

[fix] 销售管理

修改销售估价的业务添加和业务添加详情前端页面,新增含税和不含税单价的人民币和美元以及含税和不含税总价的人民币和美元进行区分,去掉计算模块
修改销售估价的工程添加和工程添加详情前端页面,新增含税和不含税单价的人民币和美元以及含税和不含税总价的人民币和美元进行区分,去掉计算模块
修改销售估价的采购添加和采购添加详情前端页面,新增含税和不含税单价的人民币和美元以及含税和不含税总价的人民币和美元进行区分,去掉计算模块
修改销售估价的总经理添加和总经理添加详情前端页面,新增含税和不含税单价的人民币和美元以及含税和不含税总价的人民币和美元进行区分,去掉计算模块
根据新的计算公式,重写总经理添加页面的不含税经营成本和含税经营成本的计算
dev
liuxiaoxu 2 months ago
parent
commit
37a51742af
  1. 158
      ruoyi-admin/src/main/resources/templates/sales/estimate/add.html
  2. 156
      ruoyi-admin/src/main/resources/templates/sales/estimate/addDetail.html
  3. 183
      ruoyi-admin/src/main/resources/templates/sales/estimate/ceoAdd.html
  4. 176
      ruoyi-admin/src/main/resources/templates/sales/estimate/ceoAddDetail.html
  5. 156
      ruoyi-admin/src/main/resources/templates/sales/estimate/engineeringAdd.html
  6. 154
      ruoyi-admin/src/main/resources/templates/sales/estimate/engineeringAddDetail.html
  7. 156
      ruoyi-admin/src/main/resources/templates/sales/estimate/purchaseAdd.html
  8. 154
      ruoyi-admin/src/main/resources/templates/sales/estimate/purchaseAddDetail.html

158
ruoyi-admin/src/main/resources/templates/sales/estimate/add.html

@ -62,29 +62,29 @@
</div>
</div>
<div class="container">
<h4 class="form-header h4">计算</h4>
<div class="col-xs-12 form-row">
<label class=" col-sm-2">物料合计:</label><input class="col-sm-4" name="materialSum" id="materialSum_add" type="number" readonly/>
<label class=" col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" id="enterpriseSum_add" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2"> 不含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="noTaxRmb" id="noTaxRmb_add" type="number" readonly/>
<label class="col-sm-2"> 不含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allNoTaxRmb" id="allNoTaxRmb_add" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2"> 含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="taxRmb" id="taxRmb_add" type="number" readonly/>
<label class="col-sm-2"> 含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allTaxRmb" id="allTaxRmb_add" type="number" readonly/>
</div>
<div class="col-xs-12">
<label class="col-sm-2">不含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="noTaxDollar" id="noTaxDollar_add" type="number" readonly/>
<label class="col-sm-2">不含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allNoTaxDollar" id="allNoTaxDollar_add" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2">含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="taxDollar" id="taxDollar_add" type="number" readonly/>
<label class="col-sm-2">含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allTaxDollar" id="allTaxDollar_add" type="number" readonly/>
</div>
</div>
<!-- <div class="container">-->
<!-- <h4 class="form-header h4">计算</h4>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class=" col-sm-2">物料合计:</label><input class="col-sm-4" name="materialSum" id="materialSum_add" type="number" readonly/>-->
<!-- <label class=" col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" id="enterpriseSum_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class="col-sm-2"> 不含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="noTaxRmb" id="noTaxRmb_add" type="number" readonly/>-->
<!-- <label class="col-sm-2"> 不含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allNoTaxRmb" id="allNoTaxRmb_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class="col-sm-2"> 含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="taxRmb" id="taxRmb_add" type="number" readonly/>-->
<!-- <label class="col-sm-2"> 含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allTaxRmb" id="allTaxRmb_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12">-->
<!-- <label class="col-sm-2">不含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="noTaxDollar" id="noTaxDollar_add" type="number" readonly/>-->
<!-- <label class="col-sm-2">不含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allNoTaxDollar" id="allNoTaxDollar_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class="col-sm-2">含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="taxDollar" id="taxDollar_add" type="number" readonly/>-->
<!-- <label class="col-sm-2">含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allTaxDollar" id="allTaxDollar_add" type="number" readonly/>-->
<!-- </div>-->
<!-- </div>-->
</form>
@ -302,35 +302,35 @@
editable: true,
},
{
title: '不含税单价',
title: '不含税单价(RMB)',
field: 'noTaxRmb',
},
{
title: '含税单价',
title: '含税单价(RMB)',
field: 'taxRmb',
},
{
title: '不含税总价',
title: '不含税总价(RMB)',
field: 'allNoTaxRmb',
},
{
title: '含税总价',
title: '含税总价(RMB)',
field: 'allTaxRmb',
},
{
title: '含税单价',
title: '含税单价(美元)',
field: 'taxDollar',
},
{
title: '不含税单价',
title: '不含税单价(美元)',
field: 'noTaxDollar',
},
{
title: '含税总价',
title: '含税总价(美元)',
field: 'allTaxDollar',
},
{
title: '不含税总价',
title: '不含税总价(美元)',
field: 'allNoTaxDollar',
},
{
@ -349,7 +349,7 @@
}],
onEditableSave:function(field, row, oldValue, $el){
// 确保getTotalAmount函数存在且正确引用
getTotalAmount();
// getTotalAmount();
},
};
@ -412,7 +412,7 @@
}
}
getTotalAmount();
// getTotalAmount();
layer.close(index);
}
@ -422,7 +422,7 @@
field: 'materialNo',
values: materialNo
})
getTotalAmount();
//getTotalAmount();
}
@ -521,51 +521,51 @@
//form计算模块
function getTotalAmount(){
let getData = $('#bootstrap-table').bootstrapTable('getData');
var materialSum = 0;
var enterpriseSum = 0;
var noTaxRmb = 0;
var taxRmb = 0;
var allNoTaxRmb = 0;
var allTaxRmb = 0;
var noTaxDollar = 0;
var taxDollar = 0;
var allNoTaxDollar = 0;
var allTaxDollar = 0;
materialSum = getData.length;
enterpriseSum = getData.reduce((sum, item) => sum + (parseInt(item.materialNum) || 0), 0);
for(var i=0;i<getData.length;i++){
noTaxRmb += parseFloat(getData[i].noTaxRmb) || 0;
taxRmb += parseFloat(getData[i].taxRmb) || 0;
allNoTaxRmb += parseFloat(getData[i].allNoTaxRmb) || 0;
allTaxRmb += parseFloat(getData[i].allTaxRmb) || 0;
noTaxDollar += parseFloat(getData[i].noTaxDollar) || 0;
taxDollar += parseFloat(getData[i].taxDollar) || 0;
allNoTaxDollar += parseFloat(getData[i].allNoTaxDollar) || 0;
allTaxDollar += parseFloat(getData[i].allTaxDollar) || 0;
}
noTaxRmb = noTaxRmb.toFixed(2);
taxRmb = taxRmb.toFixed(2);
allNoTaxRmb = allNoTaxRmb.toFixed(2);
allTaxRmb = allTaxRmb.toFixed(2);
noTaxDollar = noTaxDollar.toFixed(2);
taxDollar = taxDollar.toFixed(2);
allNoTaxDollar = allNoTaxDollar.toFixed(2);
allTaxDollar = allTaxDollar.toFixed(2);
$("input[name='materialSum']").val(materialSum);
$("input[name='enterpriseSum']").val(enterpriseSum);
$("input[name='noTaxRmb']").val(noTaxRmb);
$("input[name='taxRmb']").val(taxRmb);
$("input[name='allNoTaxRmb']").val(allNoTaxRmb);
$("input[name='allTaxRmb']").val(allTaxRmb);
$("input[name='noTaxDollar']").val(noTaxDollar);
$("input[name='taxDollar']").val(taxDollar);
$("input[name='allNoTaxDollar']").val(allNoTaxDollar);
$("input[name='allTaxDollar']").val(allTaxDollar);
}
// function getTotalAmount(){
// let getData = $('#bootstrap-table').bootstrapTable('getData');
// var materialSum = 0;
// var enterpriseSum = 0;
// var noTaxRmb = 0;
// var taxRmb = 0;
// var allNoTaxRmb = 0;
// var allTaxRmb = 0;
// var noTaxDollar = 0;
// var taxDollar = 0;
// var allNoTaxDollar = 0;
// var allTaxDollar = 0;
// materialSum = getData.length;
//
// enterpriseSum = getData.reduce((sum, item) => sum + (parseInt(item.materialNum) || 0), 0);
// for(var i=0;i<getData.length;i++){
// noTaxRmb += parseFloat(getData[i].noTaxRmb) || 0;
// taxRmb += parseFloat(getData[i].taxRmb) || 0;
// allNoTaxRmb += parseFloat(getData[i].allNoTaxRmb) || 0;
// allTaxRmb += parseFloat(getData[i].allTaxRmb) || 0;
// noTaxDollar += parseFloat(getData[i].noTaxDollar) || 0;
// taxDollar += parseFloat(getData[i].taxDollar) || 0;
// allNoTaxDollar += parseFloat(getData[i].allNoTaxDollar) || 0;
// allTaxDollar += parseFloat(getData[i].allTaxDollar) || 0;
// }
// noTaxRmb = noTaxRmb.toFixed(2);
// taxRmb = taxRmb.toFixed(2);
// allNoTaxRmb = allNoTaxRmb.toFixed(2);
// allTaxRmb = allTaxRmb.toFixed(2);
// noTaxDollar = noTaxDollar.toFixed(2);
// taxDollar = taxDollar.toFixed(2);
// allNoTaxDollar = allNoTaxDollar.toFixed(2);
// allTaxDollar = allTaxDollar.toFixed(2);
// $("input[name='materialSum']").val(materialSum);
// $("input[name='enterpriseSum']").val(enterpriseSum);
// $("input[name='noTaxRmb']").val(noTaxRmb);
// $("input[name='taxRmb']").val(taxRmb);
// $("input[name='allNoTaxRmb']").val(allNoTaxRmb);
// $("input[name='allTaxRmb']").val(allTaxRmb);
// $("input[name='noTaxDollar']").val(noTaxDollar);
// $("input[name='taxDollar']").val(taxDollar);
// $("input[name='allNoTaxDollar']").val(allNoTaxDollar);
// $("input[name='allTaxDollar']").val(allTaxDollar);
//
// }
// 计算并更新所有其他总和

156
ruoyi-admin/src/main/resources/templates/sales/estimate/addDetail.html

@ -61,29 +61,29 @@
</div>
</div>
<div class="container">
<h4 class="form-header h4">计算</h4>
<div class="col-xs-12 form-row">
<label class=" col-sm-2">物料合计:</label><input class="col-sm-4" name="materialSum" th:field="*{materialSum}" id="materialSum_add" type="number" readonly/>
<label class=" col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" th:field="*{enterpriseSum}" id="enterpriseSum_add" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2"> 不含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="noTaxRmb" id="noTaxRmb_add" type="number" readonly/>
<label class="col-sm-2"> 不含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allNoTaxRmb" id="allNoTaxRmb_add" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2"> 含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="taxRmb" id="taxRmb_add" type="number" readonly/>
<label class="col-sm-2"> 含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allTaxRmb" id="allTaxRmb_add" type="number" readonly/>
</div>
<div class="col-xs-12">
<label class="col-sm-2">不含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="noTaxDollar" id="noTaxDollar_add" type="number" readonly/>
<label class="col-sm-2">不含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allNoTaxDollar" id="allNoTaxDollar_add" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2">含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="taxDollar" id="taxDollar_add" type="number" readonly/>
<label class="col-sm-2">含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allTaxDollar" id="allTaxDollar_add" type="number" readonly/>
</div>
</div>
<!-- <div class="container">-->
<!-- <h4 class="form-header h4">计算</h4>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class=" col-sm-2">物料合计:</label><input class="col-sm-4" name="materialSum" th:field="*{materialSum}" id="materialSum_add" type="number" readonly/>-->
<!-- <label class=" col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" th:field="*{enterpriseSum}" id="enterpriseSum_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class="col-sm-2"> 不含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="noTaxRmb" id="noTaxRmb_add" type="number" readonly/>-->
<!-- <label class="col-sm-2"> 不含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allNoTaxRmb" id="allNoTaxRmb_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class="col-sm-2"> 含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="taxRmb" id="taxRmb_add" type="number" readonly/>-->
<!-- <label class="col-sm-2"> 含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allTaxRmb" id="allTaxRmb_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12">-->
<!-- <label class="col-sm-2">不含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="noTaxDollar" id="noTaxDollar_add" type="number" readonly/>-->
<!-- <label class="col-sm-2">不含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allNoTaxDollar" id="allNoTaxDollar_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class="col-sm-2">含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="taxDollar" id="taxDollar_add" type="number" readonly/>-->
<!-- <label class="col-sm-2">含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allTaxDollar" id="allTaxDollar_add" type="number" readonly/>-->
<!-- </div>-->
<!-- </div>-->
</form>
@ -194,35 +194,35 @@
field: 'materialNum'
},
{
title: '不含税单价',
title: '不含税单价(RMB)',
field: 'noTaxRmb',
},
{
title: '含税单价',
title: '含税单价(RMB)',
field: 'taxRmb',
},
{
title: '不含税总价',
title: '不含税总价(RMB)',
field: 'allNoTaxRmb',
},
{
title: '含税总价',
title: '含税总价(RMB)',
field: 'allTaxRmb',
},
{
title: '含税单价',
title: '含税单价(美元)',
field: 'taxDollar',
},
{
title: '不含税单价',
title: '不含税单价(美元)',
field: 'noTaxDollar',
},
{
title: '含税总价',
title: '含税总价(美元)',
field: 'allTaxDollar',
},
{
title: '不含税总价',
title: '不含税总价(美元)',
field: 'allNoTaxDollar',
},
{
@ -232,7 +232,7 @@
}],
onEditableSave:function(field, row, oldValue, $el){
// 确保getTotalAmount函数存在且正确引用
getTotalAmount();
//getTotalAmount();
},
};
@ -252,7 +252,7 @@
field: 'materialNo',
values: materialNo
})
getTotalAmount();
//getTotalAmount();
}
@ -351,51 +351,51 @@
//form计算模块
function getTotalAmount(){
let getData = $('#bootstrap-table').bootstrapTable('getData');
var materialSum = 0;
var enterpriseSum = 0;
var noTaxRmb = 0;
var taxRmb = 0;
var allNoTaxRmb = 0;
var allTaxRmb = 0;
var noTaxDollar = 0;
var taxDollar = 0;
var allNoTaxDollar = 0;
var allTaxDollar = 0;
materialSum = getData.length;
enterpriseSum = getData.reduce((sum, item) => sum + (parseInt(item.materialNum) || 0), 0);
for(var i=0;i<getData.length;i++){
noTaxRmb += parseFloat(getData[i].noTaxRmb) || 0;
taxRmb += parseFloat(getData[i].taxRmb) || 0;
allNoTaxRmb += parseFloat(getData[i].allNoTaxRmb) || 0;
allTaxRmb += parseFloat(getData[i].allTaxRmb) || 0;
noTaxDollar += parseFloat(getData[i].noTaxDollar) || 0;
taxDollar += parseFloat(getData[i].taxDollar) || 0;
allNoTaxDollar += parseFloat(getData[i].allNoTaxDollar) || 0;
allTaxDollar += parseFloat(getData[i].allTaxDollar) || 0;
}
noTaxRmb = noTaxRmb.toFixed(2);
taxRmb = taxRmb.toFixed(2);
allNoTaxRmb = allNoTaxRmb.toFixed(2);
allTaxRmb = allTaxRmb.toFixed(2);
noTaxDollar = noTaxDollar.toFixed(2);
taxDollar = taxDollar.toFixed(2);
allNoTaxDollar = allNoTaxDollar.toFixed(2);
allTaxDollar = allTaxDollar.toFixed(2);
$("input[name='materialSum']").val(materialSum);
$("input[name='enterpriseSum']").val(enterpriseSum);
$("input[name='noTaxRmb']").val(noTaxRmb);
$("input[name='taxRmb']").val(taxRmb);
$("input[name='allNoTaxRmb']").val(allNoTaxRmb);
$("input[name='allTaxRmb']").val(allTaxRmb);
$("input[name='noTaxDollar']").val(noTaxDollar);
$("input[name='taxDollar']").val(taxDollar);
$("input[name='allNoTaxDollar']").val(allNoTaxDollar);
$("input[name='allTaxDollar']").val(allTaxDollar);
}
// function getTotalAmount(){
// let getData = $('#bootstrap-table').bootstrapTable('getData');
// var materialSum = 0;
// var enterpriseSum = 0;
// var noTaxRmb = 0;
// var taxRmb = 0;
// var allNoTaxRmb = 0;
// var allTaxRmb = 0;
// var noTaxDollar = 0;
// var taxDollar = 0;
// var allNoTaxDollar = 0;
// var allTaxDollar = 0;
// materialSum = getData.length;
//
// enterpriseSum = getData.reduce((sum, item) => sum + (parseInt(item.materialNum) || 0), 0);
// for(var i=0;i<getData.length;i++){
// noTaxRmb += parseFloat(getData[i].noTaxRmb) || 0;
// taxRmb += parseFloat(getData[i].taxRmb) || 0;
// allNoTaxRmb += parseFloat(getData[i].allNoTaxRmb) || 0;
// allTaxRmb += parseFloat(getData[i].allTaxRmb) || 0;
// noTaxDollar += parseFloat(getData[i].noTaxDollar) || 0;
// taxDollar += parseFloat(getData[i].taxDollar) || 0;
// allNoTaxDollar += parseFloat(getData[i].allNoTaxDollar) || 0;
// allTaxDollar += parseFloat(getData[i].allTaxDollar) || 0;
// }
// noTaxRmb = noTaxRmb.toFixed(2);
// taxRmb = taxRmb.toFixed(2);
// allNoTaxRmb = allNoTaxRmb.toFixed(2);
// allTaxRmb = allTaxRmb.toFixed(2);
// noTaxDollar = noTaxDollar.toFixed(2);
// taxDollar = taxDollar.toFixed(2);
// allNoTaxDollar = allNoTaxDollar.toFixed(2);
// allTaxDollar = allTaxDollar.toFixed(2);
// $("input[name='materialSum']").val(materialSum);
// $("input[name='enterpriseSum']").val(enterpriseSum);
// $("input[name='noTaxRmb']").val(noTaxRmb);
// $("input[name='taxRmb']").val(taxRmb);
// $("input[name='allNoTaxRmb']").val(allNoTaxRmb);
// $("input[name='allTaxRmb']").val(allTaxRmb);
// $("input[name='noTaxDollar']").val(noTaxDollar);
// $("input[name='taxDollar']").val(taxDollar);
// $("input[name='allNoTaxDollar']").val(allNoTaxDollar);
// $("input[name='allTaxDollar']").val(allTaxDollar);
//
// }

183
ruoyi-admin/src/main/resources/templates/sales/estimate/ceoAdd.html

@ -61,29 +61,29 @@
</div>
</div>
<div class="container">
<h4 class="form-header h4">计算</h4>
<div class="col-xs-12 form-row">
<label class=" col-sm-2">物料合计:</label><input class="col-sm-4" th:field="*{materialSum}" name="materialSum" id="materialSum_add" type="number" readonly/>
<label class=" col-sm-2">数量合计:</label><input class="col-sm-4" th:field="*{enterpriseSum}" name="enterpriseSum" id="enterpriseSum_add" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2"> 不含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="noTaxRmb" id="noTaxRmb_add" type="number" readonly/>
<label class="col-sm-2"> 不含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allNoTaxRmb" id="allNoTaxRmb_add" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2"> 含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="taxRmb" id="taxRmb_add" type="number" readonly/>
<label class="col-sm-2"> 含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allTaxRmb" id="allTaxRmb_add" type="number" readonly/>
</div>
<div class="col-xs-12">
<label class="col-sm-2">不含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="noTaxDollar" id="noTaxDollar_add" type="number" readonly/>
<label class="col-sm-2">不含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allNoTaxDollar" id="allNoTaxDollar_add" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2">含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="taxDollar" id="taxDollar_add" type="number" readonly/>
<label class="col-sm-2">含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allTaxDollar" id="allTaxDollar_add" type="number" readonly/>
</div>
</div>
<!-- <div class="container">-->
<!-- <h4 class="form-header h4">计算</h4>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class=" col-sm-2">物料合计:</label><input class="col-sm-4" th:field="*{materialSum}" name="materialSum" id="materialSum_add" type="number" readonly/>-->
<!-- <label class=" col-sm-2">数量合计:</label><input class="col-sm-4" th:field="*{enterpriseSum}" name="enterpriseSum" id="enterpriseSum_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class="col-sm-2"> 不含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="noTaxRmb" id="noTaxRmb_add" type="number" readonly/>-->
<!-- <label class="col-sm-2"> 不含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allNoTaxRmb" id="allNoTaxRmb_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class="col-sm-2"> 含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="taxRmb" id="taxRmb_add" type="number" readonly/>-->
<!-- <label class="col-sm-2"> 含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allTaxRmb" id="allTaxRmb_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12">-->
<!-- <label class="col-sm-2">不含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="noTaxDollar" id="noTaxDollar_add" type="number" readonly/>-->
<!-- <label class="col-sm-2">不含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allNoTaxDollar" id="allNoTaxDollar_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class="col-sm-2">含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="taxDollar" id="taxDollar_add" type="number" readonly/>-->
<!-- <label class="col-sm-2">含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allTaxDollar" id="allTaxDollar_add" type="number" readonly/>-->
<!-- </div>-->
<!-- </div>-->
</form>
@ -349,42 +349,37 @@
field: 'materialNum',
},
{
title: '不含税单价',
title: '不含税单价(RMB)',
field: 'noTaxRmb',
},
{
title: '含税单价',
title: '含税单价(RMB)',
field: 'taxRmb',
},
{
title: '不含税总价',
title: '不含税总价(RMB)',
field: 'allNoTaxRmb',
},
{
title: '含税总价',
title: '含税总价(RMB)',
field: 'allTaxRmb',
},
{
title: '含税单价',
title: '含税单价(美元)',
field: 'taxDollar',
},
{
title: '不含税单价',
title: '不含税单价(美元)',
field: 'noTaxDollar',
},
{
title: '含税总价',
title: '含税总价(美元)',
field: 'allTaxDollar',
},
{
title: '不含税总价',
title: '不含税总价(美元)',
field: 'allNoTaxDollar',
},
{
title: '入库部门',
field: 'warehouseDept',
visible:false
},
{
title: '操作',
align: 'center',
@ -396,7 +391,7 @@
}],
onEditableSave:function(field, row, oldValue, $el){
// 确保getTotalAmount函数存在且正确引用
getTotalAmount();
// getTotalAmount();
},
};
@ -496,13 +491,31 @@
// 使用第一条数据
var firstRow = data[0].rows[0];
// 初始化累积变量
let noTaxPurchaseRmb = 0;
let taxPurchaseRmb = 0;
// 累加无税购买金额
data[0].rows.forEach(function (row) {
noTaxPurchaseRmb += row.noTaxPurchaseRmb;
});
// 累加含税购买金额
data[0].rows.forEach(function (row) {
taxPurchaseRmb += row.taxPurchaseRmb;
});
// 将结果赋值给 costs 对象
costs.noTaxPurchaseRmb = noTaxPurchaseRmb;
costs.taxPurchaseRmb = taxPurchaseRmb;
// 从 `firstRow` 中获取成本信息
const {
noTaxDevelopCosts = '',
noTaxShippingCosts = '',
noTaxServiceCosts = '',
noTaxPurchaseRmb = '',
taxPurchaseRmb = ''
// noTaxPurchaseRmb = '',
// taxPurchaseRmb = ''
} = firstRow || {};
// 从 `salesEstimateDetailVo` 中获取其他成本信息
@ -772,56 +785,56 @@
field: 'materialNo',
values: materialNo
})
getTotalAmount();
// getTotalAmount();
}
//form计算模块
function getTotalAmount(){
let getData = $('#bootstrap-table').bootstrapTable('getData');
var materialSum = 0;
var enterpriseSum = 0;
var noTaxRmb = 0;
var taxRmb = 0;
var allNoTaxRmb = 0;
var allTaxRmb = 0;
var noTaxDollar = 0;
var taxDollar = 0;
var allNoTaxDollar = 0;
var allTaxDollar = 0;
materialSum = getData.length;
enterpriseSum = getData.reduce((sum, item) => sum + (parseInt(item.materialNum) || 0), 0);
for(var i=0;i<getData.length;i++){
noTaxRmb += parseFloat(getData[i].noTaxRmb) || 0;
taxRmb += parseFloat(getData[i].taxRmb) || 0;
allNoTaxRmb += parseFloat(getData[i].allNoTaxRmb) || 0;
allTaxRmb += parseFloat(getData[i].allTaxRmb) || 0;
noTaxDollar += parseFloat(getData[i].noTaxDollar) || 0;
taxDollar += parseFloat(getData[i].taxDollar) || 0;
allNoTaxDollar += parseFloat(getData[i].allNoTaxDollar) || 0;
allTaxDollar += parseFloat(getData[i].allTaxDollar) || 0;
}
noTaxRmb = noTaxRmb.toFixed(2);
taxRmb = taxRmb.toFixed(2);
allNoTaxRmb = allNoTaxRmb.toFixed(2);
allTaxRmb = allTaxRmb.toFixed(2);
noTaxDollar = noTaxDollar.toFixed(2);
taxDollar = taxDollar.toFixed(2);
allNoTaxDollar = allNoTaxDollar.toFixed(2);
allTaxDollar = allTaxDollar.toFixed(2);
$("input[name='materialSum']").val(materialSum);
$("input[name='enterpriseSum']").val(enterpriseSum);
$("input[name='noTaxRmb']").val(noTaxRmb);
$("input[name='taxRmb']").val(taxRmb);
$("input[name='allNoTaxRmb']").val(allNoTaxRmb);
$("input[name='allTaxRmb']").val(allTaxRmb);
$("input[name='noTaxDollar']").val(noTaxDollar);
$("input[name='taxDollar']").val(taxDollar);
$("input[name='allNoTaxDollar']").val(allNoTaxDollar);
$("input[name='allTaxDollar']").val(allTaxDollar);
}
// function getTotalAmount(){
// let getData = $('#bootstrap-table').bootstrapTable('getData');
// var materialSum = 0;
// var enterpriseSum = 0;
// var noTaxRmb = 0;
// var taxRmb = 0;
// var allNoTaxRmb = 0;
// var allTaxRmb = 0;
// var noTaxDollar = 0;
// var taxDollar = 0;
// var allNoTaxDollar = 0;
// var allTaxDollar = 0;
// materialSum = getData.length;
//
// enterpriseSum = getData.reduce((sum, item) => sum + (parseInt(item.materialNum) || 0), 0);
// for(var i=0;i<getData.length;i++){
// noTaxRmb += parseFloat(getData[i].noTaxRmb) || 0;
// taxRmb += parseFloat(getData[i].taxRmb) || 0;
// allNoTaxRmb += parseFloat(getData[i].allNoTaxRmb) || 0;
// allTaxRmb += parseFloat(getData[i].allTaxRmb) || 0;
// noTaxDollar += parseFloat(getData[i].noTaxDollar) || 0;
// taxDollar += parseFloat(getData[i].taxDollar) || 0;
// allNoTaxDollar += parseFloat(getData[i].allNoTaxDollar) || 0;
// allTaxDollar += parseFloat(getData[i].allTaxDollar) || 0;
// }
// noTaxRmb = noTaxRmb.toFixed(2);
// taxRmb = taxRmb.toFixed(2);
// allNoTaxRmb = allNoTaxRmb.toFixed(2);
// allTaxRmb = allTaxRmb.toFixed(2);
// noTaxDollar = noTaxDollar.toFixed(2);
// taxDollar = taxDollar.toFixed(2);
// allNoTaxDollar = allNoTaxDollar.toFixed(2);
// allTaxDollar = allTaxDollar.toFixed(2);
// $("input[name='materialSum']").val(materialSum);
// $("input[name='enterpriseSum']").val(enterpriseSum);
// $("input[name='noTaxRmb']").val(noTaxRmb);
// $("input[name='taxRmb']").val(taxRmb);
// $("input[name='allNoTaxRmb']").val(allNoTaxRmb);
// $("input[name='allTaxRmb']").val(allTaxRmb);
// $("input[name='noTaxDollar']").val(noTaxDollar);
// $("input[name='taxDollar']").val(taxDollar);
// $("input[name='allNoTaxDollar']").val(allNoTaxDollar);
// $("input[name='allTaxDollar']").val(allTaxDollar);
//
// }
function getAllSubTablesData() {

176
ruoyi-admin/src/main/resources/templates/sales/estimate/ceoAddDetail.html

@ -61,29 +61,29 @@
</div>
</div>
<div class="container">
<h4 class="form-header h4">计算</h4>
<div class="col-xs-12 form-row">
<label class=" col-sm-2">物料合计:</label><input class="col-sm-4" th:field="*{materialSum}" name="materialSum" id="materialSum_add" type="number" readonly/>
<label class=" col-sm-2">数量合计:</label><input class="col-sm-4" th:field="*{enterpriseSum}" name="enterpriseSum" id="enterpriseSum_add" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2"> 不含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" th:field="*{noTaxRmb}" name="noTaxRmb" id="noTaxRmb_add" type="number" readonly/>
<label class="col-sm-2"> 不含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" th:field="*{allNoTaxRmb}" name="allNoTaxRmb" id="allNoTaxRmb_add" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2"> 含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" th:field="*{taxRmb}" name="taxRmb" id="taxRmb_add" type="number" readonly/>
<label class="col-sm-2"> 含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" th:field="*{allTaxRmb}" name="allTaxRmb" id="allTaxRmb_add" type="number" readonly/>
</div>
<div class="col-xs-12">
<label class="col-sm-2">不含税单价(USD):</label><input placeholder="美元" class="col-sm-4" th:field="*{noTaxDollar}" name="noTaxDollar" id="noTaxDollar_add" type="number" readonly/>
<label class="col-sm-2">不含税总价(USD):</label><input placeholder="美元" class="col-sm-4" th:field="*{allNoTaxDollar}" name="allNoTaxDollar" id="allNoTaxDollar_add" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2">含税单价(USD):</label><input placeholder="美元" class="col-sm-4" th:field="*{taxDollar}" name="taxDollar" id="taxDollar_add" type="number" readonly/>
<label class="col-sm-2">含税总价(USD):</label><input placeholder="美元" class="col-sm-4" th:field="*{allTaxDollar}" name="allTaxDollar" id="allTaxDollar_add" type="number" readonly/>
</div>
</div>
<!-- <div class="container">-->
<!-- <h4 class="form-header h4">计算</h4>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class=" col-sm-2">物料合计:</label><input class="col-sm-4" th:field="*{materialSum}" name="materialSum" id="materialSum_add" type="number" readonly/>-->
<!-- <label class=" col-sm-2">数量合计:</label><input class="col-sm-4" th:field="*{enterpriseSum}" name="enterpriseSum" id="enterpriseSum_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class="col-sm-2"> 不含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" th:field="*{noTaxRmb}" name="noTaxRmb" id="noTaxRmb_add" type="number" readonly/>-->
<!-- <label class="col-sm-2"> 不含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" th:field="*{allNoTaxRmb}" name="allNoTaxRmb" id="allNoTaxRmb_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class="col-sm-2"> 含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" th:field="*{taxRmb}" name="taxRmb" id="taxRmb_add" type="number" readonly/>-->
<!-- <label class="col-sm-2"> 含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" th:field="*{allTaxRmb}" name="allTaxRmb" id="allTaxRmb_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12">-->
<!-- <label class="col-sm-2">不含税单价(USD):</label><input placeholder="美元" class="col-sm-4" th:field="*{noTaxDollar}" name="noTaxDollar" id="noTaxDollar_add" type="number" readonly/>-->
<!-- <label class="col-sm-2">不含税总价(USD):</label><input placeholder="美元" class="col-sm-4" th:field="*{allNoTaxDollar}" name="allNoTaxDollar" id="allNoTaxDollar_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class="col-sm-2">含税单价(USD):</label><input placeholder="美元" class="col-sm-4" th:field="*{taxDollar}" name="taxDollar" id="taxDollar_add" type="number" readonly/>-->
<!-- <label class="col-sm-2">含税总价(USD):</label><input placeholder="美元" class="col-sm-4" th:field="*{allTaxDollar}" name="allTaxDollar" id="allTaxDollar_add" type="number" readonly/>-->
<!-- </div>-->
<!-- </div>-->
</form>
@ -197,35 +197,35 @@
field: 'materialNum',
},
{
title: '不含税单价',
title: '不含税单价(RMB)',
field: 'noTaxRmb',
},
{
title: '含税单价',
title: '含税单价(RMB)',
field: 'taxRmb',
},
{
title: '不含税总价',
title: '不含税总价(RMB)',
field: 'allNoTaxRmb',
},
{
title: '含税总价',
title: '含税总价(RMB)',
field: 'allTaxRmb',
},
{
title: '含税单价',
title: '含税单价(美元)',
field: 'taxDollar',
},
{
title: '不含税单价',
title: '不含税单价(美元)',
field: 'noTaxDollar',
},
{
title: '含税总价',
title: '含税总价(美元)',
field: 'allTaxDollar',
},
{
title: '不含税总价',
title: '不含税总价(美元)',
field: 'allNoTaxDollar',
},
{
@ -235,7 +235,7 @@
}],
onEditableSave:function(field, row, oldValue, $el){
// 确保getTotalAmount函数存在且正确引用
getTotalAmount();
// getTotalAmount();
},
};
@ -328,13 +328,31 @@
// 使用第一条数据
var firstRow = data[0].rows[0];
// 初始化累积变量
let noTaxPurchaseRmb = 0;
let taxPurchaseRmb = 0;
// 累加无税购买金额
data[0].rows.forEach(function (row) {
noTaxPurchaseRmb += row.noTaxPurchaseRmb;
});
// 累加含税购买金额
data[0].rows.forEach(function (row) {
taxPurchaseRmb += row.taxPurchaseRmb;
});
// 将结果赋值给 costs 对象
costs.noTaxPurchaseRmb = noTaxPurchaseRmb;
costs.taxPurchaseRmb = taxPurchaseRmb;
// 从 `firstRow` 中获取成本信息
const {
noTaxDevelopCosts = '',
noTaxShippingCosts = '',
noTaxServiceCosts = '',
noTaxPurchaseRmb = '',
taxPurchaseRmb = ''
// noTaxPurchaseRmb = '',
// taxPurchaseRmb = ''
} = firstRow || {};
// 从 `salesEstimateDetailVo` 中获取其他成本信息
@ -595,51 +613,51 @@
//form计算模块
function getTotalAmount(){
let getData = $('#bootstrap-table').bootstrapTable('getData');
var materialSum = 0;
var enterpriseSum = 0;
var noTaxRmb = 0;
var taxRmb = 0;
var allNoTaxRmb = 0;
var allTaxRmb = 0;
var noTaxDollar = 0;
var taxDollar = 0;
var allNoTaxDollar = 0;
var allTaxDollar = 0;
materialSum = getData.length;
enterpriseSum = getData.reduce((sum, item) => sum + (parseInt(item.materialNum) || 0), 0);
for(var i=0;i<getData.length;i++){
noTaxRmb += parseFloat(getData[i].noTaxRmb) || 0;
taxRmb += parseFloat(getData[i].taxRmb) || 0;
allNoTaxRmb += parseFloat(getData[i].allNoTaxRmb) || 0;
allTaxRmb += parseFloat(getData[i].allTaxRmb) || 0;
noTaxDollar += parseFloat(getData[i].noTaxDollar) || 0;
taxDollar += parseFloat(getData[i].taxDollar) || 0;
allNoTaxDollar += parseFloat(getData[i].allNoTaxDollar) || 0;
allTaxDollar += parseFloat(getData[i].allTaxDollar) || 0;
}
noTaxRmb = noTaxRmb.toFixed(2);
taxRmb = taxRmb.toFixed(2);
allNoTaxRmb = allNoTaxRmb.toFixed(2);
allTaxRmb = allTaxRmb.toFixed(2);
noTaxDollar = noTaxDollar.toFixed(2);
taxDollar = taxDollar.toFixed(2);
allNoTaxDollar = allNoTaxDollar.toFixed(2);
allTaxDollar = allTaxDollar.toFixed(2);
$("input[name='materialSum']").val(materialSum);
$("input[name='enterpriseSum']").val(enterpriseSum);
$("input[name='noTaxRmb']").val(noTaxRmb);
$("input[name='taxRmb']").val(taxRmb);
$("input[name='allNoTaxRmb']").val(allNoTaxRmb);
$("input[name='allTaxRmb']").val(allTaxRmb);
$("input[name='noTaxDollar']").val(noTaxDollar);
$("input[name='taxDollar']").val(taxDollar);
$("input[name='allNoTaxDollar']").val(allNoTaxDollar);
$("input[name='allTaxDollar']").val(allTaxDollar);
}
// function getTotalAmount(){
// let getData = $('#bootstrap-table').bootstrapTable('getData');
// var materialSum = 0;
// var enterpriseSum = 0;
// var noTaxRmb = 0;
// var taxRmb = 0;
// var allNoTaxRmb = 0;
// var allTaxRmb = 0;
// var noTaxDollar = 0;
// var taxDollar = 0;
// var allNoTaxDollar = 0;
// var allTaxDollar = 0;
// materialSum = getData.length;
//
// enterpriseSum = getData.reduce((sum, item) => sum + (parseInt(item.materialNum) || 0), 0);
// for(var i=0;i<getData.length;i++){
// noTaxRmb += parseFloat(getData[i].noTaxRmb) || 0;
// taxRmb += parseFloat(getData[i].taxRmb) || 0;
// allNoTaxRmb += parseFloat(getData[i].allNoTaxRmb) || 0;
// allTaxRmb += parseFloat(getData[i].allTaxRmb) || 0;
// noTaxDollar += parseFloat(getData[i].noTaxDollar) || 0;
// taxDollar += parseFloat(getData[i].taxDollar) || 0;
// allNoTaxDollar += parseFloat(getData[i].allNoTaxDollar) || 0;
// allTaxDollar += parseFloat(getData[i].allTaxDollar) || 0;
// }
// noTaxRmb = noTaxRmb.toFixed(2);
// taxRmb = taxRmb.toFixed(2);
// allNoTaxRmb = allNoTaxRmb.toFixed(2);
// allTaxRmb = allTaxRmb.toFixed(2);
// noTaxDollar = noTaxDollar.toFixed(2);
// taxDollar = taxDollar.toFixed(2);
// allNoTaxDollar = allNoTaxDollar.toFixed(2);
// allTaxDollar = allTaxDollar.toFixed(2);
// $("input[name='materialSum']").val(materialSum);
// $("input[name='enterpriseSum']").val(enterpriseSum);
// $("input[name='noTaxRmb']").val(noTaxRmb);
// $("input[name='taxRmb']").val(taxRmb);
// $("input[name='allNoTaxRmb']").val(allNoTaxRmb);
// $("input[name='allTaxRmb']").val(allTaxRmb);
// $("input[name='noTaxDollar']").val(noTaxDollar);
// $("input[name='taxDollar']").val(taxDollar);
// $("input[name='allNoTaxDollar']").val(allNoTaxDollar);
// $("input[name='allTaxDollar']").val(allTaxDollar);
//
// }
</script>

156
ruoyi-admin/src/main/resources/templates/sales/estimate/engineeringAdd.html

@ -61,29 +61,29 @@
</div>
</div>
<div class="container">
<h4 class="form-header h4">计算</h4>
<div class="col-xs-12 form-row">
<label class=" col-sm-2">物料合计:</label><input class="col-sm-4" name="materialSum" th:field="*{materialSum}" id="materialSum_add" type="number" readonly/>
<label class=" col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" th:field="*{enterpriseSum}" id="enterpriseSum_add" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2"> 不含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="noTaxRmb" id="noTaxRmb_add" type="number" readonly/>
<label class="col-sm-2"> 不含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allNoTaxRmb" id="allNoTaxRmb_add" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2"> 含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="taxRmb" id="taxRmb_add" type="number" readonly/>
<label class="col-sm-2"> 含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allTaxRmb" id="allTaxRmb_add" type="number" readonly/>
</div>
<div class="col-xs-12">
<label class="col-sm-2">不含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="noTaxDollar" id="noTaxDollar_add" type="number" readonly/>
<label class="col-sm-2">不含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allNoTaxDollar" id="allNoTaxDollar_add" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2">含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="taxDollar" id="taxDollar_add" type="number" readonly/>
<label class="col-sm-2">含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allTaxDollar" id="allTaxDollar_add" type="number" readonly/>
</div>
</div>
<!-- <div class="container">-->
<!-- <h4 class="form-header h4">计算</h4>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class=" col-sm-2">物料合计:</label><input class="col-sm-4" name="materialSum" th:field="*{materialSum}" id="materialSum_add" type="number" readonly/>-->
<!-- <label class=" col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" th:field="*{enterpriseSum}" id="enterpriseSum_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class="col-sm-2"> 不含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="noTaxRmb" id="noTaxRmb_add" type="number" readonly/>-->
<!-- <label class="col-sm-2"> 不含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allNoTaxRmb" id="allNoTaxRmb_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class="col-sm-2"> 含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="taxRmb" id="taxRmb_add" type="number" readonly/>-->
<!-- <label class="col-sm-2"> 含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allTaxRmb" id="allTaxRmb_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12">-->
<!-- <label class="col-sm-2">不含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="noTaxDollar" id="noTaxDollar_add" type="number" readonly/>-->
<!-- <label class="col-sm-2">不含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allNoTaxDollar" id="allNoTaxDollar_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class="col-sm-2">含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="taxDollar" id="taxDollar_add" type="number" readonly/>-->
<!-- <label class="col-sm-2">含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allTaxDollar" id="allTaxDollar_add" type="number" readonly/>-->
<!-- </div>-->
<!-- </div>-->
</form>
@ -279,35 +279,35 @@
field: 'materialNum',
},
{
title: '不含税单价',
title: '不含税单价(RMB)',
field: 'noTaxRmb',
},
{
title: '含税单价',
title: '含税单价(RMB)',
field: 'taxRmb',
},
{
title: '不含税总价',
title: '不含税总价(RMB)',
field: 'allNoTaxRmb',
},
{
title: '含税总价',
title: '含税总价(RMB)',
field: 'allTaxRmb',
},
{
title: '含税单价',
title: '含税单价(美元)',
field: 'taxDollar',
},
{
title: '不含税单价',
title: '不含税单价(美元)',
field: 'noTaxDollar',
},
{
title: '含税总价',
title: '含税总价(美元)',
field: 'allTaxDollar',
},
{
title: '不含税总价',
title: '不含税总价(美元)',
field: 'allNoTaxDollar',
},
{
@ -326,7 +326,7 @@
}],
onEditableSave:function(field, row, oldValue, $el){
// 确保getTotalAmount函数存在且正确引用
getTotalAmount();
// getTotalAmount();
},
};
@ -440,7 +440,7 @@ function queryParams(params) {
field: 'materialNo',
values: materialNo
})
getTotalAmount();
// getTotalAmount();
}
@ -476,51 +476,51 @@ function queryParams(params) {
//form计算模块
function getTotalAmount(){
let getData = $('#bootstrap-table').bootstrapTable('getData');
var materialSum = 0;
var enterpriseSum = 0;
var noTaxRmb = 0;
var taxRmb = 0;
var allNoTaxRmb = 0;
var allTaxRmb = 0;
var noTaxDollar = 0;
var taxDollar = 0;
var allNoTaxDollar = 0;
var allTaxDollar = 0;
materialSum = getData.length;
enterpriseSum = getData.reduce((sum, item) => sum + (parseInt(item.materialNum) || 0), 0);
for(var i=0;i<getData.length;i++){
noTaxRmb += parseFloat(getData[i].noTaxRmb) || 0;
taxRmb += parseFloat(getData[i].taxRmb) || 0;
allNoTaxRmb += parseFloat(getData[i].allNoTaxRmb) || 0;
allTaxRmb += parseFloat(getData[i].allTaxRmb) || 0;
noTaxDollar += parseFloat(getData[i].noTaxDollar) || 0;
taxDollar += parseFloat(getData[i].taxDollar) || 0;
allNoTaxDollar += parseFloat(getData[i].allNoTaxDollar) || 0;
allTaxDollar += parseFloat(getData[i].allTaxDollar) || 0;
}
noTaxRmb = noTaxRmb.toFixed(2);
taxRmb = taxRmb.toFixed(2);
allNoTaxRmb = allNoTaxRmb.toFixed(2);
allTaxRmb = allTaxRmb.toFixed(2);
noTaxDollar = noTaxDollar.toFixed(2);
taxDollar = taxDollar.toFixed(2);
allNoTaxDollar = allNoTaxDollar.toFixed(2);
allTaxDollar = allTaxDollar.toFixed(2);
$("input[name='materialSum']").val(materialSum);
$("input[name='enterpriseSum']").val(enterpriseSum);
$("input[name='noTaxRmb']").val(noTaxRmb);
$("input[name='taxRmb']").val(taxRmb);
$("input[name='allNoTaxRmb']").val(allNoTaxRmb);
$("input[name='allTaxRmb']").val(allTaxRmb);
$("input[name='noTaxDollar']").val(noTaxDollar);
$("input[name='taxDollar']").val(taxDollar);
$("input[name='allNoTaxDollar']").val(allNoTaxDollar);
$("input[name='allTaxDollar']").val(allTaxDollar);
}
// function getTotalAmount(){
// let getData = $('#bootstrap-table').bootstrapTable('getData');
// var materialSum = 0;
// var enterpriseSum = 0;
// var noTaxRmb = 0;
// var taxRmb = 0;
// var allNoTaxRmb = 0;
// var allTaxRmb = 0;
// var noTaxDollar = 0;
// var taxDollar = 0;
// var allNoTaxDollar = 0;
// var allTaxDollar = 0;
// materialSum = getData.length;
//
// enterpriseSum = getData.reduce((sum, item) => sum + (parseInt(item.materialNum) || 0), 0);
// for(var i=0;i<getData.length;i++){
// noTaxRmb += parseFloat(getData[i].noTaxRmb) || 0;
// taxRmb += parseFloat(getData[i].taxRmb) || 0;
// allNoTaxRmb += parseFloat(getData[i].allNoTaxRmb) || 0;
// allTaxRmb += parseFloat(getData[i].allTaxRmb) || 0;
// noTaxDollar += parseFloat(getData[i].noTaxDollar) || 0;
// taxDollar += parseFloat(getData[i].taxDollar) || 0;
// allNoTaxDollar += parseFloat(getData[i].allNoTaxDollar) || 0;
// allTaxDollar += parseFloat(getData[i].allTaxDollar) || 0;
// }
// noTaxRmb = noTaxRmb.toFixed(2);
// taxRmb = taxRmb.toFixed(2);
// allNoTaxRmb = allNoTaxRmb.toFixed(2);
// allTaxRmb = allTaxRmb.toFixed(2);
// noTaxDollar = noTaxDollar.toFixed(2);
// taxDollar = taxDollar.toFixed(2);
// allNoTaxDollar = allNoTaxDollar.toFixed(2);
// allTaxDollar = allTaxDollar.toFixed(2);
// $("input[name='materialSum']").val(materialSum);
// $("input[name='enterpriseSum']").val(enterpriseSum);
// $("input[name='noTaxRmb']").val(noTaxRmb);
// $("input[name='taxRmb']").val(taxRmb);
// $("input[name='allNoTaxRmb']").val(allNoTaxRmb);
// $("input[name='allTaxRmb']").val(allTaxRmb);
// $("input[name='noTaxDollar']").val(noTaxDollar);
// $("input[name='taxDollar']").val(taxDollar);
// $("input[name='allNoTaxDollar']").val(allNoTaxDollar);
// $("input[name='allTaxDollar']").val(allTaxDollar);
//
// }
function addChildMaterial(estimateDetailId){

154
ruoyi-admin/src/main/resources/templates/sales/estimate/engineeringAddDetail.html

@ -61,29 +61,29 @@
</div>
</div>
<div class="container">
<h4 class="form-header h4">计算</h4>
<div class="col-xs-12 form-row">
<label class=" col-sm-2">物料合计:</label><input class="col-sm-4" name="materialSum" th:field="*{materialSum}" id="materialSum_add" type="number" readonly/>
<label class=" col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" th:field="*{enterpriseSum}" id="enterpriseSum_add" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2"> 不含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="noTaxRmb" id="noTaxRmb_add" type="number" readonly/>
<label class="col-sm-2"> 不含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allNoTaxRmb" id="allNoTaxRmb_add" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2"> 含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="taxRmb" id="taxRmb_add" type="number" readonly/>
<label class="col-sm-2"> 含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allTaxRmb" id="allTaxRmb_add" type="number" readonly/>
</div>
<div class="col-xs-12">
<label class="col-sm-2">不含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="noTaxDollar" id="noTaxDollar_add" type="number" readonly/>
<label class="col-sm-2">不含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allNoTaxDollar" id="allNoTaxDollar_add" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2">含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="taxDollar" id="taxDollar_add" type="number" readonly/>
<label class="col-sm-2">含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allTaxDollar" id="allTaxDollar_add" type="number" readonly/>
</div>
</div>
<!-- <div class="container">-->
<!-- <h4 class="form-header h4">计算</h4>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class=" col-sm-2">物料合计:</label><input class="col-sm-4" name="materialSum" th:field="*{materialSum}" id="materialSum_add" type="number" readonly/>-->
<!-- <label class=" col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" th:field="*{enterpriseSum}" id="enterpriseSum_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class="col-sm-2"> 不含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="noTaxRmb" id="noTaxRmb_add" type="number" readonly/>-->
<!-- <label class="col-sm-2"> 不含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allNoTaxRmb" id="allNoTaxRmb_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class="col-sm-2"> 含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="taxRmb" id="taxRmb_add" type="number" readonly/>-->
<!-- <label class="col-sm-2"> 含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allTaxRmb" id="allTaxRmb_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12">-->
<!-- <label class="col-sm-2">不含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="noTaxDollar" id="noTaxDollar_add" type="number" readonly/>-->
<!-- <label class="col-sm-2">不含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allNoTaxDollar" id="allNoTaxDollar_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class="col-sm-2">含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="taxDollar" id="taxDollar_add" type="number" readonly/>-->
<!-- <label class="col-sm-2">含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allTaxDollar" id="allTaxDollar_add" type="number" readonly/>-->
<!-- </div>-->
<!-- </div>-->
</form>
@ -197,35 +197,35 @@
field: 'materialNum',
},
{
title: '不含税单价',
title: '不含税单价(RMB)',
field: 'noTaxRmb',
},
{
title: '含税单价',
title: '含税单价(RMB)',
field: 'taxRmb',
},
{
title: '不含税总价',
title: '不含税总价(RMB)',
field: 'allNoTaxRmb',
},
{
title: '含税总价',
title: '含税总价(RMB)',
field: 'allTaxRmb',
},
{
title: '含税单价',
title: '含税单价(美元)',
field: 'taxDollar',
},
{
title: '不含税单价',
title: '不含税单价(美元)',
field: 'noTaxDollar',
},
{
title: '含税总价',
title: '含税总价(美元)',
field: 'allTaxDollar',
},
{
title: '不含税总价',
title: '不含税总价(美元)',
field: 'allNoTaxDollar',
},
{
@ -235,7 +235,7 @@
}],
onEditableSave:function(field, row, oldValue, $el){
// 确保getTotalAmount函数存在且正确引用
getTotalAmount();
// getTotalAmount();
},
};
@ -366,51 +366,51 @@
//form计算模块
function getTotalAmount(){
let getData = $('#bootstrap-table').bootstrapTable('getData');
var materialSum = 0;
var enterpriseSum = 0;
var noTaxRmb = 0;
var taxRmb = 0;
var allNoTaxRmb = 0;
var allTaxRmb = 0;
var noTaxDollar = 0;
var taxDollar = 0;
var allNoTaxDollar = 0;
var allTaxDollar = 0;
materialSum = getData.length;
enterpriseSum = getData.reduce((sum, item) => sum + (parseInt(item.materialNum) || 0), 0);
for(var i=0;i<getData.length;i++){
noTaxRmb += parseFloat(getData[i].noTaxRmb) || 0;
taxRmb += parseFloat(getData[i].taxRmb) || 0;
allNoTaxRmb += parseFloat(getData[i].allNoTaxRmb) || 0;
allTaxRmb += parseFloat(getData[i].allTaxRmb) || 0;
noTaxDollar += parseFloat(getData[i].noTaxDollar) || 0;
taxDollar += parseFloat(getData[i].taxDollar) || 0;
allNoTaxDollar += parseFloat(getData[i].allNoTaxDollar) || 0;
allTaxDollar += parseFloat(getData[i].allTaxDollar) || 0;
}
noTaxRmb = noTaxRmb.toFixed(2);
taxRmb = taxRmb.toFixed(2);
allNoTaxRmb = allNoTaxRmb.toFixed(2);
allTaxRmb = allTaxRmb.toFixed(2);
noTaxDollar = noTaxDollar.toFixed(2);
taxDollar = taxDollar.toFixed(2);
allNoTaxDollar = allNoTaxDollar.toFixed(2);
allTaxDollar = allTaxDollar.toFixed(2);
$("input[name='materialSum']").val(materialSum);
$("input[name='enterpriseSum']").val(enterpriseSum);
$("input[name='noTaxRmb']").val(noTaxRmb);
$("input[name='taxRmb']").val(taxRmb);
$("input[name='allNoTaxRmb']").val(allNoTaxRmb);
$("input[name='allTaxRmb']").val(allTaxRmb);
$("input[name='noTaxDollar']").val(noTaxDollar);
$("input[name='taxDollar']").val(taxDollar);
$("input[name='allNoTaxDollar']").val(allNoTaxDollar);
$("input[name='allTaxDollar']").val(allTaxDollar);
}
// function getTotalAmount(){
// let getData = $('#bootstrap-table').bootstrapTable('getData');
// var materialSum = 0;
// var enterpriseSum = 0;
// var noTaxRmb = 0;
// var taxRmb = 0;
// var allNoTaxRmb = 0;
// var allTaxRmb = 0;
// var noTaxDollar = 0;
// var taxDollar = 0;
// var allNoTaxDollar = 0;
// var allTaxDollar = 0;
// materialSum = getData.length;
//
// enterpriseSum = getData.reduce((sum, item) => sum + (parseInt(item.materialNum) || 0), 0);
// for(var i=0;i<getData.length;i++){
// noTaxRmb += parseFloat(getData[i].noTaxRmb) || 0;
// taxRmb += parseFloat(getData[i].taxRmb) || 0;
// allNoTaxRmb += parseFloat(getData[i].allNoTaxRmb) || 0;
// allTaxRmb += parseFloat(getData[i].allTaxRmb) || 0;
// noTaxDollar += parseFloat(getData[i].noTaxDollar) || 0;
// taxDollar += parseFloat(getData[i].taxDollar) || 0;
// allNoTaxDollar += parseFloat(getData[i].allNoTaxDollar) || 0;
// allTaxDollar += parseFloat(getData[i].allTaxDollar) || 0;
// }
// noTaxRmb = noTaxRmb.toFixed(2);
// taxRmb = taxRmb.toFixed(2);
// allNoTaxRmb = allNoTaxRmb.toFixed(2);
// allTaxRmb = allTaxRmb.toFixed(2);
// noTaxDollar = noTaxDollar.toFixed(2);
// taxDollar = taxDollar.toFixed(2);
// allNoTaxDollar = allNoTaxDollar.toFixed(2);
// allTaxDollar = allTaxDollar.toFixed(2);
// $("input[name='materialSum']").val(materialSum);
// $("input[name='enterpriseSum']").val(enterpriseSum);
// $("input[name='noTaxRmb']").val(noTaxRmb);
// $("input[name='taxRmb']").val(taxRmb);
// $("input[name='allNoTaxRmb']").val(allNoTaxRmb);
// $("input[name='allTaxRmb']").val(allTaxRmb);
// $("input[name='noTaxDollar']").val(noTaxDollar);
// $("input[name='taxDollar']").val(taxDollar);
// $("input[name='allNoTaxDollar']").val(allNoTaxDollar);
// $("input[name='allTaxDollar']").val(allTaxDollar);
//
// }
</script>

156
ruoyi-admin/src/main/resources/templates/sales/estimate/purchaseAdd.html

@ -61,29 +61,29 @@
</div>
</div>
<div class="container">
<h4 class="form-header h4">计算</h4>
<div class="col-xs-12 form-row">
<label class=" col-sm-2">物料合计:</label><input class="col-sm-4" name="materialSum" th:field="*{materialSum}" id="materialSum_add" type="number" readonly/>
<label class=" col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" th:field="*{enterpriseSum}" id="enterpriseSum_add" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2"> 不含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="noTaxRmb" id="noTaxRmb_add" type="number" readonly/>
<label class="col-sm-2"> 不含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allNoTaxRmb" id="allNoTaxRmb_add" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2"> 含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="taxRmb" id="taxRmb_add" type="number" readonly/>
<label class="col-sm-2"> 含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allTaxRmb" id="allTaxRmb_add" type="number" readonly/>
</div>
<div class="col-xs-12">
<label class="col-sm-2">不含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="noTaxDollar" id="noTaxDollar_add" type="number" readonly/>
<label class="col-sm-2">不含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allNoTaxDollar" id="allNoTaxDollar_add" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2">含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="taxDollar" id="taxDollar_add" type="number" readonly/>
<label class="col-sm-2">含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allTaxDollar" id="allTaxDollar_add" type="number" readonly/>
</div>
</div>
<!-- <div class="container">-->
<!-- <h4 class="form-header h4">计算</h4>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class=" col-sm-2">物料合计:</label><input class="col-sm-4" name="materialSum" th:field="*{materialSum}" id="materialSum_add" type="number" readonly/>-->
<!-- <label class=" col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" th:field="*{enterpriseSum}" id="enterpriseSum_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class="col-sm-2"> 不含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="noTaxRmb" id="noTaxRmb_add" type="number" readonly/>-->
<!-- <label class="col-sm-2"> 不含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allNoTaxRmb" id="allNoTaxRmb_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class="col-sm-2"> 含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="taxRmb" id="taxRmb_add" type="number" readonly/>-->
<!-- <label class="col-sm-2"> 含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allTaxRmb" id="allTaxRmb_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12">-->
<!-- <label class="col-sm-2">不含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="noTaxDollar" id="noTaxDollar_add" type="number" readonly/>-->
<!-- <label class="col-sm-2">不含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allNoTaxDollar" id="allNoTaxDollar_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class="col-sm-2">含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="taxDollar" id="taxDollar_add" type="number" readonly/>-->
<!-- <label class="col-sm-2">含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allTaxDollar" id="allTaxDollar_add" type="number" readonly/>-->
<!-- </div>-->
<!-- </div>-->
</form>
@ -283,35 +283,35 @@
field: 'materialNum',
},
{
title: '不含税单价',
title: '不含税单价(RMB)',
field: 'noTaxRmb',
},
{
title: '含税单价',
title: '含税单价(RMB)',
field: 'taxRmb',
},
{
title: '不含税总价',
title: '不含税总价(RMB)',
field: 'allNoTaxRmb',
},
{
title: '含税总价',
title: '含税总价(RMB)',
field: 'allTaxRmb',
},
{
title: '含税单价',
title: '含税单价(美元)',
field: 'taxDollar',
},
{
title: '不含税单价',
title: '不含税单价(美元)',
field: 'noTaxDollar',
},
{
title: '含税总价',
title: '含税总价(美元)',
field: 'allTaxDollar',
},
{
title: '不含税总价',
title: '不含税总价(美元)',
field: 'allNoTaxDollar',
},
{
@ -330,7 +330,7 @@
}],
onEditableSave:function(field, row, oldValue, $el){
// 确保getTotalAmount函数存在且正确引用
getTotalAmount();
//getTotalAmount();
},
};
@ -502,56 +502,56 @@
field: 'materialNo',
values: materialNo
})
getTotalAmount();
// getTotalAmount();
}
//form计算模块
function getTotalAmount(){
let getData = $('#bootstrap-table').bootstrapTable('getData');
var materialSum = 0;
var enterpriseSum = 0;
var noTaxRmb = 0;
var taxRmb = 0;
var allNoTaxRmb = 0;
var allTaxRmb = 0;
var noTaxDollar = 0;
var taxDollar = 0;
var allNoTaxDollar = 0;
var allTaxDollar = 0;
materialSum = getData.length;
enterpriseSum = getData.reduce((sum, item) => sum + (parseInt(item.materialNum) || 0), 0);
for(var i=0;i<getData.length;i++){
noTaxRmb += parseFloat(getData[i].noTaxRmb) || 0;
taxRmb += parseFloat(getData[i].taxRmb) || 0;
allNoTaxRmb += parseFloat(getData[i].allNoTaxRmb) || 0;
allTaxRmb += parseFloat(getData[i].allTaxRmb) || 0;
noTaxDollar += parseFloat(getData[i].noTaxDollar) || 0;
taxDollar += parseFloat(getData[i].taxDollar) || 0;
allNoTaxDollar += parseFloat(getData[i].allNoTaxDollar) || 0;
allTaxDollar += parseFloat(getData[i].allTaxDollar) || 0;
}
noTaxRmb = noTaxRmb.toFixed(2);
taxRmb = taxRmb.toFixed(2);
allNoTaxRmb = allNoTaxRmb.toFixed(2);
allTaxRmb = allTaxRmb.toFixed(2);
noTaxDollar = noTaxDollar.toFixed(2);
taxDollar = taxDollar.toFixed(2);
allNoTaxDollar = allNoTaxDollar.toFixed(2);
allTaxDollar = allTaxDollar.toFixed(2);
$("input[name='materialSum']").val(materialSum);
$("input[name='enterpriseSum']").val(enterpriseSum);
$("input[name='noTaxRmb']").val(noTaxRmb);
$("input[name='taxRmb']").val(taxRmb);
$("input[name='allNoTaxRmb']").val(allNoTaxRmb);
$("input[name='allTaxRmb']").val(allTaxRmb);
$("input[name='noTaxDollar']").val(noTaxDollar);
$("input[name='taxDollar']").val(taxDollar);
$("input[name='allNoTaxDollar']").val(allNoTaxDollar);
$("input[name='allTaxDollar']").val(allTaxDollar);
}
// function getTotalAmount(){
// let getData = $('#bootstrap-table').bootstrapTable('getData');
// var materialSum = 0;
// var enterpriseSum = 0;
// var noTaxRmb = 0;
// var taxRmb = 0;
// var allNoTaxRmb = 0;
// var allTaxRmb = 0;
// var noTaxDollar = 0;
// var taxDollar = 0;
// var allNoTaxDollar = 0;
// var allTaxDollar = 0;
// materialSum = getData.length;
//
// enterpriseSum = getData.reduce((sum, item) => sum + (parseInt(item.materialNum) || 0), 0);
// for(var i=0;i<getData.length;i++){
// noTaxRmb += parseFloat(getData[i].noTaxRmb) || 0;
// taxRmb += parseFloat(getData[i].taxRmb) || 0;
// allNoTaxRmb += parseFloat(getData[i].allNoTaxRmb) || 0;
// allTaxRmb += parseFloat(getData[i].allTaxRmb) || 0;
// noTaxDollar += parseFloat(getData[i].noTaxDollar) || 0;
// taxDollar += parseFloat(getData[i].taxDollar) || 0;
// allNoTaxDollar += parseFloat(getData[i].allNoTaxDollar) || 0;
// allTaxDollar += parseFloat(getData[i].allTaxDollar) || 0;
// }
// noTaxRmb = noTaxRmb.toFixed(2);
// taxRmb = taxRmb.toFixed(2);
// allNoTaxRmb = allNoTaxRmb.toFixed(2);
// allTaxRmb = allTaxRmb.toFixed(2);
// noTaxDollar = noTaxDollar.toFixed(2);
// taxDollar = taxDollar.toFixed(2);
// allNoTaxDollar = allNoTaxDollar.toFixed(2);
// allTaxDollar = allTaxDollar.toFixed(2);
// $("input[name='materialSum']").val(materialSum);
// $("input[name='enterpriseSum']").val(enterpriseSum);
// $("input[name='noTaxRmb']").val(noTaxRmb);
// $("input[name='taxRmb']").val(taxRmb);
// $("input[name='allNoTaxRmb']").val(allNoTaxRmb);
// $("input[name='allTaxRmb']").val(allTaxRmb);
// $("input[name='noTaxDollar']").val(noTaxDollar);
// $("input[name='taxDollar']").val(taxDollar);
// $("input[name='allNoTaxDollar']").val(allNoTaxDollar);
// $("input[name='allTaxDollar']").val(allTaxDollar);
//
// }
function getAllSubTablesData() {

154
ruoyi-admin/src/main/resources/templates/sales/estimate/purchaseAddDetail.html

@ -61,29 +61,29 @@
</div>
</div>
<div class="container">
<h4 class="form-header h4">计算</h4>
<div class="col-xs-12 form-row">
<label class=" col-sm-2">物料合计:</label><input class="col-sm-4" name="materialSum" th:field="*{materialSum}" id="materialSum_add" type="number" readonly/>
<label class=" col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" th:field="*{enterpriseSum}" id="enterpriseSum_add" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2"> 不含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="noTaxRmb" id="noTaxRmb_add" type="number" readonly/>
<label class="col-sm-2"> 不含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allNoTaxRmb" id="allNoTaxRmb_add" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2"> 含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="taxRmb" id="taxRmb_add" type="number" readonly/>
<label class="col-sm-2"> 含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allTaxRmb" id="allTaxRmb_add" type="number" readonly/>
</div>
<div class="col-xs-12">
<label class="col-sm-2">不含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="noTaxDollar" id="noTaxDollar_add" type="number" readonly/>
<label class="col-sm-2">不含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allNoTaxDollar" id="allNoTaxDollar_add" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2">含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="taxDollar" id="taxDollar_add" type="number" readonly/>
<label class="col-sm-2">含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allTaxDollar" id="allTaxDollar_add" type="number" readonly/>
</div>
</div>
<!-- <div class="container">-->
<!-- <h4 class="form-header h4">计算</h4>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class=" col-sm-2">物料合计:</label><input class="col-sm-4" name="materialSum" th:field="*{materialSum}" id="materialSum_add" type="number" readonly/>-->
<!-- <label class=" col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" th:field="*{enterpriseSum}" id="enterpriseSum_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class="col-sm-2"> 不含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="noTaxRmb" id="noTaxRmb_add" type="number" readonly/>-->
<!-- <label class="col-sm-2"> 不含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allNoTaxRmb" id="allNoTaxRmb_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class="col-sm-2"> 含税单价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="taxRmb" id="taxRmb_add" type="number" readonly/>-->
<!-- <label class="col-sm-2"> 含税总价(RMB):</label><input placeholder="RMB" class="col-sm-4" name="allTaxRmb" id="allTaxRmb_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12">-->
<!-- <label class="col-sm-2">不含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="noTaxDollar" id="noTaxDollar_add" type="number" readonly/>-->
<!-- <label class="col-sm-2">不含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allNoTaxDollar" id="allNoTaxDollar_add" type="number" readonly/>-->
<!-- </div>-->
<!-- <div class="col-xs-12 form-row">-->
<!-- <label class="col-sm-2">含税单价(USD):</label><input placeholder="美元" class="col-sm-4" name="taxDollar" id="taxDollar_add" type="number" readonly/>-->
<!-- <label class="col-sm-2">含税总价(USD):</label><input placeholder="美元" class="col-sm-4" name="allTaxDollar" id="allTaxDollar_add" type="number" readonly/>-->
<!-- </div>-->
<!-- </div>-->
</form>
@ -197,35 +197,35 @@
field: 'materialNum',
},
{
title: '不含税单价',
title: '不含税单价(RMB)',
field: 'noTaxRmb',
},
{
title: '含税单价',
title: '含税单价(RMB)',
field: 'taxRmb',
},
{
title: '不含税总价',
title: '不含税总价(RMB)',
field: 'allNoTaxRmb',
},
{
title: '含税总价',
title: '含税总价(RMB)',
field: 'allTaxRmb',
},
{
title: '含税单价',
title: '含税单价(美元)',
field: 'taxDollar',
},
{
title: '不含税单价',
title: '不含税单价(美元)',
field: 'noTaxDollar',
},
{
title: '含税总价',
title: '含税总价(美元)',
field: 'allTaxDollar',
},
{
title: '不含税总价',
title: '不含税总价(美元)',
field: 'allNoTaxDollar',
},
{
@ -235,7 +235,7 @@
}],
onEditableSave:function(field, row, oldValue, $el){
// 确保getTotalAmount函数存在且正确引用
getTotalAmount();
// getTotalAmount();
},
};
@ -374,51 +374,51 @@
//form计算模块
function getTotalAmount(){
let getData = $('#bootstrap-table').bootstrapTable('getData');
var materialSum = 0;
var enterpriseSum = 0;
var noTaxRmb = 0;
var taxRmb = 0;
var allNoTaxRmb = 0;
var allTaxRmb = 0;
var noTaxDollar = 0;
var taxDollar = 0;
var allNoTaxDollar = 0;
var allTaxDollar = 0;
materialSum = getData.length;
enterpriseSum = getData.reduce((sum, item) => sum + (parseInt(item.materialNum) || 0), 0);
for(var i=0;i<getData.length;i++){
noTaxRmb += parseFloat(getData[i].noTaxRmb) || 0;
taxRmb += parseFloat(getData[i].taxRmb) || 0;
allNoTaxRmb += parseFloat(getData[i].allNoTaxRmb) || 0;
allTaxRmb += parseFloat(getData[i].allTaxRmb) || 0;
noTaxDollar += parseFloat(getData[i].noTaxDollar) || 0;
taxDollar += parseFloat(getData[i].taxDollar) || 0;
allNoTaxDollar += parseFloat(getData[i].allNoTaxDollar) || 0;
allTaxDollar += parseFloat(getData[i].allTaxDollar) || 0;
}
noTaxRmb = noTaxRmb.toFixed(2);
taxRmb = taxRmb.toFixed(2);
allNoTaxRmb = allNoTaxRmb.toFixed(2);
allTaxRmb = allTaxRmb.toFixed(2);
noTaxDollar = noTaxDollar.toFixed(2);
taxDollar = taxDollar.toFixed(2);
allNoTaxDollar = allNoTaxDollar.toFixed(2);
allTaxDollar = allTaxDollar.toFixed(2);
$("input[name='materialSum']").val(materialSum);
$("input[name='enterpriseSum']").val(enterpriseSum);
$("input[name='noTaxRmb']").val(noTaxRmb);
$("input[name='taxRmb']").val(taxRmb);
$("input[name='allNoTaxRmb']").val(allNoTaxRmb);
$("input[name='allTaxRmb']").val(allTaxRmb);
$("input[name='noTaxDollar']").val(noTaxDollar);
$("input[name='taxDollar']").val(taxDollar);
$("input[name='allNoTaxDollar']").val(allNoTaxDollar);
$("input[name='allTaxDollar']").val(allTaxDollar);
}
// function getTotalAmount(){
// let getData = $('#bootstrap-table').bootstrapTable('getData');
// var materialSum = 0;
// var enterpriseSum = 0;
// var noTaxRmb = 0;
// var taxRmb = 0;
// var allNoTaxRmb = 0;
// var allTaxRmb = 0;
// var noTaxDollar = 0;
// var taxDollar = 0;
// var allNoTaxDollar = 0;
// var allTaxDollar = 0;
// materialSum = getData.length;
//
// enterpriseSum = getData.reduce((sum, item) => sum + (parseInt(item.materialNum) || 0), 0);
// for(var i=0;i<getData.length;i++){
// noTaxRmb += parseFloat(getData[i].noTaxRmb) || 0;
// taxRmb += parseFloat(getData[i].taxRmb) || 0;
// allNoTaxRmb += parseFloat(getData[i].allNoTaxRmb) || 0;
// allTaxRmb += parseFloat(getData[i].allTaxRmb) || 0;
// noTaxDollar += parseFloat(getData[i].noTaxDollar) || 0;
// taxDollar += parseFloat(getData[i].taxDollar) || 0;
// allNoTaxDollar += parseFloat(getData[i].allNoTaxDollar) || 0;
// allTaxDollar += parseFloat(getData[i].allTaxDollar) || 0;
// }
// noTaxRmb = noTaxRmb.toFixed(2);
// taxRmb = taxRmb.toFixed(2);
// allNoTaxRmb = allNoTaxRmb.toFixed(2);
// allTaxRmb = allTaxRmb.toFixed(2);
// noTaxDollar = noTaxDollar.toFixed(2);
// taxDollar = taxDollar.toFixed(2);
// allNoTaxDollar = allNoTaxDollar.toFixed(2);
// allTaxDollar = allTaxDollar.toFixed(2);
// $("input[name='materialSum']").val(materialSum);
// $("input[name='enterpriseSum']").val(enterpriseSum);
// $("input[name='noTaxRmb']").val(noTaxRmb);
// $("input[name='taxRmb']").val(taxRmb);
// $("input[name='allNoTaxRmb']").val(allNoTaxRmb);
// $("input[name='allTaxRmb']").val(allTaxRmb);
// $("input[name='noTaxDollar']").val(noTaxDollar);
// $("input[name='taxDollar']").val(taxDollar);
// $("input[name='allNoTaxDollar']").val(allNoTaxDollar);
// $("input[name='allTaxDollar']").val(allTaxDollar);
//
// }
</script>

Loading…
Cancel
Save