shish 1 год назад
Родитель
Сommit
8959ef4a12

+ 0 - 1
ghsApp/src/admin/breakage/result.vue

@@ -19,7 +19,6 @@ export default {
 			uni.navigateBack({})
 		},
 		init(){
-
 		}
 	}
 };

+ 49 - 30
hdApp/src/admin/breakage/confirm.vue

@@ -6,26 +6,28 @@
         <view class="module-com">
           <view class="commodity-view">
             <view class="commodity-list">
-              <view class="commodity-item" v-for="(item, index) in selectList" :key="index">
-                <image class="item-icon" :src="item.cover" alt="商品图" />
-                <view class="item-info">
-                  <view class="info-line">
-                    <text class="item-name">{{ item.itemName }}</text>
-                    <text class="item-price">
-                      <text class="unit"></text>
-                      <text class="price">
-                        <text v-if="item.bigCount > 0">{{`${item.bigCount}`}}扎</text>
-                        <text v-if="item.smallCount > 0">{{`${item.smallCount}`}}支</text>
+              <template v-if="!$util.isEmpty(selectList)">
+                <view class="commodity-item" v-for="(item, index) in selectList" :key="index">
+                  <image class="item-icon" :src="item.cover" />
+                  <view class="item-info">
+                    <view class="info-line">
+                      <text class="item-name">{{ item.name || '' }}</text>
+                      <text class="item-price">
+                        <text class="unit"></text>
+                        <text class="price">
+                          <text v-if="item.bigCount > 0">{{`${item.bigCount}`}}{{item.bigUnit}}</text>
+                          <text v-if="item.smallCount > 0">{{`${item.smallCount}`}}{{item.smallUnit}}</text>
+                        </text>
                       </text>
-                    </text>
-                  </view>
-                  <view class="info-line">
-                    <text class="item-type"></text>
-                    <text class="item-count">
-                    </text>
+                    </view>
+                    <view class="info-line">
+                      <text class="item-type" v-if="item.ratioType == 0">{{item.ratio}}{{item.smallUnit}}/{{item.bigUnit}}</text>
+                      <text class="item-type" v-else>若干{{item.smallUnit}}/{{item.bigUnit}}</text>
+                      <text class="item-count"></text>
+                    </view>
                   </view>
                 </view>
-              </view>
+              </template>
             </view>
             <view class="summary-bar">
               <view class="operate-view" @click="gobackEvent">
@@ -51,9 +53,12 @@
     </view>
     <view class="under-bar">
       <view class="price-view"></view>
-      <button class="admin-button-com blue big" @click="affirmFormSubmit">提交</button>
+      <button class="admin-button-com blue big" style="width:200upx;" @click="affirmFormSubmit">提交</button>
     </view>
 
+    <view v-if="isScanEnv" @click="changeGet" style="width:125upx;height:125upx;display:flex;justify-content:center;align-items:center;font-size:60upx;
+    background:#3385ff;color:white;z-index:9999;position:fixed;bottom:160upx;right:40upx;border-radius:60upx;">{{calc=='add'?'+':'-'}}</view>
+
   </view>
 </view>
 </template>
@@ -72,7 +77,7 @@ const formUtil = require("@/utils/formValidation.js");
 import { wastage } from "@/api/order/index";
 import { mapActions, mapGetters } from "vuex";
 export default {
-  name: "confirm",
+  name: "BillingAffirm", // 开单确认
   components: {
     TuiListCell,
     AppAvatarModule,
@@ -114,6 +119,8 @@ export default {
       money: "",
       showCustomer: false,
 			selectJobType: "wastage",
+      calc:'add',
+      isScanEnv:false
     };
   },
   onLoad (option) {
@@ -135,6 +142,15 @@ export default {
     if(option.customName){
       this.form.customName = option.customName
     }
+
+   // #ifdef APP-PLUS
+    if(this.$util.isScanEnv()){
+      this.isScanEnv = true
+    }
+    // #endif
+
+    this.listenScanItem()
+
   },
 	onShow(){
 		if(!this.$util.isEmpty(uni.getStorageSync("newClient"))){
@@ -142,7 +158,8 @@ export default {
 		}
 	},
 	onUnload(){
-			uni.removeStorageSync('newClient');
+			uni.removeStorageSync('newClient')
+      uni.$off('listenGetScanCode')
 	},
   computed: {
     ...mapGetters(["getMerchantInfo", "getLoginInfo"]),
@@ -151,6 +168,9 @@ export default {
     ...mapActions(["initMerchantInfo"]),
     init () {
       this._getDet();
+    },
+    changeGet(){
+      this.calc = this.calc == 'add' ? 'sub' : 'add'
     },
 		payWayChange(e){
 			let index = e.detail.value
@@ -212,7 +232,8 @@ export default {
           bigNum: ele.bigCount,
           smallNum: ele.smallCount,
           classId: ele.classId,
-          itemId: ele.itemId
+          itemId: ele.itemId,
+          ratio:ele.ratio
         };
       });
       that.$util.confirmModal({content:'确认报损?'},() => {
@@ -272,14 +293,15 @@ export default {
               justify-content: space-between;
               align-items: flex-end;
               .item-name {
-                color: #666;
-                font-size: 28upx;
+                color: #333333;
+                font-size: 32upx;
+                font-weight: bold;
               }
               .item-price {
                 color: #333;
                 font-size: 22upx;
                 .price {
-                  font-size: 32upx;
+                  font-size: 30upx;
                   font-weight: bold;
                 }
               }
@@ -310,8 +332,8 @@ export default {
           font-size: 30upx;
           font-weight:bold;
           .iconfont {
-            margin-right: 20upx;
-            font-size: 40upx;
+            margin-right:10upx;
+            font-size:32upx;
           }
         }
         .describe-view {
@@ -403,9 +425,6 @@ export default {
         }
       }
     }
-    .admin-button-com {
-      width: 200upx;
-    }
   }
 }
-</style>
+</style>

+ 67 - 48
hdApp/src/admin/breakage/index.vue

@@ -2,10 +2,13 @@
 <view class="app-content">
 	<view class="billing_box_bg">
 		<view class="input-wrap" >
+			<view style="padding:0upx 0upx 0upx 0upx;margin-right:10upx;" >
+				<button class="admin-button-com middle blue" @click="selectFlowerNumFn()">图片分类</button>
+			</view>
 			<view class="search-bar">
-				<app-search-module v-model="py" placeholder="输入拼音首字母搜索" @input="searchFn" />
+				<app-search-module ref="globalSearchRef" v-model="globalPy" placeholder="这里搜索" @input="globalSearch" />
 			</view>
-			<view style="float:right">
+			<view style="float:right;margin-left:10upx;">
 				<button class="admin-button-com middle blue" @click="removeFromSave(0)">清除花材</button>
 			</view>
 		</view>
@@ -13,55 +16,41 @@
 		<view class="scroll-middle_bx">
 
 			<scroll-view scroll-y scroll-with-animation class="tab-view">
-				<!--分类 start -->
-				<div v-for="(item, index) in globalClassItemList" :key="index" class="tab-bar-item" :class="classIndex == index ? 'active' : ''" :data-current="index" @tap.stop="swichClass(index)">
-					<text>{{ item.className || "" }}</text>
+				<div v-for="(item, index) in globalClassData" :key="index" class="tab-bar-item" :class="globalClassIndex == index ? 'active' : ''" :data-current="index" @tap.stop="globalSwitchClass(index,item)">
+					<text>{{ item.name || "" }}</text>
 				</div>
-				<!--分类 end -->
 				<view style="height: 120upx"></view>
 			</scroll-view>
 
-			<scroll-view scroll-y class="right-box" :scroll-into-view="scroll_into_view" scroll-with-animation="true" @scroll="scroll_detail" lower-threshold="100" @scrolltolower="scroll_bottom">
-				<!--花材列表 start -->
-				<block v-if="!$util.isEmpty(globalClassItemList)">
-					<view class="item_list_bx selectAll" v-for="(classItem, classIndex) in globalClassItemList" :key="classIndex" :id="`class_${classIndex}`">
-						<view class="item_list_title">{{ classItem.className }}</view>
-
-						<view v-if="classItem.child && !$util.isEmpty(classItem.child)">
-
-							<template v-for="(productItem, productIndex) in classItem.child">
-								<view style="height: 160upx" :id="`class_${classItem.classId}_${productItem.id}`" :key="productIndex">
-									<Commondity v-if="classItem.isActive"
-										:checkStock="true"
-										:info="productItem"
-										@showAddModelFn="showAddModelFn"
-										@replaceItemFn="replaceItemFn"
-									></Commondity>
-								</view>
-							</template>
-
-						</view>
-						<view v-else>
-							<view style="height:260upx;text-align:center;color:#CCCCCC;position: relative;">
-								<view style="position: absolute;margin:auto;top:130upx;left:0;right:0;bottom:0;">暂无花材</view>
+			<scroll-view scroll-y class="right-box" :scroll-into-view="scroll_into_view" scroll-with-animation="true" 
+			:scroll-top="globalScrollTopPlace" @scroll="globalGetScroll" lower-threshold="100" @scrolltolower="globalScrollBottom">
+				<block v-if="!$util.isEmpty(globalItemData)">
+					<view class="item_list_bx selectAll">
+						<template v-for="(productItem, productIndex) in globalItemData">
+							<view class="item_list_title" v-if="productItem.className && productItem.className!=''">{{ productItem.className }}</view>
+							<view style="height: 175upx" :key="productIndex">
+								<Commondity
+									:checkStock="true"
+									:info="productItem"
+									@showAddModelFn="showAddModelFn"
+									@replaceItemFn="replaceItemFn"
+								></Commondity>
 							</view>
-						</view>
-
+						</template>
 					</view>
 				</block>
 				<block v-else>
-					<app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(globalClassItemList)" />
+					<app-wrapper-empty title="加载中" :is-empty="$util.isEmpty(globalItemData)" />
 				</block>
-				<!--花材列表 end -->
 			</scroll-view>
 
 		</view>
 		
-		<modal-module :show="isAddModel" @cancel="addItemModelHidden" @click="confirmAddItemModel" :title="customData.itemName" color="#333" :size="32" padding="30rpx 30rpx" >
+		<modal-module :show="isAddModel" @cancel="addItemModelHidden" @click="confirmAddItemModel" :title="customData.name" color="#333" :size="32" padding="30rpx 30rpx" >
 			<template slot="customContent">
 				<view class="select-cmd_bx" v-if="customData">
-					<view class="kc"><text class="unit_price">库存 {{ customData.stock?parseFloat(customData.stock):0 }}</text></view>
-					<view class="num_bx"> 
+					<view class="kc"><text class="unit_price">库存 {{ customData.stock||0 }}</text></view>
+					<view class="num_bx">
 
 						<!-- #ifdef APP-PLUS -->
 						<input style="width: 260upx" v-model="customData.bigCount" v-if="globalUnitType == 0" type="number" />
@@ -75,6 +64,7 @@
 						<input style="width: 260upx" v-model="customData.smallCount" v-if="globalUnitType == 1" :focus="isAddInputFocus" type="number" />
 						<text style="font-size:35upx;font-weight:bold;color:#666666;" v-if="globalUnitType == 1">{{customData.smallUnit}}</text>
 						<!-- #endif -->
+						<image @click="switchGlobalUnitType" :src="`${constant.imgUrl}/icon/switch/switch128.png`" style="width:86upx;height:86upx;" mode="widthFix"></image>
 
 					</view>
 				</view>
@@ -82,9 +72,22 @@
 		</modal-module>
 
 		<!-- 花材不足提示框 -->
-		<modal-module :show="showSubmitModel" title="确认下一步?" color="#333" :size="32" padding="30rpx 30rpx" >
+		<modal-module :show="showSubmitModel" title="确认下一步?" color="#333" :size="32" padding="30upx 30upx" >
 		</modal-module>
-		<FooterCart :price="allPrice" :count="allCount" @confirm="confirmToSave" ></FooterCart>
+
+		<FooterCart :price="allPrice" :count="allCount" @confirm="confirmToSave" :displayTotalPrice="false"></FooterCart>
+
+		<uni-popup ref="globalClassImgRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
+			<view style="display:flex;padding:20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
+
+				<view v-for="(item, index) in globalClassData" :key="index" @tap.stop="globalChangeClass(index,item)" style="margin-bottom:20upx;margin-left:3upx;">
+				<image :src="item.cover" style="width:120upx;height:120upx;border-radius:10upx;"></image>
+				<view style="margin-top:5upx;overflow: hidden;white-space: nowrap;width:120upx;text-align:center;">{{item.name}}</view>
+				</view>
+
+			</view>
+		</uni-popup>
+
 	</view>
 </view>
 </template>
@@ -97,9 +100,9 @@ import Commondity from "@/components/module/app-commodity";
 import FooterCart from "@/components/module/app-footer-cart";
 import ModalModule from "@/components/plugin/modal";
 import { COMMODITY_TYPE } from "@/utils/declare";
-import productMins from "@/mixins/product";
+import productMins from "@/mixins/product2";
 export default {
-	name: "WastageBilling",//损耗
+	name: "index",
 	components: {
 		AppTabs,
 		AppSearchModule,
@@ -111,7 +114,7 @@ export default {
 	mixins: [productMins],
 	data() {
 		return {
-			selectJobType: "wastage", //选择商品页面类别
+			selectJobType: "wastage",
 			COMMODITY_TYPE,
 			isAddModel: false,
 			isSmallCount:false,
@@ -121,14 +124,29 @@ export default {
 				smallCount: 0,
 				userPrice:0
 			},
-			showSubmitModel: false
+			showSubmitModel: false,
+			unitType:0,
+			showClassRemind:false,
+			autoLoad: false
 		};
 	},
-	computed: {
-	},
-	onUnload() {
+	onLoad(){
+		this.globalRequestType = 'break'
+		this.initData()
 	},
 	methods: {
+		selectFlowerNumFn(){
+			this.$refs.globalClassImgRef.open('top')
+		},
+		switchGlobalUnitType(){
+			if(this.globalUnitType == 0){
+				this.globalUnitType = 1
+				this.customData.bigCount = null
+			}else{
+				this.globalUnitType = 0
+				this.customData.smallCount = null
+			}
+		},
 		confirmToSave() {
 			if(this.$util.isEmpty(this.selectList)){
 				this.$msg('请选择花材')
@@ -147,10 +165,10 @@ export default {
 	display: flex;
 	flex-direction: column;
 	.input-wrap {
-		padding: 22upx 20upx 22upx 30upx;
+		display: flex;
+		padding: 22upx 20upx 22upx 13upx;
 		.search-bar {
-			display:inline-block;
-			width:530upx;
+			flex: 1;
 		}
 	}
 	.scroll-middle_bx {
@@ -212,6 +230,7 @@ export default {
 		height: calc(100vh - 140upx);
 		flex: 1;
 		box-sizing: border-box;
+
 	}
 	.item_list_bx {
 		padding: 40upx 16upx;

+ 3 - 0
hdApp/src/admin/breakage/result.vue

@@ -17,6 +17,9 @@ export default {
 	methods: {
 		goBackHome() {
 			uni.navigateBack({})
+		},
+		init(){
+
 		}
 	}
 };

+ 0 - 1
hdApp/src/admin/item/detail.vue

@@ -419,7 +419,6 @@ import TuiListCell from "@/components/plugin/list-cell";
 const form = require("@/utils/formValidation.js");
 import { getAllItemClass } from "@/api/item-class";
 import { applyAuth,modifyCgStaff,setLosing,modifyUnit,modifyRatio,modifyWeight,clearLimitBuy } from '@/api/item';
-import { delCpItem,addCpItem } from '@/api/cp'
 import { getAllUnit } from "@/api/unit";
 import { addProduct,updateProduct,getProductDetail,py,print,modifyOnStockFn,delStatusUpdate,changeBelongCost } from "@/api/product";
 import { getPtItemDetail } from "@/api/pt-item";

+ 49 - 36
hdApp/src/admin/part/confirm.vue

@@ -6,26 +6,28 @@
         <view class="module-com">
           <view class="commodity-view">
             <view class="commodity-list">
-              <view class="commodity-item" v-for="(item, index) in selectList" :key="index">
-                <image class="item-icon" :src="item.cover" alt="商品图" />
-                <view class="item-info">
-                  <view class="info-line">
-                    <text class="item-name">{{ item.itemName }}</text>
-                    <text class="item-price">
-                      <text class="unit"></text>
-                      <text class="price">
-                        <text v-if="item.bigCount > 0">{{`${item.bigCount}`}}扎</text>
-                        <text v-if="item.smallCount > 0">{{`${item.smallCount}`}}支</text>
+              <template v-if="!$util.isEmpty(selectList)">
+                <view class="commodity-item" v-for="(item, index) in selectList" :key="index">
+                  <image class="item-icon" :src="item.cover" />
+                  <view class="item-info">
+                    <view class="info-line">
+                      <text class="item-name">{{ item.name || '' }}</text>
+                      <text class="item-price">
+                        <text class="unit"></text>
+                        <text class="price">
+                          <text v-if="item.bigCount > 0">{{`${item.bigCount}`}}{{item.bigUnit}}</text>
+                          <text v-if="item.smallCount > 0">{{`${item.smallCount}`}}{{item.smallUnit}}</text>
+                        </text>
                       </text>
-                    </text>
-                  </view>
-                  <view class="info-line">
-                    <text class="item-type"></text>
-                    <text class="item-count">
-                    </text>
+                    </view>
+                    <view class="info-line">
+                      <text class="item-type" v-if="item.ratioType == 0">{{item.ratio}}{{item.smallUnit}}/{{item.bigUnit}}</text>
+                      <text class="item-type" v-else>若干{{item.smallUnit}}/{{item.bigUnit}}</text>
+                      <text class="item-count"></text>
+                    </view>
                   </view>
                 </view>
-              </view>
+              </template>
             </view>
             <view class="summary-bar">
               <view class="operate-view" @click="gobackEvent">
@@ -51,9 +53,12 @@
     </view>
     <view class="under-bar">
       <view class="price-view"></view>
-      <button class="admin-button-com blue big" @click="affirmFormSubmit">提交</button>
+      <button class="admin-button-com blue big" style="width:200upx;" @click="affirmFormSubmit">提交</button>
     </view>
 
+    <view v-if="isScanEnv" @click="changeGet" style="width:125upx;height:125upx;display:flex;justify-content:center;align-items:center;font-size:60upx;
+    background:#3385ff;color:white;z-index:9999;position:fixed;bottom:160upx;right:40upx;border-radius:60upx;">{{calc=='add'?'+':'-'}}</view>
+
   </view>
 </view>
 </template>
@@ -68,6 +73,7 @@ import appFormRadioBtn from "@/components/app-formRadio-btn";
 import appAddressGroup from "@/components/app-address-group";
 import appSendTime from "@/components/app-send-time";
 import appFormSend from "@/components/app-form-send";
+const formUtil = require("@/utils/formValidation.js");
 import { partItem } from "@/api/part";
 import { mapActions, mapGetters } from "vuex";
 export default {
@@ -111,8 +117,9 @@ export default {
         needPrint:1,
       },
       money: "",
-      showCustomer: false,
 			selectJobType: "part",
+      calc:'add',
+      isScanEnv:false
     };
   },
   onLoad (option) {
@@ -134,14 +141,19 @@ export default {
     if(option.customName){
       this.form.customName = option.customName
     }
+
+   // #ifdef APP-PLUS
+    if(this.$util.isScanEnv()){
+      this.isScanEnv = true
+    }
+    // #endif
+
+    this.listenScanItem()
+
   },
-	onShow(){
-		if(!this.$util.isEmpty(uni.getStorageSync("newClient"))){
-			this.showCustomer = true;
-		}
-	},
 	onUnload(){
-			uni.removeStorageSync('newClient');
+			uni.removeStorageSync('newClient')
+      uni.$off('listenGetScanCode')
 	},
   computed: {
     ...mapGetters(["getMerchantInfo", "getLoginInfo"]),
@@ -150,6 +162,9 @@ export default {
     ...mapActions(["initMerchantInfo"]),
     init () {
       this._getDet();
+    },
+    changeGet(){
+      this.calc = this.calc == 'add' ? 'sub' : 'add'
     },
 		payWayChange(e){
 			let index = e.detail.value
@@ -211,12 +226,12 @@ export default {
           bigNum: ele.bigCount,
           smallNum: ele.smallCount,
           classId: ele.classId,
-          itemId: ele.itemId
+          itemId: ele.itemId,
+          ratio:ele.ratio
         };
       });
       that.$util.confirmModal({content:'确认拆散?'},() => {
           partItem({product:JSON.stringify(product),remark:that.form.remark}).then((res) => {
-            //删除记忆
             that.removeFromSaveDirect()
             const {data: { id, orderSn },} = res;
             that.pageTo({url: '/admin/part/result',type:2})
@@ -271,14 +286,15 @@ export default {
               justify-content: space-between;
               align-items: flex-end;
               .item-name {
-                color: #666;
-                font-size: 28upx;
+                color: #333333;
+                font-size: 32upx;
+                font-weight: bold;
               }
               .item-price {
                 color: #333;
                 font-size: 22upx;
                 .price {
-                  font-size: 32upx;
+                  font-size: 30upx;
                   font-weight: bold;
                 }
               }
@@ -309,8 +325,8 @@ export default {
           font-size: 30upx;
           font-weight:bold;
           .iconfont {
-            margin-right: 20upx;
-            font-size: 40upx;
+            margin-right:10upx;
+            font-size:32upx;
           }
         }
         .describe-view {
@@ -402,9 +418,6 @@ export default {
         }
       }
     }
-    .admin-button-com {
-      width: 200upx;
-    }
   }
 }
-</style>
+</style>

+ 66 - 47
hdApp/src/admin/part/index.vue

@@ -2,10 +2,13 @@
 <view class="app-content">
 	<view class="billing_box_bg">
 		<view class="input-wrap" >
+			<view style="padding:0upx 0upx 0upx 0upx;margin-right:10upx;" >
+				<button class="admin-button-com middle blue" @click="selectFlowerNumFn()">图片分类</button>
+			</view>
 			<view class="search-bar">
-				<app-search-module v-model="py" placeholder="输入拼音首字母搜索" @input="searchFn" />
+				<app-search-module ref="globalSearchRef" v-model="globalPy" placeholder="这里搜索" @input="globalSearch" />
 			</view>
-			<view style="float:right">
+			<view style="float:right;margin-left:10upx;">
 				<button class="admin-button-com middle blue" @click="removeFromSave(0)">清除花材</button>
 			</view>
 		</view>
@@ -13,55 +16,41 @@
 		<view class="scroll-middle_bx">
 
 			<scroll-view scroll-y scroll-with-animation class="tab-view">
-				<!--分类 start -->
-				<div v-for="(item, index) in globalClassItemList" :key="index" class="tab-bar-item" :class="classIndex == index ? 'active' : ''" :data-current="index" @tap.stop="swichClass(index)">
-					<text>{{ item.className || "" }}</text>
+				<div v-for="(item, index) in globalClassData" :key="index" class="tab-bar-item" :class="globalClassIndex == index ? 'active' : ''" :data-current="index" @tap.stop="globalSwitchClass(index,item)">
+					<text>{{ item.name || "" }}</text>
 				</div>
-				<!--分类 end -->
 				<view style="height: 120upx"></view>
 			</scroll-view>
 
-			<scroll-view scroll-y class="right-box" :scroll-into-view="scroll_into_view" scroll-with-animation="true" @scroll="scroll_detail" lower-threshold="100" @scrolltolower="scroll_bottom">
-				<!--花材列表 start -->
-				<block v-if="!$util.isEmpty(globalClassItemList)">
-					<view class="item_list_bx selectAll" v-for="(classItem, classIndex) in globalClassItemList" :key="classIndex" :id="`class_${classIndex}`">
-						<view class="item_list_title">{{ classItem.className }}</view>
-
-						<view v-if="classItem.child && !$util.isEmpty(classItem.child)">
-
-							<template v-for="(productItem, productIndex) in classItem.child">
-								<view style="height: 160upx" :id="`class_${classItem.classId}_${productItem.id}`" :key="productIndex">
-									<Commondity v-if="classItem.isActive"
-										:checkStock="true"
-										:info="productItem"
-										@showAddModelFn="showAddModelFn"
-										@replaceItemFn="replaceItemFn"
-									></Commondity>
-								</view>
-							</template>
-
-						</view>
-						<view v-else>
-							<view style="height:260upx;text-align:center;color:#CCCCCC;position: relative;">
-								<view style="position: absolute;margin:auto;top:130upx;left:0;right:0;bottom:0;">暂无花材</view>
+			<scroll-view scroll-y class="right-box" :scroll-into-view="scroll_into_view" scroll-with-animation="true" 
+			:scroll-top="globalScrollTopPlace" @scroll="globalGetScroll" lower-threshold="100" @scrolltolower="globalScrollBottom">
+				<block v-if="!$util.isEmpty(globalItemData)">
+					<view class="item_list_bx selectAll">
+						<template v-for="(productItem, productIndex) in globalItemData">
+							<view class="item_list_title" v-if="productItem.className && productItem.className!=''">{{ productItem.className }}</view>
+							<view style="height: 175upx" :key="productIndex">
+								<Commondity
+									:checkStock="true"
+									:info="productItem"
+									@showAddModelFn="showAddModelFn"
+									@replaceItemFn="replaceItemFn"
+								></Commondity>
 							</view>
-						</view>
-
+						</template>
 					</view>
 				</block>
 				<block v-else>
-					<app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(globalClassItemList)" />
+					<app-wrapper-empty title="加载中" :is-empty="$util.isEmpty(globalItemData)" />
 				</block>
-				<!--花材列表 end -->
 			</scroll-view>
 
 		</view>
 		
-		<modal-module :show="isAddModel" @cancel="addItemModelHidden" @click="confirmAddItemModel" :title="customData.itemName" color="#333" :size="32" padding="30rpx 30rpx" >
+		<modal-module :show="isAddModel" @cancel="addItemModelHidden" @click="confirmAddItemModel" :title="customData.name" color="#333" :size="32" padding="30rpx 30rpx" >
 			<template slot="customContent">
 				<view class="select-cmd_bx" v-if="customData">
-					<view class="kc"><text class="unit_price">库存 {{ customData.stock?parseFloat(customData.stock):0 }}</text></view>
-					<view class="num_bx"> 
+					<view class="kc"><text class="unit_price">库存 {{ customData.stock||0 }}</text></view>
+					<view class="num_bx">
 
 						<!-- #ifdef APP-PLUS -->
 						<input style="width: 260upx" v-model="customData.bigCount" v-if="globalUnitType == 0" type="number" />
@@ -75,6 +64,7 @@
 						<input style="width: 260upx" v-model="customData.smallCount" v-if="globalUnitType == 1" :focus="isAddInputFocus" type="number" />
 						<text style="font-size:35upx;font-weight:bold;color:#666666;" v-if="globalUnitType == 1">{{customData.smallUnit}}</text>
 						<!-- #endif -->
+						<image @click="switchGlobalUnitType" :src="`${constant.imgUrl}/icon/switch/switch128.png`" style="width:86upx;height:86upx;" mode="widthFix"></image>
 
 					</view>
 				</view>
@@ -82,9 +72,22 @@
 		</modal-module>
 
 		<!-- 花材不足提示框 -->
-		<modal-module :show="showSubmitModel" title="确认下一步?" color="#333" :size="32" padding="30rpx 30rpx" >
+		<modal-module :show="showSubmitModel" title="确认下一步?" color="#333" :size="32" padding="30upx 30upx" >
 		</modal-module>
-		<FooterCart :price="allPrice" :count="allCount" @confirm="confirmToSave" ></FooterCart>
+
+		<FooterCart :price="allPrice" :count="allCount" @confirm="confirmToSave" :displayTotalPrice="false"></FooterCart>
+
+		<uni-popup ref="globalClassImgRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
+			<view style="display:flex;padding:20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
+
+				<view v-for="(item, index) in globalClassData" :key="index" @tap.stop="globalChangeClass(index,item)" style="margin-bottom:20upx;margin-left:3upx;">
+				<image :src="item.cover" style="width:120upx;height:120upx;border-radius:10upx;"></image>
+				<view style="margin-top:5upx;overflow: hidden;white-space: nowrap;width:120upx;text-align:center;">{{item.name}}</view>
+				</view>
+
+			</view>
+		</uni-popup>
+
 	</view>
 </view>
 </template>
@@ -97,9 +100,9 @@ import Commondity from "@/components/module/app-commodity";
 import FooterCart from "@/components/module/app-footer-cart";
 import ModalModule from "@/components/plugin/modal";
 import { COMMODITY_TYPE } from "@/utils/declare";
-import productMins from "@/mixins/product";
+import productMins from "@/mixins/product2";
 export default {
-	name: "index",//拆散
+	name: "index",
 	components: {
 		AppTabs,
 		AppSearchModule,
@@ -121,14 +124,29 @@ export default {
 				smallCount: 0,
 				userPrice:0
 			},
-			showSubmitModel: false
+			showSubmitModel: false,
+			unitType:0,
+			showClassRemind:false,
+			autoLoad: false
 		};
 	},
-	computed: {
-	},
-	onUnload() {
+	onLoad(){
+		this.globalRequestType = 'part'
+		this.initData()
 	},
 	methods: {
+		selectFlowerNumFn(){
+			this.$refs.globalClassImgRef.open('top')
+		},
+		switchGlobalUnitType(){
+			if(this.globalUnitType == 0){
+				this.globalUnitType = 1
+				this.customData.bigCount = null
+			}else{
+				this.globalUnitType = 0
+				this.customData.smallCount = null
+			}
+		},
 		confirmToSave() {
 			if(this.$util.isEmpty(this.selectList)){
 				this.$msg('请选择花材')
@@ -147,10 +165,10 @@ export default {
 	display: flex;
 	flex-direction: column;
 	.input-wrap {
-		padding: 22upx 20upx 22upx 30upx;
+		display: flex;
+		padding: 22upx 20upx 22upx 13upx;
 		.search-bar {
-			display:inline-block;
-			width:530upx;
+			flex: 1;
 		}
 	}
 	.scroll-middle_bx {
@@ -212,6 +230,7 @@ export default {
 		height: calc(100vh - 140upx);
 		flex: 1;
 		box-sizing: border-box;
+
 	}
 	.item_list_bx {
 		padding: 40upx 16upx;

+ 3 - 2
hdApp/src/mixins/product.js

@@ -404,8 +404,6 @@ export default {
 					}					
 				}
 			}
-			console.log('........replace_item......')
-			console.log(item)
 			const list = this.selectList
 			if(this.checkStock){
 				if ((Number(item.bigCount) * item.ratio + Number(item.smallCount)) > (Number(item.bigNum) * item.ratio + Number(item.smallNum))) {
@@ -531,6 +529,9 @@ export default {
 			this.isAddModel = false;
 			this.customData = {};
 		},
+		listenScanItem(){
+
+    	},
 		itemNumPriceRefresh(){
 			//涉及记住花材的代码和流程,请全项目搜索关键词remember_item
 			//将已选的花材按classId_productId键名组合

+ 3 - 3
hdApp/src/pages.json

@@ -283,7 +283,7 @@
 				{ "path": "selectKind", "style": { "navigationBarTitleText": "选择品类" } },
 				{ "path": "cgNewPlantResult", "style": { "navigationBarTitleText": "采购成功" } },
 				{ "path": "stockChange", "style": { "navigationBarTitleText": "库存变动记录" } },
-				{ "path": "plantCg", "style": { "navigationBarTitleText": "采购记录" } },
+				{ "path": "plantCg", "style": { "navigationBarTitleText": "买花记录" } },
 				{ "path": "plantCgDetail", "style": { "navigationBarTitleText": "明细" } },
 				{ "path": "pdList", "style": { "navigationBarTitleText": "绿植盘点记录" } },
 				{ "path": "pdGoods", "style": { "navigationBarTitleText": "选择商品" } },
@@ -433,10 +433,10 @@
 				{ "path": "gathering", "style": { "navigationBarTitleText": "待结订单", "enablePullDownRefresh": true } },
 				{ "path": "particulars", "style": { "navigationBarTitleText": "", "enablePullDownRefresh": true } },
 				{ "path": "details", "style": { "navigationBarTitleText": "确认订单" } },
-				{ "path": "order", "style": { "navigationBarTitleText": "供货商", "enablePullDownRefresh": true } },
+				{ "path": "order", "style": { "navigationBarTitleText": "买花", "enablePullDownRefresh": true } },
 				{ "path": "pb", "style": { "navigationBarTitleText": "已屏蔽商家", "enablePullDownRefresh": true } },
 				{ "path": "open", "style": { "navigationBarTitleText": "商城功能开关", "enablePullDownRefresh": true } },
-				{ "path": "shopping", "style": { "navigationBarTitleText": "采购", "enablePullDownRefresh": true } },
+				{ "path": "shopping", "style": { "navigationBarTitleText": "买花记录", "enablePullDownRefresh": true } },
 				{ "path": "ghsProduct", "style": { "navigationBarTitleText": "采购花材", "enablePullDownRefresh": false } },
 				{ "path": "ghsProduct2", "style": { "navigationBarTitleText": "采购花材", "enablePullDownRefresh": false } },
 				{ "path": "setPsd", "style": { "navigationBarTitleText": "设置密码", "enablePullDownRefresh": true } },