From 915f8e7cdc6996949794163083746ac4bdb59052 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期六, 11 十月 2025 16:59:49 +0800
Subject: [PATCH] 修改 部分 校验单据 异步请求为同步请求+锁
---
pages/shengchanruku/form.vue | 731 ++++++--
pages/qitachukujiaoyan/detail.vue | 706 +++++--
pages/qitarukujiaoyan/form.vue | 2144 ++++++++++++++----------
pages/index/tab2.vue | 2
pages/shengchanbuliaojiaoyan/form.vue | 710 +++++--
pages/shengchandiaobo/form.vue | 717 +++++--
pages/index/index.vue | 13
pages/shengchanlingliao/form.vue | 26
8 files changed, 3,221 insertions(+), 1,828 deletions(-)
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 732476a..14befda 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -239,6 +239,12 @@
id: 26,
hidden: false,
},
+ {
+ img: '../../static/icon/icon16.png',
+ text: '鍏朵粬鍏ュ簱鏍¢獙',
+ url: '/pages/qitarukujiaoyan/table',
+ id: 27,
+ },
],
// itemData: [{
@@ -451,12 +457,7 @@
// url: '/pages/caigourukujiaoyan/table',
// id: 35,
// },
- // {
- // img: '../../static/icon/icon16.png',
- // text: '鍏朵粬鍏ュ簱鏍¢獙',
- // url: '/pages/qitarukujiaoyan/table',
- // id: 36,
- // },
+
// {
// img: '../../static/icon/icon16.png',
// text: '濮斿琛ユ枡鏍¢獙',
diff --git a/pages/index/tab2.vue b/pages/index/tab2.vue
index ad9cd80..917ed45 100644
--- a/pages/index/tab2.vue
+++ b/pages/index/tab2.vue
@@ -246,7 +246,7 @@
hidden: false,
},{
img: '../../static/icon/icon8.png',
- text: '缁勮劚鍗曟殏瀛樺垪琛�',
+ text: '缁勬墭鍗曟殏瀛樺垪琛�',
url: `/pages/zutuosaoma/table`,
id: 34,
hidden: false,
diff --git a/pages/qitachukujiaoyan/detail.vue b/pages/qitachukujiaoyan/detail.vue
index 50a63a3..363ff84 100644
--- a/pages/qitachukujiaoyan/detail.vue
+++ b/pages/qitachukujiaoyan/detail.vue
@@ -309,52 +309,104 @@
})
},
//鎵弿鍗曟嵁鍙锋潯鐮�
- GetMeesageByBillNo(e) {
- uni.request({
- url: this.serverUrl + '/WEBSController/get_BillBarCode_BillCheck_Json',
- data: {
- HBillNo: this.hform.HBillNo,
- HBillType: this.hform.HBillType,
- HMaker: this.hform.HMaker,
- HStockOrgID: this.hform.HStockOrgID
- },
- success: (res) => {
- if (res.data.count == 1) {
- CommonUtils.playSound(1);
- var data = res.data.data
- console.log('鍗曟嵁淇℃伅: ', data)
- this.hform.HInterID = data.hInterIDField
- this.hform.HBillNo = data.hBillNoField
- this.showHBillNo = false
- //鏉$爜鏍稿鏍囪
- if (data.hSourceBarCodeFlagField) {
- this.hform.HSourceBarCodeCtl = "Y"
- this.hform.chkHBarflag = true
- this.hform.HBarflag = data
- }
- this.tabs = 2
- this.barCodeFocus = true
- this.DisBillEntryList();
- } else {
- CommonUtils.playSound(0);
- this.refreshHBillState()
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
- this.hform.HBillNo = ''
+ async GetMeesageByBillNo(e) {
+
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/WEBSController/get_BillBarCode_BillCheck_Json',
+ data: {
+ HBillNo: this.hform.HBillNo,
+ HBillType: this.hform.HBillType,
+ HMaker: this.hform.HMaker,
+ HStockOrgID: this.hform.HStockOrgID
+ },
+ })
+ if (!res) {
+ // 瑙﹀彂璇锋眰閿侊紝涓嶈繑鍥炰换浣曞��
+ return
+ }
+ let {
+ data,
+ Message,
+ count
+ } = res.data
+ if (count == 1) {
+ CommonUtils.playSound(1)
+ console.log(data)
+ this.hform.HInterID = data.hInterIDField
+ this.hform.HBillNo = data.hBillNoField
+ this.showHBillNo = false
+ //鏉$爜鏍稿鏍囪
+ if (data.hSourceBarCodeFlagField) {
+ this.hform.HSourceBarCodeCtl = "Y"
+ this.hform.chkHBarflag = true
+ this.hform.HBarflag = data
}
- },
- fail: (res) => {
- CommonUtils.playSound(0);
+ this.tabs = 2
+ this.DisBillEntryList();
+ this.refreshBarCodeState()
+ } else {
+ CommonUtils.playSound(0)
this.refreshHBillState()
- console.log(res);
uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
+ title: Message,
icon: 'none'
})
- },
- });
+ this.hform.HBillNo = ''
+ }
+ } catch (e) {
+ CommonUtils.playSound(0)
+ this.refreshHBillState()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触: ' + e,
+ icon: 'none'
+ })
+ }
+ // uni.request({
+ // url: this.serverUrl + '/WEBSController/get_BillBarCode_BillCheck_Json',
+ // data: {
+ // HBillNo: this.hform.HBillNo,
+ // HBillType: this.hform.HBillType,
+ // HMaker: this.hform.HMaker,
+ // HStockOrgID: this.hform.HStockOrgID
+ // },
+ // success: (res) => {
+ // if (res.data.count == 1) {
+ // CommonUtils.playSound(1);
+ // var data = res.data.data
+ // console.log('鍗曟嵁淇℃伅: ', data)
+ // this.hform.HInterID = data.hInterIDField
+ // this.hform.HBillNo = data.hBillNoField
+ // this.showHBillNo = false
+ // //鏉$爜鏍稿鏍囪
+ // if (data.hSourceBarCodeFlagField) {
+ // this.hform.HSourceBarCodeCtl = "Y"
+ // this.hform.chkHBarflag = true
+ // this.hform.HBarflag = data
+ // }
+ // this.tabs = 2
+ // this.barCodeFocus = true
+ // this.DisBillEntryList();
+ // } else {
+ // CommonUtils.playSound(0);
+ // this.refreshHBillState()
+ // uni.showToast({
+ // title: res.data.Message,
+ // icon: 'none'
+ // })
+ // this.hform.HBillNo = ''
+ // }
+ // },
+ // fail: (res) => {
+ // CommonUtils.playSound(0);
+ // this.refreshHBillState()
+ // console.log(res);
+ // uni.showToast({
+ // title: '鎺ュ彛璇锋眰澶辫触',
+ // icon: 'none'
+ // })
+ // },
+ // });
},
//鍩虹浠撳簱璧勬枡
getHBaseList() {
@@ -442,7 +494,7 @@
}
}
},
- getCode(HBarCode) {
+ async getCode(HBarCode) {
//浠撳簱銆佷粨浣嶆枃鏈涓虹┖鏃讹紝娓呯┖瀵瑰簲ID
if (!this.hform.HWHName) {
this.hform.HWHID = 0
@@ -468,102 +520,172 @@
icon: 'none'
})
} else {
- uni.request({
- url: this.serverUrl +
- '/WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json',
- data: {
- HInterID: this.hform.HInterID,
- HBillType: this.hform.HBillType,
- HBarCode: sBarCode
- },
- success: (res) => {
- CommonUtils.playSound(1);
- console.log('鍒犻櫎鏉$爜', res.data);
- this.hform.HBarCode = ''
- if (res.data.count == 1) {
- this.hform.HQty = ''
- this.DisBillEntryList()
- CommonUtils.playSound(1)
- } else {
- CommonUtils.playSound(0)
- this.refreshBarCodeState()
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- CommonUtils.playSound(0);
- this.refreshBarCodeState()
- console.log(res);
+
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json',
+ data: {
+ HInterID: this.hform.HInterID,
+ HBillType: this.hform.HBillType,
+ HBarCode: sBarCode
+ },
+ })
+ if (!res) {
+ // 璇锋眰琚攣瀹氾紝閫�鍑哄綋鍓嶈姹�
+ return
+ }
+ console.log('鍒犻櫎鏉$爜', res.data);
+ this.hform.HBarCode = ''
+ if (res.data.count == 1) {
+ this.hform.HQty = ''
+ this.DisBillEntryList()
+ } else {
uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
+ title: res.data.Message,
icon: 'none'
})
- },
- });
+ }
+ } catch (e) {
+ CommonUtils.playSound(0)
+ this.refreshBarCodeState()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触: ' + e,
+ icon: 'none'
+ })
+ }
+
+ // uni.request({
+ // url: this.serverUrl +
+ // '/WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json',
+ // data: {
+ // HInterID: this.hform.HInterID,
+ // HBillType: this.hform.HBillType,
+ // HBarCode: sBarCode
+ // },
+ // success: (res) => {
+ // CommonUtils.playSound(1);
+ // console.log('鍒犻櫎鏉$爜', res.data);
+ // this.hform.HBarCode = ''
+ // if (res.data.count == 1) {
+ // this.hform.HQty = ''
+ // this.DisBillEntryList()
+ // CommonUtils.playSound(1)
+ // } else {
+ // CommonUtils.playSound(0)
+ // this.refreshBarCodeState()
+ // uni.showToast({
+ // title: res.data.Message,
+ // icon: 'none'
+ // })
+ // }
+ // },
+ // fail: (res) => {
+ // CommonUtils.playSound(0);
+ // this.refreshBarCodeState()
+ // console.log(res);
+ // uni.showToast({
+ // title: '鎺ュ彛璇锋眰澶辫触',
+ // icon: 'none'
+ // })
+ // },
+ // });
}
} else {
var sBarCode = this.hform.HBarCode
if (sHQty == "") {
sHQty = 0;
}
- uni.request({
- url: this.serverUrl + '/WEBSController/get_CheckTypeByBarCode_BillCheck_Json',
- data: {
- sBarCode: sBarCode,
- HBillID: this.hform.HInterID || 0,
- HBillType: this.hform.HBillType,
- HBillNo: this.hform.HBillNo,
- HMaker: this.hform.HMaker,
- HWhID: sHWHID,
- HSPID: sHSPID,
- HQty: sHQty,
- // HRedBlueFlag: this.hform.HRedBlueFlag,
- // SourceFlag: HSourceFlag,
- // HSourceBillNo: sSourceBillNo,
- // HSourceBillType: sSourceBillType,
- HStockOrgID: this.hform.HStockOrgID,
- // HScanStyle: "",
- // HCustom1: "",
- // HCustom2: ""
- },
- success: (res) => {
- console.log('鎵爜杩斿洖', res.data);
- this.hform.HBarCode = ''
- if (res.data.count == 1) {
- CommonUtils.playSound(1);
- var data = res.data.data
- if (data.hBarTypeField == '浠撳簱鏉$爜') {
- this.hform.HWHName = data.hWhNameField
- this.hform.HWHID = data.hWhIDField
- this.hform.HStockPlaceName = ''
- this.hform.HStockPlaceID = 0
- // if (data.hSPFlagField == 0) {
- // this.showHStockPlaceName = false
- // } else {
- // this.showHStockPlaceName = true
- // }
- } else if (data.hBarTypeField == '浠撲綅鏉$爜') {
- this.hform.HWHName = data.hWhNameField
- this.hform.HWHID = data.hWhIDField
- this.hform.HStockPlaceName = data.hSPNameField
- this.hform.HStockPlaceID = data.hSPIDField
- } else if (data.hBarTypeField == '閮ㄩ棬鏉$爜') {
- this.hform.HDeptName = data.hDeptNameField
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/WEBSController/get_CheckTypeByBarCode_BillCheck_Json',
+ data: {
+ sBarCode: sBarCode,
+ HBillID: this.hform.HInterID || 0,
+ HBillType: this.hform.HBillType,
+ HBillNo: this.hform.HBillNo,
+ HMaker: this.hform.HMaker,
+ HWhID: sHWHID,
+ HSPID: sHSPID,
+ HQty: sHQty,
+ // HRedBlueFlag: this.hform.HRedBlueFlag,
+ // SourceFlag: HSourceFlag,
+ // HSourceBillNo: sSourceBillNo,
+ // HSourceBillType: sSourceBillType,
+ HStockOrgID: this.hform.HStockOrgID,
+ // HScanStyle: "",
+ // HCustom1: "",
+ // HCustom2: ""
+ },
+ })
+ if (!res) {
+ return
+ }
+ console.log('鎵爜杩斿洖', res.data);
+ this.hform.HBarCode = ''
+ if (res.data.count == 1) {
+ CommonUtils.playSound(1);
+ var data = res.data.data
+ if (data.hBarTypeField == '浠撳簱鏉$爜') {
+ this.hform.HWHName = data.hWhNameField
+ this.hform.HWHID = data.hWhIDField
+ this.hform.HStockPlaceName = ''
+ this.hform.HStockPlaceID = 0
+ if (data.hSPFlagField == 0) {
+ this.showHStockPlaceName = false
+ } else {
+ this.showHStockPlaceName = true
+ }
+ } else if (data.hBarTypeField == '浠撲綅鏉$爜') {
+ this.hform.HWHName = data.hWhNameField
+ this.hform.HWHID = data.hWhIDField
+ this.hform.HStockPlaceName = data.hSPNameField
+ this.hform.HStockPlaceID = data.hSPIDField
+ } else if (data.hBarTypeField == '閮ㄩ棬鏉$爜') {
+ this.hform.HDeptName = data.hDeptNameField
+ this.hform.HDeptID = data.hDeptIDField
+ this.tabs = 1
+ } else if (data.hBarTypeField == '婧愬崟鏉$爜') {
+ this.hform.HSupName = data.hSupNameField
+ this.hform.HSupID = data.hSupIDField
+ if (data.hDeptIDField != 0) {
this.hform.HDeptID = data.hDeptIDField
- this.tabs = 1
- } else if (data.hBarTypeField == '婧愬崟鏉$爜') {
+ this.hform.HDeptName = data.hDeptNameField
+ }
+ this.hform.HSourceBillNo = data.hSourceBillNoField
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ if (data.hSourceBillTypeField == "1103") {
+ this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ this.hform.HMainSourceBillType = 1103
+ this.showHMainSourceBillType = false
+ } else if (data.hSourceBillTypeField == "1102") {
+ this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ this.hform.HMainSourceBillType = 1102
+ this.showHMainSourceBillType = false
+ } else {
+ this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ this.hform.HMainSourceBillType = -1
+ this.showHMainSourceBillType = false
+ }
+ if (data.hMulSourceFlagField == 0) {
+ this.showHSourceBillNo = false
+ }
+ //渚涘簲鍟嗕笉鍙紪杈�
+ this.showHSupName = false
+ this.tabs = 2
+ } else { //鐗╂枡鏉$爜
+ this.tabs = 2
+ console.log('data', data)
+ if (!this.hform.HSourceBillNo) {
this.hform.HSupName = data.hSupNameField
this.hform.HSupID = data.hSupIDField
+ this.hform.HSourceBillNo = data.hSourceBillNoField
if (data.hDeptIDField != 0) {
this.hform.HDeptID = data.hDeptIDField
this.hform.HDeptName = data.hDeptNameField
}
- this.hform.HSourceBillNo = data.hSourceBillNoField
//鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
if (data.hSourceBillTypeField == "1103") {
this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
this.hform.HMainSourceBillType = 1103
@@ -582,63 +704,160 @@
}
//渚涘簲鍟嗕笉鍙紪杈�
this.showHSupName = false
- this.tabs = 2
- } else { //鐗╂枡鏉$爜
- this.tabs = 2
- if (!this.hform.HSourceBillNo) {
- this.hform.HSupName = data.hSupNameField
- this.hform.HSupID = data.hSupIDField
- this.hform.HSourceBillNo = data.hSourceBillNoField
- if (data.hDeptIDField != 0) {
- this.hform.HDeptID = data.hDeptIDField
- this.hform.HDeptName = data.hDeptNameField
- }
- console.log(data)
- //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
- this.hform.HMainSourceBillType = data.hSourceBillTypeField
- if (data.hSourceBillTypeField == "1103") {
- this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
- this.hform.HMainSourceBillType = 1103
- this.showHMainSourceBillType = false
- } else if (data.hSourceBillTypeField == "1102") {
- this.HMainSourceBillType = '閲囪喘璁㈠崟'
- this.hform.HMainSourceBillType = 1102
- this.showHMainSourceBillType = false
- } else {
- this.HMainSourceBillType = '鎵嬪伐褰曞叆'
- this.hform.HMainSourceBillType = -1
- this.showHMainSourceBillType = false
- }
- if (data.hMulSourceFlagField == 0) {
- this.showHSourceBillNo = false
- }
- //渚涘簲鍟嗕笉鍙紪杈�
- this.showHSupName = false
- }
}
- //鏄剧ず琛ㄤ綋鏄庣粏
- this.DisBillEntryList()
- //娓呯┖鏁伴噺
- this.hform.HQty = ''
- } else {
- CommonUtils.playSound(0);
- this.refreshBarCodeState()
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
}
- },
- fail: (res) => {
- CommonUtils.playSound(0);
+ //鏄剧ず琛ㄤ綋鏄庣粏
+ this.DisBillEntryList()
+ //娓呯┖鏁伴噺
+ this.hform.HQty = ''
this.refreshBarCodeState()
- console.log(res);
+ } else {
+ CommonUtils.playSound(0);
+ this.refreshHBillState()
uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
+ title: res.data.Message,
icon: 'none'
})
- },
- });
+ }
+ } catch (e) {
+ CommonUtils.playSound(0)
+ this.refreshHBillState()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触: ' + e,
+ icon: 'none'
+ })
+ }
+
+ // uni.request({
+ // url: this.serverUrl + '/WEBSController/get_CheckTypeByBarCode_BillCheck_Json',
+ // data: {
+ // sBarCode: sBarCode,
+ // HBillID: this.hform.HInterID || 0,
+ // HBillType: this.hform.HBillType,
+ // HBillNo: this.hform.HBillNo,
+ // HMaker: this.hform.HMaker,
+ // HWhID: sHWHID,
+ // HSPID: sHSPID,
+ // HQty: sHQty,
+ // // HRedBlueFlag: this.hform.HRedBlueFlag,
+ // // SourceFlag: HSourceFlag,
+ // // HSourceBillNo: sSourceBillNo,
+ // // HSourceBillType: sSourceBillType,
+ // HStockOrgID: this.hform.HStockOrgID,
+ // // HScanStyle: "",
+ // // HCustom1: "",
+ // // HCustom2: ""
+ // },
+ // success: (res) => {
+ //
+ // console.log('鎵爜杩斿洖', res.data);
+ // this.hform.HBarCode = ''
+ // if (res.data.count == 1) {
+ // CommonUtils.playSound(1);
+ // var data = res.data.data
+ // if (data.hBarTypeField == '浠撳簱鏉$爜') {
+ // this.hform.HWHName = data.hWhNameField
+ // this.hform.HWHID = data.hWhIDField
+ // this.hform.HStockPlaceName = ''
+ // this.hform.HStockPlaceID = 0
+ // // if (data.hSPFlagField == 0) {
+ // // this.showHStockPlaceName = false
+ // // } else {
+ // // this.showHStockPlaceName = true
+ // // }
+ // } else if (data.hBarTypeField == '浠撲綅鏉$爜') {
+ // this.hform.HWHName = data.hWhNameField
+ // this.hform.HWHID = data.hWhIDField
+ // this.hform.HStockPlaceName = data.hSPNameField
+ // this.hform.HStockPlaceID = data.hSPIDField
+ // } else if (data.hBarTypeField == '閮ㄩ棬鏉$爜') {
+ // this.hform.HDeptName = data.hDeptNameField
+ // this.hform.HDeptID = data.hDeptIDField
+ // this.tabs = 1
+ // } else if (data.hBarTypeField == '婧愬崟鏉$爜') {
+ // this.hform.HSupName = data.hSupNameField
+ // this.hform.HSupID = data.hSupIDField
+ // if (data.hDeptIDField != 0) {
+ // this.hform.HDeptID = data.hDeptIDField
+ // this.hform.HDeptName = data.hDeptNameField
+ // }
+ // this.hform.HSourceBillNo = data.hSourceBillNoField
+ // //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ // if (data.hSourceBillTypeField == "1103") {
+ // this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ // this.hform.HMainSourceBillType = 1103
+ // this.showHMainSourceBillType = false
+ // } else if (data.hSourceBillTypeField == "1102") {
+ // this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ // this.hform.HMainSourceBillType = 1102
+ // this.showHMainSourceBillType = false
+ // } else {
+ // this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ // this.hform.HMainSourceBillType = -1
+ // this.showHMainSourceBillType = false
+ // }
+ // if (data.hMulSourceFlagField == 0) {
+ // this.showHSourceBillNo = false
+ // }
+ // //渚涘簲鍟嗕笉鍙紪杈�
+ // this.showHSupName = false
+ // this.tabs = 2
+ // } else { //鐗╂枡鏉$爜
+ // this.tabs = 2
+ // if (!this.hform.HSourceBillNo) {
+ // this.hform.HSupName = data.hSupNameField
+ // this.hform.HSupID = data.hSupIDField
+ // this.hform.HSourceBillNo = data.hSourceBillNoField
+ // if (data.hDeptIDField != 0) {
+ // this.hform.HDeptID = data.hDeptIDField
+ // this.hform.HDeptName = data.hDeptNameField
+ // }
+ // console.log(data)
+ // //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ // this.hform.HMainSourceBillType = data.hSourceBillTypeField
+ // if (data.hSourceBillTypeField == "1103") {
+ // this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ // this.hform.HMainSourceBillType = 1103
+ // this.showHMainSourceBillType = false
+ // } else if (data.hSourceBillTypeField == "1102") {
+ // this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ // this.hform.HMainSourceBillType = 1102
+ // this.showHMainSourceBillType = false
+ // } else {
+ // this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ // this.hform.HMainSourceBillType = -1
+ // this.showHMainSourceBillType = false
+ // }
+ // if (data.hMulSourceFlagField == 0) {
+ // this.showHSourceBillNo = false
+ // }
+ // //渚涘簲鍟嗕笉鍙紪杈�
+ // this.showHSupName = false
+ // }
+ // }
+ // //鏄剧ず琛ㄤ綋鏄庣粏
+ // this.DisBillEntryList()
+ // //娓呯┖鏁伴噺
+ // this.hform.HQty = ''
+ // } else {
+ // CommonUtils.playSound(0);
+ // this.refreshBarCodeState()
+ // uni.showToast({
+ // title: res.data.Message,
+ // icon: 'none'
+ // })
+ // }
+ // },
+ // fail: (res) => {
+ // CommonUtils.playSound(0);
+ // this.refreshBarCodeState()
+ // console.log(res);
+ // uni.showToast({
+ // title: '鎺ュ彛璇锋眰澶辫触',
+ // icon: 'none'
+ // })
+ // },
+ // });
}
},
//鐗╂枡淇℃伅
@@ -737,7 +956,7 @@
url: '/pages/qitachukujiaoyan/detail?OperationType=1'
})
},
- submit() {
+ async submit() {
if (this.hform.HInterID == 0 || !this.hform.HInterID) {
uni.showToast({
title: '娌℃湁鎵爜淇℃伅锛岃鍏堟壂鎻忓崟鎹潯鐮侊紒',
@@ -766,59 +985,106 @@
icon: 'none'
})
} else {
- uni.showLoading({
- title: '璇风◢鍊�'
- })
+ // uni.showLoading({
+ // title: '璇风◢鍊�'
+ // })
var sMainStr = JSON.stringify(this.hform);
- uni.request({
- url: this.serverUrl + '/WEBSController/set_SaveOtherOutBill_BillCheck_Json',
- method: 'POST',
- dataType: "json",
- data: {
- oMain: sMainStr
- },
- success: (res) => {
- console.log(1, res);
- uni.hideLoading()
- if (res.data.count == 1) {
- uni.showModal({
- title: '鎻愮ず',
- content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
- success: (res) => {
- if (res.confirm) {
- console.log('鐢ㄦ埛鐐瑰嚮纭畾');
- uni.redirectTo({
- url: '/pages/qitachukujiaoyan/detail?OperationType=1'
- })
- } else if (res.cancel) {
- console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
- setTimeout(() => {
- uni.navigateBack();
- }, 50)
- }
- }
- });
- } else {
- // uni.showToast({
- // title: res.data.Message,
- // icon: 'none'
- // })
- uni.showModal({
- title: '娓╅Θ鎻愮ず',
- content: res.data.Message,
- showCancel: false
- })
- }
- },
- fail: (res) => {
- console.log(res);
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/WEBSController/set_SaveOtherOutBill_BillCheck_Json',
+ method: 'POST',
+ data: {
+ oMain: sMainStr
+ },
+ })
+ if (!res) {
+ return
+ }
+ console.log(1, res);
+ uni.hideLoading()
+ if (res.data.count == 1) {
+ uni.showModal({
+ title: '鎻愮ず',
+ content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.redirectTo({
+ url: '/pages/qitachukujiaoyan/detail?OperationType=1'
+ })
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 50)
+ }
+ }
+ });
+ } else {
uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
+ title: res.data.Message,
icon: 'none'
})
- },
- });
+ }
+ } catch (e) {
+ CommonUtils.playSound(0)
+ this.refreshHBillNoFocus()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触: ' + e,
+ icon: 'none'
+ })
+ }
+
+ // uni.request({
+ // url: this.serverUrl + '/WEBSController/set_SaveOtherOutBill_BillCheck_Json',
+ // method: 'POST',
+ // dataType: "json",
+ // data: {
+ // oMain: sMainStr
+ // },
+ // success: (res) => {
+ // console.log(1, res);
+ // uni.hideLoading()
+ // if (res.data.count == 1) {
+ // uni.showModal({
+ // title: '鎻愮ず',
+ // content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
+ // success: (res) => {
+ // if (res.confirm) {
+ // console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ // uni.redirectTo({
+ // url: '/pages/qitachukujiaoyan/detail?OperationType=1'
+ // })
+ // } else if (res.cancel) {
+ // console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ // setTimeout(() => {
+ // uni.navigateBack();
+ // }, 50)
+ // }
+ // }
+ // });
+ // } else {
+ // // uni.showToast({
+ // // title: res.data.Message,
+ // // icon: 'none'
+ // // })
+ //
+ // uni.showModal({
+ // title: '娓╅Θ鎻愮ず',
+ // content: res.data.Message,
+ // showCancel: false
+ // })
+ // }
+ // },
+ // fail: (res) => {
+ // console.log(res);
+ // uni.showToast({
+ // title: '鎺ュ彛璇锋眰澶辫触',
+ // icon: 'none'
+ // })
+ // },
+ // });
}
}
},
diff --git a/pages/qitarukujiaoyan/form.vue b/pages/qitarukujiaoyan/form.vue
index 5640703..7f1f775 100644
--- a/pages/qitarukujiaoyan/form.vue
+++ b/pages/qitarukujiaoyan/form.vue
@@ -1,978 +1,1262 @@
<template>
- <view>
- <view class="form">
- <view class="form-item">
- <view class="title">鏉$爜:</view>
- <view class="right">
- <input v-model="hform.HBarCode" placeholder="璇锋壂鎻�(鎴栬緭鍏�)鏉$爜" @confirm="getCode(hform.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="right">
- <input v-model="hform.HQty" placeholder="璇疯緭鍏ユ暟閲�" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">浠撳簱:</view>
- <view class="right">
- <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">
- <uni-combox :candidates="arrayHStockPlaceName" placeholder="璇疯緭鍏�(鎴栨壂鎻�)浠撲綅"
- v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"></uni-combox>
- </view>
- <view class="righton" v-show="!showHStockPlaceName">
- <input v-model="hform.HStockPlaceName" :disabled="!showHStockPlaceName" placeholder="涓嶅彲鎿嶄綔" /></view>
- </view>
+ <view>
+ <view class="form">
+ <view class="form-item">
+ <view class="title">鏉$爜:</view>
+ <view class="right">
+ <input v-model="hform.HBarCode" placeholder="璇锋壂鎻�(鎴栬緭鍏�)鏉$爜" @confirm="getCode(hform.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="right">
+ <input v-model="hform.HQty" placeholder="璇疯緭鍏ユ暟閲�" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">浠撳簱:</view>
+ <view class="right">
+ <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">
+ <uni-combox :candidates="arrayHStockPlaceName" placeholder="璇疯緭鍏�(鎴栨壂鎻�)浠撲綅"
+ v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"></uni-combox>
+ </view>
+ <view class="righton" v-show="!showHStockPlaceName">
+ <input v-model="hform.HStockPlaceName" :disabled="!showHStockPlaceName" placeholder="涓嶅彲鎿嶄綔" />
+ </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>
+ <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>
- <view v-if="tabs == 1">
- <view class="form-item" v-show="showHBillNo">
- <view class="title">鍗曟嵁鍙�:</view>
- <view class="right" style="width: 380rpx;">
- <input name="HBillNo" v-model="hform.HBillNo" placeholder="璇锋壂鎻�(鎴栬緭鍏�)鏉$爜"
- @confirm="GetMeesageByBillNo(hform.HBarCode)" />
- </view>
- <uni-icons type="scan"
- style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
- size="20" @click="toScanBillCode"></uni-icons>
- </view>
- <view class="form-item" v-show="!showHBillNo">
- <view class="title">鍗曟嵁鍙�:</view>
- <view class="righton">
- <input name="HBillNo" disabled v-model="hform.HBillNo" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鍗曟嵁ID:</view>
- <view class="righton">
- <input name="HInterID" disabled v-model="hform.HInterID" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鍒跺崟浜�:</view>
- <view class="righton">
- <input name="HMaker" disabled v-model="hform.HMaker" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">缁勭粐:</view>
- <view class="righton">
- <input name="HStockOrgName" disabled v-model="hform.HStockOrgName" />
- </view>
- </view>
- <label class="checkbox" style="float: right;">
- <checkbox :checked="hform.chkHBarflag" style="transform:scale(0.8)" disabled color="#4f81fc" />鏉$爜鏍稿
- </label>
- </view>
- <view v-if="tabs == 2">
- <view class="list" v-for="(item,index) in Materlist" :key="index">
- <uni-card :title="item.鐗╂枡鍚嶇О" :extra="'鏁伴噺:'+item.鏁伴噺" style="margin: 10px;" @tap="delMater(item)">
- <view class="card-detail">
- <view class="detail">
- <text>鐗╂枡浠g爜锛�</text>{{item.鐗╂枡浠g爜}}
- </view>
- <view class="detail">
- <text>鍗曟嵁鏁伴噺锛�</text>{{item.鍗曟嵁鏁伴噺}}
- </view>
- <view class="detail" v-if="item.瑙勬牸鍨嬪彿">
- <text>瑙勬牸鍨嬪彿锛�</text>{{item.瑙勬牸鍨嬪彿}}
- </view>
- <view class="detail">
- <text>鎵规锛�</text>{{item.鎵规}}
- </view>
- <view class="detail" v-if="item.杈呭姪灞炴��">
- <text>杈呭姪灞炴�э細</text>{{item.杈呭姪灞炴�}
- </view>
- <view class="detail" v-if="item.浠撳簱">
- <text>浠撳簱锛�</text>{{item.浠撳簱}}
- </view>
- <view class="detail" v-if="item.浠撲綅">
- <text>浠撲綅锛�</text>{{item.浠撲綅}}
- </view>
- <view class="detail">
- <text>鏉$爜涓暟锛�</text>{{item.鏉$爜涓暟}}
- </view>
- </view>
- </uni-card>
- </view>
- <view class="over" v-if="Materlist.length == 0">鏆傛棤鏁版嵁</view>
- </view>
+ <view v-if="tabs == 1">
+ <view class="form-item" v-show="showHBillNo">
+ <view class="title">鍗曟嵁鍙�:</view>
+ <view class="right" style="width: 380rpx;">
+ <input name="HBillNo" v-model="hform.HBillNo" placeholder="璇锋壂鎻�(鎴栬緭鍏�)鏉$爜"
+ @confirm="GetMeesageByBillNo(hform.HBarCode)" />
+ </view>
+ <uni-icons type="scan"
+ style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
+ size="20" @click="toScanBillCode"></uni-icons>
+ </view>
+ <view class="form-item" v-show="!showHBillNo">
+ <view class="title">鍗曟嵁鍙�:</view>
+ <view class="righton">
+ <input name="HBillNo" disabled v-model="hform.HBillNo" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍗曟嵁ID:</view>
+ <view class="righton">
+ <input name="HInterID" disabled v-model="hform.HInterID" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍒跺崟浜�:</view>
+ <view class="righton">
+ <input name="HMaker" disabled v-model="hform.HMaker" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">缁勭粐:</view>
+ <view class="righton">
+ <input name="HStockOrgName" disabled v-model="hform.HStockOrgName" />
+ </view>
+ </view>
+ <label class="checkbox" style="float: right;">
+ <checkbox :checked="hform.chkHBarflag" style="transform:scale(0.8)" disabled color="#4f81fc" />鏉$爜鏍稿
+ </label>
+ </view>
+ <view v-if="tabs == 2">
+ <view class="list" v-for="(item,index) in Materlist" :key="index">
+ <uni-card :title="item.鐗╂枡鍚嶇О" :extra="'鏁伴噺:'+item.鏁伴噺" style="margin: 10px;" @tap="delMater(item)">
+ <view class="card-detail">
+ <view class="detail">
+ <text>鐗╂枡浠g爜锛�</text>{{item.鐗╂枡浠g爜}}
+ </view>
+ <view class="detail">
+ <text>鍗曟嵁鏁伴噺锛�</text>{{item.鍗曟嵁鏁伴噺}}
+ </view>
+ <view class="detail" v-if="item.瑙勬牸鍨嬪彿">
+ <text>瑙勬牸鍨嬪彿锛�</text>{{item.瑙勬牸鍨嬪彿}}
+ </view>
+ <view class="detail">
+ <text>鎵规锛�</text>{{item.鎵规}}
+ </view>
+ <view class="detail" v-if="item.杈呭姪灞炴��">
+ <text>杈呭姪灞炴�э細</text>{{item.杈呭姪灞炴�}
+ </view>
+ <view class="detail" v-if="item.浠撳簱">
+ <text>浠撳簱锛�</text>{{item.浠撳簱}}
+ </view>
+ <view class="detail" v-if="item.浠撲綅">
+ <text>浠撲綅锛�</text>{{item.浠撲綅}}
+ </view>
+ <view class="detail">
+ <text>鏉$爜涓暟锛�</text>{{item.鏉$爜涓暟}}
+ </view>
+ </view>
+ </uni-card>
+ </view>
+ <view class="over" v-if="Materlist.length == 0">鏆傛棤鏁版嵁</view>
+ </view>
- <view v-if="tabs == 3">
- <view class="form-item">
- <view class="title">鏉$爜:</view>
- <view class="righton">
- <input name="HBarCode_B" disabled v-model="hform.HBarCode_B" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鐗╂枡:</view>
- <view class="righton">
- <input disabled v-model="hform.HMaterName_B" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">瑙勬牸:</view>
- <view class="righton">
- <input disabled v-model="hform.HMaterModel_B" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鎵规:</view>
- <view class="righton">
- <input disabled v-model="hform.HBatchNo_B" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鍗曚綅:</view>
- <view class="righton">
- <input disabled v-model="hform.HUnitName_B" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鏁伴噺:</view>
- <view class="righton">
- <input disabled v-model="hform.HQty_B" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">瀹归噺:</view>
- <view class="righton">
- <input disabled v-model="hform.HTMQty_B" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">浠撳簱:</view>
- <view class="righton">
- <input disabled v-model="hform.HWHName_B" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">浠撲綅:</view>
- <view class="righton">
- <input disabled v-model="hform.HSPName_B" />
- </view>
- </view>
- </view>
+ <view v-if="tabs == 3">
+ <view class="form-item">
+ <view class="title">鏉$爜:</view>
+ <view class="righton">
+ <input name="HBarCode_B" disabled v-model="hform.HBarCode_B" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鐗╂枡:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HMaterName_B" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">瑙勬牸:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HMaterModel_B" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鎵规:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HBatchNo_B" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍗曚綅:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HUnitName_B" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鏁伴噺:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HQty_B" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">瀹归噺:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HTMQty_B" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">浠撳簱:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HWHName_B" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">浠撲綅:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HSPName_B" />
+ </view>
+ </view>
+ </view>
- <view class="bottom-btn">
- <button class="btn-a" size="mini" @tap="submit">鎻愪氦</button>
- <button class="btn-c" size="mini" @tap="goBack">閫�鍑�</button>
- </view>
- </view>
- </view>
+ <view class="bottom-btn">
+ <button class="btn-a" size="mini" @tap="submit">鎻愪氦</button>
+ <button class="btn-c" size="mini" @tap="goBack">閫�鍑�</button>
+ </view>
+ </view>
+ </view>
</template>
<script>
- import getDateTime from '@/utils/getdateTime.js';
- import {
- getUserInfo
- } from "@/utils/auth.js";
- import {
- CommonUtils
- } from "@/utils/common.js"
- export default {
- data() {
- return {
- userInfo: getUserInfo(),
- serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
- HModName: 'Kf_OtherInBill_CheckList_PDA',
- ModRightName: 'CE_OtherInCheck',
- OperationType: 1,
-
- showHStockPlaceName: false,
- showHBillNo: true,
- tabs: 1,
- linterid: '',
- HBillNo: '',
+ import getDateTime from '@/utils/getdateTime.js';
+ import {
+ getUserInfo
+ } from "@/utils/auth.js";
+ import {
+ CommonUtils
+ } from "@/utils/common.js"
+ export default {
+ data() {
+ return {
+ userInfo: getUserInfo(),
+ serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
+ HModName: 'Kf_OtherInBill_CheckList_PDA',
+ ModRightName: 'CE_OtherInCheck',
+ OperationType: 1,
- arrayHWHName: [], //浠撳簱
- HWHNameList: [],
- arrayHStockPlaceName: [], //浠撲綅
- HStockPlaceNameList: [],
+ showHStockPlaceName: false,
+ showHBillNo: true,
+ tabs: 1,
+ linterid: '',
+ HBillNo: '',
- Materlist: [],
- hform: {
- HBillType: 1203,
- HBillerID: uni.getStorageSync('HBillerID'),
- HRedBlueFlag: false,
+ arrayHWHName: [], //浠撳簱
+ HWHNameList: [],
+ arrayHStockPlaceName: [], //浠撲綅
+ HStockPlaceNameList: [],
- HBarCode: '',
- HQty: '',
- HWHName: getUserInfo().HWHName,
- HWHID: getUserInfo().HWhID,
- HStockPlaceName: getUserInfo().HSPName,
- HStockPlaceID: getUserInfo().HSPID,
+ Materlist: [],
+ hform: {
+ HBillType: 1203,
+ HBillerID: uni.getStorageSync('HBillerID'),
+ HRedBlueFlag: false,
- HBillNo: '',
- HInterID: '',
- HMaker: uni.getStorageSync('HUserName'),
- HStockOrgName: uni.getStorageSync('Organization'),
- HStockOrgID: uni.getStorageSync('OrganizationID'),
- HSourceBarCodeCtl: "N", //鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- chkHBarflag: false,
- HBarflag: 'Y',
+ HBarCode: '',
+ HQty: '',
+ HWHName: getUserInfo().HWHName,
+ HWHID: getUserInfo().HWhID,
+ HStockPlaceName: getUserInfo().HSPName,
+ HStockPlaceID: getUserInfo().HSPID,
- HBarCode_B: '',
- HMaterName_B: '',
- HMaterModel_B: '',
- HBatchNo_B: '',
- HUnitName_B: '',
- HQty_B: '',
- HTMQty_B: '',
- HWHName_B: '',
- HSPName_B: '',
- }
- }
- },
- onLoad(e) {
- console.log(e, this.userInfo)
- this.OperationType = e.OperationType
- if (e.HBillNo) {
- this.hform.HBillNo = e.HBillNo
- this.GetMeesageByBillNo(e.HBillNo)
- } else {
- // this.getNewData()
- }
- this.getHBaseList()
- },
- methods: {
- //鎵爜
- toScanCode() {
- var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
- mpaasScanModule.mpaasScan({
- 'hideAlbum': true,
- 'timeoutInterval':'10', //瓒呮椂鏃堕棿
- 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
- },(ret) => {
- console.log(ret.resp_result)
- // if(this.hform.HBarCode == '*'){
- // this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
- // }else{
- // this.hform.HBarCode = ret.resp_result
- // }
- this.hform.HBarCode = ret.resp_result
- // this.GetMeesageByBillNo(this.hform.HBarCode)
- this.getCode(this.hform.HBarCode)
- })
- },
- toScanBillCode() {
- var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
- mpaasScanModule.mpaasScan({
- 'hideAlbum': true,
- 'timeoutInterval':'10', //瓒呮椂鏃堕棿
- 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
- },(ret) => {
- console.log(ret.resp_result)
- // if(this.hform.HBarCode == '*'){
- // this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
- // }else{
- // this.hform.HBarCode = ret.resp_result
- // }
-
- this.hform.HBillNo = ret.resp_result
- this.GetMeesageByBillNo(this.hform.HBillNo)
- })
- },
- //鎵弿鍗曟嵁鍙锋潯鐮�
- GetMeesageByBillNo(e) {
- uni.request({
- url: this.serverUrl + '/WEBSController/get_BillBarCode_BillCheck_Json',
- data: {
- HBillNo: this.hform.HBillNo,
- HBillType: this.hform.HBillType,
- HMaker: this.hform.HMaker,
- HStockOrgID: this.hform.HStockOrgID
- },
- success: (res) => {
- if (res.data.count == 1) {
- CommonUtils.playSound(1);
- var data = res.data.data
- console.log('鍗曟嵁淇℃伅: ', data)
- this.hform.HInterID = data.hInterIDField
- this.hform.HBillNo = data.hBillNoField
- this.showHBillNo = false
- //鏉$爜鏍稿鏍囪
- if (data.hSourceBarCodeFlagField) {
- this.hform.HSourceBarCodeCtl = "Y"
- this.hform.chkHBarflag = true
- this.hform.HBarflag = data
- }
- this.tabs = 2
- this.DisBillEntryList();
- } else {
- CommonUtils.playSound(0);
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
- this.hform.HBillNo = ''
- }
- },
- fail: (res) => {
- CommonUtils.playSound(0);
- console.log(res);
- uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
- icon: 'none'
- })
- },
- });
- },
- //鍩虹浠撳簱璧勬枡
- getHBaseList() {
- uni.request({
- url: this.serverUrl + '/Gy_Warehouse/list',
- data: {
- sWhere: "",
- user: uni.getStorageSync('HUserName'),
- Organization: uni.getStorageSync('Organization')
- },
- success: (res) => {
- if (res.data.count == 1) {
- this.HWHNameList = res.data.data
- for (var i = 0; i < res.data.data.length; i++) {
- this.arrayHWHName[i] = res.data.data[i].浠撳簱鍚嶇О
- }
- } else {
- uni.showToast({
- title: '浠撳簱鏁版嵁璇锋眰澶辫触',
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- console.log(res);
- uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
- icon: 'none'
- })
- },
- });
+ HBillNo: '',
+ HInterID: '',
+ HMaker: uni.getStorageSync('HUserName'),
+ HStockOrgName: uni.getStorageSync('Organization'),
+ HStockOrgID: uni.getStorageSync('OrganizationID'),
+ HSourceBarCodeCtl: "N", //鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ chkHBarflag: false,
+ HBarflag: 'Y',
- 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'
- })
- },
- });
- },
- //閫夋嫨浠撳簱
- HWHNameChange(e) {
- // var name = e.split("(")
- for (var i = 0; i < this.HWHNameList.length; i++) {
- if (this.HWHNameList[i].浠撳簱鍚嶇О == e) {
- this.hform.HWHName = this.HWHNameList[i].浠撳簱鍚嶇О
- this.hform.HWHID = this.HWHNameList[i].HItemID
-
- if(this.HWHNameList[i]['鍚敤浠撲綅'] == 'Y'){
- this.showHStockPlaceName = true
- }else {
- this.hform.HStockPlaceName = ''
- this.showHStockPlaceName = false
- }
- }
- }
- },
- //閫夋嫨浠撲綅
- HStockPlaceNameChange(e) {
- for (var i = 0; i < this.HStockPlaceNameList.length; i++) {
- if (this.HStockPlaceNameList[i].浠撲綅鍚嶇О == e) {
- this.hform.HStockPlaceName = this.HStockPlaceNameList[i].浠撲綅鍚嶇О
- this.hform.HStockPlaceID = this.HStockPlaceNameList[i].HItemID
- }
- }
- },
- getCode(HBarCode) {
- //浠撳簱銆佷粨浣嶆枃鏈涓虹┖鏃讹紝娓呯┖瀵瑰簲ID
- if (!this.hform.HWHName) {
- this.hform.HWHID = 0
- }
- if (!this.hform.HStockPlaceName) {
- this.hform.HStockPlaceID = 0
- }
- var sOldBarCode = HBarCode
- var HDeleteFlag = sOldBarCode.substring(0, 1);
- var sBarCode = sOldBarCode.slice(1);
+ HBarCode_B: '',
+ HMaterName_B: '',
+ HMaterModel_B: '',
+ HBatchNo_B: '',
+ HUnitName_B: '',
+ HQty_B: '',
+ HTMQty_B: '',
+ HWHName_B: '',
+ HSPName_B: '',
+ }
+ }
+ },
+ onLoad(e) {
+ console.log(e, this.userInfo)
+ this.OperationType = e.OperationType
+ if (e.HBillNo) {
+ this.hform.HBillNo = e.HBillNo
+ this.GetMeesageByBillNo(e.HBillNo)
+ } else {
+ // this.getNewData()
+ }
+ this.getHBaseList()
+ },
+ methods: {
+ async refreshHBarCodeFocus() {
+ this.HBarCodeFocus = false
+ await this.$nextTick()
+ this.hform.HBarCode = ''
+ this.HBarCodeFocus = true
+ },
+ async refreshHBillNoFocus() {
+ this.HBillNoFocus = false
+ await this.$nextTick(() => {
+ this.HBillNoFocus = true
+ this.hform.HBillNo = ""
+ })
+ },
+ //鎵爜
+ toScanCode() {
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval': '10', //瓒呮椂鏃堕棿
+ 'timeoutText': '鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ }, (ret) => {
+ console.log(ret.resp_result)
+ // if(this.hform.HBarCode == '*'){
+ // this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ // }else{
+ // this.hform.HBarCode = ret.resp_result
+ // }
+ this.hform.HBarCode = ret.resp_result
+ // this.GetMeesageByBillNo(this.hform.HBarCode)
+ this.getCode(this.hform.HBarCode)
+ })
+ },
+ toScanBillCode() {
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval': '10', //瓒呮椂鏃堕棿
+ 'timeoutText': '鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ }, (ret) => {
+ console.log(ret.resp_result)
+ // if(this.hform.HBarCode == '*'){
+ // this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ // }else{
+ // this.hform.HBarCode = ret.resp_result
+ // }
- var sHWHID = this.hform.HWHID
- var sHSPID = this.hform.HStockPlaceID
- var sHQty = this.hform.HQty
- var sSourceBillNo = this.hform.HSourceBillNo
- var sSourceBillType = this.hform.HMainSourceBillType
- var HSourceFlag = this.hform.HSourceBillNo == '' ? false : true
- console.log(this.hform.HSourceBillNo, HSourceFlag)
- if (HDeleteFlag == "*") {
- if (sBarCode == "") {
- uni.showToast({
- title: '璇疯緭鍏ヨ鍒犻櫎鐨勬潯鐮�',
- icon: 'none'
- })
- } else {
- uni.request({
- url: this.serverUrl + '/WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json',
- data: {
- HInterID: this.hform.HInterID,
- HBillType: this.hform.HBillType,
- HBarCode: sBarCode
- },
- success: (res) => {
- console.log('鍒犻櫎鏉$爜', res.data);
- this.hform.HBarCode = ''
- if (res.data.count == 1) {
- this.hform.HQty = ''
- this.DisBillEntryList()
- } else {
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- console.log(res);
- uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
- icon: 'none'
- })
- },
- });
- }
- } else {
- var sBarCode = this.hform.HBarCode
- if (sHQty == "") {
- sHQty = 0;
- }
- uni.request({
- url: this.serverUrl + '/WEBSController/get_CheckTypeByBarCode_BillCheck_Json',
- data: {
- sBarCode: sBarCode,
- HBillID: this.hform.HInterID || 0,
- HBillType: this.hform.HBillType,
- HBillNo: this.hform.HBillNo,
- HMaker: this.hform.HMaker,
- HWhID: sHWHID,
- HSPID: sHSPID,
- HQty: sHQty,
- // HRedBlueFlag: this.hform.HRedBlueFlag,
- // SourceFlag: HSourceFlag,
- // HSourceBillNo: sSourceBillNo,
- // HSourceBillType: sSourceBillType,
- HStockOrgID: this.hform.HStockOrgID,
- // HScanStyle: "",
- // HCustom1: "",
- // HCustom2: ""
- },
- success: (res) => {
- console.log('鎵爜杩斿洖', res.data);
- this.hform.HBarCode = ''
- if (res.data.count == 1) {
- CommonUtils.playSound(1);
- var data = res.data.data
- if (data.hBarTypeField == '浠撳簱鏉$爜') {
- this.hform.HWHName = data.hWhNameField
- this.hform.HWHID = data.hWhIDField
- this.hform.HStockPlaceName = ''
- this.hform.HStockPlaceID = 0
- // if (data.hSPFlagField == 0) {
- // this.showHStockPlaceName = false
- // } else {
- // this.showHStockPlaceName = true
- // }
- } else if (data.hBarTypeField == '浠撲綅鏉$爜') {
- this.hform.HWHName = data.hWhNameField
- this.hform.HWHID = data.hWhIDField
- this.hform.HStockPlaceName = data.hSPNameField
- this.hform.HStockPlaceID = data.hSPIDField
- } else if (data.hBarTypeField == '閮ㄩ棬鏉$爜') {
- this.hform.HDeptName = data.hDeptNameField
- this.hform.HDeptID = data.hDeptIDField
- this.tabs = 1
- } else if (data.hBarTypeField == '婧愬崟鏉$爜') {
- this.hform.HSupName = data.hSupNameField
- this.hform.HSupID = data.hSupIDField
- if (data.hDeptIDField != 0) {
- this.hform.HDeptID = data.hDeptIDField
- this.hform.HDeptName = data.hDeptNameField
- }
- this.hform.HSourceBillNo = data.hSourceBillNoField
- //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
- if (data.hSourceBillTypeField == "1103") {
- this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
- this.hform.HMainSourceBillType = 1103
- this.showHMainSourceBillType = false
- } else if (data.hSourceBillTypeField == "1102") {
- this.HMainSourceBillType = '閲囪喘璁㈠崟'
- this.hform.HMainSourceBillType = 1102
- this.showHMainSourceBillType = false
- } else {
- this.HMainSourceBillType = '鎵嬪伐褰曞叆'
- this.hform.HMainSourceBillType = -1
- this.showHMainSourceBillType = false
- }
- if (data.hMulSourceFlagField == 0) {
- this.showHSourceBillNo = false
- }
- //渚涘簲鍟嗕笉鍙紪杈�
- this.showHSupName = false
- this.tabs = 2
- } else { //鐗╂枡鏉$爜
- this.tabs = 2
- if (!this.hform.HSourceBillNo) {
- this.hform.HSupName = data.hSupNameField
- this.hform.HSupID = data.hSupIDField
- this.hform.HSourceBillNo = data.hSourceBillNoField
- if (data.hDeptIDField != 0) {
- this.hform.HDeptID = data.hDeptIDField
- this.hform.HDeptName = data.hDeptNameField
- }
- console.log(data)
- //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
- this.hform.HMainSourceBillType = data.hSourceBillTypeField
- if (data.hSourceBillTypeField == "1103") {
- this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
- this.hform.HMainSourceBillType = 1103
- this.showHMainSourceBillType = false
- } else if (data.hSourceBillTypeField == "1102") {
- this.HMainSourceBillType = '閲囪喘璁㈠崟'
- this.hform.HMainSourceBillType = 1102
- this.showHMainSourceBillType = false
- } else {
- this.HMainSourceBillType = '鎵嬪伐褰曞叆'
- this.hform.HMainSourceBillType = -1
- this.showHMainSourceBillType = false
- }
- if (data.hMulSourceFlagField == 0) {
- this.showHSourceBillNo = false
- }
- //渚涘簲鍟嗕笉鍙紪杈�
- this.showHSupName = false
- }
- }
- //鏄剧ず琛ㄤ綋鏄庣粏
- this.DisBillEntryList()
- //娓呯┖鏁伴噺
- this.hform.HQty = ''
- } else {
- CommonUtils.playSound(0);
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- CommonUtils.playSound(0);
- console.log(res);
- uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
- icon: 'none'
- })
- },
- });
- }
- },
- //鐗╂枡淇℃伅
- DisBillEntryList() {
- uni.request({
- url: this.serverUrl + '/WEBSController/GetKf_PonderationBillMain_Temp_BillCheck_New_Json',
- data: {
- HInterID: this.hform.HInterID,
- HBillType: this.hform.HBillType,
- HSourceBarCodeCtl: this.hform.HSourceBarCodeCtl,
- sWhere: ''
- },
- success: (res) => {
- console.log('鐗╂枡', res.data)
- if (res.data.count == 1) {
- var data = res.data.data
- this.Materlist = data.Materlist
- if (!data.BarCodeDetailslist[0].HBarCode) {
- this.hform.HMaterName_B = ''
- this.hform.HMaterModel_B = ''
- this.hform.HBatchNo_B = ''
- this.hform.HUnitName_B = ''
- this.hform.HQty_B = ''
- this.hform.HTMQty_B = ''
- this.hform.HWHName_B = ''
- this.hform.HSPName_B = ''
- } else {
- this.hform.HBarCode_B = data.BarCodeDetailslist[0].HBarCode
- this.hform.HMaterName_B = data.BarCodeDetailslist[0].HMaterName
- this.hform.HMaterModel_B = data.BarCodeDetailslist[0].HMaterModel
- this.hform.HBatchNo_B = data.BarCodeDetailslist[0].HBatchNo
- this.hform.HUnitName_B = data.BarCodeDetailslist[0].HUnitName
- this.hform.HQty_B = data.BarCodeDetailslist[0].HQty
- this.hform.HTMQty_B = data.BarCodeDetailslist[0].HTMQty
- this.hform.HWHName_B = data.BarCodeDetailslist[0].HWHName
- this.hform.HSPName_B = data.BarCodeDetailslist[0].HSPName
- }
- } else {
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- console.log(res);
- uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
- icon: 'none'
- })
- },
- });
- },
- //鍒犻櫎鐗╂枡鐮�
- delMater(item) {
- uni.showModal({
- title: '鎻愮ず',
- content: '纭瑕佸垹闄� " ' + item.鐗╂枡鍚嶇О + ' " 鎵�鏈夋壂鐮佽褰曪紵鍒犻櫎鍚庡皢涓嶅彲鎭㈠锛�',
- success: (res) => {
- if (res.confirm) {
- uni.request({
- url: this.serverUrl +
- '/WEBSController/set_DeleteBarCodeByEntryID_BillCheck_New_Json',
- data: {
- HInterID: this.hform.HInterID,
- HBillType: this.hform.HBillType,
- HSourceInterID: item.HSourceInterID,
- HSourceEntryID: item.HSourceEntryID,
- HSourceBarCodeCtl: this.hform.HSourceBarCodeCtl
- },
- success: (res) => {
- if (res.data.count == 1) {
- this.DisBillEntryList()
- } else {
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- console.log(res);
- uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
- icon: 'none'
- })
- },
- });
- }
- }
- });
- },
- submit() {
- if (this.hform.HInterID == 0 || !this.hform.HInterID) {
- uni.showToast({
- title: '娌℃湁鎵爜淇℃伅锛岃鍏堟壂鎻忓崟鎹潯鐮侊紒',
- icon: 'none'
- })
- } else if (!this.hform.HBillNo) {
- uni.showToast({
- title: '鍗曟嵁鍙疯幏鍙栧け璐ワ紝閿欒鐨勫崟鎹彿锛�',
- icon: 'none'
- })
- } else if (!this.Materlist || this.Materlist.length == 0) {
- uni.showToast({
- title: '娌℃湁鎵爜淇℃伅锛岃鍏堟壂鎻忔潯鐮侊紝纭鏃犺鍚庡啀鎻愪氦锛�',
- icon: 'none'
- })
- } else {
- var s = 0;
- for (var i = 0; i < this.Materlist.length; i++) {
- if (this.Materlist[i].鏁伴噺 > 0) {
- s = 1;
- }
- }
- if (s == 0) {
- uni.showToast({
- title: '娌℃湁鎵弿鐗╂枡鏉$爜锛岃鍏堟壂鎻忕墿鏂欐潯鐮侊紝纭鏃犺鍚庡啀鎻愪氦锛�',
- icon: 'none'
- })
- } else {
- uni.showLoading({
- title: '璇风◢鍊�'
- })
- var sMainStr = JSON.stringify(this.hform);
- uni.request({
- url: this.serverUrl + '/WEBSController/set_SaveOtherInBill_BillCheck_Json',
- method: 'POST',
- dataType: "json",
- data: {
- oMain: sMainStr
- },
- success: (res) => {
- console.log(1, res);
- uni.hideLoading()
- if (res.data.count == 1) {
- uni.showModal({
- title: '鎻愮ず',
- content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
- success: (res) => {
- if (res.confirm) {
- console.log('鐢ㄦ埛鐐瑰嚮纭畾');
- uni.redirectTo({
- url: '/pages/qitaruku/form?OperationType=1'
- })
- } else if (res.cancel) {
- console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
- setTimeout(() => {
- uni.navigateBack();
- }, 50)
- }
- }
- });
- } else {
- // uni.showToast({
- // title: res.data.Message,
- // icon: 'none'
- // })
+ this.hform.HBillNo = ret.resp_result
+ this.GetMeesageByBillNo(this.hform.HBillNo)
+ })
+ },
+ //鎵弿鍗曟嵁鍙锋潯鐮�
+ async GetMeesageByBillNo(e) {
- uni.showModal({
- title: '娓╅Θ鎻愮ず',
- content: res.data.Message,
- showCancel: false
- })
- }
- },
- fail: (res) => {
- console.log(res);
- uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
- icon: 'none'
- })
- },
- });
- }
- }
- },
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/WEBSController/get_BillBarCode_BillCheck_Json',
+ data: {
+ HBillNo: this.hform.HBillNo,
+ HBillType: this.hform.HBillType,
+ HMaker: this.hform.HMaker,
+ HStockOrgID: this.hform.HStockOrgID
+ },
+ })
+ if (!res) {
+ // 瑙﹀彂璇锋眰閿侊紝涓嶈繑鍥炰换浣曞��
+ return
+ }
+ let {
+ data,
+ Message,
+ count
+ } = res.data
+ if (count == 1) {
+ CommonUtils.playSound(1)
+ console.log(data)
+ this.hform.HInterID = data.hInterIDField
+ this.hform.HBillNo = data.hBillNoField
+ this.showHBillNo = false
+ //鏉$爜鏍稿鏍囪
+ if (data.hSourceBarCodeFlagField) {
+ this.hform.HSourceBarCodeCtl = "Y"
+ this.hform.chkHBarflag = true
+ this.hform.HBarflag = data
+ }
+ this.tabs = 2
+ this.DisBillEntryList();
+ this.refreshHBarCodeFocus()
+ } else {
+ CommonUtils.playSound(0)
+ this.refreshHBillNoFocus()
+ uni.showToast({
+ title: Message,
+ icon: 'none'
+ })
+ this.hform.HBillNo = ''
+ }
+ } catch (e) {
+ CommonUtils.playSound(0)
+ this.refreshHBillNoFocus()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触: ' + e,
+ icon: 'none'
+ })
+ }
+ // uni.request({
+ // url: this.serverUrl + '/WEBSController/get_BillBarCode_BillCheck_Json',
+ // data: {
+ // HBillNo: this.hform.HBillNo,
+ // HBillType: this.hform.HBillType,
+ // HMaker: this.hform.HMaker,
+ // HStockOrgID: this.hform.HStockOrgID
+ // },
+ // success: (res) => {
+ // if (res.data.count == 1) {
+ // CommonUtils.playSound(1);
+ // var data = res.data.data
+ // console.log('鍗曟嵁淇℃伅: ', data)
+ // this.hform.HInterID = data.hInterIDField
+ // this.hform.HBillNo = data.hBillNoField
+ // this.showHBillNo = false
+ // //鏉$爜鏍稿鏍囪
+ // if (data.hSourceBarCodeFlagField) {
+ // this.hform.HSourceBarCodeCtl = "Y"
+ // this.hform.chkHBarflag = true
+ // this.hform.HBarflag = data
+ // }
+ // this.tabs = 2
+ // this.DisBillEntryList();
+ // } else {
+ // CommonUtils.playSound(0);
+ // uni.showToast({
+ // title: res.data.Message,
+ // icon: 'none'
+ // })
+ // this.hform.HBillNo = ''
+ // }
+ // },
+ // fail: (res) => {
+ // CommonUtils.playSound(0);
+ // console.log(res);
+ // uni.showToast({
+ // title: '鎺ュ彛璇锋眰澶辫触',
+ // icon: 'none'
+ // })
+ // },
+ // });
+ },
+ //鍩虹浠撳簱璧勬枡
+ getHBaseList() {
+ uni.request({
+ url: this.serverUrl + '/Gy_Warehouse/list',
+ data: {
+ sWhere: "",
+ user: uni.getStorageSync('HUserName'),
+ Organization: uni.getStorageSync('Organization')
+ },
+ success: (res) => {
+ if (res.data.count == 1) {
+ this.HWHNameList = res.data.data
+ for (var i = 0; i < res.data.data.length; i++) {
+ this.arrayHWHName[i] = res.data.data[i].浠撳簱鍚嶇О
+ }
+ } else {
+ uni.showToast({
+ title: '浠撳簱鏁版嵁璇锋眰澶辫触',
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
- goBack() {
- uni.showModal({
- title: '鎻愮ず',
- content: '纭瑕侀��鍑哄綋鍓嶉〉闈㈠悧锛�',
- success: (res) => {
- if (res.confirm) {
- console.log('鐢ㄦ埛鐐瑰嚮纭畾');
- uni.navigateBack({
- url: '/pages/qitaruku/table'
- })
- } else if (res.cancel) {
- console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
- }
- }
- });
- }
- }
- }
+ 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'
+ })
+ },
+ });
+ },
+ //閫夋嫨浠撳簱
+ HWHNameChange(e) {
+ // var name = e.split("(")
+ for (var i = 0; i < this.HWHNameList.length; i++) {
+ if (this.HWHNameList[i].浠撳簱鍚嶇О == e) {
+ this.hform.HWHName = this.HWHNameList[i].浠撳簱鍚嶇О
+ this.hform.HWHID = this.HWHNameList[i].HItemID
+
+ if (this.HWHNameList[i]['鍚敤浠撲綅'] == 'Y') {
+ this.showHStockPlaceName = true
+ } else {
+ this.hform.HStockPlaceName = ''
+ this.showHStockPlaceName = false
+ }
+ }
+ }
+ },
+ //閫夋嫨浠撲綅
+ HStockPlaceNameChange(e) {
+ for (var i = 0; i < this.HStockPlaceNameList.length; i++) {
+ if (this.HStockPlaceNameList[i].浠撲綅鍚嶇О == e) {
+ this.hform.HStockPlaceName = this.HStockPlaceNameList[i].浠撲綅鍚嶇О
+ this.hform.HStockPlaceID = this.HStockPlaceNameList[i].HItemID
+ }
+ }
+ },
+ async getCode(HBarCode) {
+ //浠撳簱銆佷粨浣嶆枃鏈涓虹┖鏃讹紝娓呯┖瀵瑰簲ID
+ if (!this.hform.HWHName) {
+ this.hform.HWHID = 0
+ }
+ if (!this.hform.HStockPlaceName) {
+ this.hform.HStockPlaceID = 0
+ }
+ var sOldBarCode = HBarCode
+ var HDeleteFlag = sOldBarCode.substring(0, 1);
+ var sBarCode = sOldBarCode.slice(1);
+
+ var sHWHID = this.hform.HWHID
+ var sHSPID = this.hform.HStockPlaceID
+ var sHQty = this.hform.HQty
+ var sSourceBillNo = this.hform.HSourceBillNo
+ var sSourceBillType = this.hform.HMainSourceBillType
+ var HSourceFlag = this.hform.HSourceBillNo == '' ? false : true
+ console.log(this.hform.HSourceBillNo, HSourceFlag)
+ if (HDeleteFlag == "*") {
+ if (sBarCode == "") {
+ uni.showToast({
+ title: '璇疯緭鍏ヨ鍒犻櫎鐨勬潯鐮�',
+ icon: 'none'
+ })
+ } else {
+
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json',
+ data: {
+ HInterID: this.hform.HInterID,
+ HBillType: this.hform.HBillType,
+ HBarCode: sBarCode
+ },
+ })
+ if (!res) {
+ // 璇锋眰琚攣瀹氾紝閫�鍑哄綋鍓嶈姹�
+ return
+ }
+ console.log('鍒犻櫎鏉$爜', res.data);
+ this.hform.HBarCode = ''
+ if (res.data.count == 1) {
+ this.hform.HQty = ''
+ this.DisBillEntryList()
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ } catch (e) {
+ CommonUtils.playSound(0)
+ this.refreshHBillNoFocus()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触: ' + e,
+ icon: 'none'
+ })
+ }
+
+ // uni.request({
+ // url: this.serverUrl +
+ // '/WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json',
+ // data: {
+ // HInterID: this.hform.HInterID,
+ // HBillType: this.hform.HBillType,
+ // HBarCode: sBarCode
+ // },
+ // success: (res) => {
+ // console.log('鍒犻櫎鏉$爜', res.data);
+ // this.hform.HBarCode = ''
+ // if (res.data.count == 1) {
+ // this.hform.HQty = ''
+ // this.DisBillEntryList()
+ // } else {
+ // uni.showToast({
+ // title: res.data.Message,
+ // icon: 'none'
+ // })
+ // }
+ // },
+ // fail: (res) => {
+ // console.log(res);
+ // uni.showToast({
+ // title: '鎺ュ彛璇锋眰澶辫触',
+ // icon: 'none'
+ // })
+ // },
+ // });
+ }
+ } else {
+ var sBarCode = this.hform.HBarCode
+ if (sHQty == "") {
+ sHQty = 0;
+ }
+
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/WEBSController/get_CheckTypeByBarCode_BillCheck_Json',
+ data: {
+ sBarCode: sBarCode,
+ HBillID: this.hform.HInterID || 0,
+ HBillType: this.hform.HBillType,
+ HBillNo: this.hform.HBillNo,
+ HMaker: this.hform.HMaker,
+ HWhID: sHWHID,
+ HSPID: sHSPID,
+ HQty: sHQty,
+ // HRedBlueFlag: this.hform.HRedBlueFlag,
+ // SourceFlag: HSourceFlag,
+ // HSourceBillNo: sSourceBillNo,
+ // HSourceBillType: sSourceBillType,
+ HStockOrgID: this.hform.HStockOrgID,
+ // HScanStyle: "",
+ // HCustom1: "",
+ // HCustom2: ""
+ },
+ })
+ if (!res) {
+ return
+ }
+ console.log('鎵爜杩斿洖', res.data);
+ this.hform.HBarCode = ''
+ if (res.data.count == 1) {
+ CommonUtils.playSound(1);
+ var data = res.data.data
+ if (data.hBarTypeField == '浠撳簱鏉$爜') {
+ this.hform.HWHName = data.hWhNameField
+ this.hform.HWHID = data.hWhIDField
+ this.hform.HStockPlaceName = ''
+ this.hform.HStockPlaceID = 0
+ if (data.hSPFlagField == 0) {
+ this.showHStockPlaceName = false
+ } else {
+ this.showHStockPlaceName = true
+ }
+ } else if (data.hBarTypeField == '浠撲綅鏉$爜') {
+ this.hform.HWHName = data.hWhNameField
+ this.hform.HWHID = data.hWhIDField
+ this.hform.HStockPlaceName = data.hSPNameField
+ this.hform.HStockPlaceID = data.hSPIDField
+ } else if (data.hBarTypeField == '閮ㄩ棬鏉$爜') {
+ this.hform.HDeptName = data.hDeptNameField
+ this.hform.HDeptID = data.hDeptIDField
+ this.tabs = 1
+ } else if (data.hBarTypeField == '婧愬崟鏉$爜') {
+ this.hform.HSupName = data.hSupNameField
+ this.hform.HSupID = data.hSupIDField
+ if (data.hDeptIDField != 0) {
+ this.hform.HDeptID = data.hDeptIDField
+ this.hform.HDeptName = data.hDeptNameField
+ }
+ this.hform.HSourceBillNo = data.hSourceBillNoField
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ if (data.hSourceBillTypeField == "1103") {
+ this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ this.hform.HMainSourceBillType = 1103
+ this.showHMainSourceBillType = false
+ } else if (data.hSourceBillTypeField == "1102") {
+ this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ this.hform.HMainSourceBillType = 1102
+ this.showHMainSourceBillType = false
+ } else {
+ this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ this.hform.HMainSourceBillType = -1
+ this.showHMainSourceBillType = false
+ }
+ if (data.hMulSourceFlagField == 0) {
+ this.showHSourceBillNo = false
+ }
+ //渚涘簲鍟嗕笉鍙紪杈�
+ this.showHSupName = false
+ this.tabs = 2
+ } else { //鐗╂枡鏉$爜
+ this.tabs = 2
+ console.log('data', data)
+ if (!this.hform.HSourceBillNo) {
+ this.hform.HSupName = data.hSupNameField
+ this.hform.HSupID = data.hSupIDField
+ this.hform.HSourceBillNo = data.hSourceBillNoField
+ if (data.hDeptIDField != 0) {
+ this.hform.HDeptID = data.hDeptIDField
+ this.hform.HDeptName = data.hDeptNameField
+ }
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
+ if (data.hSourceBillTypeField == "1103") {
+ this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ this.hform.HMainSourceBillType = 1103
+ this.showHMainSourceBillType = false
+ } else if (data.hSourceBillTypeField == "1102") {
+ this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ this.hform.HMainSourceBillType = 1102
+ this.showHMainSourceBillType = false
+ } else {
+ this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ this.hform.HMainSourceBillType = -1
+ this.showHMainSourceBillType = false
+ }
+ if (data.hMulSourceFlagField == 0) {
+ this.showHSourceBillNo = false
+ }
+ //渚涘簲鍟嗕笉鍙紪杈�
+ this.showHSupName = false
+ }
+ }
+ //鏄剧ず琛ㄤ綋鏄庣粏
+ this.DisBillEntryList()
+ //娓呯┖鏁伴噺
+ this.hform.HQty = ''
+ this.refreshHBarCodeFocus()
+ } else {
+ CommonUtils.playSound(0);
+ this.refreshHBillNoFocus()
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ } catch (e) {
+ CommonUtils.playSound(0)
+ this.refreshHBillNoFocus()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触: ' + e,
+ icon: 'none'
+ })
+ }
+
+ // uni.request({
+ // url: this.serverUrl + '/WEBSController/get_CheckTypeByBarCode_BillCheck_Json',
+ // data: {
+ // sBarCode: sBarCode,
+ // HBillID: this.hform.HInterID || 0,
+ // HBillType: this.hform.HBillType,
+ // HBillNo: this.hform.HBillNo,
+ // HMaker: this.hform.HMaker,
+ // HWhID: sHWHID,
+ // HSPID: sHSPID,
+ // HQty: sHQty,
+ // // HRedBlueFlag: this.hform.HRedBlueFlag,
+ // // SourceFlag: HSourceFlag,
+ // // HSourceBillNo: sSourceBillNo,
+ // // HSourceBillType: sSourceBillType,
+ // HStockOrgID: this.hform.HStockOrgID,
+ // // HScanStyle: "",
+ // // HCustom1: "",
+ // // HCustom2: ""
+ // },
+ // success: (res) => {
+ // console.log('鎵爜杩斿洖', res.data);
+ // this.hform.HBarCode = ''
+ // if (res.data.count == 1) {
+ // CommonUtils.playSound(1);
+ // var data = res.data.data
+ // if (data.hBarTypeField == '浠撳簱鏉$爜') {
+ // this.hform.HWHName = data.hWhNameField
+ // this.hform.HWHID = data.hWhIDField
+ // this.hform.HStockPlaceName = ''
+ // this.hform.HStockPlaceID = 0
+ // // if (data.hSPFlagField == 0) {
+ // // this.showHStockPlaceName = false
+ // // } else {
+ // // this.showHStockPlaceName = true
+ // // }
+ // } else if (data.hBarTypeField == '浠撲綅鏉$爜') {
+ // this.hform.HWHName = data.hWhNameField
+ // this.hform.HWHID = data.hWhIDField
+ // this.hform.HStockPlaceName = data.hSPNameField
+ // this.hform.HStockPlaceID = data.hSPIDField
+ // } else if (data.hBarTypeField == '閮ㄩ棬鏉$爜') {
+ // this.hform.HDeptName = data.hDeptNameField
+ // this.hform.HDeptID = data.hDeptIDField
+ // this.tabs = 1
+ // } else if (data.hBarTypeField == '婧愬崟鏉$爜') {
+ // this.hform.HSupName = data.hSupNameField
+ // this.hform.HSupID = data.hSupIDField
+ // if (data.hDeptIDField != 0) {
+ // this.hform.HDeptID = data.hDeptIDField
+ // this.hform.HDeptName = data.hDeptNameField
+ // }
+ // this.hform.HSourceBillNo = data.hSourceBillNoField
+ // //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ // if (data.hSourceBillTypeField == "1103") {
+ // this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ // this.hform.HMainSourceBillType = 1103
+ // this.showHMainSourceBillType = false
+ // } else if (data.hSourceBillTypeField == "1102") {
+ // this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ // this.hform.HMainSourceBillType = 1102
+ // this.showHMainSourceBillType = false
+ // } else {
+ // this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ // this.hform.HMainSourceBillType = -1
+ // this.showHMainSourceBillType = false
+ // }
+ // if (data.hMulSourceFlagField == 0) {
+ // this.showHSourceBillNo = false
+ // }
+ // //渚涘簲鍟嗕笉鍙紪杈�
+ // this.showHSupName = false
+ // this.tabs = 2
+ // } else { //鐗╂枡鏉$爜
+ // this.tabs = 2
+ // if (!this.hform.HSourceBillNo) {
+ // this.hform.HSupName = data.hSupNameField
+ // this.hform.HSupID = data.hSupIDField
+ // this.hform.HSourceBillNo = data.hSourceBillNoField
+ // if (data.hDeptIDField != 0) {
+ // this.hform.HDeptID = data.hDeptIDField
+ // this.hform.HDeptName = data.hDeptNameField
+ // }
+ // console.log(data)
+ // //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ // this.hform.HMainSourceBillType = data.hSourceBillTypeField
+ // if (data.hSourceBillTypeField == "1103") {
+ // this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ // this.hform.HMainSourceBillType = 1103
+ // this.showHMainSourceBillType = false
+ // } else if (data.hSourceBillTypeField == "1102") {
+ // this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ // this.hform.HMainSourceBillType = 1102
+ // this.showHMainSourceBillType = false
+ // } else {
+ // this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ // this.hform.HMainSourceBillType = -1
+ // this.showHMainSourceBillType = false
+ // }
+ // if (data.hMulSourceFlagField == 0) {
+ // this.showHSourceBillNo = false
+ // }
+ // //渚涘簲鍟嗕笉鍙紪杈�
+ // this.showHSupName = false
+ // }
+ // }
+ // //鏄剧ず琛ㄤ綋鏄庣粏
+ // this.DisBillEntryList()
+ // //娓呯┖鏁伴噺
+ // this.hform.HQty = ''
+ // } else {
+ // CommonUtils.playSound(0);
+ // uni.showToast({
+ // title: res.data.Message,
+ // icon: 'none'
+ // })
+ // }
+ // },
+ // fail: (res) => {
+ // CommonUtils.playSound(0);
+ // console.log(res);
+ // uni.showToast({
+ // title: '鎺ュ彛璇锋眰澶辫触',
+ // icon: 'none'
+ // })
+ // },
+ // });
+ }
+ },
+ //鐗╂枡淇℃伅
+ DisBillEntryList() {
+ uni.request({
+ url: this.serverUrl + '/WEBSController/GetKf_PonderationBillMain_Temp_BillCheck_New_Json',
+ data: {
+ HInterID: this.hform.HInterID,
+ HBillType: this.hform.HBillType,
+ HSourceBarCodeCtl: this.hform.HSourceBarCodeCtl,
+ sWhere: ''
+ },
+ success: (res) => {
+ console.log('鐗╂枡', res.data)
+ if (res.data.count == 1) {
+ var data = res.data.data
+ this.Materlist = data.Materlist
+ if (!data.BarCodeDetailslist[0].HBarCode) {
+ this.hform.HMaterName_B = ''
+ this.hform.HMaterModel_B = ''
+ this.hform.HBatchNo_B = ''
+ this.hform.HUnitName_B = ''
+ this.hform.HQty_B = ''
+ this.hform.HTMQty_B = ''
+ this.hform.HWHName_B = ''
+ this.hform.HSPName_B = ''
+ } else {
+ this.hform.HBarCode_B = data.BarCodeDetailslist[0].HBarCode
+ this.hform.HMaterName_B = data.BarCodeDetailslist[0].HMaterName
+ this.hform.HMaterModel_B = data.BarCodeDetailslist[0].HMaterModel
+ this.hform.HBatchNo_B = data.BarCodeDetailslist[0].HBatchNo
+ this.hform.HUnitName_B = data.BarCodeDetailslist[0].HUnitName
+ this.hform.HQty_B = data.BarCodeDetailslist[0].HQty
+ this.hform.HTMQty_B = data.BarCodeDetailslist[0].HTMQty
+ this.hform.HWHName_B = data.BarCodeDetailslist[0].HWHName
+ this.hform.HSPName_B = data.BarCodeDetailslist[0].HSPName
+ }
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ },
+ //鍒犻櫎鐗╂枡鐮�
+ delMater(item) {
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '纭瑕佸垹闄� " ' + item.鐗╂枡鍚嶇О + ' " 鎵�鏈夋壂鐮佽褰曪紵鍒犻櫎鍚庡皢涓嶅彲鎭㈠锛�',
+ success: (res) => {
+ if (res.confirm) {
+ uni.request({
+ url: this.serverUrl +
+ '/WEBSController/set_DeleteBarCodeByEntryID_BillCheck_New_Json',
+ data: {
+ HInterID: this.hform.HInterID,
+ HBillType: this.hform.HBillType,
+ HSourceInterID: item.HSourceInterID,
+ HSourceEntryID: item.HSourceEntryID,
+ HSourceBarCodeCtl: this.hform.HSourceBarCodeCtl
+ },
+ success: (res) => {
+ if (res.data.count == 1) {
+ this.DisBillEntryList()
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ }
+ }
+ });
+ },
+ async submit() {
+ if (this.hform.HInterID == 0 || !this.hform.HInterID) {
+ uni.showToast({
+ title: '娌℃湁鎵爜淇℃伅锛岃鍏堟壂鎻忓崟鎹潯鐮侊紒',
+ icon: 'none'
+ })
+ } else if (!this.hform.HBillNo) {
+ uni.showToast({
+ title: '鍗曟嵁鍙疯幏鍙栧け璐ワ紝閿欒鐨勫崟鎹彿锛�',
+ icon: 'none'
+ })
+ } else if (!this.Materlist || this.Materlist.length == 0) {
+ uni.showToast({
+ title: '娌℃湁鎵爜淇℃伅锛岃鍏堟壂鎻忔潯鐮侊紝纭鏃犺鍚庡啀鎻愪氦锛�',
+ icon: 'none'
+ })
+ } else {
+ var s = 0;
+ for (var i = 0; i < this.Materlist.length; i++) {
+ if (this.Materlist[i].鏁伴噺 > 0) {
+ s = 1;
+ }
+ }
+ if (s == 0) {
+ uni.showToast({
+ title: '娌℃湁鎵弿鐗╂枡鏉$爜锛岃鍏堟壂鎻忕墿鏂欐潯鐮侊紝纭鏃犺鍚庡啀鎻愪氦锛�',
+ icon: 'none'
+ })
+ } else {
+ // uni.showLoading({
+ // title: '璇风◢鍊�'
+ // })
+ var sMainStr = JSON.stringify(this.hform);
+
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/WEBSController/set_SaveOtherInBill_BillCheck_Json',
+ method: 'POST',
+ data: {
+ oMain: sMainStr
+ },
+ })
+
+ if (!res) {
+ return
+ }
+
+ console.log(1, res);
+ uni.hideLoading()
+ if (res.data.count == 1) {
+ uni.showModal({
+ title: '鎻愮ず',
+ content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.redirectTo({
+ url: '/pages/qitachukujiaoyan/form?OperationType=1'
+ })
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 50)
+ }
+ }
+ });
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+
+ } catch (e) {
+ CommonUtils.playSound(0)
+ this.refreshHBillNoFocus()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触: ' + e,
+ icon: 'none'
+ })
+ }
+
+ // uni.request({
+ // url: this.serverUrl + '/WEBSController/set_SaveOtherInBill_BillCheck_Json',
+ // method: 'POST',
+ // dataType: "json",
+ // data: {
+ // oMain: sMainStr
+ // },
+ // success: (res) => {
+ // console.log(1, res);
+ // uni.hideLoading()
+ // if (res.data.count == 1) {
+ // uni.showModal({
+ // title: '鎻愮ず',
+ // content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
+ // success: (res) => {
+ // if (res.confirm) {
+ // console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ // uni.redirectTo({
+ // url: '/pages/qitaruku/form?OperationType=1'
+ // })
+ // } else if (res.cancel) {
+ // console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ // setTimeout(() => {
+ // uni.navigateBack();
+ // }, 50)
+ // }
+ // }
+ // });
+ // } else {
+ // // uni.showToast({
+ // // title: res.data.Message,
+ // // icon: 'none'
+ // // })
+ //
+ // uni.showModal({
+ // title: '娓╅Θ鎻愮ず',
+ // content: res.data.Message,
+ // showCancel: false
+ // })
+ // }
+ // },
+ // fail: (res) => {
+ // console.log(res);
+ // uni.showToast({
+ // title: '鎺ュ彛璇锋眰澶辫触',
+ // icon: 'none'
+ // })
+ // },
+ // });
+ }
+ }
+ },
+
+ goBack() {
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '纭瑕侀��鍑哄綋鍓嶉〉闈㈠悧锛�',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.navigateBack({
+ url: '/pages/qitaruku/table'
+ })
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ }
+ }
+ });
+ }
+ }
+ }
</script>
<style lang="scss" scoped>
- .form {
- width: 668rpx;
- margin: 20rpx auto;
- padding-bottom: 240rpx;
- }
+ .form {
+ width: 668rpx;
+ margin: 20rpx auto;
+ padding-bottom: 240rpx;
+ }
- .tab_area {
- width: 100%;
- height: 50rpx;
- }
+ .tab_area {
+ width: 100%;
+ height: 50rpx;
+ }
- .other {
- margin-top: 8rpx;
- text-align: center;
- font-size: 28rpx;
- padding: 4rpx 18rpx;
- color: #1890FF;
- }
+ .other {
+ margin-top: 8rpx;
+ text-align: center;
+ font-size: 28rpx;
+ padding: 4rpx 18rpx;
+ color: #1890FF;
+ }
- .tabs {
- width: 100%;
- display: flex;
- border-bottom: 1px solid #ddd;
- margin: 20rpx 0;
+ .tabs {
+ width: 100%;
+ display: flex;
+ border-bottom: 1px solid #ddd;
+ margin: 20rpx 0;
- view {
- width: 25%;
- font-size: 30rpx;
- color: #555;
- text-align: center;
- padding: 16rpx 0;
- flex: 1;
- }
+ view {
+ width: 25%;
+ font-size: 30rpx;
+ color: #555;
+ text-align: center;
+ padding: 16rpx 0;
+ flex: 1;
+ }
- .on {
- color: #3a78ff;
- font-weight: bold;
- border-bottom: 3px solid #3a78ff;
- }
- }
+ .on {
+ color: #3a78ff;
+ font-weight: bold;
+ border-bottom: 3px solid #3a78ff;
+ }
+ }
- .form-item {
- display: flex;
- align-items: center;
- font-size: 30rpx;
- padding: 6rpx 0;
+ .form-item {
+ display: flex;
+ align-items: center;
+ font-size: 30rpx;
+ padding: 6rpx 0;
- .title {
- width: 208rpx;
+ .title {
+ width: 208rpx;
- text {
- color: red;
- font-weight: bold;
- }
- }
+ text {
+ color: red;
+ font-weight: bold;
+ }
+ }
- .right {
- flex: 1;
- border-radius: 22rpx;
- border: 1px solid #acacac;
- }
+ .right {
+ flex: 1;
+ border-radius: 22rpx;
+ border: 1px solid #acacac;
+ }
- .righton {
- width: 450rpx;
- border-radius: 22rpx;
- border: 1px solid #e4e4e4;
- background-color: #e4e4e4;
- }
+ .righton {
+ width: 450rpx;
+ border-radius: 22rpx;
+ border: 1px solid #e4e4e4;
+ background-color: #e4e4e4;
+ }
- input {
- // width: 100%;
- padding: 8rpx 20rpx;
- font-size: 30rpx;
- }
+ input {
+ // width: 100%;
+ padding: 8rpx 20rpx;
+ font-size: 30rpx;
+ }
- textarea {
- width: 98%;
- padding: 8rpx 20rpx;
- font-size: 30rpx;
- }
+ textarea {
+ width: 98%;
+ padding: 8rpx 20rpx;
+ font-size: 30rpx;
+ }
- }
+ }
- .bottom-btn {
- width: 100%;
- // height: 120rpx;
- position: fixed;
- bottom: 0;
- left: 0;
- background-color: #fff;
- box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4);
- padding: 30rpx 40rpx 40rpx 40rpx;
+ .bottom-btn {
+ width: 100%;
+ // height: 120rpx;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ background-color: #fff;
+ box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4);
+ padding: 30rpx 40rpx 40rpx 40rpx;
- button {
- border-radius: 50rpx;
- width: 180rpx;
- height: 66rpx;
- line-height: 66rpx;
- font-size: 28rpx;
- }
+ button {
+ border-radius: 50rpx;
+ width: 180rpx;
+ height: 66rpx;
+ line-height: 66rpx;
+ font-size: 28rpx;
+ }
- .btn-a {
- background-color: #3A78FF;
- color: #fff;
- }
+ .btn-a {
+ background-color: #3A78FF;
+ color: #fff;
+ }
- .btn-b {
- background-color: #41a863;
- color: #fff;
- }
+ .btn-b {
+ background-color: #41a863;
+ color: #fff;
+ }
- .btn-c {
- background-color: #acacac;
- color: #fff;
- position: absolute;
- right: 120rpx;
- }
+ .btn-c {
+ background-color: #acacac;
+ color: #fff;
+ position: absolute;
+ right: 120rpx;
+ }
- .btn-d {
- background-color: #ff8901;
- color: #fff;
- }
- }
+ .btn-d {
+ background-color: #ff8901;
+ color: #fff;
+ }
+ }
- .list {
- width: 100%;
+ .list {
+ width: 100%;
- .card-detail {
- width: 100%;
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- line-height: 120%;
+ .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;
+ .detail {
+ // width: 50%;
+ font-size: 26rpx;
+ margin-bottom: 12rpx;
+ color: #555;
+ margin-right: 20rpx;
- text {
- color: #999;
- font-size: 26rpx;
- }
- }
- }
+ text {
+ color: #999;
+ font-size: 26rpx;
+ }
+ }
+ }
- .more {
- color: #888;
- font-size: 24rpx;
- display: flex;
- border-top: 1px solid #eee;
- padding-top: 20rpx;
+ .more {
+ color: #888;
+ font-size: 24rpx;
+ display: flex;
+ border-top: 1px solid #eee;
+ padding-top: 20rpx;
- .part {
- width: 50%;
- text-align: center;
- }
- }
- }
+ .part {
+ width: 50%;
+ text-align: center;
+ }
+ }
+ }
- .checkbox {
- color: #888;
- font-size: 28rpx;
- margin-top: 30rpx;
- float: right;
- }
+ .checkbox {
+ color: #888;
+ font-size: 28rpx;
+ margin-top: 30rpx;
+ float: right;
+ }
</style>
\ No newline at end of file
diff --git a/pages/shengchanbuliaojiaoyan/form.vue b/pages/shengchanbuliaojiaoyan/form.vue
index f29fc3c..1710758 100644
--- a/pages/shengchanbuliaojiaoyan/form.vue
+++ b/pages/shengchanbuliaojiaoyan/form.vue
@@ -308,52 +308,108 @@
})
},
//鎵弿鍗曟嵁鍙锋潯鐮�
- GetMeesageByBillNo(e) {
- uni.request({
- url: this.serverUrl + '/WEBSController/get_BillBarCode_BillCheck_Json',
- data: {
- HBillNo: this.hform.HBillNo,
- HBillType: this.hform.HBillType,
- HMaker: this.hform.HMaker,
- HStockOrgID: this.hform.HStockOrgID
- },
- success: (res) => {
- if (res.data.count == 1) {
- var data = res.data.data
- console.log('鍗曟嵁淇℃伅: ', data)
- this.hform.HInterID = data.hInterIDField
- this.hform.HBillNo = data.hBillNoField
- this.showHBillNo = false
- //鏉$爜鏍稿鏍囪
- if (data.hSourceBarCodeFlagField) {
- this.hform.HSourceBarCodeCtl = "Y"
- this.hform.chkHBarflag = true
- this.hform.HBarflag = data
- }
- this.tabs = 2
- this.BarCodeFocus = true
- CommonUtils.playSound(1)
- this.DisBillEntryList();
- } else {
- CommonUtils.playSound(0)
- this.refreshHBillState()
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
- this.hform.HBillNo = ''
+ async GetMeesageByBillNo(e) {
+
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/WEBSController/get_BillBarCode_BillCheck_Json',
+ data: {
+ HBillNo: this.hform.HBillNo,
+ HBillType: this.hform.HBillType,
+ HMaker: this.hform.HMaker,
+ HStockOrgID: this.hform.HStockOrgID
+ },
+ })
+
+ if (!res) {
+ // 瑙﹀彂璇锋眰閿侊紝涓嶈繑鍥炰换浣曞��
+ return
+ }
+
+ let {
+ data,
+ Message,
+ count
+ } = res.data
+ if (count == 1) {
+ CommonUtils.playSound(1)
+ console.log(data)
+ this.hform.HInterID = data.hInterIDField
+ this.hform.HBillNo = data.hBillNoField
+ this.showHBillNo = false
+ //鏉$爜鏍稿鏍囪
+ if (data.hSourceBarCodeFlagField) {
+ this.hform.HSourceBarCodeCtl = "Y"
+ this.hform.chkHBarflag = true
+ this.hform.HBarflag = data
}
- },
- fail: (res) => {
+ this.tabs = 2
+ this.DisBillEntryList();
+ this.refreshBarCodeState()
+ } else {
CommonUtils.playSound(0)
this.refreshHBillState()
- console.log(res);
uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
+ title: Message,
icon: 'none'
})
- },
- });
+ this.hform.HBillNo = ''
+ }
+
+ } catch (e) {
+ CommonUtils.playSound(0)
+ this.refreshHBillState()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触: ' + e,
+ icon: 'none'
+ })
+ }
+
+ // uni.request({
+ // url: this.serverUrl + '/WEBSController/get_BillBarCode_BillCheck_Json',
+ // data: {
+ // HBillNo: this.hform.HBillNo,
+ // HBillType: this.hform.HBillType,
+ // HMaker: this.hform.HMaker,
+ // HStockOrgID: this.hform.HStockOrgID
+ // },
+ // success: (res) => {
+ // if (res.data.count == 1) {
+ // var data = res.data.data
+ // console.log('鍗曟嵁淇℃伅: ', data)
+ // this.hform.HInterID = data.hInterIDField
+ // this.hform.HBillNo = data.hBillNoField
+ // this.showHBillNo = false
+ // //鏉$爜鏍稿鏍囪
+ // if (data.hSourceBarCodeFlagField) {
+ // this.hform.HSourceBarCodeCtl = "Y"
+ // this.hform.chkHBarflag = true
+ // this.hform.HBarflag = data
+ // }
+ // this.tabs = 2
+ // this.BarCodeFocus = true
+ // CommonUtils.playSound(1)
+ // this.DisBillEntryList();
+ // } else {
+ // CommonUtils.playSound(0)
+ // this.refreshHBillState()
+ // uni.showToast({
+ // title: res.data.Message,
+ // icon: 'none'
+ // })
+ // this.hform.HBillNo = ''
+ // }
+ // },
+ // fail: (res) => {
+ // CommonUtils.playSound(0)
+ // this.refreshHBillState()
+ // console.log(res);
+ // uni.showToast({
+ // title: '鎺ュ彛璇锋眰澶辫触',
+ // icon: 'none'
+ // })
+ // },
+ // });
},
//鍩虹浠撳簱璧勬枡
getHBaseList() {
@@ -442,7 +498,7 @@
}
},
//鎵潯鐮佸鐞�
- getCode(HBarCode) {
+ async getCode(HBarCode) {
//浠撳簱銆佷粨浣嶆枃鏈涓虹┖鏃讹紝娓呯┖瀵瑰簲ID
if (!this.hform.HWHName) {
this.hform.HWHID = 0
@@ -468,100 +524,170 @@
icon: 'none'
})
} else {
- uni.request({
- url: this.serverUrl +
- '/WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json',
- data: {
- HInterID: this.hform.HInterID,
- HBillType: this.hform.HBillType,
- HBarCode: sBarCode
- },
- success: (res) => {
- console.log('鍒犻櫎鏉$爜', res.data);
- this.hform.HBarCode = ''
- if (res.data.count == 1) {
- this.hform.HQty = ''
- this.DisBillEntryList()
- CommonUtils.playSound(1)
- } else {
- CommonUtils.playSound(0)
- this.refreshBarCodeState()
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- console.log(res);
- this.refreshBarCodeState()
- CommonUtils.playSound(0)
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json',
+ data: {
+ HInterID: this.hform.HInterID,
+ HBillType: this.hform.HBillType,
+ HBarCode: sBarCode
+ },
+ })
+ if (!res) {
+ // 璇锋眰琚攣瀹氾紝閫�鍑哄綋鍓嶈姹�
+ return
+ }
+ console.log('鍒犻櫎鏉$爜', res.data);
+ this.hform.HBarCode = ''
+ if (res.data.count == 1) {
+ this.hform.HQty = ''
+ this.DisBillEntryList()
+ } else {
uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
+ title: res.data.Message,
icon: 'none'
})
- },
- });
+ }
+ } catch (e) {
+ CommonUtils.playSound(0)
+ this.refreshHBillState()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触: ' + e,
+ icon: 'none'
+ })
+ }
+
+ // uni.request({
+ // url: this.serverUrl +
+ // '/WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json',
+ // data: {
+ // HInterID: this.hform.HInterID,
+ // HBillType: this.hform.HBillType,
+ // HBarCode: sBarCode
+ // },
+ // success: (res) => {
+ // console.log('鍒犻櫎鏉$爜', res.data);
+ // this.hform.HBarCode = ''
+ // if (res.data.count == 1) {
+ // this.hform.HQty = ''
+ // this.DisBillEntryList()
+ // CommonUtils.playSound(1)
+ // } else {
+ // CommonUtils.playSound(0)
+ // this.refreshBarCodeState()
+ // uni.showToast({
+ // title: res.data.Message,
+ // icon: 'none'
+ // })
+ // }
+ // },
+ // fail: (res) => {
+ // console.log(res);
+ // this.refreshBarCodeState()
+ // CommonUtils.playSound(0)
+ // uni.showToast({
+ // title: '鎺ュ彛璇锋眰澶辫触',
+ // icon: 'none'
+ // })
+ // },
+ // });
}
} else {
var sBarCode = this.hform.HBarCode
if (sHQty == "") {
sHQty = 0;
}
- uni.request({
- url: this.serverUrl + '/WEBSController/get_CheckTypeByBarCode_BillCheck_Json',
- data: {
- sBarCode: sBarCode,
- HBillID: this.hform.HInterID || 0,
- HBillType: this.hform.HBillType,
- HBillNo: this.hform.HBillNo,
- HMaker: this.hform.HMaker,
- HWhID: sHWHID,
- HSPID: sHSPID,
- HQty: sHQty,
- // HRedBlueFlag: this.hform.HRedBlueFlag,
- // SourceFlag: HSourceFlag,
- // HSourceBillNo: sSourceBillNo,
- // HSourceBillType: sSourceBillType,
- HStockOrgID: this.hform.HStockOrgID,
- // HScanStyle: "",
- // HCustom1: "",
- // HCustom2: ""
- },
- success: (res) => {
- console.log('鎵爜杩斿洖', res.data);
- this.hform.HBarCode = ''
- if (res.data.count == 1) {
- CommonUtils.playSound(1)
- var data = res.data.data
- if (data.hBarTypeField == '浠撳簱鏉$爜') {
- this.hform.HWHName = data.hWhNameField
- this.hform.HWHID = data.hWhIDField
- this.hform.HStockPlaceName = ''
- this.hform.HStockPlaceID = 0
- if (data.hSPFlagField == 0) {
- this.showHStockPlaceName = false
- } else {
- this.showHStockPlaceName = true
- }
- } else if (data.hBarTypeField == '浠撲綅鏉$爜') {
- this.hform.HWHName = data.hWhNameField
- this.hform.HWHID = data.hWhIDField
- this.hform.HStockPlaceName = data.hSPNameField
- this.hform.HStockPlaceID = data.hSPIDField
- } else if (data.hBarTypeField == '閮ㄩ棬鏉$爜') {
- this.hform.HDeptName = data.hDeptNameField
+
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/WEBSController/get_CheckTypeByBarCode_BillCheck_Json',
+ data: {
+ sBarCode: sBarCode,
+ HBillID: this.hform.HInterID || 0,
+ HBillType: this.hform.HBillType,
+ HBillNo: this.hform.HBillNo,
+ HMaker: this.hform.HMaker,
+ HWhID: sHWHID,
+ HSPID: sHSPID,
+ HQty: sHQty,
+ // HRedBlueFlag: this.hform.HRedBlueFlag,
+ // SourceFlag: HSourceFlag,
+ // HSourceBillNo: sSourceBillNo,
+ // HSourceBillType: sSourceBillType,
+ HStockOrgID: this.hform.HStockOrgID,
+ // HScanStyle: "",
+ // HCustom1: "",
+ // HCustom2: ""
+ },
+ })
+ if (!res) {
+ return
+ }
+ console.log('鎵爜杩斿洖', res.data);
+ this.hform.HBarCode = ''
+ if (res.data.count == 1) {
+ CommonUtils.playSound(1);
+ var data = res.data.data
+ if (data.hBarTypeField == '浠撳簱鏉$爜') {
+ this.hform.HWHName = data.hWhNameField
+ this.hform.HWHID = data.hWhIDField
+ this.hform.HStockPlaceName = ''
+ this.hform.HStockPlaceID = 0
+ if (data.hSPFlagField == 0) {
+ this.showHStockPlaceName = false
+ } else {
+ this.showHStockPlaceName = true
+ }
+ } else if (data.hBarTypeField == '浠撲綅鏉$爜') {
+ this.hform.HWHName = data.hWhNameField
+ this.hform.HWHID = data.hWhIDField
+ this.hform.HStockPlaceName = data.hSPNameField
+ this.hform.HStockPlaceID = data.hSPIDField
+ } else if (data.hBarTypeField == '閮ㄩ棬鏉$爜') {
+ this.hform.HDeptName = data.hDeptNameField
+ this.hform.HDeptID = data.hDeptIDField
+ this.tabs = 1
+ } else if (data.hBarTypeField == '婧愬崟鏉$爜') {
+ this.hform.HSupName = data.hSupNameField
+ this.hform.HSupID = data.hSupIDField
+ if (data.hDeptIDField != 0) {
this.hform.HDeptID = data.hDeptIDField
- this.tabs = 1
- } else if (data.hBarTypeField == '婧愬崟鏉$爜') {
+ this.hform.HDeptName = data.hDeptNameField
+ }
+ this.hform.HSourceBillNo = data.hSourceBillNoField
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ if (data.hSourceBillTypeField == "1103") {
+ this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ this.hform.HMainSourceBillType = 1103
+ this.showHMainSourceBillType = false
+ } else if (data.hSourceBillTypeField == "1102") {
+ this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ this.hform.HMainSourceBillType = 1102
+ this.showHMainSourceBillType = false
+ } else {
+ this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ this.hform.HMainSourceBillType = -1
+ this.showHMainSourceBillType = false
+ }
+ if (data.hMulSourceFlagField == 0) {
+ this.showHSourceBillNo = false
+ }
+ //渚涘簲鍟嗕笉鍙紪杈�
+ this.showHSupName = false
+ this.tabs = 2
+ } else { //鐗╂枡鏉$爜
+ this.tabs = 2
+ console.log('data', data)
+ if (!this.hform.HSourceBillNo) {
this.hform.HSupName = data.hSupNameField
this.hform.HSupID = data.hSupIDField
+ this.hform.HSourceBillNo = data.hSourceBillNoField
if (data.hDeptIDField != 0) {
this.hform.HDeptID = data.hDeptIDField
this.hform.HDeptName = data.hDeptNameField
}
- this.hform.HSourceBillNo = data.hSourceBillNoField
//鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
if (data.hSourceBillTypeField == "1103") {
this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
this.hform.HMainSourceBillType = 1103
@@ -580,63 +706,159 @@
}
//渚涘簲鍟嗕笉鍙紪杈�
this.showHSupName = false
- this.tabs = 2
- } else { //鐗╂枡鏉$爜
- this.tabs = 2
- if (!this.hform.HSourceBillNo) {
- this.hform.HSupName = data.hSupNameField
- this.hform.HSupID = data.hSupIDField
- this.hform.HSourceBillNo = data.hSourceBillNoField
- if (data.hDeptIDField != 0) {
- this.hform.HDeptID = data.hDeptIDField
- this.hform.HDeptName = data.hDeptNameField
- }
- console.log(data)
- //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
- this.hform.HMainSourceBillType = data.hSourceBillTypeField
- if (data.hSourceBillTypeField == "1103") {
- this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
- this.hform.HMainSourceBillType = 1103
- this.showHMainSourceBillType = false
- } else if (data.hSourceBillTypeField == "1102") {
- this.HMainSourceBillType = '閲囪喘璁㈠崟'
- this.hform.HMainSourceBillType = 1102
- this.showHMainSourceBillType = false
- } else {
- this.HMainSourceBillType = '鎵嬪伐褰曞叆'
- this.hform.HMainSourceBillType = -1
- this.showHMainSourceBillType = false
- }
- if (data.hMulSourceFlagField == 0) {
- this.showHSourceBillNo = false
- }
- //渚涘簲鍟嗕笉鍙紪杈�
- this.showHSupName = false
- }
}
- //鏄剧ず琛ㄤ綋鏄庣粏
- this.DisBillEntryList()
- //娓呯┖鏁伴噺
- this.hform.HQty = ''
- } else {
- CommonUtils.playSound(0)
- this.refreshBarCodeState()
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
}
- },
- fail: (res) => {
- CommonUtils.playSound(0)
+ //鏄剧ず琛ㄤ綋鏄庣粏
this.refreshBarCodeState()
- console.log(res);
+ this.DisBillEntryList()
+ //娓呯┖鏁伴噺
+ this.hform.HQty = ''
+ } else {
+ CommonUtils.playSound(0);
+ this.refreshHBillState()
uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
+ title: res.data.Message,
icon: 'none'
})
- },
- });
+ }
+ } catch (e) {
+ CommonUtils.playSound(0)
+ this.refreshHBillState()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触: ' + e,
+ icon: 'none'
+ })
+ }
+
+ // uni.request({
+ // url: this.serverUrl + '/WEBSController/get_CheckTypeByBarCode_BillCheck_Json',
+ // data: {
+ // sBarCode: sBarCode,
+ // HBillID: this.hform.HInterID || 0,
+ // HBillType: this.hform.HBillType,
+ // HBillNo: this.hform.HBillNo,
+ // HMaker: this.hform.HMaker,
+ // HWhID: sHWHID,
+ // HSPID: sHSPID,
+ // HQty: sHQty,
+ // // HRedBlueFlag: this.hform.HRedBlueFlag,
+ // // SourceFlag: HSourceFlag,
+ // // HSourceBillNo: sSourceBillNo,
+ // // HSourceBillType: sSourceBillType,
+ // HStockOrgID: this.hform.HStockOrgID,
+ // // HScanStyle: "",
+ // // HCustom1: "",
+ // // HCustom2: ""
+ // },
+ // success: (res) => {
+ // console.log('鎵爜杩斿洖', res.data);
+ // this.hform.HBarCode = ''
+ // if (res.data.count == 1) {
+ // CommonUtils.playSound(1)
+ // var data = res.data.data
+ // if (data.hBarTypeField == '浠撳簱鏉$爜') {
+ // this.hform.HWHName = data.hWhNameField
+ // this.hform.HWHID = data.hWhIDField
+ // this.hform.HStockPlaceName = ''
+ // this.hform.HStockPlaceID = 0
+ // if (data.hSPFlagField == 0) {
+ // this.showHStockPlaceName = false
+ // } else {
+ // this.showHStockPlaceName = true
+ // }
+ // } else if (data.hBarTypeField == '浠撲綅鏉$爜') {
+ // this.hform.HWHName = data.hWhNameField
+ // this.hform.HWHID = data.hWhIDField
+ // this.hform.HStockPlaceName = data.hSPNameField
+ // this.hform.HStockPlaceID = data.hSPIDField
+ // } else if (data.hBarTypeField == '閮ㄩ棬鏉$爜') {
+ // this.hform.HDeptName = data.hDeptNameField
+ // this.hform.HDeptID = data.hDeptIDField
+ // this.tabs = 1
+ // } else if (data.hBarTypeField == '婧愬崟鏉$爜') {
+ // this.hform.HSupName = data.hSupNameField
+ // this.hform.HSupID = data.hSupIDField
+ // if (data.hDeptIDField != 0) {
+ // this.hform.HDeptID = data.hDeptIDField
+ // this.hform.HDeptName = data.hDeptNameField
+ // }
+ // this.hform.HSourceBillNo = data.hSourceBillNoField
+ // //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ // if (data.hSourceBillTypeField == "1103") {
+ // this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ // this.hform.HMainSourceBillType = 1103
+ // this.showHMainSourceBillType = false
+ // } else if (data.hSourceBillTypeField == "1102") {
+ // this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ // this.hform.HMainSourceBillType = 1102
+ // this.showHMainSourceBillType = false
+ // } else {
+ // this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ // this.hform.HMainSourceBillType = -1
+ // this.showHMainSourceBillType = false
+ // }
+ // if (data.hMulSourceFlagField == 0) {
+ // this.showHSourceBillNo = false
+ // }
+ // //渚涘簲鍟嗕笉鍙紪杈�
+ // this.showHSupName = false
+ // this.tabs = 2
+ // } else { //鐗╂枡鏉$爜
+ // this.tabs = 2
+ // if (!this.hform.HSourceBillNo) {
+ // this.hform.HSupName = data.hSupNameField
+ // this.hform.HSupID = data.hSupIDField
+ // this.hform.HSourceBillNo = data.hSourceBillNoField
+ // if (data.hDeptIDField != 0) {
+ // this.hform.HDeptID = data.hDeptIDField
+ // this.hform.HDeptName = data.hDeptNameField
+ // }
+ // console.log(data)
+ // //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ // this.hform.HMainSourceBillType = data.hSourceBillTypeField
+ // if (data.hSourceBillTypeField == "1103") {
+ // this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ // this.hform.HMainSourceBillType = 1103
+ // this.showHMainSourceBillType = false
+ // } else if (data.hSourceBillTypeField == "1102") {
+ // this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ // this.hform.HMainSourceBillType = 1102
+ // this.showHMainSourceBillType = false
+ // } else {
+ // this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ // this.hform.HMainSourceBillType = -1
+ // this.showHMainSourceBillType = false
+ // }
+ // if (data.hMulSourceFlagField == 0) {
+ // this.showHSourceBillNo = false
+ // }
+ // //渚涘簲鍟嗕笉鍙紪杈�
+ // this.showHSupName = false
+ // }
+ // }
+ // //鏄剧ず琛ㄤ綋鏄庣粏
+ // this.DisBillEntryList()
+ // //娓呯┖鏁伴噺
+ // this.hform.HQty = ''
+ // } else {
+ // CommonUtils.playSound(0)
+ // this.refreshBarCodeState()
+ // uni.showToast({
+ // title: res.data.Message,
+ // icon: 'none'
+ // })
+ // }
+ // },
+ // fail: (res) => {
+ // CommonUtils.playSound(0)
+ // this.refreshBarCodeState()
+ // console.log(res);
+ // uni.showToast({
+ // title: '鎺ュ彛璇锋眰澶辫触',
+ // icon: 'none'
+ // })
+ // },
+ // });
}
},
//鐗╂枡淇℃伅
@@ -734,7 +956,7 @@
url: '/pages/shengchanbuliaojiaoyan/form?OperationType=1'
})
},
- submit() {
+ async submit() {
if (this.hform.HInterID == 0 || !this.hform.HInterID) {
uni.showToast({
title: '娌℃湁鎵爜淇℃伅锛岃鍏堟壂鎻忓崟鎹潯鐮侊紒',
@@ -762,61 +984,109 @@
title: '娌℃湁鎵弿鐗╂枡鏉$爜锛岃鍏堟壂鎻忕墿鏂欐潯鐮侊紝纭鏃犺鍚庡啀鎻愪氦锛�',
icon: 'none'
})
- } else
- {
- uni.showLoading({
- title: '璇风◢鍊�'
- })
+ } else {
+ // uni.showLoading({
+ // title: '璇风◢鍊�'
+ // })
var sMainStr = JSON.stringify(this.hform);
- uni.request({
- url: this.serverUrl + '/WEBSController/set_SaveMateReplenishOutBill_BillCheck_Json',
- method: 'POST',
- dataType: "json",
- data: {
- oMain: sMainStr
- },
- success: (res) => {
- console.log(1, res);
- uni.hideLoading()
- if (res.data.count == 1) {
- uni.showModal({
- title: '鎻愮ず',
- content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
- success: (res) => {
- if (res.confirm) {
- console.log('鐢ㄦ埛鐐瑰嚮纭畾');
- uni.redirectTo({
- url: '/pages/shengchanbuliaojiaoyan/form?OperationType=1'
- })
- } else if (res.cancel) {
- console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
- setTimeout(() => {
- uni.navigateBack();
- }, 50)
- }
- }
- });
- } else {
- // uni.showToast({
- // title: res.data.Message,
- // icon: 'none'
- // })
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/WEBSController/set_SaveMateReplenishOutBill_BillCheck_Json',
+ method: 'POST',
+ data: {
+ oMain: sMainStr
+ },
+ })
- uni.showModal({
- title: '娓╅Θ鎻愮ず',
- content: res.data.Message,
- showCancel: false
- })
- }
- },
- fail: (res) => {
- console.log(res);
+ if (!res) {
+ return
+ }
+
+ console.log(1, res);
+ uni.hideLoading()
+ if (res.data.count == 1) {
+ uni.showModal({
+ title: '鎻愮ず',
+ content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.redirectTo({
+ url: '/pages/shengchanbuliaojiaoyan/form?OperationType=1'
+ })
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 50)
+ }
+ }
+ });
+ } else {
uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
+ title: res.data.Message,
icon: 'none'
})
- },
- });
+ }
+
+ } catch (e) {
+ CommonUtils.playSound(0)
+ this.refreshHBillNoFocus()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触: ' + e,
+ icon: 'none'
+ })
+ }
+ // uni.request({
+ // url: this.serverUrl +
+ // '/WEBSController/set_SaveMateReplenishOutBill_BillCheck_Json',
+ // method: 'POST',
+ // dataType: "json",
+ // data: {
+ // oMain: sMainStr
+ // },
+ // success: (res) => {
+ // console.log(1, res);
+ // uni.hideLoading()
+ // if (res.data.count == 1) {
+ // uni.showModal({
+ // title: '鎻愮ず',
+ // content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
+ // success: (res) => {
+ // if (res.confirm) {
+ // console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ // uni.redirectTo({
+ // url: '/pages/shengchanbuliaojiaoyan/form?OperationType=1'
+ // })
+ // } else if (res.cancel) {
+ // console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ // setTimeout(() => {
+ // uni.navigateBack();
+ // }, 50)
+ // }
+ // }
+ // });
+ // } else {
+ // // uni.showToast({
+ // // title: res.data.Message,
+ // // icon: 'none'
+ // // })
+ //
+ // uni.showModal({
+ // title: '娓╅Θ鎻愮ず',
+ // content: res.data.Message,
+ // showCancel: false
+ // })
+ // }
+ // },
+ // fail: (res) => {
+ // console.log(res);
+ // uni.showToast({
+ // title: '鎺ュ彛璇锋眰澶辫触',
+ // icon: 'none'
+ // })
+ // },
+ // });
}
}
},
diff --git a/pages/shengchandiaobo/form.vue b/pages/shengchandiaobo/form.vue
index e004653..4e94a4f 100644
--- a/pages/shengchandiaobo/form.vue
+++ b/pages/shengchandiaobo/form.vue
@@ -217,7 +217,9 @@
import {
getUserInfo
} from "@/utils/auth.js";
- import { CommonUtils } from '../../utils/common';
+ import {
+ CommonUtils
+ } from '../../utils/common';
export default {
data() {
return {
@@ -228,7 +230,7 @@
HModName: 'Kf_MoveStockBill_Check_PDA',
ModRightName: 'CE_MoveStockCheck',
OperationType: 1,
-
+
showHStockPlaceName: false,
HBillNoFocus: false,
BarCodeFocus: false,
@@ -236,7 +238,7 @@
tabs: 1,
linterid: '',
HBillNo: '',
-
+
arrayHWHName: [], //浠撳簱
HWHNameList: [],
arrayHStockPlaceName: [], //浠撲綅
@@ -441,57 +443,112 @@
})
},
//鎵弿鍗曟嵁鍙锋潯鐮�
- GetMeesageByBillNo(e) {
- uni.request({
- url: this.serverUrl + '/WEBSController/get_BillBarCode_BillCheck_Json',
- data: {
- HBillNo: this.hform.HBillNo,
- HBillType: this.hform.HBillType,
- HMaker: this.hform.HMaker,
- HStockOrgID: this.hform.HStockOrgID
- },
- success: (res) => {
- if (res.data.count == 1) {
- this.playSound(1)
- var data = res.data.data
- console.log(data)
- this.hform.HInterID = data.hInterIDField
- this.hform.HBillNo = data.hBillNoField
- this.hform.HStockOutOrgID = data.hStockOutOrgIDField
- this.hform.HStockOutOrgName = data.hStockOutOrgNameField
- this.hform.HStockInOrgID = data.hStockInOrgIDField
- this.hform.HStockInOrgName = data.hStockInOrgNameField
- this.showHBillNo = false
- //鏉$爜鏍稿鏍囪
- if (data.hSourceBarCodeFlagField) {
- this.hform.HSourceBarCodeCtl = "Y"
- this.hform.chkHBarflag = true
- this.hform.HBarflag = data
- }
- this.tabs = 2
- this.DisBillEntryList();
- } else {
- this.playSound(0)
- this.refreshHBillNoFocus()
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
- this.hform.HBillNo = ''
+ async GetMeesageByBillNo(e) {
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/WEBSController/get_BillBarCode_BillCheck_Json',
+ data: {
+ HBillNo: this.hform.HBillNo,
+ HBillType: this.hform.HBillType,
+ HMaker: this.hform.HMaker,
+ HStockOrgID: this.hform.HStockOrgID
+ },
+ })
+
+ if (!res) {
+ // 瑙﹀彂璇锋眰閿侊紝涓嶈繑鍥炰换浣曞��
+ return
+ }
+
+ let {
+ data,
+ Message,
+ count
+ } = res.data
+ if (count == 1) {
+ this.playSound(1)
+ console.log(data)
+ this.hform.HInterID = data.hInterIDField
+ this.hform.HBillNo = data.hBillNoField
+ this.showHBillNo = false
+ //鏉$爜鏍稿鏍囪
+ if (data.hSourceBarCodeFlagField) {
+ this.hform.HSourceBarCodeCtl = "Y"
+ this.hform.chkHBarflag = true
+ this.hform.HBarflag = data
}
- },
- fail: (res) => {
+ this.tabs = 2
+ this.DisBillEntryList();
+ this.refreshBarCodeState()
+ } else {
this.playSound(0)
this.refreshHBillNoFocus()
- console.log(res);
uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
+ title: Message,
icon: 'none'
})
- },
- });
+ this.hform.HBillNo = ''
+ }
+
+ } catch (e) {
+ this.playSound(0)
+ this.refreshHBillNoFocus()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触: ' + e,
+ icon: 'none'
+ })
+ }
+
+ // uni.request({
+ // url: this.serverUrl + '/WEBSController/get_BillBarCode_BillCheck_Json',
+ // data: {
+ // HBillNo: this.hform.HBillNo,
+ // HBillType: this.hform.HBillType,
+ // HMaker: this.hform.HMaker,
+ // HStockOrgID: this.hform.HStockOrgID
+ // },
+ // success: (res) => {
+ // if (res.data.count == 1) {
+ // this.playSound(1)
+ // var data = res.data.data
+ // console.log(data)
+ // this.hform.HInterID = data.hInterIDField
+ // this.hform.HBillNo = data.hBillNoField
+ // this.hform.HStockOutOrgID = data.hStockOutOrgIDField
+ // this.hform.HStockOutOrgName = data.hStockOutOrgNameField
+ // this.hform.HStockInOrgID = data.hStockInOrgIDField
+ // this.hform.HStockInOrgName = data.hStockInOrgNameField
+ // this.showHBillNo = false
+ // //鏉$爜鏍稿鏍囪
+ // if (data.hSourceBarCodeFlagField) {
+ // this.hform.HSourceBarCodeCtl = "Y"
+ // this.hform.chkHBarflag = true
+ // this.hform.HBarflag = data
+ // }
+ // this.tabs = 2
+ // this.DisBillEntryList();
+ // } else {
+ // this.playSound(0)
+ // this.refreshHBillNoFocus()
+ // uni.showToast({
+ // title: res.data.Message,
+ // icon: 'none'
+ // })
+ // this.hform.HBillNo = ''
+ // }
+ // },
+ // fail: (res) => {
+ // this.playSound(0)
+ // this.refreshHBillNoFocus()
+ // console.log(res);
+ // uni.showToast({
+ // title: '鎺ュ彛璇锋眰澶辫触',
+ // icon: 'none'
+ // })
+ // },
+ // });
},
- getCode(HBarCode) {
+ async getCode(HBarCode) {
//浠撳簱銆佷粨浣嶆枃鏈涓虹┖鏃讹紝娓呯┖瀵瑰簲ID
if (!this.hform.HWHName) {
this.hform.HWHID = 0
@@ -502,7 +559,7 @@
var sOldBarCode = HBarCode
var HDeleteFlag = sOldBarCode.substring(0, 1);
var sBarCode = sOldBarCode.slice(1);
-
+
var sHWHID = this.hform.HWHID
var sHSPID = this.hform.HStockPlaceID
var sHQty = this.hform.HQty
@@ -517,100 +574,173 @@
icon: 'none'
})
} else {
- uni.request({
- url: this.serverUrl +
- '/WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json',
- data: {
- HInterID: this.hform.HInterID,
- HBillType: this.hform.HBillType,
- HBarCode: sBarCode
- },
- success: (res) => {
- console.log('鍒犻櫎鏉$爜', res.data);
- this.hform.HBarCode = ''
- if (res.data.count == 1) {
- this.hform.HQty = ''
- this.DisBillEntryList()
- CommonUtils.playSound(1)
- } else {
- CommonUtils.playSound(0)
- this.refreshBarCodeState()
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- console.log(res);
- this.refreshBarCodeState()
- CommonUtils.playSound(0)
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json',
+ data: {
+ HInterID: this.hform.HInterID,
+ HBillType: this.hform.HBillType,
+ HBarCode: sBarCode
+ },
+ })
+
+ if (!res) {
+ // 璇锋眰琚攣瀹氾紝閫�鍑哄綋鍓嶈姹�
+ return
+ }
+
+ console.log('鍒犻櫎鏉$爜', res.data);
+ this.hform.HBarCode = ''
+ if (res.data.count == 1) {
+ this.hform.HQty = ''
+ this.DisBillEntryList()
+ } else {
uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
+ title: res.data.Message,
icon: 'none'
})
- },
- });
+ }
+
+ } catch (e) {
+ this.playSound(0)
+ this.refreshHBillNoFocus()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触: ' + e,
+ icon: 'none'
+ })
+ }
+ // uni.request({
+ // url: this.serverUrl +
+ // '/WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json',
+ // data: {
+ // HInterID: this.hform.HInterID,
+ // HBillType: this.hform.HBillType,
+ // HBarCode: sBarCode
+ // },
+ // success: (res) => {
+ // console.log('鍒犻櫎鏉$爜', res.data);
+ // this.hform.HBarCode = ''
+ // if (res.data.count == 1) {
+ // this.hform.HQty = ''
+ // this.DisBillEntryList()
+ // CommonUtils.playSound(1)
+ // } else {
+ // CommonUtils.playSound(0)
+ // this.refreshBarCodeState()
+ // uni.showToast({
+ // title: res.data.Message,
+ // icon: 'none'
+ // })
+ // }
+ // },
+ // fail: (res) => {
+ // console.log(res);
+ // this.refreshBarCodeState()
+ // CommonUtils.playSound(0)
+ // uni.showToast({
+ // title: '鎺ュ彛璇锋眰澶辫触',
+ // icon: 'none'
+ // })
+ // },
+ // });
}
} else {
var sBarCode = this.hform.HBarCode
if (sHQty == "") {
sHQty = 0;
}
- uni.request({
- url: this.serverUrl + '/WEBSController/get_CheckTypeByBarCode_BillCheck_Json',
- data: {
- sBarCode: sBarCode,
- HBillID: this.hform.HInterID || 0,
- HBillType: this.hform.HBillType,
- HBillNo: this.hform.HBillNo,
- HMaker: this.hform.HMaker,
- HWhID: sHWHID,
- HSPID: sHSPID,
- HQty: sHQty,
- // HRedBlueFlag: this.hform.HRedBlueFlag,
- // SourceFlag: HSourceFlag,
- // HSourceBillNo: sSourceBillNo,
- // HSourceBillType: sSourceBillType,
- HStockOrgID: this.hform.HStockOrgID,
- // HScanStyle: "",
- // HCustom1: "",
- // HCustom2: ""
- },
- success: (res) => {
- console.log('鎵爜杩斿洖', res.data);
- this.hform.HBarCode = ''
- if (res.data.count == 1) {
- CommonUtils.playSound(1)
- var data = res.data.data
- if (data.hBarTypeField == '浠撳簱鏉$爜') {
- this.hform.HWHName = data.hWhNameField
- this.hform.HWHID = data.hWhIDField
- this.hform.HStockPlaceName = ''
- this.hform.HStockPlaceID = 0
- if (data.hSPFlagField == 0) {
- this.showHStockPlaceName = false
- } else {
- this.showHStockPlaceName = true
- }
- } else if (data.hBarTypeField == '浠撲綅鏉$爜') {
- this.hform.HWHName = data.hWhNameField
- this.hform.HWHID = data.hWhIDField
- this.hform.HStockPlaceName = data.hSPNameField
- this.hform.HStockPlaceID = data.hSPIDField
- } else if (data.hBarTypeField == '閮ㄩ棬鏉$爜') {
- this.hform.HDeptName = data.hDeptNameField
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/WEBSController/get_CheckTypeByBarCode_BillCheck_Json',
+ data: {
+ sBarCode: sBarCode,
+ HBillID: this.hform.HInterID || 0,
+ HBillType: this.hform.HBillType,
+ HBillNo: this.hform.HBillNo,
+ HMaker: this.hform.HMaker,
+ HWhID: sHWHID,
+ HSPID: sHSPID,
+ HQty: sHQty,
+ // HRedBlueFlag: this.hform.HRedBlueFlag,
+ // SourceFlag: HSourceFlag,
+ // HSourceBillNo: sSourceBillNo,
+ // HSourceBillType: sSourceBillType,
+ HStockOrgID: this.hform.HStockOrgID,
+ // HScanStyle: "",
+ // HCustom1: "",
+ // HCustom2: ""
+ },
+ })
+
+ if (!res) {
+ return
+ }
+
+ console.log('鎵爜杩斿洖', res.data);
+ this.hform.HBarCode = ''
+ if (res.data.count == 1) {
+ CommonUtils.playSound(1);
+ var data = res.data.data
+ if (data.hBarTypeField == '浠撳簱鏉$爜') {
+ this.hform.HWHName = data.hWhNameField
+ this.hform.HWHID = data.hWhIDField
+ this.hform.HStockPlaceName = ''
+ this.hform.HStockPlaceID = 0
+ if (data.hSPFlagField == 0) {
+ this.showHStockPlaceName = false
+ } else {
+ this.showHStockPlaceName = true
+ }
+ } else if (data.hBarTypeField == '浠撲綅鏉$爜') {
+ this.hform.HWHName = data.hWhNameField
+ this.hform.HWHID = data.hWhIDField
+ this.hform.HStockPlaceName = data.hSPNameField
+ this.hform.HStockPlaceID = data.hSPIDField
+ } else if (data.hBarTypeField == '閮ㄩ棬鏉$爜') {
+ this.hform.HDeptName = data.hDeptNameField
+ this.hform.HDeptID = data.hDeptIDField
+ this.tabs = 1
+ } else if (data.hBarTypeField == '婧愬崟鏉$爜') {
+ this.hform.HSupName = data.hSupNameField
+ this.hform.HSupID = data.hSupIDField
+ if (data.hDeptIDField != 0) {
this.hform.HDeptID = data.hDeptIDField
- this.tabs = 1
- } else if (data.hBarTypeField == '婧愬崟鏉$爜') {
+ this.hform.HDeptName = data.hDeptNameField
+ }
+ this.hform.HSourceBillNo = data.hSourceBillNoField
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ if (data.hSourceBillTypeField == "1103") {
+ this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ this.hform.HMainSourceBillType = 1103
+ this.showHMainSourceBillType = false
+ } else if (data.hSourceBillTypeField == "1102") {
+ this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ this.hform.HMainSourceBillType = 1102
+ this.showHMainSourceBillType = false
+ } else {
+ this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ this.hform.HMainSourceBillType = -1
+ this.showHMainSourceBillType = false
+ }
+ if (data.hMulSourceFlagField == 0) {
+ this.showHSourceBillNo = false
+ }
+ //渚涘簲鍟嗕笉鍙紪杈�
+ this.showHSupName = false
+ this.tabs = 2
+ } else { //鐗╂枡鏉$爜
+ this.tabs = 2
+ console.log('data', data)
+ if (!this.hform.HSourceBillNo) {
this.hform.HSupName = data.hSupNameField
this.hform.HSupID = data.hSupIDField
+ this.hform.HSourceBillNo = data.hSourceBillNoField
if (data.hDeptIDField != 0) {
this.hform.HDeptID = data.hDeptIDField
this.hform.HDeptName = data.hDeptNameField
}
- this.hform.HSourceBillNo = data.hSourceBillNoField
//鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
if (data.hSourceBillTypeField == "1103") {
this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
this.hform.HMainSourceBillType = 1103
@@ -629,63 +759,161 @@
}
//渚涘簲鍟嗕笉鍙紪杈�
this.showHSupName = false
- this.tabs = 2
- } else { //鐗╂枡鏉$爜
- this.tabs = 2
- if (!this.hform.HSourceBillNo) {
- this.hform.HSupName = data.hSupNameField
- this.hform.HSupID = data.hSupIDField
- this.hform.HSourceBillNo = data.hSourceBillNoField
- if (data.hDeptIDField != 0) {
- this.hform.HDeptID = data.hDeptIDField
- this.hform.HDeptName = data.hDeptNameField
- }
- console.log(data)
- //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
- this.hform.HMainSourceBillType = data.hSourceBillTypeField
- if (data.hSourceBillTypeField == "1103") {
- this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
- this.hform.HMainSourceBillType = 1103
- this.showHMainSourceBillType = false
- } else if (data.hSourceBillTypeField == "1102") {
- this.HMainSourceBillType = '閲囪喘璁㈠崟'
- this.hform.HMainSourceBillType = 1102
- this.showHMainSourceBillType = false
- } else {
- this.HMainSourceBillType = '鎵嬪伐褰曞叆'
- this.hform.HMainSourceBillType = -1
- this.showHMainSourceBillType = false
- }
- if (data.hMulSourceFlagField == 0) {
- this.showHSourceBillNo = false
- }
- //渚涘簲鍟嗕笉鍙紪杈�
- this.showHSupName = false
- }
}
- //鏄剧ず琛ㄤ綋鏄庣粏
- this.DisBillEntryList()
- //娓呯┖鏁伴噺
- this.hform.HQty = ''
- } else {
- CommonUtils.playSound(0)
- this.refreshBarCodeState()
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
}
- },
- fail: (res) => {
- CommonUtils.playSound(0)
- this.refreshBarCodeState()
- console.log(res);
+ //鏄剧ず琛ㄤ綋鏄庣粏
+ this.DisBillEntryList()
+ //娓呯┖鏁伴噺
+ this.hform.HQty = ''
+ } else {
+ CommonUtils.playSound(0);
uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
+ title: res.data.Message,
icon: 'none'
})
- },
- });
+ }
+
+ this.refreshBarCodeState()
+
+ } catch (e) {
+ this.playSound(0)
+ this.refreshHBillNoFocus()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触: ' + e,
+ icon: 'none'
+ })
+ }
+
+
+ // uni.request({
+ // url: this.serverUrl + '/WEBSController/get_CheckTypeByBarCode_BillCheck_Json',
+ // data: {
+ // sBarCode: sBarCode,
+ // HBillID: this.hform.HInterID || 0,
+ // HBillType: this.hform.HBillType,
+ // HBillNo: this.hform.HBillNo,
+ // HMaker: this.hform.HMaker,
+ // HWhID: sHWHID,
+ // HSPID: sHSPID,
+ // HQty: sHQty,
+ // // HRedBlueFlag: this.hform.HRedBlueFlag,
+ // // SourceFlag: HSourceFlag,
+ // // HSourceBillNo: sSourceBillNo,
+ // // HSourceBillType: sSourceBillType,
+ // HStockOrgID: this.hform.HStockOrgID,
+ // // HScanStyle: "",
+ // // HCustom1: "",
+ // // HCustom2: ""
+ // },
+ // success: (res) => {
+ // console.log('鎵爜杩斿洖', res.data);
+ // this.hform.HBarCode = ''
+ // if (res.data.count == 1) {
+ // CommonUtils.playSound(1)
+ // var data = res.data.data
+ // if (data.hBarTypeField == '浠撳簱鏉$爜') {
+ // this.hform.HWHName = data.hWhNameField
+ // this.hform.HWHID = data.hWhIDField
+ // this.hform.HStockPlaceName = ''
+ // this.hform.HStockPlaceID = 0
+ // if (data.hSPFlagField == 0) {
+ // this.showHStockPlaceName = false
+ // } else {
+ // this.showHStockPlaceName = true
+ // }
+ // } else if (data.hBarTypeField == '浠撲綅鏉$爜') {
+ // this.hform.HWHName = data.hWhNameField
+ // this.hform.HWHID = data.hWhIDField
+ // this.hform.HStockPlaceName = data.hSPNameField
+ // this.hform.HStockPlaceID = data.hSPIDField
+ // } else if (data.hBarTypeField == '閮ㄩ棬鏉$爜') {
+ // this.hform.HDeptName = data.hDeptNameField
+ // this.hform.HDeptID = data.hDeptIDField
+ // this.tabs = 1
+ // } else if (data.hBarTypeField == '婧愬崟鏉$爜') {
+ // this.hform.HSupName = data.hSupNameField
+ // this.hform.HSupID = data.hSupIDField
+ // if (data.hDeptIDField != 0) {
+ // this.hform.HDeptID = data.hDeptIDField
+ // this.hform.HDeptName = data.hDeptNameField
+ // }
+ // this.hform.HSourceBillNo = data.hSourceBillNoField
+ // //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ // if (data.hSourceBillTypeField == "1103") {
+ // this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ // this.hform.HMainSourceBillType = 1103
+ // this.showHMainSourceBillType = false
+ // } else if (data.hSourceBillTypeField == "1102") {
+ // this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ // this.hform.HMainSourceBillType = 1102
+ // this.showHMainSourceBillType = false
+ // } else {
+ // this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ // this.hform.HMainSourceBillType = -1
+ // this.showHMainSourceBillType = false
+ // }
+ // if (data.hMulSourceFlagField == 0) {
+ // this.showHSourceBillNo = false
+ // }
+ // //渚涘簲鍟嗕笉鍙紪杈�
+ // this.showHSupName = false
+ // this.tabs = 2
+ // } else { //鐗╂枡鏉$爜
+ // this.tabs = 2
+ // if (!this.hform.HSourceBillNo) {
+ // this.hform.HSupName = data.hSupNameField
+ // this.hform.HSupID = data.hSupIDField
+ // this.hform.HSourceBillNo = data.hSourceBillNoField
+ // if (data.hDeptIDField != 0) {
+ // this.hform.HDeptID = data.hDeptIDField
+ // this.hform.HDeptName = data.hDeptNameField
+ // }
+ // console.log(data)
+ // //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ // this.hform.HMainSourceBillType = data.hSourceBillTypeField
+ // if (data.hSourceBillTypeField == "1103") {
+ // this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ // this.hform.HMainSourceBillType = 1103
+ // this.showHMainSourceBillType = false
+ // } else if (data.hSourceBillTypeField == "1102") {
+ // this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ // this.hform.HMainSourceBillType = 1102
+ // this.showHMainSourceBillType = false
+ // } else {
+ // this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ // this.hform.HMainSourceBillType = -1
+ // this.showHMainSourceBillType = false
+ // }
+ // if (data.hMulSourceFlagField == 0) {
+ // this.showHSourceBillNo = false
+ // }
+ // //渚涘簲鍟嗕笉鍙紪杈�
+ // this.showHSupName = false
+ // }
+ // }
+ // //鏄剧ず琛ㄤ綋鏄庣粏
+ // this.DisBillEntryList()
+ // //娓呯┖鏁伴噺
+ // this.hform.HQty = ''
+ // } else {
+ // CommonUtils.playSound(0)
+ // this.refreshBarCodeState()
+ // uni.showToast({
+ // title: res.data.Message,
+ // icon: 'none'
+ // })
+ // }
+ // },
+ // fail: (res) => {
+ // CommonUtils.playSound(0)
+ // this.refreshBarCodeState()
+ // console.log(res);
+ // uni.showToast({
+ // title: '鎺ュ彛璇锋眰澶辫触',
+ // icon: 'none'
+ // })
+ // },
+ // });
}
},
//鐗╂枡淇℃伅
@@ -749,7 +977,7 @@
url: '/pages/shengchandiaobo/form?OperationType=1'
})
},
- submit() {
+ async submit() {
if (this.hform.HInterID == 0 || !this.hform.HInterID) {
uni.showToast({
title: '娌℃湁鎵爜淇℃伅锛岃鍏堟壂鎻忓崟鎹潯鐮侊紒',
@@ -778,53 +1006,102 @@
icon: 'none'
})
} else {
- uni.showLoading({
- title: '璇风◢鍊�'
- })
+ // uni.showLoading({
+ // title: '璇风◢鍊�'
+ // })
var sMainStr = JSON.stringify(this.hform);
- uni.request({
- url: this.serverUrl + '/WEBSController/set_SaveMoveStockBill_BillCheck_Json',
- method: 'POST',
- dataType: "json",
- data: {
- oMain: sMainStr
- },
- success: (res) => {
- console.log(1, res);
- uni.hideLoading()
- if (res.data.count == 1) {
- uni.showModal({
- title: '鎻愮ず',
- content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
- success: (res) => {
- if (res.confirm) {
- console.log('鐢ㄦ埛鐐瑰嚮纭畾');
- uni.redirectTo({
- url: '/pages/shengchandiaobo/form?OperationType=1'
- })
- } else if (res.cancel) {
- console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
- setTimeout(() => {
- uni.navigateBack();
- }, 50)
- }
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/WEBSController/set_SaveMoveStockBill_BillCheck_Json',
+ method: 'POST',
+ data: {
+ oMain: sMainStr
+ },
+ })
+
+ if (!res) {
+ return
+ }
+
+ console.log(1, res);
+ uni.hideLoading()
+ if (res.data.count == 1) {
+ uni.showModal({
+ title: '鎻愮ず',
+ content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.redirectTo({
+ url: '/pages/shengchandiaobo/form?OperationType=1'
+ })
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 50)
}
- });
- } else {
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- console.log(res);
+ }
+ });
+ } else {
uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
+ title: res.data.Message,
icon: 'none'
})
- },
- });
+ }
+
+ } catch (e) {
+ this.playSound(0)
+ this.refreshHBillNoFocus()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触: ' + e,
+ icon: 'none'
+ })
+ }
+
+ // uni.request({
+ // url: this.serverUrl + '/WEBSController/set_SaveMoveStockBill_BillCheck_Json',
+ // method: 'POST',
+ // dataType: "json",
+ // data: {
+ // oMain: sMainStr
+ // },
+ // success: (res) => {
+ // console.log(1, res);
+ // uni.hideLoading()
+ // if (res.data.count == 1) {
+ // uni.showModal({
+ // title: '鎻愮ず',
+ // content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
+ // success: (res) => {
+ // if (res.confirm) {
+ // console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ // uni.redirectTo({
+ // url: '/pages/shengchandiaobo/form?OperationType=1'
+ // })
+ // } else if (res.cancel) {
+ // console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ // setTimeout(() => {
+ // uni.navigateBack();
+ // }, 50)
+ // }
+ // }
+ // });
+ // } else {
+ // uni.showToast({
+ // title: res.data.Message,
+ // icon: 'none'
+ // })
+ // }
+ // },
+ // fail: (res) => {
+ // console.log(res);
+ // uni.showToast({
+ // title: '鎺ュ彛璇锋眰澶辫触',
+ // icon: 'none'
+ // })
+ // },
+ // });
}
}
},
diff --git a/pages/shengchanlingliao/form.vue b/pages/shengchanlingliao/form.vue
index 22b41ce..1ba1810 100644
--- a/pages/shengchanlingliao/form.vue
+++ b/pages/shengchanlingliao/form.vue
@@ -420,7 +420,7 @@
count
} = res.data
if (count == 1) {
- this.playSound(1)
+ CommonUtils.playSound(1)
console.log(data)
this.hform.HInterID = data.hInterIDField
this.hform.HBillNo = data.hBillNoField
@@ -435,7 +435,7 @@
this.DisBillEntryList();
this.refreshHBarCodeFocus()
} else {
- this.playSound(0)
+ CommonUtils.playSound(0)
this.refreshHBillNoFocus()
uni.showToast({
title: Message,
@@ -445,7 +445,7 @@
}
} catch (e) {
- this.playSound(0)
+ CommonUtils.playSound(0)
this.refreshHBillNoFocus()
uni.showToast({
title: '鎺ュ彛璇锋眰澶辫触: ' + e,
@@ -462,7 +462,7 @@
// },
// success: (res) => {
// if (res.data.count == 1) {
- // this.playSound(1)
+ // CommonUtils.playSound(1)
// var data = res.data.data
// console.log(data)
// this.hform.HInterID = data.hInterIDField
@@ -478,7 +478,7 @@
// this.DisBillEntryList();
// this.refreshHBarCodeFocus()
// } else {
- // this.playSound(0)
+ // CommonUtils.playSound(0)
// this.refreshHBillNoFocus()
// uni.showToast({
// title: res.data.Message,
@@ -489,7 +489,7 @@
// },
// fail: (res) => {
// console.log(res);
- // this.playSound(0)
+ // CommonUtils.playSound(0)
// this.refreshHBillNoFocus()
// uni.showToast({
// title: '鎺ュ彛璇锋眰澶辫触',
@@ -613,7 +613,6 @@
})
} else {
try {
-
let res = await CommonUtils.doRequest2Sync({
url: '/WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json',
data: {
@@ -641,7 +640,7 @@
}
} catch (e) {
- this.playSound(0)
+ CommonUtils.playSound(0)
this.refreshHBillNoFocus()
uni.showToast({
title: '鎺ュ彛璇锋眰澶辫触: ' + e,
@@ -686,7 +685,6 @@
}
try {
-
let res = await CommonUtils.doRequest2Sync({
url: '/WEBSController/get_CheckTypeByBarCode_BillCheck_Json',
data: {
@@ -813,7 +811,7 @@
this.refreshHBarCodeFocus()
} catch (e) {
- this.playSound(0)
+ CommonUtils.playSound(0)
this.refreshHBillNoFocus()
uni.showToast({
title: '鎺ュ彛璇锋眰澶辫触: ' + e,
@@ -1080,9 +1078,9 @@
// })
// } else
{
- uni.showLoading({
- title: '璇风◢鍊�'
- })
+ // uni.showLoading({
+ // title: '璇风◢鍊�'
+ // })
var sMainStr = JSON.stringify(this.hform);
try {
let res = await CommonUtils.doRequest2Sync({
@@ -1125,7 +1123,7 @@
}
} catch (e) {
- this.playSound(0)
+ CommonUtils.playSound(0)
this.refreshHBillNoFocus()
uni.showToast({
title: '鎺ュ彛璇锋眰澶辫触: ' + e,
diff --git a/pages/shengchanruku/form.vue b/pages/shengchanruku/form.vue
index bd1e3d1..9628208 100644
--- a/pages/shengchanruku/form.vue
+++ b/pages/shengchanruku/form.vue
@@ -34,8 +34,8 @@
<input v-model="hform.HStockPlaceName" :disabled="!showHStockPlaceName" placeholder="涓嶅彲鎿嶄綔" />
</view>
</view>
-
-
+
+
<view class="tabs">
<view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">琛ㄥご淇℃伅</view>
<view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">鐗╂枡淇℃伅</view>
@@ -195,6 +195,7 @@
import {
getUserInfo
} from "@/utils/auth.js";
+ import { CommonUtils } from '../../utils/common';
export default {
data() {
return {
@@ -211,7 +212,7 @@
tabs: 1,
linterid: '',
HBillNo: '',
-
+
arrayHWHName: [], //浠撳簱
HWHNameList: [],
arrayHStockPlaceName: [], //浠撲綅
@@ -263,6 +264,19 @@
this.getHBaseList()
},
methods: {
+ async refreshHBarCodeFocus() {
+ this.HBarCodeFocus = false
+ await this.$nextTick()
+ this.hform.HBarCode = ''
+ this.HBarCodeFocus = true
+ },
+ async refreshHBillNoFocus() {
+ this.HBillNoFocus = false
+ await this.$nextTick(() => {
+ this.HBillNoFocus = true
+ this.hform.HBillNo = ""
+ })
+ },
getHBaseList() {
uni.request({
url: this.serverUrl + '/Gy_Warehouse/list',
@@ -292,7 +306,7 @@
})
},
});
-
+
uni.request({
url: this.serverUrl + '/Gy_StockPlace/list',
data: {
@@ -329,7 +343,7 @@
if (this.HWHNameList[i].浠撳簱鍚嶇О == e) {
this.hform.HWHName = this.HWHNameList[i].浠撳簱鍚嶇О
this.hform.HWHID = this.HWHNameList[i].HItemID
-
+
if (this.HWHNameList[i]['鍚敤浠撲綅'] == 'Y') {
this.showHStockPlaceName = true
} else {
@@ -404,53 +418,114 @@
})
},
//鎵弿鍗曟嵁鍙锋潯鐮�
- GetMeesageByBillNo(e) {
- uni.request({
- url: this.serverUrl + '/WEBSController/get_BillBarCode_BillCheck_Json',
- data: {
- HBillNo: this.hform.HBillNo,
- HBillType: this.hform.HBillType,
- HMaker: this.hform.HMaker,
- HStockOrgID: this.hform.HStockOrgID
- },
- success: (res) => {
- if (res.data.count == 1) {
- this.playSound(1)
- var data = res.data.data
- console.log(data)
- this.hform.HInterID = data.hInterIDField
- this.hform.HBillNo = data.hBillNoField
- this.showHBillNo = false
- //鏉$爜鏍稿鏍囪
- if (data.hSourceBarCodeFlagField) {
- this.hform.HSourceBarCodeCtl = "Y"
- this.hform.chkHBarflag = true
- this.hform.HBarflag = data
- }
- this.tabs = 2
- this.DisBillEntryList();
- } else {
- this.playSound(0)
- this.refreshHBillState()
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
- this.hform.HBillNo = ''
+ async GetMeesageByBillNo(e) {
+ if (this.hform.HBillNo == "" || this.hform.HBillNo == undefined) {
+ return
+ }
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/WEBSController/get_BillBarCode_BillCheck_Json',
+ data: {
+ HBillNo: this.hform.HBillNo,
+ HBillType: this.hform.HBillType,
+ HMaker: this.hform.HMaker,
+ HStockOrgID: this.hform.HStockOrgID
+ },
+ })
+
+ if (!res) {
+ // 瑙﹀彂璇锋眰閿侊紝涓嶈繑鍥炰换浣曞��
+ return
+ }
+
+ let {
+ data,
+ Message,
+ count
+ } = res.data
+ if (count == 1) {
+ this.playSound(1)
+ console.log(data)
+ this.hform.HInterID = data.hInterIDField
+ this.hform.HBillNo = data.hBillNoField
+ this.showHBillNo = false
+ //鏉$爜鏍稿鏍囪
+ if (data.hSourceBarCodeFlagField) {
+ this.hform.HSourceBarCodeCtl = "Y"
+ this.hform.chkHBarflag = true
+ this.hform.HBarflag = data
}
- },
- fail: (res) => {
+ this.tabs = 2
+ this.DisBillEntryList();
+ this.refreshHBarCodeFocus()
+ } else {
this.playSound(0)
- this.refreshHBillState()
- console.log(res);
+ this.refreshHBillNoFocus()
uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
+ title: Message,
icon: 'none'
})
- },
- });
+ this.hform.HBillNo = ''
+ }
+
+ } catch (e) {
+ this.playSound(0)
+ this.refreshHBillNoFocus()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触: ' + e,
+ icon: 'none'
+ })
+ }
+
+ // uni.request({
+ // url: this.serverUrl + '/WEBSController/get_BillBarCode_BillCheck_Json',
+ // data: {
+ // HBillNo: this.hform.HBillNo,
+ // HBillType: this.hform.HBillType,
+ // HMaker: this.hform.HMaker,
+ // HStockOrgID: this.hform.HStockOrgID
+ // },
+ // success: (res) => {
+ // if (res.data.count == 1) {
+ // this.playSound(1)
+ // var data = res.data.data
+ // console.log(data)
+ // this.hform.HInterID = data.hInterIDField
+ // this.hform.HBillNo = data.hBillNoField
+ // this.showHBillNo = false
+ // //鏉$爜鏍稿鏍囪
+ // if (data.hSourceBarCodeFlagField) {
+ // this.hform.HSourceBarCodeCtl = "Y"
+ // this.hform.chkHBarflag = true
+ // this.hform.HBarflag = data
+ // }
+ // this.tabs = 2
+ // this.DisBillEntryList();
+ // } else {
+ // this.playSound(0)
+ // this.refreshHBillState()
+ // uni.showToast({
+ // title: res.data.Message,
+ // icon: 'none'
+ // })
+ // this.hform.HBillNo = ''
+ // }
+ // },
+ // fail: (res) => {
+ // this.playSound(0)
+ // this.refreshHBillState()
+ // console.log(res);
+ // uni.showToast({
+ // title: '鎺ュ彛璇锋眰澶辫触',
+ // icon: 'none'
+ // })
+ // },
+ // });
},
- getCode(HBarCode) {
+ async getCode(HBarCode) {
+ if (HBarCode == undefined || HBarCode == "") {
+ return
+ }
//浠撳簱銆佷粨浣嶆枃鏈涓虹┖鏃讹紝娓呯┖瀵瑰簲ID
if (!this.hform.HWHName) {
this.hform.HWHID = 0
@@ -461,7 +536,7 @@
var sOldBarCode = HBarCode
var HDeleteFlag = sOldBarCode.substring(0, 1);
var sBarCode = sOldBarCode.slice(1);
-
+
var sHWHID = this.hform.HWHID
var sHSPID = this.hform.HStockPlaceID
var sHQty = this.hform.HQty
@@ -477,101 +552,176 @@
icon: 'none'
})
} else {
- uni.request({
- url: this.serverUrl +
- '/WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json',
- data: {
- HInterID: this.hform.HInterID,
- HBillType: this.hform.HBillType,
- HBarCode: sBarCode
- },
- success: (res) => {
- console.log('鍒犻櫎鏉$爜', res.data);
- this.hform.HBarCode = ''
- if (res.data.count == 1) {
- this.hform.HQty = ''
- this.DisBillEntryList()
- CommonUtils.playSound(1)
- } else {
- CommonUtils.playSound(0)
- this.refreshBarCodeState()
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- CommonUtils.playSound(0)
- this.refreshBarCodeState()
- console.log(res);
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json',
+ data: {
+ HInterID: this.hform.HInterID,
+ HBillType: this.hform.HBillType,
+ HBarCode: sBarCode
+ },
+ })
+
+ if (!res) {
+ // 璇锋眰琚攣瀹氾紝閫�鍑哄綋鍓嶈姹�
+ return
+ }
+
+ console.log('鍒犻櫎鏉$爜', res.data);
+ this.hform.HBarCode = ''
+ if (res.data.count == 1) {
+ this.hform.HQty = ''
+ this.DisBillEntryList()
+ } else {
uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
+ title: res.data.Message,
icon: 'none'
})
- },
- });
+ }
+
+ } catch (e) {
+ this.playSound(0)
+ this.refreshHBillNoFocus()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触: ' + e,
+ icon: 'none'
+ })
+ }
+
+ // uni.request({
+ // url: this.serverUrl +
+ // '/WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json',
+ // data: {
+ // HInterID: this.hform.HInterID,
+ // HBillType: this.hform.HBillType,
+ // HBarCode: sBarCode
+ // },
+ // success: (res) => {
+ // console.log('鍒犻櫎鏉$爜', res.data);
+ // this.hform.HBarCode = ''
+ // if (res.data.count == 1) {
+ // this.hform.HQty = ''
+ // this.DisBillEntryList()
+ // CommonUtils.playSound(1)
+ // } else {
+ // CommonUtils.playSound(0)
+ // this.refreshBarCodeState()
+ // uni.showToast({
+ // title: res.data.Message,
+ // icon: 'none'
+ // })
+ // }
+ // },
+ // fail: (res) => {
+ // CommonUtils.playSound(0)
+ // this.refreshBarCodeState()
+ // console.log(res);
+ // uni.showToast({
+ // title: '鎺ュ彛璇锋眰澶辫触',
+ // icon: 'none'
+ // })
+ // },
+ // });
}
} else {
var sBarCode = this.hform.HBarCode
if (sHQty == "") {
sHQty = 0;
}
-
- uni.request({
- url: this.serverUrl + '/WEBSController/get_CheckTypeByBarCode_BillCheck_Json',
- data: {
- sBarCode: sBarCode,
- HBillID: this.hform.HInterID || 0,
- HBillType: this.hform.HBillType,
- HBillNo: this.hform.HBillNo,
- HMaker: this.hform.HMaker,
- HWhID: sHWHID,
- HSPID: sHSPID,
- HQty: sHQty,
- // HRedBlueFlag: this.hform.HRedBlueFlag,
- // SourceFlag: HSourceFlag,
- // HSourceBillNo: sSourceBillNo,
- // HSourceBillType: sSourceBillType,
- HStockOrgID: this.hform.HStockOrgID,
- // HScanStyle: "",
- // HCustom1: "",
- // HCustom2: ""
- },
- success: (res) => {
- console.log('鎵爜杩斿洖', res.data);
- this.hform.HBarCode = ''
- if (res.data.count == 1) {
- CommonUtils.playSound(1);
- var data = res.data.data
- if (data.hBarTypeField == '浠撳簱鏉$爜') {
- this.hform.HWHName = data.hWhNameField
- this.hform.HWHID = data.hWhIDField
- this.hform.HStockPlaceName = ''
- this.hform.HStockPlaceID = 0
- // if (data.hSPFlagField == 0) {
- // this.showHStockPlaceName = false
- // } else {
- // this.showHStockPlaceName = true
- // }
- } else if (data.hBarTypeField == '浠撲綅鏉$爜') {
- this.hform.HWHName = data.hWhNameField
- this.hform.HWHID = data.hWhIDField
- this.hform.HStockPlaceName = data.hSPNameField
- this.hform.HStockPlaceID = data.hSPIDField
- } else if (data.hBarTypeField == '閮ㄩ棬鏉$爜') {
- this.hform.HDeptName = data.hDeptNameField
+
+
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/WEBSController/get_CheckTypeByBarCode_BillCheck_Json',
+ data: {
+ sBarCode: sBarCode,
+ HBillID: this.hform.HInterID || 0,
+ HBillType: this.hform.HBillType,
+ HBillNo: this.hform.HBillNo,
+ HMaker: this.hform.HMaker,
+ HWhID: sHWHID,
+ HSPID: sHSPID,
+ HQty: sHQty,
+ // HRedBlueFlag: this.hform.HRedBlueFlag,
+ // SourceFlag: HSourceFlag,
+ // HSourceBillNo: sSourceBillNo,
+ // HSourceBillType: sSourceBillType,
+ HStockOrgID: this.hform.HStockOrgID,
+ // HScanStyle: "",
+ // HCustom1: "",
+ // HCustom2: ""
+ },
+ })
+
+ if (!res) {
+ return
+ }
+
+ console.log('鎵爜杩斿洖', res.data);
+ this.hform.HBarCode = ''
+ if (res.data.count == 1) {
+ CommonUtils.playSound(1);
+ var data = res.data.data
+ if (data.hBarTypeField == '浠撳簱鏉$爜') {
+ this.hform.HWHName = data.hWhNameField
+ this.hform.HWHID = data.hWhIDField
+ this.hform.HStockPlaceName = ''
+ this.hform.HStockPlaceID = 0
+ if (data.hSPFlagField == 0) {
+ this.showHStockPlaceName = false
+ } else {
+ this.showHStockPlaceName = true
+ }
+ } else if (data.hBarTypeField == '浠撲綅鏉$爜') {
+ this.hform.HWHName = data.hWhNameField
+ this.hform.HWHID = data.hWhIDField
+ this.hform.HStockPlaceName = data.hSPNameField
+ this.hform.HStockPlaceID = data.hSPIDField
+ } else if (data.hBarTypeField == '閮ㄩ棬鏉$爜') {
+ this.hform.HDeptName = data.hDeptNameField
+ this.hform.HDeptID = data.hDeptIDField
+ this.tabs = 1
+ } else if (data.hBarTypeField == '婧愬崟鏉$爜') {
+ this.hform.HSupName = data.hSupNameField
+ this.hform.HSupID = data.hSupIDField
+ if (data.hDeptIDField != 0) {
this.hform.HDeptID = data.hDeptIDField
- this.tabs = 1
- } else if (data.hBarTypeField == '婧愬崟鏉$爜') {
+ this.hform.HDeptName = data.hDeptNameField
+ }
+ this.hform.HSourceBillNo = data.hSourceBillNoField
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ if (data.hSourceBillTypeField == "1103") {
+ this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ this.hform.HMainSourceBillType = 1103
+ this.showHMainSourceBillType = false
+ } else if (data.hSourceBillTypeField == "1102") {
+ this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ this.hform.HMainSourceBillType = 1102
+ this.showHMainSourceBillType = false
+ } else {
+ this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ this.hform.HMainSourceBillType = -1
+ this.showHMainSourceBillType = false
+ }
+ if (data.hMulSourceFlagField == 0) {
+ this.showHSourceBillNo = false
+ }
+ //渚涘簲鍟嗕笉鍙紪杈�
+ this.showHSupName = false
+ this.tabs = 2
+ } else { //鐗╂枡鏉$爜
+ this.tabs = 2
+ console.log('data', data)
+ if (!this.hform.HSourceBillNo) {
this.hform.HSupName = data.hSupNameField
this.hform.HSupID = data.hSupIDField
+ this.hform.HSourceBillNo = data.hSourceBillNoField
if (data.hDeptIDField != 0) {
this.hform.HDeptID = data.hDeptIDField
this.hform.HDeptName = data.hDeptNameField
}
- this.hform.HSourceBillNo = data.hSourceBillNoField
//鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
if (data.hSourceBillTypeField == "1103") {
this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
this.hform.HMainSourceBillType = 1103
@@ -590,63 +740,160 @@
}
//渚涘簲鍟嗕笉鍙紪杈�
this.showHSupName = false
- this.tabs = 2
- } else { //鐗╂枡鏉$爜
- this.tabs = 2
- if (!this.hform.HSourceBillNo) {
- this.hform.HSupName = data.hSupNameField
- this.hform.HSupID = data.hSupIDField
- this.hform.HSourceBillNo = data.hSourceBillNoField
- if (data.hDeptIDField != 0) {
- this.hform.HDeptID = data.hDeptIDField
- this.hform.HDeptName = data.hDeptNameField
- }
- console.log(data)
- //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
- this.hform.HMainSourceBillType = data.hSourceBillTypeField
- if (data.hSourceBillTypeField == "1103") {
- this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
- this.hform.HMainSourceBillType = 1103
- this.showHMainSourceBillType = false
- } else if (data.hSourceBillTypeField == "1102") {
- this.HMainSourceBillType = '閲囪喘璁㈠崟'
- this.hform.HMainSourceBillType = 1102
- this.showHMainSourceBillType = false
- } else {
- this.HMainSourceBillType = '鎵嬪伐褰曞叆'
- this.hform.HMainSourceBillType = -1
- this.showHMainSourceBillType = false
- }
- if (data.hMulSourceFlagField == 0) {
- this.showHSourceBillNo = false
- }
- //渚涘簲鍟嗕笉鍙紪杈�
- this.showHSupName = false
- }
}
- //鏄剧ず琛ㄤ綋鏄庣粏
- this.DisBillEntryList()
- //娓呯┖鏁伴噺
- this.hform.HQty = ''
- } else {
- CommonUtils.playSound(0)
- this.refreshBarCodeState()
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
}
- },
- fail: (res) => {
- CommonUtils.playSound(0)
- this.refreshBarCodeState()
- console.log(res);
+ //鏄剧ず琛ㄤ綋鏄庣粏
+ this.DisBillEntryList()
+ //娓呯┖鏁伴噺
+ this.hform.HQty = ''
+ } else {
+ CommonUtils.playSound(0);
uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
+ title: res.data.Message,
icon: 'none'
})
- },
- });
+ }
+
+ this.refreshHBarCodeFocus()
+
+ } catch (e) {
+ this.playSound(0)
+ this.refreshHBillNoFocus()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触: ' + e,
+ icon: 'none'
+ })
+ }
+
+ // uni.request({
+ // url: this.serverUrl + '/WEBSController/get_CheckTypeByBarCode_BillCheck_Json',
+ // data: {
+ // sBarCode: sBarCode,
+ // HBillID: this.hform.HInterID || 0,
+ // HBillType: this.hform.HBillType,
+ // HBillNo: this.hform.HBillNo,
+ // HMaker: this.hform.HMaker,
+ // HWhID: sHWHID,
+ // HSPID: sHSPID,
+ // HQty: sHQty,
+ // // HRedBlueFlag: this.hform.HRedBlueFlag,
+ // // SourceFlag: HSourceFlag,
+ // // HSourceBillNo: sSourceBillNo,
+ // // HSourceBillType: sSourceBillType,
+ // HStockOrgID: this.hform.HStockOrgID,
+ // // HScanStyle: "",
+ // // HCustom1: "",
+ // // HCustom2: ""
+ // },
+ // success: (res) => {
+ // console.log('鎵爜杩斿洖', res.data);
+ // this.hform.HBarCode = ''
+ // if (res.data.count == 1) {
+ // CommonUtils.playSound(1);
+ // var data = res.data.data
+ // if (data.hBarTypeField == '浠撳簱鏉$爜') {
+ // this.hform.HWHName = data.hWhNameField
+ // this.hform.HWHID = data.hWhIDField
+ // this.hform.HStockPlaceName = ''
+ // this.hform.HStockPlaceID = 0
+ // // if (data.hSPFlagField == 0) {
+ // // this.showHStockPlaceName = false
+ // // } else {
+ // // this.showHStockPlaceName = true
+ // // }
+ // } else if (data.hBarTypeField == '浠撲綅鏉$爜') {
+ // this.hform.HWHName = data.hWhNameField
+ // this.hform.HWHID = data.hWhIDField
+ // this.hform.HStockPlaceName = data.hSPNameField
+ // this.hform.HStockPlaceID = data.hSPIDField
+ // } else if (data.hBarTypeField == '閮ㄩ棬鏉$爜') {
+ // this.hform.HDeptName = data.hDeptNameField
+ // this.hform.HDeptID = data.hDeptIDField
+ // this.tabs = 1
+ // } else if (data.hBarTypeField == '婧愬崟鏉$爜') {
+ // this.hform.HSupName = data.hSupNameField
+ // this.hform.HSupID = data.hSupIDField
+ // if (data.hDeptIDField != 0) {
+ // this.hform.HDeptID = data.hDeptIDField
+ // this.hform.HDeptName = data.hDeptNameField
+ // }
+ // this.hform.HSourceBillNo = data.hSourceBillNoField
+ // //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ // if (data.hSourceBillTypeField == "1103") {
+ // this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ // this.hform.HMainSourceBillType = 1103
+ // this.showHMainSourceBillType = false
+ // } else if (data.hSourceBillTypeField == "1102") {
+ // this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ // this.hform.HMainSourceBillType = 1102
+ // this.showHMainSourceBillType = false
+ // } else {
+ // this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ // this.hform.HMainSourceBillType = -1
+ // this.showHMainSourceBillType = false
+ // }
+ // if (data.hMulSourceFlagField == 0) {
+ // this.showHSourceBillNo = false
+ // }
+ // //渚涘簲鍟嗕笉鍙紪杈�
+ // this.showHSupName = false
+ // this.tabs = 2
+ // } else { //鐗╂枡鏉$爜
+ // this.tabs = 2
+ // if (!this.hform.HSourceBillNo) {
+ // this.hform.HSupName = data.hSupNameField
+ // this.hform.HSupID = data.hSupIDField
+ // this.hform.HSourceBillNo = data.hSourceBillNoField
+ // if (data.hDeptIDField != 0) {
+ // this.hform.HDeptID = data.hDeptIDField
+ // this.hform.HDeptName = data.hDeptNameField
+ // }
+ // console.log(data)
+ // //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ // this.hform.HMainSourceBillType = data.hSourceBillTypeField
+ // if (data.hSourceBillTypeField == "1103") {
+ // this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ // this.hform.HMainSourceBillType = 1103
+ // this.showHMainSourceBillType = false
+ // } else if (data.hSourceBillTypeField == "1102") {
+ // this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ // this.hform.HMainSourceBillType = 1102
+ // this.showHMainSourceBillType = false
+ // } else {
+ // this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ // this.hform.HMainSourceBillType = -1
+ // this.showHMainSourceBillType = false
+ // }
+ // if (data.hMulSourceFlagField == 0) {
+ // this.showHSourceBillNo = false
+ // }
+ // //渚涘簲鍟嗕笉鍙紪杈�
+ // this.showHSupName = false
+ // }
+ // }
+ // //鏄剧ず琛ㄤ綋鏄庣粏
+ // this.DisBillEntryList()
+ // //娓呯┖鏁伴噺
+ // this.hform.HQty = ''
+ // } else {
+ // CommonUtils.playSound(0)
+ // this.refreshBarCodeState()
+ // uni.showToast({
+ // title: res.data.Message,
+ // icon: 'none'
+ // })
+ // }
+ // },
+ // fail: (res) => {
+ // CommonUtils.playSound(0)
+ // this.refreshBarCodeState()
+ // console.log(res);
+ // uni.showToast({
+ // title: '鎺ュ彛璇锋眰澶辫触',
+ // icon: 'none'
+ // })
+ // },
+ // });
}
},
//鐗╂枡淇℃伅
@@ -704,7 +951,7 @@
url: '/pages/shengchanruku/form?OperationType=1'
})
},
- submit() {
+ async submit() {
if (this.hform.HInterID == 0 || !this.hform.HInterID) {
uni.showToast({
title: '娌℃湁鎵爜淇℃伅锛岃鍏堟壂鎻忓崟鎹潯鐮侊紒',
@@ -737,49 +984,99 @@
title: '璇风◢鍊�'
})
var sMainStr = JSON.stringify(this.hform);
- uni.request({
- url: this.serverUrl + '/WEBSController/set_SaveProductInBill_BillCheck_Json',
- method: 'POST',
- dataType: "json",
- data: {
- oMain: sMainStr
- },
- success: (res) => {
- console.log(1, res);
- uni.hideLoading()
- if (res.data.count == 1) {
- uni.showModal({
- title: '鎻愮ず',
- content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
- success: (res) => {
- if (res.confirm) {
- console.log('鐢ㄦ埛鐐瑰嚮纭畾');
- uni.redirectTo({
- url: '/pages/shengchanruku/form?OperationType=1'
- })
- } else if (res.cancel) {
- console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
- setTimeout(() => {
- uni.navigateBack();
- }, 50)
- }
+
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/WEBSController/set_SaveProductInBill_BillCheck_Json',
+ method: 'POST',
+ data: {
+ oMain: sMainStr
+ },
+ })
+
+ if (!res) {
+ return
+ }
+
+ console.log(1, res);
+ uni.hideLoading()
+ if (res.data.count == 1) {
+ uni.showModal({
+ title: '鎻愮ず',
+ content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.redirectTo({
+ url: '/pages/shengchanruku/form?OperationType=1'
+ })
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 50)
}
- });
- } else {
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- console.log(res);
+ }
+ });
+ } else {
uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
+ title: res.data.Message,
icon: 'none'
})
- },
- });
+ }
+
+ } catch (e) {
+ this.playSound(0)
+ this.refreshHBillNoFocus()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触: ' + e,
+ icon: 'none'
+ })
+ }
+
+ // uni.request({
+ // url: this.serverUrl + '/WEBSController/set_SaveProductInBill_BillCheck_Json',
+ // method: 'POST',
+ // dataType: "json",
+ // data: {
+ // oMain: sMainStr
+ // },
+ // success: (res) => {
+ // console.log(1, res);
+ // uni.hideLoading()
+ // if (res.data.count == 1) {
+ // uni.showModal({
+ // title: '鎻愮ず',
+ // content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
+ // success: (res) => {
+ // if (res.confirm) {
+ // console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ // uni.redirectTo({
+ // url: '/pages/shengchanruku/form?OperationType=1'
+ // })
+ // } else if (res.cancel) {
+ // console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ // setTimeout(() => {
+ // uni.navigateBack();
+ // }, 50)
+ // }
+ // }
+ // });
+ // } else {
+ // uni.showToast({
+ // title: res.data.Message,
+ // icon: 'none'
+ // })
+ // }
+ // },
+ // fail: (res) => {
+ // console.log(res);
+ // uni.showToast({
+ // title: '鎺ュ彛璇锋眰澶辫触',
+ // icon: 'none'
+ // })
+ // },
+ // });
}
}
},
--
Gitblit v1.9.1