diff --git a/oms_web/oms_vue/src/views/project/order/OrderDetail.vue b/oms_web/oms_vue/src/views/project/order/OrderDetail.vue index 6a7875f2..8552e44b 100644 --- a/oms_web/oms_vue/src/views/project/order/OrderDetail.vue +++ b/oms_web/oms_vue/src/views/project/order/OrderDetail.vue @@ -372,12 +372,12 @@ export default { const files = this.form.contractTableData[currentVersion]; const existingSorts = new Set(files.map(f => String(f.fileSort))); if (this.canUpdate) { - if (!existingSorts.has('0')) files.push({id: -1, fileSort: 0}); - if (!existingSorts.has('1')) files.push({id: -1, fileSort: 1}); - if (!existingSorts.has('2')) files.push({id: -1, fileSort: 2}); + if (!existingSorts.has('0')) files.push({id: -1, fileSort: "0"}); + if (!existingSorts.has('1')) files.push({id: -1, fileSort: "1"}); + if (!existingSorts.has('2')) files.push({id: -1, fileSort: "2"}); } if (this.uploadFinalFile) { - if (!existingSorts.has('3')) files.push({id: -1, fileSort: 3}); + if (!existingSorts.has('3')) files.push({id: -1, fileSort: "3"}); } if (this.uniqueVersions.length > 0) this.activeVersionTab = String(this.uniqueVersions[0]); @@ -393,9 +393,9 @@ export default { const currentVersion = String(this.form.versionCode); this.$set(this.form, 'contractTableData', { [currentVersion]: [ - { id: -1, fileSort: 0 }, - { id: -1, fileSort: 1 }, - { id: -1, fileSort: 2 } + { id: -1, fileSort: "0" }, + { id: -1, fileSort: "1" }, + { id: -1, fileSort: "2" } ] }); this.activeContractVersionTab = currentVersion; @@ -565,12 +565,12 @@ export default { this.$modal.alertWarning("请先保存订单,再上传合同信息"); return; } - this.fileSort = sortNum; + this.fileSort = String(sortNum); document.getElementById(`uploadInput${sortNum > 1 ? 2 : sortNum}`).click(); }, addFile(data) { const currentVersionFiles = this.groupedContractFiles[String(this.form.versionCode)].files; - const fileIndex = currentVersionFiles.findIndex(file => file.fileSort === data.fileSort); + const fileIndex = currentVersionFiles.findIndex(file => file.fileSort == data.fileSort); if (fileIndex !== -1) this.$set(currentVersionFiles, fileIndex, data); else currentVersionFiles.push(data); }, @@ -581,7 +581,7 @@ export default { const currentVersionFiles = this.groupedContractFiles[String(this.activeContractVersionTab)].files; const fileIndex = currentVersionFiles.findIndex(file => file.id === id); if (fileIndex !== -1) { - this.$set(currentVersionFiles, fileIndex, { id: -1, fileSort: sortNum }); + this.$set(currentVersionFiles, fileIndex, { id: -1, fileSort: String(sortNum) }); } }); });