From 3166a182d97e9a3b2bf9fcd2309fb01736728de5 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期三, 28 一月 2026 09:34:15 +0800
Subject: [PATCH] 解决 生产入库单 因 异步问题导致的 源单类型不一致问题
---
pages/shengchanrukushengdan/Kf_ProductInBill.vue | 96 ++++++++++++++++++++++++++----------------------
pages/ZLGL/shoujianjianyan/firstCheckBill.vue | 2 +
2 files changed, 54 insertions(+), 44 deletions(-)
diff --git a/pages/ZLGL/shoujianjianyan/firstCheckBill.vue b/pages/ZLGL/shoujianjianyan/firstCheckBill.vue
index d94b470..4d4ca63 100644
--- a/pages/ZLGL/shoujianjianyan/firstCheckBill.vue
+++ b/pages/ZLGL/shoujianjianyan/firstCheckBill.vue
@@ -2072,6 +2072,8 @@
data
} = res.data;
if (count == 1) {
+ // 鍒ゆ柇鏄惁鑷姩瀹℃牳
+
uni.showModal({
title: "鎻愮ず",
content: res.data.Message + "銆傛槸鍚︾户缁柊澧烇紵",
diff --git a/pages/shengchanrukushengdan/Kf_ProductInBill.vue b/pages/shengchanrukushengdan/Kf_ProductInBill.vue
index f98d15e..c3936aa 100644
--- a/pages/shengchanrukushengdan/Kf_ProductInBill.vue
+++ b/pages/shengchanrukushengdan/Kf_ProductInBill.vue
@@ -32,7 +32,7 @@
v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"
@confirm="HStockPlaceNameScan"></uni-combox>
</view>
-<!-- <view class="righton" v-show="!showHStockPlaceName">
+ <!-- <view class="righton" v-show="!showHStockPlaceName">
<input v-model="hform.HStockPlaceName" :disabled="!showHStockPlaceName" placeholder="涓嶅彲鎿嶄綔" />
</view> -->
</view>
@@ -353,7 +353,7 @@
HRedBlueFlag: false,
HBarCode: '',
- HQty: '',
+ HQty: '', // 鏁伴噺
HWHName: getUserInfo().HWHName,
HWHID: getUserInfo().HWhID,
HStockPlaceName: getUserInfo().HSPName,
@@ -420,9 +420,11 @@
}
}
},
- onLoad(e) {
+ async onLoad(e) {
console.log(e, this.userInfo)
this.OperationType = e.OperationType
+ await this.GetSourceBillType()
+
if (e.HInterID) {
this.HInterID_Temp = e.HInterID
// this.btnType = 1
@@ -437,7 +439,6 @@
this.getHEmpList()
this.getHDeptList()
- this.GetSourceBillType()
this.getRelationStore()
uni.$on('BillSelectComplete', (e) => {
@@ -479,9 +480,9 @@
Organization: uni.getStorageSync('Organization')
},
})
-
+
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
@@ -492,7 +493,7 @@
icon: 'none'
})
}
-
+
} catch (err) {
uni.showToast({
title: '浠撲綅鏁版嵁璇锋眰澶辫触',
@@ -730,41 +731,46 @@
},
// 閫氳繃鍗曟嵁绫诲瀷鑾峰彇婧愬崟绫诲瀷
async GetSourceBillType() {
- CommonUtils.doRequest2({
- url: '/Web/GetHSourceBillTypeByBillType',
- data: {
- HBillType: this.hform.HBillType,
- Num: 2
- },
- resFunction: (res) => {
- let {
- data,
- count,
- Message
- } = res.data
- if (count == 1) {
- console.log('data: ', data);
- this.arrayHMainSourceBillType = []
- this.arrayHMainSourceBillValue = []
- Array.from(data).forEach(e => {
- this.arrayHMainSourceBillType.push(e['HSourceBillTypeName'])
- this.arrayHMainSourceBillValue.push(e['HSourceBillType'])
- })
-
- this.arrayHMainSourceBillType.push('鎵嬪伐褰曞叆')
- this.arrayHMainSourceBillValue.push('-1')
-
- this.HMainSourceBillType = this.arrayHMainSourceBillType[0]
- this.hform.HMainSourceBillType = this.arrayHMainSourceBillValue[0]
- } else {
- uni.showToast({
- icon: 'none',
- title: Message
- })
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: '/Web/GetHSourceBillTypeByBillType',
+ data: {
+ HBillType: this.hform.HBillType,
+ Num: 2
}
- }
+ })
- })
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ console.log('data: ', data);
+ this.arrayHMainSourceBillType = []
+ this.arrayHMainSourceBillValue = []
+ Array.from(data).forEach(e => {
+ this.arrayHMainSourceBillType.push(e['HSourceBillTypeName'])
+ this.arrayHMainSourceBillValue.push(e['HSourceBillType'])
+ })
+
+ this.arrayHMainSourceBillType.push('鎵嬪伐褰曞叆')
+ this.arrayHMainSourceBillValue.push('-1')
+
+ this.HMainSourceBillType = this.arrayHMainSourceBillType[0]
+ this.hform.HMainSourceBillType = this.arrayHMainSourceBillValue[0]
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: Message
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: err
+ })
+ }
},
//婧愬崟璧勬枡
getHYDList() {
@@ -816,11 +822,11 @@
if (this.HWHNameList[i]['鍚敤浠撲綅'] == 'Y') {
this.showHStockPlaceName = true
this.getStockPlaceRemote(this.HWHNameList[i]["HSPGroupID"])
- }
+ }
}
}
},
- async getStockPlaceRemote(HSPGroupID){
+ async getStockPlaceRemote(HSPGroupID) {
try {
let res = await CommonUtils.doRequest2Async({
url: '/Gy_StockPlace/list',
@@ -830,7 +836,7 @@
Organization: uni.getStorageSync('Organization')
},
})
-
+
if (res.data.count == 1) {
this.HStockPlaceNameList = res.data.data
for (var i = 0; i < res.data.data.length; i++) {
@@ -842,7 +848,7 @@
icon: 'none'
})
}
-
+
} catch (err) {
uni.showToast({
title: '浠撲綅鏁版嵁璇锋眰澶辫触',
@@ -1627,6 +1633,7 @@
},
//淇敼鍥炲~鏁版嵁
RoadBillMain(HInterID) {
+ console.log('HInterID: ', HInterID);
uni.request({
url: this.serverUrl + '/WEBSController/GetSourceBill_Temp_Json',
data: {
@@ -1637,6 +1644,7 @@
console.log(33, res.data.data[0]);
if (res.data.count == 1) {
var data = res.data.data[0]
+ console.log('data: ', data);
this.hform.HInterID = data.HInterID
this.hform.HBillNo = data.HBillNo
this.hform.HMainSourceBillType = data.HSourceBillType
--
Gitblit v1.9.1