Compare commits

..

No commits in common. "bdec78bf63e83a984c04c97dd24fc12ddfb5b7be" and "60c9576cdd2c7d9f26039e43366ca2a4d9385630" have entirely different histories.

1 changed files with 53 additions and 107 deletions

View File

@ -967,9 +967,9 @@ function updateIncomeDataUnsubmit(incomeDetails) {
$("input[name='costCompanyManageTaxExclude']").val(f2Fixed(0.028 * (deviceTaxExclude + engineerTaxExclude + serviceTaxExclude)));
// $(".input-total-title-sale-income-budget-plan").val($("input[name='incomeTotalTaxInclude']").val());
// $(".input-total-title-total-income-budget-plan").val(f2Fixed(f2($("input[name='incomeTotalTaxInclude']").val())
// + f2($(".input-total-title-earnest-money-income-budget-plan").val())));
$(".input-total-title-sale-income-budget-plan").val($("input[name='incomeTotalTaxInclude']").val());
$(".input-total-title-total-income-budget-plan").val(f2Fixed(f2($("input[name='incomeTotalTaxInclude']").val())
+ f2($(".input-total-title-earnest-money-income-budget-plan").val())));
updateProjectContributionProfitRate();
@ -1055,66 +1055,14 @@ function checkprojectPlan() {
//根据收款计划表和付款计划表更新资金计划表日期范围
function updataCostPlanMonth(data,key){
if(!data.details.length) return
let nowMaxMonth = new Date($('#planStartStr').val()).getTime()
let nowMinMonth = new Date($('#planEndStr').val()).getTime()
let nowMaxMonth = new Date($('.input-changeable-month-budget-plan:last-child').val()).getTime()
let nowMinMonth = new Date($('.input-changeable-month-budget-plan:first-child').val()).getTime()
let dataMonth = data.details
dataMonth.sort((a, b) => {
return new Date(b[key].slice(0, 7)).getTime() - new Date(a[key].slice(0, 7)).getTime()
})
let dataMax = new Date(dataMonth[0][key]).getTime()
let dataMin = new Date(dataMonth[dataMonth.length - 1][key]).getTime()
console.log(dataMonth)
if (!nowMaxMonth || !nowMinMonth) {
if(!nowMinMonth){
layui.use('laydate', function () {
var laydate = layui.laydate;
laydate.render({
elem: '#planStartStr',
type: 'month',
btns: ['confirm'],
trigger: 'click',
value: dataMonth[dataMonth.length - 1][key].slice(0, 7),
ready: function () {
},
done: function () {
var time = $(this.elem).val();
appendMultiplePlan();
$("#planStartDate").val(time);
}
});
$("#planStartDate").val(dataMonth[dataMonth.length - 1][key].slice(0, 7));
})
}
if(!nowMaxMonth){
$('#planEndStr').val(dataMonth[0][key].slice(0, 7))
layui.use('laydate', function () {
var laydate = layui.laydate;
laydate.render({
elem: '#planEndStr',
type: 'month',
btns: ['confirm'],
trigger: 'click',
value: dataMonth[0][key].slice(0, 7),
ready: function () {
},
done: function () {
var time = $(this.elem).val();
appendMultiplePlan();
$("#planEndDate").val(time);
},
});
appendMultiplePlan();
$("#planEndDate").val(dataMonth[0][key].slice(0, 7));
});
}
} else {
if (dataMax > nowMaxMonth) {
layui.use('laydate', function () {
var laydate = layui.laydate;
@ -1166,5 +1114,3 @@ function updataCostPlanMonth(data, key) {
}
}
}