| | |
| | | }) |
| | | } |
| | | CommonUtils.doRequest2({ |
| | | url: '/Sc_EmployeeSignInNoteBillController/APP_Edit_json', |
| | | url: '/Sc_EmployeeSignInNoteBillController/Get_equipmentMes', |
| | | data: { |
| | | "HInterID": this.hform.HInterID, |
| | | "HBarCode": sBarCode, |
| | |
| | | //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 { |
| | |
| | | this.HBarCodeFocusRefresh() |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: Message |
| | | title: "工单信息和设备信息为空" |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | onRoleChange(e) { |
| | | console.log('选中的角色:', this.hform.HRoles); |
| | |
| | | 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', |