| | |
| | | this.pdftitle = "共" + this.invoicepdfimgsrcList.length + "项"; |
| | | } |
| | | }, |
| | | /** 2026-11-23:按文件名从列表中精确删除一项,避免用预览列表(blob)整表覆盖附件字段 */ |
| | | spliceByName(list, name) { |
| | | if (!list || !name) { |
| | | return; |
| | | } |
| | | const idx = list.findIndex(item => item && item.name === name); |
| | | if (idx > -1) { |
| | | list.splice(idx, 1); |
| | | } |
| | | }, |
| | | remove(file, fileList) { |
| | | const rbDetails = [...this.rbDetails]; |
| | | if (this.activeName == 1) { |
| | | this.fileListto.splice(this.fileListto.indexOf(file), 1); |
| | | rbDetails[this.atpresent].annexfilesList = this.fileListto; |
| | | this.spliceByName(this.fileListto, file && file.name); |
| | | this.spliceByName( |
| | | rbDetails[this.atpresent].annexfilesList, |
| | | file && file.name |
| | | ); |
| | | } else { |
| | | this.invoicefileListto.splice(this.invoicefileListto.indexOf(file), 1); |
| | | rbDetails[this.atpresent].invoicefilesList = this.invoicefileListto; |
| | | this.spliceByName(this.invoicefileListto, file && file.name); |
| | | this.spliceByName( |
| | | rbDetails[this.atpresent].invoicefilesList, |
| | | file && file.name |
| | | ); |
| | | } |
| | | }, |
| | | |