shish 4 سال پیش
والد
کامیت
1206d2b179

+ 16 - 50
hdPad/src/pages/home/components/createWork.vue

@@ -1,20 +1,20 @@
 <template>
     <view class="finish-area">
         <view class="cell-item">
-          <view class="item"><text class="left">名称</text> <input v-model="form.name" placeholder="请填写名称,留空默认花束" placeholder-class="gray" /></view>
-          <view class="item"><text class="left">数量</text> <input v-model="form.num" type="number" @focus="form.num=''" placeholder="请填写数量" placeholder-class="gray" /></view>
-          <view class="item">
-            <text class="left">分类</text>
-            <view class="class-item-list">
-                <view v-for="info in catList" :class="[form.catId===info.id?'selected':'']" @click="setCat(info)" :key="info.id">{{info.categoryName}}</view>
-            </view>
-          </view>
           <view class="item">
             <text class="left">支数</text>
             <view class="flower-num-list">
                 <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">
+            <text class="left">分类</text>
+            <view class="class-item-list">
+                <view v-for="info in catList" :class="[form.catId===info.id?'selected':'']" @click="setCat(info)" :key="info.id">{{info.categoryName}}</view>
+            </view>
+          </view>
+          <view class="item"><text class="left">名称</text> <input v-model="form.name" style="height:50upx;" placeholder="请填写名称" @focus="form.name=''" placeholder-class="gray" /></view>
+          <view class="item"><text class="left">数量</text> <input v-model="form.num" style="height:50upx;" type="number" @focus="form.num=''" placeholder="请填写数量" placeholder-class="gray" /></view>
           <view class="item">
             <text class="left">图片</text>
             <view>
@@ -23,17 +23,6 @@
                 </htz-image-upload>
             </view>
           </view>
-
-          <view class="item">
-              <text class="left">直接完成</text>
-              <switch :checked="form.complete == 1 ? true : false" @change="changeComplete" style="transform: scale(0.9,0.8)" />
-          </view>
-
-          <view class="item" v-if="form.complete == 1">
-              <text class="left">打印</text>
-              <switch :checked="form.needPrint == 1 ? true : false" @change="changePrint" style="transform: scale(0.9,0.8)" />
-          </view>
-
         </view>
         <view class="footer">
             <button @click="cancelCreate()">取消</button>
@@ -53,9 +42,6 @@ import { mapGetters } from "vuex"
 import {getClass} from '@/api/category'
 import productMins from "@/mixins/product"
 import { createWorkFn } from '@/api/work'
-// #ifdef APP-PLUS
-const plug = uni.requireNativePlugin('Html5app-Gprinter')
-// #endif
 export default {
     name:'finishWork',
     components:{
@@ -67,13 +53,11 @@ export default {
             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}],
             catList:[],
             form:{
-                name:'',
+                name:'花束',
                 catId:0,
                 num:1,
                 flowerNum:0,
-                cover:'',
-                needPrint:1,
-                complete:1
+                cover:''
             },
             headers:{token:''},
             currentImgData:[],
@@ -114,20 +98,6 @@ export default {
         setCat(info){
             this.form.catId = info.id
         },
-        changePrint(e){
-            if(e.detail.value == true){
-                this.form.needPrint = 1
-            }else{
-                this.form.needPrint = 2
-            }
-        },
-        changeComplete(e){
-            if(e.detail.value == true){
-                this.form.complete = 1
-            }else{
-                this.form.complete = 0
-            }
-        },
         cancelCreate(){
             this.$emit('cancelCreate')
         },
@@ -145,9 +115,6 @@ export default {
 				this.$msg('请选择花材')
 				return false
 			}
-            if(this.form.complete == 0){
-                this.form.needPrint = 2
-            }
             this.commitCreate()            
         },
         commitCreate(){
@@ -166,8 +133,6 @@ export default {
                     that.form.name=''
                     that.form.catId = that.catList[0].id
                     that.form.flowerNum = 0
-                    that.form.needPrint = 1
-                    that.form.complete = 1
 
 				}
 			})
@@ -179,6 +144,7 @@ export default {
 .finish-area {
     background-color: #ffffff;
     width:40vw;
+    height:90vh;
     .cell-item{
         display:flex;
         font-size:11upx;
@@ -207,17 +173,17 @@ export default {
             flex-wrap:wrap;
             display:flex;
             justify-content:center;
-            margin:5upx 0 5upx 0;
+            margin:8upx 0 8upx 0;
             view{
                 width:30upx;
-                height:20upx;
+                height:23upx;
                 font-size:8upx;
                 border:1upx solid #DDDDDD;
                 border-radius:10upx;
                 display: flex;
                 justify-content:center;
                 align-items:center;
-                margin-left:3upx;
+                margin-left:6upx;
             }
             .selected{
                 background-color:#3385ff;
@@ -233,8 +199,8 @@ export default {
             justify-content:space-between;
             margin:5upx 0 5upx 0;
             view{
-                width:25upx;
-                height:25upx;
+                width:26upx;
+                height:26upx;
                 font-size:8upx;
                 margin-left:3upx;
                 border:1upx solid #DDDDDD;

+ 9 - 7
hdPad/src/pages/home/components/workInfo.vue

@@ -9,6 +9,10 @@
         <image :src="orderInfo.cover"></image>
       </view>
       <view class="order-item">
+        <view v-if="orderInfo.hasReachTime == 1"><text class="left">配送</text>
+          <text class="right" style="color:red;font-weight:bold;">{{orderInfo.reachDate == today ? '今天' : orderInfo.reachDate.substr(5,9)}} {{orderInfo.reachPeriod == 0 ? '上午':orderInfo.reachPeriod==1?'下午':orderInfo.reachPeriod==2?'晚上':'其它'}}</text>
+        </view>
+        <view v-if="!$util.isEmpty(orderInfo.remark)"><text class="left">备注</text><text class="right" style="color:red;font-weight:bold;">{{orderInfo.remark}}</text></view>
         <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>
@@ -18,7 +22,7 @@
         <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><text class="left">创建</text><text class="right">{{orderInfo.addTime ? orderInfo.addTime.substr(5,11):''}}</text></view>
       </view>
     </view>
     <view class="work-item-detail">
@@ -96,10 +100,6 @@
         <uni-popup-dialog type="info" cancelText="取消" confirmText="确认" title="提示" content="确认完成?" @confirm="confirmFinish"></uni-popup-dialog>
     </uni-popup>
 
-    <uni-popup ref="getPrintRef" type="dialog">
-        <uni-popup-dialog type="info" cancelText="取消" confirmText="好的" title="提示" content="您还没有连接标签机,请先连接" @confirm="confirmGetPrint"></uni-popup-dialog>
-    </uni-popup>
-
   </view>
 </view>
 </template>
@@ -120,7 +120,8 @@ export default {
       unitUseItem:{bigNum:0,smallNum:0},
       totalUseItem:{bigNum:0,smallNum:0},
       customData:{},
-      workItemId:0
+      workItemId:0,
+      today:''
     }
   },
   methods:{
@@ -227,6 +228,7 @@ export default {
         if(res.code == 1){
           this.orderInfo = res.data.info
           this.orderItem = res.data.item
+          this.today = res.data.today
           let bigNum = 0
           let smallNum = 0
           if(!this.$util.isEmpty(this.orderItem)){
@@ -287,7 +289,7 @@ export default {
           display:flex;
           border-bottom:1upx solid #EEEEEE;
           width:180upx;
-          height:19upx;
+          height:20upx;
           padding:0 10upx 0 10upx;
           .left{
             color:#CCCCCC;

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

@@ -16,7 +16,7 @@
                         <text style="position:absolute;top:2upx;left:90upx;font-size:11upx;">{{item.sn}}</text>
                     </view>
                     <view class="item-price-num">
-                        <view v-if="item.hasReachTime == 1">{{item.reachDate == today ? '今天' : item.reachDate}} {{item.reachPeriod == 0 ? '上午':item.reachPeriod==1?'下午':item.reachPeriod==2?'晚上':'其它'}}</view>
+                        <view v-if="item.hasReachTime == 1">{{item.reachDate == today ? '今天' : item.reachDate.substr(5,9)}} {{item.reachPeriod == 0 ? '上午':item.reachPeriod==1?'下午':item.reachPeriod==2?'晚上':'其它'}}</view>
                         <view v-else></view>
                         <view>{{item.status == 0 ? '待完成':item.status==1?'已完成':item.status==2?'已取消':'待完成'}}</view>
                     </view>

+ 1 - 1
hdPad/src/pages/home/make.vue

@@ -98,7 +98,7 @@ export default {
 		},
 		commit(){
 				this.$util.hitVoice()
-				this.$refs.createWorkRef.open()
+				this.$refs.createWorkRef.open('center')
 		},
 		clearItemFn(){
 			this.$util.hitVoice()