Răsfoiți Sursa

优化下单选取

zhengxin 5 ani în urmă
părinte
comite
58c8db7faa

+ 4 - 2
ghs/src/admin/billing/affirm.vue

@@ -27,8 +27,10 @@
 									<view class="info-line">
 									<view class="info-line">
 										<text class="item-type">{{ item.rank }}级</text>
 										<text class="item-type">{{ item.rank }}级</text>
 										<text class="item-count">
 										<text class="item-count">
-											<text v-if="item.bigCount > 0">{{ `${item.bigCount}` }}</text>
-											<text v-if="item.bigCount > 0 && item.smallCount > 0">/</text>
+											<text v-if="item.bigCount > 0 || item.smallCount > 0">{{
+												`${item.bigCount}`
+											}}</text>
+											<text v-if="item.smallCount > 0">/</text>
 											<text v-if="smallCount > 0">{{ `${smallCount}` }}</text>
 											<text v-if="smallCount > 0">{{ `${smallCount}` }}</text>
 										</text>
 										</text>
 									</view>
 									</view>

+ 4 - 4
ghs/src/admin/billing/index.vue

@@ -36,15 +36,15 @@
 								getSelectClassById(item.classId).smallCount > 0
 								getSelectClassById(item.classId).smallCount > 0
 						"
 						"
 					>
 					>
-						<text v-if="getSelectClassById(item.classId).bigCount > 0">
-							{{ `${getSelectClassById(item.classId).bigCount}` }}
-						</text>
 						<text
 						<text
 							v-if="
 							v-if="
-								getSelectClassById(item.classId).bigCount > 0 &&
+								getSelectClassById(item.classId).bigCount > 0 ||
 									getSelectClassById(item.classId).smallCount > 0
 									getSelectClassById(item.classId).smallCount > 0
 							"
 							"
 						>
 						>
+							{{ `${getSelectClassById(item.classId).bigCount}` }}
+						</text>
+						<text v-if="getSelectClassById(item.classId).smallCount > 0">
 							/
 							/
 						</text>
 						</text>
 						<text v-if="getSelectClassById(item.classId).smallCount > 0">{{
 						<text v-if="getSelectClassById(item.classId).smallCount > 0">{{

+ 2 - 2
ghs/src/components/module/app-commodity.vue

@@ -15,8 +15,8 @@
 						v-if="bigCount > 0 || smallCount > 0"
 						v-if="bigCount > 0 || smallCount > 0"
 					></i>
 					></i>
 					<text class="num" @click="customNum" v-if="bigCount > 0 || smallCount > 0">
 					<text class="num" @click="customNum" v-if="bigCount > 0 || smallCount > 0">
-						<text v-if="bigCount > 0">{{ `${bigCount}` }}</text>
-						<text v-if="bigCount > 0 && smallCount > 0">/</text>
+						<text v-if="bigCount > 0 || smallCount > 0">{{ `${bigCount}` }}</text>
+						<text v-if="smallCount > 0">/</text>
 						<text v-if="smallCount > 0">{{ `${smallCount}` }}</text>
 						<text v-if="smallCount > 0">{{ `${smallCount}` }}</text>
 					</text>
 					</text>
 					<i class="iconfont icontianjia" @click="addEvent"></i>
 					<i class="iconfont icontianjia" @click="addEvent"></i>

+ 10 - 10
ghs/src/mixins/product.js

@@ -239,16 +239,16 @@ export default {
 				const element = list[index];
 				const element = list[index];
 				if (element.id == item.id && element.classId == item.classId) {
 				if (element.id == item.id && element.classId == item.classId) {
 					has = true;
 					has = true;
-					// if (this.isLimit) {
-					// if (element.bigCount < item.bigNum) {
-					// 	list[index] = { ...element, bigCount: ++element.bigCount };
-					// }
-					// else if (element.smallCount < item.smallNum) {
-					// 	list[index] = { ...element, smallCount: ++element.smallCount };
-					// }
-					// } else {
-					list[index] = { ...element, bigCount: ++element.bigCount };
-					// }
+					if (this.isLimit) {
+						if (element.bigCount < item.bigNum) {
+							list[index] = { ...element, bigCount: ++element.bigCount };
+						}
+						//  else if (element.smallCount < item.smallNum) {
+						// 	list[index] = { ...element, smallCount: ++element.smallCount };
+						// }
+					} else {
+						list[index] = { ...element, bigCount: ++element.bigCount };
+					}
 
 
 					if (this.isLimit) {
 					if (this.isLimit) {
 						const { bigCount, smallCount } = list[index];
 						const { bigCount, smallCount } = list[index];

+ 4 - 4
ghs/src/pagesOrder/select.vue

@@ -36,15 +36,15 @@
 								getSelectClassById(item.classId).smallCount > 0
 								getSelectClassById(item.classId).smallCount > 0
 						"
 						"
 					>
 					>
-						<text v-if="getSelectClassById(item.classId).bigCount > 0">
-							{{ `${getSelectClassById(item.classId).bigCount}` }}
-						</text>
 						<text
 						<text
 							v-if="
 							v-if="
-								getSelectClassById(item.classId).bigCount > 0 &&
+								getSelectClassById(item.classId).bigCount > 0 ||
 									getSelectClassById(item.classId).smallCount > 0
 									getSelectClassById(item.classId).smallCount > 0
 							"
 							"
 						>
 						>
+							{{ `${getSelectClassById(item.classId).bigCount}` }}
+						</text>
+						<text v-if="getSelectClassById(item.classId).smallCount > 0">
 							/
 							/
 						</text>
 						</text>
 						<text v-if="getSelectClassById(item.classId).smallCount > 0">{{
 						<text v-if="getSelectClassById(item.classId).smallCount > 0">{{

+ 4 - 4
ghs/src/pagesPurchase/add.vue

@@ -31,15 +31,15 @@
 								getSelectClassById(item.classId).smallCount > 0
 								getSelectClassById(item.classId).smallCount > 0
 						"
 						"
 					>
 					>
-						<text v-if="getSelectClassById(item.classId).bigCount > 0">
-							{{ `${getSelectClassById(item.classId).bigCount}` }}
-						</text>
 						<text
 						<text
 							v-if="
 							v-if="
-								getSelectClassById(item.classId).bigCount > 0 &&
+								getSelectClassById(item.classId).bigCount > 0 ||
 									getSelectClassById(item.classId).smallCount > 0
 									getSelectClassById(item.classId).smallCount > 0
 							"
 							"
 						>
 						>
+							{{ `${getSelectClassById(item.classId).bigCount}` }}
+						</text>
+						<text v-if="getSelectClassById(item.classId).smallCount > 0">
 							/
 							/
 						</text>
 						</text>
 						<text v-if="getSelectClassById(item.classId).smallCount > 0">{{
 						<text v-if="getSelectClassById(item.classId).smallCount > 0">{{

+ 2 - 2
ghs/src/pagesPurchase/components/CommodityPurchase.vue

@@ -18,8 +18,8 @@
 						v-if="bigCount > 0 || smallCount > 0"
 						v-if="bigCount > 0 || smallCount > 0"
 					></i>
 					></i>
 					<text class="num" @click="customNum" v-if="bigCount > 0 || smallCount > 0">
 					<text class="num" @click="customNum" v-if="bigCount > 0 || smallCount > 0">
-						<text v-if="bigCount > 0">{{ `${bigCount}` }}</text>
-						<text v-if="bigCount > 0 && smallCount > 0">/</text>
+						<text v-if="bigCount > 0 || smallCount > 0">{{ `${bigCount}` }}</text>
+						<text v-if="smallCount > 0">/</text>
 						<text v-if="smallCount > 0">{{ `${smallCount}` }}</text>
 						<text v-if="smallCount > 0">{{ `${smallCount}` }}</text>
 					</text>
 					</text>
 					<i class="iconfont icontianjia" @click="addEvent"></i>
 					<i class="iconfont icontianjia" @click="addEvent"></i>

+ 4 - 2
ghs/src/pagesPurchase/details.vue

@@ -25,8 +25,10 @@
 									<view class="info-line">
 									<view class="info-line">
 										<text class="item-type">b级</text>
 										<text class="item-type">b级</text>
 										<text class="item-count">
 										<text class="item-count">
-											<text v-if="item.bigCount > 0">{{ `${item.bigCount}` }}</text>
-											<text v-if="item.bigCount > 0 && item.smallCount > 0">/</text>
+											<text v-if="item.bigCount > 0 || item.smallCount > 0">{{
+												`${item.bigCount}`
+											}}</text>
+											<text v-if="item.smallCount > 0">/</text>
 											<text v-if="item.smallCount > 0">{{ `${item.smallCount}` }}</text>
 											<text v-if="item.smallCount > 0">{{ `${item.smallCount}` }}</text>
 										</text>
 										</text>
 									</view>
 									</view>

+ 4 - 2
ghs/src/pagesStorehouse/allot/addExDetails.vue

@@ -74,8 +74,10 @@
 									</view>
 									</view>
 								</view>
 								</view>
 								<view v-else-if="column.custom == 'excount'">
 								<view v-else-if="column.custom == 'excount'">
-									<text v-if="item.bigCount > 0">{{ `${item.bigCount}` }}</text>
-									<text v-if="item.bigCount > 0 && item.smallCount > 0">/</text>
+									<text v-if="item.bigCount > 0 || item.smallCount > 0">{{
+										`${item.bigCount}`
+									}}</text>
+									<text v-if="item.smallCount > 0">/</text>
 									<text v-if="item.smallCount > 0">{{ `${item.smallCount}` }}</text>
 									<text v-if="item.smallCount > 0">{{ `${item.smallCount}` }}</text>
 								</view>
 								</view>
 								<view v-else>
 								<view v-else>

+ 4 - 4
ghs/src/pagesStorehouse/allot/exSelect.vue

@@ -36,15 +36,15 @@
 								getSelectClassById(item.classId).smallCount > 0
 								getSelectClassById(item.classId).smallCount > 0
 						"
 						"
 					>
 					>
-						<text v-if="getSelectClassById(item.classId).bigCount > 0">
-							{{ `${getSelectClassById(item.classId).bigCount}` }}
-						</text>
 						<text
 						<text
 							v-if="
 							v-if="
-								getSelectClassById(item.classId).bigCount > 0 &&
+								getSelectClassById(item.classId).bigCount > 0 ||
 									getSelectClassById(item.classId).smallCount > 0
 									getSelectClassById(item.classId).smallCount > 0
 							"
 							"
 						>
 						>
+							{{ `${getSelectClassById(item.classId).bigCount}` }}
+						</text>
+						<text v-if="getSelectClassById(item.classId).smallCount > 0">
 							/
 							/
 						</text>
 						</text>
 						<text v-if="getSelectClassById(item.classId).smallCount > 0">{{
 						<text v-if="getSelectClassById(item.classId).smallCount > 0">{{

+ 4 - 4
ghs/src/pagesStorehouse/inventory/select.vue

@@ -36,15 +36,15 @@
 								getSelectClassById(item.classId).smallCount > 0
 								getSelectClassById(item.classId).smallCount > 0
 						"
 						"
 					>
 					>
-						<text v-if="getSelectClassById(item.classId).bigCount > 0">
-							{{ `${getSelectClassById(item.classId).bigCount}` }}
-						</text>
 						<text
 						<text
 							v-if="
 							v-if="
-								getSelectClassById(item.classId).bigCount > 0 &&
+								getSelectClassById(item.classId).bigCount > 0 ||
 									getSelectClassById(item.classId).smallCount > 0
 									getSelectClassById(item.classId).smallCount > 0
 							"
 							"
 						>
 						>
+							{{ `${getSelectClassById(item.classId).bigCount}` }}
+						</text>
+						<text v-if="getSelectClassById(item.classId).smallCount > 0">
 							/
 							/
 						</text>
 						</text>
 						<text v-if="getSelectClassById(item.classId).smallCount > 0">{{
 						<text v-if="getSelectClassById(item.classId).smallCount > 0">{{

+ 4 - 2
ghs/src/pagesStorehouse/inventory/update.vue

@@ -107,8 +107,10 @@
 									<text>{{ item.smallNum }}</text>
 									<text>{{ item.smallNum }}</text>
 								</view>
 								</view>
 								<view v-else-if="column.custom == 'inventory'">
 								<view v-else-if="column.custom == 'inventory'">
-									<text v-if="item.bigCount > 0">{{ `${item.bigCount}` }}</text>
-									<text v-if="item.bigCount > 0 && item.smallCount > 0">/</text>
+									<text v-if="item.bigCount > 0 || item.smallCount > 0">{{
+										`${item.bigCount}`
+									}}</text>
+									<text v-if="item.smallCount > 0">/</text>
 									<text v-if="item.smallCount > 0">{{ `${item.smallCount}` }}</text>
 									<text v-if="item.smallCount > 0">{{ `${item.smallCount}` }}</text>
 								</view>
 								</view>