1
chenhaozhe
2025-12-15 abd2e1dd7dfdf1ad50cce74c4e72edfd94fecf85
pages/caigouruku/POStockInBill.vue
@@ -437,7 +437,7 @@
                console.log('仓位码: ', e);
                let index = this.HStockPlaceNameList.findIndex(elem => elem['条码编号'] == e)
                console.log('index: ', index);
               // 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新
                // 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新
                this.hform.HStockPlaceID = 0
                this.hform.HStockPlaceName = ''
                await this.$nextTick()
@@ -663,35 +663,35 @@
                        })
                    },
                });
                uni.request({
                    url: this.serverUrl + '/Gy_StockPlace/list',
                    data: {
                        sWhere: "",
                        user: uni.getStorageSync('HUserName'),
                        Organization: uni.getStorageSync('Organization')
                    },
                    success: (res) => {
                        if (res.data.count == 1) {
                            this.HStockPlaceNameList = res.data.data
                            for (var i = 0; i < res.data.data.length; i++) {
                                this.arrayHStockPlaceName[i] = res.data.data[i].仓位名称
                            }
                        } else {
                            uni.showToast({
                                title: '仓位数据请求失败',
                                icon: 'none'
                            })
                        }
                    },
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title: '接口请求失败',
                            icon: 'none'
                        })
                    },
                });
                // 仓位的获取推迟到 选择仓库后 仓位大于1000条时,此方法获取补全
                // uni.request({
                //     url: this.serverUrl + '/Gy_StockPlace/list',
                //     data: {
                //         sWhere: "",
                //         user: uni.getStorageSync('HUserName'),
                //         Organization: uni.getStorageSync('Organization')
                //     },
                //     success: (res) => {
                //         if (res.data.count == 1) {
                //             this.HStockPlaceNameList = res.data.data
                //             for (var i = 0; i < res.data.data.length; i++) {
                //                 this.arrayHStockPlaceName[i] = res.data.data[i].仓位名称
                //             }
                //         } else {
                //             uni.showToast({
                //                 title: '仓位数据请求失败',
                //                 icon: 'none'
                //             })
                //         }
                //     },
                //     fail: (res) => {
                //         console.log(res);
                //         uni.showToast({
                //             title: '接口请求失败',
                //             icon: 'none'
                //         })
                //     },
                // });
                // this.getHYDList()
            },
@@ -784,6 +784,7 @@
                        if (this.HWHNameList[i]['启用仓位'] == 'Y') {
                            this.showHStockPlaceName = true
                            this.getStockPlaceRemote(this.HWHNameList[i]["HSPGroupID"])
                        } else {
                            this.hform.HStockPlaceName = ''
                            this.showHStockPlaceName = false
@@ -791,9 +792,40 @@
                    }
                }
            },
            // 获取仓位
            async getStockPlaceRemote(HSPGroupID) {
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: '/Gy_StockPlace/list',
                        data: {
                            sWhere: ` and HSPGroupID = ${HSPGroupID}`,
                            user: uni.getStorageSync('HUserName'),
                            Organization: uni.getStorageSync('Organization')
                        },
                    })
                    if (res.data.count == 1) {
                        this.HStockPlaceNameList = res.data.data
                        for (var i = 0; i < res.data.data.length; i++) {
                            this.arrayHStockPlaceName[i] = res.data.data[i].仓位名称
                        }
                    } else {
                        uni.showToast({
                            title: '仓位数据请求失败',
                            icon: 'none'
                        })
                    }
                } catch (err) {
                    uni.showToast({
                        title: '仓位数据请求失败',
                        icon: 'none'
                    })
                }
            },
            //选择仓位
            HStockPlaceNameChange(e) {
                console.log('e: ',e);
                console.log('e: ', e);
                let index = this.HStockPlaceNameList.findIndex(elem => elem['仓位名称'] == e)
                if (index != -1) {
@@ -1724,9 +1756,9 @@
                                    }
                                });
                            } else {
                                uni.showToast({
                                    title: res.data.Message,
                                    icon: 'none'
                                CommonUtils.showTips({
                                    title: '温馨提示',
                                    message: res.data.Message
                                })
                            }
                        } catch (err) {