vue+element-ui以form为基础的表格如何实现每行数据相互独立?

如题,现在做了一个表格,每行的数据动态绑定已经实现,只做了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);
            },

 

方便把情况说清楚一点吗?通过数组赋值,每行数据应该就是独立的吧。

我也不太理解 说的具体是什么意思, 

如果是cashin和cashout 使用的是同一个form

是一定需要一个类型来做判断的 否则无法区分,

每行独立, 有考虑过使用 数组的索引来区分么

类型+ 索引 就可以确定到单行数据

您好,我是有问必答小助手,你的问题已经有小伙伴为您解答了问题,您看下是否解决了您的问题,可以追评进行沟通哦~

如果有您比较满意的答案 / 帮您提供解决思路的答案,可以点击【采纳】按钮,给回答的小伙伴一些鼓励哦~~

ps:问答VIP仅需29元,即可享受5次/月 有问必答服务,了解详情>>>https://vip.csdn.net/askvip?utm_source=1146287632

非常感谢您使用有问必答服务,为了后续更快速的帮您解决问题,现诚邀您参与有问必答体验反馈。您的建议将会运用到我们的产品优化中,希望能得到您的支持与协助!

速戳参与调研>>>https://t.csdnimg.cn/Kf0y