| | |
| | | let data = res.data.tbBillList[0]; |
| | | if (data) { |
| | | that.formData = data; |
| | | that.remarks = that.formData.remarks; |
| | | that.remarks = that.formData.fnGDesc; |
| | | that.AxiosHttp("post", 'LLJ/getJYItem', { |
| | | //id: that.formData.guid, |
| | | releaseNo: that.formData.releaseNo |
| | |
| | | } |
| | | }); |
| | | that.tableData = tableData; |
| | | |
| | | that.GetImageFileByGid(); |
| | | //if (that.tableData.length === 0) { |
| | | // that.isShowTable = true; |
| | | //} |
| | |
| | | var that = this; |
| | | that.ttrre = true; |
| | | that.AxiosHttp("post", 'MesQaItemsDetect01Manager/EditModelSubmit', { |
| | | id13: that.formData.guid |
| | | guid: that.formData.guid |
| | | }, true, 1).then(function (res1) { |
| | | if (res1.rtnCode == 1) { |
| | | if (res1.rtnData.outSum == 1) { |
| | | that.$notify({ type: 'success', message: '提交成功' }); |
| | | that.init(); |
| | | } else { |
| | | that.$toast.fail(res1.rtnMsg); |
| | | that.$toast.fail(res1.rtnData.outMsg); |
| | | } |
| | | that.ttrre = false |
| | | }).catch(function (error) { |
| | |
| | | }, |
| | | removeXJ() { |
| | | const that = this; |
| | | that.isLoading = true; |
| | | // 添加确认弹窗 |
| | | that.$dialog.confirm({ |
| | | message: '确认要重新加载检验项目吗?', |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消' |
| | | }).then(() => { // 确认回调 |
| | | that.isLoading = true; |
| | | that.AxiosHttp("post", 'MesQaItemsDetect01Manager/ReloadModel5', { |
| | | guid: that.formData.guid |
| | | }, true, 1).then(res1 => { |
| | |
| | | |
| | | }).catch(() => { // 取消回调 |
| | | that.$toast('已取消操作'); |
| | | that.isLoading = false; |
| | | }); |
| | | }, |
| | | GetBack1() { |
| | |
| | | |
| | | async afterRead(file) { |
| | | try { |
| | | //alert(APIURL_IMAGE); |
| | | // 1. 显示上传中状态 |
| | | file.status = 'uploading'; |
| | | file.message = '上传中...'; |
| | |
| | | // 8. 强制更新视图(Vant 3+ 可能需要) |
| | | this.$nextTick(); |
| | | } |
| | | } |
| | | }, |
| | | //获取图片信息 |
| | | GetImageFileByGid() { |
| | | const that = this; |
| | | that.AxiosHttp("post", 'MesImage/getImage', { |
| | | parentId: that.formData.guid, |
| | | }, true, 0).then(res1 => { |
| | | if (res1.status === 0) { |
| | | // 关键转换:将后端数据转换为 van-uploader 需要的格式 |
| | | that.fileList = res1.data.tbBillList.map(item => ({ |
| | | url: `${APIURL_IMAGE}/${item.urlPath}`, // 拼接完整访问路径 |
| | | status: 'done', // 标记为已上传成功 |
| | | name: item.fileTitle, // 可选显示文件名 |
| | | message: '已上传', // 可选状态文字 |
| | | // 保留原始数据(按需) |
| | | id: item.guid |
| | | })); |
| | | } else { |
| | | that.$toast.fail(res1.rtnMsg); |
| | | } |
| | | }).catch(error => { |
| | | that.$toast.fail("网络错误,请重试!"); |
| | | }); |
| | | }, |
| | | handleDelete(file, { index }) { |
| | | var that = this; |
| | | that.$dialog.confirm({ |
| | | title: '确认删除', |
| | | message: '确定要删除这张图片吗?' |
| | | }).then(() => { |
| | | // 确认删除逻辑 |
| | | console.log(file); |
| | | that.AxiosHttp("post", 'MesImage/deleteImage', { |
| | | id: file.id, |
| | | }, true, 0).then(res1 => { |
| | | if (res1.status === 0) { |
| | | that.$notify({ type: 'success', message: '删除成功' }); |
| | | } else { |
| | | that.$toast.fail(res1.rtnMsg); |
| | | |
| | | } |
| | | that.init();//刷新检验项目 |
| | | }).catch(error => { |
| | | that.$toast.fail("网络错误,请重试!"); |
| | | }); |
| | | |
| | | }).catch(() => { |
| | | // 取消操作 |
| | | that.init();//刷新检验项目 |
| | | }) |
| | | }, |
| | | } |
| | | }) |