Explorar o código

花束盆栽 与 采购

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

+ 3 - 4
hdApp/src/admin/billing/index.vue

@@ -20,12 +20,11 @@
 					</text>
 				</div>
 			</scroll-view>
-<!--			<scroll-view scroll-y class="right-box" v-if="tabIndex == 0" :scroll-into-view="suitScrollClassId">-->
+
 				<scroll-view scroll-y class="right-box" v-show="tabIndex == 0" :scroll-into-view="suit_scroll_into_view" scroll-with-animation="true"
 																	@scroll="suit_scroll_detail"
 																	lower-threshold="100"
 																	@scrolltolower="suit_scroll_bottom">
-				<!--内容部分 start -->
 				<block v-if="!$util.isEmpty(suitFilterProductInfo)">
 					<view class="item_list_bx suitSelectAll" v-for="(res,i) in suitFilterProductInfo" :key="i" :id="`class_${i}`">
 						<view class="item_list_title">{{ res.className }}</view>
@@ -172,9 +171,9 @@ import allMoreSelectInput from "@/components/module/allMoreSelectInput";
 import allMoreSelectInputMins from "@/mixins/allMoreSelectInput";
 import SelPopup from "@/components/sel-popup.vue";
 import { COMMODITY_TYPE } from "@/utils/declare";
-import productMins from "@/mixins/product";
+import productMins from "@/mixins/cgProduct";
 export default {
-	name: "Billing", // 开单
+	name: "index",
 	components: {
 		AppTabs,
 		AppSearchModule,

+ 37 - 23
hdApp/src/admin/goodsManage/list.vue

@@ -1,5 +1,15 @@
 <template>
-  <view class="app-content" @click="operateBottomShow = false">
+  <view class="app-content">
+
+		<view class="input-wrap" >
+			<view class="search-bar">
+				<app-search-module v-model="py" placeholder="输入英文字母搜索" @input="searchFn" />
+			</view>
+			<view style="float:right">
+				<button class="admin-button-com middle blue" @click="cgPlant()">盆栽采购</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)" >
@@ -7,7 +17,7 @@
         </view>
       </scroll-view>
       <block v-for="(item,index) in tabbar" :key="index">
-        <scroll-view scroll-y class="right-box" v-if="currentTab==index" >
+        <scroll-view scroll-y class="right-box" v-if="currentTab==index" @scrolltolower="goBottom">
           <block v-if="!$util.isEmpty(list.data)">
             <view class="page-view">
               <view class="goods-list" v-for="(goodsItem, idx) in list.data" :key="idx">
@@ -47,6 +57,7 @@
   </view>
 </template>
 <script>
+import AppSearchModule from "@/components/module/app-search";
 import OperateModule from "@/admin/home/components/module/operate";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import ModalModule from "@/components/plugin/modal";
@@ -57,7 +68,8 @@ export default {
   components: {
     OperateModule,
     AppWrapperEmpty,
-    ModalModule
+    ModalModule,
+    AppSearchModule
   },
   mixins: [list],
   data() {
@@ -73,8 +85,7 @@ export default {
       operateData: {},
       operateShow: false,
       operateIndex: null,
-      operateTop: 0,
-      operateBottomShow: false
+      operateTop: 0
     };
   },
   computed: {
@@ -92,6 +103,18 @@ export default {
     }
   },
   methods: {
+    goBottom(){
+      if (!this.list.finished) {
+        this._list().then((res) => {
+          uni.stopPullDownRefresh();
+        });
+      } else {
+        uni.stopPullDownRefresh();
+      }
+    },
+    cgPlant(){
+      this.$util.pageTo({url:"/admin/goodsManage/plant",type:2})
+    },
     edit(id){
         this.$util.pageTo({ url: "/admin/goodsManage/detail", query: { id: id } })
     },
@@ -107,6 +130,7 @@ export default {
     _list() {
       return getCategoryGoodsB({
         status: 1,
+        page: this.list.page,
         ...this.form
       }).then(res => {
         this.completes(res);
@@ -131,22 +155,6 @@ export default {
           item.status = status
         }
       });
-    },
-    delGoods(id) {
-      let that = this
-      uni.showModal({
-          title: '提示',
-          content: '确认停用商品?',
-          success: function (res) {
-              if (res.confirm) {
-                delB({ id: id}).then(res => {
-                  that.$msg("已停用");
-                  that.resetList();
-                  that._list();
-                })
-              }
-          }
-      });
     }
   }
 };
@@ -165,13 +173,12 @@ page {
   color: transparent;
 }
 .tab-view {
-  height:1500upx;
+	height: 100vh;
   width: 200upx;
   position: fixed;
   left: 0;
   z-index: 10;
   background-color: #f0f2f6;
-
   .tab-bar-item {
     width: 200upx;
     height: 110upx;
@@ -284,4 +291,11 @@ page {
     }
   }
 }
+.input-wrap {
+  padding: 22upx 20upx 22upx 30upx;
+  .search-bar {
+    display:inline-block;
+    width:532upx;
+  }
+}
 </style>

+ 299 - 0
hdApp/src/admin/goodsManage/plant.vue

@@ -0,0 +1,299 @@
+<template>
+  <view class="app-content">
+
+	<view class="input-wrap" >
+		<view class="search-bar">
+			<app-search-module v-model="py" placeholder="输入英文字母搜索" @input="searchFn" />
+		</view>
+		<view style="float:right">
+			<button class="admin-button-com middle blue" @click="newCg()">新品类</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)" >
+          <text>{{item.categoryName || ''}}</text>
+        </view>
+      </scroll-view>
+      <block v-for="(item,index) in tabbar" :key="index">
+        <scroll-view scroll-y class="right-box" v-if="currentTab==index" @scrolltolower="goBottom">
+          <block v-if="!$util.isEmpty(list.data)">
+            <view class="page-view">
+              <view class="goods-list" v-for="(goodsItem, idx) in list.data" :key="idx">
+
+                <view class="goods-list-top">
+                  <view class="img-blo">
+                    <image :src="goodsItem.smallImgList[0]" mode="aspectFit" ></image>
+                  </view>
+                  <view class="goods-det">
+                    <view class="goods-det-top" style="margin-bottom:4upx;">
+                      <view class="goods-name" style="font-size:29upx;font-weight:bold;">{{ goodsItem.name }}</view>
+                    </view>
+                    <view class="operate-wrap" style="margin-bottom:15upx;">
+                      <view class="goods-price" style="font-size:23upx;">60</view>
+					  <view style="float:right;display:inlin-block;padding-right:10upx;color:#666666;">
+						  <text>-</text>
+						  <text style="width:80upx;display:inline-block;"></text>
+						  <text>+</text>
+					  </view>
+                    </view>
+                    <view class="operate-wrap">
+                      <view style="font-size:23upx;color:#666666;">
+                        <text>库存</text> <text style="font-weight:bold;margin-left:8upx;">{{goodsItem.stock}}</text>
+                      </view>
+                    </view>
+                  </view>
+                </view>
+
+              </view>
+            </view>
+          </block>
+          <block v-else>
+            <app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
+          </block>
+        </scroll-view>
+      </block>
+    </view>
+  </view>
+</template>
+<script>
+import AppSearchModule from "@/components/module/app-search";
+import OperateModule from "@/admin/home/components/module/operate";
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import ModalModule from "@/components/plugin/modal";
+import {categoryListB,getCategoryGoodsB,delB,changeStatusB} from "@/api/goods";
+import { list } from "@/mixins";
+export default {
+  name: "plant",
+  components: {
+    OperateModule,
+    AppWrapperEmpty,
+    ModalModule,
+    AppSearchModule
+  },
+  mixins: [list],
+  data() {
+    return {
+      tabbar: [],
+      height: 0,
+      currentTab: 0,
+      scrollTop: 0,
+      form: {
+        categoryId: ""
+      },
+      delModal: false,
+      operateData: {},
+      operateShow: false,
+      operateIndex: null,
+      operateTop: 0
+    };
+  },
+  computed: {
+  },
+  onLoad: function() {
+    if (this.$util.isLogin()) {
+      setTimeout(() => {
+        uni.getSystemInfo({
+          success: res => {
+            this.height = res.windowHeight - 90;
+            this.sInit();
+          }
+        });
+      }, 50);
+    }
+  },
+  methods: {
+    goBottom(){
+      if (!this.list.finished) {
+        this._list().then((res) => {
+          uni.stopPullDownRefresh();
+        });
+      } else {
+        uni.stopPullDownRefresh();
+      }
+    },
+    newCg(){
+      //this.$util.pageTo({url:"/admin/goodsManage/plant",type:2})
+    },
+    async sInit() {
+      this._getClass();
+      this._list();
+    },
+    _getClass() {
+      categoryListB().then(res => {
+        this.tabbar = res.data;
+      });
+    },
+    _list() {
+      return getCategoryGoodsB({
+        status: 1,
+        page: this.list.page,
+        ...this.form
+      }).then(res => {
+        this.completes(res);
+      });
+    },
+    swichTab(e, item) {
+      let cur = e.currentTarget.dataset.current;
+      if (this.currentTab == cur) {
+        return false;
+      } else {
+        this.currentTab = cur;
+        this.form.categoryId = item.id;
+        this.resetList();
+        this._list();
+      }
+    },
+    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
+        }
+      });
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+.app-content {
+  min-height: calc(100vh - 80upx);
+  background-color: #fff;
+}
+page {
+  background: #fff;
+}
+::-webkit-scrollbar {
+  width: 0;
+  height: 0;
+  color: transparent;
+}
+.tab-view {
+	height: 100vh;
+  width: 200upx;
+  position: fixed;
+  left: 0;
+  z-index: 10;
+  background-color: #f0f2f6;
+  .tab-bar-item {
+    width: 200upx;
+    height: 110upx;
+    box-sizing: border-box;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    font-size: 26upx;
+    color: #444;
+    font-weight: 400;
+  }
+  .active {
+    position: relative;
+    color: $mainColor;
+    font-size: 26upx;
+    background: #fff;
+  }
+  .active::before {
+    content: "";
+    position: absolute;
+    border-left: 8upx solid $mainColor;
+    height: 100%;
+    left: 0;
+  }
+}
+.right-box {
+  width: 100%;
+  height:1260upx;
+  position: fixed;
+  padding-left: 220upx;
+  padding-bottom:30upx;
+  box-sizing: border-box;
+  left: 0;
+  .page-view {
+    width: 100%;
+    overflow: hidden;
+    box-sizing: border-box;
+    padding-bottom: env(safe-area-inset-bottom);
+    .goods-list {
+      margin: 40upx 0;
+      .goods-list-top {
+        position: relative;
+        @include disFlex(flex-start, flex-start);
+      }
+      .goods-list-bottom {
+        width: 96%;
+        margin-top: 16upx;
+        color: #bebebe;
+        text{
+          border:1px solid rgb(218, 216, 216);
+          border-radius: 20upx;
+          font-size:22upx;
+          padding:6upx 25upx 6upx 25upx;
+        }
+      }
+      .img-blo {
+        width: 130upx;
+        height: 130upx;
+        margin-right: 20upx;
+        & > image {
+          height: 100%;
+          width: 100%;
+        }
+      }
+      .goods-det {
+        width: calc(100% - 150upx);
+        font-size: 28upx;
+        .operate-wrap {
+          @include disFlex(flex-end, space-between);
+        }
+        .operate-icon-wrap {
+          left: -20upx;
+        }
+        .goods-name {
+          margin-bottom: 10upx;
+        }
+        .goods-sales {
+          color: $fontColor3;
+          font-size: 24upx;
+        }
+        .goods-price {
+          color: #ff2842;
+          font-weight: bold;
+        }
+      }
+    }
+  }
+}
+.app-footer {
+  justify-content: space-between;
+  .btn-list {
+    width: 100%;
+    &:first-child {
+      border-left: 0;
+    }
+    .admin-button-com {
+      width: 160upx;
+      padding-top: 16upx;
+      padding-bottom: 16upx;
+      float:right;
+      margin-right:30upx;
+    }
+  }
+  .other-btn {
+    color: $fontColor2;
+    .iconfont {
+      font-size: 24upx;
+      color: $fontColor3;
+      transform: scale(0.4);
+    }
+  }
+}
+.input-wrap {
+	padding: 22upx 20upx 22upx 30upx;
+	.search-bar {
+		display:inline-block;
+		width:560upx;
+	}
+}
+</style>

+ 1 - 1
hdApp/src/admin/home/apply.vue

@@ -33,7 +33,7 @@ export default {
                 {name: "花材",img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,url: "/admin/item/list"},
                 {name: "停用花材",img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,url: "/admin/item/list?delStatus=1"},
                 {name: "花材分类",img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,url: "/admin/itemClass/list"},
-                { name: "商品", img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`, url: "/admin/goodsManage/list" },
+                { name: "花束盆栽", img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`, url: "/admin/goodsManage/list" },
                 { name: "商品分类", img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`, url: "/admin/goodsManage/category" },
                 { name: "涨价设置", img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`, url: "/admin/goodsManage/price-increase" },
                 { name: "运费规则", img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`, url: "/admin/goodsManage/freight" }

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

@@ -97,7 +97,7 @@ export default {
         { name: "收款", img: `${this.$constant.imgUrl}/ghs/home/icon_sk.png`, url: "/admin/billing/priceChange" },
         { name: "采购单", img: `${this.$constant.imgUrl}/ghs/home/icon_caigou.png`, url: "/pagesPurchase/shopping" },
         { name: "供应商", img: `${this.$constant.imgUrl}/ghs/home/icon_ghs.png`, url: "/pagesPurchase/order" },
-        { name: "商品", img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`, url: "/admin/goodsManage/list" },
+        { name: "花束盆栽", img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`, url: "/admin/goodsManage/list" },
         { name: "花材", img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`, url: "/admin/item/list" },
         { name: "改价", img: `${this.$constant.imgUrl}/ghs/home/gj.png`, url: "/admin/changePrice/list" },
         { name: "报损单", img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`, url: "/admin/breakage/list" }

+ 1 - 1
hdApp/src/components/mx-datepicker/mx-datepicker.vue

@@ -396,7 +396,7 @@
 						if (this.isMultiSelect && this.showTips) item.tips = this.beginText;
 					}
 				});
-				//节日或今日的日期标点
+				//节日或今日的日期标点
 				if (item.statusStyle.background != this.color) {
 					let holiday = this.showHoliday ? DateTools.getHoliday(item.dateObj) : false;
 					if (holiday || DateTools.isSameDay(new Date(), item.dateObj)) {

+ 2 - 1
hdApp/src/pages.json

@@ -184,7 +184,8 @@
 				{ "path": "img-store", "style": { "navigationBarTitleText": "图库管理" } },
 				{ "path": "goods-name", "style": { "navigationBarTitleText": "填写商品信息" } },
 				{ "path": "freight", "style": { "navigationBarTitleText": "运费设置" } },
-				{ "path": "price-increase", "style": { "navigationBarTitleText": "节假日自动涨价" } }
+				{ "path": "price-increase", "style": { "navigationBarTitleText": "节日自动涨价" } },
+				{ "path": "plant", "style": { "navigationBarTitleText": "盆栽绿植资材" } }
 			]
 		},
 		{