From f26f29d84e0a68831a6af14dab3eec5500496d2e Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 28 五月 2025 16:48:52 +0800
Subject: [PATCH] 初始化项目

---
 pages/wareHouse/jumpFinishProductIn/index.vue |  296 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 296 insertions(+), 0 deletions(-)

diff --git a/pages/wareHouse/jumpFinishProductIn/index.vue b/pages/wareHouse/jumpFinishProductIn/index.vue
new file mode 100644
index 0000000..9afdc21
--- /dev/null
+++ b/pages/wareHouse/jumpFinishProductIn/index.vue
@@ -0,0 +1,296 @@
+<template>
+	<view class="wrap">
+		<view class="top">
+			<u-form label-position="left">
+				<u-form-item label="鑷冲簱浣嶅彿" label-width="180">
+					<input v-model="tolocationNo" type="text" style="text-align: left!important;font-size: 12px;"
+						placeholder="璇烽�夋嫨" maxlength="64" :disabled="true" />
+					<u-button type="primary" size="medium" @click="seachLocationNo">閫夋嫨</u-button>
+				</u-form-item>
+			</u-form>
+			<view class="row3 flex-row">
+				<view class="switch">
+					<u-switch v-model="isAuto"/>
+					<view style="padding-left: 10rpx;">鑷姩鎻愪氦</view>
+				</view>
+			</view>
+		</view>
+		<u-cell-group class="list" :border="false" v-if="scanInfo.id">
+			<view class="content">
+				<view class="row-list" style="padding-top: 8px;">
+					<view class="_content">
+						<u-button type="error" size="mini" @click="delScanInfo">鍒犻櫎</u-button>
+					</view>
+				</view>
+				<view class="row-list" style="padding-top: 8px;">
+					<view class="_label">缂栧彿:</view>
+					<view class="_content">{{ scanInfo.no }}</view>
+				</view>
+				<view class="row-list" style="padding-top: 8px;">
+					<view class="_label">SN鍙�:</view>
+					<view class="_content">
+						<view v-for="(no,i) in scanInfo.snList">
+							{{ no }}
+						</view>
+					</view>
+				</view>
+				<view class="row-list">
+					<view class="_label">鐗╂枡缂栫爜:</view>
+					<view class="_content">{{ scanInfo.cusMaterialCode }}</view>
+				</view>
+				<view class="row-list">
+					<view class="_label">鍖呰灏哄:</view>
+					<view class="_content">{{ format(scanInfo.packSize,'pack_size') }}</view>
+				</view>
+				<view class="row-list">
+					<view class="_label">鍖呮潗:</view>
+					<view class="_content">{{ format(scanInfo.packMaterial,'pack_material') }}</view>
+				</view>
+				<view class="row-list">
+					<view class="_label">鏁伴噺(鏍�):</view>
+					<view class="_content">{{ scanInfo.number }}</view>
+				</view>
+				<view class="row-list">
+					<view class="_label">鍑�閲�(kg):</view>
+					<view class="_content">{{ scanInfo.netWeight }}</view>
+				</view>
+				<view class="row-list">
+					<view class="_label">姣涢噸(kg):</view>
+					<view class="_content">{{ scanInfo.grossWeight }}</view>
+				</view>
+				<view class="row-list">
+					<view class="_label">瀹為檯閲嶉噺(kg):</view>
+					<view class="_content">{{ scanInfo.realWeight }}</view>
+				</view>
+				<view class="row-list">
+					<view class="_label">宸紓閲嶉噺(kg):</view>
+					<view class="_content">{{ scanInfo.differenceWeight }}</view>
+				</view>
+				<view class="row-list">
+					<view class="_label">鏄惁纭:</view>
+					<view class="_content">{{ scanInfo.isConfirm?'鏄�':'鍚�' }}</view>
+				</view>
+				<view class="row-list">
+					<view class="_label">鍒涘缓鏃ユ湡:</view>
+					<view class="_content">{{ scanInfo.createTime }}</view>
+				</view>
+				<view class="row-list">
+					<view class="_label">鏇存柊鏃ユ湡:</view>
+					<view class="_content">{{ scanInfo.updateTime }}</view>
+				</view>
+				<view class="row-list">
+					<view class="_label">鍒涘缓浜�:</view>
+					<view class="_content">{{ scanInfo.createUser }}</view>
+				</view>
+				<view class="row-list">
+					<view class="_label">鏇存柊浜�:</view>
+					<view class="_content">{{ scanInfo.updateUser }}</view>
+				</view>
+				<view class="row-list">
+					<view class="_label">鐞嗚瑁呯鏁伴噺:</view>
+					<view class="_content">{{ scanInfo.theoreticalNumber }}</view>
+				</view>
+			</view>
+		</u-cell-group>
+		<scan></scan>
+		<view class="form-footer" v-if="scanInfo.id&&tolocationNo">
+			<u-button class="btn" type="primary" @click="submit">鎻愪氦</u-button>
+		</view>
+	</view>
+</template>
+<script>
+	import scan from "@/components/scan/scan.vue";
+
+	export default {
+		components: {
+			scan
+		},
+		data() {
+			return {
+				isAuto:false,
+				list: [],
+				tolocationNo: "CPK01",
+				scanInfo:{},
+				
+				pack_size:[],
+				pack_material:[]
+				
+			};
+		},
+		onLoad() {
+			//this.scanHandle({"part_no":"88.118.1/A0044193","package_code":"BZ0000000003","unit_meas":"璺�","wdr":"*","lot_batch_no":"*","qty_arrived":12});
+		},
+		onShow() {
+
+			let that = this
+
+			uni.$off('scan') // 姣忔杩涙潵鍏� 绉婚櫎鍏ㄥ眬鑷畾涔変簨浠剁洃鍚櫒
+			uni.$on('scan', function(data) {
+				console.log('onscan');
+				//鎵爜鎴愬姛鍚庣殑鍥炶皟锛屼綘鍙互鍐欒嚜宸辩殑閫昏緫浠g爜鍦ㄨ繖閲�
+				console.log('鎵爜缁撴灉锛�', data.code);
+				const result = JSON.parse(data.code.replace(/[\r\n]/g, ""))
+				that.scanHandle(result)
+			})
+			setTimeout(()=>{
+				this.init()
+			},500)
+		},
+		onNavigationBarButtonTap(e) {
+			uni.scanCode({
+				success: res => {
+					try {
+						const result = JSON.parse(res.result)
+
+					} catch (e) {}
+				}
+			});
+		},
+		methods: {
+			delScanInfo(){
+				this.scanInfo={}
+			},
+			init(){
+				this.$u.api.dictData({
+					dictType: 'pack_size'
+				}).then(res => {
+					this.pack_size = res.data;
+				})
+				this.$u.api.dictData({
+					dictType: 'pack_material'
+				}).then(res => {
+					this.pack_material = res.data;
+				})
+			},
+			format(value,type){
+				this[type].forEach((obj) => {
+					if (obj.value === value) {
+						value = obj.label
+					}
+				})
+				return value
+			},
+			//鑷冲簱浣�
+			seachLocationNo() {
+				uni.navigateTo({
+					url: '/pages/wareHouse/finishProductIn/locNoList'
+				})
+			},
+			//鑷冲簱浣嶅彿璁剧疆
+			setNo(no) {
+				this.tolocationNo = no
+			},
+			scanHandle(result){
+				if(!this.tolocationNo){
+					this.$u.toast('璇烽�夋嫨鑷冲簱浣嶅彿')
+					return
+				}
+				this.$u.api.finishProductIn.getPackagingAndSizeByPackagingNo({
+					packagingNo:result.package_code,
+				}).then(res => {
+					if(res.data){
+						this.scanInfo={
+							packagingNo:result.package_code,
+							...res.data
+						}
+						if(this.isAuto){
+							this.submit()
+						}
+					}else{
+						this.$u.toast('鏃犵粦瀹氫俊鎭�')
+					}
+				})
+			},
+			submit() {
+				let that = this
+				that.$u.api.finishProductIn.addListJump({
+					inLocationNo:that.tolocationNo,
+					packagingNo:that.scanInfo.packagingNo,
+				}).then(res => {
+					if (res.code == 0) {
+						uni.showModal({
+							title: '鎻愮ず',
+							content: '鎻愪氦鎴愬姛',
+							showCancel: false,
+							success: function() {
+								that.scanInfo={}
+							}
+						})
+					} else {
+						uni.showModal({
+							title: '鎻愮ず',
+							content: '鎻愪氦澶辫触',
+							showCancel: false,
+							success: function() {
+								
+							}
+						})
+					}
+				})
+			},
+		}
+	};
+</script>
+<style lang="scss" scoped>
+	.top{
+		padding:0 20rpx 25rpx;
+		border-bottom: 1px solid #eee;
+		.row3{
+			margin-top: 20rpx;
+			justify-content: space-between;
+			padding: 0 15rpx;
+			font-size: 30rpx;
+			.switch{
+				display: flex;
+				align-items: center;
+			}
+			.u-btn{
+				margin: initial;
+				background:#3281FF;
+			}
+		}
+	}
+	.list .content {
+		font-size: 12px;
+		background-color: #efefef;
+		box-sizing: border-box;
+		border-radius: 14rpx;
+		margin: 8px;
+		padding: 5px 10px;
+		box-shadow: none;
+		position: relative;
+	}
+	.scroll-list{
+		height: calc(100vh - var(--window-top) - var(--window-bottom) - 300rpx);
+	}
+
+	.row-list {
+		display: flex;
+		flex-direction: row;
+	}
+
+	.row-list ._label {
+		flex: 0.8;
+		color: #909399;
+	}
+
+	.row-list ._content {
+		flex: 1.5;
+		text-align: right;
+	}
+
+	.row-img {
+		position: absolute;
+		right: 2px;
+		top: 0px;
+	}
+
+	>>>.uni-input-input {
+		font-size: 12px;
+	}
+
+	::v-deep.u-input__input {
+		min-height: unset !important;
+		text-align: right;
+	}
+</style>

--
Gitblit v1.9.3