소스 검색

bug 修复

lilei 2 년 전
부모
커밋
7b1e8f7fc0

+ 2 - 1
libs/axios.js

@@ -67,7 +67,8 @@ const request = (opts, hasToken) => {
 						if(ret.status == 500){
 						if(ret.status == 500){
 							if(
 							if(
 							opts.url.indexOf("shelfReplenish/detail/outScan")<0&&
 							opts.url.indexOf("shelfReplenish/detail/outScan")<0&&
-							opts.url.indexOf("shelfReplenish/detail/queryByProductQrCode")<0){
+							opts.url.indexOf("shelfReplenish/detail/queryByProductQrCode")<0&&
+							opts.url.indexOf("shelfStockCheck/confirm")<0){
 								uni.showToast({
 								uni.showToast({
 									icon:'none',
 									icon:'none',
 									title: ret.message,
 									title: ret.message,

+ 6 - 2
pages/shelfSetting/bindProduct.vue

@@ -32,7 +32,7 @@
 				<u-empty v-if="status!='loading'" :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="180" :text="noDataText" mode="list" :margin-top="50"></u-empty>
 				<u-empty v-if="status!='loading'" :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="180" :text="noDataText" mode="list" :margin-top="50"></u-empty>
 			</view>
 			</view>
 			<view style="padding: 20upx;" v-if="total>pageSize || status=='loading'">
 			<view style="padding: 20upx;" v-if="total>pageSize || status=='loading'">
-				<u-loadmore :status="status" />
+				<u-loadmore :status="status" :load-text="loadText" />
 			</view> 
 			</view> 
 		</view>
 		</view>
 	</view>
 	</view>
@@ -52,7 +52,11 @@
 				noDataText: '暂无产品',
 				noDataText: '暂无产品',
 				status: 'nomore',
 				status: 'nomore',
 				customerSn: null,
 				customerSn: null,
-				shelfSn: null
+				shelfSn: null,
+				loadText: {
+					loading: '搜索中..',
+					nomore: '最多显示前20条匹配的产品,请尝试输入更多内容'
+				}
 			}
 			}
 		},
 		},
 		onLoad(opts) {
 		onLoad(opts) {

+ 3 - 1
pages/shelfSetting/searchShelfHw.vue

@@ -99,9 +99,11 @@
 		onLoad(opts) {
 		onLoad(opts) {
 			this.shelfName = opts.shelfName
 			this.shelfName = opts.shelfName
 			this.shelfSn = opts.shelfSn
 			this.shelfSn = opts.shelfSn
-			this.getpartList()
 			this.getShelfPlace()
 			this.getShelfPlace()
 		},
 		},
+		onShow() {
+			this.changeSearch()
+		},
 		methods: {
 		methods: {
 			//编辑货位
 			//编辑货位
 			toEdit(item){
 			toEdit(item){

+ 6 - 3
pages/stockCheck/checkRecord.vue

@@ -42,10 +42,12 @@
 				pageNo: 1,
 				pageNo: 1,
 				pageSize: 20,
 				pageSize: 20,
 				total: 0,
 				total: 0,
-				list: []
+				list: [],
+				shelfSn: ''
 			}
 			}
 		},
 		},
-		onLoad() {
+		onLoad(opts) {
+			this.shelfSn = opts.shelfSn
 			this.getList()
 			this.getList()
 		},
 		},
 		methods: {
 		methods: {
@@ -70,7 +72,8 @@
 			  let params = {
 			  let params = {
 			    pageNo: this.pageNo,
 			    pageNo: this.pageNo,
 			    pageSize: this.pageSize,
 			    pageSize: this.pageSize,
-				checkState: 'FINISH'
+				checkState: 'FINISH',
+				shelfSn: this.shelfSn
 			  }
 			  }
 			  this.status = "loading"
 			  this.status = "loading"
 			  stockCheckQueryPage(params).then(res => {
 			  stockCheckQueryPage(params).then(res => {

+ 12 - 19
pages/stockCheck/editModal.vue

@@ -78,25 +78,18 @@
 			},
 			},
 			// 确认
 			// 确认
 			handleConfirm(){
 			handleConfirm(){
-				if(this.infoData.checkQty){
-					this.$emit('addProduct',{
-						shelfSn: this.infoData.shelfSn,
-						shelfPlaceSn: this.infoData.shelfPlaceSn,
-						shelfPlaceCode: this.infoData.shelfPlaceCode,
-						productCode: this.infoData.productCode,
-						productSn: this.infoData.productSn,
-						freezeQty: this.infoData.freezeQty,
-						stockQty: this.infoData.currQty,
-						checkQty: this.infoData.checkQty,
-						stockCheckDetailSn: this.infoData.stockCheckDetailSn || undefined,
-						cost: this.infoData.cost
-					})
-				}else{
-					uni.showToast({
-						icon: "none",
-						title: '请输入实际可用库存'
-					})
-				}
+				this.$emit('addProduct',{
+					shelfSn: this.infoData.shelfSn,
+					shelfPlaceSn: this.infoData.shelfPlaceSn,
+					shelfPlaceCode: this.infoData.shelfPlaceCode,
+					productCode: this.infoData.productCode,
+					productSn: this.infoData.productSn,
+					freezeQty: this.infoData.freezeQty,
+					stockQty: this.infoData.currQty,
+					checkQty: this.infoData.checkQty,
+					stockCheckDetailSn: this.infoData.stockCheckDetailSn || undefined,
+					cost: this.infoData.cost
+				})
 			},
 			},
 		},
 		},
 		watch: {
 		watch: {

+ 8 - 2
pages/stockCheck/startCheck.vue

@@ -239,7 +239,7 @@
 		onNavigationBarButtonTap(e) {
 		onNavigationBarButtonTap(e) {
 			if(e.index == 0){
 			if(e.index == 0){
 				uni.navigateTo({
 				uni.navigateTo({
-					url: '/pages/stockCheck/checkRecord'
+					url: '/pages/stockCheck/checkRecord?shelfSn='+this.nowData.shelfSn
 				})
 				})
 			}
 			}
 		},
 		},
@@ -360,8 +360,14 @@
 					if(res.status == 200){
 					if(res.status == 200){
 						this.getDetail()
 						this.getDetail()
 						this.getChooseList()
 						this.getChooseList()
+						uni.showToast({
+							icon:'none',
+							title: res.message
+						})
 					}
 					}
-					uni.hideLoading()
+					setTimeout(()=>{
+						uni.hideLoading()
+					},1000)
 				})
 				})
 			},
 			},
 			// 打开购物车
 			// 打开购物车

+ 19 - 1
pages/stockCheck/submitStockCheck.vue

@@ -87,6 +87,8 @@
 			<u-button size="medium" @click="goback" shape="circle" type="default" hover-class="none" >继续盘点</u-button>
 			<u-button size="medium" @click="goback" shape="circle" type="default" hover-class="none" >继续盘点</u-button>
 			<u-button size="medium" @click="submitOrder" :custom-style="customBtnStyle" shape="circle" type="primary" hover-class="none" >盘点完成</u-button>
 			<u-button size="medium" @click="submitOrder" :custom-style="customBtnStyle" shape="circle" type="primary" hover-class="none" >盘点完成</u-button>
 		</view>
 		</view>
+		<!-- 确认弹框 -->
+		<common-modal v-if="confirmModal" :openModal="confirmModal" :content="errorMsg" confirmText="知道了" @confirm="confirmModal=false" @close="confirmModal=false" />
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -96,8 +98,12 @@
 		stockCheckBySn, 
 		stockCheckBySn, 
 		stockCheckConfirm
 		stockCheckConfirm
 	} from '@/api/stockCheck'
 	} from '@/api/stockCheck'
+	import commonModal from '@/pages/common/commonModal'
 	import { clzConfirm } from '@/libs/tools'
 	import { clzConfirm } from '@/libs/tools'
 	export default {
 	export default {
+		components: {
+			commonModal
+		},
 		data() {
 		data() {
 			return {
 			return {
 				customBtnStyle: {  //  自定义按钮样式
 				customBtnStyle: {  //  自定义按钮样式
@@ -109,7 +115,9 @@
 				remarks: '',
 				remarks: '',
 				detail: null,
 				detail: null,
 				chooseList: [],
 				chooseList: [],
-				type: ''
+				type: '',
+				errorMsg: '',
+				confirmModal: false
 			}
 			}
 		},
 		},
 		onLoad(opts) {
 		onLoad(opts) {
@@ -153,9 +161,19 @@
 							remarks: _this.remarks,
 							remarks: _this.remarks,
 							stockCheckSn: _this.stockCheckSn
 							stockCheckSn: _this.stockCheckSn
 						}).then(res => {
 						}).then(res => {
+							console.log(res)
 							if(res.status == 200 && res.data){
 							if(res.status == 200 && res.data){
 								_this.goback()
 								_this.goback()
 								uni.$emit("resetStockCheck")
 								uni.$emit("resetStockCheck")
+								uni.showToast({
+									icon:'none',
+									title: res.message
+								})
+							}else{
+								if(res.errCode == 'VALIDATE_STOCK_LACK'){
+									this.errorMsg = res.message
+									this.confirmModal = true
+								}
 							}
 							}
 							uni.hideLoading()
 							uni.hideLoading()
 						})
 						})