Bladeren bron

bug 修复

lilei 2 jaren geleden
bovenliggende
commit
9859208745

+ 3 - 3
pages/shelfSetting/addShelfHw.vue

@@ -3,7 +3,7 @@
 		<view class="form-body">
 			<u-form :model="form" label-width="180rpx" :error-type="['toast']" ref="uForm">
 				<u-form-item label="货位号" required prop="shelfPlaceCode">
-					<u-input focus v-model="form.shelfPlaceCode" :maxlength="30" placeholder="请输入货位号(最多30个字符)"/>
+					<u-input focus v-model="form.shelfPlaceCode" :maxlength="30" placeholder="请输入货位号(大写字母+数字的格式)"/>
 				</u-form-item>
 				<u-form-item label="绑定产品" v-show="type=='add'">
 					<view style="flex-grow: 1;" v-if="productEntity&&productEntity.code" @click="toBindProduct">
@@ -64,8 +64,8 @@
 					shelfPlaceCode:[
 						{ required: true, message: '请输入货位号', trigger: 'change' },
 						{
-							pattern: /^[a-zA-Z]{1}(?![a-zA-Z]+$)[a-zA-Z0-9]{1,29}$/g,
-							message: '必需包含字母或数字,且首字符不能是数字'
+							pattern: /^[A-Z]{1}[0-9]{1,29}$/g,
+							message: '必需大写字母开头且后面紧跟数字'
 						}
 					],
 					price: [{ required: true,type:'number', message: '请输入销售价', trigger: 'change' }],

+ 1 - 1
pages/shelfSetting/quickReplenish.vue

@@ -5,7 +5,7 @@
 				<text></text>
 				<view class="shelfName flex align_center">
 					<view>
-						{{basicInfoData.shelfName}}系统检测到以下产品缺货,请选择需要补货的产品
+						{{basicInfoData.shelfName}}
 					</view>
 				</view>
 			</view>

+ 27 - 14
pages/shelfSetting/shelfSet.vue

@@ -41,8 +41,8 @@
 						<text class="add" @click="addHw('add',1)"><u-icon name="plus"></u-icon></text>
 					</view>
 					<view class="hwAction flex justify_between">
-						<u-button shape="circle" @click="showMenus=true" size="medium">更多功能</u-button>
-						<u-button class="newbtn" @click="addHw('add',0)" type='primary' shape="circle" size="medium">新增货位</u-button>
+						<u-button shape="circle" @click="tapPopup(1)" size="medium">打印贴签</u-button>
+						<u-button class="newbtn" @click="tapPopup(2)" type='primary' shape="circle" size="medium">快速补货</u-button>
 					</view>
 				</view>
 			</view>
@@ -50,16 +50,15 @@
 		<view v-else>
 			<view class="nodata">暂无货位信息,请点击 <text @click="addHw('add',0)">新增货位</text></view>
 		</view>
-		<chunLeiPopups v-model="showMenus" theme="dark" :popData="popData" @tapPopup="tapPopup" :x="pleft" :y="ptop" placement="bottom-start"></chunLeiPopups>
 	</view>
 </template>
 
 <script>
-	import chunLeiPopups from "@/components/chunLei-popups/chunLei-popups.vue";
     import { shelfDetail, shelfSave, modifFinishFlag, getProductPlace } from '@/api/shelf'
 	import { createShelfReplenishBill } from '@/api/shelfReplenish'
 	export default {
-		components:{chunLeiPopups},
+		components:{
+		},
 		data() {
 			return {
 				shelfSn: null,
@@ -106,13 +105,22 @@
 			tapPopup(e){
 				console.log(e)
 				// 打印贴签
-				if(e.val == 1){
-					uni.navigateTo({
-						url: "/pages/latePlay/chooseProduct?shelfSn="+this.shelfSn+'&shelfName='+this.detailData.shelfName
-					})
+				if(e == 1){
+					if(this.hasNoBindPro()){
+						uni.navigateTo({
+							url: "/pages/latePlay/chooseProduct?shelfSn="+this.shelfSn+'&shelfName='+this.detailData.shelfName
+						})
+					}else{
+						uni.showModal({
+							showCancel:false,
+							confirmText:"好的",
+							title: "提示",
+							content: "所有货位都没有绑定产品,无法打印贴签!"
+						})
+					}
 				}
 				// 快速补货
-				if(e.val == 0){
+				if(e == 2){
 					createShelfReplenishBill({shelfSn: this.shelfSn}).then(res => {
 						console.log(res.data)
 						if(res.data&&res.data.length){
@@ -166,8 +174,8 @@
 					url: "/pages/shelfSetting/editShelf?shelfName="+this.detailData.shelfName
 				})
 			},
-			// 按照产品搜索货位
-			toSearchHw(){
+			// 是否没有绑定任何产品
+			hasNoBindPro(){
 				let noBindPro = null;
 				for(let i=0;i<this.placeTab.length;i++){
 					noBindPro = this.shelfPlaceList[this.placeTab[i]].find(item => item.shelfProductApiEntity && item.shelfProductApiEntity.productSn);
@@ -175,7 +183,11 @@
 						break
 					}
 				}
-				if(!!noBindPro){
+				return !!noBindPro
+			},
+			// 按照产品搜索货位
+			toSearchHw(){
+				if(this.hasNoBindPro()){
 					uni.navigateTo({
 						url: "/pages/shelfSetting/searchShelfHw?shelfName="+this.detailData.shelfName+"&shelfSn="+this.shelfSn
 					})
@@ -206,7 +218,8 @@
 				if(type=='add'&&flag==1){
 					const row = this.shelfPlaceList[this.curTab]
 					const num = row[row.length-1].shelfPlaceCode.replace(this.curTab,'')
-					shelfPlaceCode = this.curTab + (Number(num) + 1)
+					const nextNum = Number(num) + 1
+					shelfPlaceCode = this.curTab + (nextNum<10?'0':'') + nextNum
 				}
 				uni.navigateTo({
 					url: "/pages/shelfSetting/addShelfHw?detailData="+encodeURIComponent(JSON.stringify(this.detailData))+"&type="+type+"&shelfPlaceCode="+shelfPlaceCode

+ 1 - 1
pages/stockCheck/editModal.vue

@@ -27,7 +27,7 @@
 				 <view class="p-info flex align_center">
 				 	<text>结算价格</text>
 					<view>
-						<text>{{infoData.price}}元</text>
+						<text>{{infoData.cost}}元</text>
 					</view>
 				 </view>
 				 <view class="p-info flex align_center">