From 179a99563d23b9fd7a25df96df3ad4d33f6f687a Mon Sep 17 00:00:00 2001 From: dengxiongfei Date: Wed, 19 Jan 2022 09:33:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/orderApi.js | 49 +++ common/css/reset.scss | 151 ++++++++ components/uni-steps/uni-steps.vue | 268 +++++++++++++ enums/index.js | 35 ++ pages.json | 28 +- pages/order-detail/index.vue | 463 +++++++++++++++++++++++ pages/trade/orderList.vue | 117 ++---- static/imgs/order/customer-default.png | Bin 0 -> 14633 bytes static/imgs/order/location-icon.png | Bin 0 -> 782 bytes static/imgs/order/order-empty.png | Bin 0 -> 45842 bytes static/imgs/order/paper-default-icon.png | Bin 0 -> 16569 bytes static/imgs/order/right-arrow.png | Bin 0 -> 604 bytes static/imgs/order/status-icon.png | Bin 0 -> 1037 bytes 13 files changed, 1019 insertions(+), 92 deletions(-) create mode 100644 apis/orderApi.js create mode 100644 components/uni-steps/uni-steps.vue create mode 100644 pages/order-detail/index.vue create mode 100644 static/imgs/order/customer-default.png create mode 100644 static/imgs/order/location-icon.png create mode 100644 static/imgs/order/order-empty.png create mode 100644 static/imgs/order/paper-default-icon.png create mode 100644 static/imgs/order/right-arrow.png create mode 100644 static/imgs/order/status-icon.png diff --git a/apis/orderApi.js b/apis/orderApi.js new file mode 100644 index 0000000..7b37c81 --- /dev/null +++ b/apis/orderApi.js @@ -0,0 +1,49 @@ +import http from '../utils/http/index.js' + +/** + * + * @param {object} data + * @returns {Promise} + */ +export function getSupplierOrderList(data) { + return http.get({ + url: '/base-paper-trading/get/supplier/order/list/page', + data + }) +} + +/** + * 获取供应商订单详情 + * @param {object} data + * @returns {Promise} + */ +export function getSupplierOrderDetail(data) { + return http.get({ + url: '/base-paper-trading/get/supplier/order/details', + data + }) +} + +/** + * 供应商取消订单 + * @param {object} data supplierOrderId + * @returns {Promise} + */ +export function cancelSupplierOrder(data) { + return http.post({ + url: '/base-paper-trading/get/supplier/cancellation/order', + data + }) +} + +/** + * 供应商确认订单 + * @param {object} data orderId + * @returns {Promise} + */ +export function confirmSupplierOrder(data) { + return http.post({ + url: '/base-paper-trading/supplier/submit/order', + data + }) +} diff --git a/common/css/reset.scss b/common/css/reset.scss index 6204afe..c3a30e0 100644 --- a/common/css/reset.scss +++ b/common/css/reset.scss @@ -54,3 +54,154 @@ button::after { display: -webkit-box; // 弹性伸缩盒 -webkit-box-orient: vertical; // 设置伸缩盒子元素排列方式 } + +.flex-row-start-start { + display: flex; + flex-direction: row; + align-items: flex-start; + justify-content: flex-start; +} +.flex-row-start-center { + display: flex; + flex-direction: row; + align-items: flex-start; + justify-content: center; +} +.flex-row-start-end { + display: flex; + flex-direction: row; + align-items: flex-start; + justify-content: flex-end; +} +.flex-row-start-space { + display: flex; + flex-direction: row; + align-items: flex-start; + justify-content: space-between; +} +.flex-row-center-start { + display: flex; + flex-direction: row; + align-items: center; + justify-content: flex-start; +} +.flex-row-center-center { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; +} +.flex-row-center-end { + display: flex; + flex-direction: row; + align-items: center; + justify-content: flex-end; +} +.flex-row-center-space { + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-between; +} +.flex-row-end-start { + display: flex; + flex-direction: row; + align-items: flex-end; + justify-content: flex-start; +} +.flex-row-end-center { + display: flex; + flex-direction: row; + align-items: flex-end; + justify-content: center; +} +.flex-row-end-end { + display: flex; + flex-direction: row; + align-items: flex-end; + justify-content: flex-end; +} +.flex-row-end-space { + display: flex; + flex-direction: row; + align-items: flex-end; + justify-content: space-between; +} + +.flex-col-start-start { + display: flex; + flex-direction: column; + align-items: flex-start; + justify-content: flex-start; +} +.flex-col-start-center { + display: flex; + flex-direction: column; + align-items: flex-start; + justify-content: center; +} +.flex-col-start-end { + display: flex; + flex-direction: column; + align-items: flex-start; + justify-content: flex-end; +} +.flex-col-start-space { + display: flex; + flex-direction: column; + align-items: flex-start; + justify-content: space-between; +} +.flex-col-center-start { + display: flex; + flex-direction: column; + align-items: center; + justify-content: flex-start; +} +.flex-col-center-center { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +} +.flex-col-center-end { + display: flex; + flex-direction: column; + align-items: center; + justify-content: flex-end; +} +.flex-col-center-space { + display: flex; + flex-direction: column; + align-items: center; + justify-content: space-between; +} +.flex-col-end-start { + display: flex; + flex-direction: column; + align-items: flex-end; + justify-content: flex-start; +} +.flex-col-end-center { + display: flex; + flex-direction: column; + align-items: flex-end; + justify-content: center; +} +.flex-col-end-end { + display: flex; + flex-direction: column; + align-items: flex-end; + justify-content: flex-end; +} +.flex-col-end-space { + display: flex; + flex-direction: column; + align-items: flex-end; + justify-content: space-between; +} + +.flex-base { + flex-grow: 0; + flex-shrink: 0; +} diff --git a/components/uni-steps/uni-steps.vue b/components/uni-steps/uni-steps.vue new file mode 100644 index 0000000..1345761 --- /dev/null +++ b/components/uni-steps/uni-steps.vue @@ -0,0 +1,268 @@ + + + + + diff --git a/enums/index.js b/enums/index.js index 790632f..a708e5c 100644 --- a/enums/index.js +++ b/enums/index.js @@ -107,3 +107,38 @@ export const fsAuditStatus = { PASS: 2, REJECT: 3 } + +/** + * 供应商订单状态 待客户确认订单/30202,待供应商确认订单/30205,待发货/30106,已发货/30107 ,待客户借款/30207,支付中/30208,待客户支付/30214,付款失败/30211,已完成/30213,待客户还款/30217,已取消/30212,还款中/30216 + */ +export const supplierOrderStatusEnum = { + WAIT_CLIENT_CONFIRM: 30202, + WAIT_SUPPLIER_CONFIRM: 30205, + WAIT_DELIVERY: 30106, + RECEIVED: 30107, + WAIT_CLIENT_LOAN: 30207, + PAYING: 30208, + WAIT_CLIENT_PAY: 30214, + PAY_FAIL: 30211, + FINISHED: 30213, + WAIT_CLIENT_REPAY: 30217, + REPAYING: 30216, + CANCELED: 30212 +} +/** + * 供应商订单状态 待客户确认订单/30202,待供应商确认订单/30205,待发货/30106,已发货/30107 ,待客户借款/30207,支付中/30208,待客户支付/30214,付款失败/30211,已完成/30213,待客户还款/30217,已取消/30212,还款中/30216 + */ +export const supplierOrderStatusMap = { + [supplierOrderStatusEnum.WAIT_CLIENT_CONFIRM]: '待客户确认', + [supplierOrderStatusEnum.WAIT_SUPPLIER_CONFIRM]: '待确认', + [supplierOrderStatusEnum.WAIT_DELIVERY]: '待发货', + [supplierOrderStatusEnum.RECEIVED]: '已发货', + [supplierOrderStatusEnum.WAIT_CLIENT_LOAN]: '待借款', + [supplierOrderStatusEnum.PAYING]: '支付中', + [supplierOrderStatusEnum.WAIT_CLIENT_PAY]: '待支付', + [supplierOrderStatusEnum.PAY_FAIL]: '付款失败', + [supplierOrderStatusEnum.FINISHED]: '已完成', + [supplierOrderStatusEnum.WAIT_CLIENT_REPAY]: '待还款', + [supplierOrderStatusEnum.REPAYING]: '还款中', + [supplierOrderStatusEnum.CANCELED]: '已取消' +} diff --git a/pages.json b/pages.json index d2cf09c..37c7963 100644 --- a/pages.json +++ b/pages.json @@ -82,6 +82,14 @@ "navigationStyle": "custom" } }, + { + "path": "pages/order-detail/index", + "style": { + "navigationBarTitleText": "订单详情", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, { "path": "pages/setting/index", "style": { @@ -241,18 +249,16 @@ "navigationStyle": "custom", "enablePullDownRefresh": false } + }, + { + "path": "pages/platform-message-info/index", + "style": { + "navigationBarTitleText": "平台公告详情", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } } - ,{ - "path" : "pages/platform-message-info/index", - "style" : - { - "navigationBarTitleText": "平台公告详情", - "navigationStyle": "custom", - "enablePullDownRefresh": false - } - - } - ], + ], "globalStyle": { "navigationBarTextStyle": "black", "navigationBarTitleText": "uni-app", diff --git a/pages/order-detail/index.vue b/pages/order-detail/index.vue new file mode 100644 index 0000000..4899c6b --- /dev/null +++ b/pages/order-detail/index.vue @@ -0,0 +1,463 @@ + + + + + diff --git a/pages/trade/orderList.vue b/pages/trade/orderList.vue index e4880fc..0fbe729 100644 --- a/pages/trade/orderList.vue +++ b/pages/trade/orderList.vue @@ -6,26 +6,28 @@ @clickItem="onClickItem" styleType="text" activeColor="#007AFF" - > + style="border-bottom: 2rpx solid #dddddd" + > + > + - + - + {{ item.customerEnterpriseName }} {{ item.orderId }} - - {{ item.status | statusFilter }} + + {{ supplierOrderStatusMap[item.status] }} {{ item.createTime }} - + - - - + + - + {{ subItem.productName }} {{ subItem.categoryName }}/{{ subItem.brandName }}/{{ item.gramWeight }}g/{{ subItem.length }}*{{ subItem.width }}/{{ subItem.pieceQuantity }}张 @@ -33,16 +35,16 @@ - + - 交货时间: - {{ item.deliveryLeadtime }} + 交货时间: + {{ item.deliveryLeadtime }} ¥{{ item.totalOfferPrice }} - + @@ -50,64 +52,21 @@ @@ -340,7 +347,7 @@ export default { z-index: 9999; right: 32rpx; bottom: 122rpx; - background-color: #007AFF; + background-color: #007aff; border-radius: 50%; padding: 10rpx; text-align: center; diff --git a/pages/mall/no-data.vue b/pages/mall/no-data.vue new file mode 100644 index 0000000..a22858c --- /dev/null +++ b/pages/mall/no-data.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/pages/switching-mall/index.vue b/pages/switching-mall/index.vue index 832acac..e9cbd37 100644 --- a/pages/switching-mall/index.vue +++ b/pages/switching-mall/index.vue @@ -7,17 +7,17 @@ - + - 东莞市隆兴纸业有限公司 + {{item.name}} 全部商品39 - + @@ -27,17 +27,29 @@