如题,现在做了一个表格,每行的数据动态绑定已经实现,只做了cashin和cashout的第一行,现需求行与行之间的数据相互独立不会相互影响
表格结构不是以table形式写的,使用table结构其他需求无法实现
//cashin
//比率变化
inputPratioChangeIn() {
this.temp1.pCost = parseInt(this.temp1.pratio) * parseInt(this.temp1.moneyTotal) * 0.01;
},
//输入日期变化
inputDateChange() {
if (this.searchConfig == 'value0') {
this.deliveryDateChange();
}
if (this.searchConfig == 'value1') {
this.contractDateChange();
}
if (this.searchConfig == 'value2') {
this.installeDateChange();
}
},
//起算节点变化
startDateTypeChange(searchConfig) {
debugger;
this.searchConfig = searchConfig;
if (this.searchConfig == 'value0') {
this.deliveryDateChange();
}
if (this.searchConfig == 'value1') {
this.contractDateChange();
}
if (this.searchConfig == 'value2') {
this.installeDateChange();
}
},
//交货日期变化
deliveryDateChange() {
debugger;
if (this.inputdate == undefined || this.inputdate == '') {
this.inputdate = 0;
}
var deliverydate = new Date(this.deliverydate);
deliverydate.setDate(deliverydate.getDate() + parseInt(this.inputdate));
let month = deliverydate.getMonth() + 1;
let day = deliverydate.getDate();
this.actualdate = deliverydate.getFullYear() + '-' + this.getFormatDate(month) + '-' + this.getFormatDate(day);
this.temp1.actualmonth = deliverydate.getFullYear() + '-' + this.getFormatDate(month);
},
//合同日期变化
contractDateChange() {
debugger;
if (this.inputdate == undefined || this.inputdate == '') {
this.inputdate = 0;
}
var contractdate = new Date(this.contractdate);
contractdate.setDate(contractdate.getDate() + parseInt(this.inputdate));
let month = contractdate.getMonth() + 1;
let day = contractdate.getDate();
this.actualdate = contractdate.getFullYear() + '-' + this.getFormatDate(month) + '-' + this.getFormatDate(day);
this.temp1.actualmonth = contractdate.getFullYear() + '-' + this.getFormatDate(month);
},
//安装日期变化
installeDateChange() {
debugger;
if (this.inputdate == undefined || this.inputdate == '') {
this.inputdate = 1;
}
var installedate = new Date(this.installedate);
installedate.setDate(installedate.getDate() + parseInt(this.inputdate));
let month = installedate.getMonth() + 1;
let day = installedate.getDate();
this.actualdate = installedate.getFullYear() + '-' + this.getFormatDate(month) + '-' + this.getFormatDate(day);
this.temp1.actualmonth = installedate.getFullYear() + '-' + this.getFormatDate(month);
},