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 } 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 @@ 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; },