diff --git a/src/components/report/BtnReport.vue b/src/components/report/BtnReport.vue
index a2e87dd..6977645 100644
--- a/src/components/report/BtnReport.vue
+++ b/src/components/report/BtnReport.vue
@@ -20,7 +20,7 @@
领用报告
@@ -60,7 +60,7 @@ export default {
},
computed: {
- ...mapState(["dict", "elProgress","dataTransOpts", "patientRegister", "doctorCheck", "sumDoctorCheck", "report"]),
+ ...mapState(["dict", "elProgress", "dataTransOpts", "patientRegister", "doctorCheck", "sumDoctorCheck", "report"]),
},
methods: {
@@ -113,7 +113,7 @@ export default {
this.elProgress.display = true;
this.elProgress.percentage = 0;
- let ReportCode = '0005';
+ let ReportCode = '0005';
let token = window.sessionStorage.getItem('token');
let user = window.sessionStorage.getItem('user');
let toOutShell = {
@@ -135,24 +135,34 @@ export default {
};
for (let i = 0; i < this.dataTransOpts.tableM.patient_register.length; i++) {
+
let e = this.dataTransOpts.tableM.patient_register[i];
this.elProgress.percentage = Math.floor(((i + 1) * 100) / this.dataTransOpts.tableM.patient_register.length);
- if (e.completeFlag != '3') continue
+
// 调上传接口
try {
- toOutShell.BusinessCode = e.patientRegisterId
- let jsonToOutShell = JSON.stringify(toOutShell)
- console.log('toOutShell',jsonToOutShell)
- let res = await this.$peisAPI.upLoadReportPdf(jsonToOutShell)
- if (JSON.parse(res).code < 0){
- this.$message.warning({ showClose: true, message: JSON.parse(res).message });
- }else{
- // 上传成功 ,更新上传传状态
- e.isUpload = 'Y'
- console.log('btnUpReport success',JSON.parse(res))
+ if (e.completeFlag == '3') {
+ toOutShell.BusinessCode = e.patientRegisterId
+ let jsonToOutShell = JSON.stringify(toOutShell)
+ console.log('toOutShell', jsonToOutShell)
+ let res = await this.$peisAPI.upLoadReportPdf(jsonToOutShell)
+ if (JSON.parse(res).code < 0) {
+ console.log('$peisAPI.upLoadReportPdf err', res)
+ } else {
+ // 上传成功 ,更新上传传状态
+ e.isUpload = 'Y'
+ console.log('btnUpReport success', JSON.parse(res))
+ }
+ } else {
+ patientRegisterId = e.patientRegisterId
+ let res2 = await postapi('/api/app/TransToWebPeis/TransPatientRegisterByPatientRegisterId', { patientRegisterId })
+ if (res2.code == -1) {
+ console.log('TransToWebPeis err', res2)
+ }
}
+
} catch (error) {
- console.log('error',error)
+ console.log('error', error)
this.$message.warning({ showClose: true, message: error });
}
}
@@ -180,7 +190,7 @@ export default {
///3a0c990e-5756-2dc0-19d5-69a617fe4048
let ReportCode = '0005';
- if(this.dataTransOpts.tableS.patient_register.isPatientOccupationalDisease == 'Y') ReportCode = '0006'
+ if (this.dataTransOpts.tableS.patient_register.isPatientOccupationalDisease == 'Y') ReportCode = '0006'
let token = window.sessionStorage.getItem('token');
let user = window.sessionStorage.getItem('user');
let toOutShell = {
@@ -212,7 +222,7 @@ export default {
// let res = await postapi(`/api/app/printreport/getpeisreport?PatientRegisterId=${this.patientRegister.patientRegisterId}`)
// toOutShell.ReportTable = res.data
let JSONtoOutShell = JSON.stringify(toOutShell)
- console.log('$peisAPI.printPre',JSONtoOutShell)
+ console.log('$peisAPI.printPre', JSONtoOutShell)
if (isPreview) {
this.$peisAPI.printPre(JSONtoOutShell)
.then(res => {
diff --git a/src/components/report/PatientRegisterQueryNobtn.vue b/src/components/report/PatientRegisterQueryNobtn.vue
index 720f0e6..2ad8276 100644
--- a/src/components/report/PatientRegisterQueryNobtn.vue
+++ b/src/components/report/PatientRegisterQueryNobtn.vue
@@ -54,8 +54,8 @@
检查状态
-
+ size="small" align="center">
+
@@ -134,7 +134,7 @@ export default {
mounted() {
this.local.completeFlag = deepCopy(this.dict.completeFlag)
- this.local.completeFlag.splice(0, 1) //预记选项去掉
+ // this.local.completeFlag.splice(0, 1) //预记选项去掉
this.local.completeFlag.splice(2, 0, { id: '5', displayName: '全部已检(未总检)' }) //插入
this.enterToQuery()
diff --git a/src/utlis/proFunc.js b/src/utlis/proFunc.js
index 1298378..7991712 100644
--- a/src/utlis/proFunc.js
+++ b/src/utlis/proFunc.js
@@ -2,10 +2,10 @@
//多级联动选择数据处理 add by pengjun
function tcdate(date) {
for (var i = 0; i < date.length; i++) {
- if (date[i].treeChildren.length == 0) {
- date[i].treeChildren = undefined;
- } else {
+ if (date[i].treeChildren && Array.isArray(date[i].treeChildren) && date[i].treeChildren.length > 0) {
tcdate(date[i].treeChildren);
+ }else{
+ delete date[i].treeChildren
}
}
};