Bläddra i källkod

erp接入完成

wangtao 2 år sedan
förälder
incheckning
4fbe82feca

+ 1 - 1
src/plugins/axios.js

@@ -5,7 +5,7 @@ import axios from "axios";
 // Full config:  https://github.com/axios/axios#request-config
 
 //axios.defaults.baseURL = 'http://172.16.120.104:8085/'; //本地
-axios.defaults.baseURL = 'https://smartpark.caih.com/dxapi'; //东信部署
+axios.defaults.baseURL = 'https://smartpark.caih.com/dxapi/'; //东信部署
 // axios.defaults.baseURL = process.env.baseURL || process.env.apiUrl || '';
 // axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;
 // axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';

+ 31 - 31
src/views/catering/index.vue

@@ -19,37 +19,37 @@
     <van-row class="bottom">
         <van-row class="orderList" v-if="active==0">
           <van-col span="24" v-for="(item,index) in order" :key="index" class="order" @click="orderOne(item)">
-              <van-col span="12" class="dcrText" style="margin-top:0">点餐人:</van-col>
-              <van-col span="12" class="dcr" style="margin-top:0">{{item.orderUserName}}</van-col>
-              <van-col span="12" class="scAddressText">送餐地址:</van-col>
-              <van-col span="12" class="scAddress">{{item.address}}</van-col>
-              <van-col span="12" class="statusText">当前状态:</van-col>
-              <van-col span="12" :class="item.orderStatus == '3' ? 'status' : 'status1'">
+              <van-col span="5" class="dcrText" style="margin-top:0">点餐人:</van-col>
+              <van-col offset="1" span="18" class="dcr" style="margin-top:0">{{item.orderUserName}}</van-col>
+              <van-col span="5" class="scAddressText">送餐地址:</van-col>
+              <van-col offset="1" span="18" class="scAddress">{{item.address}}</van-col>
+              <van-col span="5" class="statusText">当前状态:</van-col>
+              <van-col offset="1" span="18" :class="item.orderStatus == '3' ? 'status' : 'status1'">
                   {{item.orderStatus == "0" ? "待接单" : item.orderStatus == "1" ? "配餐中" : item.orderStatus == "2" ? "送餐中"  : "已完成"}}
               </van-col>
               <van-steps :active="item.orderStatus == '0' ? '-1' : item.orderStatus" v-if="item.orderStatus != '3'"  active-color="#D7000F" inactive-color="#999999">
-                <van-step>待接单</van-step>
-                <van-step>配餐中</van-step>
-                <van-step>送餐中</van-step>
-                </van-steps>
+                <van-step>{{ item.orderStatus == 0 ? '待接单' : item.orderStatus == 1 ? '已接单' : item.orderStatus == 2 ? '已接单' : '接单' }}</van-step>
+                <van-step>{{ item.orderStatus == 1 ? '配餐中' : item.orderStatus == 2 ? '已配餐' : '配餐' }}</van-step>
+                <van-step>{{ item.orderStatus == 2 ? '送餐中' : '送餐' }}</van-step>
+              </van-steps>
           </van-col>
           <van-col span="24" class="noMore">没有更多数据了</van-col>
         </van-row>
         <van-row class="orderList" v-if="active==1">
           <van-col span="24" v-for="(item,index) in order" :key="index" class="order" @click="orderOne(item)">
-              <van-col span="12" class="dcrText" style="margin-top:0">点餐人:</van-col>
-              <van-col span="12" class="dcr" style="margin-top:0">{{item.orderUserName}}</van-col>
-              <van-col span="12" class="scAddressText" >送餐地址:</van-col>
-              <van-col span="12" class="scAddress">{{item.address || "-"}}</van-col>
-              <van-col span="12" class="statusText">当前状态:</van-col>
-              <van-col span="12" :class="item.orderStatus == '3' ? 'status' : 'status1'">
+              <van-col span="5" class="dcrText" style="margin-top:0">点餐人:</van-col>
+              <van-col offset="1" span="18" class="dcr" style="margin-top:0">{{item.orderUserName}}</van-col>
+              <van-col span="5" class="scAddressText" >送餐地址:</van-col>
+              <van-col offset="1" span="18" class="scAddress">{{item.address || "-"}}</van-col>
+              <van-col span="5" class="statusText">当前状态:</van-col>
+              <van-col offset="1" span="18" :class="item.orderStatus == '3' ? 'status' : 'status1'">
                   {{item.orderStatus == "0" ? "待接单" : item.orderStatus == "1" ? "配餐中" : item.orderStatus == "2" ? "送餐中"  : "已完成"}}
               </van-col>
-              <van-steps :active="item.orderStatus == '0' ? '-1' : item.orderStatus" v-if="item.orderStatus != '3'"  active-color="#D7000F" inactive-color="#999999">
-                <van-step>待接单</van-step>
-                <van-step>配餐中</van-step>
-                <van-step>送餐中</van-step>
-                </van-steps>
+              <!-- <van-steps :active="item.orderStatus == '0' ? '-1' : item.orderStatus" v-if="item.orderStatus != '3'"  active-color="#D7000F" inactive-color="#999999">
+                <van-step>{{ item.orderStatus == 0 ? '待接单' : item.orderStatus == 1 ? '已接单' : item.orderStatus == 2 ? '已接单' : '接单' }}</van-step>
+                <van-step>{{ item.orderStatus == 1 ? '配餐中' : item.orderStatus == 2 ? '已配餐' : '配餐' }}</van-step>
+                <van-step>{{ item.orderStatus == 2 ? '送餐中' : '送餐' }}</van-step>
+                </van-steps> -->
           </van-col>
           <van-col span="24" class="noMore">没有更多数据了</van-col>
         </van-row>
@@ -57,16 +57,16 @@
     <van-dialog v-model="show" class="pcDialog">
        <van-row class="orderDetails">
            <van-col class="order" span="24">
-              <van-col span="12" style="margin-top:0">订餐人:</van-col>
-              <van-col span="12" style="margin-top:0">{{orderDetails.orderUserName || '-'}}</van-col>
-              <van-col span="12">餐别:</van-col>
-              <van-col span="12">{{orderDetails.mType || '-'}}</van-col>
-              <van-col span="12">手机号:</van-col>
-              <van-col span="12">{{orderDetails.phone || '-'}}</van-col>
-              <van-col span="12">送餐地址:</van-col>
-              <van-col span="12">{{orderDetails.address  || "-"}}</van-col>
-              <van-col span="12">备注:</van-col>
-              <van-col span="12">{{orderDetails.remark || '-'}}</van-col>
+              <van-col span="7" style="margin-top:0">订餐人:</van-col>
+              <van-col offset="1" span="16" style="margin-top:0">{{orderDetails.orderUserName || '-'}}</van-col>
+              <van-col span="7">餐别:</van-col>
+              <van-col offset="1" span="16">{{orderDetails.mType || '-'}}</van-col>
+              <van-col span="7">手机号:</van-col>
+              <van-col offset="1" span="16">{{orderDetails.phone || '-'}}</van-col>
+              <van-col span="7">送餐地址:</van-col>
+              <van-col offset="1" span="16">{{orderDetails.address  || "-"}}</van-col>
+              <van-col span="7">备注:</van-col>
+              <van-col offset="1" span="16">{{orderDetails.remark || '-'}}</van-col>
            </van-col>
           <van-col class="detailsText">配餐明细</van-col>
           <van-col  span="24"  class="dishes">

+ 12 - 9
src/views/home/index.vue

@@ -33,27 +33,27 @@
     <van-row class="contentBox">
       <van-row class="system">
         <van-row  type="flex"  gutter="10" class="menu">
-          <van-col span="6" class="function" @click="sm('https://smartpark.caih.com/h5/#/licence',1)">
+          <!-- <van-col span="6" class="function" @click="sm('https://smartpark.caih.com/h5/#/licence',1)">
             <van-image :src="require('../../assets/image/function/icon2.png')" />
             <div class="title">车牌登记</div>
-          </van-col>
+          </van-col> -->
           <van-col span="6" class="function" @click="ykt">
             <van-image :src="require('../../assets/image/function/icon3.png')" />
             <div class="title">一卡通</div>
           </van-col>
-          <van-col span="6" class="function" @click="sm('https://smartpark.caih.com/h5/#/visitorApply',2)">
+          <!-- <van-col span="6" class="function" @click="sm('https://smartpark.caih.com/h5/#/visitorApply',2)">
             <van-image :src="require('../../assets/image/function/icon6.png')" />
             <div class="title">访客申请</div>
-          </van-col>
-          <van-col span="6" class="function" @click="sm('https://smartpark.caih.com/h5/#/safeIndex',3)" v-if="people57 == '1'">
+          </van-col> -->
+          <!-- <van-col span="6" class="function" @click="sm('https://smartpark.caih.com/h5/#/safeIndex',3)" v-if="people57 == '1'">
             <van-image :src="require('../../assets/image/function/icon10.png')" />
             <div class="title">综合安防</div>
-          </van-col>
-          <van-col span="6" class="function" @click="dc" >
+          </van-col> -->
+          <!-- <van-col span="6" class="function" @click="dc" >
             <van-image :src="require('../../assets/image/function/dc.png')" />
             <div class="title">点餐服务</div>
-          </van-col>
-          <van-col span="6" class="function" @click="pc" >
+          </van-col> -->
+          <van-col span="6" class="function" @click="pc" v-if="pcy">
             <van-image :src="require('../../assets/image/function/pc.png')" />
             <div class="title">配餐服务</div>
           </van-col>
@@ -156,6 +156,7 @@ export default {
         dept57:undefined,
         phone57:undefined,
         people57:false,
+        pcy:false,
       loading: false,
       loadingPlateNumber:true,
       plateNumber:undefined,//车牌号
@@ -182,11 +183,13 @@ export default {
     };
   },
   created(){
+    
     // if(Cookies.get("userId57")){
     //   this.userId = Cookies.get("userId57")
     // }else{
     //   this.$router.push({ path: "/login"})
     // }
+    this.pcy = localStorage.getItem("pcy")
     this.portrait57 = Cookies.get("portrait57")
     this.nickName57 = Cookies.get("nickName57")
     this.dept57 = Cookies.get("dept57")

+ 2 - 3
src/views/information/index.vue

@@ -248,10 +248,9 @@ export default {
         localStorage.removeItem("cipher57")
         localStorage.removeItem("dwtype")
         localStorage.removeItem("cipher")
+        localStorage.removeItem("pcy")
         
-        
-        
-        
+
         this.$router.push({ path: "/"})
 
         

+ 57 - 11
src/views/login/index.vue

@@ -126,7 +126,7 @@ export default {
         let code = this.getRequest("code")
         this.wx_openid(code)
       }else{
-        this.wx_login()
+        this.wx_login2()
       }
     }
     
@@ -146,8 +146,8 @@ export default {
        }
        return gvalue;
      },
-    wx_login(){//微信拉起授权获取code
-      window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd64360a4b8c50006&redirect_uri=https://smartpark.caih.com/dxapi//vuepay2&response_type=code&scope=snsapi_base&state=123`
+    wx_login2(){//微信拉起授权获取code
+      window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd64360a4b8c50006&redirect_uri=https://smartpark.caih.com/vuepay2&response_type=code&scope=snsapi_base&state=123`
       //获取openid
       //https://api.weixin.qq.com/sns/oauth2/access_token?appid=wxd64360a4b8c50006&secret=b758e45c89162542610509dafd9db7c3&code=021Ye8Ha1jvNXC0ckiJa1JtKPF2Ye8Hp&grant_type=authorization_code
     },
@@ -222,10 +222,31 @@ export default {
                       id:data.userId,
                       openId:Cookies.get("openid57")
                     })
-                    setTimeout(()=>{
-                     //this.$router.push({ path: `/home`}) 
-                      window.location.href = "https://smartpark.caih.com/vuepay2/#/home"
-                    },200)
+                    axios.get("https://smartpark.caih.com/dxapi/dxtop/staff/one",{
+                      params:{
+                        id: Cookies.get("userId57")
+                      }
+                    }).then(res2=>{
+                      let data2 = res2.data.data.sid
+                      axios.get('https://smartpark.caih.com/dxapi/dreUser/page', {
+                        params:{
+                          current:1,size:500
+                        }
+                      }).then(res3 => {
+                        let data3 = res3.data.data.records
+                        if(data3.length>0){
+                          for(let a =0;a<data3.length;a++){
+                            if(data2 == data3[a].sid){
+                              localStorage.setItem("pcy", 1)
+                            }
+                          }
+                        }
+                        setTimeout(()=>{
+                          //this.$router.push({ path: `/home`}) 
+                          window.location.href = "https://smartpark.caih.com/vuepay2/#/home"
+                        },200)
+                     })
+                    })
                   }
 
                 }else if(data.user.dmUser.type == "01"){
@@ -253,10 +274,35 @@ export default {
                       id:data.userId,
                       openId:Cookies.get("openid57")
                     })
-                    setTimeout(()=>{
-                      //this.$router.push({ path: `/home`}) 
-                      window.location.href = "https://smartpark.caih.com/vuepay2/#/home"
-                    },200)
+                    axios.put('/dxtop/staff', {
+                      id:data.userId,
+                      openId:Cookies.get("openid57")
+                    })
+                    axios.get("https://smartpark.caih.com/dxapi/dxtop/staff/one",{
+                      params:{
+                        id: Cookies.get("userId57")
+                      }
+                    }).then(res2=>{
+                      let data2 = res2.data.data.sid
+                      axios.get('https://smartpark.caih.com/dxapi/dreUser/page', {
+                        params:{
+                          current:1,size:500
+                        }
+                      }).then(res3 => {
+                        let data3 = res3.data.data.records
+                        if(data3.length>0){
+                          for(let a =0;a<data3.length;a++){
+                            if(data2 == data3[a].sid){
+                              localStorage.setItem("pcy", 1)
+                            }
+                          }
+                        }
+                        setTimeout(()=>{
+                          //this.$router.push({ path: `/home`}) 
+                          window.location.href = "https://smartpark.caih.com/vuepay2/#/home"
+                        },200)
+                     })
+                    })
                     
                   }
                 }else if(data.user.dmUser.type == "02"){

+ 8 - 10
src/views/orderingFood/address/index.vue

@@ -74,7 +74,7 @@ export default {
           remarks:undefined,
           tel:undefined,
           address:undefined,
-          id:"自定义送餐地址:",
+          id:"",
       },
       title: "送餐地址",
       money: 0,
@@ -119,11 +119,7 @@ export default {
   },
   methods: {
     fanhuiBtn() {
-       this.$router.push({path:'/orderService'})
-    },
-    diancan() {},
-    onConfirm() {
-      this.$refs.item.toggle();
+      this.$router.go(-2)
     },
     change(id) {
         this.form.id = id
@@ -143,13 +139,13 @@ export default {
 
         }
       }
-      if(this.form.id == "自定义送餐地址:" && !this.form.address){
+      if(this.form.id == "" && !this.form.address){
         Toast("送菜地址不能为空")
         return
       }
       axios.get("https://smartpark.caih.com/dxapi/dxtop/staff/one",{
           params:{
-            id: Cookies.get("userId57")
+            id: localStorage.getItem("user_wt")
           }
         }).then(res2 =>{
           axios.post(`https://smartpark.caih.com/dxapi/dreOrder/`,
@@ -171,7 +167,7 @@ export default {
                 title: '系统信息',
                 message: '您的点餐已进入配餐流程,请耐心等候,谢谢!',
               }).then(() => {
-                this.$router.push({ path: "/orderingFood"})
+                this.$router.go(-2)
               });
               setTimeout(()=>{
                 document.getElementsByClassName("van-button__text")[1].innerHTML = "关闭"
@@ -259,7 +255,6 @@ export default {
         }
         textarea{
             width:calc(100% - 20px);
-            margin:10px 0 0;
             border:1px solid #ccc;
             border-radius: 4px;
             padding:0px 10px;
@@ -267,6 +262,9 @@ export default {
             border:1px solid rgba(204,204,204,1);
         }
   }
+  .remarks{
+    padding-bottom:160px;
+  }
   .bottom {
     background: #fff;
     width: 100%;

+ 192 - 51
src/views/orderingFood/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="mianBox" v-if="status">
+  <div class="mianBox">
     <van-row class="headerBox" >
       <van-col class="returnWrap" @click="fanhuiBtn">
         <van-image class="arrow-left"
@@ -30,35 +30,71 @@
             </van-col>
         </van-row>
         <van-row class="orderList">
-          <van-col span="24" v-for="(item,index) in order" :key="index" class="order">
-              <van-col span="12" class="moneyText">下单金额:</van-col>
-              <van-col span="12" class="money" >¥{{item.totalMoney}}</van-col>
-              <van-col span="12" class="moneyText">已点菜品:</van-col>
-              <van-col span="12" class="money">{{item.dishes}}</van-col>
-              <van-col span="12" class="orderTimeText">下单时间:</van-col>
-              <van-col span="12" class="orderTime">{{item.orderTime}}</van-col>
-              <van-col span="12" class="statusText">当前状态:</van-col>
-              <van-col span="12" :class="item.orderStatus == '3' ? 'status' : 'status1'">
+          <van-row span="24" v-for="(item,index) in order" :key="index" class="order" @click="orderOne(item)">
+              <van-col span="5" class="moneyText">下单金额:</van-col>
+              <van-col offset="1" span="18" class="money" >¥{{item.totalMoney}}</van-col>
+              <van-col span="5" class="moneyText">已点菜品:</van-col>
+              <van-col offset="1" span="18" class="money">{{item.dishes}}</van-col>
+              <van-col span="5" class="orderTimeText">下单时间:</van-col>
+              <van-col offset="1" span="18" class="orderTime">{{item.orderTime}}</van-col>
+              <van-col span="5" class="statusText">当前状态:</van-col>
+              <van-col offset="1" span="18" :class="item.orderStatus == '3' ? 'status' : 'status1'">
                   {{item.orderStatus == "0" ? "待接单" : item.orderStatus == "1" ? "配餐中" : item.orderStatus == "2" ? "送餐中"  : "已完成"}}
               </van-col>
               <van-steps  :active="item.orderStatus == '0' ? '-1' : item.orderStatus" v-if="item.orderStatus != '3'"  active-color="#D7000F" inactive-color="#999999">
-                <van-step>待接单</van-step>
-                <van-step>配餐中</van-step>
-                <van-step>送餐中</van-step>
+                <van-step>{{ item.orderStatus == 0 ? '待接单' : item.orderStatus == 1 ? '已接单' : item.orderStatus == 2 ? '已接单' : '接单' }}</van-step>
+                <van-step>{{ item.orderStatus == 1 ? '配餐中' : item.orderStatus == 2 ? '已配餐' : '配餐' }}</van-step>
+                <van-step>{{ item.orderStatus == 2 ? '送餐中' : '送餐' }}</van-step>
              </van-steps>
-          </van-col>
-          <van-col span="24" class="noMore" v-if="over">没有更多数据了</van-col>
+          </van-row>
+          <!-- <van-col span="24" class="noMore" v-if="over">{{dd}}</van-col> -->
+           <van-col span="24" class="noMore" v-if="over">没有更多数据了</van-col>
           <van-col span="24" class="noData" v-if="over2">暂无点餐信息</van-col>
         </van-row>
     </van-row>
+    <van-dialog v-model="open" class="pcDialog">
+      <van-row class="orderDetails">
+        <van-col class="detailsTitle">点餐明细</van-col>
+        <van-col class="order" span="24">
+            <van-col span="7" style="margin-top:0">订餐人:</van-col>
+            <van-col offset="1" span="16" style="margin-top:0">{{orderDetails.orderUserName || '-'}}</van-col>
+            <van-col span="7">餐别:</van-col>
+            <van-col offset="1" span="16">{{orderDetails.mType || '-'}}</van-col>
+            <van-col span="7">手机号:</van-col>
+            <van-col offset="1" span="16">{{orderDetails.phone || '-'}}</van-col>
+            <van-col span="7">送餐地址:</van-col>
+            <van-col offset="1" span="16">{{orderDetails.address  || "-"}}</van-col>
+            <van-col span="7">备注:</van-col>
+            <van-col offset="1" span="16">{{orderDetails.remark || '-'}}</van-col>
+        </van-col>
+        <van-col class="detailsText">已点菜品</van-col>
+        <van-col  span="24"  class="dishes">
+          <van-col span="24" v-for="(item,index) in dishes" :key="index" class="list">
+              <van-col span="12" class="name">{{item.mName}}</van-col>
+              <van-col span="12" class="num">{{item.mCount}}份</van-col>
+          </van-col>
+        </van-col>
+        <van-col class="statusSelect">
+          <van-col class="select gb" @click="close">
+            关闭
+          </van-col>
+        </van-col>
+        
+      </van-row>
+    </van-dialog>
   </div>
 </template>
 <script>
 import { getNowTime } from "@/assets/js/dataFormate.js";
 import Cookies from "js-cookie";
+import {
+  Dialog,
+  Toast,
+} from "vant";
 export default {
   data() {
     return {
+      dd:undefined,
       status:false,
       title:"自助点餐",
       type:undefined,
@@ -66,39 +102,17 @@ export default {
       RecommendedDishes:[],
       order:[],
       over:false,//数据拉载完成
-      over2:false
-      
+      over2:false,
+      open:false,
+      orderDetails:{},
+      dishes:[],
     };
   },
+  components: {
+    [Dialog.name]: Dialog,
+    [Toast.name]: Toast,
+  },
   created() {
-    var url = window.location.href;
-    if(this.$route.query.token){
-      axios({//查询信息
-        method: 'get',
-        url: 'https://smartpark.caih.com/zkxt/api/thirdparty/v1/user/getZkUserByCipher?cipher=' + this.$route.query.token,
-        timeout: 10000,
-      }).then(res =>{
-        if(res.data?.data?.id){
-          Cookies.set("nickName57", res.data.data.data.user.nickName, { expires: 300 });
-          //axios.get(`/dxtop/staff/one?id=0001T110000000002HBL`).then(res2 => { //测试
-          axios.get(`/dxtop/staff/one?id=${res.data.data.id}`).then(res2 => { //验证充值信息是否同步
-            if(res2.data.data){
-              localStorage.setItem("user_wt", res.data.data.id)
-              // localStorage.setItem("user_wt", "0001T110000000002HBL") //测试id
-              localStorage.setItem("cardId57", res2.data.data.cardId)
-            }else{
-              this.userNoAlert()
-            }
-          })
-        }else if(res.data?.data?.cardId){
-          Toast("用户卡号未绑定")
-        }else{
-          this.userNoAlert()
-        }
-      }).catch(err =>{
-        this.userNoAlert()
-      });
-    }
     let nowTime = getNowTime().split(" ")[1].substring(0,2)
     if(0 < nowTime && nowTime < 9){
       this.type = "早餐"
@@ -116,13 +130,23 @@ export default {
       this.type = "宵夜"
       this.time = "19:00 - 24:00"
     }
+    if(localStorage.getItem("tokenERP")){
+
+    }else if(this.$route.query.token){
+      this.getToken()
+    }else{
+      Toast("没有获取token信息")
+    }
+    
+    
+  },
+  mounted(){
     //获取菜单
     axios.get(`https://smartpark.caih.com/dxapi/dreMenu/list?current=1&size=500&type=${this.type}&isRecommend=1`).then(res => { 
      const data = res.data.data.records
      this.RecommendedDishes  = data
     })
-  },
-  mounted(){
+
     document.title = '中国东信智慧园区'
     let startTime = getNowTime().split(" ")[0] + " 00:00:00"
     let endTime = getNowTime().split(" ")[0] + " 23:59:59"
@@ -130,7 +154,7 @@ export default {
       axios.post(`https://smartpark.caih.com/dxapi/dreOrder/page`,{
         current:1,
         size:500,
-        orderUserName:localStorage.getItem("nickName57"),
+        orderUserName:Cookies.get("nickName57"),
         startTime:startTime,
         endTime:endTime,
       }).then(res => { 
@@ -161,6 +185,21 @@ export default {
       })
   },
   methods: {
+    getToken(){
+      localStorage.setItem("tokenERP",this.$route.query.token)
+      axios({//查询信息
+        method: 'get',
+        url: 'https://smartpark.caih.com/zkxt/api/thirdparty/v1/user/getZkUserByCipher?cipher=' + this.$route.query.token,
+        timeout: 10000,
+      }).then(res =>{
+        if(res.data?.data?.id){
+          Cookies.set("nickName57", res.data.data.name, { expires: 300 });
+          localStorage.setItem("user_wt", res.data.data.id)
+        }
+      }).catch(err =>{
+        this.userNoAlert()
+      });
+    },
     userNoAlert(){
       Toast("当前账户初始流程中,请耐心等待或联系管理人员查询")
     },
@@ -174,7 +213,17 @@ export default {
     },
     /** 返回上级或app目录页 */
     fanhuiBtn(){
-      this.$router.push({ path: "/home"})
+      //this.$router.back()
+      this.$router.go(-1)
+      //this.$router.push({ path: "/home"})
+    },
+    orderOne(row){
+      this.open = true
+      this.orderDetails = row
+      this.dishes = row.dreOrderDetails
+    },
+    close(){
+      this.open = false
     }
   },
 };
@@ -278,6 +327,11 @@ export default {
                 .money,.orderTime,.status{
                     color:#333;
                     text-align: right;
+                     white-space: nowrap;
+                    /* 超出隐藏 */
+                    overflow: hidden;
+                    /* 文本超出显示成... */
+                    text-overflow: ellipsis;
                 }
                 div{
                     font-size: 14px;
@@ -320,6 +374,92 @@ export default {
           background-color: #ffffff;
         }
     }
+    .pcDialog{
+        border-radius: 5px;
+        width:85%;
+        padding:20px 0;
+        .orderDetails{
+            .detailsTitle{
+              font-size: 18px;
+              margin-top:0px;
+              text-align: center;
+              font-weight: 700;
+              width:100%;
+            }
+            .order{
+                padding:0px 16px 20px;
+                border-bottom:1px solid #F0F0F0;
+                div{
+                    margin-top:8px;
+                    line-height: 20px;
+                }
+                div:nth-child(odd){
+                    text-align: left;
+                    color:#999999;
+                }
+                div:nth-child(even){
+                    text-align: right;
+                    color:#333;  
+                }
+            }
+        }
+        .detailsText,.jjPhone{
+            font-size: 15px;
+            margin:20px 16px 8px;
+            font-weight: 700;
+        }
+        .jjPhone{
+            margin:20px 16px 0;
+        }
+        .dishes{
+            max-height:calc(100vh - 550px);
+            overflow-y: scroll;
+            padding:0px 16px;
+            .list{
+                color:#333;
+                font-size: 15px;
+                height:40px;
+                line-height: 40px;
+                width:100%;
+                div:nth-child(odd){
+                    text-align: left;
+                    padding-left:10px;
+                }
+                div:nth-child(even){
+                    text-align: right;
+                    padding-right:10px;
+                }
+            }
+            
+            .list:nth-child(odd){
+                background: #F9F9F9;
+            }
+            .list:nth-child(even){
+                background: #F0F0F0;
+            }
+            
+        }
+        .statusSelect{
+            margin:20px 0 0;
+            width:100%;
+            box-sizing: border-box;
+            padding:0 16px;
+            .select{
+                height:44px;
+                line-height: 44px; 
+                font-size: 17px;
+                text-align: center;
+                border-radius: 5px;
+                width:100%;
+            }
+
+            .gb{
+                color: #fff;
+                background:#D7000F;
+                border-radius: 5px;
+            }
+        }
+    }
     
 }
 
@@ -355,6 +495,7 @@ export default {
 .van-step--horizontal .van-step__circle-container{
   padding:0;
   left:0;
+  margin-top:1px;
 }
 .van-step--horizontal:last-child .van-step__title{
   margin-left:-40px;
@@ -368,10 +509,10 @@ export default {
   border:none;
 }
 .van-step--horizontal:last-child .van-step__circle-container{
-  right:14px !important;
+  right:12px !important;
 }
 .van-step--horizontal:last-child .van-step__circle-container{
-  right:14px !important;
+  right:12px !important;
 }
 .van-step__title--active{
   color:#333 !important;

+ 139 - 12
src/views/orderingFood/orderList/index.vue

@@ -11,15 +11,15 @@
     </van-row>
     <van-row class="top">
         <van-row class="orderList">
-          <van-col span="24" v-for="(item,index) in order" :key="index" class="order">
-              <van-col span="12" class="moneyText">下单金额:</van-col>
-              <van-col span="12" class="money">¥{{item.totalMoney}}</van-col>
-              <van-col span="12" class="moneyText">已点菜品:</van-col>
-              <van-col span="12" class="money">{{item.dishes}}</van-col>
-              <van-col span="12" class="orderTimeText">下单时间:</van-col>
-              <van-col span="12" class="orderTime">{{item.orderTime}}</van-col>
-              <van-col span="12" class="statusText">当前状态:</van-col>
-              <van-col span="12" :class="item.orderStatus == '3' ? 'status' : 'status1'">
+          <van-col span="24" v-for="(item,index) in order" :key="index" class="order" @click="orderOne(item)">
+              <van-col span="5" class="moneyText">下单金额:</van-col>
+              <van-col offset="1" span="18" class="money">¥{{item.totalMoney}}</van-col>
+              <van-col span="5" class="moneyText">已点菜品:</van-col>
+              <van-col offset="1" span="18" class="money">{{item.dishes}}</van-col>
+              <van-col span="5" class="orderTimeText">下单时间:</van-col>
+              <van-col offset="1" span="18" class="orderTime">{{item.orderTime}}</van-col>
+              <van-col span="5" class="statusText">当前状态:</van-col>
+              <van-col offset="1" span="18" :class="item.orderStatus == '3' ? 'status' : 'status1'">
                   {{item.orderStatus == "0" ? "待接单" : item.orderStatus == "1" ? "配餐中" : item.orderStatus == "2" ? "送餐中"  : "已完成"}}
               </van-col>
           </van-col>
@@ -27,6 +27,36 @@
           <van-col span="24" class="noData" v-if="over2">暂无点餐信息</van-col>
         </van-row>
     </van-row>
+    <van-dialog v-model="open" class="pcDialog">
+      <van-row class="orderDetails">
+        <van-col class="detailsTitle">点餐明细</van-col>
+        <van-col class="order" span="24">
+            <van-col span="7" style="margin-top:0">订餐人:</van-col>
+            <van-col offset="1" span="16" style="margin-top:0">{{orderDetails.orderUserName || '-'}}</van-col>
+            <van-col span="7">餐别:</van-col>
+            <van-col offset="1" span="16">{{orderDetails.mType || '-'}}</van-col>
+            <van-col span="7">手机号:</van-col>
+            <van-col offset="1" span="16">{{orderDetails.phone || '-'}}</van-col>
+            <van-col span="7">送餐地址:</van-col>
+            <van-col offset="1" span="16">{{orderDetails.address  || "-"}}</van-col>
+            <van-col span="7">备注:</van-col>
+            <van-col offset="1" span="16">{{orderDetails.remark || '-'}}</van-col>
+        </van-col>
+        <van-col class="detailsText">已点菜品</van-col>
+        <van-col  span="24"  class="dishes">
+          <van-col span="24" v-for="(item,index) in dishes" :key="index" class="list">
+              <van-col span="12" class="name">{{item.mName}}</van-col>
+              <van-col span="12" class="num">{{item.mCount}}份</van-col>
+          </van-col>
+        </van-col>
+        <van-col class="statusSelect">
+          <van-col class="select gb" @click="close">
+            关闭
+          </van-col>
+        </van-col>
+        
+      </van-row>
+    </van-dialog>
   </div>
 </template>
 <script>
@@ -39,6 +69,9 @@ export default {
       order:[],
       over:false,//数据拉载完成
       over2:false,
+      open:false,
+      orderDetails:{},
+      dishes:[],
     };
   },
   mounted(){
@@ -47,7 +80,7 @@ export default {
       axios.post(`https://smartpark.caih.com/dxapi/dreOrder/page`,{
         current:1,
         size:500,
-        // orderUserName:Cookies.get("nickName57")
+        orderUserName:Cookies.get("nickName57")
       }).then(res => { 
         const data = res.data.data.records
         const arr = data.slice(0,5)
@@ -77,8 +110,16 @@ export default {
   },
   methods: {
       fanhuiBtn(){
-        this.$router.push({path:'/orderingFood'})
-      }
+        this.$router.go(-1)
+      },
+      orderOne(row){
+        this.open = true
+        this.orderDetails = row
+        this.dishes = row.dreOrderDetails
+      },
+    close(){
+      this.open = false
+    }
   }
 };
 </script>
@@ -142,6 +183,92 @@ export default {
           background-color: #ffffff;
         }
     }
+    .pcDialog{
+        border-radius: 5px;
+        width:85%;
+        padding:20px 0;
+        .orderDetails{
+            .detailsTitle{
+              font-size: 18px;
+              margin-top:0px;
+              text-align: center;
+              font-weight: 700;
+              width:100%;
+            }
+            .order{
+                padding:0px 16px 20px;
+                border-bottom:1px solid #F0F0F0;
+                div{
+                    margin-top:8px;
+                    line-height: 20px;
+                }
+                div:nth-child(odd){
+                    text-align: left;
+                    color:#999999;
+                }
+                div:nth-child(even){
+                    text-align: right;
+                    color:#333;  
+                }
+            }
+        }
+        .detailsText,.jjPhone{
+            font-size: 15px;
+            margin:20px 16px 8px;
+            font-weight: 700;
+        }
+        .jjPhone{
+            margin:20px 16px 0;
+        }
+        .dishes{
+            max-height:calc(100vh - 550px);
+            overflow-y: scroll;
+            padding:0px 16px;
+            .list{
+                color:#333;
+                font-size: 15px;
+                height:40px;
+                line-height: 40px;
+                width:100%;
+                div:nth-child(odd){
+                    text-align: left;
+                    padding-left:10px;
+                }
+                div:nth-child(even){
+                    text-align: right;
+                    padding-right:10px;
+                }
+            }
+            
+            .list:nth-child(odd){
+                background: #F9F9F9;
+            }
+            .list:nth-child(even){
+                background: #F0F0F0;
+            }
+            
+        }
+        .statusSelect{
+            margin:20px 0 0;
+            width:100%;
+            box-sizing: border-box;
+            padding:0 16px;
+            .select{
+                height:44px;
+                line-height: 44px; 
+                font-size: 17px;
+                text-align: center;
+                border-radius: 5px;
+                width:100%;
+            }
+
+            .gb{
+                color: #fff;
+                background:#D7000F;
+                border-radius: 5px;
+            }
+        }
+    }
     
 }
 </style>

+ 2 - 2
src/views/orderingFood/orderService/index.vue

@@ -169,7 +169,7 @@ export default {
     },
     /** 返回 */
     fanhuiBtn() {
-      this.$router.push({path:'/orderingFood'})
+      this.$router.go(-1)
     },
     /** 餐别类型状态切换 */
     onChange(id,value) {
@@ -203,7 +203,7 @@ export default {
     /** 菜单 */
     foodMenu(id){
       this.foodList  = []
-      axios.get(`https://smartpark.caih.com/dxapi/dreMenu/list?current=1&size=500&type=${id}`).then(res => { 
+      axios.get(`https://smartpark.caih.com/dxapi/dreMenu/list?current=1&size=500&type=${id}&status=0`).then(res => { 
         const data = res.data.data.records
         for(let i = 0;i<data.length;i++){
           data[i].num = 0