lilei 2 年 前
コミット
8d72d6d308

+ 1 - 1
App.vue

@@ -7,7 +7,7 @@
 			token: '',
 			changeOrg:'',
 			version: '', // 当前版本号
-			buildType: 'uat', // 打包环境对应类型,pro 生产 uat 预发布 dev 本地开发
+			buildType: 'dev', // 打包环境对应类型,pro 生产 uat 预发布 dev 本地开发
 			envTips: '', // 环境文字提示
 			theme: 'default', // 主题,default
 			isIphoneXup: false //是否iphonex以及以上的版本

+ 8 - 0
api/shelf.js

@@ -28,6 +28,14 @@ export const shelfProductList = (params) => {
     method: 'post'
   })
 }
+// 禁用货架产品 
+export const shelfProductEnable = (params) => {
+  return axios.request({
+    url: `shelfProduct/updateEnableFlag`,
+    data: params,
+    method: 'post'
+  })
+}
 //  货架  详情
 export const shelfDetail = (params) => {
   return axios.request({

+ 1 - 1
config/index.js

@@ -6,7 +6,7 @@ const getConfig = (theme) => {
 			themePath: 'default',
 			pro_URL: 'https://iscm.360arrow.com/qpls-md/', // 生产地址
 			uat_URL: 'http://p.iscm.360arrow.com/qpls-md/', // 预发布地址
-			dev_URL: 'http://192.168.0.215:8503/qpls-md/', // 本地地址
+			dev_URL: 'http://192.168.2.111:8503/qpls-md/', // 本地地址
 			appName: 'iSCM智慧供应链', // app 名称
 			company: '陕西山海高科信息技术有限公司',
 			loadText:{

+ 4 - 6
pages.json

@@ -576,12 +576,10 @@
         }
         ,{
             "path" : "pages/shelfSetting/editShelfHw",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "编辑货位",
-                "enablePullDownRefresh": false
-            }
-            
+			"style": {
+						"navigationStyle": "custom" ,// 隐藏系统导航栏
+						"navigationBarTextStyle": "black" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
+					}   
         }
         ,{
             "path" : "pages/shelfSetting/addShelfHw",

+ 50 - 4
pages/shelfSetting/editShelfHw.vue

@@ -1,5 +1,10 @@
 <template>
 	<view class="content flex flex_column">
+		<u-navbar back-text="编辑货位" :border-bottom="false" :background="{backgroundColor: $config('primaryColor')}" back-icon-color="#fff" :back-text-style="{ color: '#fff' }">
+			<view slot='right' style="padding: 0 30upx;color: #ffffff;" @click="enableShelfProduct" v-if="type=='edit'&&nowData&&nowData.shelfProductApiEntity&&!nowData.shelfProductApiEntity.qty">
+				<text style="margin-left: 6rpx;">{{nowData&&nowData.shelfProductApiEntity.enableFlag==1?'禁用':'启用'}}</text>
+			</view>
+		</u-navbar>
 		<view class="form-body">
 			<u-form :model="form" label-width="180rpx" :error-type="['toast']" ref="uForm">
 				<u-form-item label="货位号">
@@ -17,7 +22,11 @@
 							<view class="pinfo flex_1">
 								<view class="ptxt flex align_center justify_between">
 									<text>{{productEntity.code}}</text>
-									<text class="pcode" @click="toBindProduct">
+									<text class="pcode" @click="toBindProduct" v-if="nowData&&nowData.shelfProductApiEntity.enableFlag==1">
+										<u-icon name='reload'></u-icon>
+										更换产品
+									</text>
+									<text v-else class="pcode" style="color: #999;">
 										<u-icon name='reload'></u-icon>
 										更换产品
 									</text>
@@ -51,14 +60,14 @@
 		</view>
 		<view class="flex footer-btn">
 			<u-button v-if="type=='bind'" class="delbtn" :loading='loading' @click="handleDel" type='primary' shape="circle" size="medium">删除货位</u-button>
-			<u-button :style="{width:type=='bind'?'45%':'100%'}" class="newbtn" :loading='loading' @click="formSubmit" type='primary' shape="circle" size="medium">保存</u-button>
+			<u-button :disabled="nowData&&nowData.shelfProductApiEntity.enableFlag==0" :style="{width:type=='bind'?'45%':'100%'}" class="newbtn" :loading='loading' @click="formSubmit" type='primary' shape="circle" size="medium">保存</u-button>
 		</view>
 	</view>
 </template>
 
 <script>
 	import { clzConfirm, numberToFixed } from '@/libs/tools';
-	import { shelfProductSave, shelfProductDetail, delShelfPlaceSn } from '@/api/shelf'
+	import { shelfProductSave, shelfProductDetail, delShelfPlaceSn, shelfProductEnable } from '@/api/shelf'
 	export default {
 		data() {
 			return {
@@ -174,7 +183,9 @@
 					  name: res.data.productName,
 					  productMsg: res.data.productImageUrl,
 					  currQty: res.data.qty,
-					  unit: res.data.productEntity.unit
+					  unit: res.data.productEntity.unit,
+					  enabledFlag: res.data.productEntity.enabledFlag,
+					  shelfProductSn: res.data.shelfProductSn
 				  }
 			      this.form.productSn = res.data.productSn
 				  this.bakProductSn = res.data.productSn
@@ -190,6 +201,41 @@
 			    }
 			  })
 			},
+			// 禁用货位产品
+			enableShelfProduct(){
+				const _this = this
+				const isEnable = this.nowData&&this.nowData.shelfProductApiEntity.enableFlag==1
+				if(isEnable){
+					clzConfirm({
+					  title: '提示',
+					  content: '禁用后不参于盘点和补货,但是可以退货、调回,确认禁用吗?',
+					  success (ret) {
+							if (ret.confirm || ret.index == 0) {
+								_this.enableFun(isEnable)
+							}
+					  }
+					})
+				}else{
+					_this.enableFun(isEnable)
+				}
+				
+			},
+			enableFun(isEnable){
+			  const _this = this
+			  _this.spinning = true
+			  shelfProductEnable({ shelfSn: this.nowData.shelfSn, shelfProductSn: this.nowData.shelfProductApiEntity.shelfProductSn, enableFlag: isEnable ? 0 : 1 }).then(res => {
+				if (res.status == 200) {
+				   uni.showToast({
+				   	icon: "none",
+				   	title: res.message
+				   })
+				   this.nowData.shelfProductApiEntity.enableFlag = isEnable ? 0 : 1
+				   // 获取产品信息
+				   this.getProductInfo()
+				}
+				_this.spinning = false
+			  })
+			},
 			// 删除货位
 			handleDel (row) {
 			  const _this = this

+ 2 - 1
pages/shelfSetting/searchShelfHw.vue

@@ -155,7 +155,8 @@
 				    pageSize: this.pageSize,
 					shelfSn: this.shelfSn,
 					queryWord: this.queryWord,
-					shelfPlaceCodeHead: this.curTab
+					shelfPlaceCodeHead: this.curTab,
+					enableFlag: 1
 				}
 				_this.status = 'loading'
 				getShelfProductList(params).then(res => {

+ 130 - 101
pages/shelfSetting/shelfSet.vue

@@ -7,6 +7,7 @@
 				<u-badge v-if="showDot" :is-dot="true" size="mini" type="error"></u-badge>
 			</view>
 		</u-navbar>
+	<view class="body-content flex flex_column">
 		<view class="card-box" v-if="detailData">
 			<view class="card-row flex align_center justify_between">
 				<view class="label">货架名称</view>
@@ -39,7 +40,7 @@
 			<u-action-sheet :list="actionList" @click="clickAction" v-model="updateShowPrice"></u-action-sheet>
 		</view>
 		<!-- 货位信息 -->
-		<view class="shelfPlace" v-if="shelfPlaceList">
+		<view class="shelfPlace" :style="{height: scrollH+'px'}" v-if="shelfPlaceList">
 			<view class="flex align_center shelfPlaceHead">
 				<view class="lt"><text>□</text>表示没有绑定产品</view>
 				<view class="search-btn flex align_center" @click="toSearchHw">
@@ -65,7 +66,7 @@
 				</view>
 			</view>
 		</view>
-		<view v-else>
+		<view style="width: 100%;" v-else>
 			<view class="nodata" v-if="!loading">
 				<view>
 					<u-image :src="`../../static/${$config('themePath')}/def_no_data@3x.png`" width="180" height="180" border-radius="10"></u-image>
@@ -83,6 +84,8 @@
 			</view>
 		</view>
 	</view>
+		
+	</view>
 </template>
 
 <script>
@@ -99,6 +102,7 @@
 				detailData: null,
 				switchVal: false,
 				showMenus:false,
+				scrollH: 400,
 				popData:[{title:'快速补货',val:'0'},{title:'打印贴签',val:'1'}],
 				pleft:0,
 				ptop:0,
@@ -123,6 +127,11 @@
 				]
 			}
 		},
+		watch:{
+			showMore(a,b){
+				this.getScrollHeight(a)
+			},
+		},
 		onLoad(option) {
 			this.shelfSn = option.shelfSn
 			// 获取货架详情
@@ -131,7 +140,7 @@
 			// 获取货物
 			this.getShelfPlace()
 			this.isLoad = true
-			this.webView = this.$mp.page.$getAppWebview(); 
+			// this.webView = this.$mp.page.$getAppWebview(); 
 			uni.$on("editCustome",(data)=>{
 				this.isLoad = true
 				this.saveShelf(data,0)
@@ -141,10 +150,10 @@
 				this.saveShelf(data,1)
 			})
 			
-			const win = uni.getWindowInfo()
-			this.pleft = Math.floor(win.windowWidth * 0.3)
-			this.ptop = Math.floor(win.windowHeight - 70)
-			
+			// const win = uni.getWindowInfo()
+			// this.pleft = Math.floor(win.windowWidth * 0.3)
+			// this.ptop = Math.floor(win.windowHeight - 70)
+			this.getScrollHeight(this.showMore)
 			console.log(this.shelfSn)
 		},
 		onUnload() {
@@ -157,6 +166,19 @@
 			}
 		},
 		methods: {
+			getScrollHeight(a){
+				const sys = uni.getSystemInfoSync()
+				const h = a? 290 : 250
+				if(sys.platform == 'android'){
+					this.scrollH = sys.windowHeight - h
+				}else{
+					if(sys.safeArea.top){
+						this.scrollH = sys.windowHeight - h + sys.statusBarHeight - 34
+					}else{
+						this.scrollH = sys.windowHeight - h - 14
+					}
+				}
+			},
 			// 刷新货位
 			updateHw(){
 				this.placeTab = []
@@ -411,121 +433,128 @@
 			}
 		}
 	}
-	.moreSeting{
-		text-align: center;
-		color: #999;
-		padding: 20upx;
-		> text{
-			margin-right: 10rpx;
-		}
-	}
-}
-.card-box{
-	background-color: #fff;
-	border-radius: 0.5rem;
-	box-shadow: 0.1rem 0.2rem 0.3rem #eee;
-	padding: 0 1rem;
-	margin: 0.5rem;
-	.card-row{
-		border-bottom: 1rpx solid #eee;
-		padding: 20rpx 0;
-		min-height: 90rpx;
-		&:last-child{
-			border-bottom: 0;
-		}
-		.label{
-			flex: 1;
-			width: 20%;
-		}
-		.text{
-			width: 80%;
-			color: #666;
-		}
-	}
-}
-.shelfPlace{
-	.shelfPlaceHead{
-		padding: 0.2rem 0.5rem 0.5rem;
-		justify-content: space-between;
-		.lt{
-			font-size: 0.9rem;
-			color: #999;
-			text{
-				color: #ff5500;
-				font-size: 1rem;
+	.body-content{
+		width: 100%;
+     }
+	.card-box{
+		background-color: #fff;
+		border-radius: 0.5rem;
+		box-shadow: 0.1rem 0.2rem 0.3rem #eee;
+		padding: 0 1rem;
+		margin: 0.5rem;
+		.card-row{
+			border-bottom: 1rpx solid #eee;
+			padding: 20rpx 0;
+			min-height: 90rpx;
+			&:last-child{
+				border-bottom: 0;
+			}
+			.label{
+				flex: 1;
+				width: 20%;
+			}
+			.text{
+				width: 80%;
+				color: #666;
 			}
 		}
-		.search-btn{
-			border:1rpx solid #eee;
-			border-radius: 50rpx;
-			width: 50%;
-			justify-content: space-between;
-			padding:0.3rem 0.5rem;
+		.moreSeting{
+			text-align: center;
 			color: #999;
-			background-color: #fff;
-			font-size: 0.9rem;
-			&:active{
-				opacity: 0.6;
+			padding: 20upx;
+			> text{
+				margin-right: 10rpx;
 			}
 		}
 	}
-	.shelfTabs{
-		height: calc(100vh - 150rpx);
-		.leftTabs{
-			width: 20%;
-			overflow: auto;
-			> view{
-				padding: 0.8rem 0.5rem;
-				border-left: 0.2rem solid #f8f8f8;
-				text-align: center;
+	
+	.shelfPlace{
+		height: calc(100% - 300rpx);
+		.shelfPlaceHead{
+			padding: 0.2rem 0.5rem 0.5rem;
+			justify-content: space-between;
+			.lt{
+				font-size: 0.9rem;
+				color: #999;
+				text{
+					color: #ff5500;
+					font-size: 1rem;
+				}
 			}
-			.active{
-				border-color: rgb(47, 126, 209);
+			.search-btn{
+				border:1rpx solid #eee;
+				border-radius: 50rpx;
+				width: 50%;
+				justify-content: space-between;
+				padding:0.3rem 0.5rem;
+				color: #999;
 				background-color: #fff;
+				font-size: 0.9rem;
+				&:active{
+					opacity: 0.6;
+				}
 			}
 		}
-		.rightCons{
-			width: 80%;
-			background-color: #fff;
-			position: relative;
-			.hwList{
+		.shelfTabs{
+			height: calc(100% - 85rpx);
+			.leftTabs{
+				width: 20%;
 				overflow: auto;
-				padding: 0.5rem;
-				padding-bottom: 105rpx;
-				> text{
-					border: 1rpx solid #eee;
-					padding: 0.2rem 0.8rem;
-					border-radius: 0.3rem;
-					margin: 0.5rem 2%;
-					float: left;
-					width: 20%;
+				> view{
+					padding: 0.8rem 0.5rem;
+					border-left: 0.2rem solid #f8f8f8;
 					text-align: center;
 				}
-				.red{
-					border-color: #ff5500;
-				}
-				.add{
-					border-style: dashed;
-					border-color: #999;
-					color: #999;
+				.active{
+					border-color: rgb(47, 126, 209);
+					background-color: #fff;
 				}
 			}
-			.hwAction{
-				padding: 0.5rem;
-				position: fixed;
-				bottom: 0;
-				right: 0;
+			.rightCons{
 				width: 80%;
 				background-color: #fff;
-				button{
-					width: 240rpx;
+				position: relative;
+				.hwList{
+					overflow: auto;
+					padding: 0.5rem;
+					padding-bottom: 105rpx;
+					> text{
+						border: 1rpx solid #eee;
+						padding: 0.2rem 0.8rem;
+						border-radius: 0.3rem;
+						margin: 0.5rem 2%;
+						float: left;
+						width: 20%;
+						text-align: center;
+					}
+					.red{
+						border-color: #ff5500;
+					}
+					.add{
+						border-style: dashed;
+						border-color: #999;
+						color: #999;
+					}
 				}
-				.newbtn{
-					background-color: rgb(51, 95, 182);
-					color: #fff;
+				.hwAction{
+					padding: 0.5rem;
+					position: fixed;
+					bottom: 0;
+					right: 0;
+					width: 80%;
+					background-color: #fff;
+					button{
+						width: 240rpx;
+					}
+					.newbtn{
+						background-color: rgb(51, 95, 182);
+						color: #fff;
+					}
 				}
 			}
 		}
 	}
 }
+
+
 </style>

+ 2 - 1
pages/soldOut/chooseProduct.vue

@@ -313,7 +313,8 @@
 				let params = {
 					shelfSn: this.nowData.shelfSn,
 					queryWord: this.queryWord,
-					stockStateList: this.stockStateList
+					stockStateList: this.stockStateList,
+					enableFlag: 1
 				}
 				uni.showLoading({
 					mask:true,

+ 0 - 1
pages/soldOut/creatOrder.vue

@@ -107,7 +107,6 @@
 </template>
 
 <script>
-	import { queryProductListForReplenish } from '@/api/shelf'
 	import { saveMainAndDetail } from '@/api/shelfReplenish'
 	import { clzConfirm } from '@/libs/tools'
 	export default {

+ 1 - 0
pages/stockCheck/startCheck.vue

@@ -486,6 +486,7 @@
 					shelfPlaceCodeHead: this.curTab,
 					currQtyFlag: this.curType=='available' ? 1 : '',
 					freezeQtyFlag: this.curType=='blocked' ? 1 : '',
+					enableFlag: 1
 				}
 				_this.status = 'loading'
 				getShelfProductList(params).then(res => {