shish 4 лет назад
Родитель
Сommit
2026bf79da

+ 0 - 206
hdPad/src/pages/home/components/OrderItem.vue

@@ -1,206 +0,0 @@
-<template>
-    <view  @click="pageTo({url:'/pagesOrder/detail',query: {id: item.id}})">
-        <view class="order-top_box" style="position:relative;">
-
-        <image style="width:105upx;position:absolute;top:80upx;right:12upx;" v-if="item.status == 1"
-        @click.stop="pageTo({url:'/admin/billing/toPay',query: {orderId:item.id,orderSn:item.orderSn,actPrice:item.actPrice}})"
-         mode="widthFix" :src="`${constant.imgUrl}/icon/codePay8.png`"></image>
-
-        <image style="width: 38upx;height:38upx;border-radius:38upx;" mode="aspectFit" :src="item.customAvatarUrl"></image>
-          <view class="tit"> {{ item.customName || "" }}</view>
-          <view class="other-refund" v-if="item.refund==2">有退款</view>
-          <view class="other-status" v-if="item.debt == 1">欠款</view>
-          <view :class="['status',item.status == '3' ? 'buleColor' : item.status == '6' ? 'defColor' : '']">{{ statusFormat(item.status) }}</view>
-        </view>
-        <view class="order-list_info">
-        <view class="order-info_box">
-            <view>编号:</view>
-            <view>{{ item.sendNum }}</view>
-        </view>
-        <view class="order-info_box">
-            <view>单号:</view>
-            <view>{{ item.orderSn }}</view>
-        </view>
-        <view class="order-info_box">
-            <view>日期:</view>
-            <view>{{ item.addTime }}</view>
-        </view>
-        <view class="order-info_box">
-            <view>开单:</view>
-            <view v-if="item.shopAdminId > 0">{{ item.shopAdminName}}</view>
-            <view v-else>{{item.customShopAdminName}}</view>
-        </view>
-        <view class="order-info_box">
-            <view>数量:</view>
-            <view v-if="item.smallNum > 0">{{ `${item.bigNum}/${item.smallNum}` }}</view>
-            <view v-else>{{ item.bigNum }}</view>
-            <view class="price">
-            <view>¥{{ parseFloat(item.actPrice) }}</view>
-            <i class="iconfont iconxiangyou"></i>
-            </view>
-        </view>
-        </view>
-        <div class="list-bottom">
-            <div class="list-button">
-                <view v-for="s in item.buttonList" :key="s.type">
-                <button @click.stop="orderEventBtn(s, item)" v-if="s.show == 1" :disabled="s.disable === 1" class="admin-button-com bule" :class="s.disable === 1 ? 'active' : ''">
-                                    {{ s.type === "print" ? s.name+`(${item.printNum})` : s.name}}
-                </button>
-                </view>
-            </div>
-        </div>
-    </view>
-</template>
-<script>
-export default {
-	name: "OrderItem",
-	components: {
-	},
-	props: {
-
-        item: {
-			required: true
-		}
-	},
-	data() {
-		return {
-
-		};
-	},
-	methods: {
-		orderEventBtn(s,item) {
-			this.$emit('orderEventBtn', s,item)
-		},
-    statusFormat(status) {
-        switch (status) {
-            case "1":
-            return "待付款";
-            break;
-            case "2":
-            return "待配送";
-            break;
-            case "3":
-            return "配送中";
-            break;
-            case "4":
-            return "已完成";
-            break;
-            case "5":
-            return "已取消";
-            break;
-            case "6":
-            return "已退款";
-            break;
-            default:
-            return "";
-        }
-    }
-	}
-};
-</script>
-
-<style lang="scss" scoped>
-.admin-button-com {
-  width: 140upx;
-  height: 60upx;
-  padding: 0;
-  line-height: 60upx;
-  text-align: center;
-  font-size: 26upx;
-  &.active {
-    border: 1upx solid #ccc;
-  }
-}
-.list-top,
-.list-bottom {
-    padding: 15upx 30upx;
-    border-bottom: 1upx solid $borderColor;
-    color: $fontColor3;
-    .freight-text {
-        margin-right: 60upx;
-    }
-}
-.list-bottom {
-    & > div {
-        @include disFlex(center, flex-end);
-    }
-    .list-button {
-        .admin-button-com {
-            margin-left: 20upx;
-        }
-    }
-}
-.order-top_box {
-  display: flex;
-  align-items: center;
-  padding: 20upx 30upx 20upx;
-  & > .tit {
-    flex: 8;
-    color: #333333;
-    font-size: 30upx;
-    font-weight: 650;
-    margin-left: 15upx;
-  }
-  & > .other-refund{
-    flex: 1.5;
-    text-align: center;
-    color: #ff2842;
-    border:1upx solid red;
-    border-radius:30upx;
-    padding:5upx 12upx;
-    font-size:20upx;
-  }
-  & > .other-status{
-    flex: 1;
-    text-align: center;
-    color: #ff2842;
-    border:1upx solid red;
-    border-radius:30upx;
-    padding:5upx 12upx;
-    font-size:20upx;
-    margin-left:20upx;
-  }
-  & > .status {
-    flex: 2;
-    text-align: right;
-    color: #ff2842;
-    &.buleColor {
-      color: #3385ff;
-    }
-    &.defColor {
-      color: #333333;
-    }
-  }
-}
-
-.order-list_info {
-  padding: 10upx 30upx 30upx;
-  border-bottom: 1upx solid #eeeeee;
-  & > .order-info_box {
-    display: flex;
-    align-items: center;
-    font-size: 26upx;
-    font-weight: 400;
-    margin-bottom: 5upx;
-    & > view:nth-child(1) {
-      color: #999999;
-    }
-    & > view:nth-child(2) {
-      color: #333333;
-    }
-    & > .price {
-      flex: 1;
-      font-size: 30upx;
-      color: #333333;
-      display: flex;
-      align-items: center;
-      justify-content: flex-end;
-      & .iconxiangyou {
-        color: #999999;
-        font-size: 25upx;
-        margin-left: 12upx;
-      }
-    }
-  }
-}
-</style>

+ 16 - 4
hdPad/src/pages/home/components/finishWork.vue

@@ -13,7 +13,7 @@
           <view class="item">
             <text class="left">支数</text>
             <view class="flower-num-list">
-                <view v-for="info in flowerNumList" :class="[flowerNum===info.num?'selected':'']" @click="setNum(info)" :key="info.num">{{info.name}}</view>
+                <view v-for="info in flowerNumList" :class="[form.flowerNum===info.num?'selected':'']" @click="setNum(info)" :key="info.num">{{info.name}}</view>
             </view>
           </view>
           <view class="item">
@@ -40,6 +40,7 @@
 <script>
 //图片上传插件来源:https://ext.dcloud.net.cn/plugin?id=2922 已改造,不能再升级 shish 20211228
 import htzImageUpload from './htz-image-upload/htz-image-upload.vue'
+import { mapGetters } from "vuex"
 export default {
     name:'finishWork',
     components:{
@@ -48,7 +49,6 @@ export default {
     data(){
         return {
             print:1,
-            flowerNum:0,
             flowerNumList:[{num:0,name:'无'},{num:6,name:6},{num:9,name:9},{num:11,name:11},{num:19,name:19},{num:33,name:33},{num:52,name:52},{num:66,name:66},{num:99,name:99}],
             form:{
                 name:'',
@@ -56,12 +56,20 @@ export default {
                 flowerNum:0,
                 cover:'',
                 print:0
-            }
+            },
+            headers:{token:''}
         }
+    },
+	computed:{
+		...mapGetters(["getLoginInfo"]),
+	},
+    mounted(){
+        const token = uni.getStorageSync('token')
+        this.headers.token = token
     },
     methods:{
         setNum(info){
-
+            this.form.flowerNum = info.num
         },
         changePrint(){
 
@@ -139,6 +147,10 @@ export default {
                 justify-content:center;
                 align-items:center;
             }
+            .selected{
+                background-color:#CCCCCC;
+                color:white;
+            }
         }
     }
     .footer{

+ 1 - 1
hdPad/src/pages/home/components/wastageSelectNum.vue

@@ -62,7 +62,7 @@ export default {
             this.fillType = n
         },
         cancel(){
-            this.$emit('cancelKdSelectNumPrice')
+            this.$emit('cancelWastageSelectNum')
         },
         focus() {
         },

+ 96 - 84
hdPad/src/pages/home/components/orderInfo.vue → hdPad/src/pages/home/components/workInfo.vue

@@ -1,108 +1,110 @@
 <template>
 <view>
-  <view v-if="$util.isEmpty(orderInfo)"></view>  
-    <view class="work-info" v-else>
-      <view class="work-detail">
-        <view class="order-img">
-          <image :src="orderInfo.cover"></image>
-        </view>
-        <view class="order-item">
-          <view><text class="left">支数</text><text class="right">{{orderInfo.flowerNum}}</text></view>
-          <view><text class="left">分类</text><text class="right">{{orderInfo.catName}}</text></view>
-          <view><text class="left">名称</text><text class="right">{{orderInfo.name}}</text></view>
-          <view><text class="left">数量</text><text class="right">{{orderInfo.num}}</text></view>
-          <view><text class="left">商品编号</text><text class="right">{{orderInfo.goodsId}}</text></view>
-          <view><text class="left">售价</text><text class="right">{{orderInfo.price||''}}</text></view>
-          <view><text class="left">工单号</text><text class="right">{{orderInfo.workSn}}</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.remark}}</text></view>
-        </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"></image>
       </view>
-      <view class="work-item-detail">
+      <view class="order-item">
+        <view><text class="left">支数</text><text class="right">{{orderInfo.flowerNum}}</text></view>
+        <view><text class="left">分类</text><text class="right">{{orderInfo.catName}}</text></view>
+        <view><text class="left">名称</text><text class="right">{{orderInfo.name}}</text></view>
+        <view><text class="left">数量</text><text class="right">{{orderInfo.num}}</text></view>
+        <view><text class="left">商品编号</text><text class="right">{{orderInfo.goodsId}}</text></view>
+        <view><text class="left">售价</text><text class="right">{{orderInfo.price||''}}</text></view>
+        <view><text class="left">工单号</text><text class="right">{{orderInfo.workSn}}</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.remark}}</text></view>
+      </view>
+    </view>
+    <view class="work-item-detail">
 
-        <view class="flex-space right-detail-title">单位用材</view>
-        
-        <view class="unit-use-item">
-          <view class="commodity-list">
-            <view v-for="(s, idx) in orderItem" :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.num}}{{s.unitName}}</text>
-                  </text>
-                </view>
-                <view class="info-line">
-                  <text class="item-type">{{s.ratio}}{{s.smallName}}/{{s.bigName}}</text>
-                </view>
+      <view class="flex-space right-detail-title">单位用材</view>
+      
+      <view class="unit-use-item">
+        <view class="commodity-list">
+          <view v-for="(s, idx) in orderItem" :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.num}}{{s.unitName}}</text>
+                </text>
+              </view>
+              <view class="info-line">
+                <text class="item-type">{{s.ratio}}{{s.smallName}}/{{s.bigName}}</text>
               </view>
             </view>
           </view>
-          <view class="summary-bar">
-            <view class="operate-view" ></view>
-            <view class="describe-view">
-              <text v-if="Number(unitUseItem.bigNum)>0">{{unitUseItem.bigNum}}扎</text>
-              <text v-if="Number(unitUseItem.smallNum)>0">{{unitUseItem.smallNum}}支</text>
-            </view>
+        </view>
+        <view class="summary-bar">
+          <view class="operate-view" ></view>
+          <view class="describe-view">
+            <text v-if="Number(unitUseItem.bigNum)>0">{{unitUseItem.bigNum}}扎</text>
+            <text v-if="Number(unitUseItem.smallNum)>0">{{unitUseItem.smallNum}}支</text>
           </view>
         </view>
+      </view>
 
-        <view style="height:2vh;background-color:#EEEEEE;"></view>
+      <view style="height:2vh;background-color:#EEEEEE;"></view>
 
-        <view class="flex-space right-detail-title"> 累计用材 </view>
-        
-        <view class="total-use-item">
-          <view class="commodity-list">
-            <view v-for="(s, idx) in orderItem" :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.num*orderInfo.num).toFixed()}}{{s.unitName}}</text>
-                  </text>
-                </view>
-                <view class="info-line">
-                  <text class="item-type">{{s.ratio}}{{s.smallName}}/{{s.bigName}}</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 class="flex-space right-detail-title"> 累计用材 </view>
+      
+      <view class="total-use-item">
+        <view class="commodity-list">
+          <view v-for="(s, idx) in orderItem" :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.num*orderInfo.num).toFixed()}}{{s.unitName}}</text>
+                </text>
+              </view>
+              <view class="info-line">
+                <text class="item-type">{{s.ratio}}{{s.smallName}}/{{s.bigName}}</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 class="summary-bar">
-            <view class="operate-view" ></view>
-            <view class="describe-view">
-              <text v-if="Number(totalUseItem.bigNum)>0">{{totalUseItem.bigNum}}扎</text>
-              <text v-if="Number(totalUseItem.smallNum)>0">{{totalUseItem.smallNum}}支</text>
-            </view>
+        </view>
+        <view class="summary-bar">
+          <view class="operate-view" ></view>
+          <view class="describe-view">
+            <text v-if="Number(totalUseItem.bigNum)>0">{{totalUseItem.bigNum}}扎</text>
+            <text v-if="Number(totalUseItem.smallNum)>0">{{totalUseItem.smallNum}}支</text>
           </view>
         </view>
       </view>
+    </view>
 
-      <view class="button-area">
-        <view :class="[orderInfo.status==0 ? 'active' : '']" @tap="finishFn()">完成</view>
-        <view :class="[orderInfo.status != 2 && orderInfo.stockLock==0 ? 'active' : '']" @click="modifyItem(orderInfo)">修改</view>
-        <view :class="[orderInfo.status != 2 && orderInfo.stockLock==0 ? 'active' : '']" @click="lockFn()">锁定</view>
-        <view :class="[orderInfo.status==1 ? 'active' : '']" @click="printFn()">打印</view>
-        <view :class="[orderInfo.status==0 ? 'active' : '']" @click="cancelFn()">取消</view>
-      </view>
+    <view class="button-area">
+      <view :class="[orderInfo.status==0 ? 'active' : '']" @tap="finishFn()">完成</view>
+      <view :class="[orderInfo.status != 2 && orderInfo.stockLock==0 ? 'active' : '']" @click="modifyItem(orderInfo)">修改</view>
+      <view :class="[orderInfo.status != 2 && orderInfo.stockLock==0 ? 'active' : '']" @click="lockFn()">锁定</view>
+      <view :class="[orderInfo.status==1 ? 'active' : '']" @click="printFn()">打印</view>
+      <view :class="[orderInfo.status==0 ? 'active' : '']" @click="cancelFn()">取消</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="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="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="lockWorkRef" type="dialog">
+        <uni-popup-dialog type="info" cancelText="取消" confirmText="确认" title="提示" content="确认锁定?" @confirm="confirmLock"></uni-popup-dialog>
+    </uni-popup>
 
   </view>
 </view>
@@ -187,6 +189,9 @@ export default {
         }
       })
     },
+    cancelWastageSelectNum(){
+      this.$refs.wastageSelectNumRef.close()
+    },
     finishFn(){
       uni.showLoading({mask:true})
       finish({id:this.orderInfo.id}).then(res=>{
@@ -251,6 +256,13 @@ export default {
 }
 </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: 100%;

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


+ 3 - 0
hdPad/src/pages/home/make.vue

@@ -84,6 +84,9 @@ export default {
 		}
 	},
 	methods: {
+		cancelFinish(){
+			this.$refs.finishWorkRef.close()
+		},
 		commit(){
 				this.$util.hitRemind()
 				this.$refs.finishWorkRef.open()

+ 6 - 6
hdPad/src/pages/home/work.vue

@@ -6,10 +6,10 @@
                 <casherNav></casherNav>
             </view>
             <view class="work-order-list">
-                <orderList @getOrder="getOrder"></orderList>
+                <workList @getOrder="getOrder"></workList>
             </view>
             <view class="work-order-info">
-                <orderInfo :selectOrderId.sync="selectOrderId"></orderInfo>
+                <workInfo :selectOrderId.sync="selectOrderId"></workInfo>
             </view>
         </view>
     </view>
@@ -19,11 +19,11 @@
 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'
+import workList from './components/workList.vue'
+import workInfo from './components/workInfo.vue'
 export default {
-	name: "workIndex",
-	components: {casherNav,orderList,orderInfo},
+	name: "work",
+	components: {casherNav,workList,workInfo},
 	mixins: [productMins],
 	data() {
 		return {