From 48969576212109d42994c302c2144c544c97686e Mon Sep 17 00:00:00 2001 From: "97694732@qq.com" Date: Wed, 3 Jun 2026 17:39:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A1=AE=E8=AE=A4=E4=B8=8A=E4=BC=A0=E5=BC=B9?= =?UTF-8?q?=E7=AA=97:=E6=98=BE=E7=A4=BA=E8=B4=A7=E5=8C=BA/ISBN/=E4=B9=A6?= =?UTF-8?q?=E5=90=8D/=E4=BB=B7=E6=A0=BC/=E5=BA=93=E5=AD=98/=E4=BD=9C?= =?UTF-8?q?=E8=80=85/=E5=87=BA=E7=89=88=E7=A4=BE/=E5=AE=9A=E4=BB=B7/?= =?UTF-8?q?=E5=8D=B0=E5=88=B7=E6=97=B6=E9=97=B4/=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/upload/upload.vue | 47 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/pages/upload/upload.vue b/pages/upload/upload.vue index 5457917..d0b6b0a 100644 --- a/pages/upload/upload.vue +++ b/pages/upload/upload.vue @@ -1308,20 +1308,63 @@ export default { // 提交上传 submitUpload() { if (this.isSubmitting) return - this.isSubmitting = true const warehouseData = this.currentTab === 'isbn' ? this.isbnWarehouseData : this.noIsbnWarehouseData if (!warehouseData) { uni.showToast({ title: '请选择货区', icon: 'none' }) - this.isSubmitting = false return } + // 确认弹窗 + const warehouseName = warehouseData.warehouseName || warehouseData.name || '' + const locCode = warehouseData.locationCode || warehouseData.code || '' + const locationText = warehouseName + (locCode ? ' - ' + locCode : '') + const isbn = this.isbn || '-' + const bookName = this.bookName || '-' + const price = this.price || '-' + const stock = this.stock ?? '-' + const author = this.author || '-' + const publisher = this.publisher || '-' + const fixPrice = this.fixPrice || '-' + const printTime = this.printTime || '-' + const photoCount = this.photoList.length + + const contentLines = [ + '📦 货区:' + locationText, + '📖 ISBN:' + isbn, + '📕 书名:' + bookName, + '💰 价格:' + price, + '📊 库存:' + stock, + '✍️ 作者:' + author, + '🏢 出版社:' + publisher, + '🏷️ 定价:' + fixPrice, + '📅 印刷时间:' + printTime, + '📷 图片:' + photoCount + '张' + ] + + uni.showModal({ + title: '确认上传', + content: contentLines.join('\n'), + confirmText: '确认上传', + cancelText: '取消', + success: (res) => { + if (res.confirm) { + this.doSubmit(warehouseData) + } else { + this.isSubmitting = false + } + } + }) + }, + + doSubmit(warehouseData) { + this.isSubmitting = true uni.showLoading({ title: '上传中...' }) setTimeout(() => { uni.hideLoading() this.isSubmitting = false uni.showToast({ title: '上传成功', icon: 'success' }) + // 清空表单待后续对接真实API }, 1500) },