From fb2b9f7b505f446618c1cf93b18a38134e35b370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=AE=B6=E5=8D=8E?= <3599164049@qq.com> Date: Mon, 16 May 2022 17:40:28 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9B=B6=E5=94=AE=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages.json | 14 +- src/static/images/icon/retail/paySuccess.png | Bin 0 -> 1459 bytes src/static/images/icon/retail/storeIcon.png | Bin 0 -> 1160 bytes .../components/hover_cart_list/hover_cart_list.vue | 43 +- .../components/retail_pay_way/retail_pay_way.vue | 498 ------------------ .../store_card_select/store_card_select.vue | 303 +++++++++++ .../retail/pages/confirm_goods/confirm_goods.vue | 419 +++++---------- .../retail/pages/confirm_order/confirm_order.vue | 569 +++++++++++++++++++++ src/subpackage/retail/pages/index/index.vue | 28 +- .../retail/pages/pay_success/pay_success.vue | 77 +++ 10 files changed, 1105 insertions(+), 846 deletions(-) create mode 100644 src/static/images/icon/retail/paySuccess.png create mode 100644 src/static/images/icon/retail/storeIcon.png delete mode 100644 src/subpackage/retail/components/retail_pay_way/retail_pay_way.vue create mode 100644 src/subpackage/retail/components/store_card_select/store_card_select.vue create mode 100644 src/subpackage/retail/pages/confirm_order/confirm_order.vue create mode 100644 src/subpackage/retail/pages/pay_success/pay_success.vue diff --git a/src/pages.json b/src/pages.json index 5304081..4544657 100644 --- a/src/pages.json +++ b/src/pages.json @@ -435,7 +435,19 @@ { "path": "pages/confirm_goods/confirm_goods", "style" : { - "navigationBarTitleText": "确定商品" + "navigationBarTitleText": "确认订单" + } + }, + { + "path": "pages/confirm_order/confirm_order", + "style" : { + "navigationBarTitleText": "确认订单" + } + }, + { + "path": "pages/pay_success/pay_success", + "style" : { + "navigationBarTitleText": "支付订单" } }, { diff --git a/src/static/images/icon/retail/paySuccess.png b/src/static/images/icon/retail/paySuccess.png new file mode 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dl=_KZ z^)oyPn6bWt?%6C+MPfZbfNO(cPPx%n2sEj>SU4KOgOvSGmUR5-7taXX|4V+qb^n3O aF#ZqaUeDQrRn(>c0000 {{ item.erp_goods_name }} - {{ item.erp_goods_specs }} - 特价 + {{ `${item.erp_goods_specs}/${item.erp_goods_specs}/${item.erp_goods_specs}` }} @@ -169,10 +168,11 @@ flex-direction: row; padding-top: 30rpx; padding-bottom: 30rpx; + // border: 1px solid red; .item-left { - width: 172rpx; - height: 172rpx; + width: 180rpx; + height: 180rpx; margin-right: 20rpx; position: relative; border-radius: 10rpx; @@ -181,31 +181,6 @@ max-width: 100%; max-height: 100%; } - .item-left-empty { - width: 100%; - height: 100%; - position: absolute; - top: 0rpx; - left: 0rpx; - background-color: rgba(0,0,0,0.5); - border-radius: 10rpx; - - >view { - font-size: 28rpx; - color: #333333; - background: #FFFFFF; - width: 88rpx; - height: 88rpx; - border-radius: 50%; - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%,-50%); - display: flex; - justify-content: center; - align-items: center; - } - } } .item-right { display: flex; @@ -227,16 +202,6 @@ font-size: 24rpx; color: rgb(154,154,157); } - .item-right-special { - width: 58rpx; - height: 28rpx; - margin-bottom: 10rpx; - font-size: 20rpx; - color: #E60012; - background: rgba(230,0,18,0.13); - border-radius: 6px; - text-align: center; - } } .item-right-price-count { diff --git a/src/subpackage/retail/components/retail_pay_way/retail_pay_way.vue b/src/subpackage/retail/components/retail_pay_way/retail_pay_way.vue deleted file mode 100644 index 4c3fb83..0000000 --- a/src/subpackage/retail/components/retail_pay_way/retail_pay_way.vue +++ /dev/null @@ -1,498 +0,0 @@ - - - - - diff --git a/src/subpackage/retail/components/store_card_select/store_card_select.vue b/src/subpackage/retail/components/store_card_select/store_card_select.vue new file mode 100644 index 0000000..bf0e8e8 --- /dev/null +++ b/src/subpackage/retail/components/store_card_select/store_card_select.vue @@ -0,0 +1,303 @@ + + + + + diff --git a/src/subpackage/retail/pages/confirm_goods/confirm_goods.vue b/src/subpackage/retail/pages/confirm_goods/confirm_goods.vue index 23fbfc2..155cac1 100644 --- a/src/subpackage/retail/pages/confirm_goods/confirm_goods.vue +++ b/src/subpackage/retail/pages/confirm_goods/confirm_goods.vue @@ -2,25 +2,30 @@ - 商品名称 - 售价 - 数量 + + + {{ curStore.name ? curStore.name : '' }} + - - - - {{ item.erp_goods_name }} - {{ item.erp_goods_specs }} - - - - {{item.erp_goods_price}} - + + + + - - - {{ item.count }} - + + + {{ item.erp_goods_name }} + + {{ `${item.erp_goods_specs}/${item.erp_goods_specs}/${item.erp_goods_specs}` }} + x{{ item.count }} + + + + + + {{ item.erp_goods_price }} + + @@ -29,22 +34,15 @@ - 合计: + 实付款: {{ totalPrice }} - - + - - - @@ -52,28 +50,19 @@ import util from '../../../../utils/util.js'; import tools from '../../js/tools'; import retailServer from '../../js/retail_server'; - import retailApi from '../../js/retail_api'; - - import retailPayWay from '../../components/retail_pay_way/retail_pay_way.vue'; export default { components: { - 'retailPayWay': retailPayWay + }, data() { return { - isEdited: false, // 是否处于编辑模式 curStore: {}, // 当前店铺信息 cartListFinal: [], // 购物车最终列表数据 totalPrice: 0, // 最终价格 - cartConfirmText: "收款出库", // 收款出库 || 确认 cartListScroll: false, // 购物车列表是否能滚动 cartListFinalHeight: "0rpx", // 最终显示的列表高度 cartListFinalPaddingBottom: "0rpx", // 根据是否是异形屏来设置 - - retailPayWayWin: { - show: false, - }, } }, onLoad(option) { @@ -83,11 +72,9 @@ this.cartListFinal = []; for (let i = 0; i < data.cartListFinal.length; ++i) { this.cartListFinal.push(tools.getNewObj(data.cartListFinal[i])); - this.cartListFinal[i]["borderBottom"] = "1rpx solid rgb(216,216,216)"; } // 最后一项默认不显示边框 - this.cartListFinal[this.cartListFinal.length - 1]["borderBottom"] = "0rpx solid rgb(216,216,216)"; this.fixMainHeight(); // 适配主内容高度 this.calcTotalPrice(); // 计算总价 @@ -95,153 +82,19 @@ setTimeout(util.hideLoad, 1000); }, methods: { - // 显示隐藏支付方式弹窗 - showOrHidePayWay(status) { - this.retailPayWayWin.show = status; - }, - - // 重新编辑 - cartReedit() { - this.isEdited = true; - this.cartConfirmText = "确认"; - }, - - // 商品出库 - goodsRetail(info) { - let _this = this; - let data = []; - for (let i = 0; i < this.cartListFinal.length; ++i) { - if (this.cartListFinal[i].count) { - data.push({ - id: this.cartListFinal[i].id, - name: this.cartListFinal[i].erp_goods_name, - price: this.cartListFinal[i].erp_goods_price, - nums: this.cartListFinal[i].count, - unit: this.cartListFinal[i].erp_goods_unit, - }); - } - } - - if (!data.length) { - util.showNone("暂无商品数量!"); - return; - } - - let newData = { - store_id: _this.curStore.id, - goods_data: data, - pay_type: info.type, + // 提交订单 + cartConfirm() { + let data = { + cartListFinal: this.cartListFinal, + curStore: this.curStore }; - if (info.inputValue) { - newData["other_pay_type"] = info.inputValue; - } - if (info.cardNo) { - newData["card_no"] = info.cardNo; - } - - util.showLoad(); - retailServer.post({ - url: retailApi.assistantRetail, - data: newData, - isDefaultGet: false, - failMsg: '出库失败!' - }).then(res => { - if (res.data.code == 0) { - uni.setStorage({ - key: "retailStatus", - data: "true", - success: function() { - util.hideLoad(); - uni.navigateBack({ - delta: 1 - });; - }, - fail: function(err) { - util.hideLoad(); - uni.navigateBack({ - delta: 1 - }); - }, - }); - } - else { - util.showNone(res.data.message || '操作失败!'); - } + uni.navigateTo({ + url: `/subpackage/retail/pages/confirm_order/confirm_order?data=${encodeURIComponent(JSON.stringify(data))}` }); - }, - - // 确认 || 收款出库 - cartConfirm() { - if (this.cartConfirmText == "确认") { - this.isEdited = false; - this.cartConfirmText = "收款出库"; - return; - } - - let mark = false; - for (let i = 0; i < this.cartListFinal.length; ++i) { - if (this.cartListFinal[i].count) { - mark = true; - break; - } - } - - if (!mark) { - util.showNone("暂无商品数量!"); - return; - } - - this.showOrHidePayWay(true); // 弹出支付方式选择框 + // this.showOrHidePayWay(true); // 弹出支付方式选择框 // this.goodsRetail(); // 商品出库 }, - // 购物车输入确认 - cartInputConfirm(event, id) { - // 修改购物车列表对应的价格 - let value = parseFloat(event.detail.value ? event.detail.value : 0).toFixed(2); - for (let i = 0; i < this.cartListFinal.length; ++i) { - if (this.cartListFinal[i].id == id) { - this.cartListFinal[i].erp_goods_price = value; - } - } - - this.calcTotalPrice(); // 计算总价 - }, - - // 购物车列表数量选项触发 - cartCountClick(type, id) { - // 找点击的对应商品 - let item = null; - for (let i = 0; i < this.cartListFinal.length; ++i) { - if (this.cartListFinal[i].id == id) { - item = this.cartListFinal[i]; - break; - } - } - - if (item) { - switch (type) { - case "add": { - // 判断库存 - if (item.count + 1 > item.stock_num) { - util.showNone("库存就这么多了!"); - return; - } - item.count += 1; - } break; - case "sub": { - if (item.count <= 0) { - return; - } - - item.count -= 1; - } break; - } - - this.calcTotalPrice(); // 计算总价 - } - }, - // 计算总价 calcTotalPrice() { let price = 0.0; @@ -264,12 +117,13 @@ // // 看看当前滚动框是否超出这个高度 let query = uni.createSelectorQuery().select(".cg-footer"); query.boundingClientRect(data => { - sumHeight = sumHeight - data.height - uni.upx2px(90); // 可用高度减去footer 再减去顶部标题项 + sumHeight = sumHeight - data.height - uni.upx2px(100); // 可用高度减去footer 再减去顶部标题项 let contentHeight = sumHeight; query = uni.createSelectorQuery().select(".final-cart-list-dialog-content-for"); query.boundingClientRect(data => { - let itemSize = (data.height + uni.upx2px(30)); // 30是margin + // let itemSize = (data.height + uni.upx2px(30)); // 30是margin + let itemSize = data.height; let limitCount = Math.floor(contentHeight / itemSize); let height = _this.cartListFinal.length >= limitCount ? contentHeight : _this.cartListFinal.length * itemSize; @@ -314,30 +168,26 @@ background-color: rgb(237,237,245); .final-cart-list-dialog-title { - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; width: 100%; - height: 90rpx; - text-align: center; - padding-left: 34rpx; - padding-right: 36rpx; + height: 100rpx; background-color: rgb(255,255,255); + padding-left: 24rpx; + padding-right: 24rpx; + color: rgba(51, 51, 51, 1); - >view { - font-size: 32rpx; - color: rgb(51,51,51); + .icon-line { + display: flex; + flex-direction: row; + align-items: center; + width: 100%; + height: 100%; + border-bottom: 1rpx solid rgba(216, 216, 216, 0.3); + font-weight: bold; - &:first-child { - width: 258rpx; - - } - &:nth-child(2) { - width: 166rpx; - } - &:nth-child(3) { - width: 126rpx; + >image { + width: 32rpx; + height: 30rpx; + margin-right: 12rpx; } } } @@ -349,101 +199,79 @@ align-items: flex-start; // flex-grow: 1; // height: 428rpx; - padding-left: 34rpx; - padding-right: 36rpx; + padding-left: 24rpx; + padding-right: 24rpx; background-color: rgb(255,255,255); // padding-bottom: 0rpx; // padding-bottom: calc( 0rpx + constant(safe-area-inset-bottom)); /* 兼容 iOS < 11.2 */ // padding-bottom: calc( 0rpx + env(safe-area-inset-bottom)); /* 兼容 iOS >= 11.2 */ - .final-cart-list-dialog-content-for { + .main-right-list { display: flex; flex-direction: row; - justify-content: space-between; - align-items: flex-start; - // flex-grow: 1; - height: 114rpx; - border-bottom: 1rpx solid rgb(216,216,216); - background-color: rgb(255,255,255); - margin-top: 30rpx; + padding-top: 23rpx; + padding-bottom: 23rpx; + // border: 1px solid red; - .final-cart-list-dialog-content-col1 { - // display: flex; + .item-left { + width: 140rpx; + height: 140rpx; + margin-right: 20rpx; + position: relative; + border-radius: 10rpx; + + >image { + max-width: 100%; + max-height: 100%; + } + } + .item-right { + display: flex; flex-direction: column; - justify-content: flex-start; - align-items: center; - width: 258rpx; + justify-content: space-between; + flex-grow: 1; - >view { - overflow: hidden; - word-break: nowrap; - text-overflow: ellipsis; /* 超出部分省略号 */ - display: -webkit-box; /** 对象作为伸缩盒子模型显示 **/ - -webkit-box-orient: vertical; /** 设置或检索伸缩盒对象的子元素的排列方式 **/ - -webkit-line-clamp: 1; /** 显示的行数 **/ + .item-right-top { + display: flex; + flex-direction: column; - &:first-child { + .item-right-name { font-size: 28rpx; - color: rgb(51,51,51); - margin-bottom: 8rpx; } - &:nth-child(2) { + .item-right-spec { + margin-top: 8rpx; + margin-bottom: 14rpx; font-size: 24rpx; color: rgb(154,154,157); + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; } } - } - - .final-cart-list-dialog-content-col2 { - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - color: rgb(51,51,51); - font-size: 28rpx; - text-align: center; - width: 166rpx; - >input { - width: 132rpx; - height: 48rpx; - border: 2rpx solid rgb(216,216,216); - border-radius: 4rpx; - } - >view { - &:first-child { - - } - &:nth-child(2) { - margin-left: 6rpx; - } - } - } - - .final-cart-list-dialog-content-col3 { - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - width: 126rpx; - - >image { - width: 36rpx; - height: 36rpx; + .item-right-price-count { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; - &:first-child { - - } - &:nth-child(3) { + .item-right-price-row { + color: rgb(255,135,61); + >view { + &:first-child { + font-size: 32rpx; + line-height: 32rpx; + + >text { + font-size: 24rpx; + line-height: 24rpx; + } + } + } } } - >view { - margin-left: 12rpx; - margin-right: 12rpx; - color: rgb(51,51,51); - font-size: 28rpx; - } } } } @@ -451,9 +279,7 @@ .cg-footer { display: flex; - flex-direction: column; - justify-content: center; - align-items: flex-start; + flex-direction: row; // flex-grow: 1; // opacity: 0.3; @@ -464,37 +290,38 @@ // padding-bottom: calc( 0rpx + constant(safe-area-inset-bottom)); /* 兼容 iOS < 11.2 */ // padding-bottom: calc( 0rpx + env(safe-area-inset-bottom)); /* 兼容 iOS >= 11.2 */ width: 100%; - height: 188rpx; + // height: 188rpx; + height: 108rpx; // border: 1rpx solid blue; background-color: rgb(255,255,255); >view { display: flex; - flex-direction: column; - // justify-content: flex-end; - align-items: flex-start; + flex-direction: row; + justify-content: space-between; + align-items: center; width: 100%; height: 100%; .cg-footer-price { display: flex; flex-direction: row; - justify-content: flex-end; align-items: center; height: 88rpx; width: 100%; - padding-right: 40rpx; + padding-left: 28rpx; >view { &:first-child { - font-size: 24rpx; + font-size: 28rpx; + color: rgba(51, 51, 51, 1); } &:nth-child(2) { color: rgb(255,135,61); - font-size: 32rpx; + font-size: 36rpx; >text { - font-size: 24rpx; + font-size: 28rpx; } } } @@ -506,7 +333,7 @@ justify-content: flex-end; align-items: center; height: 88rpx; - width: 100%; + // width: 100%; padding-right: 24rpx; font-size: 32rpx; @@ -517,23 +344,9 @@ align-items: center; } - .cg-footer-btn-reedit { - >button { - width: 242rpx; - height: 88rpx; - line-height: 88rpx; - border-radius: 44rpx; - padding: 0 0; - color: rgb(0,152,116); - background-color: rgb(255,255,255); - border: 2rpx solid rgb(0,152,116); - margin-right: 20rpx; - } - } - .cg-footer-btn-confirm { >button { - width: 242rpx; + width: 240rpx; height: 88rpx; line-height: 88rpx; border-radius: 44rpx; diff --git a/src/subpackage/retail/pages/confirm_order/confirm_order.vue b/src/subpackage/retail/pages/confirm_order/confirm_order.vue new file mode 100644 index 0000000..f0c5674 --- /dev/null +++ b/src/subpackage/retail/pages/confirm_order/confirm_order.vue @@ -0,0 +1,569 @@ + + + + + \ No newline at end of file diff --git a/src/subpackage/retail/pages/index/index.vue b/src/subpackage/retail/pages/index/index.vue index be26f59..d538f6c 100644 --- a/src/subpackage/retail/pages/index/index.vue +++ b/src/subpackage/retail/pages/index/index.vue @@ -44,7 +44,7 @@ {{ item.erp_goods_name }} - {{ item.erp_goods_specs }} + {{ `${item.erp_goods_specs}/${item.erp_goods_specs}/${item.erp_goods_specs}` }} 特价 @@ -140,6 +140,11 @@ export default { this.getSearchLocal(); // 获取本地的搜索记录 this.getRetailStatus(); // 获取收款出库状态 }, + watch: { + cartList() { + this.setCartConfirmStyle(); + }, + }, methods: { // 获取收款出库状态 getRetailStatus() { @@ -288,7 +293,15 @@ export default { // 清空购物车 clearCart() { - + this.cartList = []; + for (let i = 0; i < this.goodsInfo.length; ++i) { + for (let j = 0; j < this.goodsInfo[i].goods_list.length; ++j) { + this.goodsInfo[i].goods_list[j].count = 0; + } + } + this.isShowCartList = false; + this.calcCartTotalPriceAndCount(); // 计算购物车总价跟总量 + this.calcTotalPriceAndCount(); // 计算总价跟总量 }, // 购物车列表数量选项触发 @@ -335,10 +348,13 @@ export default { if (this.cartList[i].count <= 0) { this.cartList.splice(i, 1); } + // 列表没了,隐藏 + if (!this.cartList.length) { + this.isShowCartList = false; + } this.calcCartTotalPriceAndCount(); // 计算购物车总价跟总量 this.calcTotalPriceAndCount(); // 计算总价跟总量 - this.setCartConfirmStyle(); }, // 获取购物车列表的最终数据 @@ -396,8 +412,6 @@ export default { for (let i = 0; i < tempData.length; ++i) { this.cartList.push(tools.getNewObj(tempData[i])); } - - this.setCartConfirmStyle(); }, setCartConfirmStyle() { @@ -406,6 +420,10 @@ export default { // 购物车点击 cartClick() { + if (!this.cartList.length) { + return; + } + if (this.isShowCartList) { this.isShowCartList = false; } diff --git a/src/subpackage/retail/pages/pay_success/pay_success.vue b/src/subpackage/retail/pages/pay_success/pay_success.vue new file mode 100644 index 0000000..98bffd3 --- /dev/null +++ b/src/subpackage/retail/pages/pay_success/pay_success.vue @@ -0,0 +1,77 @@ + + + + +