shish 4 lat temu
rodzic
commit
99828baac8

+ 1 - 0
hdPad/src/pages.json

@@ -1,6 +1,7 @@
 {
 {
 	"pages": [
 	"pages": [
 		{"path": "pages/home/cash","style": {"navigationBarTitleText": "收银"}},
 		{"path": "pages/home/cash","style": {"navigationBarTitleText": "收银"}},
+		{"path": "pages/home/order","style": {"navigationBarTitleText": "订单"}},
 		{"path": "pages/home/mt","style": {"navigationBarTitleText": "美团单"}},
 		{"path": "pages/home/mt","style": {"navigationBarTitleText": "美团单"}},
 		{"path": "pages/home/work","style": {"navigationBarTitleText": "制作单"}},
 		{"path": "pages/home/work","style": {"navigationBarTitleText": "制作单"}},
 		{"path": "pages/home/modify","style": {"navigationBarTitleText": "修改"}},
 		{"path": "pages/home/modify","style": {"navigationBarTitleText": "修改"}},

+ 623 - 0
hdPad/src/pages/home/components/orderInfo.vue

@@ -0,0 +1,623 @@
+<template>
+<view>
+  <view v-if="$util.isEmpty(orderInfo)" class="work-empty">
+    <text>暂无制作单</text>
+  </view>  
+  <view class="work-info" v-else>
+    <view class="work-detail">
+      <view class="order-img">
+        <image :src="orderInfo.cover" @click.stop="previewImage(orderInfo.bigCover)"></image>
+      </view>
+      <view class="order-item">
+
+        <view v-if="beginCount > 0 && orderInfo.fromType == 4" style="min-height:35upx;height:auto;">
+          <text class="left">开始制作</text>
+          <text class="right" style="color:red;font-weight:bold;font-size:20upx;">{{beginCount}} 秒后</text>
+        </view>
+
+        <view>
+          <text class="left">配送</text>
+          <text class="right" v-if="orderInfo.sendType == 1" style="color:red;font-weight:bold;">到店自取</text>
+          <text class="right" v-else style="color:red;font-weight:bold;">
+            <text v-if="orderInfo.reachDate == orderInfo.today">今天</text>
+            <text v-else-if="orderInfo.reachDate == orderInfo.tomorrow">明天</text>
+            <text v-else>{{orderInfo.reachDate.substr(5,9)}}</text>
+            <text style="margin-left:5upx;">{{orderInfo.reachPeriod}} 前</text>
+          </text>
+        </view>
+
+        <view v-if="!$util.isEmpty(orderInfo.remark)" style="min-height:35upx;height:auto;">
+          <text class="right" style="color:red;">[备注] {{orderInfo.remark}}</text>
+        </view>
+
+        <view v-if="!$util.isEmpty(orderInfo.cardInfo)" style="min-height:35upx;height:auto;">
+          <text class="right" style="color:red;">[贺卡内容] {{orderInfo.cardInfo}}</text>
+        </view>
+
+        <view v-if="Number(orderInfo.orderPrice)>0">
+          <text class="left">订单金额</text>
+          <text class="right" style="font-weight:bold;">
+          ¥{{orderInfo.orderPrice && Number(orderInfo.orderPrice)>0 ? parseFloat(orderInfo.orderPrice) : ''}}
+          </text>
+        </view>
+
+        <view><text class="left">数量</text>
+        <text class="right" style="color:red;font-weight:bold;">{{orderInfo.num}}</text>
+        </view>
+
+        <view v-if="orderInfo.anonymity == 1">
+          <text class="left">要求</text>
+          <text class="right" style="color:red;font-weight:bold;text-align:right;">匿名派送!!</text>
+        </view>
+
+        <view v-if="Number(orderInfo.orderDebtPrice)>0">
+          <text class="left">尾款</text>
+          <text class="right" style="color:red;font-weight:bold;">¥{{orderInfo.orderDebtPrice?parseFloat(orderInfo.orderDebtPrice):0}}</text>
+        </view>
+
+        <view v-if="orderInfo.fromType == 4">
+          <text class="left">美团编号</text>
+          <text class="right" style="color:black;font-weight:bold;">{{orderInfo.thirdSn}}</text>
+        </view>
+
+        <view><text class="left">分类</text><text class="right">{{orderInfo.catName}}</text></view>
+        <view><text class="left">名称</text><text class="right" style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:125upx;text-align:right;">{{orderInfo.name}}</text></view>
+        <view><text class="left">商品编号</text><text class="right">{{orderInfo.goodsSn}}</text></view>
+        <view><text class="left">订单号</text><text class="right">{{orderInfo.orderSn}}</text></view>
+        <view><text class="left">状态</text><text class="right">{{getStatus(orderInfo.status)}}</text></view>
+        <view><text class="left">创建</text><text class="right">{{orderInfo.addTime ? orderInfo.addTime.substr(5,11):''}}</text></view>
+      </view>
+    </view>
+    <view class="work-item-detail">
+
+      <view class="flex-space right-detail-title" v-if="getMyShopInfo.stockModel && getMyShopInfo.stockModel == 1">每份用材
+        <text v-if="orderInfo.stockLock && orderInfo.stockLock == 1 && orderInfo.status == 0" style="color:red;">(不可修改)</text></view>
+      <view class="flex-space right-detail-title" v-else>使用花材
+        <text v-if="orderInfo.stockLock && orderInfo.stockLock == 1 && orderInfo.status == 0" style="color:red;">(不可修改)</text></view>
+      
+      <view class="unit-use-item">
+        <view class="commodity-list">
+          <view v-for="(s, idx) in selectList" :key="idx" class="commodity-item" >
+            <image class="item-icon" :src="s.cover" @click="pageTo({url:'/admin/item/detail',query:{id: s.id}})"></image>
+            <view class="item-info">
+              <view class="info-line">
+                <text class="item-name">{{ s.name }}</text>
+                <text class="item-price">
+                  <text class="unit">{{s.currentNum}}{{s.unitName}}</text>
+                </text>
+              </view>
+              <view class="info-line">
+                <text class="item-type">{{s.ratio}}{{s.smallUnit}}/{{s.bigUnit}}</text>
+              </view>
+            </view>
+          </view>
+        </view>
+      </view>
+
+      <view style="height:2vh;background-color:#EEEEEE;" v-if="getMyShopInfo.stockModel && getMyShopInfo.stockModel == 1"></view>
+
+      <view class="flex-space right-detail-title" v-if="getMyShopInfo.stockModel && getMyShopInfo.stockModel == 1"> 总共用材 </view>
+      
+      <view class="total-use-item" v-if="getMyShopInfo.stockModel && getMyShopInfo.stockModel == 1">
+        <view class="commodity-list">
+          <view v-for="(s, idx) in selectList" :key="idx" class="commodity-item" >
+            <image class="item-icon" :src="s.cover" @click="pageTo({url:'/admin/item/detail',query:{id: s.id}})" />
+            <view class="item-info">
+              <view class="info-line">
+                <text class="item-name">{{ s.name }}</text>
+                <text class="item-price">
+                  <text class="unit">{{(s.currentNum*orderInfo.num).toFixed()}}{{s.unitName}}</text>
+                </text>
+              </view>
+              <view class="info-line">
+                <text class="item-type">{{s.ratio}}{{s.smallUnit}}/{{s.bigUnit}}</text>
+                <text style="font-size:9upx;position:relative;right:80upx;top:10upx;" v-if="Number(s.wastNum)>0">{{s.wastNum}}{{s.wastUnitName}}</text>
+                <button class="wastage" @click="wastageFn(s)">报损</button>
+              </view>
+            </view>
+          </view>
+        </view>
+      </view>
+
+
+    </view>
+
+    <view class="button-area">
+      <view :class="[orderInfo.status==1 ? 'active' : '']" @click="printFn(orderInfo)">打印</view>
+      <view :class="[orderInfo.status==0 ? 'active' : '']" @click="cancelFn(orderInfo)">取消</view>
+    </view>
+
+    <!-- 选数量金额 -->
+    <uni-popup ref="wastageSelectNumRef" background-color="#fff" type="center" :animation="false">
+        <wastageSelectNum @confirmWastageSelectNum="confirmWastageSelectNum" :customData.sync="customData" 
+        @cancelWastageSelectNum="cancelWastageSelectNum"></wastageSelectNum>
+    </uni-popup>
+
+    <uni-popup ref="cancelWorkRef" type="dialog">
+        <uni-popup-dialog type="info" cancelText="取消" confirmText="确认" title="提示" content="确认取消?" @confirm="confirmCancel"></uni-popup-dialog>
+    </uni-popup>
+
+    <uni-popup ref="lockWorkRef" type="dialog">
+        <uni-popup-dialog type="info" cancelText="取消" confirmText="确认" title="提示" content="确认锁定?" @confirm="confirmLock"></uni-popup-dialog>
+    </uni-popup>
+
+    <uni-popup ref="finishRef" type="dialog">
+        <uni-popup-dialog type="info" cancelText="取消" confirmText="确认" title="提示" content="确认完成?" @confirm="confirmFinish"></uni-popup-dialog>
+    </uni-popup>
+
+  </view>
+</view>
+</template>
+<script>
+import { getFullInfo,finish,lockWork,cancelWork,print } from '@/api/work'
+import {modifyWastage} from '@/api/work-item'
+import wastageSelectNum from './wastageSelectNum.vue'
+import { mapGetters } from "vuex";
+import productMins from "@/mixins/product";
+export default {
+	name: "workInfo",
+	components: {wastageSelectNum},
+  data() {
+    return {
+      orderInfo:[],
+      orderItem:[],
+      unitUseItem:{bigNum:0,smallNum:0},
+      totalUseItem:{bigNum:0,smallNum:0},
+      customData:{},
+      workItemId:0,
+      currentJobType:'modify',
+      currentJobId:0,
+      beginCount:0,
+      INT:null
+    }
+  },
+	props: {
+      selectOrderId:{
+        type: Number,
+        default: 0
+      }
+    },
+	mixins: [productMins],
+	computed:{
+		...mapGetters(["getMyShopInfo"]),
+	},
+	watch:{
+		selectOrderId: {
+			handler(newId,oldId) {
+				this.currentJobId = Number(oldId)
+		        this.removeFromSaveDirect()
+		        this.currentJobId = Number(newId)
+			}
+		}
+	},
+  mounted() {
+    // #ifdef APP-PLUS
+    this.listenScanItem()
+    // #endif          
+  },
+	destroyed(){
+
+    if(this.INT){
+      clearInterval(this.INT)
+    }
+
+		// #ifdef APP-PLUS
+		//避免重复,每次进来先移除全局自定义事件监听器
+		uni.$off('listenGetScanCode')
+		// #endif
+    this.removeFromSaveDirect()
+
+	},
+  methods:{
+		previewImage(url){
+			uni.previewImage({urls:[url]})
+		},
+		calcFn(){
+			this.calc = this.calc == 'add' ? 'sub' : 'add'
+      		this.$emit('calcFn',this.calc)
+		},
+    printFn(item){
+      if(item.status ==1){
+        print({id:item.id}).then(res=>{
+          if(res.code == 1){
+            this.$msg(res.msg)
+          }
+        })
+      }
+    },
+    lockFn(info){
+      if(info.stockLock == 0){
+        this.$refs.lockWorkRef.open('center')
+      }
+    },
+    confirmLock(){
+      uni.showLoading({mask:true})
+      lockWork({id:this.orderInfo.id}).then(res=>{
+        uni.hideLoading()
+        if(res.code == 1){
+          this.$msg('已锁定')
+          this.getOrderDetail(this.orderInfo.id)
+        }
+      })
+    },
+    cancelFn(info){
+      this.$msg('开发中')
+      return false
+      this.$util.hitVoice()
+      if(info.status == 0){
+        this.$refs.cancelWorkRef.open('center')
+      }
+    },
+    confirmCancel(){
+      uni.showLoading({mask:true})
+      cancelWork({id:this.orderInfo.id}).then(res=>{
+        uni.hideLoading()
+        if(res.code == 1){
+          this.$msg('已取消')
+          this.getOrderDetail(this.orderInfo.id)
+        }
+      })
+    },
+    wastageFn(item){
+      this.customData = {...item,currentNum:1,property:1}
+      this.$refs.wastageSelectNumRef.open('center')
+      this.workItemId = item.id
+    },
+    confirmWastageSelectNum(info){
+      this.$refs.wastageSelectNumRef.close()
+      modifyWastage({...info,id:this.workItemId,num:info.currentNum}).then(res=>{
+        if(res.code == 1){
+           this.getOrderDetail(this.orderInfo.id)
+        }else{
+          this.$msg('报损失败,请重试')
+        }
+      })
+    },
+    cancelWastageSelectNum(){
+      this.$util.hitVoice()
+      this.$refs.wastageSelectNumRef.close()
+    },
+    finishFn(info){
+      this.$util.hitVoice()
+      if(info.status == 0){
+        this.$refs.finishRef.open('center')
+      }
+    },
+    confirmFinish(){
+      let params = {id:this.orderInfo.id}
+      if(!this.$util.isEmpty(this.selectList)){
+        const newItem = this.selectList.map(ele=>{
+          return {productId:ele.id,num:ele.currentNum,unitType:ele.unitType,unitPrice:ele.unitPrice}
+        })
+        params = {...params,itemList:JSON.stringify(newItem)}
+      }
+      uni.showLoading({mask:true})
+      finish(params).then(res=>{
+        uni.hideLoading()
+        if(res.code == 1){
+          this.$msg(res.msg)
+          this.getOrderDetail(this.orderInfo.id)
+          //完成之后刷新列表
+          this.$emit('finishNotice')
+        }
+      })
+    },
+    cancelFinish(){
+			this.$util.hitVoice()
+			this.$refs.finishWorkRef.close()
+    },
+    modifyItem(info){
+      if(info.stockLock == 0){
+        this.$util.hitVoice()
+        this.$util.pageTo({url:'/pages/home/modify',query: { id:info.id }})
+      }
+    },
+    getStatus(status) {
+      status = Number(status)
+      switch (status) {
+          case 0:
+          return "待完成";
+          break;
+          case 1:
+          return "已完成";
+          break;
+          case 2:
+          return "已取消";
+          break;
+          default:
+          return "待完成";
+      }
+    },
+    getOrderDetail(id){
+
+      getFullInfo({id}).then(res=>{
+        if(res.code == 1){
+          this.orderInfo = res.data.info
+
+          let that = this
+          this.beginCount = Number(this.orderInfo.beginCount)
+          if(this.beginCount > 0 && this.orderInfo.fromType ==4){
+            if(this.INT){
+              clearInterval(this.INT)
+            }
+            that.INT = setInterval(function(){
+              that.beginCount--
+              if(that.beginCount <= 0){
+                clearInterval(that.INT)
+              }
+            },1000)
+          }
+
+          let bigNum = 0
+          let smallNum = 0
+          this.orderItem = res.data.item
+          if(!this.$util.isEmpty(this.orderItem)){
+            for (const ele of this.orderItem) {
+              if(ele.unitType ==0){
+                bigNum = bigNum + Number(ele.num)
+              }else{
+                smallNum = smallNum + Number(ele.num)
+              }
+            }
+            bigNum = bigNum.toFixed()
+            smallNum = smallNum.toFixed()
+          }
+
+  				if(this.orderItem && !this.$util.isEmpty(this.orderItem)){
+						const newItem = this.orderItem.map(ele=>{
+							return {name:ele.name,cover:ele.cover,shortCover:ele.shortCover,itemId:ele.ptItemId,id:ele.itemId,unitName:ele.unitName,unitType:ele.unitType,
+              unitPrice:ele.unitPrice,ratio:ele.ratio,mainId:ele.mainId,currentNum:ele.num,bigUnit:ele.bigName,smallUnit:ele.smallName,property:1}
+						})
+  					this.pushToSave(newItem)
+          }
+
+          this.unitUseItem = {bigNum,smallNum}
+          let orderNum = this.orderInfo.num || 0
+          let totalBig = (bigNum*Number(orderNum)).toFixed()
+          let totalSmall = (smallNum*Number(orderNum)).toFixed()
+          this.totalUseItem = {bigNum:totalBig,smallNum:totalSmall}
+        }
+      })
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.work-empty{
+  display:flex;
+  font-size:13upx;
+  justify-content:center;
+  align-items:center;
+  height:90vh;
+}
+.work-info{
+  display:flex;
+  height: 100vh;
+  & .work-detail{
+      height: 100vh;
+      overflow: scroll;
+      border-right:1upx solid #EEEEEE;
+      flex: 40;
+      .order-img{
+        display:flex;
+        margin:5upx;
+        justify-content:center;
+        image{
+          width:180upx;
+          height:180upx;
+          border-radius:3upx;
+        }
+      }
+      .order-item{
+        display:flex;
+        font-size:11upx;
+        margin-top:10upx;
+        justify-content: center;
+        flex-wrap:wrap;
+        view{
+          justify-content:space-between;
+          align-items:center;
+          display:flex;
+          border-bottom:1upx solid #EEEEEE;
+          width:180upx;
+          height:20upx;
+          padding:0 10upx 0 10upx;
+          .left{
+            color:#CCCCCC;
+          }
+          .right{
+            color:#666666;
+          }
+        }
+      }
+    }
+	& .button-area {
+		flex: 9;
+		height: 100vh;
+    display: flex;
+    flex-direction: column;
+    justify-content: space-around;
+    padding: 5upx;
+    border-left:1upx solid #EEEEEE;
+    & > view {
+        border: 1upx solid #EEEEEE;
+        border-radius: 5upx;
+        text-align: center;
+        padding: 10upx 0;
+        color: #666666;
+        margin-bottom: 10upx;
+        font-size: 10upx;
+        text-align: center;
+    }
+    & .active {
+      color: #3385FF;
+      border-color: #3385FF;
+      font-size: 10upx;
+      font-weight:bold;
+    }
+	}
+	& .work-item-detail {
+		flex: 40;
+		height: 100%;
+    & .right-detail-title{
+      font-size:10upx;
+      font-weight:bold;
+      margin-left:5upx;
+      margin-top:5upx;
+    }
+    & .unit-use-item {
+      flex: 40;
+      display: flex;
+      flex-direction: column;
+      .commodity-list {
+        padding: 5upx;
+        .commodity-item {
+          display: flex;
+          margin-top:5upx;
+          .item-icon {
+            flex-shrink: 0;
+            width: 38upx;
+            height: 38upx;
+            border-radius:2upx;
+          }
+          .item-info {
+            display: flex;
+            flex-direction: column;
+            flex: 1;
+            margin-left:6upx;
+            .info-line {
+              display: flex;
+              justify-content: space-between;
+              align-items: flex-start;
+              position: relative;
+              .item-name {
+                font-size:11upx;
+                color: black;
+                overflow: hidden;
+                white-space: nowrap;
+                text-overflow: ellipsis;
+              }
+              .item-price {
+                color: #333;
+                font-size: 10upx;
+              }
+              .item-type {
+                color: #999;
+                font-size: 8upx;
+              }
+              .item-count {
+                color: #666;
+                font-size: 11upx;
+              }
+            }
+          }
+        }
+      }
+      .summary-bar {
+        padding: 0 10upx;
+        height: 30upx;
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        border-top: 1upx solid #eeeeee;
+        .operate-view {
+          display: flex;
+          align-items: center;
+          color: #3385ff;
+          font-size: 12upx;
+          .iconfont {
+            margin-right: 20upx;
+            font-size: 10upx;
+          }
+        }
+        .describe-view {
+          display: flex;
+          align-items: center;
+          color: #333;
+          font-size: 9upx;
+        }
+      }
+    }
+    & .total-use-item {
+      flex: 40;
+      display: flex;
+      flex-direction: column;
+      .commodity-list {
+        padding: 5upx;
+        .commodity-item {
+          display: flex;
+          margin-top:5upx;
+          .item-icon {
+            flex-shrink: 0;
+            width: 38upx;
+            height: 38upx;
+            border-radius:2upx;
+          }
+          .item-info {
+            display: flex;
+            flex-direction: column;
+            flex: 1;
+            margin-left:6upx;
+            .info-line {
+              display: flex;
+              justify-content: space-between;
+              align-items: flex-start;
+              position: relative;
+              .item-name {
+                font-size:11upx;
+                color: black;
+                overflow: hidden;
+                white-space: nowrap;
+                text-overflow: ellipsis;
+              }
+              .item-price {
+                color: #333;
+                font-size: 10upx;
+              }
+              .item-type {
+                color: #999;
+                font-size: 8upx;
+              }
+              .item-count {
+                color: #666;
+                font-size: 11upx;
+              }
+              .wastage{
+                position: absolute;
+                right:0upx;
+                font-size:9upx;
+                top:4upx;
+                color:#666666;
+              }
+            }
+          }
+        }
+      }
+      .summary-bar {
+        padding: 0 10upx;
+        height: 30upx;
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        border-top: 1upx solid #eeeeee;
+        .operate-view {
+          display: flex;
+          align-items: center;
+          color: #3385ff;
+          font-size: 12upx;
+          .iconfont {
+            margin-right: 20upx;
+            font-size: 10upx;
+          }
+        }
+        .describe-view {
+          display: flex;
+          align-items: center;
+          color: #333;
+          font-size: 9upx;
+        }
+      }
+    }
+	}
+}
+</style>

+ 268 - 0
hdPad/src/pages/home/components/orderList.vue

@@ -0,0 +1,268 @@
+<template>
+    <view class="itemList-box">
+        <view class="title">列表</view>
+        <view class="order-status">
+            <view @tap="changeStatus(1)" :class="[{'checked':status===1}]">待完成</view>
+            <view @tap="changeStatus(4)" :class="[{'checked':status===4}]">已完成</view>
+            <view @tap="changeStatus(0)" :class="[{'checked':status===0}]">全部</view>
+        </view>
+        <scroll-view class="itemList-item_box" scroll-y="true" @scrolltolower="reachBottom" lower-threshold="50" refresher-enabled="true" 
+        :refresher-triggered="triggered" @refresherrefresh="onRefresh" @refresherrestore="onRestore">
+            <view v-for="item in list.data" :key="item.id" class="show-item_box" @click="getOrderInfo(item,1)">
+                <view :class="[selectOrderId==item.id ? 'active' : 'not-active', 'item-body_box']">
+                    <view class="flower-name_box">
+                        <view class="current-item-title">
+                            <text>{{item.actPrice}}</text>                           
+                        </view>
+                        <image class="flower-image" :src="item.cover"></image>
+                        <text v-if="item.fromType!=4" style="position:absolute;top:2upx;left:90upx;font-size:11upx;">{{item.sn}}</text>
+                    </view>
+                    <view class="item-price-num">
+                        <view>
+                            <text>{{item.orderSn}}</text>
+                        </view>
+                        <view>{{item.status == 1 ? '待付款':item.status==2?'待配送':item.status==3?'配送中':item.status==4?'已完成':item.status==5?'已取消':'待付款'}}</view>
+                    </view>
+                </view>
+            </view>
+        </scroll-view>
+        <view style="width:35upx;height:35upx;position:fixed;bottom:10upx;left:178upx;background-color:#3385FF;border-radius:30upx;display:flex;justify-content:center;align-items:center;
+        font-size:16upx;color:white;" @click="select()">查</view>
+
+		<uni-popup ref="inputDialog" type="dialog">
+			<uni-popup-dialog ref="inputClose"  mode="input" :title="snTitle" value="" placeholder="请输入" @confirm="dialogInputConfirm"></uni-popup-dialog>
+		</uni-popup>
+
+    </view>
+</template>
+<script>
+import {getList} from "@/api/order"
+import { list } from "@/mixins";
+export default {
+    name:'leftItem',
+    components:{},
+	mixins: [list],
+	props: {
+		customId: {
+			type: Number,
+			default: 0
+		},
+        mt: {
+			type: String,
+			default: 'no'
+		}
+    },
+    data(){
+        return {
+            totalShop:{ bigUnit: 0, smallUnit:0, totalPrice: 0 },
+            itemList:[],
+            currentJobType:'bill',
+            currentJobId:0,
+            groupList:[],
+            status:1,
+            selectOrderId:0,
+            triggered:false,
+            _freshing: false,
+            sn:'',
+            thirdSn:'',
+            snTitle:'编号',
+            t:null
+        }
+    },
+    watch:{
+        customId:{
+            handler(newCustomId){
+                this.currentJobId = newCustomId
+            },
+            immediate:true
+        }
+    },
+    created(){
+        this.getWorkInfoList()
+        if(this.mt == 'yes'){
+            this.snTitle = '美团编号'
+        }
+        this.listenOrder()
+    },
+    destroyed(){
+        clearInterval(this.t)
+    },
+    methods:{
+        listenOrder(){
+            //有新制作单时自动刷新
+            let that = this
+            this.t = setInterval(function () {
+                that.getWorkInfoList(1)
+            },5000)
+        },
+        refreshList(){
+            this.resetList()
+            this.getWorkInfoList()
+        },
+        dialogInputConfirm(val){
+            this.resetList()
+            if(this.mt == 'yes'){
+                this.thirdSn = val
+            }else{
+                this.sn = val
+            }
+            this.getWorkInfoList()
+        },
+        select(){
+            this.$refs.inputDialog.open('center')
+        },
+        onRefresh(){
+            if (this._freshing){
+                return
+            }
+            this._freshing = true
+            //界面下拉触发,triggered可能不是true,要设为true
+            if (!this.triggered){
+                this.triggered = true
+            }
+            this.resetList()
+            this.getWorkInfoList()
+            setTimeout(() => {
+                //触发onRestore,并关闭刷新图标  
+                this.triggered = false
+                this._freshing = false
+            }, 1000)
+        },
+        onRestore(){
+            console.log('onRestore')
+        },
+        getOrderInfo(item,click=0){
+            if(click == 1){
+                this.$util.hitVoice()
+            }
+            this.selectOrderId = item.id
+            this.$emit('getOrderInfo',item)
+        },
+        changeStatus(status){
+            if(status !== 1){
+                clearInterval(this.t)
+            }else{
+                this.listenOrder()
+            }
+            this.status = status
+            this.resetList()
+            this.getWorkInfoList()
+        },
+        reachBottom() {
+            if (!this.list.finished) {
+                this.getWorkInfoList().then((res) => {
+                    uni.stopPullDownRefresh();
+                });
+            } else {
+                uni.stopPullDownRefresh();
+            }
+        },
+        getWorkInfoList(type=0){
+            let params = {page: this.list.page,pageSize:50,status:this.status,sn:this.sn,thirdSn:this.thirdSn,isCashier:1}
+            if(this.mt == 'yes'){
+                params = {...params,fromType:4}
+            }
+            return getList(params).then(res=>{
+                if(res.code == 1){
+                    if(type == 1){
+                        this.list.data = res.data.list
+                        return
+                    }
+                    this.completes(res)
+                    if(this.list.data && this.list.data[0]){
+                        //this.getOrderInfo(this.list.data[0])
+                    }
+                }
+            })
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+.itemList-box {
+    height: 100%;
+    display: flex;
+    flex-direction: column;
+    & .title {
+        padding: 3upx;
+        font-size: 12upx;
+        background-color: rgba(72, 91, 107, 1);
+        color: #FFFFFF;
+    }
+    & .order-status{
+        display: flex;
+        font-size:10upx;
+        view{
+            height:30upx;
+            line-height: 30upx;
+            flex:1;
+            font-size:10upx;
+            border:1upx solid #EEEEEE;
+            text-align:center;
+        }
+        .checked{
+            background-color: #CCCCCC;
+            color:white;
+        }
+    }
+    & .itemList-item_box {
+        overflow-y: auto;
+        flex: 1;
+        border: 1px solid #eee;
+        & .show-item_box {
+            padding: 2upx;
+            & .item-body_box {
+                border-radius: 2upx;
+                padding: 2upx;
+                font-size: 14upx;
+                color:#666666;
+                height:58upx;
+                &.active {
+                    background-color: #d4d6d6;
+                }
+                &.not-active {
+                    background-color: #EEEEEE;
+                }
+                & .flower-name_box {
+                    padding: 0 5upx;
+                    position: relative;
+                    .current-item-title {
+                        font-size:12upx;
+                        color: #333333;
+                        font-weight: bold;
+                        overflow: hidden;
+                        text-overflow:ellipsis;
+                        white-space: nowrap;
+                        width:85upx;
+                    }
+                    .flower-image{
+                        position: absolute;
+                        right:1upx;
+                        top:2upx;
+                        width:50upx;
+                        height:50upx;
+                        border-radius:5upx;
+                    }
+                }
+                .item-price-num{
+                    color:#afaeae;
+                    font-size:10upx;
+                    display: flex;
+                    align-items: center;
+                    justify-content: space-between;
+                    padding: 15upx 2upx 0 2upx;
+                    width:120upx;
+                }
+            }
+        }
+    }
+    & .itemList-footer_box {
+        height: 20upx;
+        border: 1px solid #eee;
+        font-size: 10upx;
+        display: flex;
+        align-items: center;
+        justify-content: space-around;
+    }
+}
+</style>

+ 89 - 0
hdPad/src/pages/home/order.vue

@@ -0,0 +1,89 @@
+<template>
+<view>
+    <view>
+        <view class="app-casher-area">
+            <view class="nav-left">
+                <casherNav navType="order"></casherNav>
+            </view>
+            <view class="order-list">
+                <orderList ref="orderListRef" @getOrderInfo="getOrderInfo"></orderList>
+            </view>
+            <view class="order-info">
+                <orderInfo ref="orderInforRef" :selectOrderId="selectOrderId" @calcFn="calcFn" @finishNotice="finishNotice"></orderInfo>
+            </view>
+        </view>
+    </view>
+</view>
+</template>
+<script>
+import { mapGetters } from "vuex";
+import productMins from "@/mixins/product";
+import casherNav from './components/nav.vue'
+import orderList from './components/orderList.vue'
+import orderInfo from './components/orderInfo.vue'
+export default {
+	name: "order",
+	components: {casherNav,orderList,orderInfo},
+	mixins: [productMins],
+	data() {
+		return {
+			currentJobType:'order',
+			currentJobId:0,
+			selectOrderId:0,
+			modifyInfo:{hasModify:0}
+		}
+	},
+	computed: {
+		...mapGetters(["getLoginInfo"])
+	},
+	onShow() {
+		if(this.modifyInfo.hasModify && this.modifyInfo.hasModify == 1){
+			this.$refs.orderInforRef.getOrderDetail(this.selectOrderId)
+		}
+		// #ifdef APP-PLUS
+		this.listenScanItem()
+		// #endif
+	},
+	onHide(){
+		// #ifdef APP-PLUS
+		//避免重复,每次进来先移除全局自定义事件监听器
+		uni.$off('listenGetScanCode')
+		// #endif
+	},
+	onUnload() {
+		// #ifdef APP-PLUS
+		//避免重复,每次进来先移除全局自定义事件监听器
+		uni.$off('listenGetScanCode')
+		// #endif
+	},
+	methods: {
+		finishNotice(){
+			this.$refs.orderListRef.refreshList()
+		},
+		calcFn(val){
+			this.calc = val
+		},
+		getOrderInfo(item){
+			this.selectOrderId = Number(item.id)
+			this.currentJobId = Number(item.id)
+			this.$refs.orderInforRef.getOrderDetail(this.selectOrderId)
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.app-casher-area {
+	display: flex;
+	height: 100vh;
+	& .nav-left {
+		flex: 5;
+		background-color: rgba(72, 91, 107, 1);
+	}
+	& .order-list {
+		flex: 32;
+	}
+    & .order-info{
+        flex: 89;
+    }
+}
+</style>