shish 4 лет назад
Родитель
Сommit
8e291a92a4

+ 7 - 1
hdApp/src/admin/home/components/order-item.vue

@@ -6,13 +6,19 @@
 					<image :src="info.cover" mode="aspectFit"></image>
 				</view>
 				<view class="list-msg">
-					<view style="margin-top:3upx;"><text>时间:</text><text>{{info.addTime.substr(5,11)}}</text></view>
+					<view style="margin-top:3upx;"><text>时间:</text>
+					<text>{{info.reachDate.substr(5,5)}} {{info.reachPeriod}}前</text>
+					</view>
 					<view><text>收花:</text><text>{{info.receiveUserName||''}}</text></view>
 					<view style="margin-top:3upx;">
 						<text>美团:</text>
 						<text v-if="info.fromType == 4 && !$util.isEmpty(info.thirdSn)">{{info.thirdSn}}</text>
 						<text v-else></text>
 					</view>
+					<view style="margin-top:3upx;">
+						<text>下单:</text>
+						<text>{{info.shopAdminName}}</text>
+					</view>
 					<view style="margin-top:3upx;">
 						<text>备注:</text>
 						<text style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:420upx;display:inline-block;line-height:27upx;">{{info.remark||''}}</text>

+ 80 - 4
hdApp/src/admin/home/order.vue

@@ -1,6 +1,15 @@
 <template>
   <view class="app-main app-content">
     <app-tabs :tabs="tabs" :isFixed="true" :currentTab="tabIndex" :height="100" @change="change" itemWidth="20%" />
+		<view class="input-wrap" >
+			<view class="search-bar">
+				<app-search-module v-model="py" placeholder="输入编号" @input="searchFn" />
+			</view>
+			<view style="float:right">
+      <button class="admin-button-com middle blue" style="margin-right:15upx;" @click="selectStaffFn()">选择开单人</button>
+      <button class="admin-button-com middle blue" @click="cancelSelectFn()">取消选择</button>
+			</view>
+		</view>
     <view class="list-wrap">
       <block v-if="!$util.isEmpty(list.data)">
         <view class="list" v-for="(item, index) in list.data" :key="index" @click="pageTo({ url: '/admin/order/detail', query: { id: item.id } })" >
@@ -19,6 +28,7 @@
               <span class="app-size-30 app-bold">¥{{ item.orderPrice ? parseFloat(item.orderPrice) :0 }}</span>
             </view>
             <view class="list-button">
+                <view class="admin-button-com middle" @click.stop="sendOrderFn(item)">发货</view>
                 <view class="admin-button-com middle" v-if="item.payStatus == 1" @click.stop="printOrder(item)">打印</view>
                 <view class="admin-button-com default" v-else>打印</view>
             </view>
@@ -30,6 +40,19 @@
       </block>
     </view>
     <NotLogin></NotLogin>
+
+    <!--选择员工 -->
+    <uni-popup ref="getStaffRef" background-color="#fff" type="center" :animation="false">
+      <view style="display:flex;padding:20upx;height:25vh;justify-content: space-between;align-items:center;flex-wrap:wrap;">
+
+        <text v-for="(item, index) in staffList" :key="index" @click="getCurrentStaff(item.id)" 
+        style="margin-left:25upx;border:1upx solid #999999;width:100upx;height:100upx;border-radius:20upx;justify-content:center;align-items:center;display:flex;">
+          {{item.name}}
+        </text>
+
+      </view>
+    </uni-popup>
+
   </view>
 </template>
 <script>
@@ -41,8 +64,10 @@ import { getCategory, getUsage } from '@/utils/config'
 import { list } from "@/mixins";
 import { mapGetters } from 'vuex';
 import { orderClass,onlinePrintOrder } from '@/api/order'
-import { getListB, freeShipping } from "@/api/order";
+import { getListB, freeShipping,sendOrder } from "@/api/order";
 import NotLogin from "@/components/not-login";
+import {getStaffList} from '@/api/staff'
+import AppSearchModule from "@/components/module/app-search"
 export default {
   name: "order-list",
   components: {
@@ -50,7 +75,8 @@ export default {
     AppTabs,
     AppWrapperEmpty,
     ModalModule,
-    NotLogin
+    NotLogin,
+    AppSearchModule
   },
   mixins: [list],
   data () {
@@ -61,7 +87,10 @@ export default {
       operateIndex: null,
       operateData: {},
       freeShipModal: false,
-      classifyForm: { categoryId: '', usageId: '' }
+      classifyForm: { categoryId: '', usageId: '' },
+      staffList:[],
+      shopAdminId:0,
+      sendNum:''
     };
   },
   onPullDownRefresh () {
@@ -87,15 +116,53 @@ export default {
     getCategory()
     getUsage()
   },
-  onLoad: function () {},
+  onLoad: function () {
+  },
   onShow () {
     let tabIndex = uni.getStorageSync("switchTabQuery") || null;
     if (tabIndex) {
       uni.removeStorageSync("switchTabQuery");
       this.tabIndex = parseInt(tabIndex.tabIndex);
     }
+    let that = this
+    getStaffList().then(res=>{
+      if(res.code ==1){
+        this.staffList = res.data.list
+      }
+    })
   },
   methods: {
+    searchFn(e) {
+      this.resetList();
+      this.sendNum = e;
+      this.getOrderList()
+    },
+    sendOrderFn(item){
+      let that = this
+      that.$util.confirmModal({content:'确认已发货?'},() => {
+        sendOrder({id:item.id}).then(res=>{
+          if(res.code == 1){
+            that.$msg('操作成功')
+            that.resetList()
+            that.getOrderList()
+          }
+        })          
+      })
+    },
+    getCurrentStaff(id){
+      this.resetList();
+      this.shopAdminId = id
+      this.$refs.getStaffRef.close()
+      this.getOrderList()
+    },
+    selectStaffFn(){
+      this.$refs.getStaffRef.open('top')
+    },
+    cancelSelectFn(){
+      this.resetList();
+      this.shopAdminId = 0
+      this.getOrderList()
+    },
     printOrder(item){
       onlinePrintOrder({id:item.id}).then(res=>{
         if(res.code == 1){
@@ -111,6 +178,8 @@ export default {
       return getListB({
         status: status,
         search: "",
+        shopAdminId:this.shopAdminId,
+        sendNum:this.sendNum,
         page: this.list.page
       }).then(res => {
         this.completes(res);
@@ -257,4 +326,11 @@ export default {
     }
   }
 }
+.input-wrap {
+  padding: 10upx 10upx 10upx 10upx;
+  .search-bar {
+    display:inline-block;
+    width:350upx;
+  }
+}
 </style>

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

@@ -1,5 +1,9 @@
 import https from "@/plugins/luch-request_0.0.7/request";
 
+export const sendOrder = data => {
+	return https.get("/order/send", data);
+};
+
 export const onlinePrintOrder = data => {
 	return https.get("/order/print-order", data);
 };