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.

3598 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
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
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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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
7 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
7 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
7 months ago
2 years ago
7 months ago
2 months ago
7 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
7 months ago
4 weeks ago
7 months ago
2 years ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
2 years ago
7 months ago
2 years ago
7 months ago
2 years 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
7 months ago
2 years ago
7 months ago
2 years ago
7 months ago
2 years ago
7 months ago
2 years ago
7 months ago
4 weeks ago
2 years ago
7 months ago
2 years ago
7 months ago
1 month ago
7 months ago
1 month ago
7 months ago
1 month ago
7 months ago
2 years ago
7 months ago
2 years ago
7 months ago
2 years 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
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
7 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
2 years ago
1 year 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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 month ago
2 years ago
1 year ago
7 months ago
1 year ago
1 year ago
1 year ago
1 year ago
7 months ago
1 year ago
7 months ago
1 year ago
7 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. // 登记时继承单位的体检类别
  1302. this.getMedicalTypeByOrg(customerOrgId)
  1303. this.completeFlag = '0'
  1304. this.handleFormData().then(() => {
  1305. resolve()
  1306. })
  1307. } else {
  1308. // let res = await getapi(`/api/app/patient-register/${patientRegisterId}`)
  1309. postapi('/api/app/patientregister/getinfoorpatient', { patientRegisterId })
  1310. .then(res => {
  1311. if (res.code > -1) {
  1312. // this.form = res.data 这种方式,会造成 checkbox 值变化不响应,故取消
  1313. this.form = Object.assign({}, this.form, res.data)
  1314. this.completeFlag = this.form.completeFlag
  1315. this.handleFormData().then(() => resolve())
  1316. }
  1317. })
  1318. .catch(() => resolve())
  1319. }
  1320. })
  1321. },
  1322. // 根据体检单位ID,获取体检类别
  1323. getMedicalTypeByOrg(customerOrgId){
  1324. return new Promise((resolve, reject) => {
  1325. postapi('/api/app/Customerorg/GetMedicalTypeIdByCustomerOrgId',{customerOrgId})
  1326. .then(res => {
  1327. if(res.code > -1){
  1328. this.form.medicalTypeId = res.data.medicalTypeId
  1329. }
  1330. })
  1331. })
  1332. },
  1333. handleFormData() {
  1334. return new Promise((resolve, reject) => {
  1335. // 判断是否职业健康检查
  1336. this.changeMedicalTypeId(this.form.medicalTypeId)
  1337. if (this.form.isPatientOccupationalDisease == 'Y') {
  1338. this.getOccDiseaseData()
  1339. }
  1340. // 处理照片
  1341. this.getPeoplePhoto(this.form.photo)
  1342. // this.dataTransOpts.refresh.register_check_asbitem.D++ //触发所选组合项目刷新 (取消这种触发,减少交互)
  1343. this.dataTransOpts.tableM.register_check_asbitem = this.form.registerCheckAsbitems
  1344. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  1345. e.standTotal = e.amount * e.standardPrice
  1346. e.total = e.amount * e.chargePrice
  1347. });
  1348. // 单位/个人 的分组与套餐处理
  1349. this.changeCustomerOrgId(this.form.customerOrgId)
  1350. .then(() => {
  1351. // 刷新明细项目(已登记)
  1352. this.dataTransOpts.refresh.register_check_asbitem.OnlyRefreshAsbitem++
  1353. })
  1354. .finally(() => {
  1355. resolve()
  1356. })
  1357. })
  1358. },
  1359. //快速选择组合项目时,调整可按拼间简码及简称查找
  1360. filterMethod(keyWords) {
  1361. //// console.log('filterMethod',this.asbItemQuick)
  1362. if (keyWords) {
  1363. this.nation = [];
  1364. this.dict.nation.forEach(item => {
  1365. if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  1366. || item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1) {
  1367. this.nation.push(item);
  1368. }
  1369. });
  1370. } else {
  1371. this.nation = deepCopy(this.dict.nation);
  1372. }
  1373. },
  1374. //选择单位,并返回顶级单位
  1375. changeCustomerOrgId(v) {
  1376. // 始终返回 reslove ,主要用于流程控制
  1377. return new Promise((resolve, reject) => {
  1378. console.log('changeCustomerOrgId', v, this.form.customerOrgParentId)
  1379. let customerOrgId = "", customerOrgParentId = ""
  1380. if (Array.isArray(v) && v.length > 0) {
  1381. customerOrgId = v[v.length - 1]
  1382. } else {
  1383. customerOrgId = v // 后台顶级单位ID未获取正确(再获取一次)
  1384. }
  1385. // 保留之前预选的单位 if (!this.preCustomerOrgId)
  1386. this.preCustomerOrgId = customerOrgId
  1387. this.getParentCustomerOrgId(v)
  1388. .then(res => {
  1389. if (res) {
  1390. customerOrgParentId = res
  1391. // 获取并设置体检次数(个人的固定 "00000000-0000-0000-0000-000000000001" ),单位刷新分组字典
  1392. this.getCustomerOrgRegisterList(customerOrgParentId)
  1393. .then(() => {
  1394. // 需要触发 修改 分组/套餐 顶级ID 没有变时,不改变套餐与分组
  1395. if (customerOrgParentId != this.form.customerOrgParentId) {
  1396. this.form.customerOrgGroupId = null
  1397. this.form.medicalPackageId = null
  1398. // 清除套餐分组标识
  1399. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  1400. e.isBelongGroupPackage = 'N'
  1401. });
  1402. // 如果是个人,则清除分组字典
  1403. if (customerOrgParentId == this.dict.personOrgId) {
  1404. this.patientRegister.customerOrgGroup = []
  1405. }
  1406. if (this.form.customerOrgParentId == this.dict.personOrgId) {
  1407. this.changeMedicalPackageId()
  1408. } else {
  1409. this.changeCustomerOrgGroupId()
  1410. }
  1411. }
  1412. return resolve(customerOrgParentId)
  1413. })
  1414. } else {
  1415. resolve(customerOrgParentId)
  1416. }
  1417. })
  1418. .catch(() => {
  1419. resolve(customerOrgParentId)
  1420. })
  1421. })
  1422. },
  1423. // 获取顶级单位ID
  1424. getParentCustomerOrgId(v) {
  1425. return new Promise((resolve, reject) => {
  1426. let customerOrgParentId = null
  1427. if (Array.isArray(v) && v.length > 0) {
  1428. customerOrgParentId = v[0]
  1429. return resolve(customerOrgParentId)
  1430. } else {
  1431. if (!v) {
  1432. return resolve(customerOrgParentId)
  1433. } else {
  1434. if (v == this.dict.personOrgId) {
  1435. return resolve(v) // 等于个人体检时,则直接返回
  1436. } else {
  1437. getapi(`/api/app/customer-org/parent/${v}`)
  1438. .then(res => {
  1439. if (res.code > -1) customerOrgParentId = res.data
  1440. })
  1441. .finally(() => {
  1442. return resolve(customerOrgParentId)
  1443. })
  1444. }
  1445. }
  1446. }
  1447. })
  1448. },
  1449. //获取并设置体检次数(个人的固定 "00000000-0000-0000-0000-000000000001" ),单位刷新分组字典
  1450. getCustomerOrgRegisterList(customerOrgParentId) {
  1451. return new Promise((resolve, reject) => {
  1452. if (customerOrgParentId == this.dict.personOrgId) {
  1453. // 个人体检则 固定单位体检次数
  1454. this.form.customerOrgRegisterId = "00000000-0000-0000-0000-000000000001"
  1455. return resolve()
  1456. } else {
  1457. //获取单位体检次数信息
  1458. getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${customerOrgParentId}`)
  1459. .then(res => {
  1460. if (res.code > - 1) {
  1461. // console.log('获取单位体检次数', this.form.customerOrgRegisterId, res.data)
  1462. this.customerOrgRegisterList = res.data
  1463. if (!this.form.customerOrgRegisterId || this.form.customerOrgRegisterId == "00000000-0000-0000-0000-000000000001") {
  1464. let customerOrgRegisterList = arrayFilter(res.data, 'isComplete', 'N') //不显示已完成的体检次数
  1465. if (customerOrgRegisterList.length > 0) {
  1466. this.form.customerOrgRegisterId = customerOrgRegisterList[customerOrgRegisterList.length - 1].id
  1467. }
  1468. }
  1469. // /api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${this.form.customerOrgRegisterId}
  1470. this.patientRegister.customerOrgGroup = []
  1471. if (this.form.customerOrgRegisterId && this.form.customerOrgRegisterId != '00000000-0000-0000-0000-000000000001') {
  1472. //获取单位分组
  1473. postapi('/api/app/CustomerOrgGroup/GetListForPatentRegisterByFilter', { customerOrgRegisterId: this.form.customerOrgRegisterId })
  1474. .then(res2 => {
  1475. if (res2 && res2.code != -1) {
  1476. this.patientRegister.customerOrgGroup = res2.data;
  1477. }
  1478. })
  1479. } return
  1480. }
  1481. })
  1482. .finally(() => {
  1483. resolve()
  1484. })
  1485. }
  1486. })
  1487. },
  1488. //读取身份证信息
  1489. peopleIcCard() {
  1490. if (!this.$peisAPI) {
  1491. this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" })
  1492. return
  1493. }
  1494. this.$peisAPI.peopleIcCard().then(res => {
  1495. // console.log('peopleIcCard', res)
  1496. let lres = JSON.parse(res)
  1497. if (lres.code >= -1) {
  1498. let idNos = parsIcCardtoLocal(lres.data, this.dict.sex, this.dict.nation)
  1499. this.form.patientName = idNos.Name
  1500. this.form.birthDate = idNos.birthDate
  1501. this.form.sexId = idNos.sexId
  1502. this.form.age = idNos.age
  1503. this.form.nationId = idNos.nationId
  1504. this.form.idNo = idNos.IDCode
  1505. this.form.address = idNos.Address
  1506. this.peoplePhoto = 'data:image/bmp;base64,' + idNos.Photo
  1507. // this.patientRegister.photo = 'data:image/bmp;base64,' + idNos.Photo
  1508. this.changeIdNo() // 触发身份证查询档案号
  1509. } else {
  1510. this.$message.error({ showClose: true, message: `${lres.message}` })
  1511. }
  1512. })
  1513. },
  1514. // 分诊排队
  1515. fnQueue(row) {
  1516. this.queueParams = {
  1517. patientRegisterId: row.id
  1518. }
  1519. this.dialogWin.queue = true
  1520. this.dataTransOpts.plus.queue++
  1521. },
  1522. //修改单位体检次数
  1523. changeMedicalTimes() {
  1524. this.form.customerOrgGroupId = null
  1525. this.changeCustomerOrgGroupId()
  1526. //获取体检次数下的分组
  1527. this.getCustomerOrgGroup(this.form.customerOrgRegisterId)
  1528. },
  1529. //移除旧分组或套餐的组合项目
  1530. removeGroupPackageAsb() {
  1531. let body = { registerAsbitemIds: [] }
  1532. let registerAsbitemIds = []
  1533. let chargeComplete = ''
  1534. //体检基本信息未保存时,删除所有所选项目
  1535. if (!this.form.id) {
  1536. this.patientRegister.patientRegisterAbs = [];
  1537. return body;
  1538. }
  1539. //删除已选 分组或套餐的组合项目 ,如已收费或 已检时,将 groupPackageId 置为null
  1540. for (let i = 0; i < this.patientRegister.patientRegisterAbs.length; i++) {
  1541. if (!this.patientRegister.patientRegisterAbs[i].id) {
  1542. this.patientRegister.patientRegisterAbs.splice(i, 1)
  1543. i--
  1544. continue
  1545. }
  1546. if (this.patientRegister.patientRegisterAbs[i].isCharge == 'Y' || this.patientRegister.patientRegisterAbs[i].checkCompleteFlag != '0') {
  1547. chargeComplete += this.patientRegister.patientRegisterAbs[i].asbitemName + ','
  1548. this.patientRegister.patientRegisterAbs[i].groupPackageId = null
  1549. } else {
  1550. //数据库有,才添加到待删除的数组中
  1551. if (this.patientRegister.patientRegisterAbs[i].id) {
  1552. registerAsbitemIds.push(this.patientRegister.patientRegisterAbs[i].id)
  1553. }
  1554. this.patientRegister.patientRegisterAbs.splice(i, 1)
  1555. i--
  1556. }
  1557. }
  1558. if (chargeComplete) {
  1559. this.$message.info({ showClose: true, message: `所选项目:${chargeComplete}已收费或已检,不可删除!` });
  1560. }
  1561. body = { registerAsbitemIds };
  1562. return body;
  1563. },
  1564. //添加新套餐/分组的组合项目
  1565. addGroupPackageAsb(groupPackageAsb, typeFlag, groupPackageId) {
  1566. let payTypeFlag = '0'; //默认个人支付
  1567. let lfind = -1
  1568. if (this.form.customerOrgId != this.dict.personOrgId) payTypeFlag = '1' //单位支付
  1569. for (let i = 0; i < groupPackageAsb.length; i++) {
  1570. lfind = arrayExistObj(this.patientRegister.patientRegisterAbs, 'asbitemId', groupPackageAsb[i].id)
  1571. if (lfind > - 1) {
  1572. this.patientRegister.patientRegisterAbs[lfind].groupPackageId = groupPackageId
  1573. //editCount++
  1574. continue
  1575. }
  1576. let pojo = {
  1577. asbitemId: groupPackageAsb[i].id,
  1578. asbitemName: groupPackageAsb[i].displayName,
  1579. patientRegisterId: this.form.id,
  1580. standardPrice: groupPackageAsb[i].price,
  1581. chargePrice: typeFlag == 'group' ? groupPackageAsb[i].customerOrgGroupDetailPrice : groupPackageAsb[i].price,
  1582. payTypeFlag,
  1583. discount: typeFlag == 'group' ? groupPackageAsb[i].discount : 100,
  1584. isCharge: "N",
  1585. amount: typeFlag == 'group' ? groupPackageAsb[i].customerOrgGroupDetailAmount : 1,
  1586. groupPackageId: groupPackageId
  1587. }
  1588. this.patientRegister.patientRegisterAbs.push(pojo)
  1589. }
  1590. },
  1591. //获取体检次数下的分组
  1592. getCustomerOrgGroup(customerOrgRegisterId) {
  1593. this.patientRegister.customerOrgGroup = []
  1594. // /api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${customerOrgRegisterId}`
  1595. postapi('/api/app/CustomerOrgGroup/GetListForPatentRegisterByFilter', { customerOrgRegisterId }).then(res => {
  1596. if (res.code != - 1) {
  1597. this.patientRegister.customerOrgGroup = res.data;
  1598. }
  1599. })
  1600. },
  1601. //修改出生日期
  1602. changeBirthDate() {
  1603. this.form.age = birthdayToAge(this.form.birthDate)
  1604. },
  1605. //修改出生日期
  1606. changeAge() {
  1607. this.form.birthDate = ageToBirthday(this.form.age)
  1608. },
  1609. //修改身份证,生成年龄、出生、性别
  1610. changeIdNo() {
  1611. if (!this.form.idNo) return
  1612. this.Query(this.form.idNo)
  1613. let ret = parseID(this.form.idNo)
  1614. // console.log('changeIdNo',ret)
  1615. if (ret.age != -1) {
  1616. this.form.birthDate = new Date(ret.birthday)
  1617. this.form.age = ret.age
  1618. this.form.sexId = ret.sex
  1619. }
  1620. },
  1621. // 输入名字时,查重
  1622. changePatientName() {
  1623. console.log('this.LocalConfig.patientRegister.findPatientByName', this.LocalConfig.patientRegister.findPatientByName)
  1624. if (this.LocalConfig.patientRegister.findPatientByName) {
  1625. this.Query(this.form.patientName)
  1626. }
  1627. },
  1628. // //分组改变时触发
  1629. changeCustomerOrgGroupId() {
  1630. this.prAsbOpraOpts.prAsbGroup++
  1631. },
  1632. // //套餐改变时触发
  1633. changeMedicalPackageId() {
  1634. this.prAsbOpraOpts.prAsbPackage++
  1635. },
  1636. //根据姓名,身份证号 查询档案信息,用于判断人员多次体检
  1637. Query(param) {
  1638. this.patientChoosed = { id: '' } // 清空之前的选择
  1639. //编辑的时候不查重
  1640. if (this.form.id || !param) return;
  1641. //// console.log(`/api/app/patient/in-filter?Filter=${param}`)
  1642. let body = {
  1643. filter: param,
  1644. maxResultCount: 500
  1645. }
  1646. this.patientList = []
  1647. postapi('/api/app/patient/getlistinfilter', body).then((res) => {
  1648. if (res.code > -1) {
  1649. // console.log("查重 ", res); //有数据才显示
  1650. if (res.data && res.data.length > 0) {
  1651. this.patientList = res.data;
  1652. this.dialogVisible = true;
  1653. }
  1654. }
  1655. });
  1656. },
  1657. //列表选中
  1658. rowick(row) {
  1659. this.patientChoosed = row;
  1660. },
  1661. patientDblclick(row) {
  1662. this.patientChoosed = row;
  1663. this.choosePatient()
  1664. },
  1665. //确定选择人员
  1666. choosePatient() {
  1667. if (!this.patientChoosed.id) {
  1668. this.$message.warning({ showClose: true, message: '请选择人员档案信息' })
  1669. return;
  1670. }
  1671. this.dialogVisible = false;
  1672. this.form.patientId = this.patientChoosed.id;
  1673. this.form.patientNo = this.patientChoosed.patientNo;
  1674. this.form.medicalTimes = this.patientChoosed.medicalTimes + 1;
  1675. // 考滤录入有值,档案却无值
  1676. if (this.patientChoosed.displayName) this.form.patientName = this.patientChoosed.displayName;
  1677. if (this.patientChoosed.sexId) this.form.sexId = this.patientChoosed.sexId;
  1678. if (this.patientChoosed.birthDate) this.form.birthDate = new Date(this.patientChoosed.birthDate);
  1679. if (this.patientChoosed.nationId) this.form.nationId = this.patientChoosed.nationId;
  1680. if (this.patientChoosed.idNo) this.form.idNo = this.patientChoosed.idNo;
  1681. if (!this.form.maritalStatusId) this.form.maritalStatusId = this.patientChoosed.maritalStatusId;
  1682. if (!this.form.telephone) this.form.telephone = this.patientChoosed.telephone;
  1683. if (!this.form.mobileTelephone) this.form.mobileTelephone = this.patientChoosed.mobileTelephone;
  1684. if (this.form.birthDate) {
  1685. this.form.age = birthdayToAge(this.form.birthDate)
  1686. }
  1687. if (this.form.idNo) {
  1688. let ret = parseID(this.form.idNo)
  1689. this.form.birthDate = new Date(ret.birthday)
  1690. this.form.age = ret.age
  1691. this.form.sexId = ret.sex
  1692. }
  1693. },
  1694. registerRowClick(row) {
  1695. this.registerChoosed = row;
  1696. },
  1697. registerRowDblclick(row) {
  1698. this.registerChoosed = row;
  1699. this.chooseRegister()
  1700. },
  1701. chooseRegister() {
  1702. if (!this.registerChoosed) {
  1703. alert("请选中人员登记信息");
  1704. return;
  1705. }
  1706. objCopy(this.registerChoosed, this.form)
  1707. // this.patientRegister.patientRegisterId = this.registerChoosed.id
  1708. // this.patientRegister.photo = this.registerChoosed.photo
  1709. // this.getPatientRegisterAbs(this.registerChoosed.id)
  1710. this.dataTransOpts.tableS.patient_register.id = this.registerChoosed.id
  1711. setTimeout(() => {
  1712. this.dataTransOpts.refresh.register_check_asbitem.M++
  1713. }, 20);
  1714. this.registerVisible = false
  1715. },
  1716. // 组装基本信息保存的参数体
  1717. madePrBody() {
  1718. //赋值
  1719. let body = deepCopy(this.form);
  1720. // // console.log('this.form',this.form)
  1721. console.log('body', this.form, body)
  1722. if (this.form.birthDate) {
  1723. try {
  1724. body.birthDate = moment(new Date(this.form.birthDate)).format("yyyy-MM-DD")
  1725. } catch (error) {
  1726. // this.form.birthDate != "Invalid date"
  1727. body.birthDate = null
  1728. }
  1729. } else {
  1730. body.birthDate = null
  1731. }
  1732. if (body.birthDate == "Invalid date") body.birthDate = null
  1733. if (isNaN(body.age)) {
  1734. body.age = null
  1735. } else {
  1736. body.age = Number(body.age)
  1737. }
  1738. // // console.log('body',body)
  1739. // Invalid date
  1740. delete body.registerManType;
  1741. delete body.patientRegisterNo;
  1742. delete body.medicalTimes;
  1743. // delete body.completeFlag;
  1744. delete body.isMedicalStart;
  1745. delete body.patientNo;
  1746. delete body.creatorId;
  1747. delete body.creationTime;
  1748. delete body.lastModificationTime;
  1749. delete body.lastModifierId;
  1750. delete body.isVipBox;
  1751. delete body.isNameHideBox;
  1752. delete body.isPhoneFollowBox;
  1753. delete body.isLockBox;
  1754. delete body.photo;
  1755. // if(this.form.registerManType == 'customer') delete body.medicalStartDate;
  1756. if (this.form.id) delete body.medicalStartDate;
  1757. setNull(body, this.defaultNull);
  1758. if (typeof this.form.customerOrgId == 'object') {
  1759. if (this.form.customerOrgId.length > 0) body.customerOrgId = this.form.customerOrgId[this.form.customerOrgId.length - 1]
  1760. }
  1761. //日期转换 日期控件增加格式
  1762. // // console.log("body.birthDate", body.birthDate);
  1763. // if (body.birthDate) {
  1764. // body.birthDate = moment(new Date(body.birthDate)).format(
  1765. // "yyyy-MM-DD"
  1766. // );
  1767. // }
  1768. return body
  1769. },
  1770. // 验证职业病数据合法性
  1771. validateOccData() {
  1772. let err = ''
  1773. if (!this.form.idNo) return "职业健康检查必须填写 身份证号!"
  1774. if (this.form.maritalStatusId == '9') return "职业健康检查 婚姻不允许填未知!"
  1775. if (this.form.sexId == 'U') return "职业健康检查 性别不允许填未知!"
  1776. if (!this.form.ocCheckTypeId) return "职业健康检查必须填写 检查类别!"
  1777. if (!this.form.jobType) return "职业健康检查必须填写 工种!"
  1778. if (this.form.poisonIds == null || this.form.poisonIds.length == 0) return "职业健康检查必须填写 接害因素!"
  1779. return err
  1780. },
  1781. //提交
  1782. btnSubmit(formName, msgTip) {
  1783. console.log('btnSubmit,formName,form', formName, JSON.stringify(this.form))
  1784. this.$refs[formName].validate((valid, fields) => {
  1785. // console.log('fields', fields)
  1786. if (!valid) {
  1787. this.$message.warning({ showClose: true, message: fields[Object.keys(fields)[0]][0].message });
  1788. return false
  1789. }
  1790. console.log('btnSubmit1', formName)
  1791. if (this.form.customerOrgId != this.dict.personOrgId) {
  1792. if (!this.form.customerOrgRegisterId) {
  1793. this.$message.warning({ showClose: true, message: "请填写单位体检次数!" });
  1794. return false
  1795. }
  1796. }
  1797. if (this.form.idNo && checkIDCode(this.form.idNo) == false) {
  1798. this.$message.warning({ showClose: true, message: "身份证号填写不合法!" });
  1799. return false
  1800. }
  1801. // 如果是职业病,数据验证
  1802. if (this.form.isPatientOccupationalDisease == 'Y') {
  1803. let message = this.validateOccData()
  1804. if (message) {
  1805. this.$message.warning({ showClose: true, message });
  1806. return false
  1807. }
  1808. }
  1809. // console.log('btnSubmit2', formName)
  1810. let body = this.madePrBody()
  1811. // console.log('madePrBody',body)
  1812. body.registerCheckAsbitems = deepCopy(this.dataTransOpts.tableM.register_check_asbitem)
  1813. if (this.form.id) {
  1814. // 更新时,先保存明细,再更新主表
  1815. // this.prAsbOpraOpts.prAsbSave++ //触发组合项目保存
  1816. body.patientRegisterId = body.id;
  1817. } else {
  1818. delete body.id;
  1819. }
  1820. console.log('btnSubmit3', formName)
  1821. // // console.log(`/api/patientregister/createreturninfo`, body);
  1822. postapi(`/api/PatientRegister/CreatePatientRegister`, body)
  1823. .then(async (res) => {
  1824. if (res.code > -1) {
  1825. // 因为 res.data 返回的 isPatientOccupationalDisease 是错误的(因为职业病尚未保存,所以以form里的值为准)
  1826. let isPatientOccupationalDisease = this.form.isPatientOccupationalDisease
  1827. this.form = Object.assign({}, this.form, res.data, { isPatientOccupationalDisease })
  1828. this.dataTransOpts.tableS.patient_register = deepCopy(res.data)
  1829. delete this.dataTransOpts.tableS.patient_register.registerCheckAsbitems
  1830. // 保存成功赋 id 值等
  1831. this.dataTransOpts.tableM.register_check_asbitem = res.data.registerCheckAsbitems
  1832. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  1833. e.total = e.amount * e.chargePrice
  1834. });
  1835. //一般读身份证照片时,会出现这种情况
  1836. if (this.peoplePhoto && this.peoplePhoto.indexOf("data:image") > -1) await savePeoplePhoto(res.data.id, this.peoplePhoto);
  1837. // 如果是职业病,则保存职业病相关信息
  1838. // console.log('this.form.isPatientOccupationalDisease', this.form.isPatientOccupationalDisease)
  1839. if (this.form.isPatientOccupationalDisease == 'Y') {
  1840. await this.occUpdate()
  1841. }
  1842. // 保存即发送收费申请 正式登记的才发送申请
  1843. if (this.form.completeFlag != '0' && this.LocalConfig.patientRegister.immediateToHisCharge) {
  1844. await this.immediateToHisCharge(this.form.id)
  1845. }
  1846. // 首次正式登记或者预登记转正式登记,提示打印条码与指引单
  1847. if (this.completeFlag == '0' && this.form.completeFlag != '0') {
  1848. if (Array.isArray(this.LocalConfig.patientRegister.printGuideLabel) && this.LocalConfig.patientRegister.printGuideLabel.length > 0) {
  1849. this.$confirm("是否打印 指引单、人员条码、检验条码及 Pacs 条码?", "提示", {
  1850. confirmButtonText: "是",
  1851. cancelButtonText: "否",
  1852. type: "warning",
  1853. })
  1854. .then(() => {
  1855. return this.labelPrint(false)
  1856. })
  1857. .then(res => {
  1858. return this.guidePrint('0001', false)
  1859. })
  1860. .catch((err) => {
  1861. if (err != "cancel") {
  1862. console.log(err)
  1863. this.$message.error({ showClose: true, message: err })
  1864. }
  1865. })
  1866. .finally(() => {
  1867. this.completeFlag = this.form.completeFlag
  1868. });
  1869. }
  1870. }
  1871. }
  1872. }
  1873. );
  1874. });
  1875. },
  1876. // 保存职业病信息
  1877. async occUpdate() {
  1878. // 职业病基本信息
  1879. let lriskFactors = []
  1880. this.form.poisonIds.forEach(e => {
  1881. lriskFactors.push(dddw(this.poisonList, 'id', e, 'displayName'))
  1882. });
  1883. let diseaseBase = {
  1884. patientRegisterId: this.form.id,
  1885. ocCheckTypeId: this.form.ocCheckTypeId,
  1886. jobType: this.form.jobType,
  1887. riskFactors: `${lriskFactors}`,
  1888. occupationalDiseaseNumber: this.form.occupationalDiseaseNumber
  1889. }
  1890. // 职业病接害因素
  1891. let poisons = this.dataTransOpts.tableM.patient_poison.filter(e => {
  1892. return this.form.poisonIds.indexOf(e.poisonId) > - 1
  1893. })
  1894. this.form.poisonIds.forEach(e => {
  1895. if (arrayExistObj(poisons, 'poisonId', e) == -1) {
  1896. poisons.push({
  1897. patientRegisterId: this.form.id,
  1898. poisonId: e,
  1899. occupationalAbnormalId: null
  1900. })
  1901. }
  1902. });
  1903. let patientOccupationalDisease = Object.assign({}, this.dataTransOpts.tableS.patient_occupational_disease || {}, diseaseBase)
  1904. let body = {
  1905. patientRegisterId: this.form.id,
  1906. patientOccupationalDisease,
  1907. patientPoisons: poisons,
  1908. isPatientOccupationalDiseaseUpdate: "Y", //基本信息
  1909. isPatientPoisonsUpdate: "Y", //接害因素
  1910. isPatientPastMedicalHistorysUpdate: "N", // 既往病史
  1911. isPatientOccupationalMedicalHistorysUpdate: "N", // 职业病史
  1912. isPatientOccupationalHistorysUpdate: "N", // 职业史
  1913. isPatientSymptomsUpdate: "N", // 症状
  1914. }
  1915. try {
  1916. await postapi('/api/app/OccupationalDisease/CreateOccupationalDiseaseWithDetail', body)
  1917. this.getOccDiseaseData()
  1918. } catch (error) {
  1919. console.log('occUpdate error', error)
  1920. }
  1921. },
  1922. // 获取职业病信息
  1923. getOccDiseaseData() {
  1924. return new Promise((resolve, reject) => {
  1925. let patientRegisterId = this.form.id
  1926. postapi('/api/app/OccupationalDisease/GetOccupationalDiseaseWithDetailByPatientRegisterId', { patientRegisterId })
  1927. .then(res => {
  1928. if (res.code > -1) {
  1929. if (res.data['patientOccupationalDisease'] == null) {
  1930. this.dataTransOpts.tableS.patient_occupational_disease = { patientRegisterId }
  1931. } else {
  1932. this.dataTransOpts.tableS.patient_occupational_disease = deepCopy(res.data['patientOccupationalDisease'])
  1933. }
  1934. this.dataTransOpts.tableM.patient_poison = deepCopy(res.data['patientPoisonDtos'])
  1935. this.form.ocCheckTypeId = this.dataTransOpts.tableS.patient_occupational_disease.ocCheckTypeId
  1936. this.form.jobType = this.dataTransOpts.tableS.patient_occupational_disease.jobType
  1937. this.form.occupationalDiseaseNumber = this.dataTransOpts.tableS.patient_occupational_disease.occupationalDiseaseNumber
  1938. let poisonIds = [] // 接害因素IDs
  1939. this.dataTransOpts.tableM.patient_poison.forEach(e => {
  1940. poisonIds.push(e.poisonId)
  1941. });
  1942. this.form.poisonIds = poisonIds
  1943. resolve('')
  1944. } else {
  1945. reject(res.message)
  1946. }
  1947. })
  1948. .catch(error => {
  1949. reject(error)
  1950. })
  1951. })
  1952. },
  1953. // 列表数据生成 分组 select
  1954. madeSelectGroup(poisonList) {
  1955. let poison = []
  1956. poisonList.forEach(e => {
  1957. let lfind = arrayExistObj(poison, "poisonTypeName", e.poisonTypeName)
  1958. if (lfind == -1) {
  1959. poison.push({ poisonTypeName: e.poisonTypeName, poisonDtos: [{ id: e.id, displayName: e.displayName, simpleCode: e.simpleCode }] })
  1960. } else {
  1961. poison[lfind]['poisonDtos'].push({ id: e.id, displayName: e.displayName, simpleCode: e.simpleCode })
  1962. }
  1963. });
  1964. return poison
  1965. },
  1966. filterMethodPoison(v) {
  1967. // console.log('this.poisonList',v,this.poisonList)
  1968. if (v) {
  1969. let lv = v.toUpperCase()
  1970. let poisonList = this.poisonList.filter(e => {
  1971. return e.poisonTypeName.indexOf(lv) > -1 || e.displayName.indexOf(lv) > -1 || e.simpleCode.indexOf(lv) > -1
  1972. })
  1973. this.poison = this.madeSelectGroup(poisonList)
  1974. } else {
  1975. this.poison = this.madeSelectGroup(this.poisonList)
  1976. }
  1977. console.log('filterMethod', this.poison)
  1978. },
  1979. // 人员新增
  1980. btnAdd() {
  1981. this.dataTransOpts.tableS.patient_register.id = ''
  1982. this.dataTransOpts.refresh.patient_register.S++
  1983. },
  1984. //将现有的数据,复制并展现,但未保存
  1985. rdCopy() {
  1986. if (!this.form.id) {
  1987. this.$message.info({ showClose: true, message: "该信息尚未保存,不可执行此操作!" });
  1988. return;
  1989. }
  1990. this.dataTransOpts.tableS.patient_register.id = ''
  1991. this.peoplePhoto = '/pic/Photo.jpg'
  1992. this.patientRegister.patientRegisterId = '';
  1993. this.form.id = '';
  1994. this.form.patientId = '00000000-0000-0000-0000-000000000000';
  1995. this.form.patientRegisterNo = '';
  1996. this.form.patientNo = '';
  1997. this.form.medicalTimes = 1;
  1998. this.form.patientName = '';
  1999. this.form.photo = '';
  2000. this.form.completeFlag = '1'; //
  2001. // this.patientRegister.patientRegisterAbs.forEach(e => {
  2002. // e.id = '';
  2003. // e.patientRegisterId = '';
  2004. // e.isCharge = 'N';
  2005. // e.checkCompleteFlag = '0'
  2006. // e.isLock = 'N'
  2007. // });
  2008. // 触发明细项目复制
  2009. // setTimeout(() => {
  2010. // this.prAsbOpraOpts.copyNew++
  2011. // }, 10);
  2012. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  2013. delete e.id
  2014. e.patientRegisterId = ''
  2015. e.isCharge = 'N'
  2016. e.isLock = 'N'
  2017. e.checkCompleteFlag = '0'
  2018. });
  2019. // // console.log('this.patientRegister.patientRegisterAbs',this.patientRegister.patientRegisterAbs)
  2020. this.$message.warning({ showClose: true, message: "操作成功,请记得点保存" });
  2021. },
  2022. //删除
  2023. del() {
  2024. deletapi(
  2025. `/api/app/customer-org/${this.customerOrg.customerOrgRd.id}`
  2026. ).then((res) => {
  2027. // console.log("删除 操作成功");
  2028. this.setData({ key: "customerOrg.customerOrgRd", value: { id: "" } });
  2029. this.getCustomerOrgTree();
  2030. });
  2031. },
  2032. // 同步团检人员网上添加项目信息
  2033. btnDownOrg() {
  2034. postapi("/api/app/ThirdInterface/GetListByThirdInterfaceTypeAsync", { thirdInterfaceType: "07" })
  2035. .then(res => {
  2036. if (res.code > -1 && res.data && Array.isArray(res.data) && res.data.length > 0) {
  2037. this.thirdInterfaceId = res.data[0].id
  2038. return postapi('/api/app/AppointPatientRegister/GetByPatientRegisterId', { thirdInterfaceId: this.thirdInterfaceId, appointPatientRegisterId: '1', patientRegisterId: this.form.id })
  2039. }
  2040. })
  2041. .then(res => {
  2042. if (res && res.code > -1) {
  2043. this.form.appointPatientRegisterId = res.data.appointPatientRegisterId
  2044. return postapi('/api/app/AppointPatientRegister/GetAppointRegisterAsbitemListById', {
  2045. thirdInterFaceId: this.thirdInterfaceId,
  2046. appointPatientRegisterId: res.data.appointPatientRegisterId
  2047. })
  2048. }
  2049. })
  2050. .then(res => {
  2051. if (res && res.code > -1) {
  2052. res.data.forEach(e => {
  2053. e.discount = e.standardPrice == 0 ? 100 : Math.floor(e.chargePrice * 10000 / e.standardPrice) / 100
  2054. if (!e.isBelongGroupPackage) {
  2055. e.isBelongGroupPackage = e.isInMedicalPackage
  2056. }
  2057. // e.standTotal = e.amount * e.standardPrice
  2058. e.total = e.amount * e.chargePrice
  2059. });
  2060. this.dataTransOpts.tableM.register_check_asbitem = deepCopy(res.data)
  2061. this.$message.success({ showClose: true, message: '操作成功!' })
  2062. }
  2063. })
  2064. },
  2065. //拍照(已废弃)
  2066. // openCamera() {
  2067. // if (!this.form.id) {
  2068. // alert("请先保存人员信息");
  2069. // return;
  2070. // }
  2071. // this.patientRegister.cameraVisble = true;
  2072. // },
  2073. //拍照(调壳程序)
  2074. photoGrah() {
  2075. if (!this.form.id) {
  2076. alert("请先保存人员信息");
  2077. return;
  2078. }
  2079. if (!this.$peisAPI) {
  2080. this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" })
  2081. return
  2082. }
  2083. this.$peisAPI.photoGrah()
  2084. .then(res => {
  2085. // console.log('this.$peisAPI.photoGrah 原始返回结果', res)
  2086. let lres = JSON.parse(res)
  2087. if (lres.code > -1) {
  2088. let uploadPhoto = {
  2089. patientRegisterId: this.form.id,
  2090. photo: lres.data.Photo,
  2091. };
  2092. this.peoplePhoto = `data:image/${lres.data.PhotoFormat == 'jpg' ? 'jpeg' : lres.data.PhotoFormat};base64,${lres.data.Photo}`
  2093. // this.patientRegister.photo = `data:image/${lres.data.PhotoFormat == 'jpg' ? 'jpeg' : lres.data.PhotoFormat};base64,${lres.data.Photo}`
  2094. return postapi(`/api/app/patient-register/up-load-img`, uploadPhoto)
  2095. } else {
  2096. this.$message.error({ showClose: true, message: "上传照片错误" + lres.code })
  2097. }
  2098. }).then(res => {
  2099. if (res && res.code > -1) {
  2100. let body = {
  2101. patientRegisterId: this.form.id,
  2102. photo: res.data,
  2103. };
  2104. // console.log(body);
  2105. return postapi(`/api/app/patient-register/update-photo`, body);
  2106. }
  2107. }).then(res => {
  2108. if (res && res.code > -1) {
  2109. //// console.log('拍照',res.data)
  2110. this.patientRegister.patientRegisterRd.photo = res.data.photo
  2111. // console.log("操作成功");
  2112. }
  2113. }).catch(err => {
  2114. // console.log('this.$peisAPI.photoGrah', err)
  2115. this.$message.error({ showClose: true, message: `照片操作错误 ${err}` })
  2116. })
  2117. },
  2118. getPeoplePhoto(photo) {
  2119. this.peoplePhoto = photoParse(photo)
  2120. },
  2121. // 打印指引单(isPreview)
  2122. guidePrint(ReportCode, isPreview) {
  2123. return new Promise((resolve, reject) => {
  2124. if (!this.form.id) {
  2125. reject("人员信息尚未保存,不可执行此操作!")
  2126. }
  2127. if (this.form.completeFlag == '0') {
  2128. reject("预登记人员,不可执行此操作!")
  2129. }
  2130. if (!this.$peisAPI) {
  2131. reject("此功能,需要在壳客户端才可运行!")
  2132. }
  2133. let token = window.sessionStorage.getItem('token');
  2134. let user = window.sessionStorage.getItem('user');
  2135. let toOutShell = {
  2136. ReportCode, token,
  2137. isBuildImage: 'N',
  2138. IsUploadPdf: 'N',
  2139. preViewCanPrint: 'N',
  2140. BusinessCode: this.form.id,
  2141. Parameters: [
  2142. { Name: 'printer', Value: user },
  2143. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  2144. { Name: 'pageFooter', Value: 'pic/peisQrCode.jpg' },
  2145. ],
  2146. };
  2147. console.log('this.$peisAPI.print', JSON.stringify(toOutShell))
  2148. this.printing = true
  2149. if (isPreview) {
  2150. this.$peisAPI.printPre(JSON.stringify(toOutShell))
  2151. .then(res => {
  2152. if (JSON.parse(res).code < 0) {
  2153. reject(JSON.parse(res).message)
  2154. } else {
  2155. resolve(res)
  2156. }
  2157. })
  2158. .catch(err => {
  2159. reject(err)
  2160. })
  2161. .finally(() => {
  2162. this.printing = false
  2163. })
  2164. } else {
  2165. this.$peisAPI.print(JSON.stringify(toOutShell))
  2166. .then(res => {
  2167. if (JSON.parse(res).code < 0) {
  2168. reject(JSON.parse(res).message)
  2169. } else {
  2170. return postapi('/api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id])
  2171. }
  2172. })
  2173. .then(res => {
  2174. if (res && res.code > -1) {
  2175. let lfind = arrayExistObj(this.patientRegister.prList, 'id', this.form.id)
  2176. if (lfind > -1) {
  2177. if (this.patientRegister.prList[lfind].guidePrintTimes) {
  2178. this.patientRegister.prList[lfind].guidePrintTimes = Number(this.patientRegister.prList[lfind].guidePrintTimes) + 1;
  2179. } else {
  2180. this.patientRegister.prList[lfind].guidePrintTimes = 1;
  2181. }
  2182. }
  2183. resolve(res)
  2184. } else {
  2185. reject("更新指引单打印错误")
  2186. }
  2187. })
  2188. .catch(err => {
  2189. reject(err)
  2190. })
  2191. .finally(() => {
  2192. this.printing = false
  2193. })
  2194. }
  2195. })
  2196. },
  2197. //检验申请
  2198. async lisRequest() {
  2199. this.$message.warning({ showClose: true, message: '此功能已合并到条码打印' });
  2200. /*
  2201. let isPrintLisRequest = false
  2202. let res = null
  2203. if (this.form.id.length < 1) {
  2204. this.$message.info({ showClose: true, message: "人员信息尚未保存,不可执行此操作!"});
  2205. return;
  2206. }
  2207. try {
  2208. res = await postapi(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`);
  2209. // console.log(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`, res)
  2210. } catch (error) {
  2211. return;
  2212. }
  2213. if (res.code > -1) {
  2214. // this.$message.info("发送检验申请成功!");
  2215. isPrintLisRequest = true;
  2216. }
  2217. //重复申请,重打
  2218. if (res.code == -1 && res.message.indexOf('已申请') > -1) {
  2219. isPrintLisRequest = true;
  2220. }
  2221. if (!isPrintLisRequest) return;
  2222. try {
  2223. await this.$confirm("是否打印检验申请单?", "提示", {
  2224. confirmButtonText: "是",
  2225. cancelButtonText: "否",
  2226. type: "info",
  2227. showClose: false,
  2228. closeOnClickModal: false,
  2229. closeOnPressEscape: false,
  2230. });
  2231. } catch (error) {
  2232. return;
  2233. }
  2234. //打印检验申请单
  2235. this.lisPrint('0003', false);
  2236. */
  2237. },
  2238. //条码打印(lis + pacs)
  2239. labelPrint(isPreview) {
  2240. return new Promise((resolve, reject) => {
  2241. if (!this.form.id) {
  2242. reject("人员信息尚未保存,不可执行此操作!");
  2243. }
  2244. if (this.form.completeFlag == '0') {
  2245. reject("预登记人员,不可执行此操作!");
  2246. }
  2247. if (!this.$peisAPI) {
  2248. reject("此功能,需要在壳客户端才可运行!");
  2249. }
  2250. let token = window.sessionStorage.getItem('token');
  2251. let user = window.sessionStorage.getItem('user');
  2252. let toOutShell = {
  2253. token, // ReportCode,
  2254. IsMoreLabel: 'Y',
  2255. isBuildImage: 'N',
  2256. IsUploadPdf: 'N',
  2257. BusinessCode: this.form.id,
  2258. Parameters: [
  2259. { Name: 'printer', Value: user },
  2260. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  2261. { Name: 'pageFooter', Value: 'pic/peisQrCode.jpg' }
  2262. ],
  2263. };
  2264. this.printing = true
  2265. if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('patient') > -1 && this.LocalConfig.patientRegister.printGuideLabel.indexOf('lis') > -1 && this.LocalConfig.patientRegister.printGuideLabel.indexOf('pacs') > -1) {
  2266. if (this.merge_lis_pacs_label == '1') {
  2267. this.guidePrintEasy('0008', isPreview, toOutShell)
  2268. .then(res => {
  2269. return this.lisPrint('0002', isPreview, toOutShell)
  2270. })
  2271. // .then(res => {
  2272. // return this.pacsPrint('0004', isPreview, toOutShell)
  2273. // })
  2274. .then(res => {
  2275. resolve(res)
  2276. })
  2277. .catch(err => {
  2278. reject(err)
  2279. })
  2280. .finally(() => {
  2281. this.printing = false
  2282. })
  2283. } else {
  2284. this.guidePrintEasy('0008', isPreview, toOutShell)
  2285. .then(res => {
  2286. return this.lisPrint('0002', isPreview, toOutShell)
  2287. })
  2288. .then(res => {
  2289. return this.pacsPrint('0004', isPreview, toOutShell)
  2290. })
  2291. .then(res => {
  2292. resolve(res)
  2293. })
  2294. .catch(err => {
  2295. reject(err)
  2296. })
  2297. .finally(() => {
  2298. this.printing = false
  2299. })
  2300. }
  2301. } else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('patient') > -1 && this.LocalConfig.patientRegister.printGuideLabel.indexOf('lis') > -1) {
  2302. this.guidePrintEasy('0008', isPreview, toOutShell)
  2303. .then(res => {
  2304. return this.lisPrint('0002', isPreview, toOutShell)
  2305. })
  2306. .then(res => {
  2307. resolve(res)
  2308. })
  2309. .catch(err => {
  2310. reject(err)
  2311. })
  2312. .finally(() => {
  2313. this.printing = false
  2314. })
  2315. } else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('patient') > -1 && this.LocalConfig.patientRegister.printGuideLabel.indexOf('pacs') > -1) {
  2316. this.guidePrintEasy('0008', isPreview, toOutShell)
  2317. .then(res => {
  2318. return this.pacsPrint('0004', isPreview, toOutShell)
  2319. })
  2320. .then(res => {
  2321. resolve(res)
  2322. })
  2323. .catch(err => {
  2324. reject(err)
  2325. })
  2326. .finally(() => {
  2327. this.printing = false
  2328. })
  2329. } else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('lis') > -1 && this.LocalConfig.patientRegister.printGuideLabel.indexOf('pacs') > -1) {
  2330. if (this.merge_lis_pacs_label == '1') {
  2331. this.lisPrint('0002', isPreview, toOutShell)
  2332. // .then(res => {
  2333. // return this.pacsPrint('0004', isPreview, toOutShell)
  2334. // })
  2335. .then(res => {
  2336. resolve(res)
  2337. })
  2338. .catch(err => {
  2339. reject(err)
  2340. })
  2341. .finally(() => {
  2342. this.printing = false
  2343. })
  2344. } else {
  2345. this.lisPrint('0002', isPreview, toOutShell)
  2346. .then(res => {
  2347. return this.pacsPrint('0004', isPreview, toOutShell)
  2348. })
  2349. .then(res => {
  2350. resolve(res)
  2351. })
  2352. .catch(err => {
  2353. reject(err)
  2354. })
  2355. .finally(() => {
  2356. this.printing = false
  2357. })
  2358. }
  2359. } else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('patient') > -1) {
  2360. this.guidePrintEasy('0008', isPreview, toOutShell)
  2361. .then(res => {
  2362. resolve(res)
  2363. })
  2364. .catch(err => {
  2365. reject(err)
  2366. })
  2367. .finally(() => {
  2368. this.printing = false
  2369. })
  2370. } else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('lis') > -1) {
  2371. this.lisPrint('0002', isPreview, toOutShell)
  2372. .then(res => {
  2373. resolve(res)
  2374. })
  2375. .catch(err => {
  2376. reject(err)
  2377. })
  2378. .finally(() => {
  2379. this.printing = false
  2380. })
  2381. } else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('pacs') > -1) {
  2382. this.pacsPrint('0004', isPreview, toOutShell)
  2383. .then(res => {
  2384. resolve(res)
  2385. })
  2386. .catch(err => {
  2387. reject(err)
  2388. })
  2389. .finally(() => {
  2390. this.printing = false
  2391. })
  2392. } else {
  2393. this.printing = false
  2394. resolve("success")
  2395. }
  2396. })
  2397. },
  2398. // lis条码打印
  2399. guidePrintEasy(ReportCode, isPreview, toOutShell) {
  2400. return new Promise((resolve, reject) => {
  2401. toOutShell.ReportCode = ReportCode
  2402. console.log('this.$peisAPI.print', JSON.stringify(toOutShell))
  2403. if (isPreview) {
  2404. this.$peisAPI.printPre(JSON.stringify(toOutShell))
  2405. .then(res => {
  2406. if (JSON.parse(res).code < 0) {
  2407. // this.$message.warning({ showClose: true, message: JSON.parse(lres).message });
  2408. reject(JSON.parse(res).message)
  2409. } else {
  2410. resolve(res)
  2411. }
  2412. })
  2413. .catch(err => {
  2414. reject(err)
  2415. })
  2416. } else {
  2417. this.$peisAPI.print(JSON.stringify(toOutShell))
  2418. .then(res => {
  2419. if (JSON.parse(res).code < 0) {
  2420. reject(JSON.parse(res).message)
  2421. } else {
  2422. return postapi('/api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id])
  2423. }
  2424. })
  2425. .then(res => {
  2426. if (res && res.code > -1) {
  2427. let lfind = arrayExistObj(this.patientRegister.prList, 'id', this.form.id)
  2428. if (lfind > -1) {
  2429. if (this.patientRegister.prList[lfind].guidePrintTimes) {
  2430. this.patientRegister.prList[lfind].guidePrintTimes = Number(this.patientRegister.prList[lfind].guidePrintTimes) + 1;
  2431. } else {
  2432. this.patientRegister.prList[lfind].guidePrintTimes = 1;
  2433. }
  2434. }
  2435. resolve(res)
  2436. } else {
  2437. reject(res.message)
  2438. }
  2439. })
  2440. .catch(err => {
  2441. reject(err)
  2442. })
  2443. }
  2444. })
  2445. },
  2446. // lis条码打印
  2447. lisPrint(ReportCode, isPreview, toOutShell) {
  2448. return new Promise((resolve, reject) => {
  2449. toOutShell.ReportCode = ReportCode
  2450. console.log('this.$peisAPI.print', JSON.stringify(toOutShell))
  2451. if (isPreview) {
  2452. this.$peisAPI.printPre(JSON.stringify(toOutShell))
  2453. .then(res => {
  2454. if (JSON.parse(res).code < 0) {
  2455. // this.$message.warning({ showClose: true, message: JSON.parse(lres).message });
  2456. reject(JSON.parse(res).message)
  2457. } else {
  2458. resolve(res)
  2459. }
  2460. })
  2461. .catch(err => {
  2462. reject(err)
  2463. })
  2464. } else {
  2465. this.$peisAPI.print(JSON.stringify(toOutShell))
  2466. .then(res => {
  2467. if (JSON.parse(res).code < 0) {
  2468. reject(JSON.parse(res).message)
  2469. } else {
  2470. return postapi('/api/app/lisrequest/updatelisrequestisprint', { operateType: 1, patientRegisterId: this.form.id })
  2471. }
  2472. })
  2473. .then(res => {
  2474. if (res && res.code < 0) {
  2475. reject(res.message)
  2476. } else {
  2477. resolve(res)
  2478. }
  2479. })
  2480. .catch(err => {
  2481. reject(err)
  2482. })
  2483. }
  2484. })
  2485. },
  2486. //pacs条码打印
  2487. pacsPrint(ReportCode, isPreview, toOutShell) {
  2488. return new Promise((resolve, reject) => {
  2489. toOutShell.ReportCode = ReportCode
  2490. console.log('this.$peisAPI.print', JSON.stringify(toOutShell))
  2491. if (isPreview) {
  2492. this.$peisAPI.printPre(JSON.stringify(toOutShell))
  2493. .then(res => {
  2494. if (JSON.parse(res).code < 0) {
  2495. // this.$message.warning({ showClose: true, message: JSON.parse(res).message });
  2496. reject(JSON.parse(res).message)
  2497. } else {
  2498. resolve(res)
  2499. }
  2500. })
  2501. .catch((err) => {
  2502. // console.log('打印pacs条码错误', err)
  2503. this.$message.warning({ showClose: true, message: `${err}` });
  2504. reject(err)
  2505. });
  2506. } else {
  2507. this.$peisAPI.print(JSON.stringify(toOutShell))
  2508. .then(res => {
  2509. if (JSON.parse(res).code < 0) {
  2510. // this.$message.warning({ showClose: true, message: JSON.parse(res).message });
  2511. reject(JSON.parse(res).message)
  2512. } else {
  2513. return postapi("/api/app/lisrequest/updatelisrequestisprint", {
  2514. operateType: 1,
  2515. patientRegisterId: this.form.id,
  2516. });
  2517. }
  2518. })
  2519. .then(res => {
  2520. if (res && res.code < 0) {
  2521. // this.$message.error({ showClose: true, message: `${res.message}` });
  2522. reject(res.message)
  2523. } else {
  2524. resolve(res)
  2525. }
  2526. })
  2527. .catch((err) => {
  2528. // console.log('打印pacs条码错误', err)
  2529. // this.$message.error({ showClose: true, message: `${err}` });
  2530. reject(err)
  2531. });
  2532. }
  2533. });
  2534. },
  2535. //补打条码
  2536. reLisRequest() {
  2537. if (!this.form.id) {
  2538. this.$message.info({ showClose: true, message: "人员信息尚未保存,不可执行此操作!" });
  2539. return;
  2540. }
  2541. if (this.form.completeFlag == '0') {
  2542. this.$message.info({ showClose: true, message: "预登记人员,不可执行此操作!" });
  2543. return;
  2544. }
  2545. this.brushTimes++;
  2546. this.patientRegister.lisRequestVisble = true;
  2547. },
  2548. //手动合并项目
  2549. reMergeAsbitem() {
  2550. if (this.form.id.length < 1) {
  2551. this.$message.info({ showClose: true, message: "人员信息尚未保存,不可执行此操作!" });
  2552. return;
  2553. }
  2554. this.brushTimes++;
  2555. this.patientRegister.mergeAsbitemVisble = true;
  2556. },
  2557. btnPayTypeFlag(payTypeFlag) {
  2558. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  2559. if (e.isCharge == 'N') e.payTypeFlag = payTypeFlag
  2560. });
  2561. },
  2562. // 刷新登记的检查项目
  2563. getAsb(id) {
  2564. return new Promise((resolve, reject) => {
  2565. getapi(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`)
  2566. .then(res => {
  2567. if (res.code > - 1) {
  2568. this.dataTransOpts.tableM.register_check_asbitem = res.data
  2569. resolve()
  2570. } else {
  2571. reject(res.message)
  2572. }
  2573. })
  2574. .catch(err => {
  2575. reject(err.message)
  2576. })
  2577. })
  2578. },
  2579. // 跳至收费页面
  2580. toCharge(form) {
  2581. if (!form.patientRegisterNo) {
  2582. this.$message.warning({ showClose: true, message: "请先保存人员信息!" })
  2583. return
  2584. }
  2585. if (form.completeFlag == '0') {
  2586. this.$message.warning({ showClose: true, message: "预登记的人员不可执行此操作!" })
  2587. return
  2588. }
  2589. this.getAsb(form.id)
  2590. .then(() => {
  2591. let chargeMoney = Number(0)
  2592. //支付方式,比如是0自费、2免费、1单位支付
  2593. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  2594. if (e.payTypeFlag == '0') chargeMoney += Number(e.total)
  2595. });
  2596. if (chargeMoney == 0) {
  2597. this.$message.warning({ showClose: true, message: '没有可收费或退费的记录!' })
  2598. } else {
  2599. //多次重复点击时,刷新处理
  2600. this.chargePatientRegisterNo = form.patientRegisterNo
  2601. //this.dataTransOpts.refresh.charge.S++
  2602. this.dialogWin.charge = true
  2603. this.dataTransOpts.refresh.charge.S++
  2604. }
  2605. })
  2606. .catch(err => {
  2607. this.$message.error(err.message)
  2608. })
  2609. },
  2610. // 收费申请
  2611. chargeRequest(form) {
  2612. if (!form.id) {
  2613. this.$message.warning({ showClose: true, message: "请先保存人员信息!" })
  2614. return
  2615. }
  2616. if (form.completeFlag == '0') {
  2617. this.$message.warning({ showClose: true, message: "预登记的人员不可执行此操作!" })
  2618. return
  2619. }
  2620. this.getAsb(form.id)
  2621. .then(() => {
  2622. let chargeMoney = Number(0)
  2623. //支付方式,比如是0自费、2免费、1单位支付
  2624. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  2625. if (e.payTypeFlag == '0') chargeMoney += Number(e.total)
  2626. });
  2627. if (chargeMoney == 0) {
  2628. this.$message.warning({ showClose: true, message: '没有可收费或退费的记录!' })
  2629. } else {
  2630. // 显示
  2631. this.dataTransOpts.refresh.charge.S++
  2632. this.dialogWin.AsbChargeRequest = true
  2633. }
  2634. })
  2635. .catch(err => {
  2636. this.$message.error(err.message)
  2637. })
  2638. },
  2639. // 保存立即发送收费申请
  2640. immediateToHisCharge(patientRegisterId) {
  2641. postapi('/api/app/registerasbitem/GetCanChargeAsbitemsByPatientRegisterId', { patientRegisterId })
  2642. .then(res => {
  2643. if (res.code > -1 && res.data.length > 0) {
  2644. let body = {
  2645. patientRegisterId,
  2646. registerCheckAsbitems: []
  2647. }
  2648. res.data.forEach(e => {
  2649. body.registerCheckAsbitems.push({ registerCheckAsbitemId: e.registerCheckAsbitemId })
  2650. });
  2651. // 向 His 或 其他第三方 推送收费申请
  2652. postapi("/api/app/ChargeRequest/Create", body)
  2653. .then(resCharge => {
  2654. if (resCharge.code > -1) {
  2655. this.dataTransOpts.refresh.patient_register.S++
  2656. }
  2657. })
  2658. }
  2659. })
  2660. .catch(error => {
  2661. this.$message.error({ showClose: true, message: error.message })
  2662. })
  2663. },
  2664. //关闭收费窗口时,刷新收费状态信息
  2665. closeDialogCharge() {
  2666. // this.prAsbOpraOpts.prAsbQuery++
  2667. this.dataTransOpts.refresh.patient_register.S++
  2668. // this.dataTransOpts.refresh.register_check_asbitem.D++
  2669. },
  2670. // 新增保存基本信息产生新的ID,等明细保存后,再更新表单form.id
  2671. refreshFormId() {
  2672. // console.log('refreshFormId', this.prAsbOpraOpts.formId)
  2673. this.form.id = this.prAsbOpraOpts.formId
  2674. this.prAsbOpraOpts.formId = '' //清空
  2675. /**/
  2676. // this.patientRegister.prList.push(res.data); //列表添加记录
  2677. this.patientRegister.patientRegisterId = this.form.id;
  2678. objCopy(this.form, this.patientRegister.patientRegisterRd);
  2679. //this.patientRegister.query.times++; 不在触发列表查询(换成局部刷新)放在窗口关闭事件中去
  2680. // let curRow = deepCopy(this.patientRegister.patientRegisterRd)
  2681. // curRow.index = this.patientRegister.prList.length
  2682. // this.patientRegister.prList.push(curRow)
  2683. },
  2684. // 显示职业病
  2685. btnOcc() {
  2686. if (!this.form.id) {
  2687. this.$message.warning({ showClose: true, message: '人员信息尚未保存!' })
  2688. return
  2689. }
  2690. this.dataTransOpts.plus.OccDisease++
  2691. this.dialogWin.OccDisease = true
  2692. },
  2693. // 获取接害因素 + 检查类别 的组合项目 后,刷新当前组合项目
  2694. changeOccPosionOrCheckType() {
  2695. this.getOccAsbitems().then(res => {
  2696. let lfind = 0
  2697. for (let i = this.dataTransOpts.tableM.register_check_asbitem.length - 1; i >= 0; i--) {
  2698. let e = this.dataTransOpts.tableM.register_check_asbitem[i];
  2699. if (e.isCharge == 'Y' || e.checkCompleteFlag != '0') {
  2700. continue
  2701. } else {
  2702. // 已登记的项目 在 this.occAsbitems 中,则不删除 (如果删除的话,条码会变)
  2703. lfind = arrayExistObj(this.occAsbitems, 'id', e.asbitemId)
  2704. if (lfind == -1) this.dataTransOpts.tableM.register_check_asbitem.splice(i, 1)
  2705. }
  2706. }
  2707. lfind = 0
  2708. let payTypeFlag = '1'; //职业病 默认单位支付
  2709. if (this.form.customerOrgId == this.dict.personOrgId) payTypeFlag = '0' //个人支付
  2710. this.occAsbitems.forEach(e => {
  2711. lfind = arrayExistObj(this.dataTransOpts.tableM.register_check_asbitem, 'asbitemId', e.id)
  2712. if (lfind == -1) {
  2713. this.dataTransOpts.tableM.register_check_asbitem.push({
  2714. asbitemId: e.id,
  2715. asbitemName: e.displayName,
  2716. patientRegisterId: this.form.id,
  2717. standardPrice: e.price,
  2718. chargePrice: e.ocCheckTypeDetailPrice,
  2719. payTypeFlag,
  2720. isCharge: "N",
  2721. checkCompleteFlag: '0',
  2722. discount: e.price == 0 ? 100 : Math.floor(10000 * e.ocCheckTypeDetailPrice / e.price) / 100,
  2723. amount: e.ocCheckTypeDetailAmount,
  2724. total: e.ocCheckTypeDetailAmount * e.ocCheckTypeDetailPrice,
  2725. standTotal: e.ocCheckTypeDetailAmount * e.price
  2726. })
  2727. }
  2728. });
  2729. })
  2730. },
  2731. // 获取接害因素 + 检查类别 的组合项目
  2732. getOccAsbitems() {
  2733. return new Promise((resolve, reject) => {
  2734. if (!this.form.ocCheckTypeId || this.form.poisonIds.length == 0) {
  2735. this.occAsbitems = []
  2736. resolve(this.occAsbitems)
  2737. } else {
  2738. let body = {
  2739. ocCheckTypeId: this.form.ocCheckTypeId,
  2740. poisonIds: this.form.poisonIds
  2741. }
  2742. postapi('/api/app/OcCheckTypeDetail/GetOcCheckTypeDetailByOcCheckTypeIdAndPoisonId', body).then(res => {
  2743. if (res.code > -1) {
  2744. this.occAsbitems = res.data
  2745. resolve(this.occAsbitems)
  2746. } else {
  2747. reject(res.message)
  2748. }
  2749. })
  2750. .catch(err => {
  2751. reject(err)
  2752. })
  2753. }
  2754. })
  2755. },
  2756. // 显示预约
  2757. btnWebBooking() {
  2758. this.dataTransOpts.tableS.appoint_patient_register = {}
  2759. this.dataTransOpts.tableM.appoint_register_asbitem = []
  2760. this.dataTransOpts.tableS.appoint_patient_register = {}
  2761. this.dataTransOpts.tableM.appoint_register_asbitem = []
  2762. this.dataTransOpts.plus.WebBooking++
  2763. this.dialogWin.WebBooking = true
  2764. },
  2765. // 显示预约
  2766. btnWebBookingMzak() {
  2767. this.dataTransOpts.tableS.appoint_patient_register = {}
  2768. this.dataTransOpts.tableM.appoint_register_asbitem = []
  2769. this.dataTransOpts.tableS.appoint_patient_register = {}
  2770. this.dataTransOpts.tableM.appoint_register_asbitem = []
  2771. this.dataTransOpts.plus.WebBookingMzak++
  2772. this.dialogWin.WebBookingMzak = true
  2773. },
  2774. // 关闭预约窗口
  2775. close_dialogWin_WebBooking() {
  2776. // console.log('this.dataTransOpts.tableS.appoint_patient_register',this.dataTransOpts.tableS.appoint_patient_register)
  2777. // console.log('this.dataTransOpts.tableM.appoint_register_asbitem',this.dataTransOpts.tableM.appoint_register_asbitem)
  2778. // 没有选中网上预约记录,直接返回,不做任何处理
  2779. let appoint_patient_register = this.dataTransOpts.tableS.appoint_patient_register
  2780. if (!appoint_patient_register.appointPatientRegisterId) return
  2781. // 新增 (个人预约只登记个人的)
  2782. this.dataTransOpts.tableS.patient_register.id = ''
  2783. this.preCustomerOrgId = this.dict.personOrgId
  2784. this.patientRegister.query.customerOrgId = this.dict.personOrgId
  2785. this.patientRegister.query.CustomerOrgParentId = this.dict.personOrgId
  2786. this.form.customerOrgId = [this.dict.personOrgId] //单位编号 默认个人
  2787. this.form.customerOrgParentId = this.dict.personOrgId
  2788. this.form.customerOrgRegisterId = "00000000-0000-0000-0000-000000000001" //默认单位体检次数
  2789. // "appointPatientRegisterId": "string",
  2790. // "personId": "string",
  2791. // "personName": "string",
  2792. // "idNo": "string",
  2793. // "sexId": "string",
  2794. // "sexName": "string",
  2795. // "maritalStatusId": "string",
  2796. // "maritalStatusName": "string",
  2797. // "customerOrgId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2798. // "customerOrgName": "string",
  2799. // "childCustomerOrgName": "string",
  2800. // "customerOrgGroupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2801. // "customerOrgGroupName": "string",
  2802. // "medicalPackageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2803. // "medicalPackageName": "string",
  2804. // "completeFlag": "string",
  2805. // "appointDate": "2024-06-09T11:46:34.962Z",
  2806. // "remark": "string",
  2807. // "medicalCenterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2808. // "customerOrgRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2809. // "pregnantFlag": "string",
  2810. // "pregnantFlagName": "string",
  2811. // "height": 0,
  2812. // "weight": 0
  2813. this.initFormData(this.dataTransOpts.tableS.patient_register.id)
  2814. .then(() => {
  2815. delete appoint_patient_register.medicalCenterId
  2816. Object.assign(this.form, appoint_patient_register,
  2817. {
  2818. patientName: appoint_patient_register.personName,
  2819. completeFlag: '1',
  2820. }
  2821. )
  2822. console.log('this.form', JSON.stringify(this.form))
  2823. // 明细必填项
  2824. // "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2825. // "asbitemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2826. // "standardPrice": 0,
  2827. // "chargePrice": 0,
  2828. // "payTypeFlag": "string",
  2829. // "isCharge": "string",
  2830. // "amount": 0
  2831. // 预约明细数据
  2832. // "appointRegisterAsbitemId": "00000000-0000-0000-0000-000000000000",
  2833. // "asbitemId": "3a126b34-f6f0-56a1-e899-a092874acde7",
  2834. // "asbitemName": "腹部平片(立位)",
  2835. // "itemTypeId": "3a126ac6-2fbf-ca50-82a4-73dcc5a5028b",
  2836. // "itemTypeName": "放射科",
  2837. // "appointPatientRegisterId": "3a12ebf4-565a-dbc4-4f2d-d72cd3050cab",
  2838. // "standardPrice": 45.00,
  2839. // "chargePrice": 30.50,
  2840. // "payTypeFlag": "\u0000",
  2841. // "isCharge": "N",
  2842. // "amount": 1,
  2843. // "isInMedicalPackage": "N",
  2844. // "itemTypeDisplayOrder": 28,
  2845. // "displayOrder": 1
  2846. this.dataTransOpts.tableM.register_check_asbitem = deepCopy(this.dataTransOpts.tableM.appoint_register_asbitem)
  2847. this.changeIdNo() // 触发身份证查询档案号
  2848. })
  2849. },
  2850. // 关闭预约窗口--人寿 (团检、个人都可以)
  2851. close_dialogWin_WebBookingMzak() {
  2852. // console.log('this.dataTransOpts.tableS.appoint_patient_register',this.dataTransOpts.tableS.appoint_patient_register)
  2853. // console.log('this.dataTransOpts.tableM.appoint_register_asbitem',this.dataTransOpts.tableM.appoint_register_asbitem)
  2854. // 没有选中网上预约记录,直接返回,不做任何处理
  2855. let appoint_patient_register = this.dataTransOpts.tableS.appoint_patient_register
  2856. if (!appoint_patient_register.thirdBookingId) return
  2857. this.dataTransOpts.tableS.patient_register.id = ''
  2858. // this.preCustomerOrgId = this.dict.personOrgId
  2859. this.patientRegister.query.customerOrgId = appoint_patient_register.customerOrgId
  2860. this.patientRegister.query.CustomerOrgParentId = appoint_patient_register.customerOrgId
  2861. this.form.customerOrgId = [appoint_patient_register.customerOrgId] //单位编号 默认个人
  2862. let customerOrgParentId = ''
  2863. this.getParentCustomerOrgId(appoint_patient_register.customerOrgId)
  2864. .then(res => {
  2865. customerOrgParentId = res
  2866. this.form.customerOrgParentId = customerOrgParentId
  2867. return this.initFormData(this.dataTransOpts.tableS.patient_register.id)
  2868. })
  2869. .then(() => {
  2870. // this.form.customerOrgName = customerOrgParentId
  2871. // "appointPatientRegisterId": "string",
  2872. // "personId": "string",
  2873. // "personName": "string",
  2874. // "idNo": "string",
  2875. // "sexId": "string",
  2876. // "sexName": "string",
  2877. // "maritalStatusId": "string",
  2878. // "maritalStatusName": "string",
  2879. // "customerOrgId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2880. // "customerOrgName": "string",
  2881. // "childCustomerOrgName": "string",
  2882. // "customerOrgGroupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2883. // "customerOrgGroupName": "string",
  2884. // "medicalPackageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2885. // "medicalPackageName": "string",
  2886. // "completeFlag": "string",
  2887. // "appointDate": "2024-06-09T11:46:34.962Z",
  2888. // "remark": "string",
  2889. // "medicalCenterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2890. // "customerOrgRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2891. // "pregnantFlag": "string",
  2892. // "pregnantFlagName": "string",
  2893. // "height": 0,
  2894. // "weight": 0
  2895. delete appoint_patient_register.medicalCenterId
  2896. Object.assign(this.form, appoint_patient_register,
  2897. {
  2898. patientName: appoint_patient_register.personName,
  2899. completeFlag: '1',
  2900. }
  2901. )
  2902. // 人寿接口,甲方需求:岗位数据导入人员类别
  2903. // personnelTypeId --> positionName
  2904. // dict.personnelType" :key="item.id" :label="item.displayName"
  2905. let lfind = arrayExistObj(this.dict.personnelType, 'displayName', appoint_patient_register.positionName)
  2906. if (lfind > -1) this.form.personnelTypeId = this.dict.personnelType[lfind].id
  2907. console.log('this.form', JSON.stringify(this.form))
  2908. // 明细必填项
  2909. // "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2910. // "asbitemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2911. // "standardPrice": 0,
  2912. // "chargePrice": 0,
  2913. // "payTypeFlag": "string",
  2914. // "isCharge": "string",
  2915. // "amount": 0
  2916. // 预约明细数据
  2917. // "appointRegisterAsbitemId": "00000000-0000-0000-0000-000000000000",
  2918. // "asbitemId": "3a126b34-f6f0-56a1-e899-a092874acde7",
  2919. // "asbitemName": "腹部平片(立位)",
  2920. // "itemTypeId": "3a126ac6-2fbf-ca50-82a4-73dcc5a5028b",
  2921. // "itemTypeName": "放射科",
  2922. // "appointPatientRegisterId": "3a12ebf4-565a-dbc4-4f2d-d72cd3050cab",
  2923. // "standardPrice": 45.00,
  2924. // "chargePrice": 30.50,
  2925. // "payTypeFlag": "\u0000",
  2926. // "isCharge": "N",
  2927. // "amount": 1,
  2928. // "isInMedicalPackage": "N",
  2929. // "itemTypeDisplayOrder": 28,
  2930. // "displayOrder": 1
  2931. this.dataTransOpts.tableM.register_check_asbitem = deepCopy(this.dataTransOpts.tableM.appoint_register_asbitem)
  2932. // 触发分组 项目
  2933. if (this.form.customerOrgGroupId) this.changeCustomerOrgGroupId()
  2934. this.changeIdNo() // 触发身份证查询档案号
  2935. })
  2936. },
  2937. btnLabel() {
  2938. if (!this.form.id) {
  2939. this.$message.warning({ showClose: true, message: '人员信息尚未保存!' })
  2940. return
  2941. }
  2942. this.dataTransOpts.refresh.lis_request.M++ //触发检验条码刷新
  2943. this.dataTransOpts.refresh.register_check.M++ //触发检查条码刷新
  2944. this.dialogWin.Label = true
  2945. },
  2946. // 复制分组时,设置当前顶级单位及体检次数
  2947. setCurParentOrgId() {
  2948. // 获取顶级单位
  2949. console.log('setCurParentOrgId_this.form.customerOrgId', this.form.customerOrgId)
  2950. this.getParentCustomerOrgId(this.form.customerOrgId)
  2951. .then(res => {
  2952. if (res) {
  2953. if (res != this.dict.personOrgId) {
  2954. this.customerOrgId = res
  2955. // 获取体检次数
  2956. getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${res}`)
  2957. .then(res => {
  2958. if (res.code > -1) {
  2959. this.customerOrgRegisterList = res.data
  2960. if (res.data.length > 0) {
  2961. this.customerOrgRegister = res.data[res.data.length - 1]
  2962. this.getCustomerOrgGroupCopy(this.customerOrgRegister.id)
  2963. }
  2964. }
  2965. })
  2966. }
  2967. }
  2968. })
  2969. },
  2970. //复制分组
  2971. btnCopyGroup() {
  2972. console.log('this.customerOrgGroup', this.customerOrgGroup)
  2973. this.customerOrgRegisterList = [];
  2974. this.customerOrgRegister = {};
  2975. this.customerOrgGroups = [];
  2976. // 首次打开 复制分组 页面时,需获取顶级单位信息
  2977. if (this.customerOrgAll.length == 0) {
  2978. getapi("/api/app/customer-org/parent-all")
  2979. .then(res => {
  2980. if (res.code > -1) {
  2981. this.customerOrgAll = res.data
  2982. this.customerOrgDisp = res.data
  2983. this.groupVisble = true
  2984. // 复制分组时,设置当前顶级单位及体检次数
  2985. this.setCurParentOrgId()
  2986. }
  2987. })
  2988. } else {
  2989. // 复制分组时,设置当前顶级单位及体检次数
  2990. this.setCurParentOrgId()
  2991. this.groupVisble = true
  2992. }
  2993. },
  2994. //选中分组
  2995. async groupRowClick(row) {
  2996. this.curGroupId = row.id
  2997. this.groupAsbitems = []
  2998. try {
  2999. let res = await getapi(`/api/app/customerorggroupdetail/getcustomerorggroupdetailinasbitem?CustomerOrgGroupId=${row.id}`)
  3000. if (res.code != -1) this.groupAsbitems = res.data
  3001. } catch (error) {
  3002. console.log(error)
  3003. }
  3004. },
  3005. //双击选分组,并确认复制
  3006. async groupRowDblclick(row) {
  3007. await this.groupRowClick(row)
  3008. this.copyGroup()
  3009. },
  3010. //复制分组(确认选中分组)
  3011. copyGroup() {
  3012. if (!this.curGroupId) {
  3013. this.$message.warning({ showClose: true, message: "请先选择要复制的套餐!" })
  3014. return
  3015. }
  3016. console.log('this.packageAsbitems', this.groupAsbitems)
  3017. this.addAbs(deepCopy(this.groupAsbitems))
  3018. this.groupVisble = false
  3019. },
  3020. //复制套餐
  3021. btnCopyMedicalPackage() {
  3022. this.medicalPackageVisble = true
  3023. },
  3024. //选中套餐
  3025. packageRowClick(row) {
  3026. return new Promise((resolve, reject) => {
  3027. this.curPackageId = row.id
  3028. this.packageAsbitems = []
  3029. postapi('/api/app/medicalpackagedetail/getmedicalpackageinasbitem', { medicalPackageId: row.id })
  3030. .then(res => {
  3031. if (res.code > -1) {
  3032. this.packageAsbitems = res.data
  3033. resolve()
  3034. } else {
  3035. reject(res.message)
  3036. }
  3037. })
  3038. .catch(err => {
  3039. reject(err.message)
  3040. })
  3041. })
  3042. },
  3043. //双击选套餐,并确认复制
  3044. rowDblclick(row) {
  3045. this.packageRowClick(row)
  3046. .then(res => {
  3047. this.copyMedicalPackage()
  3048. })
  3049. },
  3050. //复制套餐(确认选中套餐)
  3051. copyMedicalPackage() {
  3052. if (!this.curPackageId) {
  3053. this.$message.warning({ showClose: true, message: "请先选择要复制的套餐!" })
  3054. return
  3055. }
  3056. console.log('this.packageAsbitems', this.packageAsbitems)
  3057. this.addAbs(deepCopy(this.packageAsbitems))
  3058. this.medicalPackageVisble = false
  3059. },
  3060. // 过滤体检单位
  3061. filterMethodOrg(keyWords) {
  3062. if (keyWords) {
  3063. this.customerOrgDisp = [];
  3064. this.customerOrgAll.forEach((item) => {
  3065. if (
  3066. item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > -1 ||
  3067. item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > -1
  3068. // || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  3069. ) {
  3070. this.customerOrgDisp.push(item);
  3071. }
  3072. });
  3073. } else {
  3074. this.customerOrgDisp = deepCopy(this.customerOrgAll);
  3075. }
  3076. },
  3077. //选择单位
  3078. changeCustomerOrg(v) {
  3079. if (!v) {
  3080. this.customerOrgRegisterList = [];
  3081. this.customerOrgRegister = {};
  3082. this.customerOrgGroups = [];
  3083. } else {
  3084. getapi(
  3085. `/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${v}`
  3086. ).then((res) => {
  3087. if (res.code != -1) {
  3088. this.customerOrgRegisterList = res.data;
  3089. if (res.data.length > 0) {
  3090. this.customerOrgRegister = res.data[res.data.length - 1];
  3091. this.getCustomerOrgGroupCopy(this.customerOrgRegister.id);
  3092. }
  3093. }
  3094. });
  3095. }
  3096. },
  3097. //选择体检次数
  3098. changeTimes(v) {
  3099. this.getCustomerOrgGroup(v.id);
  3100. },
  3101. //获取体检次数下的分组
  3102. getCustomerOrgGroupCopy(customerOrgRegisterId) {
  3103. // this.isDrag = false;
  3104. // objCopy(this.formInit, this.form);
  3105. // this.form.customerOrgRegisterId = customerOrgRegisterId;
  3106. this.customerOrgGroups = [];
  3107. getapi(
  3108. `/api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${customerOrgRegisterId}`
  3109. ).then((res) => {
  3110. if (res.code != -1) {
  3111. this.customerOrgGroups = res.data;
  3112. this.customerOrgGroups.forEach((e) => {
  3113. e.customerOrgRegisterId = customerOrgRegisterId;
  3114. });
  3115. }
  3116. });
  3117. },
  3118. handleRowClassName({ row, rowIndex }) {
  3119. // highLightBg 为 'selected'的高亮
  3120. //console.log(rowIndex, row)
  3121. //return row.highLightBg == 'selected' ? 'high-light-bg' : '';
  3122. if (row.choosed) {
  3123. return 'current-row';
  3124. } else {
  3125. return '';
  3126. }
  3127. },
  3128. // 添加组合项目
  3129. ///api/app/register-asbitem/many/3fa85f64-5717-4562-b3fc-2c963f66afa6'
  3130. addAbs(asbItemChoosed) {
  3131. if (asbItemChoosed.length < 1) {
  3132. this.$message.warning({ showClose: true, message: "该套餐或分组下无可复制的组合项目" })
  3133. return
  3134. }
  3135. //性别、年龄判断
  3136. // "displayName": "身高体重",
  3137. // "shortName": "哈f哈",
  3138. // "forSexId": "F",
  3139. // "itemTypeId": "3a0b16de-75b9-c910-c61b-844709a88940",
  3140. // "price": 0,
  3141. console.log('asbItemChoosed.length', asbItemChoosed.length)
  3142. let unChecks = [] //不适配项目名称
  3143. for (let i = 0; i < asbItemChoosed.length; i++) {
  3144. if (this.form.sexId == 'U') break //未选性别时,无需判断组合项目性别限制
  3145. if (asbItemChoosed[i].forSexId == 'A') continue
  3146. if (asbItemChoosed[i].forSexId != this.form.sexId) {
  3147. unChecks.push(asbItemChoosed[i].displayName)
  3148. asbItemChoosed[i].unCheck = true
  3149. }
  3150. }
  3151. if (unChecks.length > 0) {
  3152. this.$message.warning({ showClose: true, message: `所选项目:${unChecks.toString()},不适合当前人员性别` })
  3153. if (asbItemChoosed.length == unChecks.length) return
  3154. }
  3155. let payTypeFlag = '0' // 0: 个人,1:单位,2:免费
  3156. if (this.form.customerOrgId != this.dict.personOrgId) payTypeFlag = '1'
  3157. asbItemChoosed.forEach(e => {
  3158. if (!e.unCheck) {
  3159. // 未在已选列表中,才选择添加
  3160. let lfind = arrayExistObj(this.dataTransOpts.tableM.register_check_asbitem, 'asbitemId', e.id)
  3161. if (lfind < 0) {
  3162. let pojo = {
  3163. asbitemId: e.id,
  3164. asbitemName: e.displayName,
  3165. patientRegisterId: this.form.id,
  3166. standardPrice: e.price,
  3167. chargePrice: e.price,
  3168. payTypeFlag,
  3169. isCharge: "N",
  3170. checkCompleteFlag: '0',
  3171. discount: 100,
  3172. amount: 1,
  3173. total: e.price,
  3174. }
  3175. this.dataTransOpts.tableM.register_check_asbitem.push(pojo)
  3176. }
  3177. }
  3178. });
  3179. // 刷新左侧待选组合项目
  3180. this.changeItemType(deepCopy(this.dataTransOpts.copyGroup.itemTypeIds))
  3181. },
  3182. //项目类别过滤 组合项目,未过滤已选择的组合项目
  3183. changeItemType(data) {
  3184. //console.log('getAsbItemByItemType', typeof this.itemTypeIds, this.itemTypeIds)
  3185. this.dataTransOpts.copyGroup.itemTypeIds = data
  3186. let asbItemAll = deepCopy(this.dataTransOpts.copyGroup.asbItemAll)
  3187. let lv = "";
  3188. if (typeof this.dataTransOpts.copyGroup.itemTypeIds == "object") {
  3189. if (this.dataTransOpts.copyGroup.itemTypeIds.length > 0) lv = this.dataTransOpts.copyGroup.itemTypeIds[this.dataTransOpts.copyGroup.itemTypeIds.length - 1];
  3190. }
  3191. if (lv) {
  3192. this.dataTransOpts.copyGroup.asbItem = arrayFilter(asbItemAll, "itemTypeId", lv);
  3193. } else {
  3194. this.dataTransOpts.copyGroup.asbItem = deepCopy(asbItemAll);
  3195. }
  3196. arrayReduce(this.dataTransOpts.copyGroup.asbItem, this.dataTransOpts.tableM.register_check_asbitem, "id=asbitemId");
  3197. //console.log('this.dataTransOpts.copyGroup.asbItem',this.dataTransOpts.copyGroup.asbItem,this.dataTransOpts.tableM.register_check_asbitem)
  3198. },
  3199. //回车替代tab键
  3200. enterToTab() {
  3201. this.$nextTick(() => {
  3202. let inputs = document.querySelectorAll("form input"); //用数组可以读取多个标签的元素 //.inline-input
  3203. //// console.log('inputs',inputs);
  3204. // 为每个输入框添加键盘事件监听器
  3205. inputs.forEach((input, i) => {
  3206. input.addEventListener('keydown', (event) => {
  3207. // 如果按下的是回车键
  3208. // // console.log('data-ismultiline',input.getAttribute('data-ismultiline'));
  3209. if (event.keyCode === 13) {
  3210. // 阻止回车键的默认行为(换行)
  3211. event.preventDefault();
  3212. // 如果是身份证,则计算出生与年龄
  3213. let placeholder = input.getAttribute('placeholder')
  3214. if (placeholder == '身份证号') this.changeIdNo()
  3215. // 跳至下一个输入框
  3216. for (let j = i + 1; j < inputs.length; j++) {
  3217. if (inputs[j].getAttribute('disabled') != "disabled") {
  3218. inputs[j].focus();
  3219. break;
  3220. }
  3221. }
  3222. }
  3223. });
  3224. });
  3225. });
  3226. },
  3227. },
  3228. //监听事件
  3229. watch: {
  3230. //人员ID未切换换时 也可以强制刷新数据
  3231. "dataTransOpts.refresh.patient_register.S": {
  3232. // immediate: true,
  3233. handler(newVal, oldVal) {
  3234. // console.log(`watch 人员登记 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.patient_register.id}`);
  3235. if (newVal != oldVal) this.initFormData(this.dataTransOpts.tableS.patient_register.id)
  3236. }
  3237. },
  3238. //拍照触发
  3239. // "form.photo"(newVal, oldVal) {
  3240. // //// console.log('patientRegister.patientRegisterRd.id newVal:',newVal,' oldVal:',oldVal)
  3241. // if (newVal != oldVal) {
  3242. // this.getPeoplePhoto(newVal)
  3243. // }
  3244. // },
  3245. //修改单位触发
  3246. // "form.customerOrgId": {
  3247. // // immediate:true,
  3248. // // // deep:true,
  3249. // handler(newVal, oldVal) {
  3250. // //// console.log('patientRegister.patientRegisterRd.id newVal:',newVal,' oldVal:',oldVal)
  3251. // if (newVal != oldVal) {
  3252. // this.changeCustomerOrgId(newVal)
  3253. // }
  3254. // }
  3255. // },
  3256. // 从体检人员登记列表 点登记,触发
  3257. // 清空查询条件
  3258. "dataTransOpts.plus.clearPatientRegisterQuery": {
  3259. // immediate: true,
  3260. handler(newVal, oldVal) {
  3261. // console.log('从体检人员登记列表 点登记,触发', newVal, oldVal)
  3262. if (newVal != oldVal) {
  3263. this.preCustomerOrgId = this.patientRegister.query.customerOrgId
  3264. // console.log('this.preCustomerOrgId', this.preCustomerOrgId)
  3265. }
  3266. }
  3267. },
  3268. },
  3269. };
  3270. </script>
  3271. <style scoped>
  3272. ::v-deep .el-icon-search:before {
  3273. color: #00F;
  3274. }
  3275. ::v-deep .el-select-group__title {
  3276. font-size: 15px;
  3277. background-color: #EEEEEE;
  3278. color: black;
  3279. font-weight: 700;
  3280. }
  3281. .btn {
  3282. margin-top: 5px;
  3283. }
  3284. .commonbutton {
  3285. width: 100px;
  3286. }
  3287. .query {
  3288. margin-left: 10px;
  3289. }
  3290. .querySpan {
  3291. margin-right: 2px;
  3292. }
  3293. </style>