From 48e260a113c6e631a19e79b60597eb702afc4b8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=AE=B6=E5=8D=8E?= <3599164049@qq.com> Date: Fri, 13 May 2022 18:02:15 +0800 Subject: [PATCH 01/21] =?UTF-8?q?=E9=9B=B6=E5=94=AE=E6=94=B9=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/api.js | 4 +- src/manifest.json | 4 +- src/static/images/icon/retail/addEmpty.png | Bin 0 -> 366 bytes .../components/hover_cart_list/hover_cart_list.vue | 256 +++++++++++-------- src/subpackage/retail/pages/index/index.vue | 274 +++++++++++++-------- src/subpackage/retail/pages/search/search.vue | 12 +- 6 files changed, 327 insertions(+), 223 deletions(-) create mode 100644 src/static/images/icon/retail/addEmpty.png diff --git a/src/js/api.js b/src/js/api.js index 3c9fff4..095333b 100644 --- a/src/js/api.js +++ b/src/js/api.js @@ -1,5 +1,5 @@ -// export const ORIGIN = `https://testmanager.ouxuanzhineng.cn`; // 测试 -export const ORIGIN = `https://minimanage.ouxuanzhineng.cn`; // 正式 +export const ORIGIN = `https://testmanager.ouxuanzhineng.cn`; // 测试 +// export const ORIGIN = `https://minimanage.ouxuanzhineng.cn`; // 正式 // export const ORIGIN = `http://192.168.1.135:9090`; // 20210927 测试 diff --git a/src/manifest.json b/src/manifest.json index 8ea5a29..98b6d1a 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -55,7 +55,7 @@ /* 快应用特有相关 */ "mp-weixin" : { /* 微信小程序特有相关 */ - "appid" : "wxf1294b279ad1b845", + "appid" : "wx7106e84614cf0060", "setting" : { "urlCheck" : false }, @@ -73,4 +73,4 @@ "mp-qq" : { "usingComponents" : true } -} \ No newline at end of file +} diff --git a/src/static/images/icon/retail/addEmpty.png b/src/static/images/icon/retail/addEmpty.png new file mode 100644 index 0000000000000000000000000000000000000000..307bf67753a9e7ec63a61b59f1925d19d6bc7195 GIT binary patch literal 366 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k3?#4J%UA`ZTmyVUT!HlL+4E-4o(m>Hj9Ihh z&zUnHNCE+n1WU~U%L2J`|NZ+nckY7e(`SA9^lAI{UGLw2ShQ$q?x|bKK!f;8g8YIR z-tRrXEIZ7}RO0034Lx1%TUPu6N}cp{aSX9I-8<#BP>TYG!%^>>qFYb@uYdLKTH2)> z2P#*+>|tbDb;LTGL9nMZ?rNq<0$WLNU{o)E$?p=iH3ou9r8k_qAnMnz|7E-BBkjje z&qPc}@`*6`|5@qWE*=wbFA;L*o#^q9d*TK~cEL`Wr;U>jXt&R4@r(R4 z&rdV4GgPhK?neEkI-9hs8YjMT@)zxOh}}4cZ|k}nE|XrAFFN3=Dj*tMqC1IOY#Z18 xl1Ja3vNy_WzAX5Zd`_R|=c|eOhIO)a49{;`ztsM3_ZsLa22WQ%mvv4FO#tY{r+xqc literal 0 HcmV?d00001 diff --git a/src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue b/src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue index bd864ae..c14d94f 100644 --- a/src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue +++ b/src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue @@ -1,26 +1,35 @@ - - 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 @@ + + + + + From 2fbfecf88c556f5501bceaacc3da22d020dc91c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=AE=B6=E5=8D=8E?= <3599164049@qq.com> Date: Tue, 17 May 2022 15:20:48 +0800 Subject: [PATCH 03/21] =?UTF-8?q?=E9=9B=B6=E5=94=AE=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/order_list/retail/retail.vue | 6 +- src/pages/order_list/order_list.vue | 2 +- .../order/pages/retail/detail/detail.vue | 252 +++++++++++++++++---- 3 files changed, 214 insertions(+), 46 deletions(-) diff --git a/src/components/order_list/retail/retail.vue b/src/components/order_list/retail/retail.vue index c007d6f..e5ccafe 100644 --- a/src/components/order_list/retail/retail.vue +++ b/src/components/order_list/retail/retail.vue @@ -9,8 +9,8 @@ 商品名称: - - 操作人: + + 操作途径: 购买时间: @@ -29,7 +29,7 @@ export default { getGoodsName(){ let { orderInfo } = this; let _ls = orderInfo&&orderInfo.retail_order_goods || []; - let _str = _ls.map(e=>e.name).join(';'); + let _str = _ls.map(e=>`${e.name}【${e.spec}】x${e.nums}`).join(';'); if(_ls.length)_str += ';' return _str } diff --git a/src/pages/order_list/order_list.vue b/src/pages/order_list/order_list.vue index a39bdaa..b33dd38 100644 --- a/src/pages/order_list/order_list.vue +++ b/src/pages/order_list/order_list.vue @@ -587,7 +587,7 @@ case 8: // 租售柜 筛选的 status 全部 1,2,4 租用中 1 已完成 2 已退款4 已购买5 return [ {id: '1,2,4', name: '全部'}, {id: 1, name: '租用中'}, {id: 2, name: '已完成'}, {id: 4, name: '已退款'},{id: 5, name: '已购买'}]; case 19: // 订单管理 筛选的 status status = 1 交易成功 - return [ {id: 1, name: '交易成功'} ]; + return [ {id: 1, name: '交易成功'}, {id: 4, name: '已退款'} ]; case 20: // 年月卡 筛选的 status 全部 0,1,2,3 待激活 0 使用中 1 已失效 2 已退卡 3 return [ {id: '', name: '全部'}, {id: 0, name: '待激活'}, {id: 1, name: '使用中'}, {id: 2, name: '已失效'},{id: 3, name: '已退卡'}]; default: diff --git a/src/subpackage/order/pages/retail/detail/detail.vue b/src/subpackage/order/pages/retail/detail/detail.vue index 76e76f9..90e4f44 100644 --- a/src/subpackage/order/pages/retail/detail/detail.vue +++ b/src/subpackage/order/pages/retail/detail/detail.vue @@ -1,38 +1,91 @@ @@ -40,14 +93,10 @@ import { ORDER_API } from '../../../js/api'; import server from '../../../js/server'; import util from '../../../../../utils/util'; -import a_header from '../../../../../components/order_list/a_header/a_header.vue'; -import a_line from '../../../../../components/order_list/a_line/a_line.vue'; import s_line from '../../../components/s_line/s_line.vue'; import p_line from '../../../components/p_line/p_line.vue'; export default { components: { - 'a-line': a_line, - 'a-header': a_header, 's-line': s_line, 'p-line': p_line, }, @@ -60,10 +109,21 @@ export default { this.getOrderInfo(options.order_no); }, methods: { - payTypeTxt: util.order_pay_type_txt, + // payTypeTxt: util.order_pay_type_txt, + payTypeTxt(payType, cardNo) { + let _obj = { + 0: '微信支付', + 1: '支付宝支付', + 2: `储值卡支付 ${cardNo ? '(' + cardNo + ')' : ''}`, + 3: '现金支付', + 4: '其他' + }; + return _obj[payType] || '-' + }, getStatus(status){ let _obj = { - 1: '交易成功' + 1: '交易成功', + 4: '已退款' } return _obj[status] || '-' }, @@ -77,6 +137,10 @@ export default { .then(res=>{ util.hideLoad(); this.orderInfo = res || {}; + // this.orderInfo.refunds = [ + // { refund_amount: this.orderInfo.refund_amount, refund_no: this.orderInfo.refund_no, refund_time: this.orderInfo.refund_time, refund_reason: this.orderInfo.refund_reason }, + // { refund_amount: this.orderInfo.refund_amount, refund_no: this.orderInfo.refund_no, refund_time: this.orderInfo.refund_time, refund_reason: this.orderInfo.refund_reason } + // ]; }) }, @@ -93,40 +157,133 @@ export default { margin-bottom: 26upx; padding: 0 24upx; background-color: #fff; + .ra-header { + position: relative; + padding-top: 30upx; + padding-bottom: 30upx; + @include centerFlex(flex-start); + >image { + width: 32upx; + height: 30upx; + margin-right: 14upx; + } + >text { + font-size: 28upx; + font-weight: 500; + color: #1A1A1A; + } + >view { + position: absolute; + bottom: 0%; + width: 100%; + height: 2upx; + background-color: #D8D8D8; + } + } .rh-name{ - padding: 30upx 0; + padding-top: 18upx; + padding-bottom: 18upx; + .rh-name-line { + @include centerFlex(space-between); + font-size: 28upx; + font-weight: 400; + margin-bottom: 10upx; + + >view { + &:first-child { + color: #9C9C9F; + @include centerFlex(flex-start); + flex-grow: 1; + + >view { + width: 152upx; + flex-shrink: 0; + } + >text { + color: #333333; + @include textHide(1); + } + } + + &:nth-child(2) { + flex-shrink: 0; + } + } + } } } .rc-goods-info{ margin-bottom: 24upx; - padding: 0 24upx; + padding: 30upx 24upx 46upx 24upx; background-color: #fff; + font-weight: 500; .rgi-tit{ - padding-top: 20upx; font-size: 32upx; + font-weight: 500; color: #1a1a1a; } .rgi-goods-ls{ .rgl-item{ - padding: 30upx 0; - border-bottom: 2upx solid #D8D8D8; - } - } - .rgi-total{ - text-align: right; - line-height: 106upx; - font-weight: 500; - font-size: 28upx; - color: #1a1a1a; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - >text{ - color: #9a9a9d; - font-weight: 400; + padding-top: 30upx; + // border-bottom: 2upx solid #D8D8D8; + color: #9C9C9F; + font-size: 28upx; + + .rgl-item-desc { + display: flex; + justify-content: space-between; + margin-bottom: 20upx; + color: #333; + } + .rgl-item-sku { + margin-bottom: 10upx; + } + .rgl-item-type-spec { + display: flex; + justify-content: space-between; + align-items: flex-end; + >text { + color: #333; + } + } + .rgl-item-bottom-line { + width: 100%; + height: 2upx; + background-color: #D8D8D8; + margin-top: 18upx; + } } } } + .rc-total-amount-info{ + margin-bottom: 24upx; + padding: 0 24upx; + padding-top: 1upx; + background-color: #fff; + font-size: 28upx; + + .rc-total-amount-line { + margin-top: 26upx; + @include centerFlex(space-between); + >text { + font-size: 24upx; + } + } + .rgi-total{ + text-align: right; + line-height: 106upx; + font-weight: 500; + font-size: 28upx; + color: #1a1a1a; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + >text{ + color: #9a9a9d; + font-weight: 400; + } + } + } .rc-pay-info{ padding: 30upx; background-color: #fff; @@ -137,4 +294,15 @@ export default { color: #333; } } + .rc-refund-info{ + padding: 30upx; + margin-top: 24upx; + background-color: #fff; + .rpi-tit{ + margin-bottom: 16upx; + line-height: 44upx; + font-size: 28upx; + color: #9C9C9F; + } + } \ No newline at end of file From d2ac2f407ea7df6a0184cc961500b5a305c73ed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=AE=B6=E5=8D=8E?= <3599164049@qq.com> Date: Wed, 18 May 2022 14:07:37 +0800 Subject: [PATCH 04/21] =?UTF-8?q?=E9=9B=B6=E5=94=AE=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/order_list/retail/retail.vue | 3 +- .../order/pages/retail/detail/detail.vue | 8 +- .../components/hover_cart_list/hover_cart_list.vue | 73 +--- .../store_card_select/store_card_select.vue | 79 ++-- .../retail/pages/confirm_goods/confirm_goods.vue | 146 ++----- .../retail/pages/confirm_order/confirm_order.vue | 187 +++------ src/subpackage/retail/pages/index/index.vue | 436 ++++++--------------- .../retail/pages/pay_success/pay_success.vue | 37 +- src/subpackage/retail/pages/search/search.vue | 119 ++---- 9 files changed, 307 insertions(+), 781 deletions(-) diff --git a/src/components/order_list/retail/retail.vue b/src/components/order_list/retail/retail.vue index e5ccafe..3236f0c 100644 --- a/src/components/order_list/retail/retail.vue +++ b/src/components/order_list/retail/retail.vue @@ -47,7 +47,8 @@ export default { methods: { getStatus(status){ let _obj = { - 1: '交易成功' + 1: '交易成功', + 4: '已退款' } return _obj[status] || '-' }, diff --git a/src/subpackage/order/pages/retail/detail/detail.vue b/src/subpackage/order/pages/retail/detail/detail.vue index 90e4f44..d8bcf48 100644 --- a/src/subpackage/order/pages/retail/detail/detail.vue +++ b/src/subpackage/order/pages/retail/detail/detail.vue @@ -159,8 +159,7 @@ export default { background-color: #fff; .ra-header { position: relative; - padding-top: 30upx; - padding-bottom: 30upx; + padding: 30upx 0; @include centerFlex(flex-start); >image { width: 32upx; @@ -181,8 +180,7 @@ export default { } } .rh-name{ - padding-top: 18upx; - padding-bottom: 18upx; + padding: 18upx 0; .rh-name-line { @include centerFlex(space-between); font-size: 28upx; @@ -200,7 +198,7 @@ export default { flex-shrink: 0; } >text { - color: #333333; + color: #333; @include textHide(1); } } diff --git a/src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue b/src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue index f6f3166..3bfd21a 100644 --- a/src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue +++ b/src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue @@ -7,7 +7,7 @@ - + @@ -56,32 +56,16 @@ clearCart() { this.$emit("update:clearCart"); }, - // 底部遮罩点击 maskClick() { this.$emit("update:maskClick"); }, - // 购物车输入确认 - cartInputConfirm(event, id) { - // 修改购物车列表对应的价格 - // console.log(event.detail.value.match(/(([0-9]+\.[0-9]+)|([0-9]+))/g)); // 取正浮点数 跟 正整数 - - let value = parseFloat(event.detail.value ? event.detail.value : 0).toFixed(2); - for (let i = 0; i < this.cartList.length; ++i) { - if (this.cartList[i].id == id) { - this.$emit("update:cartInputConfirm", value, i); - } - } - }, - // 购物车列表数量选项触发 cartCountClick(type, id) { - // 找点击的对应商品 let item = null; for (let i = 0; i < this.cartList.length; ++i) { if (this.cartList[i].id == id) { - // item = this.cartList[i]; this.$emit("update:cartCountClick", type, i); break; } @@ -92,52 +76,45 @@