Commit 9976801c authored by 沈翠玲's avatar 沈翠玲

领料申请bug

parent 39dc1849
...@@ -228,9 +228,9 @@ export default { ...@@ -228,9 +228,9 @@ export default {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
if (this.optType == "add") { if (this.optType == "add") {
this.tableData.unshift({ ...this.form }); this.tableData.unshift(JSON.parse(JSON.stringify(this.form)));
}else if(this.optType == "edit"){ }else if(this.optType == "edit"){
this.tableData[this.indexs]=JSON.parse(JSON.stringify(this.form)); this.$set(this.tableData, this.indexs, JSON.parse(JSON.stringify(this.form)))
} }
this.showFlag = false; this.showFlag = false;
} }
...@@ -266,7 +266,7 @@ export default { ...@@ -266,7 +266,7 @@ export default {
updateRow(index){ updateRow(index){
console.log(index); console.log(index);
this.indexs=index; this.indexs=index;
this.form = this.tableData[index]; this.form = JSON.parse(JSON.stringify(this.tableData[index]));
this.open = true; this.open = true;
this.optType = "edit"; this.optType = "edit";
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment