diff --git a/apis/orderApi.js b/apis/orderApi.js index 1cf50be..dab60fe 100644 --- a/apis/orderApi.js +++ b/apis/orderApi.js @@ -48,3 +48,15 @@ export const submitClientOrder = (data) => { data }) } + +/** + * 获取客户订单详情 + * @param {object} data customerOrderId + * @returns {Promise} + */ +export const getClientOrderInfo = (data) => { + return http.get({ + url: '/base-paper-trading/get/customer/order/details', + data + }) +} diff --git a/common/css/reset.scss b/common/css/reset.scss index 1ce1f6c..8aabfea 100644 --- a/common/css/reset.scss +++ b/common/css/reset.scss @@ -45,3 +45,154 @@ button::after { clear: both; visibility: hidden; } + +.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 1c06a7f..b13be86 100644 --- a/enums/index.js +++ b/enums/index.js @@ -176,18 +176,35 @@ export const supplierOrderStatusEnum = { REPAYING: 30216, CANCELED: 30212 } - +/** + * 供应商订单状态 待客户确认订单/30202,待供应商确认订单/30205,待发货/30106,已发货/30107 已发货在H5客户端显示 待收货/30107 ,待客户借款/30207,支付中/30208,待客户支付/30214,付款失败/30211,已完成/30213,待客户还款/30217,已取消/30212,还款中/30216 + */ export const supplierOrderStatusMap = { [supplierOrderStatusEnum.WAIT_CLIENT_CONFIRM]: '待客户确认', [supplierOrderStatusEnum.WAIT_SUPPLIER_CONFIRM]: '待供应商确认', [supplierOrderStatusEnum.WAIT_DELIVERY]: '待发货', [supplierOrderStatusEnum.WAIT_RECEIVE]: '待收货', - [supplierOrderStatusEnum.WAIT_CLIENT_LOAN]: '待客户借款', + [supplierOrderStatusEnum.WAIT_CLIENT_LOAN]: '待借款', [supplierOrderStatusEnum.PAYING]: '支付中', - [supplierOrderStatusEnum.WAIT_CLIENT_PAY]: '待客户支付', + [supplierOrderStatusEnum.WAIT_CLIENT_PAY]: '待支付', [supplierOrderStatusEnum.PAY_FAIL]: '付款失败', [supplierOrderStatusEnum.FINISHED]: '已完成', - [supplierOrderStatusEnum.WAIT_CLIENT_REPAY]: '待客户还款', + [supplierOrderStatusEnum.WAIT_CLIENT_REPAY]: '待还款', [supplierOrderStatusEnum.REPAYING]: '还款中', [supplierOrderStatusEnum.CANCELED]: '已取消' } + +/** + * 支付方式 1:微信支付 2:月结支付 4:飞算支付 + */ +export const paymentMethodEnum = { + WECHAT_PAY: 1, + MONTHLY_PAY: 2, + FLY_PAY: 4 +} + +export const paymentMethodMap = { + [paymentMethodEnum.WECHAT_PAY]: '微信支付', + [paymentMethodEnum.MONTHLY_PAY]: '月结支付', + [paymentMethodEnum.FLY_PAY]: '飞算支付' +} diff --git a/pages/enterprise-info/index.vue b/pages/enterprise-info/index.vue index 46e3b25..c5f20a3 100644 --- a/pages/enterprise-info/index.vue +++ b/pages/enterprise-info/index.vue @@ -281,7 +281,7 @@ export default { } else { uni.showToast({ title: '暂无定位公司', - icon: 'warn' + icon: 'error' }) } }) diff --git a/pages/mine/index.vue b/pages/mine/index.vue index 0e00aa5..491105f 100644 --- a/pages/mine/index.vue +++ b/pages/mine/index.vue @@ -110,6 +110,7 @@ test + order-detail enterprise-info diff --git a/pages/order-detail/index.vue b/pages/order-detail/index.vue index a464a99..290c9d4 100644 --- a/pages/order-detail/index.vue +++ b/pages/order-detail/index.vue @@ -1,20 +1,394 @@ - + diff --git a/pages/order-make/index.vue b/pages/order-make/index.vue index 707543b..ec89431 100644 --- a/pages/order-make/index.vue +++ b/pages/order-make/index.vue @@ -3,7 +3,7 @@ - + {{ orderInfo.customerEnterpriseName }} @@ -82,12 +82,15 @@ 剩余额度: {{ payMap['month'].availableCreditLine }} - 待申请 + 待申请 + + 余额不足 + @@ -96,12 +99,15 @@ 剩余额度: {{ payMap['fs'].availableCreditLine }} - 待申请 + 待申请 + + 余额不足 + @@ -130,7 +136,7 @@ export default { receivedTime: null }, deliveryAddress: {}, - currentPayType: '', + currentPayType: null, payMap: { month: { availableCreditLine: 0, @@ -140,7 +146,8 @@ export default { availableCreditLine: 0, value: 4 } - } + }, + loading: false } }, onLoad(option) { @@ -155,7 +162,7 @@ export default { } else { uni.showToast({ title: '订单信息错误', - icon: 'warn', + icon: 'error', success: () => { setTimeout(() => { back() @@ -188,6 +195,10 @@ export default { }) return } + if (this.loading) { + return + } + this.loading = true let itemsRemarkList = [] // 拼接订单信息 for (let i = 0; i < this.orderInfo.supplierOrder.length; i++) { @@ -202,6 +213,22 @@ export default { paymentMethod: this.payMap[this.currentPayType].value, receivedTime: this.orderInfo.receivedTime }) + .then((res) => { + if (res) { + uni.showToast({ + title: '前往签约', + icon: 'success', + success: () => { + setTimeout(() => { + window.location.href = res.signUrl + }, 1000) + } + }) + } + }) + .finally(() => { + this.loading = false + }) }, init() { // 获取月结额度 diff --git a/pages/test/index.vue b/pages/test/index.vue index 59556a1..ebd908a 100644 --- a/pages/test/index.vue +++ b/pages/test/index.vue @@ -24,7 +24,7 @@ export default { }) }, getDetail() { - getPaperDetail({ productId: '678972506887032832' }) + getPaperDetail({ productId: '680401985190629376' }) }, purchase() { let form = { @@ -35,7 +35,7 @@ export default { length: 1000, mallSupplierId: '678289470268772352', pieceQuantity: 10000, - productId: '678972506887032832', + productId: '680401985190629376', productSkuId: '678972507222577152', unitPrice: 10000, width: 1000 diff --git a/static/imgs/order/customer-default.png b/static/imgs/order/customer-default.png new file mode 100644 index 0000000..d7cf3f9 Binary files /dev/null and b/static/imgs/order/customer-default.png differ diff --git a/static/imgs/order/location-icon.png b/static/imgs/order/location-icon.png new file mode 100644 index 0000000..750b4f0 Binary files /dev/null and b/static/imgs/order/location-icon.png differ diff --git a/static/imgs/order/status-icon.png b/static/imgs/order/status-icon.png new file mode 100644 index 0000000..ca39c60 Binary files /dev/null and b/static/imgs/order/status-icon.png differ