liujd 6 år sedan
förälder
incheckning
bb450b6d7f

+ 11 - 0
mobile-code/src/filters/constant.js

@@ -79,6 +79,17 @@ const _CONST_MAP = {
 			label: '已完成',
 			value: 4
 		}
+	],
+	// 配送状态
+	SEND_STATUS: [
+		{
+			label: '待接单',
+			value: 0
+		},
+		{
+			label: '已接单',
+			value: 1
+		}
 	]
 }
 

+ 10 - 4
mobile-code/src/pages/order/admin/components/card-name.vue

@@ -1,8 +1,8 @@
 <template>
 	<div class="card-name-module">
-        <div class="app-size-30 app-color-0">赵志军</div>
-        <div>153928282777</div>
-        <div>福建省厦门市湖里区拉了军无呜呜号码129号之一3楼</div>
+        <div class="app-size-30 app-color-0">{{ info.receiveUserName }}</div>
+        <div>{{ info.receiveMobile }}</div>
+        <div>{{ info.receiveAddress }}</div>
         <div class="card-tag">
             <img src="../../../../static/images/order/tag.png" alt="" mode="widthFix" >
         </div>
@@ -11,7 +11,13 @@
 
 <script>
 export default {
-	name: 'card-name-module'
+	name: 'card-name-module',
+	props: {
+		info: {
+			type: Object,
+			default: () => {}
+		}
+	}
 }
 </script>
 

+ 47 - 31
mobile-code/src/pages/order/admin/components/sel-ship-confirm.vue

@@ -1,17 +1,22 @@
 <template>
 	<div class="sel-ship-confirm-module">
 		<!-- 列表 -->
-		<time-axis>
+		<time-axis v-if="!$util.isEmpty(orderComData)">
 			<!-- 完成 -->
-			<timeaxis-item class="axis-list confirm-wrap" bgcolor="none">
+			<timeaxis-item class="axis-list axis-first confirm-wrap" bgcolor="none">
+				<template v-slot:node>
+					<div class="tui-node node-big">
+						<div class="node-small"></div>
+					</div>
+				</template>
 				<template v-slot:content>
 					<div class="axis-slot-wrap">
-						<div class="axis-title">送达</div>
+						<div class="axis-title">{{ orderComData[0].actionName }}</div>
 						<div class="axis-det">
-							<div class="app-color-0 app-bold">2019-10-10 18:00:00</div>
-							<div>订单归类: 花束/花盒</div>
-							<div>用途:送爱人/恋人</div>
-							<div>消息推送:已推送</div>
+							<div class="app-color-0 app-bold">{{ orderComData[0].finishTime | formatTime }}</div>
+							<div>订单归类: {{ orderComData[0].classify.category }}</div>
+							<div>用途:{{ orderComData[0].classify.usage }}</div>
+							<!-- <div>消息推送:已推送</div> -->
 						</div>
 					</div>
 				</template>
@@ -20,30 +25,25 @@
 			<timeaxis-item class="axis-list com-wrap" bgcolor="none">
 				<template v-slot:content>
 					<div class="axis-slot-wrap">
-						<div class="axis-title">送达</div>
+						<div class="axis-title">{{ orderComData[1].actionName }}</div>
 						<div class="axis-det">
-							<div class="app-bold">2019-10-10 18:00:00</div>
+							<div class="app-bold">{{ orderComData[1].addTime | formatTime }}</div>
 						</div>
 					</div>
 				</template>
 			</timeaxis-item>
 			<!-- 发货 -->
-			<timeaxis-item class="axis-list axis-first confirm-wrap" bgcolor="none">
-				<template v-slot:node>
-					<div class="tui-node node-big">
-						<div class="node-small"></div>
-					</div>
-				</template>
+			<timeaxis-item class="axis-list confirm-wrap" bgcolor="none">
 				<template v-slot:content>
 					<div class="axis-slot-wrap">
-						<div class="axis-title">发货</div>
+						<div class="axis-title">{{ orderComData[2].actionName}}</div>
 						<div class="axis-det">
-							<div class="app-color-0 app-bold">2019-10-10 18:00:00</div>
-							<div>配送方:达达</div>
-                            <div>距离:5.5km</div>
-                            <div>运费:¥28</div>
-                            <div>小费:¥5</div>
-                            <div>状态:已接单</div>
+							<div class="app-color-0 app-bold">{{ orderComData[2].addTime | formatTime }}</div>
+							<div>配送方:{{ orderComData[2].sendInfo.sendSideName }}</div>
+                            <div>距离:{{ orderComData[2].sendInfo.sendDistance }}km</div>
+                            <div>运费:¥{{ orderComData[2].sendInfo.sendCost }}</div>
+                            <div>小费:¥{{ orderComData[2].sendInfo.sendTip }}</div>
+                            <div>状态:{{ orderComData[2].sendInfo.sendStatus | constantfilter('SEND_STATUS') }}</div>
 						</div>
 					</div>
 				</template>
@@ -52,13 +52,13 @@
 			<timeaxis-item class="axis-list com-wrap" bgcolor="none">
 				<template v-slot:content>
 					<div class="axis-slot-wrap">
-						<div class="axis-title">打单</div>
+						<div class="axis-title">{{ orderComData[3].actionName}}</div>
 						<div class="axis-det">
-							<div class="app-bold">2019-10-10 18:00:00</div>
-                            <card-name />
+							<div class="app-bold">{{ orderComData[3].addTime | formatTime }}</div>
+                            <card-name :info="orderComData[3].receive" />
                             <div class="btn-wrap-com">
-                                <button class="admin-button-com default">明细</button>
-                                <button class="admin-button-com default">打印</button>
+                                <!-- <button class="admin-button-com default">明细</button> -->
+                                <button class="admin-button-com default" @click="() => { alert('打印功能待开发!') }">打印</button>
                             </div>
 						</div>
 					</div>
@@ -68,9 +68,9 @@
 			<timeaxis-item class="axis-list com-wrap" bgcolor="none">
 				<template v-slot:content>
 					<div class="axis-slot-wrap">
-						<div class="axis-title">下单</div>
+						<div class="axis-title">{{ orderComData[4].actionName}}</div>
 						<div class="axis-det">
-							<div class="app-bold">2019-10-10 18:00:00</div>
+							<div class="app-bold">{{ orderComData[4].addTime | formatTime }}</div>
 						</div>
 					</div>
 				</template>
@@ -89,16 +89,32 @@ export default {
 		TimeAxis,
 		TimeaxisItem,
 		CardName
+	},
+	props: {
+		query: {
+			type: Object,
+			default: () => {}
+		},
+		orderData: {
+			type: Object,
+			default: () => {}
+		},
+		orderComData: {
+			type: Array,
+			default: () => []
+		}
 	}
 }
 </script>
 
 <style lang="scss" scoped>
-    // 发货
-    .confirm-wrap {
+	.axis-first {
 		.axis-slot-wrap {
 			top: -4px !important;
 		}
+	}
+    // 发货
+    .confirm-wrap {
 		.axis-det {
 			margin-top: 20px;
             margin-bottom: 10px;

+ 42 - 34
mobile-code/src/pages/order/admin/components/sel-ship-manage.vue

@@ -31,33 +31,35 @@
 			</timeaxis-item>
 		</time-axis>
 		<!-- ship -->
-		<modal-module :show="shipModal" :maskClosable="false" @cancel="modalCancel" @click="shipModalClick" title="确认发货" padding="30rpx 30rpx">
+		<modal-module :show="shipModal" :maskClosable="false" @cancel="modalCancel" @click="shipModalClick" title="确认发货" padding="30rpx 30rpx">
 			<template v-slot:content>
 				<div class="app-modal-input-wrap ship-modal">
 					<div class="inp-list-line switch-wrap">
-						<div class="line-label">启用状态</div>
+						<div class="line-label">快递代送</div>
 						<div class="line-input flex-strat">
 							<switch :checked="form.sendType == '0' ? false : true" @change="switchChangeFn" />
 						</div>
 					</div>
-					<div class="inp-list-line">
-						<div class="line-label">送花时间</div>
-						<div class="line-input">
-							<picker mode="multiSelector" :range="timeList" @change="changeTimeFn" class="inp-select">
-								<div v-if="form.sendTime">{{ form.sendTime }}</div>
-								<div class="tui-placeholder" v-else>请选择</div>
-							</picker>
+					<block v-if="form.sendType == 1">
+						<div class="inp-list-line">
+							<div class="line-label">送花时间</div>
+							<div class="line-input">
+								<picker mode="multiSelector" :range="timeList" @change="changeTimeFn" class="inp-select">
+									<div v-if="form.sendTime">{{ form.sendTime }}</div>
+									<div class="tui-placeholder" v-else>请选择</div>
+								</picker>
+							</div>
 						</div>
-					</div>
-					<div class="inp-list-line">
-						<div class="line-label">配送方</div>
-						<div class="line-input">
-							<picker mode="selector" :range="deliveryList" @change="changedeliveryFn" range-key="text" class="inp-select">
-								<div v-if="form.sendSide">{{ sendSideText }}</div>
-								<div class="tui-placeholder" v-else>请选择</div>
-							</picker>
+						<div class="inp-list-line">
+							<div class="line-label">配送方</div>
+							<div class="line-input">
+								<picker mode="selector" :range="deliveryList" @change="changedeliveryFn" range-key="text" class="inp-select">
+									<div v-if="form.sendSide">{{ sendSideText }}</div>
+									<div class="tui-placeholder" v-else>请选择</div>
+								</picker>
+							</div>
 						</div>
-					</div>
+					</block>
 				</div>
 			</template>
 		</modal-module>
@@ -103,15 +105,14 @@ export default {
 			},
 			sendSideText: '',
 			// time
-			timeList: [
-				['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24'],
-				['00', '10', '20', '30', '40', '50']
-			],
+			timeList: [['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24'], ['00', '10', '20', '30', '40', '50']],
 			// deliveryList
-			deliveryList: [{
-				text: '达达配送',
-				key: 1
-			}]
+			deliveryList: [
+				{
+					text: '达达配送',
+					key: 1
+				}
+			]
 		}
 	},
 	methods: {
@@ -125,7 +126,7 @@ export default {
 		},
 		// moadl
 		switchChangeFn(e) {
-			this.form.status = e.detail.value ? 1 : 0
+			this.form.sendType = e.detail.value ? 1 : 0
 		},
 		changeTimeFn(e) {
 			let oneIndex = e.detail.value[0] || 0
@@ -146,6 +147,13 @@ export default {
 					...this.form
 				}).then(res => {
 					this.modalCancel()
+					this.$util.pageTo({
+						url: '/pages/order/admin/ship',
+						query: {
+							id: this.query.id,
+							pageStatus: 3
+						}
+					})
 				})
 			}
 		},
@@ -177,11 +185,11 @@ export default {
 				}
 			}
 		}
-    }
-    // modal
-    .ship-modal {
-        .line-label {
-            width: 140px;
-        }
-    }
+	}
+	// modal
+	.ship-modal {
+		.line-label {
+			width: 140px;
+		}
+	}
 </style>

+ 4 - 4
mobile-code/src/pages/order/admin/ship.vue

@@ -11,7 +11,7 @@
 					<div class="label">下单时间</div>
 					<div>{{ data.addTime | formatTime }}</div>
 				</div>
-				<div>
+				<div v-if="!$util.isEmpty(data.goodsInfoList)">
 					<div class="label">商品名称</div>
 					<div>{{ data.goodsInfoList[0].title }}</div>
 				</div>
@@ -20,7 +20,7 @@
 					<div>¥{{ data.actPrice }}</div>
 				</div>
 			</div>
-			<div class="order-img">
+			<div class="order-img" v-if="!$util.isEmpty(data.goodsInfoList)">
 				<img :src="data.goodsInfoList[0].smallCoverUrl" alt="商品图" mode="widthFix" />
 			</div>
 		</div>
@@ -41,7 +41,7 @@
 			</block>
 			<!-- 快递送待接单 -->
 			<block v-if="showIndex == 3">
-				<sel-pending-order :orderData="data" :query="option" />
+				<sel-pending-order :orderData="data" :query="option" :orderComData="orderComData" />
 			</block>
 			<!-- 发货选择快递送已接单 -->
 			<block v-if="showIndex == 4">
@@ -53,7 +53,7 @@
 			</block>
 			<!-- 发货管理完成 -->
 			<block v-if="showIndex == 6">
-				<sel-ship-confirm :orderData="data" :query="option" />
+				<sel-ship-confirm :orderData="data" :query="option" :orderComData="orderComData" />
 			</block>
 			<!-- 有配送单-发货管理 -->
 			<block v-if="showIndex == 7">