Browse Source

bug修复

chenrui 3 years ago
parent
commit
09a6641fed

+ 11 - 0
api/data.js

@@ -13,4 +13,15 @@ export const getSysVersion = (params) => {
     method: 'post',
     method: 'post',
 	data: {applyCode:'jgqp',versionType: params.versionType}
 	data: {applyCode:'jgqp',versionType: params.versionType}
   }, true)
   }, true)
+}
+// 数据字典
+export const getLookUpItem = (params) => {
+  let url = `lookupItem/query/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post'
+  })
 }
 }

+ 4 - 5
libs/axios.js

@@ -64,17 +64,16 @@ const request = (opts, hasToken) => {
 					else{
 					else{
 						console.log(opts.url,'opts.url')
 						console.log(opts.url,'opts.url')
 						if(ret.status == 500){
 						if(ret.status == 500){
-							// if(
-							// opts.url.indexOf("store/validateStoreAndDevice")<0&&
-							// opts.url.indexOf("couponReceives/findUsableCoupon")<0&&
-							// opts.url.indexOf("shelfReplenish/detail/queryByProductQrCode")<0){
+							if(
+							opts.url.indexOf("shelfReplenish/detail/outScan")<0&&
+							opts.url.indexOf("shelfReplenish/detail/queryByProductQrCode")<0){
 								uni.showToast({
 								uni.showToast({
 									icon:'none',
 									icon:'none',
 									title: ret.message,
 									title: ret.message,
 									mask: true,
 									mask: true,
 									duration: 3000 
 									duration: 3000 
 								})
 								})
-							// }
+							}
 						}
 						}
 					}
 					}
 					resolve(ret)
 					resolve(ret)

+ 3 - 1
pages/common/commonModal.vue

@@ -68,7 +68,7 @@
 <style lang="scss">
 <style lang="scss">
 	.commonModal{
 	.commonModal{
 		width: 100%;
 		width: 100%;
-		height: 100%;
+		height: 100vh;
 		position: absolute;
 		position: absolute;
 		left: 0;
 		left: 0;
 		top: 0;
 		top: 0;
@@ -103,11 +103,13 @@
 					border-right: 1upx solid #E5E5E5;
 					border-right: 1upx solid #E5E5E5;
 					flex-grow: 1;
 					flex-grow: 1;
 					padding: 20upx 0;
 					padding: 20upx 0;
+					width: 50%;
 				}
 				}
 				.button-confirm{
 				.button-confirm{
 					color: #2A86F4;
 					color: #2A86F4;
 					flex-grow: 1;
 					flex-grow: 1;
 					padding: 20upx 0;
 					padding: 20upx 0;
+					width: 50%;
 				}
 				}
 			}
 			}
 		}
 		}

+ 19 - 5
pages/replenishmentManage/chooseTypeModal.vue

@@ -4,8 +4,7 @@
 			<view class="modal-title">选择配送方式</view>
 			<view class="modal-title">选择配送方式</view>
 			<view class="modal-main">
 			<view class="modal-main">
 				<u-radio-group v-model="form.dispatchType" width="50%" style="width: 100%;">
 				<u-radio-group v-model="form.dispatchType" width="50%" style="width: 100%;">
-					<u-radio name="1">送货上门</u-radio>
-					<u-radio name="2">快递到店</u-radio>
+					<u-radio v-for="(item, index) in dispatchTypeList" :key="index" :name="item.code">{{item.dispName}}</u-radio>
 				</u-radio-group>
 				</u-radio-group>
 				<view style="padding: 20upx 0 16upx;">备注</view>
 				<view style="padding: 20upx 0 16upx;">备注</view>
 				<u-input v-model="form.remarks" placeholder="请输入出库备注(最多500字符)" type="textarea" :maxlength="500" :border="true" :auto-height="false" :custom-style="{height: '100upx'}" />
 				<u-input v-model="form.remarks" placeholder="请输入出库备注(最多500字符)" type="textarea" :maxlength="500" :border="true" :auto-height="false" :custom-style="{height: '100upx'}" />
@@ -19,6 +18,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
+	import { getLookUpItem } from '@/api/data'
 	export default {
 	export default {
 		props: {
 		props: {
 			openModal: { //  弹框显示状态
 			openModal: { //  弹框显示状态
@@ -33,8 +33,12 @@
 				  dispatchType: undefined,
 				  dispatchType: undefined,
 				  remarks: ''
 				  remarks: ''
 				},
 				},
+				dispatchTypeList: []
 			}
 			}
 		},
 		},
+		mounted() {
+			this.getLookUpItem()
+		},
 		methods: {
 		methods: {
 			// 确认
 			// 确认
 			handleConfirm(){
 			handleConfirm(){
@@ -45,6 +49,16 @@
 					return;
 					return;
 				}
 				}
 				this.$emit('confirm', _this.form)
 				this.$emit('confirm', _this.form)
+			},
+			// 配送方式
+			getLookUpItem () {
+				getLookUpItem({ lookupCode: 'DISTRIBUTION_MODE', pageNo: 1, pageSize: 1000 }).then(res => {
+					if (res.status == 200 && res.data && res.data.list) {
+						this.dispatchTypeList = res.data.list
+					} else {
+						this.dispatchTypeList = []
+					}
+				})
 			}
 			}
 		},
 		},
 		watch: {
 		watch: {
@@ -54,9 +68,9 @@
 			},
 			},
 			//  重定义的弹框状态
 			//  重定义的弹框状态
 			isShow (newValue, oldValue) {
 			isShow (newValue, oldValue) {
-			  if (!newValue) {
-			    this.$emit('close')
-			  }
+				if (!newValue) {
+					this.$emit('close')
+				}
 			}
 			}
 		}
 		}
 	}
 	}

+ 29 - 4
pages/replenishmentManage/sendOutGoods.vue

@@ -17,7 +17,7 @@
 		<!-- 出库确认弹框 -->
 		<!-- 出库确认弹框 -->
 		<common-modal v-if="confirmOutModal" :openModal="confirmOutModal" title="出库" content="此补货单产品已经全部扫描完成,确认出库吗?" confirmText="确认出库" @confirm="modalOutConfirm" @close="confirmOutModal=false" />
 		<common-modal v-if="confirmOutModal" :openModal="confirmOutModal" title="出库" content="此补货单产品已经全部扫描完成,确认出库吗?" confirmText="确认出库" @confirm="modalOutConfirm" @close="confirmOutModal=false" />
 		<!-- 选择配送方式弹框 -->
 		<!-- 选择配送方式弹框 -->
-		<choose-type-modal v-if="chooseModal" :openModal="chooseModal" @confirm="modalChooseType" @close="chooseModal=false" />
+		<choose-type-modal v-if="chooseModal" :openModal="chooseModal" @confirm="modalChooseType" @close="closeChooseType" />
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -26,7 +26,7 @@
 	import chooseTypeModal from './chooseTypeModal.vue'
 	import chooseTypeModal from './chooseTypeModal.vue'
 	import commonModal from '@/pages/common/commonModal.vue'
 	import commonModal from '@/pages/common/commonModal.vue'
 	import { getQueryString } from '@/libs/tools'
 	import { getQueryString } from '@/libs/tools'
-	import { shelfReplenishDetailList, shelfReplenishDetailOutScan, shelfReplenishOutStock } from '@/api/shelfReplenish'
+	import { shelfReplenishDetailList, shelfReplenishDetailOutScan, shelfReplenishOutStock, shelfReplenishDetail } from '@/api/shelfReplenish'
 	export default {
 	export default {
 		components: { partList, commonModal, chooseTypeModal },
 		components: { partList, commonModal, chooseTypeModal },
 		data() {
 		data() {
@@ -55,8 +55,24 @@
 			this.replenishBillSn = options.sn
 			this.replenishBillSn = options.sn
 			this.shelfSn = options.shelfSn
 			this.shelfSn = options.shelfSn
 			this.getPartList()
 			this.getPartList()
+			this.getDetail()
 		},
 		},
 		methods: {
 		methods: {
+			// 详情
+			getDetail(){
+				shelfReplenishDetail({ sn: this.replenishBillSn }).then(res => {
+					console.log(res)
+					if(res.status == 200 && res.data){
+						if(res.data.totalConfirmQty && res.data.totalScanQty && res.data.totalConfirmQty == res.data.totalScanQty){
+							this.isAll = true
+						}else{
+							this.isAll = false
+						}
+					}else{
+						this.isAll = false
+					}
+				})
+			},
 			// 立即出库
 			// 立即出库
 			handleOutGoods(){
 			handleOutGoods(){
 				if(this.isAll){
 				if(this.isAll){
@@ -99,6 +115,10 @@
 			modalOutConfirm(){
 			modalOutConfirm(){
 				this.chooseModal = true
 				this.chooseModal = true
 			},
 			},
+			closeChooseType(){
+				this.confirmOutModal = false
+				this.chooseModal = false
+			},
 			// 查询列表
 			// 查询列表
 			getPartList(){
 			getPartList(){
 				const _this = this
 				const _this = this
@@ -129,6 +149,8 @@
 						if(res.data && res.data.totalConfirmQty && res.data.totalScanQty && res.data.totalConfirmQty == res.data.totalScanQty){
 						if(res.data && res.data.totalConfirmQty && res.data.totalScanQty && res.data.totalConfirmQty == res.data.totalScanQty){
 							_this.isAll = true
 							_this.isAll = true
 							_this.handleOutGoods()
 							_this.handleOutGoods()
+						}else{
+							_this.barcode.start()
 						}
 						}
 					}else{
 					}else{
 						this.contModal = res.message
 						this.contModal = res.message
@@ -193,13 +215,16 @@
 			width: 100%;
 			width: 100%;
 			height: 100%;
 			height: 100%;
 			overflow: auto;
 			overflow: auto;
+			display: flex;
+			flex-direction: column;
 			.barCode{
 			.barCode{
-				height: 30%;
+				height: 33%;
+				margin-bottom: 10%;
 			}
 			}
 			.info-body{
 			.info-body{
 				flex-flow: 1;
 				flex-flow: 1;
 				overflow: auto;
 				overflow: auto;
-				height: 70%;
+				height: 57%;
 			}
 			}
 			.info{
 			.info{
 				background-color: #FFFFFF;
 				background-color: #FFFFFF;

+ 3 - 0
pages/replenishmentManage/signWarehousing.vue

@@ -138,6 +138,9 @@
 </script>
 </script>
 
 
 <style lang="less">
 <style lang="less">
+page{
+	height: 100vh;
+}
 .replenishment-putWarehousing-wrap{
 .replenishment-putWarehousing-wrap{
 	position: relative;
 	position: relative;
 	width: 100%;
 	width: 100%;