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.

1328 lines
48 KiB

3 years ago
2 years ago
2 years ago
2 years ago
2 years 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
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 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
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
3 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
3 years ago
2 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
3 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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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
3 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
2 years ago
2 years ago
2 years ago
2 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
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 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
3 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
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
2 years ago
2 years ago
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
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
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
3 years ago
2 years 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
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
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years 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
3 years ago
2 years 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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 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
2 years ago
2 years ago
  1. <template>
  2. <div style="display: flex">
  3. <div :style="'margin-left:5px;width:' + (window.pageWidth - 200 - 120 - 85) + 'px;'"
  4. @contextmenu.prevent="onContextmenu">
  5. <el-table :data="patientRegister.prList" border
  6. :height="window.pageHeight < 600 ? 172 : Math.floor((window.pageHeight - 342) * 2 / 3)" highlight-current-row
  7. @row-click="rowClick" size="small" @selection-change="handleSelectionChange" @cell-contextmenu="onCellRightClick"
  8. ref="info" :row-class-name="handleRowClassName" >
  9. <!-- 取消勾选改为选中
  10. <el-table-column type="selection" width="40"/>
  11. -->
  12. <el-table-column prop="completeFlag" label="体检进度" align="center">
  13. <template slot-scope="scope">
  14. <div>{{ ldddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}</div>
  15. </template>
  16. </el-table-column>
  17. <el-table-column prop="guidePrintTimes" label="打印" width="50" align="center">
  18. <template slot-scope="scope">
  19. <i class="el-icon-printer" v-if="scope.row.guidePrintTimes > 0" style="font-size: 24px;color: green;"></i>
  20. </template>
  21. </el-table-column>
  22. <el-table-column prop="isLock" label="锁住" width="50" align="center">
  23. <template slot-scope="scope">
  24. <div>{{ scope.row.isLock == "Y" ? "是" : "否" }}</div>
  25. </template>
  26. </el-table-column>
  27. <el-table-column prop="customerOrgParentName" label="单位" width="180">
  28. <template slot-scope="scope">
  29. <div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgParentName : scope.row.customerOrgName }}</div>
  30. </template>
  31. </el-table-column>
  32. <el-table-column prop="customerOrgName" label="部门" width="180">
  33. <template slot-scope="scope">
  34. <div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgName : "" }}</div>
  35. </template>
  36. </el-table-column>
  37. <el-table-column prop="patientName" label="姓名" width="80" align="center"/>
  38. <el-table-column prop="sexId" label="性别" width="50" align="center">
  39. <template slot-scope="scope">
  40. <div>{{ ldddw(dict.sex, "id", scope.row.sexId, "displayName") }}</div>
  41. </template>
  42. </el-table-column>
  43. <el-table-column prop="age" label="年龄" width="50" align="center"/>
  44. <el-table-column prop="patientRegisterNo" label="条码号" width="150" align="center"/>
  45. <el-table-column prop="patientNo" label="档案号" align="center"/>
  46. <el-table-column prop="medicalTimes" label="体检次数" width="80" align="center"></el-table-column>
  47. <el-table-column label="分组/套餐" width="150" align="center">
  48. <template slot-scope="scope">
  49. <div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId === dict.personOrgId">
  50. {{ ldddw(dict.medicalPackage, "id", scope.row.medicalPackageId, "displayName") }}
  51. </div>
  52. <div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId !== dict.personOrgId">
  53. {{ ldddw(dict.customerOrgGroupAll, "id", scope.row.customerOrgGroupId, "displayName") }}
  54. </div>
  55. </template>
  56. </el-table-column>
  57. <el-table-column prop="nationId" label="民族" width="50" align="center">
  58. <template slot-scope="scope">
  59. <div>
  60. {{ ldddw(dict.nation, "nationId", scope.row.nationId, "displayName") }}
  61. </div>
  62. </template>
  63. </el-table-column>
  64. <el-table-column prop="idNo" label="身份证" width="150" align="center"/>
  65. <el-table-column prop="birthDate" label="出生日期" width="80" align="center">
  66. <template slot-scope="scope">
  67. <div v-if="scope.row.birthDate">
  68. {{ lmoment(scope.row.birthDate, "yyyy-MM-DD") }}
  69. </div>
  70. </template>
  71. </el-table-column>
  72. <el-table-column prop="email" label="邮箱" width="180" />
  73. <el-table-column prop="mobileTelephone" label="手机" width="100" align="center"/>
  74. <el-table-column prop="telephone" label="电话" width="100" />
  75. <el-table-column prop="address" label="地址" width="300" />
  76. <el-table-column prop="medicalCardNo" label="体检卡号" />
  77. <el-table-column prop="jobCardNo" label="工卡号" />
  78. <el-table-column prop="maritalStatusId" label="婚姻状况" width="80" align="center">
  79. <template slot-scope="scope">
  80. <div>
  81. {{ ldddw(dict.maritalStatus, "id", scope.row.maritalStatusId, "displayName") }}
  82. </div>
  83. </template>
  84. </el-table-column>
  85. <el-table-column prop="medicalTypeId" label="体检类别">
  86. <template slot-scope="scope">
  87. <div v-if="scope.row.medicalTypeId !== dict.personOrgId">
  88. {{ ldddw(dict.medicalType, "id", scope.row.medicalTypeId, "displayName") }}
  89. </div>
  90. </template>
  91. </el-table-column>
  92. <el-table-column prop="personnelTypeId" label="人员类别">
  93. <template slot-scope="scope">
  94. <div v-if="scope.row.personnelTypeId !== dict.personOrgId">
  95. {{ ldddw(dict.personnelType, "id", scope.row.personnelTypeId, "displayName") }}
  96. </div>
  97. </template>
  98. </el-table-column>
  99. <el-table-column prop="jobPost" label="职务" />
  100. <el-table-column prop="jobTitle" label="职称" />
  101. <el-table-column prop="salesman" label="介绍人" />
  102. <el-table-column prop="isVip" label="是否VIP" width="80" align="center">
  103. <template slot-scope="scope">
  104. <div>{{ scope.row.isVip == "Y" ? "是" : "否" }}</div>
  105. </template>
  106. </el-table-column>
  107. <el-table-column prop="creatorName" label="登记人" align="center"/>
  108. <el-table-column prop="creationTime" label="登记日期" width="90" align="center">
  109. <template slot-scope="scope">
  110. <div>{{ lmoment(scope.row.creationTime, "yyyy-MM-DD") }}</div>
  111. </template>
  112. </el-table-column>
  113. <el-table-column prop="isUpload" label="是否上传" width="80" align="center">
  114. <template slot-scope="scope">
  115. <div>{{ scope.row.isUpload == "Y" ? "是" : "否" }}</div>
  116. </template>
  117. </el-table-column>
  118. <!--
  119. "sexHormoneTermId": "00000000-0000-0000-0000-000000000000",
  120. "interposeMeasure": null,
  121. "medicalConclusionId": "00000000-0000-0000-0000-000000000000",
  122. "reportPrintTimes": 0,
  123. "isMedicalStart": "N",
  124. "medicalStartDate": "6/28/2023",
  125. "isRecoverGuide": "N",
  126. "summaryDate": "",
  127. "summaryDoctor": null,
  128. "isAudit": "N",
  129. "auditDoctor": null,
  130. "auditDate": "",
  131. "isNameHide": "N",
  132. "isPhoneFollow": "N",
  133. "thirdInfo": null,
  134. "guidePrintTimes": null,
  135. "remark": null,
  136. "organizationUnitId": "00000000-0000-0000-0000-000000000000",
  137. "customerOrgRegisterId": "00000000-0000-0000-0000-000000000000",
  138. "lastModifierName": "",
  139. "lastModificationTime": null,
  140. "lastModifierId": null,
  141. "creatorId": null,
  142. "id": "3a0c196d-a6d0-37fe-5c32-4806bdc4530f"
  143. -->
  144. </el-table>
  145. <!-- 给合项目 基本信息 -->
  146. <el-tabs v-model="tabChoosed">
  147. <!-- 给合项目 -->
  148. <el-tab-pane label="已选组合项目" name="1">
  149. <PatientRegisterAsbItem />
  150. </el-tab-pane>
  151. </el-tabs>
  152. </div>
  153. <div style="margin-left: 10px;width:110px;">
  154. <div class="listBtn">
  155. <el-button type="" class="btnClass commonbutton" @click="add">人员登记</el-button>
  156. </div>
  157. <div class="listBtn">
  158. <el-button type="" class="btnClass commonbutton" @click="edit">编辑</el-button>
  159. </div>
  160. <div class="listBtn">
  161. <el-button type="" class="btnClass commonbutton" @click="del">删除</el-button>
  162. </div>
  163. <div class="listBtn">
  164. <el-button type="" class="btnClass commonbutton" @click="openCamera" icon="el-icon-camera">拍照</el-button>
  165. </div>
  166. <!--
  167. <div class="listBtn">
  168. <el-button type="" class="btnClass commonbutton">健康档案</el-button>
  169. </div>
  170. -->
  171. <div class="listBtn">
  172. <el-button type="" class="btnClass commonbutton" @click="btnGroupBatch">调整分组</el-button>
  173. </div>
  174. <div class="listBtn">
  175. <el-button type="" class="btnClass commonbutton" @click="asbBatch">调整项目</el-button>
  176. </div>
  177. <div class="listBtn">
  178. <el-button type="" class="btnClass commonbutton" @click="guidePrint('0001', false)">指引单打印</el-button>
  179. </div>
  180. <div class="listBtn">
  181. <el-button type="" class="btnClass commonbutton" @click="guidePrint('0001', true)">指引单预览</el-button>
  182. </div>
  183. <!--
  184. <div class="listBtn">
  185. <el-button type="" class="btnClass commonbutton" @click="rowSelected(patientRegister.prList)">选中</el-button>
  186. </div>
  187. -->
  188. </div>
  189. <!-- 体检人员登记 -->
  190. <el-dialog :title="patientRegister.patientRegisterId ? '体检人员--编辑' : '体检人员--新增'" :visible.sync="dialogVisible"
  191. :close-on-click-modal="false" fullscreen>
  192. <PatientRegisterEdit :formInitData="formInitData" :editTimes="editTimes" />
  193. </el-dialog>
  194. <!-- 拍照 -->
  195. <el-dialog title="拍照" :visible.sync="patientRegister.cameraVisble" width="400" height="800" :show-close="false"
  196. :append-to-body="true" :close-on-click-modal="false">
  197. <Camera :id="patientRegister.patientRegisterId" />
  198. </el-dialog>
  199. <!-- 指引单 -->
  200. <el-dialog title="指引单" :visible.sync="dialogGuide" width="400" height="800" :append-to-body="true"
  201. :close-on-click-modal="false">
  202. <div>{{ guideMsg }}</div>
  203. </el-dialog>
  204. <!-- 批量调整分组 -->
  205. <el-dialog title="批量调整分组" :visible.sync="dialogGroup" width="600px" height="800" :append-to-body="true"
  206. :close-on-click-modal="false">
  207. <div>
  208. <div>
  209. 批量调整分组只针对单位体检有效个人体检将忽略此操作不能调整已收费或已检的项目及已总检的体检人员
  210. </div>
  211. <div>
  212. <br /><span>分组</span>
  213. <el-select v-model="groupBatch.customerOrgGroupId" placeholder="请选择" filterable size="small">
  214. <el-option v-for="item in patientRegister.customerOrgGroup" :key="item.id" :label="item.displayName"
  215. :value="item.id" />
  216. </el-select>
  217. </div>
  218. <div>
  219. <br /><el-radio v-model="groupBatch.payTypeFlag" label="0">个人支付</el-radio>
  220. <br /><el-radio v-model="groupBatch.payTypeFlag" label="1">单位支付</el-radio>
  221. <br /><el-radio v-model="groupBatch.payTypeFlag" label="2">免费</el-radio>
  222. </div>
  223. <div>
  224. <br /><el-checkbox v-model="groupBatch.isReserveAddAsbitem">保留加做项目包括不属于原分组的没有设置分组的</el-checkbox>
  225. </div>
  226. </div>
  227. <span slot="footer" class="dialog-footer">
  228. <el-button type="primary" @click="groupBatchHandle"> </el-button>
  229. <el-button @click="dialogGroup = false"> </el-button>
  230. </span>
  231. </el-dialog>
  232. <!-- 批量调整项目 -->
  233. <el-dialog title="批量调整项目" :visible.sync="dialogAsbitem" width="600px" height="800" :append-to-body="true"
  234. :close-on-click-modal="false">
  235. <div>
  236. <div>
  237. 批量调整分组只针对单位体检有效个人体检将忽略此操作不能调整已收费或已检的项目及已总检的体检人员
  238. </div>
  239. <div>
  240. <br /><el-radio v-model="asbitemBatch.operate" label="add">增加项目</el-radio>
  241. <el-radio v-model="asbitemBatch.operate" label="del">删除项目</el-radio>
  242. </div>
  243. <div>
  244. <br /><el-checkbox v-model="asbitemBatch.isDeleteGroup"
  245. :disabled="asbitemBatch.operate == 'add' ? true : false">如果删除项目属于分组则删除体检记录信息的分组设置</el-checkbox>
  246. </div>
  247. <div>
  248. <br /><span>直接录入</span>
  249. <el-select v-model="asbitemBatch.asbItemId" placeholder="快速选择组合项目" size="small" filterable clearable remote
  250. :remote-method="remoteMethod" @change="quickChoosedAsb" default-first-option
  251. style="width:150px;text-align: left;padding-right: 15px;">
  252. <el-option v-for="item in quickAsb" :key="item.id" :value="item.id" :label="item.displayName" />
  253. </el-select>
  254. </div>
  255. <div style="display: flex;margin-top: 2px;">
  256. <div style="width:480px;">
  257. <el-table :data="asbitemBatch.asbitemsTemp" height="240" width="100%" show-summary @row-dblclick="removeAbs"
  258. size="small" @row-click="rowClickaAbitemCurr" border>
  259. <el-table-column label="组合项目" width="150" prop="asbitemName" />
  260. <el-table-column label="数量" prop="amount" width="60">
  261. <template slot-scope="scope">
  262. <el-input type="number" v-model="scope.row.amount" size="small"
  263. :disabled="asbitemBatch.operate == 'del' ? true : false" />
  264. </template>
  265. </el-table-column>
  266. <el-table-column label="实收价格" prop="chargePrice" width="90">
  267. <template slot-scope="scope">
  268. <el-input type="number" v-model="scope.row.chargePrice" size="small"
  269. :disabled="asbitemBatch.operate == 'del' ? true : false" />
  270. </template>
  271. </el-table-column>
  272. <el-table-column label="支付方式" prop="payTypeFlag" width="120">
  273. <template slot-scope="scope">
  274. <el-select v-model="scope.row.payTypeFlag" size="small"
  275. :disabled="asbitemBatch.operate == 'del' ? true : false">
  276. <el-option v-for="item in dict.payType" :key="item.id" :label="item.displayName" :value="item.id" />
  277. </el-select>
  278. </template>
  279. </el-table-column>
  280. </el-table>
  281. </div>
  282. <div style="display: block; width: 110px; margin-left: 10px;">
  283. <div style="margin-top: 5px;">
  284. <el-button type="danger" @click="asbitemDel(1)" style="width: 100px;">删除</el-button>
  285. </div>
  286. <div style="margin-top: 5px;">
  287. <el-button type="danger" @click="asbitemDel(0)" style="width: 100px;">删除全部</el-button>
  288. </div>
  289. <div style="margin-top: 5px;">
  290. <el-button type="primary" @click="changePayTypeFlag('0')" style="width: 100px;">全个人支付</el-button>
  291. </div>
  292. <div style="margin-top: 5px;">
  293. <el-button type="primary" @click="changePayTypeFlag('1')" style="width: 100px;">全单位支付</el-button>
  294. </div>
  295. <div style="margin-top: 5px;">
  296. <el-button type="primary" @click="changePayTypeFlag('2')" style="width: 100px;">全赠送</el-button>
  297. </div>
  298. </div>
  299. </div>
  300. </div>
  301. <span slot="footer" class="dialog-footer">
  302. <el-button type="primary" @click="asbitemBatchHandle"> </el-button>
  303. <el-button @click="dialogAsbitem = false"> </el-button>
  304. </span>
  305. </el-dialog>
  306. <!-- 通用进度条 -->
  307. <el-dialog title="数据处理中……" :visible.sync="elProgress.display" width="600px" height="400"
  308. :show-close="false" :close-on-click-modal="false" :append-to-body="true">
  309. <ElProgressOCX />
  310. </el-dialog>
  311. </div>
  312. </template>
  313. <script>
  314. import moment from "moment";
  315. import { mapState, mapActions } from "vuex";
  316. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  317. import { dddw, objCopy, arrayReduce, arrayExistObj, deepCopy } from "@/utlis/proFunc";
  318. import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue";
  319. import Camera from "../../components/patientRegister/Camera.vue";
  320. import PatientRegisterAsbItem from "../../components/patientRegister/patientRegisterAsbItem.vue";
  321. import ElProgressOCX from "../../components/report/ElProgressOCX.vue";
  322. export default {
  323. components: {
  324. PatientRegisterEdit,
  325. Camera,
  326. PatientRegisterAsbItem,
  327. ElProgressOCX,
  328. },
  329. data() {
  330. return {
  331. startPoint: -1,// 多选起点 -1 表示选择
  332. endPoint: -1,// 多选终点 -1 表示选择
  333. multipleSelection: [], //选中的数据列表
  334. dialogVisible: false,
  335. dialogCamera: false,
  336. dialogGuide: false,
  337. guideMsg: 'guideMsg',
  338. tabChoosed: "1",
  339. formInitData: {}, //体检登记初始表单数据
  340. editTimes: 0,
  341. rClickRow: null, //右击的行
  342. rClickColumn: null, //右击的列(预留)
  343. dialogGroup: false,
  344. groupBatch: {
  345. patientRegisterId: null,
  346. customerOrgGroupId: null,
  347. payTypeFlag: "1", //0:个人付费,1:单位付费 2:免费
  348. isReserveAddAsbitem: true, //是否保留加做项目
  349. },
  350. dialogAsbitem: false,
  351. asbitemBatch: {
  352. operate: 'add',
  353. isDeleteGroup: false,
  354. asbItemId: '',
  355. asbitemsTemp: [], //删除或增加项目临时用
  356. asbitemCurr: {}, //当前选中要删除的项目(批量调整)
  357. },
  358. quickAsb: [], //可供快速选择的组合项目
  359. };
  360. },
  361. created() {
  362. },
  363. //挂载完成
  364. mounted() {
  365. this.quickAsb = this.dict.asbItemAll;
  366. },
  367. computed: {
  368. ...mapState(["window", "dict","elProgress","patientRegister", "customerOrg"]),
  369. },
  370. methods: {
  371. ...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
  372. handleRowClassName({ row, rowIndex }) {
  373. // highLightBg 为 'selected'的高亮
  374. //console.log(rowIndex, row)
  375. //return row.highLightBg == 'selected' ? 'high-light-bg' : '';
  376. if (row.choosed) {
  377. return 'current-row';
  378. } else {
  379. return '';
  380. }
  381. },
  382. rowSelected(rows) {
  383. rows.forEach(e => {
  384. this.$refs['info'].toggleRowSelection(e, true);
  385. })
  386. },
  387. // 打印指引单(isPreview)
  388. async guidePrint(ReportCode, isPreview) {
  389. if(!this.$peisAPI) {
  390. this.$message.info("此功能,需要在壳客户端才可运行!")
  391. return
  392. }
  393. let token = localStorage.getItem('token');
  394. let user = localStorage.getItem('user');
  395. let toOutShell = {
  396. ReportCode, token,
  397. preViewCanPrint: 'N',
  398. Parameters: [
  399. { Name: 'printer', Value: user },
  400. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  401. ],
  402. };
  403. let lfind = -1;
  404. if (this.multipleSelection.length < 1) {
  405. this.$message.info("请勾选要打印指引单的人员记录!");
  406. return;
  407. }
  408. if (isPreview) {
  409. //
  410. //this.multipleSelection.forEach((item,index) =>{
  411. postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.multipleSelection[0].id}`)
  412. .then((res) => {
  413. if (res.code != -1) {
  414. toOutShell.ReportTable = res.data;
  415. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  416. return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  417. }
  418. })
  419. .catch(err => {
  420. this.$message.warning(err);
  421. });
  422. // });
  423. } else {
  424. this.multipleSelection.forEach((item, index) => {
  425. postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${item.id}`)
  426. .then((res) => {
  427. if (res.code != -1) {
  428. toOutShell.ReportTable = res.data;
  429. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  430. return this.$peisAPI.print(JSON.stringify(toOutShell));
  431. }
  432. })
  433. .then(res => {
  434. if (res.toLowerCase() == 'success') {
  435. //更新打印次数
  436. return postapi('api/app/patientregister/updatepatientregisterguideprinttimesmany', [item.id])
  437. }
  438. })
  439. .then(res => {
  440. if (res.code != -1) {
  441. lfind = arrayExistObj(this.patientRegister.prList, 'id', item.id)
  442. if (lfind > -1) {
  443. if (this.patientRegister.prList[lfind].guidePrintTimes) {
  444. this.patientRegister.prList[lfind].guidePrintTimes = Number(this.patientRegister.prList[lfind].guidePrintTimes) + 1;
  445. } else {
  446. this.patientRegister.prList[lfind].guidePrintTimes = 1;
  447. }
  448. }
  449. }
  450. })
  451. .catch(err => {
  452. this.$message.warning(err);
  453. });
  454. });
  455. }
  456. },
  457. handleSelectionChange(rows) {
  458. //this.multipleSelection = rows;
  459. //console.log('this.multipleSelection',this.multipleSelection)
  460. rows.forEach(item => {
  461. item.highLightBg = 'selected';
  462. });
  463. // 取消全选
  464. if (!rows.length) {
  465. this.patientRegister.prList.forEach(item => {
  466. item.highLightBg = '';
  467. });
  468. }
  469. this.multipleSelection = JSON.parse(JSON.stringify(rows));
  470. },
  471. //获取单位分组 /api/app/customer-org-group/in-customer-org-id/3a0c0444-d7a0-871f-4074-19faf1655caf
  472. getCustomerOrgGroup(customerOrgld) {
  473. getapi(`/api/app/customer-org-group/in-customer-org-id/${customerOrgld}`)
  474. .then((res) => {
  475. console.log("getCustomerOrgGroup", res.data);
  476. if (res.code == 1) {
  477. this.patientRegister.customerOrgGroup = res.data;
  478. }
  479. });
  480. },
  481. //点击体检次数行
  482. rowClick(row) {
  483. this.patientRegister.photo = ""; //清除照片缓存
  484. this.patientRegister.patientRegisterId = row.id;
  485. this.patientRegister.photo = row.photo || '/pic/Photo.jpg';
  486. this.patientRegister.patientRegisterRd = row;
  487. this.patientRegister.query.customerOrgParentId = row.customerOrgParentId;
  488. this.patientRegister.customerOrgGroupChange = 0; //控制体检列表记录切换时,0 无需触发更换分组操作
  489. this.patientRegister.medicalPackageChange = 0; //控制体检列表记录切换时,0 无需触发更换套餐操作
  490. this.getCustomerOrgGroup(row.customerOrgParentId);
  491. this.dict.asbItem = [...this.dict.asbItemAll]
  492. this.getPatientRegisterAbs(row.id);
  493. console.log('this.patientRegister.prList',this.window, this.patientRegister.prList)
  494. // 按住了shift键
  495. if (this.window.shift) {
  496. //清除所有选择
  497. this.patientRegister.prList.forEach(e => {
  498. e.choosed = false;
  499. return e
  500. });
  501. if (this.startPoint == - 1) {
  502. this.patientRegister.prList[row.index].choosed = true;
  503. this.startPoint = row.index;
  504. return
  505. }
  506. if (this.startPoint > row.index) {
  507. for (let i = row.index; i <= this.startPoint; i++) {
  508. this.patientRegister.prList[i].choosed = true
  509. }
  510. } else if (this.startPoint <= row.index) {
  511. for (let i = this.startPoint; i <= row.index; i++) {
  512. this.patientRegister.prList[i].choosed = true
  513. }
  514. }
  515. return
  516. }
  517. // 按住了ctrl 键
  518. if (this.window.ctrl) {
  519. this.patientRegister.prList[row.index].choosed = true;
  520. this.startPoint = row.index;
  521. return
  522. }
  523. // 未按住了ctrl 、shift 键
  524. //清除所有选择
  525. console.log('清除所有选择')
  526. this.patientRegister.prList.forEach(e => {
  527. e.choosed = false;
  528. return e
  529. });
  530. this.patientRegister.prList[row.index].choosed = true;
  531. this.startPoint = row.index;
  532. },
  533. //体检次数 相关操作
  534. add() {
  535. let customerOrgId = this.patientRegister.query.customerOrgId;
  536. if (!customerOrgId) {
  537. alert("请选择单位或个人");
  538. return;
  539. }
  540. //console.log('customerOrgId',customerOrgId)
  541. this.patientRegister.patientRegisterId = "";
  542. this.patientRegister.photo = '/pic/Photo.jpg';
  543. // this.patientRegister.patientRegisterRdInit.id = "";
  544. // this.patientRegister.patientRegisterRdInit.customerOrgId = this.patientRegister.query.customerOrgId;
  545. // this.patientRegister.addTimes++;
  546. // this.patientRegister.patientRegisterTimes++;
  547. this.patientRegister.patientRegisterRdInit.customerOrgId = this.patientRegister.query.customerOrgId;
  548. this.formInitData = deepCopy(this.patientRegister.patientRegisterRdInit);
  549. this.patientRegister.patientRegisterAbs = [];
  550. this.dialogVisible = true;
  551. this.editTimes++; //触发表单窗口,数据更新
  552. this.getPatientRegisterAbs();
  553. },
  554. edit() {
  555. if (!this.patientRegister.patientRegisterRd.id) {
  556. alert("请选择要操作的记录");
  557. return;
  558. }
  559. //this.patientRegister.patientRegisterTimes++;
  560. this.getPatientRegisterAbs(this.patientRegister.patientRegisterRd.id);
  561. this.formInitData = { ...this.patientRegister.patientRegisterRd };
  562. this.dialogVisible = true;
  563. this.editTimes++; //触发表单窗口,数据更新
  564. },
  565. //拍照
  566. openCamera() {
  567. if (!this.patientRegister.patientRegisterId) {
  568. alert("请选择要操作的记录");
  569. return;
  570. }
  571. this.patientRegister.cameraVisble = true;
  572. },
  573. //删除(可批量删除)
  574. // /api/app/patient-register/many?PatientRegisterIds=3a0c2cac-f44c-f407-9504-c1fc5e80a159&PatientRegisterIds=3a0c2cb3-d10c-ed70-db6a-b835e75ce641
  575. del() {
  576. if (this.multipleSelection.length < 1) {
  577. alert("请先勾选要操作的记录");
  578. return;
  579. }
  580. let patientRegisterIds = [];
  581. for (let i = 0; i < this.multipleSelection.length; i++) {
  582. patientRegisterIds.push(this.multipleSelection[i]["id"]);
  583. }
  584. this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
  585. confirmButtonText: "确定",
  586. cancelButtonText: "取消",
  587. type: "warning",
  588. })
  589. .then(() => {
  590. //console.log('{patientRegisterIds}',{patientRegisterIds})
  591. return postapi(`/api/app/patient-register/delete-many`, {
  592. patientRegisterIds,
  593. });
  594. })
  595. .then((res) => {
  596. this.$message.success("删除成功");
  597. this.patientRegister.query.times++;
  598. this.patientRegister.patientRegisterId = "";
  599. })
  600. .catch(() => {
  601. this.$message({
  602. type: "info",
  603. message: "已取消删除",
  604. });
  605. });
  606. },
  607. //单个删除方式
  608. delBak() {
  609. if (!this.patientRegister.patientRegisterId) {
  610. alert("请选择要操作的记录");
  611. return;
  612. }
  613. this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
  614. confirmButtonText: "确定",
  615. cancelButtonText: "取消",
  616. type: "warning",
  617. })
  618. .then(() => {
  619. //console.log('${this.patientRegister.patientRegisterId}',this.patientRegister.patientRegisterId)
  620. return deletapi(`/api/app/patient-register/${this.patientRegister.patientRegisterId}`);
  621. })
  622. .then((res) => {
  623. this.$message.success("删除成功");
  624. this.patientRegister.query.times++;
  625. this.patientRegister.patientRegisterId = "";
  626. })
  627. .catch(() => {
  628. this.$message({ type: "info", message: "已取消删除", });
  629. });
  630. },
  631. ldddw(arrayData, key, value, display) {
  632. return dddw(arrayData, key, value, display);
  633. },
  634. lmoment(date, forMat) {
  635. return moment(new Date(date)).format(forMat);
  636. },
  637. //查询
  638. async Query() {
  639. this.patientRegister.prList = [];
  640. let body = {}
  641. console.log(`this.patientRegister.query`, this.patientRegister.query)
  642. if (this.patientRegister.query.customerOrgFlag) {
  643. if (this.patientRegister.query.CustomerOrgParentId) {
  644. body.customerOrgId = this.patientRegister.query.CustomerOrgParentId
  645. } else {
  646. if (this.patientRegister.query.customerOrgId) body.customerOrgId = this.patientRegister.query.customerOrgId
  647. }
  648. }
  649. if (this.patientRegister.query.sex) body.sexId = this.patientRegister.query.sex
  650. if (this.patientRegister.query.patientName) body.patientName = this.patientRegister.query.patientName
  651. if (this.patientRegister.query.completeFlag) body.completeFlag = this.patientRegister.query.completeFlag
  652. //StartDate EndDate
  653. if (this.patientRegister.query.startDate && this.patientRegister.query.endDate) {
  654. body.startDate = moment(this.patientRegister.query.startDate).format("yyyy-MM-DD")
  655. body.endDate = moment(this.patientRegister.query.endDate).format("yyyy-MM-DD")
  656. if (body.startDate > body.endDate) {
  657. this.$message.warning("起始日期不能大于截止日期,数据校验不通过!")
  658. return
  659. }
  660. }
  661. if (this.patientRegister.query.phone) body.phone = this.patientRegister.query.phone
  662. if (this.patientRegister.query.idCardNo) body = { idNo: this.patientRegister.query.idCardNo }
  663. if (this.patientRegister.query.patientNo) body = { patientNo: this.patientRegister.query.patientNo }
  664. if (this.patientRegister.query.patientRegisterNo) body = { patientRegisterNo: this.patientRegister.query.patientRegisterNo }
  665. console.log('/api/app/patientregister/getlistinfilter', body)
  666. const loading = this.$loading({
  667. lock: true,
  668. text: 'Loading',
  669. spinner: 'el-icon-loading',
  670. background: 'rgba(0, 0, 0, 0.7)'
  671. });
  672. postapi('/api/app/patientregister/getlistinfilter', body)
  673. .then((res) => {
  674. if (res.code != -1) {
  675. this.patientRegister.prList = res.data.items;
  676. //配合多选使用
  677. this.patientRegister.prList.forEach((item, index) => {
  678. item.index = index;
  679. item.choosed = false;
  680. });
  681. }
  682. loading.close();
  683. })
  684. .catch((err) => {
  685. loading.close();
  686. });
  687. // try {
  688. // let res =await postapi('/api/app/patientregister/getlistinfilter', body);
  689. // this.patientRegister.prList = res.data;
  690. // } catch (error) {
  691. // console.log("query error",error);
  692. // }
  693. },
  694. //右击菜单
  695. onCellRightClick(row, column) {
  696. this.rClickRow = { ...row }; //右击的行记录
  697. this.rClickColumn = { ...column }; //右击的列(预留)
  698. console.log(row, column.property);
  699. },
  700. onContextmenu(event) {
  701. //console.log('onContextmenu',event);
  702. if (!this.rClickRow) return false;
  703. let row = { ...this.rClickRow };
  704. this.$contextmenu({
  705. items: [
  706. {
  707. label: "发送检验申请",
  708. onClick: () => {
  709. this.lisRequest(row.id);
  710. }
  711. },
  712. {
  713. label: "预览检验条码",
  714. onClick: () => {
  715. this.lisPrint(row.id, '0002', true);
  716. }
  717. },
  718. {
  719. label: "打印检验条码",
  720. onClick: () => {
  721. this.lisPrint(row.id, '0002', false);
  722. }
  723. },
  724. {
  725. label: "预览Pacs条码",
  726. onClick: () => {
  727. this.pacsPrint(row.id, '0004', true);
  728. }
  729. },
  730. {
  731. label: "打印Pacs条码",
  732. onClick: () => {
  733. this.pacsPrint(row.id, '0004', false);
  734. }
  735. },
  736. ],
  737. event,
  738. //x: event.clientX,
  739. //y: event.clientY,
  740. customClass: "custom-class",
  741. zIndex: 3,
  742. minWidth: 80,
  743. });
  744. this.rClickRow = null;
  745. return false;
  746. },
  747. //批量更新分组按钮
  748. btnGroupBatch() {
  749. let customerOrgId = this.patientRegister.query.customerOrgId;
  750. if (!customerOrgId) {
  751. alert("请选择单位");
  752. return;
  753. }
  754. //取消勾选,换成选择的方式 start
  755. this.multipleSelection = []
  756. this.patientRegister.prList.forEach(e => {
  757. if(e.choosed) this.multipleSelection.push(e)
  758. });
  759. //取消勾选,换成选择的方式 end
  760. if (this.multipleSelection.length < 1) {
  761. this.$message.info("请勾选要操作的人员!");
  762. return;
  763. }
  764. this.dialogGroup = true;
  765. },
  766. //批量更新分组处理
  767. async groupBatchHandle() {
  768. let groupBatch = { patientRegisterId: null, ...this.groupBatch };
  769. if (groupBatch.isReserveAddAsbitem) {
  770. groupBatch.isReserveAddAsbitem = 'Y';
  771. } else {
  772. groupBatch.isReserveAddAsbitem = 'N';
  773. }
  774. console.log('groupBatch', groupBatch);
  775. if (!groupBatch.customerOrgGroupId) {
  776. this.$message.warning("请选择分组");
  777. return;
  778. }
  779. this.elProgress.display = true
  780. this.elProgress.percentage = 0
  781. for (let i = 0; i < this.multipleSelection.length; i++) {
  782. groupBatch.patientRegisterId = this.multipleSelection[i].id;
  783. try {
  784. await postapi('/api/app/patientregister/updatepatientregistercustomerorggroup', groupBatch);
  785. } catch (error) {
  786. console.log(error);
  787. }
  788. this.elProgress.percentage = Math.floor((i+1)*100/this.multipleSelection.length)
  789. }
  790. this.$message.success("操作成功!");
  791. this.dialogGroup = false;
  792. this.Query();
  793. },
  794. //快速查询项目
  795. remoteMethod(keyWords) {
  796. //console.log('remoteMethod',this.dict.asbItemQuick)
  797. if (keyWords) {
  798. this.quickAsb = [];
  799. this.dict.asbItemQuick.forEach(item => {
  800. if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  801. || item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  802. || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1) {
  803. this.quickAsb.push(item);
  804. }
  805. });
  806. } else {
  807. this.quickAsb = [...this.dict.asbItemQuick];
  808. }
  809. },
  810. //快速选择项目
  811. quickChoosedAsb(v) {
  812. //过滤已选的的组合项目
  813. let lfind = -1
  814. if (v) {
  815. lfind = arrayExistObj(this.quickAsb, 'id', v)
  816. if (lfind > -1) {
  817. this.asbitemBatch.asbitemsTemp.push({
  818. asbitemId: v,
  819. asbitemName: this.quickAsb[lfind].displayName, //仅作显示用
  820. patientRegisterId: null,
  821. standardPrice: this.quickAsb[lfind].price,
  822. chargePrice: this.quickAsb[lfind].price,
  823. payTypeFlag: '1',//默认单位支付
  824. isCharge: 'N',
  825. amount: 1,
  826. });
  827. this.quickAsb.splice(lfind, 1);
  828. arrayReduce(this.dict.asbItemQuick, { id: v }, 'id');
  829. }
  830. }
  831. console.log(v, this.asbitemBatch.asbitemsTemp)
  832. },
  833. //删除临时显示的组合项目
  834. removeAbs(row) {
  835. let lfind = arrayExistObj(this.asbitemBatch.asbitemsTemp, 'asbitemId', row.asbitemId);
  836. if (lfind > - 1) this.asbitemBatch.asbitemsTemp.splice(lfind, 1);
  837. },
  838. rowClickaAbitemCurr(row) {
  839. this.asbitemBatch.asbitemCurr = row;
  840. },
  841. btnRemoveAbs() {
  842. if (!this.asbitemBatch.asbitemCurr.asbitemId) {
  843. this.$message.warning("请选择要删除的组合项目!");
  844. return;
  845. }
  846. this.removeAbs(this.asbitemBatch.asbitemCurr);
  847. this.asbitemBatch.asbitemCurr.asbitemId = null;
  848. },
  849. removeAllAbs() {
  850. this.asbitemBatch.asbitemsTemp = [];
  851. },
  852. //批量更新项目
  853. asbBatch() {
  854. let customerOrgId = this.patientRegister.query.customerOrgId;
  855. if (!customerOrgId) {
  856. alert("请选择单位");
  857. return;
  858. }
  859. //取消勾选,换成选择的方式 start
  860. this.multipleSelection = []
  861. this.patientRegister.prList.forEach(e => {
  862. if(e.choosed) this.multipleSelection.push(e)
  863. });
  864. //取消勾选,换成选择的方式 end
  865. this.dialogAsbitem = true;
  866. //供快速选择的组合项目
  867. this.dict.asbItemQuick = [...this.dict.asbItemAll];
  868. this.asbitemBatch.asbitemCurr.asbitemId = null;
  869. this.asbitemBatch.asbitemsTemp = [];
  870. },
  871. asbitemDel(type) {
  872. //typ==0 为批量删除
  873. if (Number(type) == 0) {
  874. this.asbitemBatch.asbitemsTemp = [];
  875. } else {
  876. if (!this.asbitemBatch.asbitemCurr.asbitemId) {
  877. this.$message.warning("请选中要删除的项目!");
  878. return;
  879. }
  880. //console.log(this.asbitemBatch.asbitemsTemp,this.asbitemBatch.asbitemCurr)
  881. let lfind = arrayExistObj(this.asbitemBatch.asbitemsTemp, 'asbitemId', this.asbitemBatch.asbitemCurr.asbitemId);
  882. if (lfind > -1) {
  883. this.asbitemBatch.asbitemsTemp.splice(lfind, 1);
  884. this.asbitemBatch.asbitemCurr.asbitemId = null;
  885. }
  886. //console.log(lfind);
  887. }
  888. },
  889. //批量调整支付方式
  890. changePayTypeFlag(flag) {
  891. this.asbitemBatch.asbitemsTemp.forEach(e => {
  892. e.payTypeFlag = flag;
  893. return e;
  894. });
  895. },
  896. //批量调整项目
  897. async asbitemBatchHandle() {
  898. let msg = '', body = {};
  899. if (this.asbitemBatch.asbitemsTemp.length == 0) {
  900. this.$message.warning("没有选择组合项目,不可执行此操作!");
  901. return;
  902. }
  903. if (this.asbitemBatch.operate == 'add') {
  904. this.asbitemBatch.asbitemsTemp.forEach((e, index) => {
  905. if (!e.amount || !e.chargePrice) {
  906. msg = '第 ' + (index + 1) + " 行,未输入数量或价格!";
  907. }
  908. });
  909. if (msg) {
  910. this.$message.warning(msg);
  911. return;
  912. }
  913. // {
  914. // "organizationUnitId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  915. // "createRegisterAsbitemDtos": [
  916. // {
  917. // "asbitemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  918. // "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  919. // "standardPrice": 0,
  920. // "chargePrice": 0,
  921. // "payTypeFlag": "string",
  922. // "isCharge": "string",
  923. // "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  924. // "amount": 0,
  925. // "groupPackageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  926. // }
  927. // ]
  928. // }
  929. let createRegisterAsbitemDtos = deepCopy(this.asbitemBatch.asbitemsTemp);
  930. createRegisterAsbitemDtos.forEach(e => {
  931. delete e.asbitemName;
  932. return e;
  933. });
  934. this.elProgress.display = true
  935. this.elProgress.percentage = 0
  936. for (let i = 0; i < this.multipleSelection.length; i++) {
  937. createRegisterAsbitemDtos.forEach(e => {
  938. e.patientRegisterId = this.multipleSelection[i].id;
  939. return e;
  940. });
  941. body = {
  942. organizationUnitId: this.multipleSelection[i].organizationUnitId,
  943. createRegisterAsbitemDtos,
  944. }
  945. try {
  946. await postapi('/api/app/registerasbitem/createregisterasbitemincustomerorgmany', body);
  947. } catch (error) {
  948. console.log('批量增加项目错误,原因:', error);
  949. }
  950. this.elProgress.percentage = Math.floor((i+1)*100/this.multipleSelection.length)
  951. }
  952. } else {
  953. // {
  954. // isDeleteGroup: 'N',
  955. // patientRegisterId: null,
  956. // asbitemIds: [],
  957. // }
  958. let asbitemIds = [];
  959. if (this.asbitemBatch.isDeleteGroup) {
  960. body.isDeleteGroup = 'Y';
  961. } else {
  962. body.isDeleteGroup = 'N';
  963. }
  964. this.elProgress.display = true
  965. this.elProgress.percentage = 0
  966. for (let i = 0; i < this.multipleSelection.length; i++) {
  967. this.asbitemBatch.asbitemsTemp.forEach(e => {
  968. asbitemIds.push(e.asbitemId);
  969. });
  970. body.patientRegisterId = this.multipleSelection[i].id;
  971. body.asbitemIds = asbitemIds
  972. try {
  973. await postapi('/api/app/registerasbitem/deleteregisterasbitemincustomerorgmany', body);
  974. } catch (error) {
  975. console.log('批量删除项目错误,原因:', error);
  976. }
  977. this.elProgress.percentage = Math.floor((i+1)*100/this.multipleSelection.length)
  978. }
  979. }
  980. this.$message.success("操作成功!");
  981. this.dialogAsbitem = false;
  982. this.Query();
  983. },
  984. //检验申请
  985. async lisRequest(prId) {
  986. let isPrintLisRequest = false
  987. let res = null
  988. if (prId.length < 1) {
  989. this.$message.info("人员信息尚未保存,不可执行此操作!");
  990. return;
  991. }
  992. try {
  993. res = await postapi(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${prId}`);
  994. console.log(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${prId}`, res)
  995. } catch (error) {
  996. return;
  997. }
  998. if (res.code != -1) {
  999. this.$message.info("发送检验申请成功!");
  1000. isPrintLisRequest = true;
  1001. }
  1002. //重复申请,重打
  1003. if (res.code == -1 && res.message.indexOf('已申请') > -1) {
  1004. isPrintLisRequest = true;
  1005. }
  1006. if (!isPrintLisRequest) return;
  1007. try {
  1008. await this.$confirm("是否打印检验申请单?", "提示", {
  1009. confirmButtonText: "是",
  1010. cancelButtonText: "否",
  1011. type: "info",
  1012. showClose: false,
  1013. closeOnClickModal: false,
  1014. closeOnPressEscape: false,
  1015. });
  1016. } catch (error) {
  1017. return;
  1018. }
  1019. //打印检验申请单
  1020. this.lisPrint(prId, '0003', false);
  1021. },
  1022. //检验条码打印
  1023. lisPrint(prId, ReportCode, isPreview) {
  1024. if(!this.$peisAPI) {
  1025. this.$message.info("此功能,需要在壳客户端才可运行!")
  1026. return
  1027. }
  1028. let token = localStorage.getItem('token');
  1029. let user = localStorage.getItem('user');
  1030. let toOutShell = {
  1031. ReportCode, token,
  1032. preViewCanPrint: 'N',
  1033. Parameters: [
  1034. { Name: 'printer', Value: user },
  1035. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  1036. ],
  1037. };
  1038. if (isPreview) {
  1039. //http://140.143.162.39:9529/api/app/printreport/getlisrequestreport?PatientRegisterId=3a0d2e90-da68-3746-6775-bf17e5f9b295
  1040. //this.multipleSelection.forEach((item,index) =>{
  1041. postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${prId}`)
  1042. .then((res) => {
  1043. if (res.code != -1) {
  1044. toOutShell.ReportTable = { lisRequest: res.data };
  1045. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  1046. return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  1047. }
  1048. })
  1049. .catch(err => {
  1050. this.$message.warning(err);
  1051. });
  1052. // });
  1053. } else {
  1054. postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${prId}`)
  1055. .then((res) => {
  1056. if (res.code != -1) {
  1057. toOutShell.ReportTable = { lisRequest: res.data };
  1058. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  1059. return this.$peisAPI.print(JSON.stringify(toOutShell));
  1060. }
  1061. })
  1062. .then(res => {
  1063. console.log('res', res);
  1064. if (res && res.toLowerCase() == 'success') {
  1065. //更新打印状态 /api/app/lisrequest/updatelisrequestisprint
  1066. // {
  1067. // "operateType": 0, 操作类型(1.按PatientRegisterId 2.按LisRequestId)
  1068. // "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  1069. // "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  1070. // }
  1071. return postapi('/api/app/lisrequest/updatelisrequestisprint', { operateType: 1, patientRegisterId: prId })
  1072. }
  1073. })
  1074. .catch(err => {
  1075. this.$message.warning(err);
  1076. });
  1077. }
  1078. },
  1079. //pacs条码打印
  1080. pacsPrint(prId, ReportCode, isPreview) {
  1081. if(!this.$peisAPI) {
  1082. this.$message.info("此功能,需要在壳客户端才可运行!")
  1083. return
  1084. }
  1085. let token = localStorage.getItem('token');
  1086. let user = localStorage.getItem('user');
  1087. let toOutShell = {
  1088. ReportCode, token,
  1089. preViewCanPrint: 'Y',
  1090. Parameters: [
  1091. { Name: 'printer', Value: user },
  1092. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  1093. ],
  1094. };
  1095. if (isPreview) {
  1096. //http://140.143.162.39:9529/api/app/printreport/getpacsnoreport?PatientRegisterId=3a0c990e-5756-2dc0-19d5-69a617fe4048
  1097. //this.multipleSelection.forEach((item,index) =>{
  1098. postapi(`/api/app/printreport/getpacsnoreport?PatientRegisterId=${prId}`)
  1099. .then((res) => {
  1100. if (res.code != -1) {
  1101. toOutShell.ReportTable = { lisRequest: res.data };
  1102. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  1103. return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  1104. }
  1105. })
  1106. .catch(err => {
  1107. this.$message.warning(err);
  1108. });
  1109. // });
  1110. } else {
  1111. postapi(`/api/app/printreport/getpacsnoreport?PatientRegisterId=${prId}`)
  1112. .then((res) => {
  1113. if (res.code != -1) {
  1114. toOutShell.ReportTable = { lisRequest: res.data };
  1115. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  1116. return this.$peisAPI.print(JSON.stringify(toOutShell));
  1117. }
  1118. })
  1119. .then(res => {
  1120. if (res.toLowerCase() == 'success') {
  1121. //更新打印状态 /api/app/lisrequest/updatelisrequestisprint
  1122. // {
  1123. // "operateType": 0, 操作类型(1.按PatientRegisterId 2.按LisRequestId)
  1124. // "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  1125. // "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  1126. // }
  1127. return postapi('/api/app/lisrequest/updatelisrequestisprint', { operateType: 1, patientRegisterId: prId })
  1128. }
  1129. })
  1130. .catch(err => {
  1131. this.$message.warning(err);
  1132. });
  1133. }
  1134. },
  1135. },
  1136. //监听事件
  1137. watch: {
  1138. //触发查询事件
  1139. "patientRegister.query.times"(newVal, oldVal) {
  1140. if (newVal != oldVal) {
  1141. //alert('触发查询事件')
  1142. this.Query();
  1143. }
  1144. },
  1145. //新增后,触发赋值
  1146. "patientRegister.patientRegisterRd.id"(newVal, oldVal) {
  1147. if (newVal != oldVal) {
  1148. //console.log('patientRegister.patientRegisterRd.customerOrgId',this.patientRegister.patientRegisterRd.customerOrgId)
  1149. objCopy(this.patientRegister.patientRegisterRd, this.form);
  1150. }
  1151. },
  1152. },
  1153. };
  1154. </script>
  1155. <style scoped>
  1156. @import "../../assets/css/global.css";
  1157. .box {
  1158. display: flex;
  1159. }
  1160. .listBtn {
  1161. margin-top: 5px;
  1162. text-align: center;
  1163. }
  1164. .btnClass {
  1165. width: 110px;
  1166. }
  1167. ::v-deep .el-input__inner {
  1168. /*text-align: center;*/
  1169. padding-left: 5px;
  1170. padding-right: 1px;
  1171. }
  1172. ::v-deep .el-table th.el-table__cell {
  1173. text-align: center;
  1174. padding-left: 1px;
  1175. padding-right: 1px;
  1176. }
  1177. /* 表格:单元格 行间距*/
  1178. ::v-deep .el-table__cell {
  1179. padding-top: 2px;
  1180. /* 表格:单元格 行间距,默认 8px */
  1181. padding-bottom: 2px;
  1182. /* 表格:单元格 行间距,默认 8px */
  1183. }
  1184. ::v-deep .el-table td.el-table__cell {
  1185. padding-left: 1px;
  1186. padding-right: 1px;
  1187. }
  1188. ::v-deep .el-table .cell {
  1189. padding-left: 1px;
  1190. padding-right: 1px;
  1191. }
  1192. ::v-deep input[type="number"]::-webkit-inner-spin-button,
  1193. input[type="number"]::-webkit-outer-spin-button {
  1194. -webkit-appearance: none !important;
  1195. margin: 0 !important;
  1196. }
  1197. /*
  1198. ::v-deep .el-table__body tr.current-row>td {
  1199. background-color: #409EFF !important;
  1200. }
  1201. */
  1202. </style>