liujd 6 anni fa
parent
commit
29c0a87d73

+ 5 - 5
mobile-code/src/api/order/index.js

@@ -89,35 +89,35 @@ export const orderSendDet = data => {
  * 发货操作-打单 b
  */
 export const printOrder = data => {
-	return https.get('/order-send/print-order', data)
+	return https.post('/order-send/print-order', data)
 }
 
 /** *
  * 发货操作-发货 b
  */
 export const orderSend = data => {
-	return https.get('/order-send/deliver', data)
+	return https.post('/order-send/deliver', data)
 }
 
 /** *
  * 发货操作-送达 b
  */
 export const orderReach = data => {
-	return https.get('/order-send/reach', data)
+	return https.post('/order-send/reach', data)
 }
 
 /** *
  * 发货-填写收花人 b
  */
 export const updateSheet = data => {
-	return https.get('/order/update-sheet', data)
+	return https.post('/order/update-sheet', data)
 }
 
 /** *
  * 发货-归类 b
  */
 export const orderClass = data => {
-	return https.get('/order/classify', data)
+	return https.post('/order/classify', data)
 }
 
 /** *

+ 2 - 3
mobile-code/src/components/app-uploader.vue

@@ -131,7 +131,7 @@ export default {
 			let base64ImgList = that.base64ImgList
 			let params = {}
 			if (base64ImgList.length === 1) {
-				params['file[content]'] = base64ImgList[0]
+				params['content'] = base64ImgList[0]
 			} else {
 				base64ImgList.forEach((item, index) => {
 					params[`file[${index}][content]`] = item
@@ -139,8 +139,7 @@ export default {
 			}
 			return new Promise((resolve, reject) => {
 				this.uploadPicApi({
-					...params,
-					relative_path: 1
+					...params
 				}).then(res => {
 					if (res.code === 1) {
 						let imgArr = [res.data.url]

+ 6 - 0
mobile-code/src/pages.json

@@ -47,6 +47,12 @@
 					"style": {
 						"navigationBarTitleText": "发货"
 					}
+				},
+				{
+					"path": "admin/fill-form",
+					"style": {
+						"navigationBarTitleText": "填写收花人"
+					}
 				}
 			]
 		},

+ 1 - 0
mobile-code/src/pages/admin/components/module/operate-line.vue

@@ -64,6 +64,7 @@ export default {
 		border-radius: 10px;
 		padding: 0 10px;
 		width: 170px;
+		z-index: 999;
 		&.witer {
 			background-color: #fff;
 			&::after {

+ 1 - 0
mobile-code/src/pages/admin/components/module/operate.vue

@@ -41,6 +41,7 @@ export default {
 
 <style lang="scss" scoped>
 	.operate-module {
+		z-index: 999;
 		// position: relative;
 		// .operate-icon {
 		// 	.iconcaozuojihuo {

+ 197 - 56
mobile-code/src/pages/order/admin/components/sel-confirm.vue

@@ -1,7 +1,7 @@
 <template>
 	<div class="sel-confirm-module">
 		<!-- 列表 -->
-		<time-axis>
+		<time-axis v-if="!$util.isEmpty(orderComData)">
 			<!-- 完成 -->
 			<timeaxis-item class="axis-list axis-first com-wrap" bgcolor="none">
 				<template v-slot:node>
@@ -13,7 +13,7 @@
 					<div class="axis-slot-wrap">
 						<div class="axis-title">完成</div>
 						<div class="axis-det">
-                            <button class="admin-button-com big blue confirm-btn">订单归类</button>
+							<button class="admin-button-com big blue confirm-btn" @click="confirmFn">订单归类</button>
 						</div>
 					</div>
 				</template>
@@ -22,9 +22,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[1].actionName }}</div>
 						<div class="axis-det">
-							<div class="app-color-0 app-bold">2019-10-10 18:00:00</div>
+							<div class="app-color-0 app-bold">{{ orderComData[1].addTime | formatTime }}</div>
 						</div>
 					</div>
 				</template>
@@ -33,17 +33,22 @@
 			<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>
-								<span>状态:</span>
-								<span class="app-color-4">待接单</span>
-							</div>
+							<div class="app-color-0 app-bold">{{ orderComData[2].addTime | formatTime }}</div>
+							<block v-if="!$util.isEmpty(orderComData[2].sendInfo)">
+								<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>
+									<span>状态:</span>
+									<span class="app-color-4">{{ orderComData[2].sendInfo.sendStatus | constantfilter('SEND_STATUS') }}</span>
+								</div>
+							</block>
+							<block v-else>
+								<div>配送方:自己送</div>
+							</block>
 						</div>
 					</div>
 				</template>
@@ -52,14 +57,14 @@
 			<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="btn-wrap-com">
-                                <button class="admin-button-com default">明细</button>
-                                <button class="admin-button-com default">打印</button>
-                            </div>
+							<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>
+							</div>
 						</div>
 					</div>
 				</template>
@@ -68,72 +73,208 @@
 			<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-color-0 app-bold">2019-10-10 18:00:00</div>
+							<div class="app-color-0 app-bold">{{ orderComData[4].addTime | formatTime }}</div>
 						</div>
 					</div>
 				</template>
 			</timeaxis-item>
 		</time-axis>
+		<!-- 选取分类 -->
+		<modal-module :show="selModal" :maskClosable="false" @cancel="modalCancel" @click="selModalClick" title="订单归类" padding="30rpx 30rpx">
+			<template v-slot:content>
+				<div class="upload-confirm-wrap">
+					<!-- 选择分类 -->
+					<div class="sel-wrap">
+						<div class="sel-tit">选择分类</div>
+						<div class="sel-btn">
+							<block v-for="(item, index) in categoryData" :key="index">
+								<button class="admin-button-com" :class="[form.categoryId == item.id ? '' : 'default']" @click="selCategoryFn(item)">{{ item.categoryName || '暂无' }}</button>
+							</block>
+						</div>
+					</div>
+					<!-- 选择用途 -->
+					<div class="sel-wrap">
+						<div class="sel-tit">选择用途</div>
+						<div class="sel-btn">
+							<block v-for="(item, index) in usageData" :key="index">
+								<button class="admin-button-com" :class="[form.usageId == item.id ? '' : 'default']" @click="selUsageFn(item)">{{ item.usageName || '暂无' }}</button>
+							</block>
+						</div>
+					</div>
+				</div>
+			</template>
+		</modal-module>
 	</div>
 </template>
 
 <script>
+import { mapGetters } from 'vuex'
 import TimeAxis from '@/pages/admin/components/plugin/time-axis'
 import TimeaxisItem from '@/pages/admin/components/plugin/timeaxis-item'
+import ModalModule from '@/components/plugin/modal'
 import CardName from './card-name'
+// api
+import { getCategory, getUsage } from '@/utils/config'
+import { orderClass } from '@/api/order'
 export default {
 	name: 'sel-confirm-module',
 	components: {
 		TimeAxis,
 		TimeaxisItem,
+		ModalModule,
 		CardName
+	},
+	props: {
+		query: {
+			type: Object,
+			default: () => {}
+		},
+		orderData: {
+			type: Object,
+			default: () => {}
+		},
+		orderComData: {
+			type: Array,
+			default: () => []
+		}
+	},
+	data() {
+		return {
+			selModal: false,
+			form: {
+				categoryId: '',
+				usageId: ''
+			}
+		}
+	},
+	computed: {
+		...mapGetters({ categoryData: 'getCategory' }),
+		...mapGetters({ usageData: 'getUsage' })
+	},
+	mounted() {
+		getCategory()
+		getUsage()
+	},
+	methods: {
+		confirmFn() {
+			this.selModal = true
+		},
+		// modal
+		// 操作
+		selCategoryFn(item) {
+			this.form.categoryId = item.id
+		},
+		selUsageFn(item) {
+			this.form.usageId = item.id
+		},
+		selModalClick(e) {
+			if (e.index === 0) {
+				this.modalCancel()
+			} else {
+				orderClass({
+					id: this.orderData.id,
+					...this.form
+				}).then(res => {
+					this.$msg('订单归类成功!')
+					setTimeout(() => {
+						this.$util.pageTo({
+							url: '/pages/order/admin/ship',
+							query: {
+								id: this.query.id,
+								pageStatus: 6
+							}
+						})
+					}, 1000)
+				})
+			}
+		},
+		modalCancel() {
+			this.selModal = false
+		}
 	}
 }
 </script>
 
 <style lang="scss" scoped>
-    // 完成
-    .axis-first {
-        .axis-det {
-            margin-top: 40px !important;
-        }
-        .confirm-btn {
-            width: 100%;
-        }
-    }
-    // 发货
-    .confirm-wrap {
-		.axis-slot-wrap {
-			top: -4px !important;
+	// 完成
+	.axis-first {
+		.axis-det {
+			margin-top: 40px !important;
+		}
+		.confirm-btn {
+			width: 100%;
 		}
+	}
+	// 发货
+	.confirm-wrap {
 		.axis-det {
 			margin-top: 20px;
-            margin-bottom: 10px;
-            color: $fontColor2;
-            & > div {
-                margin-top: 14px;
-                &:first-child {
-                    margin-top: 0;
-                }
-            }
-            .admin-button-com {
-                width: 120px;
-                margin-top: 20px;
-            }
+			margin-bottom: 10px;
+			color: $fontColor2;
+			& > div {
+				margin-top: 14px;
+				&:first-child {
+					margin-top: 0;
+				}
+			}
+			.admin-button-com {
+				width: 120px;
+				margin-top: 20px;
+			}
 		}
-    }
+	}
 	// 打单
 	.com-wrap {
 		.axis-det {
 			margin-top: 14px;
-            & > div {
-                margin-top: 20px;
-                &:first-child {
-                    margin-top: 0;
-                }
-            }
-        }
+			& > div {
+				margin-top: 20px;
+				&:first-child {
+					margin-top: 0;
+				}
+			}
+		}
+	}
+	// 弹窗
+	.upload-confirm-wrap {
+		max-height: 600px;
+		overflow-y: auto;
+		.modal-tit {
+			@include disFlex(center, center);
+			font-size: 40px;
+			margin-top: 30px;
+			margin-bottom: 50px;
+			.iconfont {
+				color: #09bb07;
+				margin-right: 20px;
+				font-size: 50px;
+			}
+		}
+		//  分类
+		.sel-wrap {
+			color: $fontColor2;
+			font-size: 32px;
+			.sel-tit {
+				text-align: left;
+			}
+			.sel-btn {
+				@include disFlex(center, flex-start);
+				flex-wrap: wrap;
+				padding: 10px 0 40px;
+				.admin-button-com {
+					// width: 170px;
+					margin-right: 20px;
+					margin-top: 20px;
+					padding-top: 16px;
+					padding-bottom: 16px;
+					border-radius: 4px;
+					// &:nth-child(3n + 1) {
+					// 	margin-left: 0;
+					// }
+				}
+			}
+		}
 	}
 </style>

+ 64 - 27
mobile-code/src/pages/order/admin/components/sel-express-confirm.vue

@@ -1,7 +1,7 @@
 <template>
 	<div class="sel-confirm-module">
 		<!-- 列表 -->
-		<time-axis>
+		<time-axis v-if="!$util.isEmpty(orderComData)">
 			<!-- 送达 -->
 			<timeaxis-item class="axis-list axis-first com-wrap" bgcolor="none">
 				<template v-slot:node>
@@ -13,7 +13,7 @@
 					<div class="axis-slot-wrap">
 						<div class="axis-title">送达</div>
 						<div class="axis-det express-wrap">
-							<button class="admin-button-com big disable">确认已送达</button>
+							<button class="admin-button-com big blue" @click="confirmFn">确认已送达</button>
 							<div class="button-prompt">送达会自动通知客户哦</div>
 						</div>
 					</div>
@@ -23,17 +23,22 @@
 			<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[1].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>
-								<span>状态:</span>
-								<span class="app-color-4">待接单</span>
-							</div>
+							<div class="app-color-0 app-bold">{{ orderComData[1].addTime | formatTime }}</div>
+							<block v-if="!$util.isEmpty(orderComData[1].sendInfo)">
+								<div>配送方:{{ orderComData[1].sendInfo.sendSideName }}</div>
+								<div>距离:{{ orderComData[1].sendInfo.sendDistance }}km</div>
+								<div>运费:¥{{ orderComData[1].sendInfo.sendCost }}</div>
+								<div>小费:¥{{ orderComData[1].sendInfo.sendTip }}</div>
+								<div>
+									<span>状态:</span>
+									<span class="app-color-4">{{ orderComData[1].sendInfo.sendStatus | constantfilter('SEND_STATUS') }}</span>
+								</div>
+							</block>
+							<block v-else>
+								<div>配送方:自己送</div>
+							</block>
 						</div>
 					</div>
 				</template>
@@ -42,13 +47,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[2].actionName }}</div>
 						<div class="axis-det">
-							<div class="app-bold">2019-10-10 18:00:00</div>
-							<card-name />
+							<div class="app-bold">{{ orderComData[2].addTime | formatTime }}</div>
+							<card-name :info="orderComData[2].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">打</button>
 							</div>
 						</div>
 					</div>
@@ -58,9 +63,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[3].actionName }}</div>
 						<div class="axis-det">
-							<div class="app-color-0 app-bold">2019-10-10 18:00:00</div>
+							<div class="app-color-0 app-bold">{{ orderComData[3].addTime | formatTime }}</div>
 						</div>
 					</div>
 				</template>
@@ -73,12 +78,47 @@
 import TimeAxis from '@/pages/admin/components/plugin/time-axis'
 import TimeaxisItem from '@/pages/admin/components/plugin/timeaxis-item'
 import CardName from './card-name'
+// api
+import { orderReach } from '@/api/order'
 export default {
 	name: 'sel-confirm-module',
 	components: {
 		TimeAxis,
 		TimeaxisItem,
 		CardName
+	},
+	props: {
+		query: {
+			type: Object,
+			default: () => {}
+		},
+		orderData: {
+			type: Object,
+			default: () => {}
+		},
+		orderComData: {
+			type: Array,
+			default: () => []
+		}
+	},
+	methods: {
+		confirmFn() {
+			orderReach({
+				id: this.orderData.id,
+				option: 1
+			}).then(res => {
+				this.$msg('确认送达成功!')
+				setTimeout(() => {
+					this.$util.pageTo({
+						url: '/pages/order/admin/ship',
+						query: {
+							id: this.query.id,
+							pageStatus: 5
+						}
+					})
+				}, 1000)
+			})
+		}
 	}
 }
 </script>
@@ -86,9 +126,6 @@ export default {
 <style lang="scss" scoped>
 	// 发货
 	.confirm-wrap {
-		.axis-slot-wrap {
-			top: -4px !important;
-		}
 		.axis-det {
 			margin-top: 20px;
 			margin-bottom: 10px;
@@ -124,11 +161,11 @@ export default {
 		.express-wrap {
 			.admin-button-com {
 				width: 100%;
-            }
-            .button-prompt {
-                text-align: center;
-                color: $fontColor2;
-            }
+			}
+			.button-prompt {
+				text-align: center;
+				color: $fontColor2;
+			}
 		}
 	}
 </style>

+ 14 - 0
mobile-code/src/pages/order/admin/components/sel-mention.vue

@@ -79,6 +79,20 @@ export default {
 	components: {
 		TimeAxis,
 		TimeaxisItem
+	},
+	props: {
+		query: {
+			type: Object,
+			default: () => {}
+		},
+		orderData: {
+			type: Object,
+			default: () => {}
+		},
+		orderComData: {
+			type: Array,
+			default: () => []
+		}
 	}
 }
 </script>

+ 19 - 10
mobile-code/src/pages/order/admin/components/sel-order.vue

@@ -13,18 +13,11 @@
 					<div class="axis-slot-wrap">
 						<div class="axis-title">打单</div>
 						<div class="axis-det">
+							<button class="admin-button-com big blue" @click="hasSendOrderFn">有配送单</button>
 							<button class="admin-button-com big blue" @click="$util.pageTo({
-						url: '/pages/order/admin/ship',
+						url: '/pages/order/admin/fill-form',
 						query: {
-							id: orderData.id,
-							pageStatus: 7
-						}
-					})">有配送单</button>
-							<button class="admin-button-com big blue" @click="$util.pageTo({
-						url: '/pages/order/admin/ship',
-						query: {
-							id: orderData.id,
-							pageStatus: 2
+							id: orderData.id
 						}
 							})">没有,去填单</button>
 						</div>
@@ -49,6 +42,8 @@
 <script>
 import TimeAxis from '@/pages/admin/components/plugin/time-axis'
 import TimeaxisItem from '@/pages/admin/components/plugin/timeaxis-item'
+// api
+import { printOrder } from '@/api/order'
 export default {
 	name: 'sel-order-module',
 	components: {
@@ -73,6 +68,20 @@ export default {
 	mounted() {
 	},
 	methods: {
+		hasSendOrderFn() {
+			printOrder({
+				id: this.orderData.id,
+				option: 1
+			}).then(res => {
+				this.$util.pageTo({
+					url: '/pages/order/admin/ship',
+					query: {
+						id: this.orderData.id,
+						pageStatus: 7
+					}
+				})
+			})
+		}
 	}
 }
 </script>

+ 21 - 10
mobile-code/src/pages/order/admin/components/sel-pending-order.vue

@@ -11,20 +11,20 @@
 				</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>配送方:达达</div>
-                            <div>距离:5.5km</div>
-                            <div>运费:¥28</div>
+							<div>配送方:{{ orderComData[0].sendInfo.sendSideName }}</div>
+                            <div>距离:{{ orderComData[0].sendInfo.sendDistance }}km</div>
+                            <div>运费:¥{{ orderComData[0].sendInfo.sendCost }}</div>
                             <div>
-                                <span>小费:¥5</span>
+                                <span>小费:¥{{ orderComData[0].sendInfo.sendTip }}</span>
                                 <i class="iconfont iconbianjijiage1 modify-btn"></i>
                             </div>
                             <div>
 								<span>状态:</span>
-								<span class="app-price">待接单</span>
+								<span class="app-price">{{ orderComData[0].sendInfo.sendStatus | constantfilter('SEND_STATUS') }}</span>
 							</div>
-                            <div>期待送花时间:2019-10-10 20:00:00</div>
+                            <div>期待送花时间:{{ orderComData[2].addTime | formatTime }}</div>
                             <div class="admin-button-com default">取消</div>
 						</div>
 					</div>
@@ -72,6 +72,20 @@ export default {
 		TimeAxis,
 		TimeaxisItem,
 		CardName
+	},
+	props: {
+		query: {
+			type: Object,
+			default: () => {}
+		},
+		orderData: {
+			type: Object,
+			default: () => {}
+		},
+		orderComData: {
+			type: Array,
+			default: () => []
+		}
 	}
 }
 </script>
@@ -79,9 +93,6 @@ export default {
 <style lang="scss" scoped>
     // 发货
     .confirm-wrap {
-		.axis-slot-wrap {
-			top: -4px !important;
-		}
 		.axis-det {
 			margin-top: 20px;
             margin-bottom: 10px;

+ 0 - 5
mobile-code/src/pages/order/admin/components/sel-ship-confirm.vue

@@ -108,11 +108,6 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-	.axis-first {
-		.axis-slot-wrap {
-			top: -4px !important;
-		}
-	}
     // 发货
     .confirm-wrap {
 		.axis-det {

+ 11 - 9
mobile-code/src/pages/order/admin/components/sel-ship-manage.vue

@@ -19,16 +19,18 @@
 				</template>
 			</timeaxis-item>
 			<!-- 送达 -->
-			<timeaxis-item class="axis-list com-wrap" bgcolor="none" v-for="(item, index) in orderComData" :key="index">
-				<template v-slot:content>
-					<div class="axis-slot-wrap">
-						<div class="axis-title">{{ item.actionName }}</div>
-						<div class="axis-det">
-							<div class="app-color-0 app-bold">{{ item.addTime | formatTime }}</div>
+			<block v-for="(item, index) in orderComData" :key="index">
+				<timeaxis-item class="axis-list com-wrap" bgcolor="none" v-if="index > 0">
+					<template v-slot:content>
+						<div class="axis-slot-wrap">
+							<div class="axis-title">{{ item.actionName }}</div>
+							<div class="axis-det">
+								<div class="app-color-0 app-bold">{{ item.addTime | formatTime }}</div>
+							</div>
 						</div>
-					</div>
-				</template>
-			</timeaxis-item>
+					</template>
+				</timeaxis-item>
+			</block>
 		</time-axis>
 		<!-- ship -->
 		<modal-module :show="shipModal" :maskClosable="false" @cancel="modalCancel" @click="shipModalClick" title="确认发货?" padding="30rpx 30rpx">

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

@@ -3,7 +3,7 @@
 		<!-- 列表 -->
 		<time-axis>
 			<!-- 发货 -->
-			<timeaxis-item class="axis-list axis-first ship-goods" bgcolor="none">
+			<!-- <timeaxis-item class="axis-list axis-first ship-goods" bgcolor="none">
 				<template v-slot:node>
 					<div class="tui-node node-big">
 						<div class="node-small"></div>
@@ -18,19 +18,19 @@
 						</div>
 					</div>
 				</template>
-			</timeaxis-item>
+			</timeaxis-item> -->
 			<!-- 打单 -->
-			<timeaxis-item class="axis-list print-order" bgcolor="none">
+			<timeaxis-item class="axis-list axis-first print-order" bgcolor="none">
 				<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>2019-10-10 18:00:00</div>
+							<div>{{ orderComData[0].addTime | formatTime }}</div>
                             <card-name />
                             <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">修改</button> -->
+                                <!-- <button class="admin-button-com default">明细</button> -->
+                                <button class="admin-button-com default" @click="printOrderFn">打印</button>
                             </div>
 						</div>
 					</div>
@@ -40,9 +40,9 @@
 			<timeaxis-item class="axis-list down-order" 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>2019-10-10 18:00:00</div>
+							<div>{{ orderComData[1].addTime | formatTime }}</div>
 						</div>
 					</div>
 				</template>
@@ -55,12 +55,44 @@
 import TimeAxis from '@/pages/admin/components/plugin/time-axis'
 import TimeaxisItem from '@/pages/admin/components/plugin/timeaxis-item'
 import CardName from './card-name'
+// api
+import { printOrder } from '@/api/order'
 export default {
 	name: 'sel-order-module',
 	components: {
 		TimeAxis,
 		TimeaxisItem,
 		CardName
+	},
+	props: {
+		query: {
+			type: Object,
+			default: () => {}
+		},
+		orderData: {
+			type: Object,
+			default: () => {}
+		},
+		orderComData: {
+			type: Array,
+			default: () => []
+		}
+	},
+	methods: {
+		printOrderFn() {
+			printOrder({
+				id: this.orderData.id,
+				option: 1
+			}).then(res => {
+				this.$util.pageTo({
+					url: '/pages/order/admin/ship',
+					query: {
+						id: this.orderData.id,
+						pageStatus: 7
+					}
+				})
+			})
+		}
 	}
 }
 </script>

+ 110 - 0
mobile-code/src/pages/order/admin/fill-form.vue

@@ -0,0 +1,110 @@
+<template>
+	<div class="app-content">
+		<form @submit="formSubmit">
+			<app-delivery-module ref="appDelivery" />
+			<!-- 匿名派送 -->
+			<div class="none-name-delivery flex-center">
+				<checkbox class="ljd-checkbox" @change="anonymityChange"></checkbox>
+				<span class="none-name-text">匿名派送</span>
+			</div>
+			<!-- 按钮 -->
+			<div class="app-footer">
+				<button class="admin-button-com blue middle" formType="submit">提交</button>
+			</div>
+		</form>
+	</div>
+</template>
+
+<script>
+import { mapGetters } from 'vuex'
+import AppDeliveryModule from '@/components/app-delivery'
+const form = require('@/utils/formValidation.js')
+// api
+import { getShopUser } from '@/utils/auth'
+import { getOrderShop } from '@/utils/config'
+import { updateSheet } from '@/api/order'
+export default {
+	name: 'fill-form',
+	components: {
+		AppDeliveryModule
+	},
+	data() {
+		return {
+			// 初始form
+			form: {
+				anonymity: '0' // 是否匿名 0不 1要
+			}
+		}
+	},
+	computed: {
+		...mapGetters({ orderShop: 'getOrderShop' }),
+		...mapGetters({ shopUser: 'getShopUser' })
+	},
+	onLoad() {
+		this.init()
+	},
+	methods: {
+		init() {
+			getOrderShop()
+			getShopUser()
+		},
+		confirmFn() {
+			let form = this.$refs.appDelivery.form ? this.$refs.appDelivery.form : {}
+			updateSheet({
+				id: this.option.id,
+				...this.form,
+				...form
+			}).then(res => {
+				this.$util.pageTo({
+					url: '/pages/order/admin/ship',
+					query: {
+						id: this.option.id,
+						pagestatus: 1
+					}
+				})
+			})
+		},
+		// operate
+		anonymityChange(e) {
+			this.form.anonymity = this.form.anonymity == 1 ? 0 : 1
+		},
+		// 表单验证
+		formSubmit(e) {
+			// 表单规则
+			let rules = [
+				// {
+				// 	name: 'receiveUserName',
+				// 	rule: ['required'],
+				// 	msg: ['请输入姓名']
+				// }
+			]
+			// 进行表单检查
+			let formData = e.detail.value
+			let checkRes = form.validation(formData, rules)
+			// 验证通过!
+			if (!checkRes) {
+				this.confirmFn()
+			} else {
+				this.$msg(checkRes)
+			}
+		}
+	}
+}
+</script>
+
+<style lang="scss" scoped>
+	// 匿名派送
+	.none-name-delivery {
+		padding-left: 30px;
+		margin-top: 40px;
+		.none-name-text {
+			margin-left: 14px;
+			color: $fontColor2;
+		}
+	}
+	.app-footer {
+		.admin-button-com {
+			width: 90%;
+		}
+	}
+</style>

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

@@ -36,20 +36,20 @@
 				<sel-ship :orderData="data" :query="option" />
 			</block>
 			<!-- 选择自提 -->
-			<block v-if="showIndex == 2">
+			<!-- <block v-if="showIndex == 2">
 				<sel-mention :orderData="data" :query="option" />
-			</block>
+			</block> -->
 			<!-- 快递送待接单 -->
-			<block v-if="showIndex == 3">
+			<!-- <block v-if="showIndex == 3">
 				<sel-pending-order :orderData="data" :query="option" :orderComData="orderComData" />
-			</block>
+			</block> -->
 			<!-- 发货选择快递送已接单 -->
 			<block v-if="showIndex == 4">
-				<sel-express-confirm :orderData="data" :query="option" />
+				<sel-express-confirm :orderData="data" :query="option" :orderComData="orderComData" />
 			</block>
 			<!-- 发货选择完成 -->
 			<block v-if="showIndex == 5">
-				<sel-confirm :orderData="data" :query="option" />
+				<sel-confirm :orderData="data" :query="option" :orderComData="orderComData" />
 			</block>
 			<!-- 发货管理完成 -->
 			<block v-if="showIndex == 6">
@@ -184,6 +184,9 @@ export default {
 		}
 		// 首个圆点
 		/deep/.axis-first {
+			.axis-slot-wrap {
+				top: -4px !important;
+			}
 			.node-big {
 				position: absolute;
 				top: 0;
@@ -193,7 +196,7 @@ export default {
 				width: 32px !important;
 				height: 32px !important;
 				border-radius: 50%;
-				background: #FDC3B8;
+				background: #fdc3b8;
 			}
 			.node-small {
 				position: absolute;

+ 53 - 53
mobile-code/src/pages/order/buy.vue

@@ -4,62 +4,62 @@
 		<app-tabs :tabs="tabs" :currentTab="tabIndex" :isFixed="true" :borderLeft="true" @change="tabChange" itemWidth="50%" />
 		<!-- 配送 -->
 		<form @submit="formSubmit">
-		<block v-if="tabIndex == 0">
-			<app-delivery-module ref="appDelivery" />
-		</block>
-		<!-- 自取 -->
-		<block v-else>
-			<!-- 收花人 -->
-			<div class="module-com">
-				<!-- <tui-list-cell class="line-cell" :hover="false">
+			<block v-if="tabIndex == 0">
+				<app-delivery-module ref="appDelivery" />
+			</block>
+			<!-- 自取 -->
+			<block v-else>
+				<!-- 收花人 -->
+				<div class="module-com">
+					<!-- <tui-list-cell class="line-cell" :hover="false">
 					<div class="tui-title">收花人姓名</div>
 					<input placeholder-class="phcolor" class="tui-input" name="name" placeholder="请输入姓名" maxlength="50" type="number" />
-				</tui-list-cell> -->
-				<tui-list-cell class="line-cell" :hover="false">
-					<div class="tui-title">手机号</div>
-					<input v-model="mentionForm.bookMobile" placeholder-class="phcolor" class="tui-input" name="phone" placeholder="请输入手机号" type="phone" />
-				</tui-list-cell>
-			</div>
-		</block>
+					</tui-list-cell>-->
+					<tui-list-cell class="line-cell" :hover="false">
+						<div class="tui-title">手机号</div>
+						<input v-model="mentionForm.bookMobile" placeholder-class="phcolor" class="tui-input" name="phone" placeholder="请输入手机号" type="phone" />
+					</tui-list-cell>
+				</div>
+			</block>
 
-		<!-- 商品金额 -->
-		<div class="module-com shop-price-wrap">
-			<div class="module-tit">商品金额</div>
-			<div class="module-det">
-				<app-list-module v-if="!$util.isEmpty(goodsInfo)" :info="goodsInfo"/>
-				<div class="shop-prompt">
-					<div>总计</div>
-					<div>¥{{ goodsInfo.price * option.goodsNum }}</div>
+			<!-- 商品金额 -->
+			<div class="module-com shop-price-wrap">
+				<div class="module-tit">商品金额</div>
+				<div class="module-det">
+					<app-list-module v-if="!$util.isEmpty(goodsInfo)" :info="goodsInfo" />
+					<div class="shop-prompt">
+						<div>总计</div>
+						<div>¥{{ goodsInfo.price * option.goodsNum }}</div>
+					</div>
 				</div>
 			</div>
-		</div>
-		<!-- 可选优惠 -->
-		<div class="module-com discount-wrap" v-if="!$util.isEmpty(shopUser) && shopUser.userAsset.member && shopUser.userAsset.getCouponNum">
-			<div class="module-tit">可选优惠</div>
-			<div class="module-det">
-				<app-coupon-sel ref="couponSel" :price="goodsInfo.price * option.goodsNum" :discountArr="['member', 'coupon']" />
+			<!-- 可选优惠 -->
+			<div class="module-com discount-wrap" v-if="!$util.isEmpty(shopUser) && shopUser.userAsset.member && shopUser.userAsset.getCouponNum">
+				<div class="module-tit">可选优惠</div>
+				<div class="module-det">
+					<app-coupon-sel ref="couponSel" :price="goodsInfo.price * option.goodsNum" :discountArr="['member', 'coupon']" />
+				</div>
 			</div>
-		</div>
 
-		<!-- 匿名派送 -->
-		<div class="none-name-delivery flex-center">
-			<checkbox class="ljd-checkbox" @change="anonymityChange"></checkbox>
-			<span class="none-name-text">匿名派送</span>
-		</div>
+			<!-- 匿名派送 -->
+			<div class="none-name-delivery flex-center">
+				<checkbox class="ljd-checkbox" @change="anonymityChange"></checkbox>
+				<span class="none-name-text">匿名派送</span>
+			</div>
 
-		<app-trademark />
-		<!-- 按钮 -->
-		<div class="page-btn app-footer">
-			<div class="flex-center">
-				<span>应付款</span>
-				<span class="app-price">
-					<span>¥</span>
-					<span class="app-size-40">{{ totalPrice }}</span>
-				</span>
+			<app-trademark />
+			<!-- 按钮 -->
+			<div class="page-btn app-footer">
+				<div class="flex-center">
+					<span>应付款</span>
+					<span class="app-price">
+						<span>¥</span>
+						<span class="app-size-40">{{ totalPrice }}</span>
+					</span>
+				</div>
+				<!-- <button class="button-com red" @click="confirmFn" formType="submit">确认</button> -->
+				<button class="button-com red" formType="submit">确认</button>
 			</div>
-			<!-- <button class="button-com red" @click="confirmFn" formType="submit">确认</button> -->
-			<button class="button-com red" formType="submit">确认</button>
-		</div>
 		</form>
 		<!-- 弹窗 -->
 		<alert-module :show="showAlert" @click="hideAlert" @cancel="hideAlert">
@@ -140,7 +140,7 @@ export default {
 			let totalPrice = this.goodsInfo.price * this.option.goodsNum
 			let discountMember = this.$util.isEmpty(this.shopUser) ? this.shopUser.userAsset.discount * totalPrice : 1 * totalPrice
 			discountMember = discountMember / 10
-			return (discountMember).toFixed(2)
+			return discountMember.toFixed(2)
 		}
 	},
 	onLoad(option) {
@@ -281,15 +281,15 @@ export default {
 				padding-bottom: 20px;
 			}
 		}
-        // 匿名派送
-        .none-name-delivery {
-            padding-left: 30px;
-            margin-top: 40px;
+		// 匿名派送
+		.none-name-delivery {
+			padding-left: 30px;
+			margin-top: 40px;
 			.none-name-text {
 				margin-left: 14px;
 				color: $fontColor2;
 			}
-        }
+		}
 	}
 	.page-btn {
 		width: calc(100% - 60px);

+ 24 - 1
mobile-code/src/store/modules/config.js

@@ -4,6 +4,7 @@ import UTIL from '@/utils/util'
 const state = {
 	level: {},
 	category: [],
+	usage: [],
 	fest: [],
 	orderShop: {}
 }
@@ -17,6 +18,10 @@ const getters = {
 	getCategory: (state) => {
 		return state.category || []
 	},
+	// 用途数据
+	getUsage: (state) => {
+		return state.usage || []
+	},
 	// 节日数据
 	getFest: (state) => {
 		return state.fest || []
@@ -45,11 +50,22 @@ const actions = {
 	}, data) {
 		commit('SET_CATEGORY', data)
 	},
-	delLevel({
+	delCategory({
 		commit
 	}) {
 		commit('DEL_CATEGORY')
 	},
+	// 用途数据
+	setUsage({
+		commit
+	}, data) {
+		commit('SET_USAGE', data)
+	},
+	delUsage({
+		commit
+	}) {
+		commit('DEL_USAGE')
+	},
 	// 节日数据
 	setFest({
 		commit
@@ -89,6 +105,13 @@ const mutations = {
 	DEL_CATEGORY(state) {
 		state.category = ''
 	},
+	// 用途数据
+	SET_USAGE(state, data = []) {
+		state.usage = data
+	},
+	DEL_USAGE(state) {
+		state.usage = ''
+	},
 	// 节日信息
 	SET_FEST(state, data = []) {
 		state.fest = data

+ 20 - 1
mobile-code/src/utils/config.js

@@ -3,7 +3,7 @@ import CONSTANT from '@/constant'
 import UTIL from '@/utils/util'
 
 import { getList as getLevelList } from '@/api/level'
-import { categoryListB as getCategoryList } from '@/api/goods'
+import { categoryListB as getCategoryList, usageListB as getUsageList } from '@/api/goods'
 import { getFestList } from '@/api/common'
 import { orderRelate as getOrderRelate } from '@/api/order'
 
@@ -45,6 +45,25 @@ export async function getCategory(update) {
 	return data
 }
 
+/**
+ * 获取分类列表
+ * @parmas update为true时会重新触发请求,重置vuex的数据
+ */
+export async function getUsage(update) {
+	let data = store.getters.getUsage
+	if (!UTIL.isEmpty(data) && !update) {
+		return data
+	}
+	await getUsageList().then(res => {
+		data = res.data
+		store.dispatch('setUsage', data)
+	}).catch(() => {
+		return false
+	})
+
+	return data
+}
+
 /**
  * 获取节日列表
  * @parmas update为true时会重新触发请求,重置vuex的数据