pengjun 3 months ago
parent
commit
74d27bbac9
  1. 14
      src/components/report/TurnoverReport.vue
  2. 87
      src/views/customerOrg/patientRegisterImport.vue

14
src/components/report/TurnoverReport.vue

@ -37,6 +37,10 @@
<span class="spanClass">包含预登记</span>
<el-checkbox v-model="query.isPreRegistration" true-label="Y" false-label="N" />
</div>
<div class="query">
<span class="spanClass">显示子单位</span>
<el-checkbox v-model="query.isChild" true-label="Y" false-label="N" @change="btnQuery"/>
</div>
</div>
</div>
<div>
@ -48,7 +52,12 @@
<el-table :data="tableData" border :height="window.pageHeight - 160" highlight-current-row
size="small" row-key="id" :summary-method="getSummaries" show-summary ref="refTable">
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="customerOrgName" label="单位名称" min-width="150" />
<el-table-column prop="customerOrgName" label="单位名称" min-width="180">
<template slot-scope="scope">
<div>{{ query.isChild == 'Y' ? scope.row.customerOrgName + (scope.row.departmentName && scope.row.customerOrgName != scope.row.departmentName ? '--'+scope.row.departmentName:''):scope.row.customerOrgName}}</div>
</template>
</el-table-column>
<el-table-column prop="registerCount" label="登记人数" min-width="80" align="center" />
<el-table-column prop="startMedical" label="检查人数" min-width="80" align="center" />
<el-table-column prop="checkCount" label="总检人数" min-width="80" align="center" />
@ -89,7 +98,8 @@ export default {
customerOrgIds: [],
// medicalTypeIds: [],
// isMedicalTypeId: 'Y',
isPreRegistration:'N'
isPreRegistration:'N',
isChild:'Y',
},
tableData: [],

87
src/views/customerOrg/patientRegisterImport.vue

@ -1271,7 +1271,29 @@ export default {
//
checkValide(body){
let msg = ''
// personnelTypeNamemedicalTypeNamesalesman
// patientNamepersonnelTypeNamemedicalTypeNamesalesman
let keys = Object.keys(this.masterCols)
for (let i = 0; i < keys.length; i++) {
const key = keys[i];
switch (key) {
case 'patientName':
case 'name':
if(!body.patientName) msg = this.masterCols[key] + ' 未填值'
break;
case 'medicalTypeId': //
if(!body.medicalTypeName) msg = this.masterCols[key] + ' 未填值'
break;
case 'personnelTypeId': //
if(!body.personnelTypeName) msg = this.masterCols[key] + ' 未填值'
break;
case 'salesman': //
if(!body.salesman) msg = this.masterCols[key] + ' 未填值'
break;
default:
break;
}
if(msg) break;
}
return msg
},
@ -1292,47 +1314,44 @@ export default {
console.log(`this.choosedData[${i}],startRowNameType,body`)
// :
let msg = checkValide(body)
let msg = this.checkValide(body)
if(msg){
this.tableData.push(Object.assign({ importState: '导入失败', importDes: msg }, this.choosedData[i]))
continue
}
try {
//
if (this.choosedSameMan.patientNo) {
//
if (this.choosedSameMan.patientNo == '$newPatient$') {
body.nameType = '3'
} else {
body.patientNo = this.choosedSameMan.patientNo
}
} else if (startRowNameType != '3') {
let result = await this.isSamePatient(startRowNameType, body)
if (result.isContinue) {
if (result.err) {
this.tableData.push(Object.assign({ importState: '导入失败', importDes: result.err }, this.choosedData[i]))
continue
}else{
try {
//
if (this.choosedSameMan.patientNo) {
//
if (this.choosedSameMan.patientNo == '$newPatient$') {
body.nameType = '3'
} else {
body.patientNo = this.choosedSameMan.patientNo
}
} else if (startRowNameType != '3') {
let result = await this.isSamePatient(startRowNameType, body)
if (result.isContinue) {
if (result.err) {
this.tableData.push(Object.assign({ importState: '导入失败', importDes: result.err }, this.choosedData[i]))
}
} else {
this.dataImportOpts.startRow = i
break; // i this.importing
}
} else {
this.dataImportOpts.startRow = i
break; // i this.importing
}
}
// /api/app/patientregister/createpatientregisterexcel
let res = await postapi('/api/app/patientregister/CreatePatientRegisterFromExcel', body)
this.choosedSameMan = {} //
if (res.code >= 0) {
this.tableData.push(Object.assign({ importState: '导入成功' }, this.choosedData[i]))
} else {
this.tableData.push(Object.assign({ importState: '导入失败', importDes: res.message }, this.choosedData[i]))
// /api/app/patientregister/createpatientregisterexcel
let res = await postapi('/api/app/patientregister/CreatePatientRegisterFromExcel', body)
this.choosedSameMan = {} //
if (res.code >= 0) {
this.tableData.push(Object.assign({ importState: '导入成功' }, this.choosedData[i]))
} else {
this.tableData.push(Object.assign({ importState: '导入失败', importDes: res.message }, this.choosedData[i]))
}
} catch (error) {
this.tableData.push(Object.assign({ importState: '导入失败', importDes: `${error}` }, this.choosedData[i]))
}
} catch (error) {
this.tableData.push(Object.assign({ importState: '导入失败', importDes: `${error}` }, this.choosedData[i]))
}
//
if (i == this.choosedData.length - 1) {
this.elProgress.display = false;

Loading…
Cancel
Save