From 3b759c3c8d9262307b14a10a14ee63fe2d5d4ea9 Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期二, 27 一月 2026 09:08:04 +0800
Subject: [PATCH] 员工签到记录单修复
---
pages/EmployeeRecords/EmployeeRecordsBill.vue | 91 +++++++++++++++++++++++++++++++++------------
1 files changed, 67 insertions(+), 24 deletions(-)
diff --git a/pages/EmployeeRecords/EmployeeRecordsBill.vue b/pages/EmployeeRecords/EmployeeRecordsBill.vue
index a962dca..834c809 100644
--- a/pages/EmployeeRecords/EmployeeRecordsBill.vue
+++ b/pages/EmployeeRecords/EmployeeRecordsBill.vue
@@ -816,7 +816,7 @@
})
}
CommonUtils.doRequest2({
- url: '/Sc_EmployeeSignInNoteBillController/APP_Edit_json',
+ url: '/Sc_EmployeeSignInNoteBillController/Get_equipmentMes',
data: {
"HInterID": this.hform.HInterID,
"HBarCode": sBarCode,
@@ -832,35 +832,60 @@
//let data=res.data
console.log(sBarCode)
console.log(res.data.data[0])
- console.log(res.data[1])
- this.hform.HMouldID = data[0][0].妯″叿id
- this.hform.HMouldNo = data[0][0].妯″叿缂栫爜
- this.hform.HMouldName = data[0][0].妯″叿鍚嶇О
- this.hform.HMouldState = data[0][0].妯″叿鐘舵��
+ var moulddate=res.data.data[0]
+ this.hform.HMouldID = moulddate.妯″叿id
+ this.hform.HMouldNo = moulddate.妯″叿缂栫爜
+ this.hform.HMouldName = moulddate.妯″叿鍚嶇О
+ this.hform.HMouldState = moulddate.妯″叿鐘舵��
+ this.GetEquipmentMsg(this.HBarCode)
+
+
+ } else {
+ this.GetEquipmentMsg(this.HBarCode)
+ CommonUtils.playSound(0)
this.listData = []
- let tabledata = data[1][0]
+
+ this.HBarCodeFocusRefresh()
+ uni.showToast({
+ icon: 'none',
+ title: "妯″叿涓虹┖"
+ })
+ }
+ }
+ })
+ },
+ GetEquipmentMsg(HBarCode)
+ {
+ CommonUtils.doRequest2({
+ url: '/Sc_EmployeeSignInNoteBillController/APP_Edit_json',
+ data: {
+ "HInterID": this.hform.HInterID,
+ "HBarCode": HBarCode,
+ },
+
+ resFunction: (res) => {
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ //let data=res.data
+ //console.log(sBarCode)
+ console.log(res.data.data[0])
+ var tabledata=res.data.data[0]
+ this.hform.HEquipID = tabledata[0].璁惧鍐呯爜
+ this.hform.HEquipName = tabledata[0].璁惧鍚嶇О
+ this.listData = []
+
if (data[1].length > 0) {
- this.hform.HEquipID = tabledata.璁惧鍐呯爜
- this.hform.HEquipName = tabledata.璁惧鍚嶇О
- this.hform.HMaterID = tabledata.HMaterID
+ this.hform.HMaterID = data[1].HMaterID
for (let i = 0; i < data[1].length; i++) {
this.listData.push(Object.assign(data[1][i], {
index: i
}))
}
- }
- if(data[0][0].妯″叿id===0 && data[0][0].妯″叿缂栫爜===""&& data[0][0].妯″叿鍚嶇О===""&&data[1].length<=0)
- {
- CommonUtils.playSound(0)
- this.listData = []
-
- this.HBarCodeFocusRefresh()
- uni.showToast({
- icon: 'none',
- title: Message
- })
- return;
}
} else {
@@ -870,11 +895,12 @@
this.HBarCodeFocusRefresh()
uni.showToast({
icon: 'none',
- title: Message
+ title: "宸ュ崟淇℃伅鍜岃澶囦俊鎭负绌�"
})
}
}
})
+
},
onRoleChange(e) {
console.log('閫変腑鐨勮鑹�:', this.hform.HRoles);
@@ -1019,8 +1045,25 @@
Message
} = res.data
if (count == 1) {
+ uni.showModal({
+ title: '鎻愮ず',
+ content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.redirectTo({
+ url: '/pages/EmployeeRecords/EmployeeRecordsBill'
+ })
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ // setTimeout(() => {
+ // uni.navigateBack();
+ // }, 50)
+ }
+ }
+ });
// 绛夊緟鏁版嵁鑾峰彇瀹屾垚鍚庡啀鏄剧ず琛ㄦ牸
- await this.getResultTableData();
+ //await this.getResultTableData();
} else {
uni.showToast({
icon: 'none',
--
Gitblit v1.9.1