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

+ 33 - 20
hdApp/src/admin/goodsManage/flower.vue

@@ -6,13 +6,14 @@
         <app-search-module v-model="py" placeholder="输入英文字母搜索" @input="searchFn" />
       </view>
       <view style="float:right">
+        <button class="admin-button-com middle blue" style="margin-right:10upx;" @click="selectFlowerNumFn()">支数</button>
         <button class="admin-button-com middle blue" style="margin-right:10upx;" @click="clearSelect()">清除已选</button>
       </view>
     </view>
 
     <view class="app-middle">
       <scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop">
-        <view v-for="(item,index) in tabbar" :key="index" class="tab-bar-item" :class="[currentTab==index ? 'active' : '']" :data-current="index" @tap.stop="swichTab($event ,item)" >
+        <view v-for="(item,index) in tabbar" :key="index" class="tab-bar-item" :class="[currentTab==index ? 'active' : '']" :data-current="index" @tap.stop="changeCat($event ,item)" >
           <text>{{item.categoryName || ''}}</text>
         </view>
       </scroll-view>
@@ -50,6 +51,18 @@
 
 	  <FooterCart :price="allPrice" :count="allCount" @confirm="confirmToSave" :showPrice="false" ></FooterCart>
 
+    <!--选择支数 -->
+    <uni-popup ref="selectFlowerNumRef" background-color="#fff" type="center" :animation="false">
+      <view style="display:flex;padding:20upx;height:25vh;justify-content: space-between;align-items:center;flex-wrap:wrap;">
+
+        <text v-for="(item, index) in flowerNumList" :key="index" @click="selectFlowerNum(item.num)" 
+        style="margin-left:25upx;border:1upx solid #999999;width:100upx;height:100upx;border-radius:20upx;justify-content:center;align-items:center;display:flex;">
+          {{item.name}}
+        </text>
+
+      </view>
+    </uni-popup>
+
   </view>
 </template>
 <script>
@@ -58,7 +71,7 @@ import OperateModule from "@/admin/home/components/module/operate";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import ModalModule from "@/components/plugin/modal";
 import flowerItem from "./components/flower-item";
-import {categoryListB,getCategoryGoodsB,changeStatusB} from "@/api/goods";
+import {categoryListB,getCategoryGoodsB} from "@/api/goods";
 import FooterCart from "@/components/module/app-footer-cg-plant-cart";
 import { list } from "@/mixins";
 import productMins from "@/mixins/cgPlantProduct";
@@ -80,15 +93,15 @@ export default {
       height: 0,
       currentTab: 0,
       scrollTop: 0,
-      form: {
-        catId: ""
-      },
+      catId: "",
       delModal: false,
       operateData: {},
       operateShow: false,
       operateIndex: null,
       operateTop: 0,
-      checkStock:false
+      checkStock:false,
+      flowerNum:0,
+      flowerNumList:[{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},{num:0,name:'取消'}]
     };
   },
   computed: {
@@ -97,6 +110,15 @@ export default {
 
   },
   methods: {
+    selectFlowerNumFn(){
+      this.$refs.selectFlowerNumRef.open('top')
+    },
+    selectFlowerNum(num){
+      this.$refs.selectFlowerNumRef.close()
+      this.flowerNum = num
+      this.resetList()
+      this.getPlantList()
+    },
     clearSelect(){
         let that = this
         that.$util.confirmModal({content:'确认清除?'},() => {
@@ -129,35 +151,26 @@ export default {
       categoryListB({flower:1}).then(res => {
         this.tabbar = res.data;
         if(this.tabbar && this.tabbar[0] && this.tabbar[0].id){
-          this.form.catId = this.tabbar[0].id
+          this.catId = this.tabbar[0].id
           this.getPlantList()
         }
       })
     },
     getPlantList() {
-      return getCategoryGoodsB({status:1,page:this.list.page,...this.form,flower:1}).then(res => {
+      return getCategoryGoodsB({status:1,page:this.list.page,catId:this.catId,flower:1,flowerNum:this.flowerNum}).then(res => {
         this.completes(res)
       })
     },
-    swichTab(e, item) {
+    changeCat(e, item) {
       let cur = e.currentTarget.dataset.current;
       if (this.currentTab == cur) {
         return false;
       } else {
         this.currentTab = cur;
-        this.form.catId = item.id;
+        this.catId = item.id;
         this.resetList();
         this.getPlantList();
       }
-    },
-    changeStatus(item) {
-      let status = item.status == 0 ? 1 : 0
-      changeStatusB({id: item.id,status: status}).then(res => {
-        if(res.code == 1){
-          this.$msg("修改成功")
-          item.status = status
-        }
-      });
     }
   }
 };
@@ -253,7 +266,7 @@ page {
 	padding: 22upx 20upx 22upx 30upx;
 	.search-bar {
 		display:inline-block;
-		width:520upx;
+		width:416upx;
 	}
 }
 .select-cmd_bx {

+ 28 - 3
hdApp/src/admin/goodsManage/list.vue

@@ -5,6 +5,7 @@
 				<app-search-module v-model="py" placeholder="输入英文字母搜索" @input="searchFn" />
 			</view>
 			<view style="float:right">
+        <button class="admin-button-com middle blue" style="margin-right:10upx;" @click="selectFlowerNumFn()">支数</button>
 				<button class="admin-button-com middle blue" @click="cgPlant()">盆栽采购</button>
 			</view>
 		</view>
@@ -52,6 +53,19 @@
         </scroll-view>
       </block>
     </view>
+
+    <!--选择支数 -->
+    <uni-popup ref="selectFlowerNumRef" background-color="#fff" type="center" :animation="false">
+      <view style="display:flex;padding:20upx;height:25vh;justify-content: space-between;align-items:center;flex-wrap:wrap;">
+
+        <text v-for="(item, index) in flowerNumList" :key="index" @click="selectFlowerNum(item.num)" 
+        style="margin-left:25upx;border:1upx solid #999999;width:100upx;height:100upx;border-radius:20upx;justify-content:center;align-items:center;display:flex;">
+          {{item.name}}
+        </text>
+
+      </view>
+    </uni-popup>
+
   </view>
 </template>
 <script>
@@ -84,7 +98,9 @@ export default {
       operateShow: false,
       operateIndex: null,
       operateTop: 0,
-      autoLoad:false
+      autoLoad:false,
+      flowerNum:0,
+      flowerNumList:[{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},{num:0,name:'取消'}]
     };
   },
   computed: {
@@ -93,6 +109,15 @@ export default {
 
   },
   methods: {
+    selectFlowerNumFn(){
+      this.$refs.selectFlowerNumRef.open('top')
+    },
+    selectFlowerNum(num){
+      this.$refs.selectFlowerNumRef.close()
+      this.flowerNum = num
+      this.resetList();
+      this.getGoodsList();
+    },
     getSaleRecord(){
       this.$msg('开发中')
     },
@@ -127,7 +152,7 @@ export default {
       });
     },
     getGoodsList() {
-      return getCategoryGoodsB({ status:'', page: this.list.page, ...this.form }).then(res => {
+      return getCategoryGoodsB({ status:'', page: this.list.page, ...this.form,flowerNum:this.flowerNum }).then(res => {
         this.completes(res)
       })
     },
@@ -281,7 +306,7 @@ page {
   padding: 22upx 20upx 22upx 30upx;
   .search-bar {
     display:inline-block;
-    width:532upx;
+    width:416upx;
   }
 }
 </style>

+ 2 - 1
hdApp/src/admin/home/order.vue

@@ -5,7 +5,7 @@
       <block v-if="!$util.isEmpty(list.data)">
         <view class="list" v-for="(item, index) in list.data" :key="index" @click="pageTo({ url: '/admin/order/detail', query: { id: item.id } })" >
           <view class="list-top flex-center-between" style="border-bottom:1upx solid #EEEEEE;">
-            <view class="app-color-3" style="font-size:28upx;">编号:{{ item.sendNum }}</view>
+            <view class="app-color-3" style="font-size:28upx;font-weight:bold;color:#333333;">编号 {{ item.sendNum }}</view>
             <view style="border:1upx solid red;border-radius:18upx;font-size:19upx;color:red;padding:5upx 10upx;" v-if="item.refund == 1">有退款</view>
             <view style="font-size:28upx;" class='app-price app-green'>{{ item.status | constantfilter('ORDER_STATUS') }}</view>
           </view>
@@ -210,6 +210,7 @@ export default {
           .admin-button-com {
             margin-left: 50upx;
             padding:20upx 30upx;
+            color:#999999;
           }
         }
       }

+ 32 - 30
hdApp/src/admin/work/components/workItem.vue

@@ -1,38 +1,38 @@
 <template>
     <view  @click="pageTo({url:'/admin/work/detail',query: {id: item.id}})">
         <view class="order-top_box" style="position:relative;">
-        <image style="width:130upx;position:absolute;top:80upx;right:20upx;border-radius:10upx;" @click.stop="previewImage(item.bigCover)" mode="widthFix" :src="item.cover"></image>
-        <view class="tit"> {{ item.name || "" }}</view>
-        <view style="color:#666666;">{{ statusFormat(item.status) }}</view>
+          <image style="width:130upx;position:absolute;top:110upx;right:25upx;border-radius:10upx;" @click.stop="previewImage(item.bigCover)" mode="widthFix" :src="item.cover"></image>
+          <view class="tit"> {{ item.name || "" }}</view>
+          <view style="color:#666666;">{{ statusFormat(item.status) }}</view>
         </view>
         <view class="order-list_info">
-        <view class="order-info_box">
-            <view>编号:</view>
-            <view>{{ item.mainId }}</view>
+            <view class="order-info_box">
+                <view>编号:</view>
+                <view>{{ item.mainId }}</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></view>
+            </view>
+            <view class="order-info_box">
+                <view>数量:</view>
+                <view>{{ item.num }}</view>
+            </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></view>
-        </view>
-        <view class="order-info_box">
-            <view>数量:</view>
-            <view>{{ item.num }}</view>
-        </view>
-        </view>
-        <div class="list-bottom">
-            <div class="list-button">
+        <view class="list-bottom">
+            <view class="list-button">
                 <button class="admin-button-com bule" @click.stop="cancel(item)" v-if="item.status == 0">取消</button>
                 <button disabled="true" class="admin-button-com default" v-else>取消</button>
-            </div>
-        </div>
+            </view>
+        </view>
     </view>
 </template>
 <script>
@@ -98,7 +98,7 @@ export default {
     }
 }
 .list-bottom {
-    & > div {
+    & > view {
         @include disFlex(center, flex-end);
     }
     .list-button {
@@ -161,10 +161,12 @@ export default {
     }
   }
 }
-
 .order-list_info {
-  padding: 10upx 30upx 30upx;
+  width:94vw;
+  margin:0 auto;
+  padding: 15upx 10upx 30upx;
   border-bottom: 1upx solid #eeeeee;
+  border-top: 1upx solid #eeeeee;
   & > .order-info_box {
     display: flex;
     align-items: center;

+ 2 - 3
hdApp/src/admin/work/list.vue

@@ -3,11 +3,10 @@
     <view class="input-wrap_box">
 
       <view @click="setSearchType" style="font-size:30upx;margin-right:10upx;color:#666666">
-      <text>{{searchTypeName}}</text>
-      <i class="iconfont iconsanjiao_xia"></i>
+      <text>编号</text>
       </view>
 
-      <view> <AppSearchModule placeholder="输入英文字母搜索" @input="searchFn"/> </view>
+      <view> <AppSearchModule placeholder="请输入编号" @input="searchFn"/> </view>
 
       <view class="select-dn_bx">
         <DateSelect class="bar" top="0" @selectDateFn="selectDateFn" defaultShowName='时间' />