shish 6 лет назад
Родитель
Сommit
57d993c1d2

+ 3 - 3
admin-update/src/service/order/index.js

@@ -34,10 +34,10 @@ export class OrderService extends BaseService {
 		});
 	}
 
-	// 打印
-	deliver(params) {
+	//获取配送单详情
+	getDeliverDetail(params) {
 		return this.request({
-			url: '/deliver',
+			url: '/get-deliver-detail',
 			params
 		});
 	}

+ 37 - 27
admin-update/src/views/order/components/sel-order.vue

@@ -53,7 +53,7 @@
 							<!-- 打单 -->
 							<template v-if="item.actionName == '打单'">
 								<div v-if="$util.isEmpty(item.receive) && index == 0">
-									<el-button type="primary" @click="printOrderFn(index)"
+									<el-button type="primary" @click="hasDeliver"
 										>有配送单</el-button
 									>
 									<el-button type="primary" @click="fillFormFn">填单</el-button>
@@ -66,9 +66,8 @@
 									/>
 									<span v-else>无配送信息</span>
 									<div style="margin-top: 10px" v-if="!$util.isEmpty(item.receive)">
-										<el-button size="mini" @click="printOrderFn(index)">{{
-											index == 0 ? '打印' : '重打'
-										}}</el-button>
+										<el-button size="mini" v-if="orderData.printStatus == 0" @click="printOrderFn">打印</el-button>
+                                        <el-button size="mini" v-else @click="rePrintOrderFn">重打</el-button>
 									</div>
 								</div>
 							</template>
@@ -76,20 +75,20 @@
 							<template v-if="item.actionName == '发货'">
 								<div v-if="item.finishTime == 0">
 
-
-<el-popover
-  placement="top"
-  width="160"
-  v-model="sendMySelfConfirm">
-  <p>确认已送达?</p>
-  <div style="text-align: right; margin: 0">
-    <el-button size="mini" type="text" @click="sendMySelfConfirm = false">取消</el-button>
-    <el-button type="primary" size="mini" @click="sendMySelfFn">确定</el-button>
-  </div>
-  <el-button type="primary" size="small" slot="reference">自己送</el-button>
-</el-popover>
+                                    <el-popover
+                                      placement="top"
+                                      width="160"
+                                      v-model="sendMySelfConfirm">
+                                      <p>确认已送达?</p>
+                                      <div style="text-align: right; margin: 0">
+                                        <el-button size="mini" type="text" @click="sendMySelfConfirm = false">取消</el-button>
+                                        <el-button type="primary" size="mini" @click="sendMySelfFn">确定</el-button>
+                                      </div>
+                                      <el-button type="primary" size="small" slot="reference">自己送</el-button>
+                                    </el-popover>
 
 									<el-button type="primary" size="small" @click="sendShipFn" style="margin-left:15px;">代送</el-button>
+
 								</div>
 								<div v-else>
 									<template v-if="!$util.isEmpty(item.sendInfo)">
@@ -305,7 +304,7 @@
 					label-width="100px"
 					class="demo-form"
 				>
-					<template v-if="shipForm.sendType == 3">
+					<template>
 						<el-form-item label="送花时间" prop="sendTime">
 							<el-time-select
 								v-model="shipForm.sendTime"
@@ -638,20 +637,25 @@ export default {
 			this.showShipManage = false;
 		},
 		// =========================
-		// 打单
-		async printOrderFn(index) {
-			if (index == '0') {
-				await this.$service.single.printOrder({ id: this.orderData.id, option: 1 });
-			}
-
-			//this.$message.success('打单成功!');
+		//有配送单
+		hasDeliver(){
+			this.$service.single.printOrder({ id: this.orderData.id, option: 1 }).then(res =>{
+			    this.getDet();
+			});
+		},
+		//打单
+		async printOrderFn() {
+			await this.$service.single.printOrder({ id: this.orderData.id, option: 2 });
 			this.getDet();
-
-			this.$service.order.deliver({ id: this.orderData.id }).then(res => {
+			this.$service.order.getDeliverDetail({ id: this.orderData.id }).then(res => {
 				this.deliver.data = res;
-				//this.printOrder();
+			    this.printOrder();
 			});
 		},
+		//重打
+		rePrintOrderFn(){
+		    this.printOrder();
+		},
 		// 填单
 		fillFormFn() {
 			this.orderDialog = true;
@@ -663,6 +667,9 @@ export default {
 			this.$service.single
 				.orderDeliver({ id: this.orderData.id, option: 1, ...this.shipForm })
 				.then(res => {
+
+				    this.$message.success('已确认!');
+
 					this.getDet();
 					// this.shipDialog = false;
 					this.resetForm();
@@ -683,6 +690,9 @@ export default {
 			this.$service.single
 				.orderDeliver({ id: this.orderData.id, option: 1, ...this.shipForm })
 				.then(res => {
+
+				    this.$message.success('已提交!');
+
 					this.getDet();
 					// this.shipDialog = false;
 					this.resetForm();

+ 18 - 16
admin-update/src/views/order/list.vue

@@ -55,25 +55,27 @@
 
 			<!-- 状态 -->
 			<template #table-column-status="{scope}">
-				<el v-if="scope.row.status == 1">待配送</el>
-				<el v-else-if="scope.row.status == 2"
-					>配送中</el
-				>
-				<el v-else-if="scope.row.status == 3"
-					>待通知</el
-				>
-				<el v-else-if="scope.row.status == 4"
-					>已取消</el
-				>
-				<el v-else-if="scope.row.status == 5"
-					>已完成</el
-				>
-				<el v-else>待付款</el>
+
+                    <el v-if="scope.row.status == 1">待配送</el>
+                    <el v-else-if="scope.row.status == 2"
+                        >配送中</el
+                    >
+                    <el v-else-if="scope.row.status == 3"
+                        >待通知</el
+                    >
+                    <el v-else-if="scope.row.status == 4"
+                        >已取消</el
+                    >
+                    <el v-else-if="scope.row.status == 5"
+                        >已完成</el
+                    >
+                    <el v-else>待付款</el>
+
 			</template>
 
 			<!-- 进度 -->
 			<template #table-column-currentFlow="{scope}">
-				<div class="steps-wrap">
+				<div class="steps-wrap" @click="shipDrawFn(scope.row)" style="cursor:pointer;">
 					<el-steps
 						:space="200"
 						:active="parseInt(scope.row.currentFlow)"
@@ -231,7 +233,7 @@ export default {
             });
 
 		},
-		//发货
+		//发货详情
 		shipDrawFn(item) {
 			this.optionData = item;
 			setTimeout(() => {