| | |
| | | <button class="btn-a" size="mini" @tap="addNew">新增</button> |
| | | <button class="btn-c" size="mini" @tap="goBack">退出</button> |
| | | </view> |
| | | <!-- <xe-upload ref="XeUpload" :options="uploadOptions" @callback="handleUploadCallback"></xe-upload> --> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | "HCycleUnit": "小时", |
| | | "MouldHName": "", |
| | | "MouldHModel": "", |
| | | "HDeptIDName": "", |
| | | "HDeptID": "0", |
| | | "HManagerIDName": "", |
| | | "HManagerID": "0", |
| | | "HEmpIDName": "", |
| | | "HEmpID": "0", |
| | | "HDeptName": getUserInfo()["HDeptName"], |
| | | "HDeptID": getUserInfo()["HDeptID"], |
| | | "HEmpName": getUserInfo().HEmpName, |
| | | "HEmpID": getUserInfo().HEmpID, |
| | | "HManagerName": getUserInfo().HSecManager, |
| | | "HManagerID": getUserInfo().HSecManagerID, |
| | | "HRepairBeginDate": dayjs(new Date()).format('YYYY-MM-DD'), |
| | | "HMainSourceBillType": "", |
| | | "HMainSourceInterID": "0", |
| | |
| | | }, |
| | | addNew() { |
| | | uni.redirectTo({ |
| | | url: './Sb_EquipRepairSendWorkBill?operationType=1' |
| | | url: './Sc_MouldRepairSendWorkBill?operationType=1' |
| | | }) |
| | | }, |
| | | goBack() { |
| | |
| | | this.HCheckFileList[index]["HDotCheckResult"] = false |
| | | } else { |
| | | this.HCheckFileList[index]["HDotCheckResult"] = true |
| | | } |
| | | }, |
| | | uploadFile(index) { |
| | | console.log('filePath: ', this.attachmentInfo[index].filePath); |
| | | // 通过临时路径读取文件 |
| | | uni.uploadFile({ |
| | | url: CommonUtils.getServerUrl() + "/Sb_EquipDotCheckBill/UploadFile", |
| | | filePath: this.attachmentInfo[index].filePath, |
| | | name: 'file', |
| | | formData: { |
| | | HBillNo: this.hform.HBillNo, |
| | | HRemark: "", |
| | | HUserName: getUserInfo()["Czymc"] |
| | | }, |
| | | success: (uploadRes) => { |
| | | CommonUtils.showTips({ |
| | | message: "上传成功" |
| | | }) |
| | | this.attachmentInfo[index].status = "上传成功" |
| | | }, |
| | | fail: (err) => { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `上传失败: ${err}` |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | delFile(index) { |
| | | console.log('attachmentInfo: ', this.attachmentInfo[index]); |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '确认要删除 " ' + this.attachmentInfo[index].fileName + ' " 删除后将不可恢复!', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | this.attachmentInfo.splice(index, 1) |
| | | } |
| | | }, |
| | | }) |
| | | |
| | | }, |
| | | handleUploadCallback(res) { // 文件上传回调 |
| | | console.log('file: ', res); |
| | | let fileInfo = res.data[0] |
| | | this.attachmentInfo.push({ |
| | | fileName: fileInfo.name, |
| | | size: fileInfo.size, |
| | | status: '等待上传', |
| | | filePath: fileInfo.tempFilePath |
| | | }) |
| | | }, |
| | | // 上传文件 |
| | | fileUpload() { |
| | | this.$refs.XeUpload.upload('file', {}); |
| | | }, |
| | | //获取班次数据 |
| | | async getShiftList() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Web/GetGy_ShiftsList_Json', |
| | | data: { |
| | | Shifts: "", |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.HShiftsList = data |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: Message |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: err |
| | | }) |
| | | } |
| | | }, |
| | | //获取使用部门数据 |