Explorar o código

feat:订单管理

storeBelieveInLight hai 1 ano
pai
achega
54bc4fb747

+ 20 - 3
shop/commodity/components/fillLogisticsInfo.vue

@@ -18,26 +18,43 @@
18 18
 				物流公司
19 19
 			</view>
20 20
 			<view class="form_item--right">
21
-				<view class="upop">
22
-					<view class="title xcv">请选择物流公司</view>
21
+				<view class="upop" @click="handleSelect">
22
+					<view class="title xcv">{{logistics}}</view>
23 23
 					<image src="/static/images/new_ui/arrow-right.png" mode=""></image>
24 24
 				</view>
25 25
 			</view>
26 26
 			</view>
27 27
 		 </view>
28
+		 <popupSelectVue ref="popup" :value.sync="logisticsValue" @tabs="handleClick"/>
28 29
 	</view>
29 30
 </template>
30 31
 
31 32
 <script>
33
+	import popupSelectVue from './popupSelect.vue';
32 34
 	export default {
35
+		components:{popupSelectVue},
33 36
 		data() {
34 37
 			return {
35
-				
38
+				logisticsValue:"",//物流
39
+				logisticsLabel:""
36 40
 			}
37 41
 		},
38 42
 		methods: {
39 43
 			handleQrcode(){
40 44
 				console.log("")
45
+			},
46
+			handleSelect(){
47
+				this.$refs.popup.open()
48
+			},
49
+			handleClick({selected,item,index}){
50
+				this.logisticsValue = selected
51
+				this.logisticsLabel = item.text
52
+				console.log(selected,item,index)
53
+			}
54
+		},
55
+		computed:{
56
+			logistics(){
57
+				return this.logisticsLabel || "请选择物流公司"
41 58
 			}
42 59
 		}
43 60
 	}

+ 1 - 0
shop/commodity/components/orderDetailSendCard.vue

@@ -108,6 +108,7 @@
108 108
      }
109 109
 	 .detail-send-order-content-middle{
110 110
 		 height: 100%;
111
+		 flex: 1;
111 112
 		 &-top{
112 113
 		 	width: 100%;
113 114
 		 	font-weight: 400;

+ 8 - 6
shop/commodity/components/orderList/orderListCard.vue

@@ -261,7 +261,7 @@
261 261
 		}
262 262
 	.order-list-content-middle{
263 263
 		height: 100%;
264
-		width: calc(100% - 158rpx - 23.6%);
264
+		flex: 1;
265 265
 		
266 266
 		&-top{
267 267
 			// width:100%;
@@ -271,13 +271,15 @@
271 271
 			font-size: 28rpx;
272 272
 			color: #333333;
273 273
 			text-align: left;
274
-			overflow: hidden;
275
-            white-space: nowrap;
276
-			text-overflow: ellipsis;
277
-			line-height: 28rpx;
278
-			padding-bottom: 10rpx;
274
+		display: -webkit-box;
275
+		-webkit-box-orient: vertical;
276
+		-webkit-line-clamp: 1;
277
+		overflow: hidden;
278
+			line-height: 80rpx;
279
+			
279 280
 		}
280 281
 		&-top-bot{
282
+			padding-top: 10rpx;
281 283
 			font-family: PingFangSC, PingFang SC;
282 284
 			font-weight: 400;
283 285
 			font-size: 22rpx;

+ 183 - 0
shop/commodity/components/popupSelect.vue

@@ -0,0 +1,183 @@
1
+<template>
2
+  <uni-popup ref="popup" type="center" :animation="true" :mask-click="false">
3
+    <view class="popup_data">
4
+      <view class="popup_data__headers">
5
+        <view class="popup_data__headers--title">{{ title }}</view>
6
+        <uni-icons
7
+          type="closeempty"
8
+          class="custom_icons"
9
+          size="30"
10
+          @click="handleClose"
11
+        ></uni-icons>
12
+      </view>
13
+
14
+      <view class="popup_data__content">
15
+        <view
16
+          v-for="(item, index) in selectData"
17
+          :key="index + '_index_'"
18
+          class="popup_data__content--list"
19
+          @click="handleTabs(item, index)"
20
+        >
21
+          <view class="popup_data__content--item">
22
+            <uni-icons
23
+              type="checkmarkempty"
24
+			  :class="['_select_icons',(index ===selectId || selectId === item.value) ?'isActive':'']"
25
+              size="25"
26
+            ></uni-icons>
27
+            <view  :class="['popup_data__content--item__title',(index === selectId || selectId === item.value) ?'isActive':'']">
28
+              {{
29
+                item.text
30
+              }}
31
+            </view>
32
+          </view>
33
+        </view>
34
+      </view>
35
+    </view>
36
+  </uni-popup>
37
+</template>
38
+
39
+<script>
40
+export default {
41
+  props: {
42
+    title: {
43
+      type: String,
44
+      default: "物流公司信息",
45
+    },
46
+    value: {
47
+      type: [String, Number],
48
+      default: "",
49
+    },
50
+	defaultProps:{
51
+		type:Object,
52
+		default:()=>{
53
+			return {
54
+				props:"text",
55
+				value:"value"
56
+			}
57
+		}
58
+	},
59
+	selectData:{
60
+		type:Array,
61
+		default:()=>{
62
+			return [
63
+  { value: 0, text: "顺丰速运", code: "SF" },
64
+  { value: 1, text: "中通快递", code: "ZTO" },
65
+  { value: 2, text: "韵达快递", code: "YUNDA" },
66
+  { value: 3, text: "申通快递", code: "STO" },
67
+  { value: 4, text: "EMS邮政", code: "EMS" },
68
+  { value: 5, text: "圆通速递", code: "YTO" },
69
+  { value: 6, text: "DHL国际", code: "DHL" },
70
+  { value: 7, text: "京东物流", code: "JD" },
71
+  { value: 8, text: "FedEx联邦", code: "FDX" },
72
+  { value: 9, text: "UPS联合包裹", code: "UPS" },
73
+  { value: 10, text: "德邦快递", code: "DEPPON" },
74
+  { value: 11, text: "百世快递", code: "BEST" },
75
+  { value: 12, text: "极兔速递", code: "J&T" },
76
+  { value: 13, text: "TNT快递", code: "TNT" },
77
+  { value: 14, text: "跨越速运", code: "KYE" }
78
+]
79
+		}
80
+	}
81
+  },
82
+  data() {
83
+    return {
84
+      selectId: ""
85
+    };
86
+  },
87
+  watch: {
88
+    value: {
89
+      handler(val) {
90
+        this.selectId = val;
91
+      },
92
+	  immediate:true
93
+    },
94
+  },
95
+  mounted() {
96
+    this.selectId = this.value;
97
+  },
98
+  methods: {
99
+    handleTabs(item, index) {
100
+		const data = item.value || index
101
+		if(this.selectId === data){
102
+			this.selectId = ""
103
+		}else{
104
+			this.selectId = item.value || index
105
+		}
106
+		this.$emit("update:value",this.selectId)
107
+		console.log(this.selectId,"this.selectId")
108
+		const itemObj = this.selectId?item:{}
109
+		this.$emit("tabs",{selected:this.selectId,item:itemObj,index})
110
+		this.handleClose()
111
+		
112
+	},
113
+    handleClose() {
114
+      this.close();
115
+    },
116
+    open(type = "bottom") {
117
+      this.$refs.popup.open(type);
118
+    },
119
+    close() {
120
+      this.$refs.popup.close();
121
+    },
122
+  },
123
+};
124
+</script>
125
+
126
+<style lang="scss">
127
+.popup_data {
128
+  padding: 26rpx 30rpx;
129
+  min-height: 550rpx;
130
+  max-height: 650rpx;
131
+  box-sizing: border-box;
132
+  overflow: hidden;
133
+  background: linear-gradient(180deg, #e5edff 0%, #ffffff 100%);
134
+  border-radius: 24rpx 24rpx 0 0;
135
+  &__headers {
136
+    // height: 40rpx;
137
+    display: flex;
138
+    justify-content: space-between;
139
+    align-items: center;
140
+    border-bottom: 2rpx solid #e5e5e5;
141
+    padding-bottom: 15rpx;
142
+    &--title {
143
+      flex: 1;
144
+      display: -webkit-box;
145
+      -webkit-box-orient: vertical;
146
+      -webkit-line-clamp: 1;
147
+      overflow: hidden;
148
+      justify-content: space-between;
149
+      padding-right: 60rpx;
150
+      font-size: 32rpx;
151
+      font-weight: 600;
152
+    }
153
+    .custom_icons {
154
+      flex-shrink: 0;
155
+    }
156
+  }
157
+  &__content {
158
+    max-height: 540rpx;
159
+    overflow-y: auto;
160
+    &--list {
161
+      user-select: none;
162
+	  border-bottom: 2rpx solid #e5e5e5;
163
+	  &:last-child{
164
+	  		  border-bottom:none;
165
+	  }
166
+    }
167
+    &--item {
168
+      display: flex;
169
+      gap: 20rpx;
170
+      padding: 20rpx 0;
171
+     
172
+      ._select_icons {
173
+        color: #eee !important;
174
+      }
175
+      &__title {
176
+      }
177
+    }
178
+    .isActive {
179
+      color: #007aff !important;
180
+    }
181
+  }
182
+}
183
+</style>

+ 7 - 6
shop/commodity/components/search/search.vue

@@ -42,15 +42,15 @@
42 42
 		  width: 32rpx;
43 43
 		  height: 32rpx;
44 44
 		  left:40rpx;
45
-		  top:28rpx;
45
+		  top:18rpx;
46 46
 	}
47 47
 	.search__input{
48 48
 		border:2rpx solid #000;
49 49
 		flex:1;
50
-		height: 80rpx;
50
+		height: 60rpx;
51 51
 		margin-left:26rpx;
52 52
 		padding: 0 120rpx 0 55rpx;
53
-		border-radius: 40rpx 0 0 40rpx;
53
+		border-radius: 30rpx;
54 54
 		margin-right: 20rpx;
55 55
 		border: none;
56 56
 			background: #F8F8F8;
@@ -74,12 +74,13 @@
74 74
 		position: absolute;
75 75
 		right:20rpx;
76 76
 		width: 108rpx;
77
+		height: 60rpx;
78
+		white-space: nowrap;
77 79
 		 background-color: rgba(31, 124, 255, 1);
78
-		  border-radius: 30px;
79
-		   overflow-wrap: break-word;
80
+		border-radius: 30rpx;
80 81
 		   text-align: center;
81 82
 		    font-size: 28rpx;
82
-			 line-height: 40px;
83
+			 line-height:60rpx;
83 84
 			 color: rgba(255, 255, 255, 1);
84 85
 			 
85 86
 	}

+ 1 - 0
shop/commodity/components/shipmentGoodsCard.vue

@@ -5,6 +5,7 @@
5 5
 	   <view class="card-wrapper__address">
6 6
 		   北京市通州区经开壹中心14号楼9层北京市通州区经开壹中心14号楼9层
7 7
 	   </view>
8
+	   
8 9
 	   <view class="card-wrapper__user">
9 10
 		   <view class="card-wrapper__user--info">
10 11
 		   	<view class="">

+ 6 - 6
shop/commodity/order.vue

@@ -253,19 +253,19 @@
253 253
 			left: 0;
254 254
 			z-index: 111;
255 255
 			width: 100%;
256
-			height: 176rpx;
256
+			// height: 176rpx;
257 257
 			background: #FFFFFF;
258 258
 			display: flex;
259
-			// justify-content: center;
260 259
 			padding-left:20rpx;
261
-
260
+            white-space: nowrap;
262 261
 			.order-header-text {
263 262
 				width: 686rpx;
264 263
 				font-size: 36rpx;
265 264
 				font-weight: 500;
266 265
 				color: #333333;
267 266
 				display: flex;
268
-				margin-top: 107rpx;
267
+				// margin-top: 107rpx;
268
+				padding:30rpx 0 20rpx;
269 269
 				align-items: center;
270 270
 
271 271
 				.order-header-text-neishi {
@@ -296,7 +296,7 @@
296 296
 			align-items: center;
297 297
 		}
298 298
 		.order-list-filter-wrapper{
299
-			margin: 176rpx 0rpx 0rpx;
299
+			margin: 96rpx 0rpx 0rpx;
300 300
 			width: 100%;
301 301
 			position: fixed;
302 302
 			top:0rpx;
@@ -320,7 +320,7 @@
320 320
 			display: flex;
321 321
 			flex-direction: column;
322 322
 			align-items: center;
323
-			margin-top: 415rpx;
323
+			margin-top: 340rpx;
324 324
             .order-list__card{
325 325
 				width: calc(100% - 40rpx);
326 326
 				margin:0 20rpx 26rpx;

+ 7 - 6
shop/commodity/sendoutgoods.vue

@@ -16,7 +16,7 @@
16 16
 		<view class="order-send-out-goods__content">
17 17
 			<shipmentGoodsCardVue />
18 18
 			<orderDetailSendCardVue class="custom_class"/>
19
-			<fillLogisticsInfoVue class="custom_class"/>
19
+			<fillLogisticsInfoVue class="custom_class" />
20 20
 			<view class="btn-box">
21 21
 			  <button type="primary" class="send-goods">发货</button>
22 22
 			</view>
@@ -71,19 +71,20 @@
71 71
 			left: 0;
72 72
 			z-index: 111;
73 73
 			width: 100%;
74
-			height: 176rpx;
74
+			// height: 176rpx;
75 75
 			background: #FFFFFF;
76 76
 			display: flex;
77 77
 			// justify-content: center;
78
-			padding-left:20rpx;
79
-		
78
+			// padding-left:20rpx;
79
+		    white-space: nowrap;
80 80
 			&-text {
81 81
 				width: 686rpx;
82 82
 				font-size: 36rpx;
83 83
 				font-weight: 500;
84 84
 				color: #333333;
85 85
 				display: flex;
86
-				margin-top: 107rpx;
86
+				// margin-top: 107rpx;
87
+				padding:30rpx 0 20rpx;
87 88
 				align-items: center;
88 89
 		
89 90
 				&-neishi {
@@ -108,7 +109,7 @@
108 109
 	
109 110
 	&__content{
110 111
 		width: 100%;
111
-		margin: 190rpx 0 50rpx;
112
+		margin: 130rpx 0 50rpx;
112 113
 		.btn-box{
113 114
 			width: 100%;
114 115
 			position: fixed;