From 8a7de013c1d5e0caeac59dedaeb404c5592733a1 Mon Sep 17 00:00:00 2001
From: qq_41295110 <qq_41295110@noreply.gitcode.com>
Date: 星期一, 16 三月 2026 09:56:05 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev

---
 pages/caigouruku/POStockInBill.vue |  200 +++++++++++++++++++++++++++++++++----------------
 1 files changed, 135 insertions(+), 65 deletions(-)

diff --git a/pages/caigouruku/POStockInBill.vue b/pages/caigouruku/POStockInBill.vue
index 2d9c6be..17a731c 100644
--- a/pages/caigouruku/POStockInBill.vue
+++ b/pages/caigouruku/POStockInBill.vue
@@ -2,7 +2,8 @@
     <view>
         <view class="form">
             <view class="form-item">
-                <view class="title">鏉$爜:</view>
+                <!-- <view class="title">鏉$爜:</view> -->
+                <view class="title">{{ $t(`Gy.HBarCode`) == "Gy.HBarCode"?"鏉$爜": $t(`Gy.HBarCode`) }}:</view>
                 <view class="right" style="width: 380rpx;">
                     <input :focus="barCodeFocus" v-model="hform.HBarCode" placeholder="璇锋壂鎻�(鎴栬緭鍏�)鏉$爜"
                         @confirm="getCode(hform.HBarCode)" />
@@ -12,39 +13,51 @@
                     size="20" @click="toScanCode"></uni-icons>
             </view>
             <view class="form-item">
-                <view class="title">鏁伴噺:</view>
+                <view class="title">{{ $t(`Gy.HQty`) == "Gy.HQty"?"鏁伴噺": $t(`Gy.HQty`) }}:</view>
                 <view class="right">
                     <input v-model="hform.HQty" placeholder="璇疯緭鍏ユ暟閲�" />
                 </view>
             </view>
             <view class="form-item">
-                <view class="title">浠撳簱:</view>
+                <view class="title">{{ $t(`Gy.HWHName`) == "Gy.HWHName"?"浠撳簱": $t(`Gy.HWHName`) }}:</view>
                 <view class="right">
-                    <uni-combox :candidates="arrayHWHName" placeholder="璇疯緭鍏�(鎴栨壂鎻�)浠撳簱" v-model="hform.HWHName"
-                        @input="HWHNameChange" @confirm="HWHNameScan"></uni-combox>
+                    <uni-combox :candidates="arrayHWHName" placeholder="璇烽�夋嫨浠撳簱" v-model="hform.HWHName"
+                        @input="HWHNameChange"></uni-combox>
                 </view>
             </view>
             <view class="form-item">
-                <view class="title">浠撲綅:</view>
-                <view class="right" v-show="showHStockPlaceName">
+                <view class="title">
+                    {{ $t(`Gy.HStockPlaceName`) == "Gy.HStockPlaceName"?"浠撲綅": $t(`Gy.HStockPlaceName`) }}:
+                </view>
+                <view class="right" v-show="true">
                     <uni-combox :candidates="arrayHStockPlaceNameComputed" placeholder="璇疯緭鍏�(鎴栨壂鎻�)浠撲綅"
                         v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"
                         @confirm="HStockPlaceNameScan"></uni-combox>
                 </view>
-                <view class="righton" v-show="!showHStockPlaceName"><input v-model="hform.HStockPlaceName"
-                        placeholder="涓嶅彲鎿嶄綔" :disabled="!showHStockPlaceName" /></view>
+                <view class="righton" v-show="false"><input v-model="hform.HStockPlaceName" placeholder="涓嶅彲鎿嶄綔"
+                        :disabled="!showHStockPlaceName" /></view>
             </view>
 
             <view class="tabs">
-                <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">閫夋嫨婧愬崟</view>
-                <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">琛ㄥご淇℃伅</view>
-                <view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">鐗╂枡淇℃伅</view>
-                <view :class="tabs == 3 ? 'on':''" @tap="tabs = 3">鏉$爜淇℃伅</view>
+                <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">
+                    {{ $t(`Gy.SourceBillSelect`) == "Gy.SourceBillSelect"?"閫夋嫨婧愬崟": $t(`Gy.SourceBillSelect`) }}
+                </view>
+                <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">
+                    {{ $t(`Gy.TableHeaderInfo`) == "Gy.TableHeaderInfo"?"琛ㄥご淇℃伅": $t(`Gy.TableHeaderInfo`) }}
+                </view>
+                <view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">
+                    {{ $t(`Gy.MaterInfo`) == "Gy.MaterInfo"?"鐗╂枡淇℃伅": $t(`Gy.MaterInfo`) }}
+                </view>
+                <view :class="tabs == 3 ? 'on':''" @tap="tabs = 3">
+                    {{ $t(`Gy.BarCodeInfo`) == "Gy.BarCodeInfo"?"鏉$爜淇℃伅": $t(`Gy.BarCodeInfo`) }}
+                </view>
             </view>
 
             <view v-if="tabs == 0">
                 <view class="form-item">
-                    <view class="title">婧愬崟绫诲瀷:</view>
+                    <view class="title">
+                        {{ $t(`Gy.HMainSourceBillType`) == "Gy.HMainSourceBillType"?"婧愬崟绫诲瀷": $t(`Gy.HMainSourceBillType`) }}:
+                    </view>
                     <view class="right" v-show="showHMainSourceBillType">
                         <picker :range="arrayHMainSourceBillType" v-model="HMainSourceBillType"
                             @change="HMainSourceBillTypeChange">
@@ -59,7 +72,9 @@
                     </view>
                 </view>
                 <view class="form-item">
-                    <view class="title">婧愬崟鍗曞彿:</view>
+                    <view class="title">
+                        {{$t(`Gy.HMainSourceBillNo`) == "Gy.HMainSourceBillNo"?"婧愬崟鍗曞彿": $t(`Gy.HMainSourceBillNo`) }}:
+                    </view>
                     <view class="right" v-show="showHSourceBillNo">
                         <!-- <uni-combox v-if="reHSourceBillNo" :candidates="arrayHSourceBillNo" placeholder="璇疯緭鍏ユ簮鍗曞崟鍙�"
 							v-model="hform.HSourceBillNo" @input="HSourceBillNoChange"></uni-combox> -->
@@ -68,8 +83,12 @@
 
                     </view>
                     <view class="icon-wrapper" v-show="showHSourceBillNo" :disabled="hform.HMainSourceBillType === -1">
+                        <uni-icons type="scan" size="20" @click="toScanBillCode"></uni-icons>
+                    </view>
+                    <view class="icon-wrapper" v-show="showHSourceBillNo" :disabled="hform.HMainSourceBillType === -1">
                         <uni-icons type="search" size="20" @click="showBillList"></uni-icons>
                     </view>
+
 
                     <view class="righton" v-show="!showHSourceBillNo">
                         <input name="HSourceBillNo" disabled v-model="hform.HSourceBillNo" placeholder="璇疯緭鍏ユ簮鍗曞崟鍙�" />
@@ -85,7 +104,7 @@
 					</view> -->
                 </view>
                 <view class="form-item">
-                    <view class="title">鏃ユ湡:</view>
+                    <view class="title">{{ $t(`Gy.HDate`) == "Gy.HDate"?"鏃ユ湡": $t(`Gy.HDate`) }}:</view>
                     <view class="right">
                         <picker mode="date" v-model="hform.HDate" @change="HDateChange">
                             <input disabled v-model="hform.HDate" placeholder="璇烽�夋嫨鏃ユ湡" />
@@ -94,13 +113,13 @@
                     </view>
                 </view>
                 <view class="form-item">
-                    <view class="title">鍒跺崟浜�:</view>
+                    <view class="title">{{ $t(`Gy.HMaker`) == "Gy.HMaker"?"鍒跺崟浜�": $t(`Gy.HMaker`) }}:</view>
                     <view class="righton">
                         <input name="HMaker" disabled v-model="hform.HMaker" />
                     </view>
                 </view>
                 <view class="form-item">
-                    <view class="title">鍗曟嵁鍙�:</view>
+                    <view class="title">{{ $t(`Gy.HBillNo`) == "Gy.HBillNo"?"鍗曟嵁鍙�": $t(`Gy.HBillNo`) }}:</view>
                     <view class="righton">
                         <input name="HBillNo" disabled v-model="hform.HBillNo" />
                     </view>
@@ -158,7 +177,12 @@
 
             <view v-if="tabs == 2">
                 <view class="list" v-for="(item,index) in Materlist" :key="index">
-                    <uni-card :title="item.鐗╂枡鍚嶇О" :extra="item.鐗╂枡浠g爜" style="margin: 10px;" @tap="delMater(item)">
+                    <uni-card :title="item.鐗╂枡鍚嶇О" style="margin: 10px;" @tap="delMater(item, $event)">
+                        <!-- 鐗╂枡浠g爜浣滀负鍙偣鍑婚摼鎺� -->
+                        <view class="card-header" @tap.stop="gotoInventoryQuery(item.鐗╂枡浠g爜)">
+                            <text class="link-text">鐗╂枡浠g爜锛歿{item.鐗╂枡浠g爜}}</text>
+                        </view>
+
                         <view class="card-detail">
                             <view class="detail">
                                 <text>婧愬崟鍗曞彿锛�</text>{{item.婧愬崟鍗曞彿}}
@@ -187,8 +211,7 @@
                             <view class="detail" v-if="item.鍗曚环">
                                 <text>鍗曚环锛�</text>{{item.鍗曚环}}
                             </view>
-                            <view class="detail" v-if="materMeta[0].HWHName && /鍏磋揪/.test(hform.HStockOrgName
-                            )">
+                            <view class="detail" v-if="materMeta[0].HWHName && /鍏磋揪/.test(hform.HStockOrgName)">
                                 <text>浠撳簱锛�</text>{{materMeta[0].HWHName}}
                             </view>
                         </view>
@@ -279,6 +302,7 @@
     } from "@/utils/userRelationManager.js"
     import BillListPopupVue from '../../components/BillListPopup/BillListPopup.vue';
     import BarCodePopupVue from "../../components/BarCodePopup/BarCodePopup.vue";
+import { MpaasScan } from '../../utils/mpaasScan';
     export default {
         data() {
             return {
@@ -348,11 +372,11 @@
                     HBillNo: '',
                     HInterID: '',
 
-                    HKeeperName: getUserInfo().HKeeper,
+                    HKeeperName: getUserInfo().HKeeperName,
                     HKeeperID: getUserInfo().HKeeperID,
-                    HSecManagerName: getUserInfo().HSecManager,
+                    HSecManagerName: getUserInfo().HSecManagerName,
                     HSecManagerID: getUserInfo().HSecManagerID,
-                    HDeptName: getUserInfo().HDept,
+                    HDeptName: getUserInfo().HDeptName,
                     HDeptID: getUserInfo().HDeptID,
                     HSupName: '',
                     HSupID: '',
@@ -419,7 +443,13 @@
             uni.$off('BillSelectComplete')
         },
         methods: {
+            toScanBillCode() {
+                MpaasScan.scanCode((res) => {
+                    this.getHBarCodeData(res)
+                })
+            },
             async HWHNameScan(e) {
+                return
                 // 鎵弿浠撳簱鐮�
                 console.log('浠撳簱鐮�: ', e);
                 let index = this.HWHNameList.findIndex(elem => elem['鏉$爜缂栧彿'] == e)
@@ -434,20 +464,38 @@
             },
             async HStockPlaceNameScan(e) {
                 // 鎵弿浠撲綅鐮�
-                console.log('浠撲綅鐮�: ', e);
-                let index = this.HStockPlaceNameList.findIndex(elem => elem['鏉$爜缂栧彿'] == e)
-                console.log('index: ', index);
+                console.log('Code: ', e);
                 // 涓嶅厛缃┖鐨勮瘽锛屾暟鎹啀娆℃壂鎻忕浉鍚岀殑浠撲綅鐮� 涓嶄細瑙﹀彂缁勪欢鍐呯殑鍒锋柊
                 this.hform.HStockPlaceID = 0
                 this.hform.HStockPlaceName = ''
-                await this.$nextTick()
-                if (index == -1) {
-                    uni.showToast({
-                        icon: 'none',
-                        title: '鎵弿浠撲綅鏉$爜瀵瑰簲鐨勪粨浣嶄笉瀛樺湪...'
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: '/Gy_StockPlace/list',
+                        data: {
+                            sWhere: ` and 鏉$爜缂栧彿 = '${e}'`,
+                            user: uni.getStorageSync('HUserName'),
+                            Organization: uni.getStorageSync('Organization')
+                        },
                     })
-                } else {
-                    this.HStockPlaceNameChange(this.HStockPlaceNameList[index]['浠撲綅鍚嶇О'])
+
+                    if (res.data.count == 1) {
+
+                        this.hform.HStockPlaceID = res.data.data[0].HMainID
+                        this.hform.HStockPlaceName = res.data.data[0].浠撲綅鍚嶇О
+                        this.hform.HWHID = res.data.data[0].HWHID
+                        this.hform.HWHName = res.data.data[0].鎵�灞炰粨搴�
+                    } else {
+                        uni.showToast({
+                            title: '浠撲綅鏁版嵁璇锋眰澶辫触',
+                            icon: 'none'
+                        })
+                    }
+
+                } catch (err) {
+                    uni.showToast({
+                        title: '浠撲綅鏁版嵁璇锋眰澶辫触',
+                        icon: 'none'
+                    })
                 }
             },
             async qrCodeDisplay() {
@@ -499,15 +547,7 @@
                     this.hform.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")
@@ -607,7 +647,7 @@
             },
             async onSourceBillBlurHandler() {
                 if (this.hform.HMainSourceBillType == -1) {
-                    this.playSound(1)
+                    CommonUtils.playSound(1)
                     this.barCodeFocus = true
                     return
                 }
@@ -648,6 +688,7 @@
                             for (var i = 0; i < res.data.data.length; i++) {
                                 this.arrayHWHName[i] = res.data.data[i].浠撳簱鍚嶇О
                             }
+                            this.HWHNameChange(getUserInfo()["HWhName"])
                         } else {
                             uni.showToast({
                                 title: '浠撳簱鏁版嵁璇锋眰澶辫触',
@@ -781,13 +822,11 @@
                     if (this.HWHNameList[i].浠撳簱鍚嶇О == e) {
                         this.hform.HWHName = this.HWHNameList[i].浠撳簱鍚嶇О
                         this.hform.HWHID = this.HWHNameList[i].HItemID
-
+                        this.HStockPlaceNameChange(null)
+                        this.showHStockPlaceName = false
                         if (this.HWHNameList[i]['鍚敤浠撲綅'] == 'Y') {
                             this.showHStockPlaceName = true
                             this.getStockPlaceRemote(this.HWHNameList[i]["HSPGroupID"])
-                        } else {
-                            this.hform.HStockPlaceName = ''
-                            this.showHStockPlaceName = false
                         }
                     }
                 }
@@ -955,7 +994,8 @@
                     url: this.serverUrl + '/Web/GetEmployeeList_Json',
                     data: {
                         Employee: '',
-                        HGroupID: 0
+                        HGroupID: 0,
+                        HDeptID: uni.getStorageSync("HDeptID")
                     },
                     success: (res) => {
                         if (res.data.count == 1) {
@@ -1030,12 +1070,12 @@
                             this.tabs = 2
                             this.showHSupName = false
                             this.barCodeFocus = true
-                            this.playSound(1)
+                            CommonUtils.playSound(1)
                             this.DisBillEntryList()
                         } else {
                             console.log('res.data.Message: ', res.data.Message);
                             this.refreshHSourceBillState()
-                            this.playSound(0)
+                            CommonUtils.playSound(0)
                             uni.showToast({
                                 title: res.data.Message,
                                 icon: 'none'
@@ -1044,7 +1084,7 @@
                     },
                     fail: (res) => {
                         this.refreshHSourceBillState()
-                        this.playSound(0)
+                        CommonUtils.playSound(0)
                         console.log(res);
                         uni.showToast({
                             title: '鎺ュ彛璇锋眰澶辫触',
@@ -1075,7 +1115,7 @@
                 console.log(this.hform.HSourceBillNo, HSourceFlag)
                 if (HDeleteFlag == "*") {
                     if (sBarCode == "") {
-                        this.playSound(0)
+                        CommonUtils.playSound(0)
                         this.refreshBarCodeState()
                         uni.showToast({
                             title: '璇疯緭鍏ヨ鍒犻櫎鐨勬潯鐮�',
@@ -1099,11 +1139,11 @@
                             console.log('鍒犻櫎鏉$爜', res.data);
                             this.hform.HBarCode = ''
                             if (res.data.count == 1) {
-                                this.playSound(1)
+                                CommonUtils.playSound(1)
                                 this.hform.HQty = ''
                                 this.DisBillEntryList()
                             } else {
-                                this.playSound(0)
+                                CommonUtils.playSound(0)
                                 this.refreshBarCodeState()
                                 uni.showToast({
                                     title: res.data.Message,
@@ -1112,7 +1152,7 @@
                             }
                         } catch (err) {
                             this.refreshBarCodeState()
-                            this.playSound(0)
+                            CommonUtils.playSound(0)
                             uni.showToast({
                                 title: '鎺ュ彛璇锋眰澶辫触: ' + err,
                                 icon: 'none'
@@ -1132,11 +1172,11 @@
                         //         console.log('鍒犻櫎鏉$爜', res.data);
                         //         this.hform.HBarCode = ''
                         //         if (res.data.count == 1) {
-                        //             this.playSound(1)
+                        //             CommonUtils.playSound(1)
                         //             this.hform.HQty = ''
                         //             this.DisBillEntryList()
                         //         } else {
-                        //             this.playSound(0)
+                        //             CommonUtils.playSound(0)
                         //             this.refreshBarCodeState()
                         //             uni.showToast({
                         //                 title: res.data.Message,
@@ -1147,7 +1187,7 @@
                         //     fail: (res) => {
                         //         console.log(res);
                         //         this.refreshBarCodeState()
-                        //         this.playSound(0)
+                        //         CommonUtils.playSound(0)
                         //         uni.showToast({
                         //             title: '鎺ュ彛璇锋眰澶辫触',
                         //             icon: 'none'
@@ -1191,7 +1231,7 @@
                         console.log('鎵爜杩斿洖', res.data);
                         this.hform.HBarCode = ''
                         if (res.data.count == 1) {
-                            this.playSound(1)
+                            CommonUtils.playSound(1)
                             var data = res.data.data
                             if (data.hBarTypeField == '浠撳簱鏉$爜') {
                                 this.hform.HWHName = data.hWhNameField
@@ -1297,7 +1337,7 @@
                             //鍏夋爣瀵瑰噯鏉$爜
                             this.refreshBarCodeState()
                         } else {
-                            this.playSound(0)
+                            CommonUtils.playSound(0)
                             this.refreshBarCodeState()
                             uni.showToast({
                                 title: res.data.Message,
@@ -1306,7 +1346,7 @@
                         }
 
                     } catch (err) {
-                        this.playSound(0)
+                        CommonUtils.playSound(0)
                         this.refreshBarCodeState()
                         console.log(res);
                         uni.showToast({
@@ -1339,7 +1379,7 @@
                     //         console.log('鎵爜杩斿洖', res.data);
                     //         this.hform.HBarCode = ''
                     //         if (res.data.count == 1) {
-                    //             this.playSound(1)
+                    //             CommonUtils.playSound(1)
                     //             var data = res.data.data
                     //             if (data.hBarTypeField == '浠撳簱鏉$爜') {
                     //                 this.hform.HWHName = data.hWhNameField
@@ -1448,7 +1488,7 @@
                     //             //鍏夋爣瀵瑰噯鏉$爜
                     //             this.refreshBarCodeState()
                     //         } else {
-                    //             this.playSound(0)
+                    //             CommonUtils.playSound(0)
                     //             this.refreshBarCodeState()
                     //             uni.showToast({
                     //                 title: res.data.Message,
@@ -1457,7 +1497,7 @@
                     //         }
                     //     },
                     //     fail: (res) => {
-                    //         this.playSound(0)
+                    //         CommonUtils.playSound(0)
                     //         this.refreshBarCodeState()
                     //         console.log(res);
                     //         uni.showToast({
@@ -1527,7 +1567,30 @@
                     },
                 });
             },
+            gotoInventoryQuery(HMaterNumber) {
+                console.log('璺宠浆鍒板簱瀛樻煡璇紝鐗╂枡浠g爜锛�', HMaterNumber);
+
+                // 浣跨敤uni.navigateTo璺宠浆鍒版柊椤甸潰
+                uni.navigateTo({
+                    url: `/pages/jishikucunchaxun/table?OperationType=2&HMaterNumber=${HMaterNumber}`,
+                    success: (res) => {
+                        console.log('璺宠浆鎴愬姛');
+                    },
+                    fail: (err) => {
+                        console.error('璺宠浆澶辫触锛�', err);
+                        // 濡傛灉椤甸潰涓嶅瓨鍦紝鍙互璺宠浆鍒伴粯璁ら〉闈�
+                        uni.showToast({
+                            title: '鍔熻兘姝e湪寮�鍙戜腑',
+                            icon: 'none'
+                        });
+                    }
+                });
+            },
             delMater(item) {
+                if (event && event.target.classList && event.target.classList.contains('link-text')) {
+                    return; // 濡傛灉鏄摼鎺ョ偣鍑伙紝涓嶆墽琛屽垹闄�
+                }
+
                 uni.showModal({
                     title: '鎻愮ず',
                     content: '纭瑕佸垹闄� "' + item.鐗╂枡鍚嶇О + '" 鎵�鏈夋壂鐮佽褰曪紵鍒犻櫎鍚庡皢涓嶅彲鎭㈠锛�',
@@ -2006,6 +2069,12 @@
         }
     }
 
+    /* 娣诲姞閾炬帴鏍峰紡 */
+    .link-text {
+        color: #3a78ff;
+        /* 钃濊壊锛岀被浼艰秴閾炬帴 */
+    }
+
     .list {
         width: 100%;
 
@@ -2027,6 +2096,7 @@
                     color: #999;
                     font-size: 26rpx;
                 }
+
             }
         }
 

--
Gitblit v1.9.1