shish 2 лет назад
Родитель
Сommit
c3144c2f34

+ 3 - 7
ghsApp/src/admin/billing/index2.vue

@@ -95,9 +95,9 @@
 
 		<FooterCart :price="allPrice" :count="allCount" @confirm="confirmToSave" ></FooterCart>
 
-		<uni-popup ref="selectFlowerNumRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
+		<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="changeClass(index,item)" style="margin-bottom:20upx;margin-left:3upx;">
+				<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>
@@ -183,10 +183,6 @@ export default {
 		}
 	},
 	methods: {
-		changeClass(index,item){
-			this.$refs.selectFlowerNumRef.close()
-			this.globalSwitchClass(index,item)
-		},
 		delProduct(info){
 			let that = this
 			that.$util.confirmModal({content:'确认删除?'},() => {
@@ -209,7 +205,7 @@ export default {
 			}
 		},
 		selectFlowerNumFn(){
-			this.$refs.selectFlowerNumRef.open('top')
+			this.$refs.globalClassImgRef.open('top')
 		},
 		confirmToSave() {
 			if(this.$util.isEmpty(this.selectList)){

+ 2 - 2
ghsApp/src/admin/changePrice/batchChange2.vue

@@ -56,7 +56,7 @@
 			</view>
 	
 		  <div class="app-footer">
-			<button class="admin-button-com big blue" @click="changeSelectItem()">修改所选价格</button>
+			<button class="admin-button-com big blue" @click="changeSelectItem()">修改所选花材价格</button>
 		  </div>
 	
 			<uni-popup ref="selectFlowerNumRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
@@ -101,7 +101,7 @@
 	<script>
 	import AppSearchModule from "@/components/module/app-search";
 	import AppWrapperEmpty from "@/components/app-wrapper-empty";
-	import ItemComponent from "./components/changeClassItem2";
+	import ItemComponent from "./components/changeClassItem";
 	import productMins from "@/mixins/product";
 	import { manyItemChangeOnePrice } from "@/api/product";
 	import { mapGetters } from "vuex";

+ 19 - 27
ghsApp/src/admin/changePrice/changeStock2.vue

@@ -6,14 +6,14 @@
 				<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 v-model="globalPy" ref="globalSearchRef" placeholder="这里搜索" @input="searchFn"/>
 			</view>
 		</view>
 
 		<view class="scroll-middle_bx">
 			<scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop">
-				<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>
 			</scroll-view>
 				<scroll-view scroll-y class="right-box" 
@@ -23,18 +23,17 @@
 					lower-threshold="100"
 					@scrolltolower="scroll_bottom">
 
-				<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:190upx" :id="`class_${classIndex}`" :key="productIndex">
-									<ItemComponent v-if="classItem.isActive" :isPrice="false" :info="productItem" @saveStock="saveStock" :ref="`productRef${productItem.id}`" @hideChangeFn="hideChangeFn" @cancelPreSellFn="cancelPreSellFn"></ItemComponent>
+				<block v-if="!$util.isEmpty(globalItemData)">
+					<view class="item_list_bx selectAll">
+						<view class="item_list_title"></view>
+						<view v-if="!$util.isEmpty(globalItemData)">
+							<template v-for="(productItem, productIndex) in globalItemData">
+								<view style="height:190upx" :key="productIndex">
+									<ItemComponent :isPrice="false" :info="productItem" @saveStock="saveStock" :ref="`productRef${productItem.id}`" 
+									@hideChangeFn="hideChangeFn" @cancelPreSellFn="cancelPreSellFn">
+								</ItemComponent>
 								</view>
 							</template>
-
 						</view>
 						<view v-else>
 							<view style="height:260upx;text-align:center;color:#CCCCCC;position: relative;">
@@ -46,7 +45,7 @@
 				</block>
 				<block v-else>
 					<view style="width: 100%">
-						<app-wrapper-empty  title="加载中" :is-empty="$util.isEmpty(globalClassItemList)"/>
+						<app-wrapper-empty  title="加载中" :is-empty="$util.isEmpty(globalItemData)"/>
 					</view>
 				</block>
 
@@ -57,14 +56,12 @@
         <button class="admin-button-com big blue" @click="commitPrice">保存修改</button>
       </div>
 
-		<uni-popup ref="selectFlowerNumRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
+		<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 globalClassItemList" :key="index" @tap.stop="changeClass(index)" style="margin-bottom:20upx;margin-left:3upx;">
-				<image :src="item.classCover" 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.className}}</view>
+				<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>
 
@@ -77,7 +74,7 @@
 import AppSearchModule from "@/components/module/app-search";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import ItemComponent from "./components/changeStockItem2";
-import productMins from "@/mixins/product";
+import productMins from "@/mixins/product2;
 import { mapGetters } from "vuex";
 import { checkOrderApi } from "@/api/inventory";
 import { changeFrontHide } from "@/api/item";
@@ -106,15 +103,10 @@ export default {
 		this.initProduct()
 	},
 	methods: {
-		changeClass(index){
-			this.$refs.selectFlowerNumRef.close()
-			this.swichClass(index)
-		},
 		selectFlowerNumFn(){
-			this.$refs.selectFlowerNumRef.open('top')
+			this.$refs.globalClassImgRef.open('top')
 		},
 		hideClassRemind(){
-
 		},
 		cancelPreSellFn(item){
 			let that = this

+ 16 - 22
ghsApp/src/admin/changePrice/list2.vue

@@ -6,7 +6,7 @@
 				<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 v-model="globalPy" ref="globalSearchRef" placeholder="这里搜索" @input="searchFn"/>
 			</view>
 			<view style="padding:0 0upx 0 20upx;" >
 				<button class="admin-button-com middle blue" @click="downloadTable()">价格表</button>
@@ -15,8 +15,8 @@
 
 		<view class="scroll-middle_bx">
 			<scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop">
-				<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 style="text-align: center;">{{ 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 style="text-align: center;">{{ item.name || "" }}</text>
 				</div>
 			</scroll-view>
 				<scroll-view scroll-y class="right-box" 
@@ -27,14 +27,14 @@
 					@scrolltolower="scroll_bottom">
 
 				<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 class="item_list_bx selectAll">
+						<view class="item_list_title"></view>
 
-						<view v-if="classItem.child && !$util.isEmpty(classItem.child)">
+						<view v-if="!$util.isEmpty(globalItemData)">
 
-							<template v-for="(productItem, productIndex) in classItem.child">
-								<view style="height:230upx" :id="`class_${classIndex}`" :key="productIndex">
-									<ItemComponent v-if="classItem.isActive" :isPrice="false" :info="productItem" @hideChangeFn="hideChangeFn" :ref="`productRef${productItem.id}`"
+							<template v-for="(productItem, productIndex) in globalItemData">
+								<view style="height:230upx" :key="productIndex">
+									<ItemComponent :isPrice="false" :info="productItem" @hideChangeFn="hideChangeFn" :ref="`productRef${productItem.id}`"
 									@savePrice="savePrice" @cancelDiscountFn="cancelDiscountFn" @cancelFullOff="cancelFullOff" @cancelPreSellFn="cancelPreSellFn"></ItemComponent>
 								</view>
 							</template>
@@ -62,14 +62,12 @@
         <button class="admin-button-com big blue" style="width:40vw;" @click="commitPrice">保存修改</button>
       </div>
 
-		<uni-popup ref="selectFlowerNumRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
+		<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 globalClassItemList" :key="index" @tap.stop="changeClass(index)" style="margin-bottom:20upx;margin-left:3upx;">
-				<image :src="item.classCover" 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.className}}</view>
+				<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>
 
@@ -82,7 +80,7 @@
 import AppSearchModule from "@/components/module/app-search";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import ItemComponent from "./components/Item2";
-import productMins from "@/mixins/product";
+import productMins from "@/mixins/product2";
 import { mapGetters } from "vuex";
 import { batchChangePrice,generatePriceTable,cancelDiscountPrice,cancelFullOffFn,cancelPreSell } from '@/api/product'
 import { changeFrontHide } from '@/api/item'
@@ -111,7 +109,7 @@ export default {
 	},
 	methods: {
 		goBatchChange(){
-			this.$util.pageTo({url: '/admin/changePrice/batchChange2'})
+			this.$util.pageTo({url: '/admin/changePrice/batchChange'})
 		},
 		hideChangeFn(item,status){
 			let that = this
@@ -121,12 +119,8 @@ export default {
 				}
 			})
 		},
-		changeClass(index){
-			this.$refs.selectFlowerNumRef.close()
-			this.swichClass(index)
-		},
 		selectFlowerNumFn(){
-			this.$refs.selectFlowerNumRef.open('top')
+			this.$refs.globalClassImgRef.open('top')
 		},
 		hideClassRemind(){
 

+ 5 - 11
ghsApp/src/admin/item/list2.vue

@@ -73,14 +73,12 @@
 			</div>
 		</template>
 		</modal-module>
-		<uni-popup ref="selectFlowerNumRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
+		<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 globalClassItemList" :key="index" @tap.stop="changeClass(index)" style="margin-bottom:20upx;margin-left:3upx;">
-				<image :src="item.classCover" 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.className}}</view>
+				<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>
 
@@ -318,12 +316,8 @@ export default {
 				}
 			});
 		},
-		changeClass(index){
-			this.$refs.selectFlowerNumRef.close()
-			this.globalSwitchClass(index)
-		},
 		selectFlowerNumFn(){
-			this.$refs.selectFlowerNumRef.open('top')
+			this.$refs.globalClassImgRef.open('top')
 		},
 		printBlur() {
 			this.printFocus = false

+ 4 - 2
ghsApp/src/mixins/product2.js

@@ -15,7 +15,6 @@ export default {
 			type: "", //库存预警时,固定为waring,其他情况不传或者传空
 			autoLoad: true, //自动获取商品信息
 			allFilterProductInfo:'',
-			globalClassItemList:'',
 			top_list:'',
 			scroll_into_view:"",
 			timeFun:"",
@@ -211,7 +210,10 @@ export default {
 			this.setSelectInfo({ selectJobType: this.selectJobType, info: selectData,selectJobId:this.selectJobId })
 			uni.setStorageSync('selectList_'+this.selectJobType+'_target_'+this.selectJobId, selectData)
 		},
-		//询问是否删除缓存
+		globalChangeClass(index,item){
+			this.$refs.globalClassImgRef.close()
+			this.globalSwitchClass(index,item)
+		},
 		removeFromSave(){
 			let that = this
 			that.$util.confirmModal({content:'确认清除花材?'},() => {