From d99fb079c0ca30c21b3e1546e4992aea8004c997 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=8F=E5=95=BE?= <1144797966@qq.com> Date: Sun, 1 Sep 2024 17:56:27 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=95=86=E5=93=81?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=9D=E5=A7=8B=E5=8C=96=E4=B8=BAundefined?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/product/add_shop.vue | 46 +++++++++++++++++++++++++--------- src/views/product/index.vue | 1 + 2 files changed, 35 insertions(+), 12 deletions(-) diff --git a/src/views/product/add_shop.vue b/src/views/product/add_shop.vue index a0c6356..bd8a360 100644 --- a/src/views/product/add_shop.vue +++ b/src/views/product/add_shop.vue @@ -103,8 +103,9 @@ @@ -214,10 +215,9 @@ @@ -427,15 +427,15 @@ export default { selectSpec: [], selectSpecResult: false, defaultSku: { - salePrice: 0, - memberPrice: 0, - costPrice: 0, - originPrice: 0, - stockNumber: 0, - firstShared: 0, + salePrice: undefined, + memberPrice: undefined, + costPrice: undefined, + originPrice: undefined, + stockNumber: undefined, + firstShared: undefined, barCode: `${localStorage.getItem("shopId")}${dayjs().valueOf()}`, isGrounding: 1, - productId: this.$route.query.goods_id, + productId: this.$route.query.goods_id ? this.$route.query.goods_id : '', shopId: localStorage.getItem("shopId"), suit: 0 }, @@ -690,8 +690,30 @@ export default { console.log(error); } }, + // 提交 submitHandle() { + console.log(this.form.skuList) + const hasUndefined = this.form.skuList.some(obj => { + for (const key in obj) { + if (obj[key] === undefined) { + return true; // 如果找到undefined,立即停止搜索并返回true + } + } + return false; // 如果没有找到undefined,返回false + }); + // 停止执行下面的数据 + if (hasUndefined) { + this.$message({ + message: '请完善规格属性的参数!', + type: 'warning' + }); + return false; + } + + this.imgList.forEach(ele => { + arr.push(ele.url) + }) let arr = [] this.imgList.forEach(ele => { arr.push(ele.url) diff --git a/src/views/product/index.vue b/src/views/product/index.vue index b476b85..c7ecd5a 100644 --- a/src/views/product/index.vue +++ b/src/views/product/index.vue @@ -52,6 +52,7 @@ From 422a44ca15dc5182d832b53621f781540026a338 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Mon, 2 Sep 2024 11:13:44 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store/modules/api.js b/src/store/modules/api.js index 2d2d640..0404307 100644 --- a/src/store/modules/api.js +++ b/src/store/modules/api.js @@ -19,7 +19,7 @@ const api = { // 文件上传 fileUploadApi: baseUrl + '/api/localStorage', // 上传版本文件 - versonUploadApi: baseUrl + '/api/uploadVersionFile', + versonUploadApi: baseUrl + '/api/qiNiuContent/uploadVersionFile', // baseUrl, baseApi: baseUrl } From 7db7f0c463ce0ae91e1d27e45f04ffa79d0e61c5 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Mon, 2 Sep 2024 15:34:06 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BB=A3=E5=AE=A2=E4=B8=8B=E5=8D=95=20?= =?UTF-8?q?=E5=8E=BB=E9=99=A4=E5=8E=86=E5=8F=B2=E8=AE=A2=E5=8D=95=EF=BC=8C?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E8=AE=A2=E5=8D=95=E5=A2=9E=E5=8A=A0=E7=8A=B6?= =?UTF-8?q?=E6=80=81=EF=BC=8C=E5=BD=93=E7=8A=B6=E6=80=81=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E6=97=B6=E6=89=8D=E7=BB=A7=E7=BB=AD=E5=85=81=E8=AE=B8=E8=AF=B7?= =?UTF-8?q?=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/table-diancan-oldList-back.vue | 3839 +++++++++++++++++ src/views/table/components/table-diancan.vue | 23 +- 2 files changed, 3855 insertions(+), 7 deletions(-) create mode 100644 src/views/table/components/table-diancan-oldList-back.vue diff --git a/src/views/table/components/table-diancan-oldList-back.vue b/src/views/table/components/table-diancan-oldList-back.vue new file mode 100644 index 0000000..50452fd --- /dev/null +++ b/src/views/table/components/table-diancan-oldList-back.vue @@ -0,0 +1,3839 @@ + + + + + + diff --git a/src/views/table/components/table-diancan.vue b/src/views/table/components/table-diancan.vue index f773164..98c7bfb 100644 --- a/src/views/table/components/table-diancan.vue +++ b/src/views/table/components/table-diancan.vue @@ -250,7 +250,7 @@ type="success" size="medium" :disabled="!order.list.length" - @click="toCreateOrder(false)" + @click="toCreateOrderDebounce(false)" > 仅下单 @@ -261,7 +261,7 @@ 去结账 @@ -373,14 +373,14 @@
存单
取单 @@ -1133,6 +1133,7 @@ export default { canUpdate: true, //下单 createOrder: { + status: "", discount: 1, form: {}, data: {}, @@ -1532,6 +1533,13 @@ export default { this.isCreateOrder = false; }, //生成订单 + toCreateOrderDebounce(isNowPay){ + if(this.createOrder.status!=''&&this.createOrder.status!='success'){ + return + } + this.createOrder.status='loading' + this.toCreateOrder(isNowPay) + }, async toCreateOrder(isNowPay = false) { console.log(this.order) console.log(this.order.orderId) @@ -1547,6 +1555,7 @@ export default { console.log(this.postPay); console.log(isNowPay); console.log(this.postPay && isNowPay); + this.createOrder.status='success' if (this.postPay && !isNowPay) { this.$notify({ title: "下单成功", @@ -1559,7 +1568,6 @@ export default { const { masterId } = await this.getMasterId(); this.masterId = masterId; } - this.isCreateOrder = true; }, @@ -2158,6 +2166,7 @@ export default { this.prveOrder.selIndex=-1 this.order.old.selIndex = -1; this.isCreateOrder = false; + this.createOrder.status="" this.note.content = ""; this.vipUser = { id: "" }; this.allPack = false; @@ -2175,10 +2184,10 @@ export default { masterId: this.masterId, tableId: this.table.tableId, }); + this.order.list = res.records; if (this.key) { - this.order.old.list = res.records; + // this.order.old.list = res.records; } else { - this.order.list = res.records; } this.order.total = res.total; },