Explorar o código

发货与配送员

shish hai 1 ano
pai
achega
66a9db2c9c

+ 2 - 2
ghsApp/src/admin/home/components/OrderItem.vue

@@ -70,7 +70,7 @@
                 <view><button @click.stop="shareOrder(item)" open-type="share" class="admin-button-com bule">分享</button> </view>
                 <block v-if="currentStatus == 2">
                   <block v-if="item.book == 0">
-                    <view><button @click.stop="directFh(item)" class="admin-button-com bule">一键发货</button> </view>
+                    <view><button @click.stop="directFh(item)" class="admin-button-com bule">发货</button> </view>
                     <view><button @click.stop="fillNoFh(item)" class="admin-button-com bule">填单发货</button> </view>
                   </block>
                   <block v-else>
@@ -78,7 +78,7 @@
                   </block>
                 </block>
                 <block v-else>
-                <view><button disabled="true" class="admin-button-com bule active">一键发货</button> </view>
+                <view><button disabled="true" class="admin-button-com bule active">发货</button> </view>
                 <view><button disabled="true" class="admin-button-com bule active">填单发货</button> </view>
                 </block>
                 <view v-if="currentStatus == 1">

+ 74 - 7
ghsApp/src/admin/home/workbench.vue

@@ -1,13 +1,34 @@
 <template>
 <view>
 
-	<block v-if="loginInfo.staff && loginInfo.staff.identity == 2">
+	<block v-if="(loginInfo.staff && loginInfo.staff.identity == 2) || showSendPage == 1">
 		<view style="font-size:38upx;font-weight:bold;">
-			<view @click="goBookAll()" style="margin-left:20upx;margin-top:20upx;">汇总统计</view>
+			<view style="margin-top:20upx;">
+				<text @click="goBookAll()" style="margin-left:20upx;">汇总统计</text>
+				<text @click="cancelSendPage()" style="float: right;margin-right:20upx;">返回</text>
+			</view>
+			<view style="height:70upx;width:100%;margin-top:10upx;">
+				<input v-model="val" type="text" style="border:1upx solid #CCCCCC;border-radius:10upx;height:94upx;padding-left:10upx;margin-left:20upx;width:540upx;float: left;" />
+				<button class="admin-button-com big blue" style="width:160upx;float:left;margin-left:15upx;" @click="clearSendSearch">清除</button>
+			</view>
+		</view>
+		<view style="margin-top:40upx;margin-left:20upx;font-size:34upx;">
+			<view v-for="(item, index) in sendOrderList" :key="index" style="margin-bottom:20upx;">
+				{{ item.addTime?item.addTime.substr(5,11):'' }} 【{{ item.customName }}】 ¥{{ item.actPrice?parseFloat(item.actPrice):0 }}
+				<text v-if="item.status == 1" style="color:#CCCCCC;margin-left:20upx;">待付款</text>
+				<text v-else-if="item.status == 2" style="color:blue;margin-left:20upx;">待发货</text>
+				<text v-else-if="item.status == 3" style="color:#CCCCCC;margin-left:20upx;">配送中</text>
+				<text v-else-if="item.status == 4" style="color:#CCCCCC;margin-left:20upx;">已完成</text>
+				<text v-else style="color:#CCCCCC;margin-left:20upx;">已取消</text>
+				<view v-if="item.status == 2" style="margin-top:8upx;height:110upx;">
+					<button class="admin-button-com big blue" @click="directFh(item)" style="float:right;width:200upx;margin-right:30upx;">发货</button>
+				</view>
+			</view>
 		</view>
+		<keyboard-module :show="keyShow" @comfirm="finishHit" @clickKey="clickKeyFn" @del="delFn" />
 	</block>
 	<block v-else>
-	
+
 
   <block v-if="loginStyle  == 0">
 	<!-- #ifdef MP-WEIXIN -->
@@ -27,7 +48,7 @@
 
 		<div class="user-wrap">
 			<div class="user-top" style="position: relative;">
-				<div class="app-size-28" @click="start()">今日概况</div>
+				<div class="app-size-28" @click="showSend()">今日概况</div>
 				<image :src="`${constant.imgUrl}/icon/notice_icon.png`" class="mind-item"></image>
 				<view class="red-mind" v-if="notifyNum>0">{{ notifyNum>9?9:notifyNum }}</view>
 				<view class="mind-mask" @click="toNotify()"> </view>
@@ -169,10 +190,14 @@ import { getWeixinId } from "@/api/invite/index";
 import { getErrorPrice } from "@/api/item"
 import { getStaffInfo } from "@/api/shop-admin"
 import { renewShop,noRemind,needRemind } from "@/api/renew"
+import { getListB,orderFh} from "@/api/order";
 import wexinPay from "@/utils/pay/wxPay";
+import keyboardModule from '@/components/keyboard'
 export default {
 	name: "workbench",
-	components: {  },
+	components: { 
+		keyboardModule
+	 },
 	mixins: [productMins,autoUpdateMixins],
 	data() {
 		return {
@@ -215,7 +240,11 @@ export default {
 			lookMoney:0,
 			notifyNum:0,
 			currentDeadline:'',
-			newDeadline:''
+			newDeadline:'',
+			val: '',
+			keyShow:true,
+			sendOrderList:[],
+			showSendPage:0
 		};
 	},
 	onShareAppMessage(res) {
@@ -272,6 +301,44 @@ export default {
 	},
 	methods: {
 		...mapActions(['setUserShopAll']),
+		directFh(info){
+			orderFh({id:info.id,fhType:0}).then(res=>{
+				if(res.code == 1){
+					info.status = 3
+					uni.showToast({ title: '已发货', icon: 'success' })
+				}
+			})      
+		},
+		cancelSendPage(){
+			this.showSendPage = 0
+		},
+		showSend(){
+			this.showSendPage = 1
+		},
+		clearSendSearch(){
+			this.sendOrderList = []
+			this.val = ''
+		},
+		finishHit() {
+			let that = this
+			this.sendOrderList = []
+			getListB({ name: this.val, searchType:1,onlySend:1,pageSize:5 }).then((res) => {
+				if(res.code == 1){
+					that.val = ''
+					if(res.data.list && !this.$util.isEmpty(res.data.list)){
+						this.sendOrderList = res.data.list
+					}
+				}
+			})
+		},
+		clickKeyFn(e) {
+			let total = this.val + e
+			this.val = total
+		},
+		delFn() {
+			let total = this.val.substr(0, this.val.length - 1)
+			this.val = total
+		},
 		toPhone(){
 			uni.makePhoneCall({ phoneNumber:'15280215347' })
 		},
@@ -435,7 +502,7 @@ export default {
 			this.pageTo({ url: '/admin/order/statBook'})
 		},
 		goBookAll(){
-			this.pageTo({ url: '/admin/order/statBook'})
+			//this.pageTo({ url: '/admin/order/statBook'})
 		},
 		goBookCustom(){
 			this.pageTo({ url: '/admin/book/custom'})

+ 108 - 0
ghsApp/src/components/keyboard.vue

@@ -0,0 +1,108 @@
+<template>
+	<div class="keyboard">
+		<bottom-popup class="popup-wrap" :show="show" maskBgcolor="none" @close="comfirm" :mask="false">
+			<div class="ui-keyboard">
+				<ul class="ui-keyboard-numbers">
+					<li :class="{'zero': item == 0}" v-for="(item, index) in keyLeftData" :key="index" @click="clickKeyFn(item)">{{ item }}</li>
+				</ul>
+				<ul class="ui-keyboard-btn">
+					<li class="btn-del" @click="del">
+                        <i class="iconfont iconshanchu"></i>
+                    </li>
+					<li class="btn-ok" @click="comfirm">搜索</li>
+				</ul>
+			</div>
+		</bottom-popup>
+	</div>
+</template>
+
+<script>
+import BottomPopup from '@/components/plugin/bottom-popup'
+export default {
+	name: 'keyboard',
+	components: {
+		BottomPopup
+	},
+	props: {
+		show: {
+			type: Boolean,
+			default: false
+		}
+	},
+	data() {
+		return {
+			keyLeftData: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '.']
+		}
+	},
+	methods: {
+		close() {
+			this.$emit('comfirm')
+		},
+		// 点击数字键盘
+		clickKeyFn(val) {
+			this.$emit('clickKey', val)
+		},
+		// 确认
+		comfirm() {
+			this.$emit('comfirm')
+		},
+		// 删除
+		del() {
+			this.$emit('del')
+		}
+	}
+}
+</script>
+
+<style lang="scss" scoped>
+    .popup-wrap {
+        .ui-keyboard {
+            @include disFlex(center, center);
+            padding: 0 20upx 20upx 20upx;
+            background-color: $backColor;
+            box-shadow: 0 -8upx 16upx #ddd;
+            // 左侧键盘
+            .ui-keyboard-numbers {
+                width: 78%;
+                display: flex;
+                align-items: center;
+                flex-wrap: wrap;
+                li {
+                    width: calc(33.33% - 20upx);
+                }
+                li.zero {
+                    width: calc(66.66% - 20upx);
+                }
+            }
+            // 右侧键盘
+            .ui-keyboard-btn {
+                width: 22%;
+                li {
+                    margin-right: 0;
+                }
+                li.btn-ok {
+                    height: 310upx;
+                    color: #fff;
+                    background-color: $mainColor;
+                    // line-height: 310upx
+                }
+            }
+            li {
+                @include disFlex(center, center);
+                height: 90upx;
+                // line-height: 90upx;
+                text-align: center;
+                border-radius: 10upx;
+                background-color: #fff;
+                margin-top: 20upx;
+                margin-right: 20upx;
+                font-size: 38upx;
+                font-weight: bold;
+                box-shadow: 0 2upx 10upx #ddd;
+            }
+            li:active {
+                background-color: rgba(0, 0, 0, 0.1);
+            }
+        }
+    }
+</style>

+ 9 - 2
ghsApp/src/pagesOrder/detail.vue

@@ -104,6 +104,13 @@
 					<view>开单人员:</view>
 					<view>{{ detailInfo.shopAdminName }}</view>
 				</view>
+				<view class="order-info_box">
+					<view>配送人员:</view>
+					<view>{{ detailInfo.sendStaffName?detailInfo.sendStaffName:'--' }}</view>
+					<view class="price">
+						<button @click="changeSend(detailInfo.orderSn)" class="admin-button-com default">修改</button>
+					</view>
+				</view>
 				<view class="order-info_box" v-if="detailInfo.status != 1 && detailInfo.status!=5">
 					<view>客户下单:</view>
 					<view v-if="detailInfo.customShopAdminId == 0">--</view>
@@ -175,11 +182,11 @@
 				商品信息
 				<view class="flex" style="font-weight:normal;">
 					<block v-if="detailInfo.status == 2 && detailInfo.book == 0">
-						<button class="admin-button-com bule" @click.stop="directFh(detailInfo)">一键发货</button>
+						<button class="admin-button-com bule" @click.stop="directFh(detailInfo)">发货</button>
 						<button class="admin-button-com bule" style="margin-left:50upx;" @click.stop="fillNoFh(detailInfo)">填单发货</button>
 					</block>
 					<block v-else>
-						<button disabled="true" class="admin-button-com bule active" style="border:1rpx solid #ccc;">一键发货</button>
+						<button disabled="true" class="admin-button-com bule active" style="border:1rpx solid #ccc;">发货</button>
 						<button disabled="true" class="admin-button-com bule active" style="margin-left:50upx;border:1rpx solid #ccc;">填单发货</button>
 					</block>
 				</view>