|
@@ -1021,7 +1021,7 @@ const injurySicard = async () => {
|
|
|
visit_type = match[3];
|
|
|
}
|
|
|
}
|
|
|
- await fetch('http://130.150.161.72:9206/thyy/api/public/injury/addWorkInjuryPatientRelation', {
|
|
|
+ const responseTwo = await fetch('http://130.150.161.72:9206/thyy/api/public/injury/addWorkInjuryPatientRelation', {
|
|
|
method: 'POST',
|
|
|
headers: {
|
|
|
'Content-Type': 'application/json',
|
|
@@ -1048,9 +1048,19 @@ const injurySicard = async () => {
|
|
|
visit_type
|
|
|
}),
|
|
|
});
|
|
|
+ const resultTwo = await responseTwo.json();
|
|
|
+ if(!(resultTwo && resultTwo.code === 1)) {
|
|
|
+ ElMessage({
|
|
|
+ message: '本地录入工伤社保卡信息失败',
|
|
|
+ type: 'error',
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
} catch (e) {
|
|
|
ElMessage({
|
|
|
- message: '工伤读社保卡接口异常',
|
|
|
+ message: '本地录入工伤社保卡信息失败',
|
|
|
type: 'error',
|
|
|
duration: 2500,
|
|
|
showClose: true,
|
|
@@ -1431,12 +1441,58 @@ const handleClickInjuryinfo = row => {
|
|
|
const result = await response.json();
|
|
|
// 你可以根据 result 做后续处理
|
|
|
if (result && result.code === 1 && result.data && result.data.code === 200 && result.data.data.infcode == '0') {
|
|
|
- ElMessage({
|
|
|
- message: '工伤入院登记成功',
|
|
|
- type: 'success',
|
|
|
- duration: 2500,
|
|
|
- showClose: true,
|
|
|
- });
|
|
|
+ //调用addWorkInjuryInterfaceLog接口
|
|
|
+ try {
|
|
|
+ const responseTwo = await fetch('http://130.150.161.72:9206/thyy/api/public/injury/addWorkInjuryInterfaceLog', {
|
|
|
+ method: 'POST',
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'application/json',
|
|
|
+ },
|
|
|
+ body: JSON.stringify({
|
|
|
+ inpatient_no:patient.value.inpatientNo,
|
|
|
+ admiss_times:patient.value.admissTimes,
|
|
|
+ psn_no:result.data.data.output.psn_no,
|
|
|
+ emp_no:result.data.data.output.emp_no,
|
|
|
+ emp_name:result.data.data.output.emp_name,
|
|
|
+ certno:result.data.data.output.certno,
|
|
|
+ psn_name:result.data.data.output.psn_name,
|
|
|
+ gend:result.data.data.output.gend,
|
|
|
+ age:result.data.data.output.age,
|
|
|
+ psn_type:result.data.data.output.psn_type,
|
|
|
+ insu_admdvs:result.data.data.output.insu_admdvs,
|
|
|
+ inhosp_stas:result.data.data.output.inhosp_stas,
|
|
|
+ trt_chk_rslt:result.data.data.output.trt_chk_rslt,
|
|
|
+ exam_ccls:result.data.data.output.exam_ccls,
|
|
|
+ certificate_type:result.data.data.output.certificate_type,
|
|
|
+ birthday:result.data.data.output.birthday,
|
|
|
+ }),
|
|
|
+ });
|
|
|
+ const resultTwo = await responseTwo.json();
|
|
|
+ if(resultTwo && resultTwo.code === 1) {
|
|
|
+ ElMessage({
|
|
|
+ message: '工伤入院登记成功',
|
|
|
+ type: 'success',
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ }else {
|
|
|
+ ElMessage({
|
|
|
+ message: '本地工伤入院登记接口异常,需要你进行冲正处理了',
|
|
|
+ type: 'error',
|
|
|
+ duration: 10000,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ } catch (e) {
|
|
|
+ ElMessage({
|
|
|
+ message: '本地工伤入院登记接口异常,需要你进行冲正处理了',
|
|
|
+ type: 'error',
|
|
|
+ duration: 10000,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
} else {
|
|
|
ElMessage({
|
|
|
message: result.message || '工伤入院登记失败',
|