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 @@