浏览代码

feat:新增自提页面详情

storeBelieveInLight 1 年之前
父节点
当前提交
95de5c4b02

+ 129 - 122
shop/commodity/components/fillLogisticsInfo.vue

@@ -1,133 +1,140 @@
1 1
 <template>
2
-	<view class="logistics-information">
3
-		 <view class="logistics-information__text">填写物流信息</view>
4
-		 <view class="logistics-information__form">
5
-		 	<view class="form_item">
6
-				<view class="form_item--left">
7
-					物流单号
8
-				</view>
9
-				<view class="form_item--right">
10
-					<view class="upop">
11
-						<input type="text" class="title upop_input" placeholder="请手动输入或扫描二维码"/>
12
-						<image src="/static/images/new_ui/qcode.png" mode="" class="image-box" @click="handleQrcode"></image>
13
-					</view>
14
-				</view>
15
-			</view>
16
-		 	<view class="form_item">
17
-			<view class="form_item--left">
18
-				物流公司
19
-			</view>
20
-			<view class="form_item--right">
21
-				<view class="upop" @click="handleSelect">
22
-					<view class="title xcv">{{logistics}}</view>
23
-					<image src="/static/images/new_ui/arrow-right.png" mode=""></image>
24
-				</view>
25
-			</view>
26
-			</view>
27
-		 </view>
28
-		 <popupSelectVue ref="popup" :value.sync="logisticsValue" @tabs="handleClick"/>
29
-	</view>
2
+  <view class="logistics-information">
3
+    <view class="logistics-information__text">填写物流信息</view>
4
+    <view class="logistics-information__form">
5
+	  <reInputItemVue 
6
+	  placeholder="请手动输入或扫描二维码"
7
+	   name="物流单号"
8
+	   @change="changeInput"
9
+	   >
10
+		  <image
11
+		    slot="next"
12
+		    src="/static/images/new_ui/qcode.png"
13
+		    mode=""
14
+		    class="image-box"
15
+		    @click="handleQrcode"
16
+		  ></image>
17
+	  </reInputItemVue>
18
+      <view class="form_item">
19
+        <view class="form_item--left"> 物流公司 </view>
20
+        <view class="form_item--right">
21
+          <view class="upop" @click="handleSelect">
22
+            <view class="title xcv">{{ logistics }}</view>
23
+            <image src="/static/images/new_ui/arrow-right.png" mode=""></image>
24
+          </view>
25
+        </view>
26
+      </view>
27
+    </view>
28
+    <popupSelectVue
29
+      ref="popup"
30
+      :value.sync="logisticsValue"
31
+      @tabs="handleClick"
32
+    />
33
+  </view>
30 34
 </template>
31 35
 
32 36
 <script>
33
-	import popupSelectVue from './popupSelect.vue';
34
-	export default {
35
-		components:{popupSelectVue},
36
-		data() {
37
-			return {
38
-				logisticsValue:"",//物流
39
-				logisticsLabel:""
40
-			}
41
-		},
42
-		methods: {
43
-			handleQrcode(){
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 || "请选择物流公司"
58
-			}
59
-		}
60
-	}
37
+import popupSelectVue from "./popupSelect.vue";
38
+import reInputItemVue from "./reInputItem/reInputItem.vue";
39
+export default {
40
+  components: { popupSelectVue ,reInputItemVue},
41
+  data() {
42
+    return {
43
+      logisticsValue: "", //物流
44
+      logisticsLabel: "",
45
+    };
46
+  },
47
+  methods: {
48
+    handleQrcode() {
49
+      console.log("handleQrcode");
50
+    },
51
+	changeInput(val){
52
+		console.log(val,"物流单号")
53
+	},
54
+    handleSelect() {
55
+      this.$refs.popup.open();
56
+    },
57
+    handleClick({ selected, item, index }) {
58
+      this.logisticsValue = selected;
59
+      this.logisticsLabel = item.text;
60
+      console.log(selected, item, index);
61
+    },
62
+  },
63
+  computed: {
64
+    logistics() {
65
+      return this.logisticsLabel || "请选择物流公司";
66
+    },
67
+  },
68
+};
61 69
 </script>
62 70
 
63 71
 <style lang="scss" scoped>
64
-.logistics-information{
65
-	background: #FFFFFF;
66
-	 border-radius: 16rpx;
67
-    padding: 26rpx 21rpx 10rpx 32rpx;
68
-	  display: flex;
69
-	  flex-direction: column;
70
-	  &__text{
71
-        font-weight: 500;
72
+.logistics-information {
73
+  background: #ffffff;
74
+  border-radius: 16rpx;
75
+  padding: 26rpx 21rpx 10rpx 32rpx;
76
+  display: flex;
77
+  flex-direction: column;
78
+  &__text {
79
+    font-weight: 500;
80
+    font-size: 30rpx;
81
+    color: #333333;
82
+    margin-bottom: 10rpx;
83
+    user-select: none;
84
+  }
85
+  &__form {
86
+    .form_item {
87
+      display: flex;
88
+      align-items: center;
89
+      justify-content: space-between;
90
+      height: 100rpx;
91
+      border-bottom: 2rpx solid #e5e5e5;
92
+      &--left {
93
+        width: 120rpx;
94
+        font-family: PingFangSC, PingFang SC;
95
+        font-weight: 400;
72 96
         font-size: 30rpx;
73 97
         color: #333333;
74
-	    margin-bottom:10rpx ;
75
-	    user-select: none;
76
-	  }
77
-	  &__form{
78
-		  .form_item{
79
-			  display: flex;
80
-			  align-items: center;
81
-			  justify-content: space-between;
82
-			  height: 100rpx;
83
-			  border-bottom: 2rpx solid  #E5E5E5;
84
-			  &--left{
85
-				  width: 120rpx;
86
-				  font-family: PingFangSC, PingFang SC;
87
-				  font-weight: 400;
88
-				  font-size: 30rpx;
89
-				  color: #333333;
90
-				  line-height: 30rpx;
91
-			  }
92
-			  &--right{
93
-				  flex: 1;
94
-				  padding-left: 50rpx;
95
-				  padding-right: 12rpx;
96
-				  text-align: right;
97
-				  .title{
98
-				  	font-family: PingFangSC, PingFang SC;
99
-				  	 font-weight: 400;
100
-				  	 font-size: 28rpx;
101
-				  	color: #999999;
102
-				  }
103
-				  .upop{
104
-					  display: flex;
105
-					  width:100%;
106
-					  align-items: center;
107
-					  justify-content: flex-end;
108
-					  image{
109
-					  	 width: 30rpx;
110
-					  	height:30rpx;
111
-						margin-left:5rpx;
112
-					  }
113
-					  .image-box{
114
-						  width: 40rpx;
115
-						  height:38rpx;
116
-					  }
117
-				  }
118
-.upop_input{
119
-	padding: 15rpx 10rpx;
120
-	flex: 1;
121
-}
122
-.xcv{
123
-	flex: 1;
124
-}
125
-				  
126
-			  }
127
-			  &:last-child{
128
-				  border-bottom:none;
129
-			  }
130
-		  }
131
-	  }
98
+        line-height: 30rpx;
99
+      }
100
+      &--right {
101
+        flex: 1;
102
+        padding-left: 50rpx;
103
+        padding-right: 12rpx;
104
+        text-align: right;
105
+        .title {
106
+          font-family: PingFangSC, PingFang SC;
107
+          font-weight: 400;
108
+          font-size: 28rpx;
109
+          color: #999999;
110
+        }
111
+        .upop {
112
+          display: flex;
113
+          width: 100%;
114
+          align-items: center;
115
+          justify-content: flex-end;
116
+          image {
117
+            width: 30rpx;
118
+            height: 30rpx;
119
+            margin-left: 5rpx;
120
+          }
121
+          .image-box {
122
+            width: 40rpx;
123
+            height: 38rpx;
124
+          }
125
+        }
126
+        .upop_input {
127
+          padding: 15rpx 10rpx;
128
+          flex: 1;
129
+        }
130
+        .xcv {
131
+          flex: 1;
132
+        }
133
+      }
134
+      &:last-child {
135
+        border-bottom: none;
136
+      }
137
+    }
138
+  }
132 139
 }
133 140
 </style>

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

@@ -77,15 +77,18 @@
77 77
 		 </view>
78 78
 		</view>
79 79
 	   <view class="order-list-btn">
80
-		<view v-if="itemProduct.status=='0'" class="btn-list" @click="handleSendOutGoods">
80
+		<view v-if="itemProduct.status=='0'" class="btn-list" @click="handleSendOutGoods(itemProduct,'sendGoods')">
81 81
 	    	立即发货
82 82
 	    </view>
83
-		<!-- <view  class="btn-list" @click="handleSendOutGoods">
83
+		<view  class="btn-list" @click="handleSendOutGoods(itemProduct,'delivered')">
84 84
 			已送达
85 85
 		</view>
86
-		<view  class="btn-list" @click="handleSendOutGoods">
86
+		<view  class="btn-list" @click="handleSendOutGoods(itemProduct,'logistics')">
87 87
 			查看物流
88
-		</view> -->
88
+		</view>
89
+		<view  class="btn-list" @click="handleSendOutGoods(itemProduct,'pickup')">
90
+			立即自提
91
+		</view>
89 92
 		</view>
90 93
 	</view>
91 94
 </template>
@@ -118,8 +121,8 @@
118 121
 			}
119 122
 		},
120 123
 		methods:{
121
-			handleSendOutGoods(){
122
-				this.$emit("handleSendOutGoods",this.item)
124
+			handleSendOutGoods(item,type){
125
+				this.$emit("handleSendOutGoods",item,type)
123 126
 			},
124 127
 			getDataFormatValue(data,type){
125 128
 				console.log(this.item,"item======item")

+ 101 - 0
shop/commodity/components/reInputItem/reInputItem.vue

@@ -0,0 +1,101 @@
1
+
2
+<template>
3
+  <view class="form_item">
4
+    <view class="form_item--left">
5
+      {{ name }}
6
+    </view>
7
+    <view class="form_item--right">
8
+      <view class="upop">
9
+        <input
10
+          type="text"
11
+           class="title upop_input"
12
+		   v-model="valueData"
13
+          :placeholder="placeholder"
14
+		  @input="changeInput"
15
+        />
16
+		<slot name="next"></slot>
17
+      </view>
18
+    </view>
19
+  </view>
20
+</template>
21
+
22
+<script>
23
+export default {
24
+  props: {
25
+    name: {
26
+      type: String,
27
+      default: "自提码",
28
+    },
29
+    placeholder: {
30
+      type: String,
31
+      default: "请输入自提码",
32
+    },
33
+  },
34
+  data() {
35
+    return {
36
+		valueData:""
37
+	};
38
+  },
39
+  methods:{
40
+	  changeInput(){
41
+		  this.$emit("change",this.valueData)
42
+	  }
43
+  }
44
+};
45
+</script>
46
+
47
+<style lang="scss" scoped>
48
+.form_item {
49
+  background: #ffffff;
50
+  display: flex;
51
+  align-items: center;
52
+  justify-content: space-between;
53
+  height: 100rpx;
54
+  // border-bottom: 2rpx solid #e5e5e5;
55
+  &--left {
56
+    width: 120rpx;
57
+    font-family: PingFangSC, PingFang SC;
58
+    font-weight: 400;
59
+    font-size: 30rpx;
60
+    color: #333333;
61
+    line-height: 30rpx;
62
+  }
63
+  &--right {
64
+    flex: 1;
65
+    padding-left: 50rpx;
66
+    padding-right: 12rpx;
67
+    text-align: right;
68
+    .title {
69
+      font-family: PingFangSC, PingFang SC;
70
+      font-weight: 400;
71
+      font-size: 28rpx;
72
+      color: #999999;
73
+    }
74
+    .upop {
75
+      display: flex;
76
+      width: 100%;
77
+      align-items: center;
78
+      justify-content: flex-end;
79
+      image {
80
+        width: 30rpx;
81
+        height: 30rpx;
82
+        margin-left: 5rpx;
83
+      }
84
+      .image-box {
85
+        width: 40rpx;
86
+        height: 38rpx;
87
+      }
88
+    }
89
+    .upop_input {
90
+      padding: 15rpx 10rpx;
91
+      flex: 1;
92
+    }
93
+    .xcv {
94
+      flex: 1;
95
+    }
96
+  }
97
+  &:last-child {
98
+    border-bottom: none;
99
+  }
100
+}
101
+</style>

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

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
 	
3 3
 	<view class="card-wrapper">
4
-	   <view class="card-wrapper__text">发货商品</view>
4
+	   <view class="card-wrapper__text">{{title}}</view>
5 5
 	   <view class="card-wrapper__address">
6 6
 		   北京市通州区经开壹中心14号楼9层北京市通州区经开壹中心14号楼9层
7 7
 	   </view>
@@ -24,6 +24,12 @@
24 24
 
25 25
 <script>
26 26
 	export default {
27
+		props:{
28
+			title:{
29
+				type:String,
30
+				default:"发货商品"
31
+			}
32
+		},
27 33
 		data() {
28 34
 			return {
29 35
 				showDetailInfo:false,

+ 14 - 57
shop/commodity/order.vue

@@ -1,18 +1,6 @@
1 1
 <template>
2 2
 	<view class="order">
3
-		<view class="order-header">
4
-			<view class="order-header-text">
5
-				<view class="order-header-text-neishi" @click="topgi">
6
-					<view class="order-header-text-icon">
7
-						<image src="https://cdn.bjtdba.com/vod/image/2022-08-11/20220811133828415.png" mode="widthFix">
8
-						</image>
9
-					</view>
10
-				</view>
11
-				<view class="order-header-text-title">
12
-					订单列表
13
-				</view>
14
-			</view>
15
-		</view>
3
+		<headersVue @headerJump="topgi" headerTitle="订单列表"/>
16 4
 		<view class="order-list-filter-wrapper">
17 5
 			<view class="order-search_customs">
18 6
 				<searchVue @search="search"></searchVue>
@@ -49,9 +37,10 @@
49 37
 	import tabsVue from '../components/tabs/tabs/tabs.vue'
50 38
 	import orderListCardVue from './components/orderList/orderListCard.vue'
51 39
 	import searchVue from './components/search/search.vue'
40
+	import headersVue from '../components/headers/headers.vue'
52 41
 	import {listData} from "./mockData.js"
53 42
 	export default {
54
-		components:{emptyDataVue,tabsVue,orderListCardVue,searchVue},
43
+		components:{emptyDataVue,tabsVue,orderListCardVue,searchVue,headersVue},
55 44
 		data() {
56 45
 			return {
57 46
 				listMock:[],
@@ -166,10 +155,19 @@
166 155
 			search(val){
167 156
 				console.log(val,"搜索")
168 157
 			},
169
-			handleSendOutGoods(v){
158
+			handleSendOutGoods(v,type){
170 159
 				console.log("發貨",v)
160
+				const url = {
161
+					"sendGoods":`./sendoutgoods?order_id=${v.order_id}&status=${v.status}&indexs=${this.indexs}&goodsCustomType=${type}`,//立即发货
162
+					"delivered":``,//已送达
163
+					"logistics":``,//查看物流
164
+					"pickup":`./sendoutgoods?order_id=${v.order_id}&status=${v.status}&indexs=${this.indexs}&goodsCustomType=${type}`,//立即自提
165
+				}
166
+				let redirectToUrl = url[type] || url["logistics"]
167
+				console.log(redirectToUrl,"redirectToUrl")
168
+				console.log(type,"type")
171 169
 				uni.redirectTo({
172
-					url: './sendoutgoods?order_id=' + v.order_id + "&status=" + v.status + "&indexs=" + this.indexs
170
+					url: redirectToUrl
173 171
 				});
174 172
 			},
175 173
 			// 正向订单列表
@@ -246,47 +244,6 @@
246 244
 		display: flex;
247 245
 		flex-direction: column;
248 246
 		align-items: center;
249
-
250
-		.order-header {
251
-			position: fixed;
252
-			top: 0;
253
-			left: 0;
254
-			z-index: 111;
255
-			width: 100%;
256
-			// height: 176rpx;
257
-			background: #FFFFFF;
258
-			display: flex;
259
-			padding-left:20rpx;
260
-            white-space: nowrap;
261
-			.order-header-text {
262
-				width: 686rpx;
263
-				font-size: 36rpx;
264
-				font-weight: 500;
265
-				color: #333333;
266
-				display: flex;
267
-				// margin-top: 107rpx;
268
-				padding:30rpx 0 20rpx;
269
-				align-items: center;
270
-
271
-				.order-header-text-neishi {
272
-					width: 45rpx;
273
-					height: 45rpx;
274
-					margin-right: 17rpx;
275
-
276
-					.order-header-text-icon {
277
-						width: 36rpx;
278
-						height: 36rpx;
279
-						margin-top: 2rpx;
280
-
281
-						image {
282
-							width: 100%;
283
-							height: 100%;
284
-						}
285
-					}
286
-				}
287
-			}
288
-		}
289
-        
290 247
 		.order-nbeirong {
291 248
 			width: 686rpx;
292 249
 			height: 30rpx;

+ 20 - 60
shop/commodity/sendoutgoods.vue

@@ -1,24 +1,14 @@
1 1
 <template>
2 2
 	<view class="order-send-out-goods">
3
-		<view class="order-send-out-goods-header">
4
-			<view class="order-send-out-goods-header-text">
5
-				<view class="order-send-out-goods-header-text-neishi" @click="topgi">
6
-					<view class="order-send-out-goods-header-text-neishi-icon">
7
-						<image src="https://cdn.bjtdba.com/vod/image/2022-08-11/20220811133828415.png" mode="widthFix">
8
-						</image>
9
-					</view>
10
-				</view>
11
-				<view class="order-send-out-goods-header-text-title">
12
-					发货
13
-				</view>
14
-			</view>
15
-		</view>
3
+		<headersVue @headerJump="topgi" :header-title="headerTitle"></headersVue>
16 4
 		<view class="order-send-out-goods__content">
17
-			<shipmentGoodsCardVue />
5
+			<shipmentGoodsCardVue :title="shipmentGoodsTitle"/>
18 6
 			<orderDetailSendCardVue class="custom_class"/>
19
-			<fillLogisticsInfoVue class="custom_class" />
7
+			<fillLogisticsInfoVue class="custom_class" v-if="goodsCustomType==='sendGoods'"/>
8
+			<reInputItemVue v-if="goodsCustomType==='pickup'" class="inputInfo" ></reInputItemVue>
20 9
 			<view class="btn-box">
21
-			  <button type="primary" class="send-goods">发货</button>
10
+			  <button type="primary" class="send-goods" v-if="goodsCustomType==='sendGoods'">发货</button>
11
+			  <button type="primary" class="send-goods" v-if="goodsCustomType==='pickup'">自提</button>
22 12
 			</view>
23 13
 		</view>
24 14
 	</view>
@@ -28,19 +18,27 @@
28 18
 	import shipmentGoodsCardVue from './components/shipmentGoodsCard.vue'
29 19
 	import orderDetailSendCardVue from './components/orderDetailSendCard.vue'
30 20
 	import fillLogisticsInfoVue from './components/fillLogisticsInfo.vue'
21
+	import headersVue from '../components/headers/headers.vue'
22
+	import reInputItemVue from './components/reInputItem/reInputItem.vue'
31 23
 	export default {
32
-		components:{shipmentGoodsCardVue,orderDetailSendCardVue,fillLogisticsInfoVue},
24
+		components:{shipmentGoodsCardVue,orderDetailSendCardVue,fillLogisticsInfoVue,headersVue,reInputItemVue},
33 25
 		data() {
34 26
 			return {
35 27
 				indexs: '',
36 28
 				status: '',
37 29
 				order_id: '', //订单ID
30
+				headerTitle:"发货",
31
+				shipmentGoodsTitle:"发货商品",
32
+				goodsCustomType:"sendGoods"
38 33
 			}
39 34
 		},
40 35
 		onLoad(e) {
41 36
 			this.order_id = e.order_id
42 37
 			this.indexs = e.indexs
43 38
 			this.status = e.status
39
+			this.goodsCustomType = e.goodsCustomType
40
+			this.headerTitle = this.goodsCustomType==="sendGoods"?"发货":'自提'
41
+			this.shipmentGoodsTitle = this.goodsCustomType==="sendGoods"?"发货商品":'自提商品'
44 42
 		},
45 43
 		methods: {
46 44
 			topgi(){
@@ -64,49 +62,6 @@
64 62
 		display: flex;
65 63
 		flex-direction: column;
66 64
 		align-items: center;
67
-		// 头部 start 
68
-		&-header {
69
-			position: fixed;
70
-			top: 0;
71
-			left: 0;
72
-			z-index: 111;
73
-			width: 100%;
74
-			// height: 176rpx;
75
-			background: #FFFFFF;
76
-			display: flex;
77
-			// justify-content: center;
78
-			// padding-left:20rpx;
79
-		    white-space: nowrap;
80
-			&-text {
81
-				width: 686rpx;
82
-				font-size: 36rpx;
83
-				font-weight: 500;
84
-				color: #333333;
85
-				display: flex;
86
-				// margin-top: 107rpx;
87
-				padding:30rpx 0 20rpx;
88
-				align-items: center;
89
-		
90
-				&-neishi {
91
-					width: 45rpx;
92
-					height: 45rpx;
93
-					margin-right: 17rpx;
94
-		
95
-					&-icon {
96
-						width: 36rpx;
97
-						height: 36rpx;
98
-						margin-top: 2rpx;
99
-		
100
-						image {
101
-							width: 100%;
102
-							height: 100%;
103
-						}
104
-					}
105
-				}
106
-			}
107
-		}
108
-	   // 头部 end
109
-	
110 65
 	&__content{
111 66
 		width: 100%;
112 67
 		margin: 130rpx 0 50rpx;
@@ -130,6 +85,11 @@
130 85
 	
131 86
 	}
132 87
 	
88
+	
89
+	.inputInfo{
90
+		margin-top:26rpx;
91
+		padding:0 26rpx;
92
+	}
133 93
 
134 94
 
135 95
 </style>

+ 81 - 0
shop/components/headers/headers.vue

@@ -0,0 +1,81 @@
1
+<template>
2
+		<view class="common-header">
3
+			<view class="common-header-text">
4
+				<view class="common-header-text-neishi" @click="topgi">
5
+					<view class="common-header-text-neishi-icon">
6
+						<image src="https://cdn.bjtdba.com/vod/image/2022-08-11/20220811133828415.png" mode="widthFix">
7
+						</image>
8
+					</view>
9
+				</view>
10
+				<view class="common-header-text-title">
11
+					{{headerTitle}}
12
+				</view>
13
+			</view>
14
+		</view>
15
+</template>
16
+
17
+<script>
18
+	export default {
19
+		props:{
20
+			headerTitle:{
21
+				type:String,
22
+				default:"发货"
23
+			}
24
+		},
25
+		data() {
26
+			return {
27
+				
28
+			};
29
+		},
30
+		methods:{
31
+			topgi(){
32
+				this.$emit("headerJump")
33
+			}
34
+		}
35
+	}
36
+</script>
37
+
38
+<style lang="scss">
39
+		// 头部 start 
40
+		.common-header {
41
+			position: fixed;
42
+			top: 0;
43
+			left: 0;
44
+			z-index: 111;
45
+			width: 100%;
46
+			// height: 176rpx;
47
+			background: #FFFFFF;
48
+			display: flex;
49
+			// justify-content: center;
50
+			padding-left:20rpx;
51
+		    white-space: nowrap;
52
+			&-text {
53
+				width: 686rpx;
54
+				font-size: 36rpx;
55
+				font-weight: 500;
56
+				color: #333333;
57
+				display: flex;
58
+				// margin-top: 107rpx;
59
+				padding:30rpx 0 20rpx;
60
+				align-items: center;
61
+		
62
+				&-neishi {
63
+					width: 45rpx;
64
+					height: 45rpx;
65
+					margin-right: 10rpx;
66
+		
67
+					&-icon {
68
+						width: 36rpx;
69
+						height: 36rpx;
70
+						margin-top: 2rpx;
71
+		
72
+						image {
73
+							width: 100%;
74
+							height: 100%;
75
+						}
76
+					}
77
+				}
78
+			}
79
+		}
80
+	   // 头部 end
81
+</style>