shish %!s(int64=4) %!d(string=hai) anos
pai
achega
d8ef41c12a

+ 65 - 32
hdPad/src/admin/home/components/rightGoodsArea.vue

@@ -1,9 +1,11 @@
 <template>
 <template>
     <view class="shop-listType_box">
     <view class="shop-listType_box">
         <view class="shop-type_box">
         <view class="shop-type_box">
-            <view v-for="item in categoryData" :key="item.id" :class="[categoryId===item.id?'active':'']" @click="changeCategory(item)" > {{item.categoryName}} </view>
+            <view v-for="item in allCategory" :key="item.id" :class="[currentCategory.id===item.id?'active':'']" @click="changeCategory(item)" > {{item.categoryName}} </view>
+        </view>
+        <view class="num-area" v-if="currentCategory.flower && currentCategory.flower ==1">
+            <view v-for="info in flowerNumList" :class="[flowerNum===info.num?'selected':'']" @click="setNum(info)" :key="info.num">{{info.name}}</view>
         </view>
         </view>
-
         <scroll-view class="shop-show_box" enable-flex="true" scroll-y="true" lower-threshold="20" @scrolltolower="reachBottom">
         <scroll-view class="shop-show_box" enable-flex="true" scroll-y="true" lower-threshold="20" @scrolltolower="reachBottom">
             <view class="goods-item-area">
             <view class="goods-item-area">
             <view v-for="item in list.data" :key="item.id" class="show-shop_box">
             <view v-for="item in list.data" :key="item.id" class="show-shop_box">
@@ -42,10 +44,13 @@ export default {
 	mixins: [productMins,list],
 	mixins: [productMins,list],
     data(){
     data(){
         return {
         return {
-            categoryData:[],
+            allCategory:[],
             categoryId: '',
             categoryId: '',
+            currentCategory:{},
             selectJobType:'bill',
             selectJobType:'bill',
-            selectJobId:0
+            selectJobId:0,
+            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}]
         }
         }
     },
     },
 	props: {
 	props: {
@@ -66,6 +71,14 @@ export default {
         }
         }
     },
     },
     methods:{
     methods:{
+        setNum(info){
+            this.$util.hitRemind()
+            this.flowerNum = info.num
+            this.list.data=[]
+            this.list.page = 1
+            this.list.finished = false
+            this.getGoodsData()
+        },
 		popAddModelFn(info) {
 		popAddModelFn(info) {
             this.$util.hitRemind()
             this.$util.hitRemind()
 			this.showAddModelFn({ ...info, buyNum: 1, unitPrice: info.price,unitType:0})
 			this.showAddModelFn({ ...info, buyNum: 1, unitPrice: info.price,unitType:0})
@@ -73,14 +86,14 @@ export default {
         init(){
         init(){
             getClass().then(res=>{
             getClass().then(res=>{
                 if(res.code == 1){
                 if(res.code == 1){
-                    this.categoryData = res.data
-                    this.categoryId = this.categoryData[0].id
+                    this.allCategory = res.data
+                    this.currentCategory = this.allCategory[0]
                     this.getGoodsData()
                     this.getGoodsData()
                 }
                 }
             })
             })
         },
         },
         getGoodsData(){
         getGoodsData(){
-            getGoodsList({cId:this.categoryId,page:this.list.page,pageSize:30}).then(res=>{
+            getGoodsList({cId:this.currentCategory.id,page:this.list.page,flowerNum:this.flowerNum}).then(res=>{
                 if(res.code == 1){
                 if(res.code == 1){
                     this.completes(res)
                     this.completes(res)
                 }
                 }
@@ -93,12 +106,11 @@ export default {
         },
         },
         changeCategory(item){
         changeCategory(item){
             this.$util.hitRemind()
             this.$util.hitRemind()
-            if(this.categoryId != item.id){
-                this.list.data=[]
-                this.list.page = 1
-                this.list.finished = false
-            }
-            this.categoryId = item.id
+            this.list.data=[]
+            this.list.page = 1
+            this.list.finished = false
+            this.flowerNum = 0
+            this.currentCategory = item
             this.getGoodsData()
             this.getGoodsData()
         }
         }
     }
     }
@@ -111,6 +123,45 @@ export default {
     display: flex;
     display: flex;
     flex-direction: column;
     flex-direction: column;
     box-sizing: border-box;
     box-sizing: border-box;
+    & .shop-type_box {
+        max-height: 300upx;
+        display: flex;
+        align-items: center;
+        flex-wrap: wrap;
+        overflow-y: scroll;
+        & > view {
+            border:1px solid #e4e4e4;
+            padding: 12upx 0upx;
+            font-size: 15px;
+            min-width: 75upx;
+            text-align: center;
+            &.active {
+                background-color: #428369;
+                color: #ffffff;
+            }
+        }
+    }
+    & .num-area{
+        display: flex;
+        flex-wrap: wrap;
+        margin:8upx 0 8upx 0;
+        justify-content:space-around;
+        & > view {
+            border:1upx solid #CCCCCC;
+            width:30upx;
+            height:25upx;
+            border-radius:10upx;
+            display:flex;
+            justify-content:center;
+            align-items: center;
+            font-size:12upx;
+            color:#666666;
+        }
+        & .selected{
+            background-color:#CCCCCC;
+            color:white;
+        }
+    }
     & .shop-show_box{
     & .shop-show_box{
         padding: 2upx;
         padding: 2upx;
         overflow-y: scroll;
         overflow-y: scroll;
@@ -158,24 +209,6 @@ export default {
             }
             }
         }
         }
     }
     }
-    & .shop-type_box {
-        max-height: 300upx;
-        display: flex;
-        align-items: center;
-        flex-wrap: wrap;
-        overflow-y: scroll;
-        & > view {
-            border:1px solid #e4e4e4;
-            padding: 12upx 0upx;
-            font-size: 15px;
-            min-width: 75upx;
-            text-align: center;
-            &.active {
-                background-color: #428369;
-                color: #ffffff;
-            }
-        }
-    }
     & .shop-footer_box {
     & .shop-footer_box {
         height: 40upx;
         height: 40upx;
         display: flex;
         display: flex;
@@ -201,4 +234,4 @@ export default {
         }
         }
     }
     }
 }
 }
-</style>
+</style>

+ 1 - 1
hdPad/src/admin/home/workbench.vue

@@ -50,7 +50,7 @@ export default {
 	data() {
 	data() {
 		return {
 		return {
 			//0成品 1花材
 			//0成品 1花材
-			currentProperty:1,
+			currentProperty:0,
 			itemList:[],
 			itemList:[],
 			currenSelectShop:{},
 			currenSelectShop:{},
 			selectItem: {},
 			selectItem: {},