From eff4ed30e55a00c21bc82ab939f3b17517d6e719 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?TOP=E7=B3=AF=E7=B1=B3?= <1130395124@qq.com>
Date: Fri, 3 Mar 2023 14:48:01 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E8=AE=A2=E5=8D=95=E5=88=97?=
=?UTF-8?q?=E8=A1=A8=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/order/action.vue | 14 +--
src/components/order/item.vue | 39 +++++--
src/core/models/order.js | 24 ++++
src/pages/order/order.vue | 190 ++++++++++++++++++++++++++------
4 files changed, 219 insertions(+), 48 deletions(-)
diff --git a/src/components/order/action.vue b/src/components/order/action.vue
index 289843a..2045643 100644
--- a/src/components/order/action.vue
+++ b/src/components/order/action.vue
@@ -3,8 +3,11 @@
立即抢单
-
- 立即报价
+
+ 尾款确认
+
+
+ 取消报价
已完成
@@ -37,11 +40,8 @@ export default {
mounted() {},
destroyed() {},
methods: {
- getOrder() {
- console.log("获取" + this.order.id);
- },
- postPrice() {
- this.$emit("postPrice");
+ setPrice() {
+ this.$emit("setPrice");
},
},
};
diff --git a/src/components/order/item.vue b/src/components/order/item.vue
index 45058c3..abfb046 100644
--- a/src/components/order/item.vue
+++ b/src/components/order/item.vue
@@ -1,7 +1,12 @@
- {{ order.username }}-{{ order.cate }}
+
+
+ {{ models.order.getOrderTypeText(order.orderType) }}
+
+ {{ order.username }}-{{ order.cate }}
+
详情
@@ -42,7 +47,9 @@
export default {
name: "component-order-item",
data() {
- return {};
+ return {
+ models: this.$models,
+ };
},
props: {
order: {
@@ -75,18 +82,32 @@ export default {
align-items: center;
justify-content: space-between;
padding-top: 40rpx;
- .title {
+ }
+ .order-title {
+ display: flex;
+ align-items: center;
+ .type {
+ display: inline-block;
+ box-sizing: border-box;
+ padding: 9rpx 24rpx;
+ border-radius: 10rpx;
+ font-size: 24rpx;
+ color: #ffffff;
+ line-height: 24rpx;
+ margin-right: 22rpx;
+ }
+ .text {
font-size: 30rpx;
font-weight: bold;
color: #000000;
line-height: 30rpx;
}
- .more {
- font-size: 26rpx;
- font-weight: bold;
- color: #666666;
- line-height: 32rpx;
- }
+ }
+ .more {
+ font-size: 26rpx;
+ font-weight: bold;
+ color: #666666;
+ line-height: 32rpx;
}
.order-body {
width: 100%;
diff --git a/src/core/models/order.js b/src/core/models/order.js
index f887ad5..e52d360 100644
--- a/src/core/models/order.js
+++ b/src/core/models/order.js
@@ -26,6 +26,30 @@ export default {
// 无法退款
CAN_NOT_REFUND: 8,
},
+ getOrderTypeColor(type) {
+ switch (type) {
+ case this.type.NORMAL:
+ return '#0ec4ad';
+ case this.state.WORKER_PRICE:
+ return '#0ec4ad';
+ case this.state.CUSTOM_PRICE:
+ return '#0ec4ad';
+ default:
+ return '#ff0000';
+ }
+ },
+ getOrderTypeText(type) {
+ switch (type) {
+ case this.type.NORMAL:
+ return '一口价';
+ case this.state.WORKER_PRICE:
+ return '报价';
+ case this.state.CUSTOM_PRICE:
+ return '议价';
+ default:
+ return '未知';
+ }
+ },
getOrderStateTextColor(state) {
switch (state) {
case this.state.NO_PAY:
diff --git a/src/pages/order/order.vue b/src/pages/order/order.vue
index 501c3fb..85cf261 100644
--- a/src/pages/order/order.vue
+++ b/src/pages/order/order.vue
@@ -1,20 +1,31 @@
-
-
-
-
- {{ item.name }}
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
-
-
+
+
@@ -24,7 +35,7 @@
¥ 306.00
-
+
@@ -36,6 +47,28 @@
+
+
+
+ 费用增加
+
+
+
+ 元
+
+
+
+ 1)添加后,请客户在小程序订单中支付尾款
+ 2)没有尾款的话,请直接点击确认提交
+
+ 确认添加
+
+
@@ -44,12 +77,13 @@ import AppLayout from "@/components/layout/layout";
import OrderItem from "@/components/order/item";
import OrderAction from "@/components/order/action";
import LoadMore from "@/components/widgets/loadmore";
+import WidgetModal from "@/components/widgets/modal";
export default {
name: "get-index",
data() {
return {
utils: this.$utils,
- postModal: false,
+ priceModal: false,
safePt: 0,
tabIndex: 0,
tabHeight: 0,
@@ -130,6 +164,11 @@ export default {
list: [],
},
],
+ currentOrder: {
+ id: 0,
+ price: 0,
+ },
+ keywords: "",
};
},
components: {
@@ -137,6 +176,7 @@ export default {
OrderItem,
OrderAction,
LoadMore,
+ WidgetModal,
},
onLoad() {
this.$nextTick(() => {
@@ -166,6 +206,14 @@ export default {
}
});
},
+ showPriceModal(id) {
+ this.currentOrder.id = id;
+ this.priceModal = true;
+ },
+ setPrice() {
+ console.log(this.currentOrder);
+ this.priceModal = false;
+ },
},
};
@@ -175,30 +223,56 @@ export default {
width: 100%;
padding-bottom: 50rpx;
}
-.scroll-cate {
+.fixed-box {
z-index: 15;
position: fixed;
top: 0;
left: 0;
width: 100%;
- background-color: #f7a134;
+ background-color: #f6f6f6;
}
-.cate-group {
- width: 100%;
- height: 96rpx;
- white-space: nowrap;
+.search-order {
+ display: flex;
+ align-items: center;
+ width: 670rpx;
+ height: 66rpx;
+ margin: 0 auto 20rpx auto;
box-sizing: border-box;
- padding: 5rpx 0;
- .cate-item {
- display: inline-block;
- height: 86rpx;
- line-height: 86rpx;
- margin: 0 20rpx;
- color: #ffffff;
+ padding: 20rpx;
+ background-color: #ffffff;
+ border-radius: 10rpx;
+ .iconfont {
+ display: block;
+ flex-shrink: 0;
+ margin-right: 20rpx;
+ font-size: 28rpx;
}
- .cate-item.active {
+ .input {
+ width: 100%;
+ font-size: 24rpx;
+ color: #bebebe;
+ }
+}
+.scroll-box {
+ width: 100%;
+ background-color: #f7a134;
+ .cate-group {
+ width: 100%;
+ height: 96rpx;
+ white-space: nowrap;
box-sizing: border-box;
- border-bottom: 7rpx solid #ffffff;
+ padding: 5rpx 0;
+ .cate-item {
+ display: inline-block;
+ height: 86rpx;
+ line-height: 86rpx;
+ margin: 0 20rpx;
+ color: #ffffff;
+ }
+ .cate-item.active {
+ box-sizing: border-box;
+ border-bottom: 7rpx solid #ffffff;
+ }
}
}
.order-group {
@@ -206,9 +280,9 @@ export default {
position: relative;
width: 100%;
box-sizing: border-box;
- padding-top: 122rpx;
+ padding-top: 202rpx;
.order-item-box {
- margin-bottom: 26rpx;
+ margin-bottom: 20rpx;
background-color: #ffffff;
box-sizing: border-box;
padding: 0 40rpx;
@@ -231,4 +305,56 @@ export default {
padding: 20rpx 0;
}
}
+.modal-content {
+ width: 100%;
+ .input-row {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 40rpx 0;
+ border-bottom: 4rpx solid #f5f5f5;
+ .title {
+ font-size: 28rpx;
+ color: #666666;
+ }
+ .input {
+ width: 308rpx;
+ height: 72rpx;
+ box-sizing: border-box;
+ border: 1px solid #d8d8d8;
+ text-align: center;
+ }
+ .unit {
+ color: #333333;
+ }
+ .iconfont {
+ display: inline-block;
+ font-size: 30rpx;
+ margin-right: 22rpx;
+ }
+ .text {
+ font-size: 28rpx;
+ }
+ }
+ .desc {
+ padding: 24rpx 0;
+ .text {
+ display: block;
+ font-size: 24rpx;
+ color: #999999;
+ line-height: 36rpx;
+ }
+ }
+ .btn {
+ width: 100%;
+ height: 68rpx;
+ line-height: 68rpx;
+ text-align: center;
+ font-size: 32rpx;
+ color: #ffffff;
+ background-color: #7286f1;
+ margin-top: 15rpx;
+ }
+}
\ No newline at end of file