Kaynağa Gözat

修改配送人

shish 1 yıl önce
ebeveyn
işleme
348f264aa5

+ 3 - 3
ghsApp/src/admin/home/workbench.vue

@@ -4,7 +4,7 @@
 	<block v-if="(loginInfo.staff && loginInfo.staff.identity == 2) || showSendPage == 1">
 		<view style="font-size:38upx;font-weight:bold;">
 			<view style="margin-top:20upx;">
-				<text @click="goBookAll()" style="margin-left:20upx;">汇总统计</text>
+				<text @click="goStat()" style="margin-left:20upx;">汇总统计</text>
 				<text @click="cancelSendPage()" style="float: right;margin-right:25upx;">返回</text>
 			</view>
 			<view style="height:70upx;width:100%;margin-top:20upx;">
@@ -501,8 +501,8 @@ export default {
 		orderGather(){
 			this.pageTo({ url: '/admin/order/statBook'})
 		},
-		goBookAll(){
-			//this.pageTo({ url: '/admin/order/statBook'})
+		goStat(){
+			this.pageTo({ url: '/admin/stat/sendYj'})
 		},
 		goBookCustom(){
 			this.pageTo({ url: '/admin/book/custom'})

+ 4 - 0
ghsApp/src/api/order/index.js

@@ -1,5 +1,9 @@
 import https from "@/plugins/luch-request_0.0.7/request";
 
+export const changeSendStaffFn = data => {
+	return https.get("/order/change-send-staff", data)
+}
+
 export const modifyOrderConfirmTimeFn = data => {
 	return https.get("/order/modify-order-confirm-time", data)
 }

+ 39 - 3
ghsApp/src/pagesOrder/detail.vue

@@ -108,7 +108,7 @@
 					<view>配送人员:</view>
 					<view>{{ detailInfo.sendStaffName?detailInfo.sendStaffName:'--' }}</view>
 					<view class="price">
-						<button @click="changeSend(detailInfo.orderSn)" class="admin-button-com default">修改</button>
+						<button @click="goChangeSendStaff()" class="admin-button-com default">修改</button>
 					</view>
 				</view>
 				<view class="order-info_box" v-if="detailInfo.status != 1 && detailInfo.status!=5">
@@ -440,6 +440,18 @@
 			</template>
 		</modal-module>
 
+		<uni-popup ref="staffRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
+			<view style="max-height:90vh;overflow: scroll;">
+				<view style="margin-left:30upx;margin-top:19upx;font-size:27upx;font-weight:bold;">请选择:</view>
+				<view style="display:flex;padding:20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
+					<view v-for="(item, index) in staffListData" :key="index" @tap.stop="changeSendStaff(item)" style="margin-bottom:20upx;margin-left:3upx;">
+						<view style="margin-top:8upx;overflow: hidden;white-space: nowrap;width:120upx;text-align:center;font-weight:bold;font-size:30upx;">{{item.name}}</view>
+					</view>
+				</view>
+				<view style="text-align:center;padding:10upx 0 10upx 0;"><button class="admin-button-com big blue" @click="cancelChange()">取消选择</button></view>
+			</view>
+      	</uni-popup>
+
 	</view>
 </template>
 <script>
@@ -451,12 +463,13 @@ import { getOrderProduct,giveItem } from "@/api/order-item";
 import productMins from "@/mixins/product";
 import { ORDER_STATUS } from "@/utils/declare";
 import BLE from "@/mixins/BLE";
-import { cloudPrintOrder, cancelOrder,cancelBookOrderInfo,confirmReachFn } from "@/api/order";
+import { cloudPrintOrder, cancelOrder,cancelBookOrderInfo,confirmReachFn,changeSendStaffFn } from "@/api/order";
 import { hasHitNavigate } from "@/api/map";
 import { getWeixinId } from "@/api/invite";
 import { IMGHOST } from '@/config'
 import { partItem } from "@/api/part"
 import { delItem,updateRemarkItemFn } from "@/api/order-item";
+import { getAllStaff } from "@/api/shop-admin"
 import ModalModule from "@/components/plugin/modal"
 export default {
 	name: "orderDetail",
@@ -494,7 +507,8 @@ export default {
 			fhWlFocus:false,
 			fhLabelShow:false,
 			payDate:'',
-			currentItem:[]
+			currentItem:[],
+			staffListData:[]
 		};
 	},
 	onPullDownRefresh() {
@@ -513,6 +527,13 @@ export default {
 		let pages = getCurrentPages();
 		let prevPage = pages[ pages.length - 2 ];
 		prevPage.$vm.fromDetail = {status:1}
+
+		getAllStaff().then(res=>{
+			if(res.code == 1){
+				this.staffListData = res.data.list
+			}
+      	})
+
 	},
 	computed: {
 		...mapGetters({ loginInfo: "getLoginInfo",dictInfo:"getDictionariesInfo" }),
@@ -527,6 +548,21 @@ export default {
 		}
 	},
 	methods: {
+		cancelChange(){
+			this.$refs.staffRef.close()
+		},
+		goChangeSendStaff(){
+			this.$refs.staffRef.open('center')
+		},
+		changeSendStaff(staff){
+			changeSendStaffFn({staffId:staff.id,orderId:this.detailInfo.id}).then(res=>{
+				if(res.code == 1){
+					this.$refs.staffRef.close()
+					this.$msg('修改成功')
+					this.init()
+				}
+			})
+		},
 		getBookChange(){
 			this.$util.pageTo({url: '/pagesOrder/bookChange?orderId='+this.detailInfo.id})
 		},