jf 5 лет назад
Родитель
Сommit
8640aa9d9f

+ 1 - 1
ghsApp/src/admin/billing/affirm.vue

@@ -31,7 +31,7 @@
 												`${item.bigCount}`
 											}}</text>
 											<text v-if="item.smallCount > 0">/</text>
-											<text v-if="smallCount > 0">{{ `${smallCount}` }}</text>
+											<text v-if="item.smallCount > 0">{{ `${item.smallCount}` }}</text>
 										</text>
 									</view>
 								</view>

+ 3 - 3
ghsApp/src/components/app-customer-sel.vue

@@ -42,9 +42,9 @@
 						<!-- <view class="item-tag">NEW</view> -->
 					</view>
 				</scroll-view>
-				<view class="add-customer-bar" @click="gotoAddCustomer">
-					没有找到客户?新增
-				</view>
+<!--				<view class="add-customer-bar" @click="gotoAddCustomer">-->
+<!--					没有找到客户?新增-->
+<!--				</view>-->
 			</div>
 		</bottom-popup>
 	</div>

+ 31 - 21
ghsApp/src/mixins/product.js

@@ -242,31 +242,37 @@ export default {
 				const element = list[index];
 				if (element.id == item.id && element.classId == item.classId) {
 					has = true;
-					if (this.isLimit) {
-						if (element.bigCount < item.bigNum) {
+					if(this.isPanDian){//盘点页面没有库存验证
+						list[index] = { ...element, bigCount: ++element.bigCount };
+					}else{
+						if (this.isLimit) {
+							if (element.bigCount < item.bigNum) {
+								list[index] = { ...element, bigCount: ++element.bigCount };
+							}else{
+								this.$msg("库存不足");
+							}
+							//  else if (element.smallCount < item.smallNum) {
+							// 	list[index] = { ...element, smallCount: ++element.smallCount };
+							// }
+						} else {
 							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) {
-						const { bigCount, smallCount } = list[index];
-						//超过库存时 设置为库存最大值
-						const ratio = Number(item.ratio);
-						if (
-							Number(bigCount) * ratio + Number(smallCount) >
-							Number(item.bigNum) * ratio + Number(item.smallNum)
-						) {
-							list[index].bigCount = Number(item.bigNum);
-							list[index].smallCount = Number(item.smallNum);
-							this.$msg("库存不足");
+						if (this.isLimit) {
+							const { bigCount, smallCount } = list[index];
+							//超过库存时 设置为库存最大值
+							const ratio = Number(item.ratio);
+							if (
+								Number(bigCount) * ratio + Number(smallCount) >
+								Number(item.bigNum) * ratio + Number(item.smallNum)
+							) {
+								list[index].bigCount = Number(item.bigNum);
+								list[index].smallCount = Number(item.smallNum);
+								this.$msg("库存不足");
+							}
 						}
 					}
 
+
 					break;
 				}
 			}
@@ -293,7 +299,11 @@ export default {
 				if (info.bigNum && info.bigNum > 0) {
 					list.push(params);
 				} else {
-					this.$msg("库存不足");
+					if(this.isPanDian){//盘点页面没有库存验证
+						list.push(params);
+					}else{
+						this.$msg("库存不足");
+					}
 				}
 			}
 

+ 2 - 0
ghsApp/src/mixins/productContrapose.js

@@ -227,6 +227,8 @@ export default {
 					if (this.isLimit) {
 						if (element.bigCount < item.bigNum) {
 							list[index] = { ...element, bigCount: ++element.bigCount };
+						}else{
+							this.$msg("库存不足");
 						}
 						//  else if (element.smallCount < item.smallNum) {
 						// 	list[index] = { ...element, smallCount: ++element.smallCount };

+ 6 - 4
ghsApp/src/pagesStorehouse/inventory/list.vue

@@ -20,11 +20,13 @@
 					<view class="info">
 						<view class="info-order">{{ item.orderSn }}</view>
 						<view class="info-name">{{ item.remark }}</view>
+						<view style="margin-bottom: 10rpx">
+							<text v-if="item.bigNum >= 0">数量:{{ `${item.bigNum}/` }}</text>
+							<text>{{ item.smallNum }}</text>件
+						</view>
 						<view>
-							<text class="info-time">{{ item.updateTime }}</text>
-							<text v-if="item.bigNum >= 0">{{ `${item.bigNum}/` }}</text>
-							<text>{{ item.smallNum }}</text>
-							件
+							<text class="info-time">时间:{{ item.updateTime }}</text>
+
 						</view>
 					</view>
 					<view

+ 1 - 0
ghsApp/src/pagesStorehouse/inventory/select.vue

@@ -168,6 +168,7 @@ export default {
 		return {
 			pageType: "inventory",
 			isLimit: false,
+			isPanDian:true,
 			tabIndex: 0,
 			tabs: [
 				{

+ 14 - 21
ghsApp/src/pagesStorehouse/inventory/update.vue

@@ -63,34 +63,22 @@
 							class="table-header"
 							:style="{ backgroundColor: headerBackgroundColor }"
 						>
-							<view
-								class="table-th"
-								v-for="(item, index) in columns"
-								:key="index"
-								:style="{
-									flex: item.width ? `0 0 ${item.width}rpx` : '1',
+							<view class="table-th" v-for="(item, index) in columns" :key="index"
+								:style="{flex: item.width ? `0 0 ${item.width}rpx` : '1',
 									textAlign: item.align || 'left',
 									fontSzie: `${headerFontSize}rpx`,
-									margin: `0 ${gutter}rpx`
-								}"
-							>
+									margin: `0 ${gutter}rpx`}">
 								<!-- <slot :name="item.dataIndex" > -->
 								{{ item.name || "" }}
 								<!-- </slot> -->
 							</view>
 						</view>
 						<view class="table-tr" v-for="(item, index) in selectList" :key="index">
-							<view
-								class="table-td"
-								v-for="(column, columnIndex) in columns"
-								:key="columnIndex"
-								:style="{
-									flex: column.width ? `0 0 ${column.width}rpx` : '1',
+							<view class="table-td" v-for="(column, columnIndex) in columns" :key="columnIndex"
+								:style="{flex: column.width ? `0 0 ${column.width}rpx` : '1',
 									textAlign: column.align || 'left',
 									fontSzie: `${fontSize}rpx`,
-									margin: `0 ${gutter}rpx`
-								}"
-							>
+									margin: `0 ${gutter}rpx`}">
 								<!-- {{ item[column.dataIndex] || "" }} -->
 
 								<view v-if="column.custom == 'icon'" class="list-icon">
@@ -110,12 +98,14 @@
 									<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 >/</text>
+									<text >{{ item.smallCount?item.smallCount:0 }}</text>
 								</view>
 
 								<view v-else-if="column.custom == 'profit'">
-									<text>{{ getSelectItemProfitPrice(item) }}</text>
+									<text v-if="item.bigNumProfitLoss">{{ item.bigNumProfitLoss?item.bigNumProfitLoss:0 }}/{{item.smallNumProfitLoss?item.smallNumProfitLoss:0}}</text>
+									<text v-else>{{ getSelectItemProfitPrice(item) }}</text>
+
 								</view>
 								<text v-else :class="[column.color || '']">
 									{{ (column.dataIndex && item[column.dataIndex]) || "" }}
@@ -320,6 +310,8 @@ export default {
 				} = await api(params);
 				this.orderSn = orderSn;
 				this.$msg("保存成功");
+				this.resetSelectInfoByType(this.pageType);
+				this.initInfo();
 			} catch (error) {}
 		},
 		async saveCheckOrder() {
@@ -340,6 +332,7 @@ export default {
 				params.itemInfo = JSON.stringify(formatList);
 				await updateCheckOrderApi(params);
 				this.$msg("盘点成功");
+				this.resetSelectInfoByType(this.pageType);
 				uni.navigateBack({
 					delta: 1
 				});