Browse Source

增加入库扫码页面;四库部分字段修改等

htc 1 month ago
parent
commit
9e6cf28e72

+ 7 - 0
pages.json

@@ -143,6 +143,13 @@
 						"enablePullDownRefresh": true
 					}
 				},
+				{
+					"path": "inStorage/scan",
+					"style": {
+						"navigationStyle": "custom",
+						"enablePullDownRefresh": true
+					}
+				},
 				{
 					"path": "outStorage/index",
 					"style": {

+ 5 - 5
pagesStorage/checkStorage/index.vue

@@ -20,13 +20,13 @@
 						<div class="nr" :class="{'ks':item.totalQuantity<0}">{{ item.totalQuantity||'' }}</div>
 					</div>
 					<div class="pre">
-						<div class="title">操作时间</div>
-						<div class="nr">{{ item.updateDate||'' }}</div>
-					</div>
-					<div class="pre">
-						<div class="title">操作人</div>
+						<div class="title">盘库人</div>
 						<div class="nr">{{ item.updaterName||'' }}</div>
 					</div>
+					<div class="pre bfb">
+						<div class="title">时间</div>
+						<div class="nr">{{ item.updateDate||'' }}</div>
+					</div>
 				</div>
 			</div>
 			<page-loading :loading="isLoading"></page-loading>

+ 46 - 14
pagesStorage/inStorage/add.vue

@@ -37,11 +37,17 @@
 						<input type="text" placeholder-class="storage-inp-ph" placeholder="请输入" v-model="receiptDto.bizOrderNo" @blur="e=>setReceipt(e,'bizOrderNo')">
 					</div>
 				</div>
-				<div class="item">
+			<!-- 	<div class="item">
 					<div class="left">总数量</div>
 					<div class="right">
 						<input type="text" v-model="receiptDto.totalQuantity" disabled>
 					</div>
+				</div> -->
+				<div class="item">
+					<div class="left">采购负责人</div>
+					<div class="right">
+						<input type="text" placeholder-class="storage-inp-ph" placeholder="请输入" v-model="receiptDto.purchaser" @blur="e=>setReceipt(e,'purchaser')">
+					</div>
 				</div>
 				<div class="item">
 					<div class="left">总金额</div>
@@ -54,7 +60,10 @@
 		</div>
 		<div class="box" :style="{'padding-bottom':receiptDto.details.length?'0':'48rpx'}">
 			<div class="title">商品明细</div>
-			<div class="btn" @tap="toAddGoods">+ 添加商品</div>
+			<div class="btns">
+				<div class="btn" @tap="toAddGoods">+ 添加商品</div>
+				<div class="btn" @tap="toScan">+ 扫码添加</div>
+			</div>
 			<div class="goods">
 				<template v-if="receiptDto.details.length">
 					<div class="good" v-for="(good,idx) in receiptDto.details" :key="good.skuId">
@@ -111,7 +120,8 @@
 					orderStatus: 1,
 					warehouseId: '',
 					warehouseName: '',
-					totalQuantity: 0,
+					totalQuantity: 0,
+					purchaser:'',
 					details: []
 				},
 				warehouseShow:false,
@@ -199,6 +209,22 @@
 					}
 				})
 			},
+			toScan(){
+				uni.navigateTo({
+					url:'/pagesStorage/inStorage/scan',
+					events:{
+						addGoods:list=>{
+							let aList = JSON.parse(JSON.stringify(list));
+							this.receiptDto.details.forEach(d=>{
+								aList = list.filter(l=>l.skuId!=d.skuId)
+							})
+							this.receiptDto.details = [...this.receiptDto.details,...aList];
+							this.computeNum();
+							this.autoCalculate();
+						}
+					}
+				})
+			},
 			deleteGood(index){
 				this.receiptDto.details.splice(index,1);
 				this.$nextTick(()=>{
@@ -334,20 +360,26 @@
 					margin-top: 9rpx;
 				}
 			}
-		
-			.btn{
+			
+			.btns{
 				width: 100%;
 				height: 64rpx;
-				border-radius: 16rpx;
-				border: 1rpx solid #198CFF;
+				display: flex;
+				justify-content: space-between;
 				margin-top: 26rpx;
-				font-family: PingFang-SC, PingFang-SC;
-				font-weight: bold;
-				font-size: 26rpx;
-				color: #198CFF;
-				line-height: 64rpx;
-				text-align: center;
-				letter-spacing: 2rpx;
+				.btn{
+					width: calc(50% - 12rpx);
+					height: 62rpx;
+					border-radius: 16rpx;
+					border: 1rpx solid #198CFF;
+					font-family: PingFang-SC, PingFang-SC;
+					font-weight: bold;
+					font-size: 26rpx;
+					color: #198CFF;
+					line-height: 62rpx;
+					text-align: center;
+					letter-spacing: 2rpx;
+				}
 			}
 		
 			.goods{

+ 6 - 2
pagesStorage/inStorage/index.vue

@@ -28,11 +28,15 @@
 						<div class="nr">{{ receiptType[item.optType]||'' }}</div>
 					</div>
 					<div class="pre">
-						<div class="title">操作人</div>
+						<div class="title">入库人</div>
 						<div class="nr">{{ item.updaterName||'' }}</div>
 					</div>
 					<div class="pre">
-						<div class="title">操作时间</div>
+						<div class="title">采购人</div>
+						<div class="nr">{{ item.purchaser||'' }}</div>
+					</div>
+					<div class="pre bfb">
+						<div class="title">时间</div>
 						<div class="nr">{{ item.updateDate||'' }}</div>
 					</div>
 					<div class="pre bfb">

+ 172 - 0
pagesStorage/inStorage/scan.vue

@@ -0,0 +1,172 @@
+<template>
+	<view class="page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
+		<cus-header title='扫码入库'></cus-header>
+		<div class="boxs" v-if="list.length">
+			<div class="box" v-for="(item,index) in list" :key="item.id">
+				<div class="name">{{item.item.itemName}}</div>
+				<div class="info">规格信息:<span>{{item.itemSku.skuName||''}} / {{item.itemSku.unit||''}}</span></div>
+				<div class="cz">
+					<div class="pre">
+						<div class="text">入库</div>
+						<div class="num">
+							<u-number-box v-model="item.quantity" button-size="48" :integer="true" inputWidth="82rpx"
+							 @change="e=>changeNum(e,index)" bgColor="#F5F8FA"></u-number-box>
+						</div>
+					</div>
+					<div class="pre">
+						<div class="text">金额</div>
+						<div class="num">
+							<u-number-box v-model="item.amount" :integer="false" :canSmall="true" button-size="48" inputWidth="82rpx"
+							 @change="e=>changeMoney(e,index)" bgColor="#F5F8FA"></u-number-box>
+							 <span>元</span>
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
+		<template v-else>
+			<page-empty :height="'calc(100vh - 180px)'"></page-empty>
+		</template>
+		<div class="btns">
+			<div class="btn" @tap="scan">扫码添加</div>
+			<div class="btn" @tap="save">保存</div>
+		</div>
+	</view>
+</template>
+
+<script>
+	import pageEmpty from '../components/pageEmpty/index.vue'
+	export default {
+		components:{ pageEmpty },
+		data(){
+			return {
+				list:[]
+			}
+		},
+		methods:{
+			scan(){
+				uni.scanCode({
+					success: (res) => {
+						let d = JSON.parse(res.result);
+						if(!d.hasOwnProperty('skuId')) return
+						let fi = this.list.findIndex(l=>l.skuId==d.skuId);
+						if(fi>=0){
+							this.$set(this.list[fi],'quantity',++this.list[fi].quantity);
+						}else{
+							d.quantity = 1;
+							d.amount = 0;
+							this.list = [...this.list,d]
+						}
+					}
+				})
+			},
+			changeNum(e,index){
+				this.$set(this.list[index],'quantity',e.value);
+			},
+			changeMoney(e,index){
+				this.$set(this.list[index],'amount',e.value);
+			},
+			save(){
+				this.getOpenerEventChannel().emit('addGoods', this.list);
+				uni.navigateBack();
+			}
+		}
+	}
+</script>
+
+<style scoped lang="less">
+	::v-deep .u-number-box__minus{
+		width: 25px !important;
+	}
+	.page{
+		background: #F5F8FA;
+		padding-bottom: 168rpx;
+		box-sizing: border-box;
+		
+		.boxs{
+			padding: 0 24rpx;
+			box-sizing: border-box;
+			.box{
+				background: #FFFFFF;
+				border-radius: 16rpx;
+				padding: 32rpx 24rpx 36rpx;
+				margin-top: 20rpx;
+				.name{
+					font-family: PingFang-SC, PingFang-SC;
+					font-weight: bold;
+					font-size: 30rpx;
+					color: #1D2129;
+					text-align: left;
+				}
+				.info{
+					font-family: PingFangSC, PingFang SC;
+					font-weight: 400;
+					font-size: 24rpx;
+					color: #86909C;
+					text-align: left;
+					margin-top: 24rpx;
+					span{
+						color: #4E5969;
+					}
+				}
+				.cz{
+					margin-top: 46rpx;
+					display: flex;
+					justify-content: space-between;
+					.pre{
+						width: calc(50% - 30rpx);
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						.text{
+							font-family: PingFangSC, PingFang SC;
+							font-weight: 400;
+							font-size: 24rpx;
+							color: #86909C;
+							line-height: 26rpx;
+							text-align: left;
+						}
+						.num{
+							display: flex;
+							align-items: center;
+							span{
+								font-family: PingFangSC, PingFang SC;
+								font-weight: 400;
+								font-size: 24rpx;
+								color: #1D2129;
+								text-align: left;
+								padding-left: 8rpx;
+							}
+						}
+					}
+				}
+			}
+		}
+		
+		.btns{
+			width: 100%;
+			height: 148rpx;
+			background: #FFFFFF;
+			padding: 20rpx 24rpx 0;
+			box-sizing: border-box;
+			display: flex;
+			justify-content: space-between;
+			position: fixed;
+			left: 0;
+			bottom: 0;
+			.btn{
+				width: calc(50% - 11rpx);
+				height: 88rpx;
+				background: #198CFF;
+				border-radius: 16rpx;
+				font-family: PingFang-SC, PingFang-SC;
+				font-weight: bold;
+				font-size: 32rpx;
+				color: #FFFFFF;
+				line-height: 88rpx;
+				text-align: center;
+				letter-spacing: 2rpx;
+			}
+		}
+	}
+</style>

+ 2 - 2
pagesStorage/moveStorage/add.vue

@@ -24,12 +24,12 @@
 						<text class="tip" v-else>请选择仓库 ></text>
 					</div>
 				</div>
-				<div class="item">
+				<!-- <div class="item">
 					<div class="left">总数量</div>
 					<div class="right">
 						<input type="text" v-model="movementDto.totalQuantity" disabled>
 					</div>
-				</div>
+				</div> -->
 				<div class="item">
 					<div class="left">总金额</div>
 					<div class="right">

+ 8 - 8
pagesStorage/moveStorage/index.vue

@@ -19,22 +19,22 @@
 						<div class="title">总金额</div>
 						<div class="nr money">¥{{ item.totalAmount||'' }}</div>
 					</div>
-					<div class="pre">
-						<div class="title">操作时间</div>
-						<div class="nr">{{ item.updateDate||'' }}</div>
-					</div>
 					<div class="pre">
 						<div class="title">源仓库</div>
 						<div class="nr">{{ item.sourceWarehouseName||'' }}</div>
 					</div>
-					<div class="pre">
-						<div class="title">操作人</div>
-						<div class="nr">{{ item.updaterName||'' }}</div>
-					</div>
 					<div class="pre">
 						<div class="title">目标仓库</div>
 						<div class="nr">{{ item.targetWarehouseName||'' }}</div>
 					</div>
+					<div class="pre">
+						<div class="title">移库人</div>
+						<div class="nr">{{ item.updaterName||'' }}</div>
+					</div>
+					<div class="pre bfb">
+						<div class="title">时间</div>
+						<div class="nr">{{ item.updateDate||'' }}</div>
+					</div>
 				</div>
 				<div class="goods" v-if="item.goodsList.length&&item.goodsShow">
 					<div class="good" v-for="(good,idx) in item.goodsList" :key="good.id">

+ 2 - 2
pagesStorage/outStorage/add.vue

@@ -37,12 +37,12 @@
 						<input type="text" placeholder-class="storage-inp-ph" placeholder="请输入" v-model="shipmentDto.bizOrderNo" @blur="e=>setShipment(e,'bizOrderNo')">
 					</div>
 				</div>
-				<div class="item">
+				<!-- <div class="item">
 					<div class="left">总数量</div>
 					<div class="right">
 						<input type="text" v-model="shipmentDto.totalQuantity" disabled>
 					</div>
-				</div>
+				</div> -->
 				<div class="item">
 					<div class="left">总金额</div>
 					<div class="right">

+ 3 - 3
pagesStorage/outStorage/index.vue

@@ -28,11 +28,11 @@
 						<div class="nr">{{ shipmentType[item.optType]||'' }}</div>
 					</div>
 					<div class="pre">
-						<div class="title">操作人</div>
+						<div class="title">出库人</div>
 						<div class="nr">{{ item.updaterName||'' }}</div>
 					</div>
-					<div class="pre">
-						<div class="title">操作时间</div>
+					<div class="pre bfb">
+						<div class="title">时间</div>
 						<div class="nr">{{ item.updateDate||'' }}</div>
 					</div>
 					<div class="pre bfb">