js文件拆分,防止过大
parent
cd1186e843
commit
611be7df7c
|
@ -2,7 +2,24 @@
|
||||||
* 一个采购成本详情的字段
|
* 一个采购成本详情的字段
|
||||||
*/
|
*/
|
||||||
COST_DETAIL_ARR=["type","category","name","unit","amount","price","taxRate","totalTaxInclude","totalTaxExclude"];
|
COST_DETAIL_ARR=["type","category","name","unit","amount","price","taxRate","totalTaxInclude","totalTaxExclude"];
|
||||||
|
$(function () {
|
||||||
|
$("#cost-detail").click(function () {
|
||||||
|
$('#my-prompt-cost-detail').modal({
|
||||||
|
relatedTarget: this,
|
||||||
|
onConfirm: function(e) {
|
||||||
|
//不能使用e.data,因为无法获取动态添加的
|
||||||
|
var data = collectData("am-modal-prompt-input-cost");
|
||||||
|
data = prepareAjaxData(data, COST_DETAIL_ARR, $("#id").val());
|
||||||
|
saveDetail("/fourcal/project/budgetEditSaveCostDetail", data, updateCostData);
|
||||||
|
},
|
||||||
|
onCancel: function(e) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$("#costAddBtn").click(function () {
|
||||||
|
appendTrCost();
|
||||||
|
});
|
||||||
|
});
|
||||||
/**
|
/**
|
||||||
* 采购成本增加一行
|
* 采购成本增加一行
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -3,6 +3,26 @@
|
||||||
*/
|
*/
|
||||||
INCOME_DETAIL_ARR=["type","name","unit","amount","price","taxRate","totalTaxInclude","totalTaxExclude"];
|
INCOME_DETAIL_ARR=["type","name","unit","amount","price","taxRate","totalTaxInclude","totalTaxExclude"];
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
$("#income-detail").click(function () {
|
||||||
|
$('#my-prompt-income-detail').modal({
|
||||||
|
relatedTarget: this,
|
||||||
|
onConfirm: function(e) {
|
||||||
|
//不能使用e.data,因为无法获取动态添加的
|
||||||
|
var data = collectData("am-modal-prompt-input-income");
|
||||||
|
data = prepareAjaxData(data, INCOME_DETAIL_ARR, $("#id").val());
|
||||||
|
saveDetail("/fourcal/project/budgetEditSaveIncomeDetail", data, updateIncomeData);
|
||||||
|
},
|
||||||
|
onCancel: function(e) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$("#incomeAddBtn").click(function () {
|
||||||
|
appendTrIncome();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新页面收入的数据【累加】
|
* 更新页面收入的数据【累加】
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -562,39 +562,8 @@
|
||||||
$("#pmsForm").submit();
|
$("#pmsForm").submit();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#income-detail").click(function () {
|
|
||||||
$('#my-prompt-income-detail').modal({
|
|
||||||
relatedTarget: this,
|
|
||||||
onConfirm: function(e) {
|
|
||||||
//不能使用e.data,因为无法获取动态添加的
|
|
||||||
var data = collectData("am-modal-prompt-input-income");
|
|
||||||
data = prepareAjaxData(data, INCOME_DETAIL_ARR, $("#id").val());
|
|
||||||
saveDetail("${base}/project/budgetEditSaveIncomeDetail", data, updateIncomeData);
|
|
||||||
},
|
|
||||||
onCancel: function(e) {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
$("#incomeAddBtn").click(function () {
|
|
||||||
appendTrIncome();
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#cost-detail").click(function () {
|
|
||||||
$('#my-prompt-cost-detail').modal({
|
|
||||||
relatedTarget: this,
|
|
||||||
onConfirm: function(e) {
|
|
||||||
//不能使用e.data,因为无法获取动态添加的
|
|
||||||
var data = collectData("am-modal-prompt-input-cost");
|
|
||||||
data = prepareAjaxData(data, COST_DETAIL_ARR, $("#id").val());
|
|
||||||
saveDetail("${base}/project/budgetEditSaveCostDetail", data, updateCostData);
|
|
||||||
},
|
|
||||||
onCancel: function(e) {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
$("#costAddBtn").click(function () {
|
|
||||||
appendTrCost();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</@defaultLayout.layout>
|
</@defaultLayout.layout>
|
||||||
|
|
Loading…
Reference in New Issue