You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3588 lines
140 KiB

3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 month ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 month ago
1 month ago
1 month ago
1 month ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 month ago
1 month ago
1 month ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 months ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
7 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
7 months ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 month ago
3 years ago
6 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
6 months ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
6 months ago
2 years ago
6 months ago
2 months ago
6 months ago
2 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
6 months ago
2 years ago
4 weeks ago
2 years ago
6 months ago
2 years ago
6 months ago
2 years ago
6 months ago
2 years ago
6 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
6 months ago
2 years ago
6 months ago
2 years ago
6 months ago
2 years ago
6 months ago
2 years ago
6 months ago
4 weeks ago
2 years ago
6 months ago
2 years ago
6 months ago
1 month ago
6 months ago
1 month ago
6 months ago
1 month ago
6 months ago
2 years ago
6 months ago
2 years ago
6 months ago
2 years ago
6 months ago
2 years ago
6 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
1 year ago
7 months ago
2 years ago
7 months ago
6 months ago
7 months ago
2 years ago
7 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 month ago
2 years ago
2 years ago
1 month ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 months ago
1 year ago
1 year ago
2 months ago
1 year ago
1 year ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 month ago
2 years ago
1 month ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 month ago
2 years ago
2 years ago
1 month ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 month ago
2 years ago
1 month ago
2 years ago
2 years ago
1 month ago
2 years ago
1 month ago
2 years ago
1 month ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 month ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
1 month ago
2 years ago
1 year ago
6 months ago
1 year ago
1 year ago
1 year ago
1 year ago
6 months ago
1 year ago
6 months ago
1 year ago
6 months ago
7 months ago
1 year ago
2 years ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
7 months ago
2 years ago
7 months ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
1 year ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div>
  3. <!--组件主体-->
  4. <div style="display: flex">
  5. <div :style="'width:' + (window.pageWidth - 110 - 20) + 'px;'">
  6. <!--查询条件-->
  7. <div style="position: absolute;top:28px;left:140px;display: flex;">
  8. <div v-show="checkPagePriv(pagePriv.privs, '查找')">
  9. <PatientRegisterEditQuery />
  10. </div>
  11. <div style="display: flex;margin-left: 5px;">
  12. <div v-show="checkPagePriv(pagePriv.privs, '职业病')">
  13. <el-button @click="btnOcc" class="commonbutton" style="width:60px;">职业病</el-button>
  14. </div>
  15. <div style="margin-left: 5px;" v-show="checkPagePriv(pagePriv.privs, '读身份证')">
  16. <el-button @click="peopleIcCard" class="commonbutton" style="width:70px;">读身份证</el-button>
  17. </div>
  18. <div style="margin-left: 5px;" v-show="checkPagePriv(pagePriv.privs, '拍照')">
  19. <el-button type="primary" class="commonbutton" @click="photoGrah" style="width:60px;">拍照</el-button>
  20. </div>
  21. <div style="margin-left: 5px;" v-show="checkPagePriv(pagePriv.privs, '个人预约')">
  22. <el-button type="primary" class="commonbutton" @click="btnWebBooking" style="width:70px;">个人预约</el-button>
  23. </div>
  24. <div style="margin-left: 5px;">
  25. <el-button type="primary" class="commonbutton" @click="btnWebBookingMzak"
  26. style="width:70px;">人寿预约</el-button>
  27. </div>
  28. <div style="margin-left: 5px;" v-show="checkPagePriv(pagePriv.privs, '同步团检预约')">
  29. <el-button type="primary" class="commonbutton" @click="btnDownOrg"
  30. :disabled="(form.customerOrgId == dict.personOrgId) || !form.id">同步团检预约</el-button>
  31. </div>
  32. <div style="margin-left: 5px;" v-show="checkPagePriv(pagePriv.privs, '分诊排队')">
  33. <el-button type="primary" class="commonbutton" @click="fnQueue(form)"
  34. :disabled="!form.id">分诊排队</el-button>
  35. </div>
  36. </div>
  37. </div>
  38. <div>
  39. <el-form ref="form" :model="form" label-width="80px" :rules="rules" size="medium">
  40. <el-row>
  41. <el-col :span="5">
  42. <el-form-item label="单位名称" prop="customerOrgName">
  43. <el-input placeholder="请选择单位" v-model="form.customerOrgName" size="small" disabled>
  44. <el-button slot="append" icon="el-icon-search" @click="dialogOrg = true" style="font-size: 20px;"
  45. :disabled="(form.completeFlag == '3' || isDoctor != '1') ? true : false"></el-button>
  46. </el-input>
  47. </el-form-item>
  48. </el-col>
  49. <el-col :span="5">
  50. <el-form-item label="条码号" prop="patientRegisterNo">
  51. <el-input v-model="form.patientRegisterNo" disabled size="small"></el-input>
  52. </el-form-item>
  53. </el-col>
  54. <el-col :span="5">
  55. <el-form-item label="档案号" prop="patientNo">
  56. <el-input v-model="form.patientNo" disabled size="small"></el-input>
  57. </el-form-item>
  58. </el-col>
  59. <el-col :span="3">
  60. <el-form-item label="体检次数" prop="medicalTimes">
  61. <el-input v-model="form.medicalTimes" disabled size="small"></el-input>
  62. </el-form-item>
  63. </el-col>
  64. <el-col :span="3">
  65. <el-form-item label="性别" prop="sexId" label-width="50px">
  66. <el-select v-model="form.sexId" placeholder="请选择" size="small" filterable
  67. :style="'width:' + Math.floor((window.pageWidth - 630) / 8) + 'px;'">
  68. <el-option v-for="item in dict.sex" :key="item.id" :label="item.displayName" :value="item.id">
  69. </el-option>
  70. </el-select>
  71. </el-form-item>
  72. </el-col>
  73. <el-col :span="3">
  74. </el-col>
  75. </el-row>
  76. <el-row>
  77. <el-col :span="5">
  78. <el-form-item label="姓名" prop="patientName">
  79. <el-input id="patientName" v-model="form.patientName" @change="changePatientName" size="small"
  80. autocomplete="off"></el-input>
  81. </el-form-item>
  82. </el-col>
  83. <el-col :span="5">
  84. <el-form-item label="身份证号" prop="idNo">
  85. <el-input v-model="form.idNo" placeholder="身份证号" @change="changeIdNo" size="small"></el-input>
  86. </el-form-item>
  87. </el-col>
  88. <el-col :span="5">
  89. <el-form-item label="出生日期" prop="birthDate">
  90. <!--
  91. <input type="date" v-model="form.birthDate" size="small"
  92. :style="'border-radius: 4px;border: 1px solid #DCDFE6;height: 32px;line-height: 32px;padding-left: 2px;width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'"/>
  93. -->
  94. <el-date-picker v-model="form.birthDate" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
  95. placeholder="出生日期" :style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'"
  96. @change="changeBirthDate" prefix-icon="" size="small" />
  97. </el-form-item>
  98. </el-col>
  99. <el-col :span="3">
  100. <el-form-item label="年龄" prop="age">
  101. <el-input v-model="form.age" size="small" @change="changeAge"></el-input>
  102. </el-form-item>
  103. </el-col>
  104. <el-col :span="3">
  105. <el-form-item label="婚姻" prop="maritalStatusId" label-width="50px">
  106. <el-select v-model="form.maritalStatusId" placeholder="请选择" size="small" filterable
  107. :style="'width:' + Math.floor((window.pageWidth - 630) / 8) + 'px;'">
  108. <el-option v-for="item in dict.maritalStatus" :key="item.id" :label="item.displayName"
  109. :value="item.id">
  110. </el-option>
  111. </el-select>
  112. </el-form-item>
  113. </el-col>
  114. <el-col :span="3" />
  115. </el-row>
  116. <el-row>
  117. <el-col :span="5">
  118. <el-form-item label="手机号" prop="mobileTelephone">
  119. <el-input v-model="form.mobileTelephone" size="small"></el-input>
  120. </el-form-item>
  121. </el-col>
  122. <el-col :span="5">
  123. <el-form-item label="电话" prop="telephone">
  124. <el-input v-model="form.telephone" size="small"></el-input>
  125. </el-form-item>
  126. </el-col>
  127. <el-col :span="5">
  128. <el-form-item label="邮箱" prop="email">
  129. <el-input v-model="form.email" size="small"></el-input>
  130. </el-form-item>
  131. </el-col>
  132. <el-col :span="3">
  133. <el-form-item label="邮编" prop="postalCode">
  134. <el-input v-model="form.postalCode" size="small"></el-input>
  135. </el-form-item>
  136. </el-col>
  137. <el-col :span="3">
  138. <el-form-item label="籍贯" prop="birthPlaceId" label-width="50px">
  139. <el-select v-model="form.birthPlaceId" placeholder="请选择" filterable clearable
  140. :style="'width:' + Math.floor((window.pageWidth - 630) / 8) + 'px;'" size="small">
  141. <el-option v-for="item in dict.birthPlace" :key="item.id" :label="item.displayName"
  142. :value="item.id" />
  143. </el-select>
  144. </el-form-item>
  145. </el-col>
  146. <el-col :span="3" />
  147. </el-row>
  148. <el-row>
  149. <el-col :span="10">
  150. <el-form-item label="地址" prop="address">
  151. <el-input v-model="form.address" size="small"></el-input>
  152. </el-form-item>
  153. </el-col>
  154. <el-col :span="5">
  155. <el-form-item label="人员类别" prop="personnelTypeId">
  156. <el-select v-model="form.personnelTypeId" placeholder="请选择" filterable clearable
  157. :style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'" size="small">
  158. <el-option v-for="item in dict.personnelType" :key="item.id" :label="item.displayName"
  159. :value="item.id" />
  160. </el-select>
  161. </el-form-item>
  162. </el-col>
  163. <el-col :span="3">
  164. <el-form-item label="性激素期" prop="sexHormoneTermId">
  165. <el-select v-model="form.sexHormoneTermId" placeholder="请选择" filterable clearable size="small"
  166. :disabled="isComplete">
  167. <el-option v-for="item in dict.sexHormoneTerm" :key="item.id" :label="item.displayName"
  168. :value="item.id">
  169. </el-option>
  170. </el-select>
  171. </el-form-item>
  172. </el-col>
  173. <el-col :span="3">
  174. <el-form-item label="民族" prop="nationId" label-width="50px">
  175. <el-select v-model="form.nationId" placeholder="请选择" filterable clearable default-first-option
  176. :filter-method="filterMethod" :style="'width:' + Math.floor((window.pageWidth - 630) / 8) + 'px;'"
  177. size="small">
  178. <el-option v-for="item in nation" :key="item.id" :label="item.displayName" :value="item.id" />
  179. </el-select>
  180. </el-form-item>
  181. </el-col>
  182. <el-col :span="3" />
  183. </el-row>
  184. <el-row>
  185. <el-col :span="5">
  186. <el-form-item label="体检类别" prop="medicalTypeId">
  187. <el-select v-model="form.medicalTypeId" placeholder="请选择" filterable clearable
  188. :style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'" size="small"
  189. @change="changeMedicalTypeId">
  190. <el-option v-for="item in dict.medicalType" :key="item.id" :label="item.displayName"
  191. :value="item.id" />
  192. </el-select>
  193. </el-form-item>
  194. </el-col>
  195. <el-col :span="5">
  196. <el-form-item label="工卡号" prop="jobCardNo">
  197. <el-input v-model="form.jobCardNo" size="small"></el-input>
  198. </el-form-item>
  199. </el-col>
  200. <el-col :span="5">
  201. <el-form-item label="体检卡号" prop="medicalCardNo">
  202. <el-input v-model="form.medicalCardNo" size="small"></el-input>
  203. </el-form-item>
  204. </el-col>
  205. <el-col :span="3">
  206. <el-form-item label="职务" prop="jobPost">
  207. <el-input v-model="form.jobPost" size="small"></el-input>
  208. </el-form-item>
  209. </el-col>
  210. <el-col :span="3">
  211. <el-form-item label="职称" prop="jobTitle" label-width="50px">
  212. <el-input v-model="form.jobTitle" size="small"
  213. :style="'width:' + Math.floor((window.pageWidth - 630) / 8) + 'px;'" />
  214. </el-form-item>
  215. </el-col>
  216. <el-col :span="3">
  217. <el-form-item label="介绍人" prop="salesman">
  218. <el-input v-model="form.salesman" size="small"></el-input>
  219. </el-form-item>
  220. </el-col>
  221. </el-row>
  222. <el-row>
  223. <el-col :span="5">
  224. <el-form-item label="体检中心" prop="medicalCenterId">
  225. <el-select v-model="form.medicalCenterId" placeholder="请选择" filterable
  226. :disabled="peisid ? true : false" size="small"
  227. :style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'">
  228. <el-option v-for="item in dict.organization" :key="item.id" :label="item.displayName"
  229. :value="item.id">
  230. </el-option>
  231. </el-select>
  232. </el-form-item>
  233. </el-col>
  234. <el-col :span="4">
  235. <el-form-item label="单位体检次数" prop="isVip" label-width="110px">
  236. <el-select :class="form.customerOrgId == dict.personOrgId ? '' : 'enterToTab'"
  237. v-model="form.customerOrgRegisterId" placeholder="次数" size="small"
  238. :disabled="form.customerOrgId == dict.personOrgId || form.completeFlag == '3'"
  239. :style="'width:' + Math.floor((window.pageWidth - 654) / 6) + 'px;'" @change="changeMedicalTimes"
  240. value-key="id">
  241. <el-option v-for="item in customerOrgRegisterList" :key="item.id" :label="item.medicalTimes"
  242. :value="item.id" :disabled="item.isComplete == 'Y'" />
  243. </el-select>
  244. </el-form-item>
  245. </el-col>
  246. <el-col :span="4">
  247. <el-form-item label="门诊号" prop="hisPatientId">
  248. <el-input v-model="form.hisPatientId" size="small" disabled />
  249. </el-form-item>
  250. </el-col>
  251. <el-col :span="2">
  252. <el-form-item label="电话随访" prop="isPhoneFollow">
  253. <!--
  254. <el-radio v-model="form.isPhoneFollow" label="Y"></el-radio>
  255. <el-radio v-model="form.isPhoneFollow" label="N"></el-radio>
  256. -->
  257. <el-checkbox v-model="form.isPhoneFollow" true-label="Y" false-label="N" />
  258. </el-form-item>
  259. </el-col>
  260. <el-col :span="2">
  261. <el-form-item label="VIP" prop="isVip" label-width="50px">
  262. <!--
  263. <el-radio v-model="form.isVip" label="Y"></el-radio>
  264. <el-radio v-model="form.isVip" label="N"></el-radio>
  265. -->
  266. <el-checkbox v-model="form.isVip" true-label="Y" false-label="N" />
  267. </el-form-item>
  268. </el-col>
  269. <el-col :span="2">
  270. <el-form-item label="隐藏姓名" prop="isNameHide">
  271. <!--
  272. <el-radio v-model="form.isNameHide" label="Y"></el-radio>
  273. <el-radio v-model="form.isNameHide" label="N"></el-radio>
  274. -->
  275. <el-checkbox v-model="form.isNameHide" true-label="Y" false-label="N" />
  276. </el-form-item>
  277. </el-col>
  278. <el-col :span="2">
  279. <el-form-item label="锁住" prop="isLock" label-width="50px">
  280. <!--
  281. <el-radio v-model="form.isLock" label="Y"></el-radio>
  282. <el-radio v-model="form.isLock" label="N"></el-radio>
  283. -->
  284. <el-checkbox v-model="form.isLock" true-label="Y" false-label="N" />
  285. </el-form-item>
  286. </el-col>
  287. <el-col :span="3">
  288. <el-form-item label="体检开始" prop="isMedicalStart">
  289. <el-select v-model="form.isMedicalStart" placeholder="请选择" disabled size="small">
  290. <el-option label="是" value="Y" />
  291. <el-option label="否" value="N" />
  292. </el-select>
  293. </el-form-item>
  294. </el-col>
  295. </el-row>
  296. <el-row>
  297. <el-col :span="5">
  298. <el-form-item label="分组" prop="customerOrgGroupId">
  299. <el-select v-model="form.customerOrgGroupId" placeholder="请选择" filterable clearable
  300. @change="changeCustomerOrgGroupId" :disabled="displayGroup"
  301. :style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'" size="small">
  302. <el-option v-for="item in patientRegister.customerOrgGroup" :key="item.id" :label="item.displayName"
  303. :value="item.id" />
  304. </el-select>
  305. </el-form-item>
  306. </el-col>
  307. <el-col :span="5">
  308. <el-form-item label="套餐" prop="medicalPackageId">
  309. <el-select v-model="form.medicalPackageId" placeholder="请选择" filterable clearable
  310. @change="changeMedicalPackageId" :disabled="displayPackage"
  311. :style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'" size="small">
  312. <el-option v-for="item in dict.medicalPackage" :key="item.id" :label="item.displayName"
  313. :value="item.id" />
  314. </el-select>
  315. </el-form-item>
  316. </el-col>
  317. <el-col :span="11">
  318. <el-form-item label="备注" prop="remark">
  319. <el-input v-model="form.remark" type="textarea" :rows="1" placeholder="请输入备注" size="small"></el-input>
  320. </el-form-item>
  321. </el-col>
  322. <el-col :span="3">
  323. <el-form-item label="状态" prop="completeFlag" label-width="50px">
  324. <el-select v-model="form.completeFlag" placeholder="请选择"
  325. :disabled="(form.completeFlag == '2' || form.completeFlag == '3') ? true : false" size="small">
  326. <div v-if="form.completeFlag == '2' || form.completeFlag == '3'">
  327. <el-option v-for="item in dict.completeFlag" :key="item.id" :label="item.displayName"
  328. :value="item.id">
  329. </el-option>
  330. </div>
  331. <div v-else>
  332. <el-option label="预登记" value="0" />
  333. <el-option label="正式登记" value="1" />
  334. </div>
  335. </el-select>
  336. </el-form-item>
  337. </el-col>
  338. </el-row>
  339. <!--青藏公司 start-->
  340. <el-row v-if="LocalConfig.patientRegister.edit == 'qztl'">
  341. <el-col :span="4">
  342. <el-form-item label="高原/健康">
  343. <el-select v-model="form.qztlType" placeholder="请选择" disabled>
  344. <el-option v-for="item in dict.qztlType" :key="item.id" :label="item.displayName"
  345. :value="item.id" />
  346. </el-select>
  347. </el-form-item>
  348. </el-col>
  349. <el-col :span="2">
  350. <el-form-item label="普速">
  351. <el-checkbox v-model="form.qztlIsCw" true-label="Y" false-label="N" disabled />
  352. </el-form-item>
  353. </el-col>
  354. <el-col :span="2">
  355. <el-form-item label="从业">
  356. <el-checkbox v-model="form.qztlIsCy" true-label="Y" false-label="N" disabled />
  357. </el-form-item>
  358. </el-col>
  359. <el-col :span="2">
  360. <el-form-item label="高铁">
  361. <el-checkbox v-model="form.qztlIsGt" true-label="Y" false-label="N" disabled />
  362. </el-form-item>
  363. </el-col>
  364. <el-col :span="2">
  365. <el-form-item label="行车">
  366. <el-checkbox v-model="form.qztlIsMain" true-label="Y" false-label="N" disabled />
  367. </el-form-item>
  368. </el-col>
  369. <el-col :span="2">
  370. <el-form-item label="职害">
  371. <el-checkbox v-model="form.qztlIsWh" true-label="Y" false-label="N" disabled />
  372. </el-form-item>
  373. </el-col>
  374. <el-col :span="2">
  375. <el-form-item label="复检">
  376. <el-checkbox v-model="form.qztlIsFj" true-label="Y" false-label="N" disabled />
  377. </el-form-item>
  378. </el-col>
  379. <el-col :span="2">
  380. <el-form-item label="导入">
  381. <el-checkbox v-model="form.isQztlImport" true-label="Y" false-label="N" disabled />
  382. </el-form-item>
  383. </el-col>
  384. <el-col :span="2">
  385. <el-form-item label="上传">
  386. <el-checkbox v-model="form.uploadQztlFlag" true-label="Y" false-label="N" disabled />
  387. </el-form-item>
  388. </el-col>
  389. <el-col :span="4">
  390. <el-form-item label="计划" prop="planuserid">
  391. <el-input v-model="form.planuserid" size="small" disabled />
  392. </el-form-item>
  393. </el-col>
  394. </el-row>
  395. <!--青藏公司 end-->
  396. <!--职业病 start-->
  397. <el-row v-if="form.isPatientOccupationalDisease == 'Y'">
  398. <el-col :span="4">
  399. <el-form-item prop="ocCheckTypeId" label="检查类别">
  400. <el-select v-model="form.ocCheckTypeId" size="small" @change="changeOccPosionOrCheckType">
  401. <el-option v-for="item in dict.occCheckType" :key="item.value" :label="item.displayName"
  402. :value="item.id" />
  403. </el-select>
  404. </el-form-item>
  405. </el-col>
  406. <el-col :span="3">
  407. <el-form-item label="工种" label-width="40px">
  408. <el-input v-model="form.jobType" clearable size="small"></el-input>
  409. </el-form-item>
  410. </el-col>
  411. <el-col :span="14">
  412. <el-form-item label="接害因素" label-width="65px">
  413. <el-select v-model="form.poisonIds" size="small"
  414. :style="`width:${Math.floor((window.pageWidth - 242) / 1.714)}px;`" clearable filterable
  415. :filter-method="filterMethodPoison" value-key="id" multiple @change="changeOccPosionOrCheckType"
  416. :disabled="form.completeFlag == '3' ? true : false">
  417. <el-option-group v-for="group in poison" :key="group.poisonTypeName" :label="group.poisonTypeName">
  418. <el-option v-for="item in group.poisonDtos" :key="item.id" :label="item.displayName"
  419. :value="item.id" />
  420. </el-option-group>
  421. </el-select>
  422. </el-form-item>
  423. </el-col>
  424. <el-col :span="3">
  425. <el-form-item label="申请号" prop="occupationalDiseaseNumber" label-width="50px">
  426. <el-input v-model="form.occupationalDiseaseNumber" clearable size="small"></el-input>
  427. </el-form-item>
  428. </el-col>
  429. </el-row>
  430. <!--职业病 end -->
  431. <el-row>
  432. <el-col :span="6">
  433. <el-form-item label="创建人员">
  434. <el-input v-model="form.creatorName" disabled size="small"></el-input>
  435. </el-form-item>
  436. </el-col>
  437. <el-col :span="6">
  438. <el-form-item label="创建时间">
  439. <el-input :value="form.creationTime
  440. ? moment(form.creationTime).format('yyyy-MM-DD')
  441. : ''
  442. " disabled size="small"></el-input>
  443. </el-form-item>
  444. </el-col>
  445. <el-col :span="6">
  446. <el-form-item label="修改人员">
  447. <el-input v-model="form.lastModifierName" disabled size="small"></el-input>
  448. </el-form-item>
  449. </el-col>
  450. <el-col :span="6">
  451. <el-form-item label="修改时间">
  452. <el-input :value="form.lastModificationTime
  453. ? moment(form.lastModificationTime).format('yyyy-MM-DD')
  454. : ''
  455. " disabled size="small"></el-input>
  456. </el-form-item>
  457. </el-col>
  458. </el-row>
  459. </el-form>
  460. <el-image
  461. :style="'position: absolute;top:70px;right:' + (100 + Math.floor((window.pageWidth - 680) / 24)) + 'px; width: 130px; height: 140px;'"
  462. :src="peoplePhoto">
  463. <div slot="placeholder" class="image-slot">
  464. 加载中<span class="dot">...</span>
  465. </div>
  466. </el-image>
  467. </div>
  468. <!--人员登记组合项目明细 register_check_asbitem-->
  469. <div>
  470. <PatientRegisterItem :prForm="form" :prAsbOpraOpts="prAsbOpraOpts" :refreshFormId="refreshFormId" />
  471. </div>
  472. </div>
  473. <div style="margin-left: 10px;">
  474. <div v-show="checkPagePriv(pagePriv.privs, '新增')">
  475. <el-button type="primary" class="commonbutton" @click="btnAdd">新增</el-button>
  476. </div>
  477. <div v-show="checkPagePriv(pagePriv.privs, '复制新增')" class="btn">
  478. <el-button type="primary" class="commonbutton" @click="rdCopy">复制新增</el-button>
  479. </div>
  480. <div v-show="checkPagePriv(pagePriv.privs, '保存')" class="btn">
  481. <el-button type="success" class="commonbutton" @click="btnSubmit('form', true)">保存</el-button>
  482. </div>
  483. <div v-show="checkPagePriv(pagePriv.privs, '检验单申请')" class="btn">
  484. <el-button type="primary" class="commonbutton" @click="lisRequest">检验单申请</el-button>
  485. </div>
  486. <div v-show="checkPagePriv(pagePriv.privs, '条码打印')" class="btn">
  487. <el-button type="primary" class="commonbutton" @click="labelPrint(false)"
  488. :disabled="printing">条码打印</el-button>
  489. </div>
  490. <div v-show="checkPagePriv(pagePriv.privs, '条码补打')" class="btn">
  491. <el-button type="danger" class="commonbutton" @click="btnLabel">条码补打</el-button>
  492. </div>
  493. <div v-show="checkPagePriv(pagePriv.privs, '指引单打印')" class="btn">
  494. <el-button type="primary" class="commonbutton" @click="guidePrint('0001', false)"
  495. :disabled="printing">指引单打印</el-button>
  496. </div>
  497. <!--
  498. <div v-show="checkPagePriv(pagePriv.privs, '指引单预览')" class="btn">
  499. <el-button type="primary" class="commonbutton" @click="guidePrint('0001', true)">指引单预览</el-button>
  500. </div>
  501. -->
  502. <div v-show="checkPagePriv(pagePriv.privs, '条码合并')" class="btn">
  503. <el-button type="danger" class="commonbutton" @click="reLisRequest">条码合并</el-button>
  504. </div>
  505. <div v-show="checkPagePriv(pagePriv.privs, '手动合并项目')" class="btn">
  506. <el-button type="danger" class="commonbutton" @click="reMergeAsbitem">手动合并项目</el-button>
  507. </div>
  508. <div v-show="checkPagePriv(pagePriv.privs, '全个人支付')" style="margin-top: 30px;">
  509. <el-button type="primary" class="commonbutton" @click="btnPayTypeFlag('0')">全个人支付</el-button>
  510. </div>
  511. <div v-show="checkPagePriv(pagePriv.privs, '全单位支付')" class="btn">
  512. <el-button type="primary" class="commonbutton" @click="btnPayTypeFlag('1')">全单位支付</el-button>
  513. </div>
  514. <div v-show="checkPagePriv(pagePriv.privs, '全赠送')" class="btn">
  515. <el-button type="primary" class="commonbutton" @click="btnPayTypeFlag('2')">全赠送</el-button>
  516. </div>
  517. <div v-show="checkPagePriv(pagePriv.privs, '收费')" class="btn">
  518. <el-button type="success" class="commonbutton" @click="toCharge(form)" :disabled="!form.id">收费</el-button>
  519. </div>
  520. <div v-show="checkPagePriv(pagePriv.privs, '收费申请')" class="btn">
  521. <el-button type="success" class="commonbutton" @click="chargeRequest(form)"
  522. :disabled="!form.id">收费申请</el-button>
  523. </div>
  524. <div v-show="checkPagePriv(pagePriv.privs, '复制分组')" class="btn">
  525. <el-button class="commonbutton" @click="btnCopyGroup"
  526. :disabled="form.isLock == 'Y' || form.completeFlag == '3' ? true : false">复制分组</el-button>
  527. </div>
  528. <div v-show="checkPagePriv(pagePriv.privs, '复制套餐')" class="btn">
  529. <el-button class="commonbutton" @click="btnCopyMedicalPackage"
  530. :disabled="form.isLock == 'Y' || form.completeFlag == '3' ? true : false">复制套餐</el-button>
  531. </div>
  532. </div>
  533. </div>
  534. <!--组件弹窗-->
  535. <div>
  536. <!-- 人员档案列表 -->
  537. <el-dialog title="人员档案列表" :visible.sync="dialogVisible" width="800px" :show-close="false"
  538. :close-on-click-modal="false" :append-to-body="true">
  539. <el-table :data="patientList" border width="800" height="480" row-key="id" size="small"
  540. class="el-table__body-wrapper tbody" highlight-current-row @row-click="rowick" @row-dblclick="patientDblclick"
  541. ref="patientList">
  542. <el-table-column type="index" width="30" />
  543. <el-table-column prop="patientNo" label="档案号" />
  544. <el-table-column prop="lastTime" label="末次体检" width="100">
  545. <template slot-scope="scope">
  546. <div v-if="scope.row.lastTime">
  547. {{ moment(scope.row.lastTime).format("yyyy-MM-DD") }}
  548. </div>
  549. </template>
  550. </el-table-column>
  551. <el-table-column prop="medicalTimes" label="体检次数" />
  552. <el-table-column prop="displayName" label="姓名" />
  553. <el-table-column prop="sexId" label="性别">
  554. <template slot-scope="scope">
  555. <div>
  556. {{ dddw(dict.sex, "id", scope.row.sexId, "displayName") }}
  557. </div>
  558. </template>
  559. </el-table-column>
  560. <el-table-column prop="maritalStatusId" label="婚姻">
  561. <template slot-scope="scope">
  562. <div>
  563. {{ dddw(dict.maritalStatus, "id", scope.row.maritalStatusId, "displayName") }}
  564. </div>
  565. </template>
  566. </el-table-column>
  567. <el-table-column prop="birthDate" label="出生日期" width="100">
  568. <template slot-scope="scope">
  569. <div v-if="scope.row.birthDate">
  570. {{ moment(scope.row.birthDate).format("yyyy-MM-DD") }}
  571. </div>
  572. </template>
  573. </el-table-column>
  574. <el-table-column prop="nationId" label="民族">
  575. <template slot-scope="scope">
  576. <div>
  577. {{ dddw(dict.nation, "id", scope.row.nationId, "displayName") }}
  578. </div>
  579. </template>
  580. </el-table-column>
  581. <el-table-column prop="idNo" label="身份证号" />
  582. <el-table-column prop="telephone" label="电话" />
  583. <el-table-column prop="mobileTelephone" label="手机号" />
  584. </el-table>
  585. <span slot="footer" class="dialog-footer">
  586. <el-button class="commonbutton" @click="dialogVisible = false" style="width:90px;">取消</el-button>
  587. <el-button class="commonbutton" type="primary" @click="choosePatient" style="width:90px;">确定</el-button>
  588. </span>
  589. </el-dialog>
  590. <el-dialog title="职业病" :visible.sync="dialogWin.OccDisease" width="800px" :close-on-click-modal="false"
  591. :append-to-body="true">
  592. <OccDisease />
  593. </el-dialog>
  594. <el-dialog title="网上预约" :visible.sync="dialogWin.WebBooking" width="800px" :close-on-click-modal="false"
  595. :append-to-body="true" :show-close="false" @close="close_dialogWin_WebBooking">
  596. <WebBooking />
  597. </el-dialog>
  598. <el-dialog title="网上预约--人寿" :visible.sync="dialogWin.WebBookingMzak" width="800px" :close-on-click-modal="false"
  599. :append-to-body="true" :show-close="false" @close="close_dialogWin_WebBookingMzak">
  600. <WebBookingMzak />
  601. </el-dialog>
  602. <!-- checkStrictly: true, expandTrigger: 'hover', -->
  603. <el-dialog title="选择单位" :visible.sync="dialogOrg" width="800px" :close-on-click-modal="false"
  604. :append-to-body="true">
  605. <div style="height: 320px;">
  606. <el-cascader v-model="form.customerOrgId" :options="patientRegister.customerOrgTreeAll" style="width:400px;"
  607. filterable popper-class="example" :show-all-levels="false" @change="changeChooseOrgId"
  608. :props="{ checkStrictly: true, expandTrigger: 'click', ...customerOrg.treeprops, lazyLoad: lazyLoad, lazy: true, leaf: 'isLeaf' }"
  609. size="small">
  610. </el-cascader>
  611. </div>
  612. <span slot="footer" class="dialog-footer">
  613. <el-button type="primary" @click="btnOkOrg">确定</el-button>
  614. <el-button @click="dialogOrg = false">关闭</el-button>
  615. </span>
  616. </el-dialog>
  617. <!-- 拍照openCamera 网页模式已废弃
  618. <el-dialog title="拍照" :visible.sync="patientRegister.cameraVisble" width="400" height="600"
  619. :close-on-click-modal="false" :append-to-body="true">
  620. <Camera :id="form.id" />
  621. </el-dialog>
  622. -->
  623. <!-- 合并条码 -->
  624. <el-dialog title="合并条码" :visible.sync="patientRegister.lisRequestVisble" width="600px" height="400"
  625. :show-close="false" :close-on-click-modal="false" :append-to-body="true">
  626. <LisRequest :id="form.id" :brushTimes="brushTimes" />
  627. </el-dialog>
  628. <!-- 条码补打 -->
  629. <el-dialog title="条码补打" :visible.sync="dialogWin.Label" width="800px" height="400" :close-on-click-modal="false"
  630. :append-to-body="true">
  631. <el-tabs v-model="tabChoosed" style="height:320px;margin-top: -22px;">
  632. <!-- 组合项目 -->
  633. <el-tab-pane label="检验条码" name="1">
  634. <PatientLisRequest :isDialog="true" />
  635. </el-tab-pane>
  636. <el-tab-pane label="检查条码" name="2">
  637. <PatientPacsRequest :isDialog="true" />
  638. </el-tab-pane>
  639. </el-tabs>
  640. </el-dialog>
  641. <!-- 手动合并项目 -->
  642. <el-dialog title="手动合并项目" :visible.sync="patientRegister.mergeAsbitemVisble" width="600px" height="400"
  643. :show-close="false" :close-on-click-modal="false" :append-to-body="true">
  644. <MergeAsbitem :id="form.id" :medicalCenterId="form.medicalCenterId" :brushTimes="brushTimes" />
  645. </el-dialog>
  646. <!-- 收费 -->
  647. <el-dialog title="" :visible.sync="dialogWin.charge" :close-on-click-modal="false" :append-to-body="true"
  648. fullscreen @close="closeDialogCharge">
  649. <div style="margin-top: -30px;">
  650. <Charge :patientRegisterNo="chargePatientRegisterNo" />
  651. </div>
  652. </el-dialog>
  653. <!-- 收费申请 -->
  654. <el-dialog title="收费申请" :visible.sync="dialogWin.AsbChargeRequest" width="800px" :show-close="false"
  655. :close-on-click-modal="false" :append-to-body="true" @close="closeDialogCharge">
  656. <AsbChargeRequest :patientRegister="form" />
  657. </el-dialog>
  658. <!-- 分诊排队 -->
  659. <el-dialog title="分诊排队" :visible.sync="dialogWin.queue" width="800px" :append-to-body="true"
  660. :close-on-click-modal="false">
  661. <Queue :refParams="queueParams" />
  662. </el-dialog>
  663. <!--复制套餐-->
  664. <el-dialog title="复制体检套餐" :visible.sync="medicalPackageVisble" width="800px" height="500" :show-close="false"
  665. :close-on-click-modal="false" :append-to-body="true">
  666. <el-table :data="dict.medicalPackage" border height="350" row-key="id" size="small" highlight-current-row
  667. @row-click="packageRowClick" @row-dblclick="rowDblclick" ref="patientList">
  668. <!-- "displayName": "健康体检套餐",
  669. "price": 20.00,
  670. "forSexId": "0",
  671. "isActive": "Y",
  672. "remark": "2",
  673. "displayOrder": 1,
  674. "simpleCode": "JKTJTC",
  675. "creatorName": "admin",
  676. "lastModifierName": "users",
  677. "lastModificationTime": "2023-08-04T16:34:02.94408",
  678. "lastModifierId": "3a0ca83b-3116-da05-3916-dfd4c0c548cb",
  679. "creationTime": "2023-07-10T19:53:30.210553",
  680. "creatorId": "3a0c4180-107c-0c89-b25b-0bd34666dcec",
  681. "id": "3a0c51d3-2345-38df-ba0b-1862a3c3606f" -->
  682. <el-table-column type="index" width="50" />
  683. <el-table-column prop="displayName" label="套餐名称" width="180" />
  684. <el-table-column prop="price" label="价格" width="80" />
  685. <el-table-column prop="forSexId" label="适用性别" width="80">
  686. <template slot-scope="scope">
  687. <div>
  688. {{ dddw(dict.forSex, "id", scope.row.forSexId, "displayName") }}
  689. </div>
  690. </template>
  691. </el-table-column>
  692. <el-table-column prop="remark" label="备注" width="100" />
  693. <el-table-column prop="creatorName" label="创建人员" width="80" />
  694. <el-table-column prop="creationTime" label="创建日期" width="100">
  695. <template slot-scope="scope">
  696. <div v-if="scope.row.creationTime">
  697. {{ moment(scope.row.creationTime).format("yyyy-MM-DD") }}
  698. </div>
  699. </template>
  700. </el-table-column>
  701. <el-table-column prop="lastModifierName" label="修改人员" width="80" />
  702. <el-table-column prop="lastModificationTime" label="修改日期" width="100">
  703. <template slot-scope="scope">
  704. <div v-if="scope.row.lastModificationTime">
  705. {{ moment(scope.row.lastModificationTime).format("yyyy-MM-DD") }}
  706. </div>
  707. </template>
  708. </el-table-column>
  709. </el-table>
  710. <span slot="footer" class="dialog-footer">
  711. <el-button class="commonbutton" type="primary" @click="copyMedicalPackage" style="width:90px;">确定</el-button>
  712. <el-button class="commonbutton" @click="medicalPackageVisble = false" style="width:90px;">取消</el-button>
  713. </span>
  714. </el-dialog>
  715. <!--复制分组-->
  716. <el-dialog title="复制单位分组" :visible.sync="groupVisble" width="800px" height="500" :show-close="false"
  717. :close-on-click-modal="false" :append-to-body="true">
  718. <div>
  719. <div style="display: flex">
  720. <div>
  721. <span>体检单位</span>
  722. <el-select v-model="customerOrgId" placeholder="请选择体检单位" :filter-method="filterMethodOrg"
  723. default-first-option clearable filterable @clear="customerOrgDisp = deepCopy(customerOrgAll)"
  724. style="margin-left: 10px" @change="changeCustomerOrg" size="small">
  725. <el-option v-for="item in customerOrgDisp" :key="item.id" :label="item.displayName" :value="item.id">
  726. {{ item.displayName }}
  727. </el-option>
  728. </el-select>
  729. </div>
  730. <div style="margin-left: 20px">
  731. <span>单位体检次数</span>
  732. <el-select v-model="customerOrgRegister" placeholder="次数" style="width: 60px; margin-left: 10px"
  733. size="small" @change="changeTimes" value-key="id">
  734. <el-option v-for="item in customerOrgRegisterList" :key="item.id" :label="item.medicalTimes"
  735. :value="item" />
  736. </el-select>
  737. </div>
  738. </div>
  739. <el-table :data="customerOrgGroups" ref="customerOrgGroups" style="margin-top: 2px" row-key="id" border
  740. height="450px" size="small" highlight-current-row :row-class-name="handleRowClassName"
  741. @row-click="groupRowClick" @row-dblclick="groupRowDblclick">
  742. >
  743. <el-table-column type="index" label="序号" min-width="50" align="center" />
  744. <el-table-column prop="displayName" label="名称" min-width="150" />
  745. <el-table-column prop="price" label="价格" min-width="60" align="center" />
  746. <el-table-column prop="forSexId" label="适用性别" min-width="60" align="center">
  747. <template slot-scope="scope">
  748. {{ dddw(dict.forSex, "id", scope.row.forSexId, "displayName") }}
  749. </template>
  750. </el-table-column>
  751. <el-table-column prop="maritalStatusId" label="适用婚姻状况" min-width="80" align="center">
  752. <template slot-scope="scope">
  753. {{
  754. dddw(
  755. dict.forMaritalStatus,
  756. "id",
  757. scope.row.maritalStatusId,
  758. "displayName"
  759. )
  760. }}
  761. </template>
  762. </el-table-column>
  763. <el-table-column prop="creatorName" label="创建者" min-width="60" align="center" />
  764. <el-table-column label="创建时间" min-width="150" align="center">
  765. <template slot-scope="scope">
  766. {{
  767. scope.row.creationTime
  768. ? moment(scope.row.creationTime).format("yyyy-MM-DD HH:mm:ss")
  769. : ""
  770. }}
  771. </template>
  772. </el-table-column>
  773. </el-table>
  774. <div style="display: flex;justify-content: space-between;margin-top: 10px;">
  775. <div></div>
  776. <span slot="footer" class="dialog-footer">
  777. <el-button class="commonbutton" type="primary" @click="copyGroup" style="width:90px;">确定</el-button>
  778. <el-button class="commonbutton" @click="groupVisble = false" style="width:90px;">取消</el-button>
  779. </span>
  780. </div>
  781. </div>
  782. </el-dialog>
  783. </div>
  784. </div>
  785. </template>
  786. <script>
  787. import moment from "moment";
  788. import { mapState, mapActions } from "vuex";
  789. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  790. import { getTreeNode } from "../../utlis/tree"
  791. import {
  792. getPagePriv, checkPagePriv, objCopy, setNull, dddw, checkIDCode, parseID,
  793. birthdayToAge, ageToBirthday, deepCopy, arrayFilter, arrayReduce, parsIcCardtoLocal,
  794. reMadeOrgTree, arrayExistObj, isValidMobileNumber
  795. } from "../../utlis/proFunc";
  796. import { getTreePids, madeTree } from "../../utlis/tree";
  797. import { photoParse, savePeoplePhoto, } from "../../utlis/proApi";
  798. import Camera from "./Camera.vue";
  799. import PatientRegisterItem from "./PatientRegisterItem.vue";
  800. import LisRequest from "./LisRequest.vue";
  801. import MergeAsbitem from "./MergeAsbitem.vue";
  802. import AsbChargeRequest from "./AsbChargeRequest.vue";
  803. import Charge from "../../views/charge/charge.vue";
  804. import PatientRegisterEditQuery from "../../components/patientRegister/PatientRegisterEditQuery.vue";
  805. import OccDisease from "../../components/occDisease/OccDisease.vue"
  806. import WebBooking from "../../components/webBooking/WebBooking.vue"
  807. import WebBookingMzak from "../../components/webBooking/WebBookingMzak.vue"
  808. import PatientLisRequest from "../../components/patientRegister/PatientLisRequest.vue";
  809. import PatientPacsRequest from "../../components/patientRegister/PatientPacsRequest.vue";
  810. import Queue from "../../components/queue/Queue.vue";
  811. export default {
  812. components: {
  813. Camera,
  814. LisRequest,
  815. MergeAsbitem,
  816. PatientRegisterItem,
  817. Charge,
  818. AsbChargeRequest,
  819. PatientRegisterEditQuery,
  820. OccDisease,
  821. PatientLisRequest,
  822. PatientPacsRequest,
  823. WebBooking, WebBookingMzak,
  824. Queue
  825. },
  826. // isDoctor: '0:标准人员登记/1:医生诊台登记(可修改单位)'
  827. props: ['isDoctor', 'patientRegisterId', 'editTimes', 'refreshRegister', 'refFuncSetData'],
  828. data() {
  829. var validateMobileTelephone = (rule, value, callback) => {
  830. if (value) {
  831. if (!isValidMobileNumber(value)) {
  832. callback(new Error('请填写正确的手机号!'));
  833. } else {
  834. callback();
  835. }
  836. } else {
  837. callback();
  838. }
  839. };
  840. return {
  841. pagePriv: {
  842. routeUrlorPageName: 'PatientRegisterEdit', //当前页面归属路由或归属页面权限名称
  843. privs: [] // 页面权限
  844. },
  845. patient_register_occ_check_id: '', // 属于职业病体检类别的ID
  846. merge_lis_pacs_label: "0", //默认0 检验检查条码合并 0:不合并,1:合并
  847. LocalConfig: {
  848. patientRegister: {
  849. editMode: 'standard', //standard/qztl 人员登记组件版本
  850. editHeight: 0, // 相较与标准版,选组合项目组件,减少高度
  851. immediateToHisCharge: true, // 人员登记保存后,立即发送收费申请
  852. findPatientByName: true, // 人员登记,启有人名查询
  853. printGuideLabel: ["guide", "pacs", "lis"], // 保存后打印指引单与条码
  854. dispCustomerOrgCode: 'N', // 人员登记列表--单位树是否显示 customerOrgCode
  855. },
  856. },
  857. brushTimes: 0,
  858. peisid: null,
  859. peoplePhoto: '',
  860. preCustomerOrgId: '', // 上一个人的体检单位,只是在本组件点新增时才用到
  861. form: {
  862. registerManType: 'customer', //登记人员类型,客服:customer 医生:doctor 支持在医生诊台处理登记人员
  863. id: "", //id
  864. photo: '', //照片
  865. patientId: "00000000-0000-0000-0000-000000000000", //档案号ID 选择了档案就传档案号,未选就传00000-0000...
  866. patientNo: "", //档案号
  867. customerOrgId: ["00000000-0000-0000-0000-000000000001"], //单位编号 默认个人
  868. customerOrgParentId: "00000000-0000-0000-0000-000000000001",
  869. customerOrgName: "个人体检",
  870. customerOrgRegisterId: "00000000-0000-0000-0000-000000000001", //默认单位体检次数
  871. customerOrgGroupId: null, //分组
  872. medicalPackageId: null, //套餐
  873. patientName: "", //姓名
  874. birthDate: null, //日期型
  875. sexId: "U", //性别 默认未知U
  876. age: null, //年龄
  877. jobCardNo: "", //工卡号
  878. medicalCardNo: "", //体检卡号
  879. maritalStatusId: "9", //婚姻状况 默认未知
  880. medicalTypeId: null, //体检类别
  881. personnelTypeId: null, //人员类别
  882. jobPost: "", //职务
  883. jobTitle: "", //职称
  884. salesman: "", //介绍人
  885. sexHormoneTermId: null, //性激素期限
  886. isNameHide: "N", //隐藏姓名
  887. isPhoneFollow: "N", //电话随访
  888. isVip: "N", //vip客户
  889. remark: "", //
  890. isLock: "N", //是否锁住
  891. completeFlag: "1", //完成标志 0:预登记,1:正式登记(未检),2:部份已检,3:已总检 【创建编辑时不操作】
  892. isMedicalStart: "N", //体检开始标志 【创建编辑时不操作】
  893. patientRegisterNo: "", //条码号 【创建编辑时不操作】
  894. medicalTimes: 1, //条码号 【创建编辑时不操作】
  895. medicalCenterId: null, //体检中心
  896. address: "", //地址
  897. email: "", //email
  898. idNo: "", //身份证号
  899. telephone: "", //电话
  900. mobileTelephone: "", //手机号
  901. nationId: null, //民族编号
  902. birthPlaceId: null, //籍惯(出生地)
  903. postalCode: "", //邮编
  904. creatorId: null,
  905. creationTime: "",
  906. lastModificationTime: "",
  907. lastModifierId: null,
  908. isMaxMedicalTimes: 'N',
  909. medicalStartDate: null,
  910. hisPatientId: '', //对接 hisid
  911. registerCheckAsbitems: [], //所选组合项目明细
  912. // 青藏公司 数据
  913. qztlType: '0', // 高原/健康
  914. qztlIsCw: 'N', // 普速
  915. qztlIsCy: 'N', // 从业
  916. qztlIsGt: 'N', // 高铁
  917. qztlIsMain: 'N', // 行车
  918. qztlIsWh: 'N', // 职害
  919. qztlIsFj: 'N', // 复检
  920. isQztlImport: 'N', // 导入
  921. uploadQztlFlag: 'N', // 上传
  922. planuserid: '', // 计划人
  923. // 职业病
  924. ocCheckTypeId: null, //检查类别
  925. jobType: '', //工种
  926. poisonIds: [], // 接害因素IDs(主表不保存此项数据)
  927. isPatientOccupationalDisease: 'Y', // 是否职业病检查(主表不保存此项数据)
  928. appointPatientRegisterId: "",
  929. thirdBookingId: "",
  930. occupationalDiseaseNumber: "",
  931. }, //单位 记录 目前新增与更新是一致
  932. formInit: {}, //表单初始化
  933. customerOrgRegisterList: [], //单位体检次数列表
  934. defaultNull: [
  935. "customerOrgId",
  936. "customerOrgGroupId",
  937. "medicalPackageId",
  938. "birthDate",
  939. "age",
  940. "maritalStatusId",
  941. "medicalTypeId",
  942. "personnelTypeId",
  943. "sexHormoneTermId",
  944. "medicalCenterId",
  945. "nationId",
  946. "birthPlaceId",
  947. ], //一般uuid字段为空时,需设置为null值
  948. rules: {
  949. customerOrgId: [
  950. { required: true, message: "请填写单位", trigger: "blur" },
  951. ],
  952. patientName: [
  953. { required: true, message: "请填写姓名", trigger: "blur" },
  954. ],
  955. medicalCenterId: [
  956. { required: true, message: "请填写体检中心", trigger: "blur" },
  957. ],
  958. // mobileTelephone: [
  959. // { required: true, message: "请填写手机号", trigger: "blur" },
  960. // { validator: validateMobileTelephone, trigger: 'blur' }
  961. // ],
  962. },
  963. dialogVisible: false,
  964. patientList: [], //人员列表(用于判断人员多次体检)
  965. patientChoosed: {}, //查重选中的人员
  966. registerVisible: false,
  967. patientRegisters: [],
  968. registerChoosed: {},
  969. dialogCamera: false, //拍照组件
  970. chargePatientRegisterNo: '', //对哪个条码客户收费
  971. //人员登记,组合项目明细操作相关参数
  972. prAsbOpraOpts: {
  973. formId: '', //form.id为空时,明细保存取此formId
  974. copyNew: 0, //触发复制新增
  975. payTypeFlag: '', //触发调整支付方式
  976. prAsbSave: 0, //触发组合项目明细保存
  977. prAsbQuery: 0,//触发组合项目明细查询,比如收费后,刷新收费状态
  978. prAsbGroup: 0, //触发分组更换
  979. prAsbPackage: 0, //触发套餐更换
  980. },
  981. nation: [], //
  982. dialogOrg: false,
  983. printing: false, // 是否打印中,控制一次只能有一个任务
  984. completeFlag: '0', // 默认预登记,首次正式登记或者预登记转正式登记,提示打印条码与指引单
  985. tabChoosed: "1",
  986. poison: [],
  987. poisonList: [],
  988. thirdInterfaceId: '', // 网上预约用到
  989. queueParams: {}, // 分诊排队参数
  990. //**复制分组与套餐相关数据
  991. //控制 复制套餐与分组页面 显示
  992. medicalPackageVisble: false,
  993. groupVisble: false,
  994. customerOrgGroups: [],
  995. //选中套餐与分组所包含的组合项目
  996. curPackageId: '',
  997. curGroupId: '',
  998. packageAsbitems: [],
  999. groupAsbitems: [],
  1000. customerOrgId: '',
  1001. customerOrgDisp: [],
  1002. customerOrgAll: [],
  1003. customerOrgRegisterList: [], //当前体检次数集合
  1004. customerOrgRegister: {}, // 当前选择体检次数
  1005. };
  1006. },
  1007. created() {
  1008. //获取用户当前页面的权限
  1009. let userPriv = window.sessionStorage.getItem('userPriv')
  1010. if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
  1011. try {
  1012. let LocalConfig = JSON.parse(window.localStorage.getItem('LocalConfig'))
  1013. if (LocalConfig && LocalConfig.patientRegister) {
  1014. if (LocalConfig.patientRegister.edit) this.LocalConfig.patientRegister.edit = LocalConfig.patientRegister.edit
  1015. if (LocalConfig.patientRegister.editHeight) this.LocalConfig.patientRegister.editHeight = LocalConfig.patientRegister.editHeight
  1016. if (LocalConfig.patientRegister.immediateToHisCharge) {
  1017. this.LocalConfig.patientRegister.immediateToHisCharge = true
  1018. } else {
  1019. this.LocalConfig.patientRegister.immediateToHisCharge = false
  1020. }
  1021. if (LocalConfig.patientRegister.findPatientByName) {
  1022. this.LocalConfig.patientRegister.findPatientByName = true
  1023. } else {
  1024. this.LocalConfig.patientRegister.findPatientByName = false
  1025. }
  1026. if (LocalConfig.patientRegister.printGuideLabel) this.LocalConfig.patientRegister.printGuideLabel = deepCopy(LocalConfig.patientRegister.printGuideLabel)
  1027. if (LocalConfig.patientRegister.dispCustomerOrgCode) this.LocalConfig.patientRegister.dispCustomerOrgCode = LocalConfig.patientRegister.dispCustomerOrgCode
  1028. }
  1029. } catch (error) {
  1030. console.log("window.localStorage.getItem('LocalConfig')", error)
  1031. }
  1032. this.formInit = deepCopy(this.form)
  1033. // 初始化字典数据
  1034. this.dictInit()
  1035. },
  1036. //挂载完成
  1037. mounted() {
  1038. this.initFormData(this.dataTransOpts.tableS.patient_register.id)
  1039. // 表单中 回车 代替 tab
  1040. this.enterToTab();
  1041. },
  1042. computed: {
  1043. ...mapState(["window", "dialogWin", "dataTransOpts", "dict", "patientRegister", "customerOrg", "projPriv"]),
  1044. //是否总检(已总检则不允许修改套餐与分组)
  1045. isComplete() {
  1046. return this.form.completeFlag == '3' ? true : false;
  1047. },
  1048. // 套餐 disabled 如完成体检亦不允许编辑
  1049. displayPackage() {
  1050. let isPersonOrgId = true
  1051. if (!this.isComplete) {
  1052. if (!this.form.customerOrgId) return false
  1053. if (typeof this.form.customerOrgId == 'string') {
  1054. if (this.form.customerOrgId == this.dict.personOrgId) isPersonOrgId = false
  1055. } else {
  1056. if (this.form.customerOrgId[this.form.customerOrgId.length - 1] == this.dict.personOrgId) isPersonOrgId = false
  1057. }
  1058. }
  1059. return isPersonOrgId
  1060. },
  1061. // 分组 disabled 如完成体检亦不允许编辑
  1062. displayGroup() {
  1063. let isPersonOrgId = true
  1064. if (!this.isComplete) {
  1065. if (!this.form.customerOrgId) return isPersonOrgId
  1066. if (typeof this.form.customerOrgId == 'string') {
  1067. if (this.form.customerOrgId != this.dict.personOrgId) isPersonOrgId = false
  1068. } else {
  1069. if (this.form.customerOrgId[this.form.customerOrgId.length - 1] != this.dict.personOrgId) isPersonOrgId = false
  1070. }
  1071. }
  1072. return isPersonOrgId
  1073. },
  1074. },
  1075. methods: {
  1076. ...mapActions(['getPatientRegisterAbs']),
  1077. dddw, moment, checkPagePriv,
  1078. btnTest() {
  1079. // console.log('form', this.form)
  1080. },
  1081. //数据初始化
  1082. dictInit() {
  1083. // 获取系统参数 -- 职业病 体检类别编号
  1084. let sysParmId = "patient_register_occ_check_id"
  1085. postapi('/api/app/SysParmValue/GetSysParmValueBySysParmId', { sysParmId })
  1086. .then(res => {
  1087. if (res.code > -1) this.patient_register_occ_check_id = res.data
  1088. })
  1089. // 获取系统参数 -- 合并检验检查条码
  1090. postapi('/api/app/SysParmValue/GetSysParmValueBySysParmId', { sysParmId: 'merge_lis_pacs_label' })
  1091. .then(res => {
  1092. if (res.code > -1) {
  1093. this.merge_lis_pacs_label = res.data || "0"
  1094. }
  1095. })
  1096. //性别(仅档案用)
  1097. getapi("/api/app/sex").then((res) => {
  1098. if (res.code == 1) {
  1099. this.dict.sex = res.data;
  1100. }
  1101. });
  1102. //适用性别
  1103. getapi("/api/app/for-sex").then((res) => {
  1104. if (res.code == 1) {
  1105. this.dict.forSex = res.data;
  1106. }
  1107. });
  1108. //体检中心
  1109. getapi("/api/app/organization-units/organization-unit-by-is-peis").then(
  1110. (res) => {
  1111. if (res.code == 1) {
  1112. this.dict.organization = res.data;
  1113. }
  1114. }
  1115. );
  1116. //体检单位
  1117. // getapi("/api/app/customer-org/in-filter").then((res) => {
  1118. // if (res.code == 1) {
  1119. // this.dict.customerOrg = res.data;
  1120. // }
  1121. // });
  1122. //体检类别
  1123. getapi("/api/app/medical-type/in-filter").then((res) => {
  1124. if (res.code > -1) {
  1125. this.dict.medicalType = res.data;
  1126. }
  1127. });
  1128. //人员类别
  1129. getapi("/api/app/personnel-type/in-filter").then((res) => {
  1130. if (res.code > -1) {
  1131. this.dict.personnelType = res.data;
  1132. }
  1133. });
  1134. //婚姻状况
  1135. getapi("/api/app/MaritalStatus/GetMaritalStatusList").then((res) => {
  1136. if (res.code == 1) {
  1137. this.dict.maritalStatus = res.data;
  1138. }
  1139. });
  1140. //性激素期
  1141. getapi("/api/app/sex-hormone-term/in-filter").then((res) => {
  1142. if (res.code == 1) {
  1143. this.dict.sexHormoneTerm = res.data;
  1144. }
  1145. });
  1146. //民族
  1147. getapi("/api/app/nation/in-filter").then((res) => {
  1148. if (res.code != -1) {
  1149. this.dict.nation = res.data;
  1150. this.nation = deepCopy(res.data)
  1151. }
  1152. });
  1153. //籍惯 ,出生地
  1154. getapi("/api/app/birth-place/in-filter").then((res) => {
  1155. if (res.code == 1) {
  1156. this.dict.birthPlace = res.data;
  1157. }
  1158. });
  1159. //套餐
  1160. postapi("/api/app/medicalpackage/GetBasicList", {}).then((res) => {
  1161. if (res.code == 1) {
  1162. this.dict.medicalPackage = res.data;
  1163. }
  1164. });
  1165. //支付方式
  1166. getapi("/api/app/pay-mode").then((res) => {
  1167. if (res.code == 1) {
  1168. this.dict.payMode = res.data;
  1169. }
  1170. });
  1171. //职业病检查类别
  1172. postapi("/api/app/OcCheckType/GetList").then((res) => {
  1173. if (res.code > -1) {
  1174. this.dict.occCheckType = res.data;
  1175. }
  1176. });
  1177. //接害因素
  1178. postapi("/api/app/Poison/GetPoisonWithTypeList").then(res => {
  1179. if (res.code > -1) {
  1180. this.poison = res.data;
  1181. this.poisonList = []
  1182. this.poison.forEach(e => {
  1183. e.poisonDtos.forEach(e2 => {
  1184. this.poisonList.push({
  1185. poisonTypeName: e.poisonTypeName,
  1186. id: e2.id,
  1187. displayName: e2.displayName,
  1188. simpleCode: e2.simpleCode
  1189. })
  1190. });
  1191. });
  1192. }
  1193. })
  1194. //项目类别 树结构
  1195. // getapi("/api/app/item-type/by-code-all").then((res) => {
  1196. // if (res.code != -1) {
  1197. // this.dict.itemTypeTree = res.data;
  1198. // tcdate(this.dict.itemTypeTree);
  1199. // }
  1200. // });
  1201. // postapi("/api/app/asbitem/GetBasicList",{isFilterActive:'Y'}).then((res) => {
  1202. // if (res.code != -1) {
  1203. // this.dict.asbItemAll = res.data;
  1204. // }
  1205. // });
  1206. // // console.log("dict", this.dict);
  1207. },
  1208. changeMedicalTypeId(v) {
  1209. if (this.patient_register_occ_check_id && this.patient_register_occ_check_id == v) {
  1210. this.form.isPatientOccupationalDisease = 'Y'
  1211. } else {
  1212. this.form.isPatientOccupationalDisease = 'N'
  1213. }
  1214. },
  1215. changeChooseOrgId(v) {
  1216. let parentId = null
  1217. if (v) {
  1218. parentId = v[v.length - 1]
  1219. // 已经查询过或无叶子节点的无需再查询
  1220. let lfind = arrayExistObj(this.patientRegister.customerOrgs, 'parentId', parentId)
  1221. if (lfind > -1) return
  1222. lfind = arrayExistObj(this.patientRegister.customerOrgs, 'id', parentId)
  1223. if (lfind > -1 && this.patientRegister.customerOrgs[lfind].isChild == 'N') return
  1224. } else {
  1225. return
  1226. }
  1227. this.getCustomerOrgChild(parentId)
  1228. },
  1229. getCustomerOrgChild(parentId) {
  1230. return new Promise((resolve, reject) => {
  1231. postapi('/api/app/CustomerOrg/GetCustomerOrgByParentId', { parentId })
  1232. .then(res => {
  1233. if (res.code > -1) {
  1234. res.data.forEach(e => {
  1235. e.isLeaf = e.isChild == 'Y' ? false : true
  1236. });
  1237. // console.log('this.patientRegister.customerOrgs', this.patientRegister.customerOrgs)
  1238. let treeData = reMadeOrgTree(deepCopy(res.data), this.LocalConfig.patientRegister.dispCustomerOrgCode);
  1239. treeData.forEach(e => {
  1240. if (arrayExistObj(this.patientRegister.customerOrgs, 'id', e.id) == -1) {
  1241. this.patientRegister.customerOrgs.push(e)
  1242. }
  1243. });
  1244. this.patientRegister.customerOrgTreeAll = madeTree(this.patientRegister.customerOrgs, 'treeChildren', 'parentId', 'id', null)
  1245. // console.log('this.patientRegister.customerOrgTreeAll', this.patientRegister.customerOrgTreeAll)
  1246. resolve(treeData)
  1247. }
  1248. })
  1249. .catch(err => {
  1250. reject(err)
  1251. })
  1252. })
  1253. },
  1254. lazyLoad(node, resolve) {
  1255. if (node && node.data && node.data.id) {
  1256. this.getCustomerOrgChild(node.data.id).then(res => {
  1257. resolve(res)
  1258. }).catch(err => {
  1259. resolve([])
  1260. })
  1261. }
  1262. },
  1263. // 确定选中企业
  1264. btnOkOrg() {
  1265. let customerOrgId = ''
  1266. this.changeCustomerOrgId(this.form.customerOrgId)
  1267. if (Array.isArray(this.form.customerOrgId)) {
  1268. this.form.customerOrgParentId = this.form.customerOrgId[0]
  1269. customerOrgId = this.form.customerOrgId[this.form.customerOrgId.length - 1]
  1270. } else {
  1271. this.form.customerOrgParentId = this.form.customerOrgId
  1272. customerOrgId = this.form.customerOrgId
  1273. }
  1274. let node = getTreeNode(this.patientRegister.customerOrgTreeAll, "treeChildren", "id", customerOrgId)
  1275. if (node) this.form.customerOrgName = node.displayName
  1276. this.dialogOrg = false
  1277. },
  1278. // 获取登记信息 初始form表单数据
  1279. initFormData(patientRegisterId) {
  1280. return new Promise((resolve, reject) => {
  1281. this.peisid = window.sessionStorage.getItem('peisid');
  1282. let customerOrgId, customerOrgName, customerOrgParentId
  1283. if (this.patientRegister.query.customerOrgId) {
  1284. customerOrgParentId = this.patientRegister.query.CustomerOrgParentId
  1285. customerOrgId = this.patientRegister.query.customerOrgId
  1286. customerOrgName = this.patientRegister.query.customerOrgName
  1287. } else {
  1288. customerOrgParentId = this.form.customerOrgParentId
  1289. customerOrgId = this.form.customerOrgId
  1290. customerOrgName = this.form.customerOrgName
  1291. }
  1292. this.preCustomerOrgId = this.patientRegister.query.customerOrgId
  1293. if (!patientRegisterId) { //添加
  1294. this.peoplePhoto = '' // 清掉照片
  1295. this.form = Object.assign({}, this.form, this.formInit)
  1296. this.form.registerCheckAsbitems = []
  1297. this.form.medicalCenterId = this.peisid; //体检中收
  1298. this.form.customerOrgId = customerOrgId //体检单位
  1299. this.form.customerOrgParentId = customerOrgParentId //体检父单位
  1300. this.form.customerOrgName = customerOrgName
  1301. this.completeFlag = '0'
  1302. this.handleFormData().then(() => {
  1303. resolve()
  1304. })
  1305. } else {
  1306. // let res = await getapi(`/api/app/patient-register/${patientRegisterId}`)
  1307. postapi('/api/app/patientregister/getinfoorpatient', { patientRegisterId })
  1308. .then(res => {
  1309. if (res.code > -1) {
  1310. // this.form = res.data 这种方式,会造成 checkbox 值变化不响应,故取消
  1311. this.form = Object.assign({}, this.form, res.data)
  1312. this.completeFlag = this.form.completeFlag
  1313. this.handleFormData().then(() => resolve())
  1314. }
  1315. })
  1316. .catch(() => resolve())
  1317. }
  1318. })
  1319. },
  1320. // 根据体检单位ID,获取体检类别
  1321. getMedicalTypeByOrg(orgId){
  1322. return new Promise((resolve, reject) => {
  1323. postapi('/api/app/Customerorg/GetMedicalTypeIdByCustomerOrgId')
  1324. })
  1325. },
  1326. handleFormData() {
  1327. return new Promise((resolve, reject) => {
  1328. // 判断是否职业健康检查
  1329. this.changeMedicalTypeId(this.form.medicalTypeId)
  1330. if (this.form.isPatientOccupationalDisease == 'Y') {
  1331. this.getOccDiseaseData()
  1332. }
  1333. // 处理照片
  1334. this.getPeoplePhoto(this.form.photo)
  1335. // this.dataTransOpts.refresh.register_check_asbitem.D++ //触发所选组合项目刷新 (取消这种触发,减少交互)
  1336. this.dataTransOpts.tableM.register_check_asbitem = this.form.registerCheckAsbitems
  1337. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  1338. e.standTotal = e.amount * e.standardPrice
  1339. e.total = e.amount * e.chargePrice
  1340. });
  1341. // 单位/个人 的分组与套餐处理
  1342. this.changeCustomerOrgId(this.form.customerOrgId)
  1343. .then(() => {
  1344. // 刷新明细项目(已登记)
  1345. this.dataTransOpts.refresh.register_check_asbitem.OnlyRefreshAsbitem++
  1346. })
  1347. .finally(() => {
  1348. resolve()
  1349. })
  1350. })
  1351. },
  1352. //快速选择组合项目时,调整可按拼间简码及简称查找
  1353. filterMethod(keyWords) {
  1354. //// console.log('filterMethod',this.asbItemQuick)
  1355. if (keyWords) {
  1356. this.nation = [];
  1357. this.dict.nation.forEach(item => {
  1358. if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  1359. || item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1) {
  1360. this.nation.push(item);
  1361. }
  1362. });
  1363. } else {
  1364. this.nation = deepCopy(this.dict.nation);
  1365. }
  1366. },
  1367. //选择单位,并返回顶级单位
  1368. changeCustomerOrgId(v) {
  1369. // 始终返回 reslove ,主要用于流程控制
  1370. return new Promise((resolve, reject) => {
  1371. console.log('changeCustomerOrgId', v, this.form.customerOrgParentId)
  1372. let customerOrgId = "", customerOrgParentId = ""
  1373. if (Array.isArray(v) && v.length > 0) {
  1374. customerOrgId = v[v.length - 1]
  1375. } else {
  1376. customerOrgId = v // 后台顶级单位ID未获取正确(再获取一次)
  1377. }
  1378. // 保留之前预选的单位 if (!this.preCustomerOrgId)
  1379. this.preCustomerOrgId = customerOrgId
  1380. this.getParentCustomerOrgId(v)
  1381. .then(res => {
  1382. if (res) {
  1383. customerOrgParentId = res
  1384. // 获取并设置体检次数(个人的固定 "00000000-0000-0000-0000-000000000001" ),单位刷新分组字典
  1385. this.getCustomerOrgRegisterList(customerOrgParentId)
  1386. .then(() => {
  1387. // 需要触发 修改 分组/套餐 顶级ID 没有变时,不改变套餐与分组
  1388. if (customerOrgParentId != this.form.customerOrgParentId) {
  1389. this.form.customerOrgGroupId = null
  1390. this.form.medicalPackageId = null
  1391. // 清除套餐分组标识
  1392. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  1393. e.isBelongGroupPackage = 'N'
  1394. });
  1395. // 如果是个人,则清除分组字典
  1396. if (customerOrgParentId == this.dict.personOrgId) {
  1397. this.patientRegister.customerOrgGroup = []
  1398. }
  1399. if (this.form.customerOrgParentId == this.dict.personOrgId) {
  1400. this.changeMedicalPackageId()
  1401. } else {
  1402. this.changeCustomerOrgGroupId()
  1403. }
  1404. }
  1405. return resolve(customerOrgParentId)
  1406. })
  1407. } else {
  1408. resolve(customerOrgParentId)
  1409. }
  1410. })
  1411. .catch(() => {
  1412. resolve(customerOrgParentId)
  1413. })
  1414. })
  1415. },
  1416. // 获取顶级单位ID
  1417. getParentCustomerOrgId(v) {
  1418. return new Promise((resolve, reject) => {
  1419. let customerOrgParentId = null
  1420. if (Array.isArray(v) && v.length > 0) {
  1421. customerOrgParentId = v[0]
  1422. return resolve(customerOrgParentId)
  1423. } else {
  1424. if (!v) {
  1425. return resolve(customerOrgParentId)
  1426. } else {
  1427. if (v == this.dict.personOrgId) {
  1428. return resolve(v) // 等于个人体检时,则直接返回
  1429. } else {
  1430. getapi(`/api/app/customer-org/parent/${v}`)
  1431. .then(res => {
  1432. if (res.code > -1) customerOrgParentId = res.data
  1433. })
  1434. .finally(() => {
  1435. return resolve(customerOrgParentId)
  1436. })
  1437. }
  1438. }
  1439. }
  1440. })
  1441. },
  1442. //获取并设置体检次数(个人的固定 "00000000-0000-0000-0000-000000000001" ),单位刷新分组字典
  1443. getCustomerOrgRegisterList(customerOrgParentId) {
  1444. return new Promise((resolve, reject) => {
  1445. if (customerOrgParentId == this.dict.personOrgId) {
  1446. // 个人体检则 固定单位体检次数
  1447. this.form.customerOrgRegisterId = "00000000-0000-0000-0000-000000000001"
  1448. return resolve()
  1449. } else {
  1450. //获取单位体检次数信息
  1451. getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${customerOrgParentId}`)
  1452. .then(res => {
  1453. if (res.code > - 1) {
  1454. // console.log('获取单位体检次数', this.form.customerOrgRegisterId, res.data)
  1455. this.customerOrgRegisterList = res.data
  1456. if (!this.form.customerOrgRegisterId || this.form.customerOrgRegisterId == "00000000-0000-0000-0000-000000000001") {
  1457. let customerOrgRegisterList = arrayFilter(res.data, 'isComplete', 'N') //不显示已完成的体检次数
  1458. if (customerOrgRegisterList.length > 0) {
  1459. this.form.customerOrgRegisterId = customerOrgRegisterList[customerOrgRegisterList.length - 1].id
  1460. }
  1461. }
  1462. // /api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${this.form.customerOrgRegisterId}
  1463. this.patientRegister.customerOrgGroup = []
  1464. if (this.form.customerOrgRegisterId && this.form.customerOrgRegisterId != '00000000-0000-0000-0000-000000000001') {
  1465. //获取单位分组
  1466. postapi('/api/app/CustomerOrgGroup/GetListForPatentRegisterByFilter', { customerOrgRegisterId: this.form.customerOrgRegisterId })
  1467. .then(res2 => {
  1468. if (res2 && res2.code != -1) {
  1469. this.patientRegister.customerOrgGroup = res2.data;
  1470. }
  1471. })
  1472. } return
  1473. }
  1474. })
  1475. .finally(() => {
  1476. resolve()
  1477. })
  1478. }
  1479. })
  1480. },
  1481. //读取身份证信息
  1482. peopleIcCard() {
  1483. if (!this.$peisAPI) {
  1484. this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" })
  1485. return
  1486. }
  1487. this.$peisAPI.peopleIcCard().then(res => {
  1488. // console.log('peopleIcCard', res)
  1489. let lres = JSON.parse(res)
  1490. if (lres.code >= -1) {
  1491. let idNos = parsIcCardtoLocal(lres.data, this.dict.sex, this.dict.nation)
  1492. this.form.patientName = idNos.Name
  1493. this.form.birthDate = idNos.birthDate
  1494. this.form.sexId = idNos.sexId
  1495. this.form.age = idNos.age
  1496. this.form.nationId = idNos.nationId
  1497. this.form.idNo = idNos.IDCode
  1498. this.form.address = idNos.Address
  1499. this.peoplePhoto = 'data:image/bmp;base64,' + idNos.Photo
  1500. // this.patientRegister.photo = 'data:image/bmp;base64,' + idNos.Photo
  1501. this.changeIdNo() // 触发身份证查询档案号
  1502. } else {
  1503. this.$message.error({ showClose: true, message: `${lres.message}` })
  1504. }
  1505. })
  1506. },
  1507. // 分诊排队
  1508. fnQueue(row) {
  1509. this.queueParams = {
  1510. patientRegisterId: row.id
  1511. }
  1512. this.dialogWin.queue = true
  1513. this.dataTransOpts.plus.queue++
  1514. },
  1515. //修改单位体检次数
  1516. changeMedicalTimes() {
  1517. this.form.customerOrgGroupId = null
  1518. this.changeCustomerOrgGroupId()
  1519. //获取体检次数下的分组
  1520. this.getCustomerOrgGroup(this.form.customerOrgRegisterId)
  1521. },
  1522. //移除旧分组或套餐的组合项目
  1523. removeGroupPackageAsb() {
  1524. let body = { registerAsbitemIds: [] }
  1525. let registerAsbitemIds = []
  1526. let chargeComplete = ''
  1527. //体检基本信息未保存时,删除所有所选项目
  1528. if (!this.form.id) {
  1529. this.patientRegister.patientRegisterAbs = [];
  1530. return body;
  1531. }
  1532. //删除已选 分组或套餐的组合项目 ,如已收费或 已检时,将 groupPackageId 置为null
  1533. for (let i = 0; i < this.patientRegister.patientRegisterAbs.length; i++) {
  1534. if (!this.patientRegister.patientRegisterAbs[i].id) {
  1535. this.patientRegister.patientRegisterAbs.splice(i, 1)
  1536. i--
  1537. continue
  1538. }
  1539. if (this.patientRegister.patientRegisterAbs[i].isCharge == 'Y' || this.patientRegister.patientRegisterAbs[i].checkCompleteFlag != '0') {
  1540. chargeComplete += this.patientRegister.patientRegisterAbs[i].asbitemName + ','
  1541. this.patientRegister.patientRegisterAbs[i].groupPackageId = null
  1542. } else {
  1543. //数据库有,才添加到待删除的数组中
  1544. if (this.patientRegister.patientRegisterAbs[i].id) {
  1545. registerAsbitemIds.push(this.patientRegister.patientRegisterAbs[i].id)
  1546. }
  1547. this.patientRegister.patientRegisterAbs.splice(i, 1)
  1548. i--
  1549. }
  1550. }
  1551. if (chargeComplete) {
  1552. this.$message.info({ showClose: true, message: `所选项目:${chargeComplete}已收费或已检,不可删除!` });
  1553. }
  1554. body = { registerAsbitemIds };
  1555. return body;
  1556. },
  1557. //添加新套餐/分组的组合项目
  1558. addGroupPackageAsb(groupPackageAsb, typeFlag, groupPackageId) {
  1559. let payTypeFlag = '0'; //默认个人支付
  1560. let lfind = -1
  1561. if (this.form.customerOrgId != this.dict.personOrgId) payTypeFlag = '1' //单位支付
  1562. for (let i = 0; i < groupPackageAsb.length; i++) {
  1563. lfind = arrayExistObj(this.patientRegister.patientRegisterAbs, 'asbitemId', groupPackageAsb[i].id)
  1564. if (lfind > - 1) {
  1565. this.patientRegister.patientRegisterAbs[lfind].groupPackageId = groupPackageId
  1566. //editCount++
  1567. continue
  1568. }
  1569. let pojo = {
  1570. asbitemId: groupPackageAsb[i].id,
  1571. asbitemName: groupPackageAsb[i].displayName,
  1572. patientRegisterId: this.form.id,
  1573. standardPrice: groupPackageAsb[i].price,
  1574. chargePrice: typeFlag == 'group' ? groupPackageAsb[i].customerOrgGroupDetailPrice : groupPackageAsb[i].price,
  1575. payTypeFlag,
  1576. discount: typeFlag == 'group' ? groupPackageAsb[i].discount : 100,
  1577. isCharge: "N",
  1578. amount: typeFlag == 'group' ? groupPackageAsb[i].customerOrgGroupDetailAmount : 1,
  1579. groupPackageId: groupPackageId
  1580. }
  1581. this.patientRegister.patientRegisterAbs.push(pojo)
  1582. }
  1583. },
  1584. //获取体检次数下的分组
  1585. getCustomerOrgGroup(customerOrgRegisterId) {
  1586. this.patientRegister.customerOrgGroup = []
  1587. // /api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${customerOrgRegisterId}`
  1588. postapi('/api/app/CustomerOrgGroup/GetListForPatentRegisterByFilter', { customerOrgRegisterId }).then(res => {
  1589. if (res.code != - 1) {
  1590. this.patientRegister.customerOrgGroup = res.data;
  1591. }
  1592. })
  1593. },
  1594. //修改出生日期
  1595. changeBirthDate() {
  1596. this.form.age = birthdayToAge(this.form.birthDate)
  1597. },
  1598. //修改出生日期
  1599. changeAge() {
  1600. this.form.birthDate = ageToBirthday(this.form.age)
  1601. },
  1602. //修改身份证,生成年龄、出生、性别
  1603. changeIdNo() {
  1604. if (!this.form.idNo) return
  1605. this.Query(this.form.idNo)
  1606. let ret = parseID(this.form.idNo)
  1607. // console.log('changeIdNo',ret)
  1608. if (ret.age != -1) {
  1609. this.form.birthDate = new Date(ret.birthday)
  1610. this.form.age = ret.age
  1611. this.form.sexId = ret.sex
  1612. }
  1613. },
  1614. // 输入名字时,查重
  1615. changePatientName() {
  1616. console.log('this.LocalConfig.patientRegister.findPatientByName', this.LocalConfig.patientRegister.findPatientByName)
  1617. if (this.LocalConfig.patientRegister.findPatientByName) {
  1618. this.Query(this.form.patientName)
  1619. }
  1620. },
  1621. // //分组改变时触发
  1622. changeCustomerOrgGroupId() {
  1623. this.prAsbOpraOpts.prAsbGroup++
  1624. },
  1625. // //套餐改变时触发
  1626. changeMedicalPackageId() {
  1627. this.prAsbOpraOpts.prAsbPackage++
  1628. },
  1629. //根据姓名,身份证号 查询档案信息,用于判断人员多次体检
  1630. Query(param) {
  1631. this.patientChoosed = { id: '' } // 清空之前的选择
  1632. //编辑的时候不查重
  1633. if (this.form.id || !param) return;
  1634. //// console.log(`/api/app/patient/in-filter?Filter=${param}`)
  1635. let body = {
  1636. filter: param,
  1637. maxResultCount: 500
  1638. }
  1639. this.patientList = []
  1640. postapi('/api/app/patient/getlistinfilter', body).then((res) => {
  1641. if (res.code > -1) {
  1642. // console.log("查重 ", res); //有数据才显示
  1643. if (res.data && res.data.length > 0) {
  1644. this.patientList = res.data;
  1645. this.dialogVisible = true;
  1646. }
  1647. }
  1648. });
  1649. },
  1650. //列表选中
  1651. rowick(row) {
  1652. this.patientChoosed = row;
  1653. },
  1654. patientDblclick(row) {
  1655. this.patientChoosed = row;
  1656. this.choosePatient()
  1657. },
  1658. //确定选择人员
  1659. choosePatient() {
  1660. if (!this.patientChoosed.id) {
  1661. this.$message.warning({ showClose: true, message: '请选择人员档案信息' })
  1662. return;
  1663. }
  1664. this.dialogVisible = false;
  1665. this.form.patientId = this.patientChoosed.id;
  1666. this.form.patientNo = this.patientChoosed.patientNo;
  1667. this.form.medicalTimes = this.patientChoosed.medicalTimes + 1;
  1668. // 考滤录入有值,档案却无值
  1669. if (this.patientChoosed.displayName) this.form.patientName = this.patientChoosed.displayName;
  1670. if (this.patientChoosed.sexId) this.form.sexId = this.patientChoosed.sexId;
  1671. if (this.patientChoosed.birthDate) this.form.birthDate = new Date(this.patientChoosed.birthDate);
  1672. if (this.patientChoosed.nationId) this.form.nationId = this.patientChoosed.nationId;
  1673. if (this.patientChoosed.idNo) this.form.idNo = this.patientChoosed.idNo;
  1674. if (!this.form.maritalStatusId) this.form.maritalStatusId = this.patientChoosed.maritalStatusId;
  1675. if (!this.form.telephone) this.form.telephone = this.patientChoosed.telephone;
  1676. if (!this.form.mobileTelephone) this.form.mobileTelephone = this.patientChoosed.mobileTelephone;
  1677. if (this.form.birthDate) {
  1678. this.form.age = birthdayToAge(this.form.birthDate)
  1679. }
  1680. if (this.form.idNo) {
  1681. let ret = parseID(this.form.idNo)
  1682. this.form.birthDate = new Date(ret.birthday)
  1683. this.form.age = ret.age
  1684. this.form.sexId = ret.sex
  1685. }
  1686. },
  1687. registerRowClick(row) {
  1688. this.registerChoosed = row;
  1689. },
  1690. registerRowDblclick(row) {
  1691. this.registerChoosed = row;
  1692. this.chooseRegister()
  1693. },
  1694. chooseRegister() {
  1695. if (!this.registerChoosed) {
  1696. alert("请选中人员登记信息");
  1697. return;
  1698. }
  1699. objCopy(this.registerChoosed, this.form)
  1700. // this.patientRegister.patientRegisterId = this.registerChoosed.id
  1701. // this.patientRegister.photo = this.registerChoosed.photo
  1702. // this.getPatientRegisterAbs(this.registerChoosed.id)
  1703. this.dataTransOpts.tableS.patient_register.id = this.registerChoosed.id
  1704. setTimeout(() => {
  1705. this.dataTransOpts.refresh.register_check_asbitem.M++
  1706. }, 20);
  1707. this.registerVisible = false
  1708. },
  1709. // 组装基本信息保存的参数体
  1710. madePrBody() {
  1711. //赋值
  1712. let body = deepCopy(this.form);
  1713. // // console.log('this.form',this.form)
  1714. console.log('body', this.form, body)
  1715. if (this.form.birthDate) {
  1716. try {
  1717. body.birthDate = moment(new Date(this.form.birthDate)).format("yyyy-MM-DD")
  1718. } catch (error) {
  1719. // this.form.birthDate != "Invalid date"
  1720. body.birthDate = null
  1721. }
  1722. } else {
  1723. body.birthDate = null
  1724. }
  1725. if (body.birthDate == "Invalid date") body.birthDate = null
  1726. if (isNaN(body.age)) {
  1727. body.age = null
  1728. } else {
  1729. body.age = Number(body.age)
  1730. }
  1731. // // console.log('body',body)
  1732. // Invalid date
  1733. delete body.registerManType;
  1734. delete body.patientRegisterNo;
  1735. delete body.medicalTimes;
  1736. // delete body.completeFlag;
  1737. delete body.isMedicalStart;
  1738. delete body.patientNo;
  1739. delete body.creatorId;
  1740. delete body.creationTime;
  1741. delete body.lastModificationTime;
  1742. delete body.lastModifierId;
  1743. delete body.isVipBox;
  1744. delete body.isNameHideBox;
  1745. delete body.isPhoneFollowBox;
  1746. delete body.isLockBox;
  1747. delete body.photo;
  1748. // if(this.form.registerManType == 'customer') delete body.medicalStartDate;
  1749. if (this.form.id) delete body.medicalStartDate;
  1750. setNull(body, this.defaultNull);
  1751. if (typeof this.form.customerOrgId == 'object') {
  1752. if (this.form.customerOrgId.length > 0) body.customerOrgId = this.form.customerOrgId[this.form.customerOrgId.length - 1]
  1753. }
  1754. //日期转换 日期控件增加格式
  1755. // // console.log("body.birthDate", body.birthDate);
  1756. // if (body.birthDate) {
  1757. // body.birthDate = moment(new Date(body.birthDate)).format(
  1758. // "yyyy-MM-DD"
  1759. // );
  1760. // }
  1761. return body
  1762. },
  1763. // 验证职业病数据合法性
  1764. validateOccData() {
  1765. let err = ''
  1766. if (!this.form.idNo) return "职业健康检查必须填写 身份证号!"
  1767. if (this.form.maritalStatusId == '9') return "职业健康检查 婚姻不允许填未知!"
  1768. if (this.form.sexId == 'U') return "职业健康检查 性别不允许填未知!"
  1769. if (!this.form.ocCheckTypeId) return "职业健康检查必须填写 检查类别!"
  1770. if (!this.form.jobType) return "职业健康检查必须填写 工种!"
  1771. if (this.form.poisonIds == null || this.form.poisonIds.length == 0) return "职业健康检查必须填写 接害因素!"
  1772. return err
  1773. },
  1774. //提交
  1775. btnSubmit(formName, msgTip) {
  1776. console.log('btnSubmit,formName,form', formName, JSON.stringify(this.form))
  1777. this.$refs[formName].validate((valid, fields) => {
  1778. // console.log('fields', fields)
  1779. if (!valid) {
  1780. this.$message.warning({ showClose: true, message: fields[Object.keys(fields)[0]][0].message });
  1781. return false
  1782. }
  1783. console.log('btnSubmit1', formName)
  1784. if (this.form.customerOrgId != this.dict.personOrgId) {
  1785. if (!this.form.customerOrgRegisterId) {
  1786. this.$message.warning({ showClose: true, message: "请填写单位体检次数!" });
  1787. return false
  1788. }
  1789. }
  1790. if (this.form.idNo && checkIDCode(this.form.idNo) == false) {
  1791. this.$message.warning({ showClose: true, message: "身份证号填写不合法!" });
  1792. return false
  1793. }
  1794. // 如果是职业病,数据验证
  1795. if (this.form.isPatientOccupationalDisease == 'Y') {
  1796. let message = this.validateOccData()
  1797. if (message) {
  1798. this.$message.warning({ showClose: true, message });
  1799. return false
  1800. }
  1801. }
  1802. // console.log('btnSubmit2', formName)
  1803. let body = this.madePrBody()
  1804. // console.log('madePrBody',body)
  1805. body.registerCheckAsbitems = deepCopy(this.dataTransOpts.tableM.register_check_asbitem)
  1806. if (this.form.id) {
  1807. // 更新时,先保存明细,再更新主表
  1808. // this.prAsbOpraOpts.prAsbSave++ //触发组合项目保存
  1809. body.patientRegisterId = body.id;
  1810. } else {
  1811. delete body.id;
  1812. }
  1813. console.log('btnSubmit3', formName)
  1814. // // console.log(`/api/patientregister/createreturninfo`, body);
  1815. postapi(`/api/PatientRegister/CreatePatientRegister`, body)
  1816. .then(async (res) => {
  1817. if (res.code > -1) {
  1818. // 因为 res.data 返回的 isPatientOccupationalDisease 是错误的(因为职业病尚未保存,所以以form里的值为准)
  1819. let isPatientOccupationalDisease = this.form.isPatientOccupationalDisease
  1820. this.form = Object.assign({}, this.form, res.data, { isPatientOccupationalDisease })
  1821. this.dataTransOpts.tableS.patient_register = deepCopy(res.data)
  1822. delete this.dataTransOpts.tableS.patient_register.registerCheckAsbitems
  1823. // 保存成功赋 id 值等
  1824. this.dataTransOpts.tableM.register_check_asbitem = res.data.registerCheckAsbitems
  1825. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  1826. e.total = e.amount * e.chargePrice
  1827. });
  1828. //一般读身份证照片时,会出现这种情况
  1829. if (this.peoplePhoto && this.peoplePhoto.indexOf("data:image") > -1) await savePeoplePhoto(res.data.id, this.peoplePhoto);
  1830. // 如果是职业病,则保存职业病相关信息
  1831. // console.log('this.form.isPatientOccupationalDisease', this.form.isPatientOccupationalDisease)
  1832. if (this.form.isPatientOccupationalDisease == 'Y') {
  1833. await this.occUpdate()
  1834. }
  1835. // 保存即发送收费申请 正式登记的才发送申请
  1836. if (this.form.completeFlag != '0' && this.LocalConfig.patientRegister.immediateToHisCharge) {
  1837. await this.immediateToHisCharge(this.form.id)
  1838. }
  1839. // 首次正式登记或者预登记转正式登记,提示打印条码与指引单
  1840. if (this.completeFlag == '0' && this.form.completeFlag != '0') {
  1841. if (Array.isArray(this.LocalConfig.patientRegister.printGuideLabel) && this.LocalConfig.patientRegister.printGuideLabel.length > 0) {
  1842. this.$confirm("是否打印 指引单、人员条码、检验条码及 Pacs 条码?", "提示", {
  1843. confirmButtonText: "是",
  1844. cancelButtonText: "否",
  1845. type: "warning",
  1846. })
  1847. .then(() => {
  1848. return this.labelPrint(false)
  1849. })
  1850. .then(res => {
  1851. return this.guidePrint('0001', false)
  1852. })
  1853. .catch((err) => {
  1854. if (err != "cancel") {
  1855. console.log(err)
  1856. this.$message.error({ showClose: true, message: err })
  1857. }
  1858. })
  1859. .finally(() => {
  1860. this.completeFlag = this.form.completeFlag
  1861. });
  1862. }
  1863. }
  1864. }
  1865. }
  1866. );
  1867. });
  1868. },
  1869. // 保存职业病信息
  1870. async occUpdate() {
  1871. // 职业病基本信息
  1872. let lriskFactors = []
  1873. this.form.poisonIds.forEach(e => {
  1874. lriskFactors.push(dddw(this.poisonList, 'id', e, 'displayName'))
  1875. });
  1876. let diseaseBase = {
  1877. patientRegisterId: this.form.id,
  1878. ocCheckTypeId: this.form.ocCheckTypeId,
  1879. jobType: this.form.jobType,
  1880. riskFactors: `${lriskFactors}`,
  1881. occupationalDiseaseNumber: this.form.occupationalDiseaseNumber
  1882. }
  1883. // 职业病接害因素
  1884. let poisons = this.dataTransOpts.tableM.patient_poison.filter(e => {
  1885. return this.form.poisonIds.indexOf(e.poisonId) > - 1
  1886. })
  1887. this.form.poisonIds.forEach(e => {
  1888. if (arrayExistObj(poisons, 'poisonId', e) == -1) {
  1889. poisons.push({
  1890. patientRegisterId: this.form.id,
  1891. poisonId: e,
  1892. occupationalAbnormalId: null
  1893. })
  1894. }
  1895. });
  1896. let patientOccupationalDisease = Object.assign({}, this.dataTransOpts.tableS.patient_occupational_disease || {}, diseaseBase)
  1897. let body = {
  1898. patientRegisterId: this.form.id,
  1899. patientOccupationalDisease,
  1900. patientPoisons: poisons,
  1901. isPatientOccupationalDiseaseUpdate: "Y", //基本信息
  1902. isPatientPoisonsUpdate: "Y", //接害因素
  1903. isPatientPastMedicalHistorysUpdate: "N", // 既往病史
  1904. isPatientOccupationalMedicalHistorysUpdate: "N", // 职业病史
  1905. isPatientOccupationalHistorysUpdate: "N", // 职业史
  1906. isPatientSymptomsUpdate: "N", // 症状
  1907. }
  1908. try {
  1909. await postapi('/api/app/OccupationalDisease/CreateOccupationalDiseaseWithDetail', body)
  1910. this.getOccDiseaseData()
  1911. } catch (error) {
  1912. console.log('occUpdate error', error)
  1913. }
  1914. },
  1915. // 获取职业病信息
  1916. getOccDiseaseData() {
  1917. return new Promise((resolve, reject) => {
  1918. let patientRegisterId = this.form.id
  1919. postapi('/api/app/OccupationalDisease/GetOccupationalDiseaseWithDetailByPatientRegisterId', { patientRegisterId })
  1920. .then(res => {
  1921. if (res.code > -1) {
  1922. if (res.data['patientOccupationalDisease'] == null) {
  1923. this.dataTransOpts.tableS.patient_occupational_disease = { patientRegisterId }
  1924. } else {
  1925. this.dataTransOpts.tableS.patient_occupational_disease = deepCopy(res.data['patientOccupationalDisease'])
  1926. }
  1927. this.dataTransOpts.tableM.patient_poison = deepCopy(res.data['patientPoisonDtos'])
  1928. this.form.ocCheckTypeId = this.dataTransOpts.tableS.patient_occupational_disease.ocCheckTypeId
  1929. this.form.jobType = this.dataTransOpts.tableS.patient_occupational_disease.jobType
  1930. this.form.occupationalDiseaseNumber = this.dataTransOpts.tableS.patient_occupational_disease.occupationalDiseaseNumber
  1931. let poisonIds = [] // 接害因素IDs
  1932. this.dataTransOpts.tableM.patient_poison.forEach(e => {
  1933. poisonIds.push(e.poisonId)
  1934. });
  1935. this.form.poisonIds = poisonIds
  1936. resolve('')
  1937. } else {
  1938. reject(res.message)
  1939. }
  1940. })
  1941. .catch(error => {
  1942. reject(error)
  1943. })
  1944. })
  1945. },
  1946. // 列表数据生成 分组 select
  1947. madeSelectGroup(poisonList) {
  1948. let poison = []
  1949. poisonList.forEach(e => {
  1950. let lfind = arrayExistObj(poison, "poisonTypeName", e.poisonTypeName)
  1951. if (lfind == -1) {
  1952. poison.push({ poisonTypeName: e.poisonTypeName, poisonDtos: [{ id: e.id, displayName: e.displayName, simpleCode: e.simpleCode }] })
  1953. } else {
  1954. poison[lfind]['poisonDtos'].push({ id: e.id, displayName: e.displayName, simpleCode: e.simpleCode })
  1955. }
  1956. });
  1957. return poison
  1958. },
  1959. filterMethodPoison(v) {
  1960. // console.log('this.poisonList',v,this.poisonList)
  1961. if (v) {
  1962. let lv = v.toUpperCase()
  1963. let poisonList = this.poisonList.filter(e => {
  1964. return e.poisonTypeName.indexOf(lv) > -1 || e.displayName.indexOf(lv) > -1 || e.simpleCode.indexOf(lv) > -1
  1965. })
  1966. this.poison = this.madeSelectGroup(poisonList)
  1967. } else {
  1968. this.poison = this.madeSelectGroup(this.poisonList)
  1969. }
  1970. console.log('filterMethod', this.poison)
  1971. },
  1972. // 人员新增
  1973. btnAdd() {
  1974. this.dataTransOpts.tableS.patient_register.id = ''
  1975. this.dataTransOpts.refresh.patient_register.S++
  1976. },
  1977. //将现有的数据,复制并展现,但未保存
  1978. rdCopy() {
  1979. if (!this.form.id) {
  1980. this.$message.info({ showClose: true, message: "该信息尚未保存,不可执行此操作!" });
  1981. return;
  1982. }
  1983. this.dataTransOpts.tableS.patient_register.id = ''
  1984. this.peoplePhoto = '/pic/Photo.jpg'
  1985. this.patientRegister.patientRegisterId = '';
  1986. this.form.id = '';
  1987. this.form.patientId = '00000000-0000-0000-0000-000000000000';
  1988. this.form.patientRegisterNo = '';
  1989. this.form.patientNo = '';
  1990. this.form.medicalTimes = 1;
  1991. this.form.patientName = '';
  1992. this.form.photo = '';
  1993. this.form.completeFlag = '1'; //
  1994. // this.patientRegister.patientRegisterAbs.forEach(e => {
  1995. // e.id = '';
  1996. // e.patientRegisterId = '';
  1997. // e.isCharge = 'N';
  1998. // e.checkCompleteFlag = '0'
  1999. // e.isLock = 'N'
  2000. // });
  2001. // 触发明细项目复制
  2002. // setTimeout(() => {
  2003. // this.prAsbOpraOpts.copyNew++
  2004. // }, 10);
  2005. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  2006. delete e.id
  2007. e.patientRegisterId = ''
  2008. e.isCharge = 'N'
  2009. e.isLock = 'N'
  2010. e.checkCompleteFlag = '0'
  2011. });
  2012. // // console.log('this.patientRegister.patientRegisterAbs',this.patientRegister.patientRegisterAbs)
  2013. this.$message.warning({ showClose: true, message: "操作成功,请记得点保存" });
  2014. },
  2015. //删除
  2016. del() {
  2017. deletapi(
  2018. `/api/app/customer-org/${this.customerOrg.customerOrgRd.id}`
  2019. ).then((res) => {
  2020. // console.log("删除 操作成功");
  2021. this.setData({ key: "customerOrg.customerOrgRd", value: { id: "" } });
  2022. this.getCustomerOrgTree();
  2023. });
  2024. },
  2025. // 同步团检人员网上添加项目信息
  2026. btnDownOrg() {
  2027. postapi("/api/app/ThirdInterface/GetListByThirdInterfaceTypeAsync", { thirdInterfaceType: "07" })
  2028. .then(res => {
  2029. if (res.code > -1 && res.data && Array.isArray(res.data) && res.data.length > 0) {
  2030. this.thirdInterfaceId = res.data[0].id
  2031. return postapi('/api/app/AppointPatientRegister/GetByPatientRegisterId', { thirdInterfaceId: this.thirdInterfaceId, appointPatientRegisterId: '1', patientRegisterId: this.form.id })
  2032. }
  2033. })
  2034. .then(res => {
  2035. if (res && res.code > -1) {
  2036. this.form.appointPatientRegisterId = res.data.appointPatientRegisterId
  2037. return postapi('/api/app/AppointPatientRegister/GetAppointRegisterAsbitemListById', {
  2038. thirdInterFaceId: this.thirdInterfaceId,
  2039. appointPatientRegisterId: res.data.appointPatientRegisterId
  2040. })
  2041. }
  2042. })
  2043. .then(res => {
  2044. if (res && res.code > -1) {
  2045. res.data.forEach(e => {
  2046. e.discount = e.standardPrice == 0 ? 100 : Math.floor(e.chargePrice * 10000 / e.standardPrice) / 100
  2047. if (!e.isBelongGroupPackage) {
  2048. e.isBelongGroupPackage = e.isInMedicalPackage
  2049. }
  2050. // e.standTotal = e.amount * e.standardPrice
  2051. e.total = e.amount * e.chargePrice
  2052. });
  2053. this.dataTransOpts.tableM.register_check_asbitem = deepCopy(res.data)
  2054. this.$message.success({ showClose: true, message: '操作成功!' })
  2055. }
  2056. })
  2057. },
  2058. //拍照(已废弃)
  2059. // openCamera() {
  2060. // if (!this.form.id) {
  2061. // alert("请先保存人员信息");
  2062. // return;
  2063. // }
  2064. // this.patientRegister.cameraVisble = true;
  2065. // },
  2066. //拍照(调壳程序)
  2067. photoGrah() {
  2068. if (!this.form.id) {
  2069. alert("请先保存人员信息");
  2070. return;
  2071. }
  2072. if (!this.$peisAPI) {
  2073. this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" })
  2074. return
  2075. }
  2076. this.$peisAPI.photoGrah()
  2077. .then(res => {
  2078. // console.log('this.$peisAPI.photoGrah 原始返回结果', res)
  2079. let lres = JSON.parse(res)
  2080. if (lres.code > -1) {
  2081. let uploadPhoto = {
  2082. patientRegisterId: this.form.id,
  2083. photo: lres.data.Photo,
  2084. };
  2085. this.peoplePhoto = `data:image/${lres.data.PhotoFormat == 'jpg' ? 'jpeg' : lres.data.PhotoFormat};base64,${lres.data.Photo}`
  2086. // this.patientRegister.photo = `data:image/${lres.data.PhotoFormat == 'jpg' ? 'jpeg' : lres.data.PhotoFormat};base64,${lres.data.Photo}`
  2087. return postapi(`/api/app/patient-register/up-load-img`, uploadPhoto)
  2088. } else {
  2089. this.$message.error({ showClose: true, message: "上传照片错误" + lres.code })
  2090. }
  2091. }).then(res => {
  2092. if (res && res.code > -1) {
  2093. let body = {
  2094. patientRegisterId: this.form.id,
  2095. photo: res.data,
  2096. };
  2097. // console.log(body);
  2098. return postapi(`/api/app/patient-register/update-photo`, body);
  2099. }
  2100. }).then(res => {
  2101. if (res && res.code > -1) {
  2102. //// console.log('拍照',res.data)
  2103. this.patientRegister.patientRegisterRd.photo = res.data.photo
  2104. // console.log("操作成功");
  2105. }
  2106. }).catch(err => {
  2107. // console.log('this.$peisAPI.photoGrah', err)
  2108. this.$message.error({ showClose: true, message: `照片操作错误 ${err}` })
  2109. })
  2110. },
  2111. getPeoplePhoto(photo) {
  2112. this.peoplePhoto = photoParse(photo)
  2113. },
  2114. // 打印指引单(isPreview)
  2115. guidePrint(ReportCode, isPreview) {
  2116. return new Promise((resolve, reject) => {
  2117. if (!this.form.id) {
  2118. reject("人员信息尚未保存,不可执行此操作!")
  2119. }
  2120. if (this.form.completeFlag == '0') {
  2121. reject("预登记人员,不可执行此操作!")
  2122. }
  2123. if (!this.$peisAPI) {
  2124. reject("此功能,需要在壳客户端才可运行!")
  2125. }
  2126. let token = window.sessionStorage.getItem('token');
  2127. let user = window.sessionStorage.getItem('user');
  2128. let toOutShell = {
  2129. ReportCode, token,
  2130. isBuildImage: 'N',
  2131. IsUploadPdf: 'N',
  2132. preViewCanPrint: 'N',
  2133. BusinessCode: this.form.id,
  2134. Parameters: [
  2135. { Name: 'printer', Value: user },
  2136. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  2137. { Name: 'pageFooter', Value: 'pic/peisQrCode.jpg' },
  2138. ],
  2139. };
  2140. console.log('this.$peisAPI.print', JSON.stringify(toOutShell))
  2141. this.printing = true
  2142. if (isPreview) {
  2143. this.$peisAPI.printPre(JSON.stringify(toOutShell))
  2144. .then(res => {
  2145. if (JSON.parse(res).code < 0) {
  2146. reject(JSON.parse(res).message)
  2147. } else {
  2148. resolve(res)
  2149. }
  2150. })
  2151. .catch(err => {
  2152. reject(err)
  2153. })
  2154. .finally(() => {
  2155. this.printing = false
  2156. })
  2157. } else {
  2158. this.$peisAPI.print(JSON.stringify(toOutShell))
  2159. .then(res => {
  2160. if (JSON.parse(res).code < 0) {
  2161. reject(JSON.parse(res).message)
  2162. } else {
  2163. return postapi('/api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id])
  2164. }
  2165. })
  2166. .then(res => {
  2167. if (res && res.code > -1) {
  2168. let lfind = arrayExistObj(this.patientRegister.prList, 'id', this.form.id)
  2169. if (lfind > -1) {
  2170. if (this.patientRegister.prList[lfind].guidePrintTimes) {
  2171. this.patientRegister.prList[lfind].guidePrintTimes = Number(this.patientRegister.prList[lfind].guidePrintTimes) + 1;
  2172. } else {
  2173. this.patientRegister.prList[lfind].guidePrintTimes = 1;
  2174. }
  2175. }
  2176. resolve(res)
  2177. } else {
  2178. reject("更新指引单打印错误")
  2179. }
  2180. })
  2181. .catch(err => {
  2182. reject(err)
  2183. })
  2184. .finally(() => {
  2185. this.printing = false
  2186. })
  2187. }
  2188. })
  2189. },
  2190. //检验申请
  2191. async lisRequest() {
  2192. this.$message.warning({ showClose: true, message: '此功能已合并到条码打印' });
  2193. /*
  2194. let isPrintLisRequest = false
  2195. let res = null
  2196. if (this.form.id.length < 1) {
  2197. this.$message.info({ showClose: true, message: "人员信息尚未保存,不可执行此操作!"});
  2198. return;
  2199. }
  2200. try {
  2201. res = await postapi(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`);
  2202. // console.log(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`, res)
  2203. } catch (error) {
  2204. return;
  2205. }
  2206. if (res.code > -1) {
  2207. // this.$message.info("发送检验申请成功!");
  2208. isPrintLisRequest = true;
  2209. }
  2210. //重复申请,重打
  2211. if (res.code == -1 && res.message.indexOf('已申请') > -1) {
  2212. isPrintLisRequest = true;
  2213. }
  2214. if (!isPrintLisRequest) return;
  2215. try {
  2216. await this.$confirm("是否打印检验申请单?", "提示", {
  2217. confirmButtonText: "是",
  2218. cancelButtonText: "否",
  2219. type: "info",
  2220. showClose: false,
  2221. closeOnClickModal: false,
  2222. closeOnPressEscape: false,
  2223. });
  2224. } catch (error) {
  2225. return;
  2226. }
  2227. //打印检验申请单
  2228. this.lisPrint('0003', false);
  2229. */
  2230. },
  2231. //条码打印(lis + pacs)
  2232. labelPrint(isPreview) {
  2233. return new Promise((resolve, reject) => {
  2234. if (!this.form.id) {
  2235. reject("人员信息尚未保存,不可执行此操作!");
  2236. }
  2237. if (this.form.completeFlag == '0') {
  2238. reject("预登记人员,不可执行此操作!");
  2239. }
  2240. if (!this.$peisAPI) {
  2241. reject("此功能,需要在壳客户端才可运行!");
  2242. }
  2243. let token = window.sessionStorage.getItem('token');
  2244. let user = window.sessionStorage.getItem('user');
  2245. let toOutShell = {
  2246. token, // ReportCode,
  2247. IsMoreLabel: 'Y',
  2248. isBuildImage: 'N',
  2249. IsUploadPdf: 'N',
  2250. BusinessCode: this.form.id,
  2251. Parameters: [
  2252. { Name: 'printer', Value: user },
  2253. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  2254. { Name: 'pageFooter', Value: 'pic/peisQrCode.jpg' }
  2255. ],
  2256. };
  2257. this.printing = true
  2258. if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('patient') > -1 && this.LocalConfig.patientRegister.printGuideLabel.indexOf('lis') > -1 && this.LocalConfig.patientRegister.printGuideLabel.indexOf('pacs') > -1) {
  2259. if (this.merge_lis_pacs_label == '1') {
  2260. this.guidePrintEasy('0008', isPreview, toOutShell)
  2261. .then(res => {
  2262. return this.lisPrint('0002', isPreview, toOutShell)
  2263. })
  2264. // .then(res => {
  2265. // return this.pacsPrint('0004', isPreview, toOutShell)
  2266. // })
  2267. .then(res => {
  2268. resolve(res)
  2269. })
  2270. .catch(err => {
  2271. reject(err)
  2272. })
  2273. .finally(() => {
  2274. this.printing = false
  2275. })
  2276. } else {
  2277. this.guidePrintEasy('0008', isPreview, toOutShell)
  2278. .then(res => {
  2279. return this.lisPrint('0002', isPreview, toOutShell)
  2280. })
  2281. .then(res => {
  2282. return this.pacsPrint('0004', isPreview, toOutShell)
  2283. })
  2284. .then(res => {
  2285. resolve(res)
  2286. })
  2287. .catch(err => {
  2288. reject(err)
  2289. })
  2290. .finally(() => {
  2291. this.printing = false
  2292. })
  2293. }
  2294. } else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('patient') > -1 && this.LocalConfig.patientRegister.printGuideLabel.indexOf('lis') > -1) {
  2295. this.guidePrintEasy('0008', isPreview, toOutShell)
  2296. .then(res => {
  2297. return this.lisPrint('0002', isPreview, toOutShell)
  2298. })
  2299. .then(res => {
  2300. resolve(res)
  2301. })
  2302. .catch(err => {
  2303. reject(err)
  2304. })
  2305. .finally(() => {
  2306. this.printing = false
  2307. })
  2308. } else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('patient') > -1 && this.LocalConfig.patientRegister.printGuideLabel.indexOf('pacs') > -1) {
  2309. this.guidePrintEasy('0008', isPreview, toOutShell)
  2310. .then(res => {
  2311. return this.pacsPrint('0004', isPreview, toOutShell)
  2312. })
  2313. .then(res => {
  2314. resolve(res)
  2315. })
  2316. .catch(err => {
  2317. reject(err)
  2318. })
  2319. .finally(() => {
  2320. this.printing = false
  2321. })
  2322. } else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('lis') > -1 && this.LocalConfig.patientRegister.printGuideLabel.indexOf('pacs') > -1) {
  2323. if (this.merge_lis_pacs_label == '1') {
  2324. this.lisPrint('0002', isPreview, toOutShell)
  2325. // .then(res => {
  2326. // return this.pacsPrint('0004', isPreview, toOutShell)
  2327. // })
  2328. .then(res => {
  2329. resolve(res)
  2330. })
  2331. .catch(err => {
  2332. reject(err)
  2333. })
  2334. .finally(() => {
  2335. this.printing = false
  2336. })
  2337. } else {
  2338. this.lisPrint('0002', isPreview, toOutShell)
  2339. .then(res => {
  2340. return this.pacsPrint('0004', isPreview, toOutShell)
  2341. })
  2342. .then(res => {
  2343. resolve(res)
  2344. })
  2345. .catch(err => {
  2346. reject(err)
  2347. })
  2348. .finally(() => {
  2349. this.printing = false
  2350. })
  2351. }
  2352. } else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('patient') > -1) {
  2353. this.guidePrintEasy('0008', isPreview, toOutShell)
  2354. .then(res => {
  2355. resolve(res)
  2356. })
  2357. .catch(err => {
  2358. reject(err)
  2359. })
  2360. .finally(() => {
  2361. this.printing = false
  2362. })
  2363. } else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('lis') > -1) {
  2364. this.lisPrint('0002', isPreview, toOutShell)
  2365. .then(res => {
  2366. resolve(res)
  2367. })
  2368. .catch(err => {
  2369. reject(err)
  2370. })
  2371. .finally(() => {
  2372. this.printing = false
  2373. })
  2374. } else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('pacs') > -1) {
  2375. this.pacsPrint('0004', isPreview, toOutShell)
  2376. .then(res => {
  2377. resolve(res)
  2378. })
  2379. .catch(err => {
  2380. reject(err)
  2381. })
  2382. .finally(() => {
  2383. this.printing = false
  2384. })
  2385. } else {
  2386. this.printing = false
  2387. resolve("success")
  2388. }
  2389. })
  2390. },
  2391. // lis条码打印
  2392. guidePrintEasy(ReportCode, isPreview, toOutShell) {
  2393. return new Promise((resolve, reject) => {
  2394. toOutShell.ReportCode = ReportCode
  2395. console.log('this.$peisAPI.print', JSON.stringify(toOutShell))
  2396. if (isPreview) {
  2397. this.$peisAPI.printPre(JSON.stringify(toOutShell))
  2398. .then(res => {
  2399. if (JSON.parse(res).code < 0) {
  2400. // this.$message.warning({ showClose: true, message: JSON.parse(lres).message });
  2401. reject(JSON.parse(res).message)
  2402. } else {
  2403. resolve(res)
  2404. }
  2405. })
  2406. .catch(err => {
  2407. reject(err)
  2408. })
  2409. } else {
  2410. this.$peisAPI.print(JSON.stringify(toOutShell))
  2411. .then(res => {
  2412. if (JSON.parse(res).code < 0) {
  2413. reject(JSON.parse(res).message)
  2414. } else {
  2415. return postapi('/api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id])
  2416. }
  2417. })
  2418. .then(res => {
  2419. if (res && res.code > -1) {
  2420. let lfind = arrayExistObj(this.patientRegister.prList, 'id', this.form.id)
  2421. if (lfind > -1) {
  2422. if (this.patientRegister.prList[lfind].guidePrintTimes) {
  2423. this.patientRegister.prList[lfind].guidePrintTimes = Number(this.patientRegister.prList[lfind].guidePrintTimes) + 1;
  2424. } else {
  2425. this.patientRegister.prList[lfind].guidePrintTimes = 1;
  2426. }
  2427. }
  2428. resolve(res)
  2429. } else {
  2430. reject(res.message)
  2431. }
  2432. })
  2433. .catch(err => {
  2434. reject(err)
  2435. })
  2436. }
  2437. })
  2438. },
  2439. // lis条码打印
  2440. lisPrint(ReportCode, isPreview, toOutShell) {
  2441. return new Promise((resolve, reject) => {
  2442. toOutShell.ReportCode = ReportCode
  2443. console.log('this.$peisAPI.print', JSON.stringify(toOutShell))
  2444. if (isPreview) {
  2445. this.$peisAPI.printPre(JSON.stringify(toOutShell))
  2446. .then(res => {
  2447. if (JSON.parse(res).code < 0) {
  2448. // this.$message.warning({ showClose: true, message: JSON.parse(lres).message });
  2449. reject(JSON.parse(res).message)
  2450. } else {
  2451. resolve(res)
  2452. }
  2453. })
  2454. .catch(err => {
  2455. reject(err)
  2456. })
  2457. } else {
  2458. this.$peisAPI.print(JSON.stringify(toOutShell))
  2459. .then(res => {
  2460. if (JSON.parse(res).code < 0) {
  2461. reject(JSON.parse(res).message)
  2462. } else {
  2463. return postapi('/api/app/lisrequest/updatelisrequestisprint', { operateType: 1, patientRegisterId: this.form.id })
  2464. }
  2465. })
  2466. .then(res => {
  2467. if (res && res.code < 0) {
  2468. reject(res.message)
  2469. } else {
  2470. resolve(res)
  2471. }
  2472. })
  2473. .catch(err => {
  2474. reject(err)
  2475. })
  2476. }
  2477. })
  2478. },
  2479. //pacs条码打印
  2480. pacsPrint(ReportCode, isPreview, toOutShell) {
  2481. return new Promise((resolve, reject) => {
  2482. toOutShell.ReportCode = ReportCode
  2483. console.log('this.$peisAPI.print', JSON.stringify(toOutShell))
  2484. if (isPreview) {
  2485. this.$peisAPI.printPre(JSON.stringify(toOutShell))
  2486. .then(res => {
  2487. if (JSON.parse(res).code < 0) {
  2488. // this.$message.warning({ showClose: true, message: JSON.parse(res).message });
  2489. reject(JSON.parse(res).message)
  2490. } else {
  2491. resolve(res)
  2492. }
  2493. })
  2494. .catch((err) => {
  2495. // console.log('打印pacs条码错误', err)
  2496. this.$message.warning({ showClose: true, message: `${err}` });
  2497. reject(err)
  2498. });
  2499. } else {
  2500. this.$peisAPI.print(JSON.stringify(toOutShell))
  2501. .then(res => {
  2502. if (JSON.parse(res).code < 0) {
  2503. // this.$message.warning({ showClose: true, message: JSON.parse(res).message });
  2504. reject(JSON.parse(res).message)
  2505. } else {
  2506. return postapi("/api/app/lisrequest/updatelisrequestisprint", {
  2507. operateType: 1,
  2508. patientRegisterId: this.form.id,
  2509. });
  2510. }
  2511. })
  2512. .then(res => {
  2513. if (res && res.code < 0) {
  2514. // this.$message.error({ showClose: true, message: `${res.message}` });
  2515. reject(res.message)
  2516. } else {
  2517. resolve(res)
  2518. }
  2519. })
  2520. .catch((err) => {
  2521. // console.log('打印pacs条码错误', err)
  2522. // this.$message.error({ showClose: true, message: `${err}` });
  2523. reject(err)
  2524. });
  2525. }
  2526. });
  2527. },
  2528. //补打条码
  2529. reLisRequest() {
  2530. if (!this.form.id) {
  2531. this.$message.info({ showClose: true, message: "人员信息尚未保存,不可执行此操作!" });
  2532. return;
  2533. }
  2534. if (this.form.completeFlag == '0') {
  2535. this.$message.info({ showClose: true, message: "预登记人员,不可执行此操作!" });
  2536. return;
  2537. }
  2538. this.brushTimes++;
  2539. this.patientRegister.lisRequestVisble = true;
  2540. },
  2541. //手动合并项目
  2542. reMergeAsbitem() {
  2543. if (this.form.id.length < 1) {
  2544. this.$message.info({ showClose: true, message: "人员信息尚未保存,不可执行此操作!" });
  2545. return;
  2546. }
  2547. this.brushTimes++;
  2548. this.patientRegister.mergeAsbitemVisble = true;
  2549. },
  2550. btnPayTypeFlag(payTypeFlag) {
  2551. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  2552. if (e.isCharge == 'N') e.payTypeFlag = payTypeFlag
  2553. });
  2554. },
  2555. // 刷新登记的检查项目
  2556. getAsb(id) {
  2557. return new Promise((resolve, reject) => {
  2558. getapi(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`)
  2559. .then(res => {
  2560. if (res.code > - 1) {
  2561. this.dataTransOpts.tableM.register_check_asbitem = res.data
  2562. resolve()
  2563. } else {
  2564. reject(res.message)
  2565. }
  2566. })
  2567. .catch(err => {
  2568. reject(err.message)
  2569. })
  2570. })
  2571. },
  2572. // 跳至收费页面
  2573. toCharge(form) {
  2574. if (!form.patientRegisterNo) {
  2575. this.$message.warning({ showClose: true, message: "请先保存人员信息!" })
  2576. return
  2577. }
  2578. if (form.completeFlag == '0') {
  2579. this.$message.warning({ showClose: true, message: "预登记的人员不可执行此操作!" })
  2580. return
  2581. }
  2582. this.getAsb(form.id)
  2583. .then(() => {
  2584. let chargeMoney = Number(0)
  2585. //支付方式,比如是0自费、2免费、1单位支付
  2586. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  2587. if (e.payTypeFlag == '0') chargeMoney += Number(e.total)
  2588. });
  2589. if (chargeMoney == 0) {
  2590. this.$message.warning({ showClose: true, message: '没有可收费或退费的记录!' })
  2591. } else {
  2592. //多次重复点击时,刷新处理
  2593. this.chargePatientRegisterNo = form.patientRegisterNo
  2594. //this.dataTransOpts.refresh.charge.S++
  2595. this.dialogWin.charge = true
  2596. this.dataTransOpts.refresh.charge.S++
  2597. }
  2598. })
  2599. .catch(err => {
  2600. this.$message.error(err.message)
  2601. })
  2602. },
  2603. // 收费申请
  2604. chargeRequest(form) {
  2605. if (!form.id) {
  2606. this.$message.warning({ showClose: true, message: "请先保存人员信息!" })
  2607. return
  2608. }
  2609. if (form.completeFlag == '0') {
  2610. this.$message.warning({ showClose: true, message: "预登记的人员不可执行此操作!" })
  2611. return
  2612. }
  2613. this.getAsb(form.id)
  2614. .then(() => {
  2615. let chargeMoney = Number(0)
  2616. //支付方式,比如是0自费、2免费、1单位支付
  2617. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  2618. if (e.payTypeFlag == '0') chargeMoney += Number(e.total)
  2619. });
  2620. if (chargeMoney == 0) {
  2621. this.$message.warning({ showClose: true, message: '没有可收费或退费的记录!' })
  2622. } else {
  2623. // 显示
  2624. this.dataTransOpts.refresh.charge.S++
  2625. this.dialogWin.AsbChargeRequest = true
  2626. }
  2627. })
  2628. .catch(err => {
  2629. this.$message.error(err.message)
  2630. })
  2631. },
  2632. // 保存立即发送收费申请
  2633. immediateToHisCharge(patientRegisterId) {
  2634. postapi('/api/app/registerasbitem/GetCanChargeAsbitemsByPatientRegisterId', { patientRegisterId })
  2635. .then(res => {
  2636. if (res.code > -1 && res.data.length > 0) {
  2637. let body = {
  2638. patientRegisterId,
  2639. registerCheckAsbitems: []
  2640. }
  2641. res.data.forEach(e => {
  2642. body.registerCheckAsbitems.push({ registerCheckAsbitemId: e.registerCheckAsbitemId })
  2643. });
  2644. // 向 His 或 其他第三方 推送收费申请
  2645. postapi("/api/app/ChargeRequest/Create", body)
  2646. .then(resCharge => {
  2647. if (resCharge.code > -1) {
  2648. this.dataTransOpts.refresh.patient_register.S++
  2649. }
  2650. })
  2651. }
  2652. })
  2653. .catch(error => {
  2654. this.$message.error({ showClose: true, message: error.message })
  2655. })
  2656. },
  2657. //关闭收费窗口时,刷新收费状态信息
  2658. closeDialogCharge() {
  2659. // this.prAsbOpraOpts.prAsbQuery++
  2660. this.dataTransOpts.refresh.patient_register.S++
  2661. // this.dataTransOpts.refresh.register_check_asbitem.D++
  2662. },
  2663. // 新增保存基本信息产生新的ID,等明细保存后,再更新表单form.id
  2664. refreshFormId() {
  2665. // console.log('refreshFormId', this.prAsbOpraOpts.formId)
  2666. this.form.id = this.prAsbOpraOpts.formId
  2667. this.prAsbOpraOpts.formId = '' //清空
  2668. /**/
  2669. // this.patientRegister.prList.push(res.data); //列表添加记录
  2670. this.patientRegister.patientRegisterId = this.form.id;
  2671. objCopy(this.form, this.patientRegister.patientRegisterRd);
  2672. //this.patientRegister.query.times++; 不在触发列表查询(换成局部刷新)放在窗口关闭事件中去
  2673. // let curRow = deepCopy(this.patientRegister.patientRegisterRd)
  2674. // curRow.index = this.patientRegister.prList.length
  2675. // this.patientRegister.prList.push(curRow)
  2676. },
  2677. // 显示职业病
  2678. btnOcc() {
  2679. if (!this.form.id) {
  2680. this.$message.warning({ showClose: true, message: '人员信息尚未保存!' })
  2681. return
  2682. }
  2683. this.dataTransOpts.plus.OccDisease++
  2684. this.dialogWin.OccDisease = true
  2685. },
  2686. // 获取接害因素 + 检查类别 的组合项目 后,刷新当前组合项目
  2687. changeOccPosionOrCheckType() {
  2688. this.getOccAsbitems().then(res => {
  2689. let lfind = 0
  2690. for (let i = this.dataTransOpts.tableM.register_check_asbitem.length - 1; i >= 0; i--) {
  2691. let e = this.dataTransOpts.tableM.register_check_asbitem[i];
  2692. if (e.isCharge == 'Y' || e.checkCompleteFlag != '0') {
  2693. continue
  2694. } else {
  2695. // 已登记的项目 在 this.occAsbitems 中,则不删除 (如果删除的话,条码会变)
  2696. lfind = arrayExistObj(this.occAsbitems, 'id', e.asbitemId)
  2697. if (lfind == -1) this.dataTransOpts.tableM.register_check_asbitem.splice(i, 1)
  2698. }
  2699. }
  2700. lfind = 0
  2701. let payTypeFlag = '1'; //职业病 默认单位支付
  2702. if (this.form.customerOrgId == this.dict.personOrgId) payTypeFlag = '0' //个人支付
  2703. this.occAsbitems.forEach(e => {
  2704. lfind = arrayExistObj(this.dataTransOpts.tableM.register_check_asbitem, 'asbitemId', e.id)
  2705. if (lfind == -1) {
  2706. this.dataTransOpts.tableM.register_check_asbitem.push({
  2707. asbitemId: e.id,
  2708. asbitemName: e.displayName,
  2709. patientRegisterId: this.form.id,
  2710. standardPrice: e.price,
  2711. chargePrice: e.ocCheckTypeDetailPrice,
  2712. payTypeFlag,
  2713. isCharge: "N",
  2714. checkCompleteFlag: '0',
  2715. discount: e.price == 0 ? 100 : Math.floor(10000 * e.ocCheckTypeDetailPrice / e.price) / 100,
  2716. amount: e.ocCheckTypeDetailAmount,
  2717. total: e.ocCheckTypeDetailAmount * e.ocCheckTypeDetailPrice,
  2718. standTotal: e.ocCheckTypeDetailAmount * e.price
  2719. })
  2720. }
  2721. });
  2722. })
  2723. },
  2724. // 获取接害因素 + 检查类别 的组合项目
  2725. getOccAsbitems() {
  2726. return new Promise((resolve, reject) => {
  2727. if (!this.form.ocCheckTypeId || this.form.poisonIds.length == 0) {
  2728. this.occAsbitems = []
  2729. resolve(this.occAsbitems)
  2730. } else {
  2731. let body = {
  2732. ocCheckTypeId: this.form.ocCheckTypeId,
  2733. poisonIds: this.form.poisonIds
  2734. }
  2735. postapi('/api/app/OcCheckTypeDetail/GetOcCheckTypeDetailByOcCheckTypeIdAndPoisonId', body).then(res => {
  2736. if (res.code > -1) {
  2737. this.occAsbitems = res.data
  2738. resolve(this.occAsbitems)
  2739. } else {
  2740. reject(res.message)
  2741. }
  2742. })
  2743. .catch(err => {
  2744. reject(err)
  2745. })
  2746. }
  2747. })
  2748. },
  2749. // 显示预约
  2750. btnWebBooking() {
  2751. this.dataTransOpts.tableS.appoint_patient_register = {}
  2752. this.dataTransOpts.tableM.appoint_register_asbitem = []
  2753. this.dataTransOpts.tableS.appoint_patient_register = {}
  2754. this.dataTransOpts.tableM.appoint_register_asbitem = []
  2755. this.dataTransOpts.plus.WebBooking++
  2756. this.dialogWin.WebBooking = true
  2757. },
  2758. // 显示预约
  2759. btnWebBookingMzak() {
  2760. this.dataTransOpts.tableS.appoint_patient_register = {}
  2761. this.dataTransOpts.tableM.appoint_register_asbitem = []
  2762. this.dataTransOpts.tableS.appoint_patient_register = {}
  2763. this.dataTransOpts.tableM.appoint_register_asbitem = []
  2764. this.dataTransOpts.plus.WebBookingMzak++
  2765. this.dialogWin.WebBookingMzak = true
  2766. },
  2767. // 关闭预约窗口
  2768. close_dialogWin_WebBooking() {
  2769. // console.log('this.dataTransOpts.tableS.appoint_patient_register',this.dataTransOpts.tableS.appoint_patient_register)
  2770. // console.log('this.dataTransOpts.tableM.appoint_register_asbitem',this.dataTransOpts.tableM.appoint_register_asbitem)
  2771. // 没有选中网上预约记录,直接返回,不做任何处理
  2772. let appoint_patient_register = this.dataTransOpts.tableS.appoint_patient_register
  2773. if (!appoint_patient_register.appointPatientRegisterId) return
  2774. // 新增 (个人预约只登记个人的)
  2775. this.dataTransOpts.tableS.patient_register.id = ''
  2776. this.preCustomerOrgId = this.dict.personOrgId
  2777. this.patientRegister.query.customerOrgId = this.dict.personOrgId
  2778. this.patientRegister.query.CustomerOrgParentId = this.dict.personOrgId
  2779. this.form.customerOrgId = [this.dict.personOrgId] //单位编号 默认个人
  2780. this.form.customerOrgParentId = this.dict.personOrgId
  2781. this.form.customerOrgRegisterId = "00000000-0000-0000-0000-000000000001" //默认单位体检次数
  2782. // "appointPatientRegisterId": "string",
  2783. // "personId": "string",
  2784. // "personName": "string",
  2785. // "idNo": "string",
  2786. // "sexId": "string",
  2787. // "sexName": "string",
  2788. // "maritalStatusId": "string",
  2789. // "maritalStatusName": "string",
  2790. // "customerOrgId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2791. // "customerOrgName": "string",
  2792. // "childCustomerOrgName": "string",
  2793. // "customerOrgGroupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2794. // "customerOrgGroupName": "string",
  2795. // "medicalPackageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2796. // "medicalPackageName": "string",
  2797. // "completeFlag": "string",
  2798. // "appointDate": "2024-06-09T11:46:34.962Z",
  2799. // "remark": "string",
  2800. // "medicalCenterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2801. // "customerOrgRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2802. // "pregnantFlag": "string",
  2803. // "pregnantFlagName": "string",
  2804. // "height": 0,
  2805. // "weight": 0
  2806. this.initFormData(this.dataTransOpts.tableS.patient_register.id)
  2807. .then(() => {
  2808. delete appoint_patient_register.medicalCenterId
  2809. Object.assign(this.form, appoint_patient_register,
  2810. {
  2811. patientName: appoint_patient_register.personName,
  2812. completeFlag: '1',
  2813. }
  2814. )
  2815. console.log('this.form', JSON.stringify(this.form))
  2816. // 明细必填项
  2817. // "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2818. // "asbitemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2819. // "standardPrice": 0,
  2820. // "chargePrice": 0,
  2821. // "payTypeFlag": "string",
  2822. // "isCharge": "string",
  2823. // "amount": 0
  2824. // 预约明细数据
  2825. // "appointRegisterAsbitemId": "00000000-0000-0000-0000-000000000000",
  2826. // "asbitemId": "3a126b34-f6f0-56a1-e899-a092874acde7",
  2827. // "asbitemName": "腹部平片(立位)",
  2828. // "itemTypeId": "3a126ac6-2fbf-ca50-82a4-73dcc5a5028b",
  2829. // "itemTypeName": "放射科",
  2830. // "appointPatientRegisterId": "3a12ebf4-565a-dbc4-4f2d-d72cd3050cab",
  2831. // "standardPrice": 45.00,
  2832. // "chargePrice": 30.50,
  2833. // "payTypeFlag": "\u0000",
  2834. // "isCharge": "N",
  2835. // "amount": 1,
  2836. // "isInMedicalPackage": "N",
  2837. // "itemTypeDisplayOrder": 28,
  2838. // "displayOrder": 1
  2839. this.dataTransOpts.tableM.register_check_asbitem = deepCopy(this.dataTransOpts.tableM.appoint_register_asbitem)
  2840. this.changeIdNo() // 触发身份证查询档案号
  2841. })
  2842. },
  2843. // 关闭预约窗口--人寿 (团检、个人都可以)
  2844. close_dialogWin_WebBookingMzak() {
  2845. // console.log('this.dataTransOpts.tableS.appoint_patient_register',this.dataTransOpts.tableS.appoint_patient_register)
  2846. // console.log('this.dataTransOpts.tableM.appoint_register_asbitem',this.dataTransOpts.tableM.appoint_register_asbitem)
  2847. // 没有选中网上预约记录,直接返回,不做任何处理
  2848. let appoint_patient_register = this.dataTransOpts.tableS.appoint_patient_register
  2849. if (!appoint_patient_register.thirdBookingId) return
  2850. this.dataTransOpts.tableS.patient_register.id = ''
  2851. // this.preCustomerOrgId = this.dict.personOrgId
  2852. this.patientRegister.query.customerOrgId = appoint_patient_register.customerOrgId
  2853. this.patientRegister.query.CustomerOrgParentId = appoint_patient_register.customerOrgId
  2854. this.form.customerOrgId = [appoint_patient_register.customerOrgId] //单位编号 默认个人
  2855. let customerOrgParentId = ''
  2856. this.getParentCustomerOrgId(appoint_patient_register.customerOrgId)
  2857. .then(res => {
  2858. customerOrgParentId = res
  2859. this.form.customerOrgParentId = customerOrgParentId
  2860. return this.initFormData(this.dataTransOpts.tableS.patient_register.id)
  2861. })
  2862. .then(() => {
  2863. // this.form.customerOrgName = customerOrgParentId
  2864. // "appointPatientRegisterId": "string",
  2865. // "personId": "string",
  2866. // "personName": "string",
  2867. // "idNo": "string",
  2868. // "sexId": "string",
  2869. // "sexName": "string",
  2870. // "maritalStatusId": "string",
  2871. // "maritalStatusName": "string",
  2872. // "customerOrgId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2873. // "customerOrgName": "string",
  2874. // "childCustomerOrgName": "string",
  2875. // "customerOrgGroupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2876. // "customerOrgGroupName": "string",
  2877. // "medicalPackageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2878. // "medicalPackageName": "string",
  2879. // "completeFlag": "string",
  2880. // "appointDate": "2024-06-09T11:46:34.962Z",
  2881. // "remark": "string",
  2882. // "medicalCenterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2883. // "customerOrgRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2884. // "pregnantFlag": "string",
  2885. // "pregnantFlagName": "string",
  2886. // "height": 0,
  2887. // "weight": 0
  2888. delete appoint_patient_register.medicalCenterId
  2889. Object.assign(this.form, appoint_patient_register,
  2890. {
  2891. patientName: appoint_patient_register.personName,
  2892. completeFlag: '1',
  2893. }
  2894. )
  2895. // 人寿接口,甲方需求:岗位数据导入人员类别
  2896. // personnelTypeId --> positionName
  2897. // dict.personnelType" :key="item.id" :label="item.displayName"
  2898. let lfind = arrayExistObj(this.dict.personnelType, 'displayName', appoint_patient_register.positionName)
  2899. if (lfind > -1) this.form.personnelTypeId = this.dict.personnelType[lfind].id
  2900. console.log('this.form', JSON.stringify(this.form))
  2901. // 明细必填项
  2902. // "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2903. // "asbitemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2904. // "standardPrice": 0,
  2905. // "chargePrice": 0,
  2906. // "payTypeFlag": "string",
  2907. // "isCharge": "string",
  2908. // "amount": 0
  2909. // 预约明细数据
  2910. // "appointRegisterAsbitemId": "00000000-0000-0000-0000-000000000000",
  2911. // "asbitemId": "3a126b34-f6f0-56a1-e899-a092874acde7",
  2912. // "asbitemName": "腹部平片(立位)",
  2913. // "itemTypeId": "3a126ac6-2fbf-ca50-82a4-73dcc5a5028b",
  2914. // "itemTypeName": "放射科",
  2915. // "appointPatientRegisterId": "3a12ebf4-565a-dbc4-4f2d-d72cd3050cab",
  2916. // "standardPrice": 45.00,
  2917. // "chargePrice": 30.50,
  2918. // "payTypeFlag": "\u0000",
  2919. // "isCharge": "N",
  2920. // "amount": 1,
  2921. // "isInMedicalPackage": "N",
  2922. // "itemTypeDisplayOrder": 28,
  2923. // "displayOrder": 1
  2924. this.dataTransOpts.tableM.register_check_asbitem = deepCopy(this.dataTransOpts.tableM.appoint_register_asbitem)
  2925. // 触发分组 项目
  2926. if (this.form.customerOrgGroupId) this.changeCustomerOrgGroupId()
  2927. this.changeIdNo() // 触发身份证查询档案号
  2928. })
  2929. },
  2930. btnLabel() {
  2931. if (!this.form.id) {
  2932. this.$message.warning({ showClose: true, message: '人员信息尚未保存!' })
  2933. return
  2934. }
  2935. this.dataTransOpts.refresh.lis_request.M++ //触发检验条码刷新
  2936. this.dataTransOpts.refresh.register_check.M++ //触发检查条码刷新
  2937. this.dialogWin.Label = true
  2938. },
  2939. // 复制分组时,设置当前顶级单位及体检次数
  2940. setCurParentOrgId() {
  2941. // 获取顶级单位
  2942. console.log('setCurParentOrgId_this.form.customerOrgId', this.form.customerOrgId)
  2943. this.getParentCustomerOrgId(this.form.customerOrgId)
  2944. .then(res => {
  2945. if (res) {
  2946. if (res != this.dict.personOrgId) {
  2947. this.customerOrgId = res
  2948. // 获取体检次数
  2949. getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${res}`)
  2950. .then(res => {
  2951. if (res.code > -1) {
  2952. this.customerOrgRegisterList = res.data
  2953. if (res.data.length > 0) {
  2954. this.customerOrgRegister = res.data[res.data.length - 1]
  2955. this.getCustomerOrgGroupCopy(this.customerOrgRegister.id)
  2956. }
  2957. }
  2958. })
  2959. }
  2960. }
  2961. })
  2962. },
  2963. //复制分组
  2964. btnCopyGroup() {
  2965. console.log('this.customerOrgGroup', this.customerOrgGroup)
  2966. this.customerOrgRegisterList = [];
  2967. this.customerOrgRegister = {};
  2968. this.customerOrgGroups = [];
  2969. // 首次打开 复制分组 页面时,需获取顶级单位信息
  2970. if (this.customerOrgAll.length == 0) {
  2971. getapi("/api/app/customer-org/parent-all")
  2972. .then(res => {
  2973. if (res.code > -1) {
  2974. this.customerOrgAll = res.data
  2975. this.customerOrgDisp = res.data
  2976. this.groupVisble = true
  2977. // 复制分组时,设置当前顶级单位及体检次数
  2978. this.setCurParentOrgId()
  2979. }
  2980. })
  2981. } else {
  2982. // 复制分组时,设置当前顶级单位及体检次数
  2983. this.setCurParentOrgId()
  2984. this.groupVisble = true
  2985. }
  2986. },
  2987. //选中分组
  2988. async groupRowClick(row) {
  2989. this.curGroupId = row.id
  2990. this.groupAsbitems = []
  2991. try {
  2992. let res = await getapi(`/api/app/customerorggroupdetail/getcustomerorggroupdetailinasbitem?CustomerOrgGroupId=${row.id}`)
  2993. if (res.code != -1) this.groupAsbitems = res.data
  2994. } catch (error) {
  2995. console.log(error)
  2996. }
  2997. },
  2998. //双击选分组,并确认复制
  2999. async groupRowDblclick(row) {
  3000. await this.groupRowClick(row)
  3001. this.copyGroup()
  3002. },
  3003. //复制分组(确认选中分组)
  3004. copyGroup() {
  3005. if (!this.curGroupId) {
  3006. this.$message.warning({ showClose: true, message: "请先选择要复制的套餐!" })
  3007. return
  3008. }
  3009. console.log('this.packageAsbitems', this.groupAsbitems)
  3010. this.addAbs(deepCopy(this.groupAsbitems))
  3011. this.groupVisble = false
  3012. },
  3013. //复制套餐
  3014. btnCopyMedicalPackage() {
  3015. this.medicalPackageVisble = true
  3016. },
  3017. //选中套餐
  3018. packageRowClick(row) {
  3019. return new Promise((resolve, reject) => {
  3020. this.curPackageId = row.id
  3021. this.packageAsbitems = []
  3022. postapi('/api/app/medicalpackagedetail/getmedicalpackageinasbitem', { medicalPackageId: row.id })
  3023. .then(res => {
  3024. if (res.code > -1) {
  3025. this.packageAsbitems = res.data
  3026. resolve()
  3027. } else {
  3028. reject(res.message)
  3029. }
  3030. })
  3031. .catch(err => {
  3032. reject(err.message)
  3033. })
  3034. })
  3035. },
  3036. //双击选套餐,并确认复制
  3037. rowDblclick(row) {
  3038. this.packageRowClick(row)
  3039. .then(res => {
  3040. this.copyMedicalPackage()
  3041. })
  3042. },
  3043. //复制套餐(确认选中套餐)
  3044. copyMedicalPackage() {
  3045. if (!this.curPackageId) {
  3046. this.$message.warning({ showClose: true, message: "请先选择要复制的套餐!" })
  3047. return
  3048. }
  3049. console.log('this.packageAsbitems', this.packageAsbitems)
  3050. this.addAbs(deepCopy(this.packageAsbitems))
  3051. this.medicalPackageVisble = false
  3052. },
  3053. // 过滤体检单位
  3054. filterMethodOrg(keyWords) {
  3055. if (keyWords) {
  3056. this.customerOrgDisp = [];
  3057. this.customerOrgAll.forEach((item) => {
  3058. if (
  3059. item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > -1 ||
  3060. item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > -1
  3061. // || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  3062. ) {
  3063. this.customerOrgDisp.push(item);
  3064. }
  3065. });
  3066. } else {
  3067. this.customerOrgDisp = deepCopy(this.customerOrgAll);
  3068. }
  3069. },
  3070. //选择单位
  3071. changeCustomerOrg(v) {
  3072. if (!v) {
  3073. this.customerOrgRegisterList = [];
  3074. this.customerOrgRegister = {};
  3075. this.customerOrgGroups = [];
  3076. } else {
  3077. getapi(
  3078. `/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${v}`
  3079. ).then((res) => {
  3080. if (res.code != -1) {
  3081. this.customerOrgRegisterList = res.data;
  3082. if (res.data.length > 0) {
  3083. this.customerOrgRegister = res.data[res.data.length - 1];
  3084. this.getCustomerOrgGroupCopy(this.customerOrgRegister.id);
  3085. }
  3086. }
  3087. });
  3088. }
  3089. },
  3090. //选择体检次数
  3091. changeTimes(v) {
  3092. this.getCustomerOrgGroup(v.id);
  3093. },
  3094. //获取体检次数下的分组
  3095. getCustomerOrgGroupCopy(customerOrgRegisterId) {
  3096. // this.isDrag = false;
  3097. // objCopy(this.formInit, this.form);
  3098. // this.form.customerOrgRegisterId = customerOrgRegisterId;
  3099. this.customerOrgGroups = [];
  3100. getapi(
  3101. `/api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${customerOrgRegisterId}`
  3102. ).then((res) => {
  3103. if (res.code != -1) {
  3104. this.customerOrgGroups = res.data;
  3105. this.customerOrgGroups.forEach((e) => {
  3106. e.customerOrgRegisterId = customerOrgRegisterId;
  3107. });
  3108. }
  3109. });
  3110. },
  3111. handleRowClassName({ row, rowIndex }) {
  3112. // highLightBg 为 'selected'的高亮
  3113. //console.log(rowIndex, row)
  3114. //return row.highLightBg == 'selected' ? 'high-light-bg' : '';
  3115. if (row.choosed) {
  3116. return 'current-row';
  3117. } else {
  3118. return '';
  3119. }
  3120. },
  3121. // 添加组合项目
  3122. ///api/app/register-asbitem/many/3fa85f64-5717-4562-b3fc-2c963f66afa6'
  3123. addAbs(asbItemChoosed) {
  3124. if (asbItemChoosed.length < 1) {
  3125. this.$message.warning({ showClose: true, message: "该套餐或分组下无可复制的组合项目" })
  3126. return
  3127. }
  3128. //性别、年龄判断
  3129. // "displayName": "身高体重",
  3130. // "shortName": "哈f哈",
  3131. // "forSexId": "F",
  3132. // "itemTypeId": "3a0b16de-75b9-c910-c61b-844709a88940",
  3133. // "price": 0,
  3134. console.log('asbItemChoosed.length', asbItemChoosed.length)
  3135. let unChecks = [] //不适配项目名称
  3136. for (let i = 0; i < asbItemChoosed.length; i++) {
  3137. if (this.form.sexId == 'U') break //未选性别时,无需判断组合项目性别限制
  3138. if (asbItemChoosed[i].forSexId == 'A') continue
  3139. if (asbItemChoosed[i].forSexId != this.form.sexId) {
  3140. unChecks.push(asbItemChoosed[i].displayName)
  3141. asbItemChoosed[i].unCheck = true
  3142. }
  3143. }
  3144. if (unChecks.length > 0) {
  3145. this.$message.warning({ showClose: true, message: `所选项目:${unChecks.toString()},不适合当前人员性别` })
  3146. if (asbItemChoosed.length == unChecks.length) return
  3147. }
  3148. let payTypeFlag = '0' // 0: 个人,1:单位,2:免费
  3149. if (this.form.customerOrgId != this.dict.personOrgId) payTypeFlag = '1'
  3150. asbItemChoosed.forEach(e => {
  3151. if (!e.unCheck) {
  3152. // 未在已选列表中,才选择添加
  3153. let lfind = arrayExistObj(this.dataTransOpts.tableM.register_check_asbitem, 'asbitemId', e.id)
  3154. if (lfind < 0) {
  3155. let pojo = {
  3156. asbitemId: e.id,
  3157. asbitemName: e.displayName,
  3158. patientRegisterId: this.form.id,
  3159. standardPrice: e.price,
  3160. chargePrice: e.price,
  3161. payTypeFlag,
  3162. isCharge: "N",
  3163. checkCompleteFlag: '0',
  3164. discount: 100,
  3165. amount: 1,
  3166. total: e.price,
  3167. }
  3168. this.dataTransOpts.tableM.register_check_asbitem.push(pojo)
  3169. }
  3170. }
  3171. });
  3172. // 刷新左侧待选组合项目
  3173. this.changeItemType(deepCopy(this.dataTransOpts.copyGroup.itemTypeIds))
  3174. },
  3175. //项目类别过滤 组合项目,未过滤已选择的组合项目
  3176. changeItemType(data) {
  3177. //console.log('getAsbItemByItemType', typeof this.itemTypeIds, this.itemTypeIds)
  3178. this.dataTransOpts.copyGroup.itemTypeIds = data
  3179. let asbItemAll = deepCopy(this.dataTransOpts.copyGroup.asbItemAll)
  3180. let lv = "";
  3181. if (typeof this.dataTransOpts.copyGroup.itemTypeIds == "object") {
  3182. if (this.dataTransOpts.copyGroup.itemTypeIds.length > 0) lv = this.dataTransOpts.copyGroup.itemTypeIds[this.dataTransOpts.copyGroup.itemTypeIds.length - 1];
  3183. }
  3184. if (lv) {
  3185. this.dataTransOpts.copyGroup.asbItem = arrayFilter(asbItemAll, "itemTypeId", lv);
  3186. } else {
  3187. this.dataTransOpts.copyGroup.asbItem = deepCopy(asbItemAll);
  3188. }
  3189. arrayReduce(this.dataTransOpts.copyGroup.asbItem, this.dataTransOpts.tableM.register_check_asbitem, "id=asbitemId");
  3190. //console.log('this.dataTransOpts.copyGroup.asbItem',this.dataTransOpts.copyGroup.asbItem,this.dataTransOpts.tableM.register_check_asbitem)
  3191. },
  3192. //回车替代tab键
  3193. enterToTab() {
  3194. this.$nextTick(() => {
  3195. let inputs = document.querySelectorAll("form input"); //用数组可以读取多个标签的元素 //.inline-input
  3196. //// console.log('inputs',inputs);
  3197. // 为每个输入框添加键盘事件监听器
  3198. inputs.forEach((input, i) => {
  3199. input.addEventListener('keydown', (event) => {
  3200. // 如果按下的是回车键
  3201. // // console.log('data-ismultiline',input.getAttribute('data-ismultiline'));
  3202. if (event.keyCode === 13) {
  3203. // 阻止回车键的默认行为(换行)
  3204. event.preventDefault();
  3205. // 如果是身份证,则计算出生与年龄
  3206. let placeholder = input.getAttribute('placeholder')
  3207. if (placeholder == '身份证号') this.changeIdNo()
  3208. // 跳至下一个输入框
  3209. for (let j = i + 1; j < inputs.length; j++) {
  3210. if (inputs[j].getAttribute('disabled') != "disabled") {
  3211. inputs[j].focus();
  3212. break;
  3213. }
  3214. }
  3215. }
  3216. });
  3217. });
  3218. });
  3219. },
  3220. },
  3221. //监听事件
  3222. watch: {
  3223. //人员ID未切换换时 也可以强制刷新数据
  3224. "dataTransOpts.refresh.patient_register.S": {
  3225. // immediate: true,
  3226. handler(newVal, oldVal) {
  3227. // console.log(`watch 人员登记 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.patient_register.id}`);
  3228. if (newVal != oldVal) this.initFormData(this.dataTransOpts.tableS.patient_register.id)
  3229. }
  3230. },
  3231. //拍照触发
  3232. // "form.photo"(newVal, oldVal) {
  3233. // //// console.log('patientRegister.patientRegisterRd.id newVal:',newVal,' oldVal:',oldVal)
  3234. // if (newVal != oldVal) {
  3235. // this.getPeoplePhoto(newVal)
  3236. // }
  3237. // },
  3238. //修改单位触发
  3239. // "form.customerOrgId": {
  3240. // // immediate:true,
  3241. // // // deep:true,
  3242. // handler(newVal, oldVal) {
  3243. // //// console.log('patientRegister.patientRegisterRd.id newVal:',newVal,' oldVal:',oldVal)
  3244. // if (newVal != oldVal) {
  3245. // this.changeCustomerOrgId(newVal)
  3246. // }
  3247. // }
  3248. // },
  3249. // 从体检人员登记列表 点登记,触发
  3250. // 清空查询条件
  3251. "dataTransOpts.plus.clearPatientRegisterQuery": {
  3252. // immediate: true,
  3253. handler(newVal, oldVal) {
  3254. // console.log('从体检人员登记列表 点登记,触发', newVal, oldVal)
  3255. if (newVal != oldVal) {
  3256. this.preCustomerOrgId = this.patientRegister.query.customerOrgId
  3257. // console.log('this.preCustomerOrgId', this.preCustomerOrgId)
  3258. }
  3259. }
  3260. },
  3261. },
  3262. };
  3263. </script>
  3264. <style scoped>
  3265. ::v-deep .el-icon-search:before {
  3266. color: #00F;
  3267. }
  3268. ::v-deep .el-select-group__title {
  3269. font-size: 15px;
  3270. background-color: #EEEEEE;
  3271. color: black;
  3272. font-weight: 700;
  3273. }
  3274. .btn {
  3275. margin-top: 5px;
  3276. }
  3277. .commonbutton {
  3278. width: 100px;
  3279. }
  3280. .query {
  3281. margin-left: 10px;
  3282. }
  3283. .querySpan {
  3284. margin-right: 2px;
  3285. }
  3286. </style>