From 46cc7a29dc1f9b3dffee5cdcb9b7f9dfdac3b16d Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期五, 05 九月 2025 20:44:14 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev

---
 pages/tiaomaguanli/table.vue |  533 +++++++++++++++++++++++++++++++---------------------------
 1 files changed, 282 insertions(+), 251 deletions(-)

diff --git a/pages/tiaomaguanli/table.vue b/pages/tiaomaguanli/table.vue
index c1cc9e9..1ffaffd 100644
--- a/pages/tiaomaguanli/table.vue
+++ b/pages/tiaomaguanli/table.vue
@@ -1,266 +1,297 @@
 <template>
-	<view class="content">
-		<view class="form">
-			<view class="form-item">
-				<view class="title"><text>*</text>鏉$爜:</view>
-				<view class="right" style="width: 380rpx;">
-					<input :focus="HBarCodeFocus" v-model="HBarCode" placeholder="璇锋壂鎻�(鎴栬緭鍏�)鏉$爜" @confirm="getCode(HBarCode)"/>
-				</view>
-				<uni-icons type="scan" style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;" size="20" @click="toScanCode"></uni-icons>
-			</view>
-			<view class="form-item">
-				<view class="title">鍗曟嵁鍙�:</view>
-				<view class="righton">
-					<input v-model="baseInfo.HBillNo" disabled/>
-				</view>
-			</view>
-			<view class="form-item">
-				<view class="title">渚涘簲鍟�:</view>
-				<view class="righton">
-					<input v-model="baseInfo.HSupName" disabled/>
-				</view>
-			</view>
-			<view class="form-item">
-				<view class="title">閮ㄩ棬:</view>
-				<view class="righton">
-					<input v-model="baseInfo.HDeptName" disabled/>
-				</view>
-			</view>
-		</view>
-		
-		<view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
-		
-		<view class="list" v-for="(item,index) in listData" :key="index" @tap="toSon(item)">
-			<uni-card :title="item.鐗╂枡浠g爜" :extra="'No. ' + Number(index+1)" style="margin: 10px;">
-				<view class="card-detail">
-					<view class="detail">
-						<text>鐗╂枡鍚嶇О锛�</text>{{item.鐗╂枡鍚嶇О}}
-					</view>
-					<view class="detail">
-						<text>瑙勬牸鍨嬪彿锛�</text>{{item.瑙勬牸鍨嬪彿}}
-					</view>
-					<view class="detail">
-						<text>璁㈠崟鏁伴噺锛�</text>{{item.鏁伴噺}}
-					</view>
-				</view>
+    <view class="content">
+        <view class="form">
+            <view class="form-item">
+                <view class="title"><text>*</text>鏉$爜:</view>
+                <view class="right" style="width: 380rpx;">
+                    <input :focus="HBarCodeFocus" v-model="HBarCode" placeholder="璇锋壂鎻�(鎴栬緭鍏�)鏉$爜"
+                        @confirm="getCode(HBarCode)" />
+                </view>
+                <uni-icons type="scan"
+                    style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
+                    size="20" @click="toScanCode"></uni-icons>
+            </view>
+            <view class="form-item">
+                <view class="title">鍗曟嵁鍙�:</view>
+                <view class="righton">
+                    <input v-model="baseInfo.HBillNo" disabled />
+                </view>
+            </view>
+            <view class="form-item">
+                <view class="title">渚涘簲鍟�:</view>
+                <view class="righton">
+                    <input v-model="baseInfo.HSupName" disabled />
+                </view>
+            </view>
+            <view class="form-item">
+                <view class="title">閮ㄩ棬:</view>
+                <view class="righton">
+                    <input v-model="baseInfo.HDeptName" disabled />
+                </view>
+            </view>
+        </view>
 
-			</uni-card>
-		</view>
-		
-		<view class="over" v-if="listData.length == 0">鏆傛棤鏁版嵁</view>
-		<view class="over" v-if="listData.length != 0">宸插埌搴�</view>
-	</view>
+        <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
+
+        <view class="list" v-for="(item,index) in listData" :key="index" @tap="toSon(item)">
+            <uni-card :title="item.鐗╂枡浠g爜" :extra="'No. ' + Number(index+1)" style="margin: 10px;">
+                <view class="card-detail">
+                    <view class="detail">
+                        <text>鐗╂枡鍚嶇О锛�</text>{{item.鐗╂枡鍚嶇О}}
+                    </view>
+                    <view class="detail">
+                        <text>瑙勬牸鍨嬪彿锛�</text>{{item.瑙勬牸鍨嬪彿}}
+                    </view>
+                    <view class="detail">
+                        <text>璁㈠崟鏁伴噺锛�</text>{{item.鏁伴噺}}
+                    </view>
+                </view>
+
+            </uni-card>
+        </view>
+
+        <view class="over" v-if="listData.length == 0">鏆傛棤鏁版嵁</view>
+        <view class="over" v-if="listData.length != 0">宸插埌搴�</view>
+    </view>
 </template>
 
 <script>
-	import { CommonUtils } from "../../utils/common";
-import { getUserInfo } from "@/utils/auth.js";
-	export default {
-	    data() {
-	        return {
-				HBarCodeFocus: false,
-				
-				userInfo:getUserInfo(),
-				serverUrl: uni.getStorageSync('serverUrl')||'http://47.96.97.237/API',
-				HBarCode:'',
-				baseInfo:{
-					HBillNo:'',
-					HSupName:'',
-					HDeptName:'',
-					HInterID:'',
+    import {
+        CommonUtils
+    } from "../../utils/common";
+    import {
+        getUserInfo
+    } from "@/utils/auth.js";
+    import BillTypeValueMap from "@/static/json/BillTypeValueMap"
+    export default {
+        data() {
+            return {
+                HBarCodeFocus: false,
+
+                userInfo: getUserInfo(),
+                serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
+                HBarCode: '',
+                baseInfo: {
+                    HBillNo: '',
+                    HSupName: '',
+                    HDeptName: '',
+                    HInterID: '',
                     HBillType: 0,
-				},
-				sWhere:'',
-				listData:[],
-	        }
-	    },
-		onLoad(params) {
-			this.HBarCodeFocus = true
-            if(!CommonUtils.isEmpty(params.HBillType)) {
+                },
+                sWhere: '',
+                listData: [],
+            }
+        },
+        onLoad(params) {
+            this.HBarCodeFocus = true
+            if (!CommonUtils.isEmpty(params.HBillType)) {
                 this.baseInfo.HBillType = params.HBillType
             }
-            console.log(this.baseInfo.HBillType)
-		},
-	    methods: {
-			async refreshBarCodeState() {
-				this.HBarCodeFocus = false
-				await this.$nextTick(() => {
-					this.HBarCodeFocus = true
-					this.HBarCode = ""
-				})
-			},
- 			playSound(e){
-				const innerAudioContext = uni.createInnerAudioContext();
-				if(e == 1){
-					innerAudioContext.src = '/static/success.wav';
-				}else{
-					innerAudioContext.src = '/static/jingbao.wav';
-				}
-				innerAudioContext.play(); // 鎾斁闊抽
-			},
-			//鎵爜
-			toScanCode(){
-				var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
-				mpaasScanModule.mpaasScan({
-					'hideAlbum': true,
-					'timeoutInterval':'10', //瓒呮椂鏃堕棿
-					'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋            
-				},(ret) => {
-					console.log(ret.resp_result)
-					this.HBarCode = ret.resp_result
-					this.getCode(this.HBarCode)
-				})
-			},
-			//鎵潯鐮佸鐞�
-			getCode(HBarCode){
-				if(!HBarCode){
-					this.playSound(0)
-					this.refreshBarCodeState()
-					uni.showToast({
-						title:'鏉$爜涓嶈兘涓虹┖',
-						icon:'none'
-					})
-				}else{
+
+            uni.setNavigationBarTitle({
+                title: BillTypeValueMap[this.baseInfo.HBillType]
+            })
+        },
+        methods: {
+            async refreshBarCodeState() {
+                this.HBarCodeFocus = false
+                await this.$nextTick(() => {
+                    this.HBarCodeFocus = true
+                    this.HBarCode = ""
+                })
+            },
+            playSound(e) {
+                const innerAudioContext = uni.createInnerAudioContext();
+                if (e == 1) {
+                    innerAudioContext.src = '/static/success.wav';
+                } else {
+                    innerAudioContext.src = '/static/jingbao.wav';
+                }
+                innerAudioContext.play(); // 鎾斁闊抽
+            },
+            //鎵爜
+            toScanCode() {
+                var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+                mpaasScanModule.mpaasScan({
+                    'hideAlbum': true,
+                    'timeoutInterval': '10', //瓒呮椂鏃堕棿
+                    'timeoutText': '鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋            
+                }, (ret) => {
+                    console.log(ret.resp_result)
+                    this.HBarCode = ret.resp_result
+                    this.getCode(this.HBarCode)
+                })
+            },
+            //鎵潯鐮佸鐞�
+            getCode(HBarCode) {
+                if (!HBarCode) {
+                    this.playSound(0)
+                    this.refreshBarCodeState()
+                    uni.showToast({
+                        title: '鏉$爜涓嶈兘涓虹┖',
+                        icon: 'none'
+                    })
+                } else {
                     let [HBarCodeBillNo] = HBarCode.split("@") //绗竴涓弬鏁拌〃绀哄崟鎹彿
                     let HBillType = this.baseInfo.HBillType
-					uni.request({
-					    url: this.serverUrl + '/Web/GetBillInfo', 
-						data: { HBillno: HBarCodeBillNo, HBillType: HBillType , HStockOrgID: uni.getStorageSync("OrganizationID") },
-					    success: (res) => {
-							console.log('鎵爜杩斿洖',res.data.data);
-							this.HBarCode = ''
-							if(res.data.count == 1){
-								this.playSound(1)
-								var data = res.data.data
-								this.baseInfo = {
-									HBillNo:data[0].鍗曟嵁鍙�,
-									HSupName:data[0].渚涘簲鍟�,
-									HDeptName:data[0].閮ㄩ棬,
-									HInterID:data[0].hmainid,
+                    uni.request({
+                        url: this.serverUrl + '/Web/GetBillInfo',
+                        data: {
+                            HBillno: HBarCodeBillNo,
+                            HBillType: HBillType,
+                            HStockOrgID: uni.getStorageSync("OrganizationID")
+                        },
+                        success: (res) => {
+                            console.log('鎵爜杩斿洖', res.data.data);
+                            this.HBarCode = ''
+                            if (res.data.count == 1) {
+                                this.playSound(1)
+                                var data = res.data.data
+                                this.baseInfo = {
+                                    HBillNo: data[0].鍗曟嵁鍙�,
+                                    HSupName: data[0].渚涘簲鍟�,
+                                    HDeptName: data[0].閮ㄩ棬,
+                                    HInterID: data[0].hmainid,
                                     HBillType: this.baseInfo.HBillType
-								}
-								this.listData = data
-							}else{
-								this.playSound(0)
-								this.refreshBarCodeState()
-								uni.showToast({
-									title:res.data.Message,
-									icon:'none'
-								})
-							}
-						},
-						fail: (res) => {
-							this.playSound(0)
-							this.refreshBarCodeState()
-							console.log(res);
-							uni.showToast({
-								title:'鎺ュ彛璇锋眰澶辫触',
-								icon:'none'
-							})
-						},
-					});
-				}			
-			},
-			toSon(item){
-				uni.navigateTo({
-					url:'./table_son?OperationType=1&closeType=1&linterid=' + item.hmainid + '&hsubid=' + item.hsubid
-				})
-			}
-	    }
-	}
+                                }
+                                this.listData = data
+                            } else {
+                                this.playSound(0)
+                                this.refreshBarCodeState()
+                                uni.showToast({
+                                    title: res.data.Message,
+                                    icon: 'none'
+                                })
+                            }
+                        },
+                        fail: (res) => {
+                            this.playSound(0)
+                            this.refreshBarCodeState()
+                            console.log(res);
+                            uni.showToast({
+                                title: '鎺ュ彛璇锋眰澶辫触',
+                                icon: 'none'
+                            })
+                        },
+                    });
+                }
+            },
+            toSon(item) {
+                uni.navigateTo({
+                    url: './table_son?OperationType=1&closeType=1&linterid=' + item.hmainid + '&hsubid=' + item
+                        .hsubid
+                })
+            }
+        }
+    }
 </script>
 
 <style lang="scss" scoped>
-	.form{
-		width: 640rpx;
-		margin: 20rpx auto;
-	}
-    .form-item{
-		display: flex;
-		align-items: center;
-		font-size: 28rpx;
-		padding: 6rpx 0;
-		.title{
-			width: 180rpx;
-			text{
-				color: red;
-				font-weight: bold;
-			}
-		}
-		.right{
-			width: 450rpx;
-			border-radius: 22rpx;
-			border: 1px solid #acacac;
-		}
-		.righton{
-			width: 450rpx;
-			border-radius: 22rpx;
-			border: 1px solid #e4e4e4;
-			background-color: #e4e4e4;
-		}
-		input{
-			width: 100%;
-			padding: 8rpx 20rpx;
-			font-size: 30rpx;
-		}
-	}
-	.buttons{
-		width: 100%;
-		display: flex;
-		justify-content: center;
-		margin-top: 20rpx;
-		button{
-			border-radius: 50rpx;
-			width: 180rpx;
-			height: 66rpx;
-			line-height: 66rpx;
-			font-size: 28rpx;
-		}
-		.btn-a{
-			background-color: #acacac;
-			color: #fff;
-		}
-		.btn-b{
-			background-color: #41a863;
-			color: #fff;
-		}
-		.btn-c{
-			background-color: #3a78ff;
-			color: #fff;
-		}
-	}
-	
-	.list{
-		width: 100%;
-		.card-detail{
-			width: 100%;
-			display: flex;
-			flex-wrap: wrap;
-			justify-content: space-between;
-			line-height: 120%;
-			.detail{
-				// width: 50%;
-				font-size: 26rpx;
-				margin-bottom: 12rpx;
-				color: #555;
-				margin-right: 20rpx;
-				text{
-					color: #999;
-					font-size: 26rpx;
-				}
-			}
-		}
-		.more{
-			color: #888;
-			font-size: 24rpx;
-			display: flex;
-			border-top: 1px solid #eee;
-			padding-top: 20rpx;
-			.part{
-				width: 50%;
-				text-align: center;
-			}
-		}
-	}
+    .form {
+        width: 640rpx;
+        margin: 20rpx auto;
+    }
 
-</style>
+    .form-item {
+        display: flex;
+        align-items: center;
+        font-size: 28rpx;
+        padding: 6rpx 0;
+
+        .title {
+            width: 180rpx;
+
+            text {
+                color: red;
+                font-weight: bold;
+            }
+        }
+
+        .right {
+            width: 450rpx;
+            border-radius: 22rpx;
+            border: 1px solid #acacac;
+        }
+
+        .righton {
+            width: 450rpx;
+            border-radius: 22rpx;
+            border: 1px solid #e4e4e4;
+            background-color: #e4e4e4;
+        }
+
+        input {
+            width: 100%;
+            padding: 8rpx 20rpx;
+            font-size: 30rpx;
+        }
+    }
+
+    .buttons {
+        width: 100%;
+        display: flex;
+        justify-content: center;
+        margin-top: 20rpx;
+
+        button {
+            border-radius: 50rpx;
+            width: 180rpx;
+            height: 66rpx;
+            line-height: 66rpx;
+            font-size: 28rpx;
+        }
+
+        .btn-a {
+            background-color: #acacac;
+            color: #fff;
+        }
+
+        .btn-b {
+            background-color: #41a863;
+            color: #fff;
+        }
+
+        .btn-c {
+            background-color: #3a78ff;
+            color: #fff;
+        }
+    }
+
+    .list {
+        width: 100%;
+
+        .card-detail {
+            width: 100%;
+            display: flex;
+            flex-wrap: wrap;
+            justify-content: space-between;
+            line-height: 120%;
+
+            .detail {
+                // width: 50%;
+                font-size: 26rpx;
+                margin-bottom: 12rpx;
+                color: #555;
+                margin-right: 20rpx;
+
+                text {
+                    color: #999;
+                    font-size: 26rpx;
+                }
+            }
+        }
+
+        .more {
+            color: #888;
+            font-size: 24rpx;
+            display: flex;
+            border-top: 1px solid #eee;
+            padding-top: 20rpx;
+
+            .part {
+                width: 50%;
+                text-align: center;
+            }
+        }
+    }
+</style>
\ No newline at end of file

--
Gitblit v1.9.1