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.

993 lines
36 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <template>
  2. <div style="display: flex">
  3. <div :style="'width:' + (window.pageWidth - 200 - 120 - 70) + 'px;'" @contextmenu.prevent="onContextmenu">
  4. <el-table :data="patientRegister.prList" border :height="patientRegister.prListHeight" highlight-current-row
  5. @row-click="rowick" size="small" @selection-change="handleSelectionChange" @cell-contextmenu="onCellRightClick">
  6. <el-table-column type="selection" width="40">
  7. </el-table-column>
  8. <el-table-column prop="completeFlag" label="体检进度">
  9. <template slot-scope="scope">
  10. <div>{{ ldddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}</div>
  11. </template>
  12. </el-table-column>
  13. <el-table-column prop="guidePrintTimes" label="打印" width="50">
  14. <template slot-scope="scope">
  15. <i class="el-icon-printer" v-if="scope.row.guidePrintTimes > 0" style="font-size: 24px;color: green;"></i>
  16. </template>
  17. </el-table-column>
  18. <el-table-column prop="isLock" label="锁住">
  19. <template slot-scope="scope">
  20. <div>{{ scope.row.isLock == "Y" ? "是" : "否" }}</div>
  21. </template>
  22. </el-table-column>
  23. <el-table-column prop="customerOrgParentName" label="单位" width="180">
  24. <template slot-scope="scope">
  25. <div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgParentName : scope.row.customerOrgName }}</div>
  26. </template>
  27. </el-table-column>
  28. <el-table-column prop="customerOrgName" label="部门" width="180">
  29. <template slot-scope="scope">
  30. <div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgName : "" }}</div>
  31. </template>
  32. </el-table-column>
  33. <el-table-column prop="patientName" label="姓名" />
  34. <el-table-column prop="sexId" label="性别">
  35. <template slot-scope="scope">
  36. <div>{{ ldddw(dict.sex, "id", scope.row.sexId, "displayName") }}</div>
  37. </template>
  38. </el-table-column>
  39. <el-table-column prop="age" label="年龄" />
  40. <el-table-column prop="patientRegisterNo" label="条码号" width="150" />
  41. <el-table-column prop="patientNo" label="档案号" />
  42. <el-table-column prop="medicalTimes" label="体检次数"></el-table-column>
  43. <el-table-column label="分组/套餐" width="150">
  44. <template slot-scope="scope">
  45. <div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId === dict.personOrgId">
  46. {{ ldddw(dict.medicalPackage, "id", scope.row.medicalPackageId, "displayName") }}
  47. </div>
  48. <div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId !== dict.personOrgId">
  49. {{ ldddw(dict.customerOrgGroupAll, "id", scope.row.customerOrgGroupId, "displayName") }}
  50. </div>
  51. </template>
  52. </el-table-column>
  53. <el-table-column prop="nationId" label="民族">
  54. <template slot-scope="scope">
  55. <div>
  56. {{ ldddw(dict.nation, "nationId", scope.row.nationId, "displayName") }}
  57. </div>
  58. </template>
  59. </el-table-column>
  60. <el-table-column prop="idNo" label="身份证" width="150" />
  61. <el-table-column prop="birthDate" label="出生日期" width="100">
  62. <template slot-scope="scope">
  63. <div v-if="scope.row.birthDate">
  64. {{ lmoment(scope.row.birthDate, "yyyy-MM-DD") }}
  65. </div>
  66. </template>
  67. </el-table-column>
  68. <el-table-column prop="email" label="邮箱" width="180" />
  69. <el-table-column prop="mobileTelephone" label="手机" width="100" />
  70. <el-table-column prop="telephone" label="电话" width="100" />
  71. <el-table-column prop="address" label="地址" width="300" />
  72. <el-table-column prop="medicalCardNo" label="体检卡号" />
  73. <el-table-column prop="jobCardNo" label="工卡号" />
  74. <el-table-column prop="maritalStatusId" label="婚姻状况">
  75. <template slot-scope="scope">
  76. <div>
  77. {{ ldddw(dict.maritalStatus, "id", scope.row.maritalStatusId, "displayName") }}
  78. </div>
  79. </template>
  80. </el-table-column>
  81. <el-table-column prop="medicalTypeId" label="体检类别">
  82. <template slot-scope="scope">
  83. <div v-if="scope.row.medicalTypeId !== dict.personOrgId">
  84. {{ ldddw(dict.medicalType, "id", scope.row.medicalTypeId, "displayName") }}
  85. </div>
  86. </template>
  87. </el-table-column>
  88. <el-table-column prop="personnelTypeId" label="人员类别">
  89. <template slot-scope="scope">
  90. <div v-if="scope.row.personnelTypeId !== dict.personOrgId">
  91. {{ ldddw(dict.personnelType, "id", scope.row.personnelTypeId, "displayName") }}
  92. </div>
  93. </template>
  94. </el-table-column>
  95. <el-table-column prop="jobPost" label="职务" />
  96. <el-table-column prop="jobTitle" label="职称" />
  97. <el-table-column prop="salesman" label="介绍人" />
  98. <el-table-column prop="isVip" label="是否VIP">
  99. <template slot-scope="scope">
  100. <div>{{ scope.row.isVip == "Y" ? "是" : "否" }}</div>
  101. </template>
  102. </el-table-column>
  103. <el-table-column prop="creatorName" label="登记人" />
  104. <el-table-column prop="creationTime" label="登记日期" width="100">
  105. <template slot-scope="scope">
  106. <div>{{ lmoment(scope.row.creationTime, "yyyy-MM-DD") }}</div>
  107. </template>
  108. </el-table-column>
  109. <el-table-column prop="isUpload" label="是否上传">
  110. <template slot-scope="scope">
  111. <div>{{ scope.row.isUpload == "Y" ? "是" : "否" }}</div>
  112. </template>
  113. </el-table-column>
  114. <!--
  115. "sexHormoneTermId": "00000000-0000-0000-0000-000000000000",
  116. "interposeMeasure": null,
  117. "medicalConclusionId": "00000000-0000-0000-0000-000000000000",
  118. "reportPrintTimes": 0,
  119. "isMedicalStart": "N",
  120. "medicalStartDate": "6/28/2023",
  121. "isRecoverGuide": "N",
  122. "summaryDate": "",
  123. "summaryDoctor": null,
  124. "isAudit": "N",
  125. "auditDoctor": null,
  126. "auditDate": "",
  127. "isNameHide": "N",
  128. "isPhoneFollow": "N",
  129. "thirdInfo": null,
  130. "guidePrintTimes": null,
  131. "remark": null,
  132. "organizationUnitId": "00000000-0000-0000-0000-000000000000",
  133. "customerOrgRegisterId": "00000000-0000-0000-0000-000000000000",
  134. "lastModifierName": "",
  135. "lastModificationTime": null,
  136. "lastModifierId": null,
  137. "creatorId": null,
  138. "id": "3a0c196d-a6d0-37fe-5c32-4806bdc4530f"
  139. -->
  140. </el-table>
  141. <!-- 给合项目 基本信息 -->
  142. <el-tabs v-model="tabChoosed">
  143. <!-- 给合项目 -->
  144. <el-tab-pane label="已选组合项目" name="1">
  145. <PatientRegisterAsbItem />
  146. </el-tab-pane>
  147. </el-tabs>
  148. </div>
  149. <div style="margin-left: 10px;width:110px;">
  150. <div class="listBtn">
  151. <el-button type="success" class="btnClass" @click="add">人员登记</el-button>
  152. </div>
  153. <div class="listBtn">
  154. <el-button type="primary" class="btnClass" @click="edit">编辑</el-button>
  155. </div>
  156. <div class="listBtn">
  157. <el-button type="danger" class="btnClass" @click="del">删除</el-button>
  158. </div>
  159. <div class="listBtn">
  160. <el-button type="primary" class="btnClass" @click="openCamera" icon="el-icon-camera">拍照</el-button>
  161. </div>
  162. <div class="listBtn">
  163. <el-button type="primary" class="btnClass">健康档案</el-button>
  164. </div>
  165. <div class="listBtn">
  166. <el-button type="primary" class="btnClass" @click="btnGroupBatch">调整分组</el-button>
  167. </div>
  168. <div class="listBtn">
  169. <el-button type="primary" class="btnClass" @click="asbBatch">调整项目</el-button>
  170. </div>
  171. <div class="listBtn">
  172. <el-button type="primary" class="btnClass" @click="guidePrint('0001', false)">指引单打印</el-button>
  173. </div>
  174. <div class="listBtn">
  175. <el-button type="primary" class="btnClass" @click="guidePrint('0001', true)">指引单预览</el-button>
  176. </div>
  177. </div>
  178. <!-- 体检人员登记 -->
  179. <el-dialog :title="patientRegister.patientRegisterId ? '体检人员--编辑' : '体检人员--新增'" :visible.sync="dialogVisible"
  180. :close-on-click-modal="false" fullscreen>
  181. <PatientRegisterEdit :formInitData="formInitData" :editTimes="editTimes" />
  182. </el-dialog>
  183. <!-- 拍照 -->
  184. <el-dialog title="拍照" :visible.sync="patientRegister.cameraVisble" width="400" height="800" :show-close="false"
  185. :append-to-body="true" :close-on-click-modal="false">
  186. <Camera :id="patientRegister.patientRegisterId" />
  187. </el-dialog>
  188. <!-- 指引单 -->
  189. <el-dialog title="指引单" :visible.sync="dialogGuide" width="400" height="800" :append-to-body="true"
  190. :close-on-click-modal="false">
  191. <div>{{ guideMsg }}</div>
  192. </el-dialog>
  193. <!-- 批量调整分组 -->
  194. <el-dialog title="批量调整分组" :visible.sync="dialogGroup" width="400" height="800" :append-to-body="true"
  195. :close-on-click-modal="false">
  196. <div>
  197. <div>
  198. 批量调整分组只针对单位体检有效个人体检将忽略此操作不能调整已收费或已检的项目及已总检的体检人员
  199. </div>
  200. <div>
  201. <br /><span>分组</span>
  202. <el-select v-model="groupBatch.customerOrgGroupId" placeholder="请选择" filterable size="small">
  203. <el-option v-for="item in patientRegister.customerOrgGroup" :key="item.id" :label="item.displayName"
  204. :value="item.id" />
  205. </el-select>
  206. </div>
  207. <div>
  208. <br /><el-radio v-model="groupBatch.payTypeFlag" label="0">个人支付</el-radio>
  209. <br /><el-radio v-model="groupBatch.payTypeFlag" label="1">单位支付</el-radio>
  210. <br /><el-radio v-model="groupBatch.payTypeFlag" label="2">免费</el-radio>
  211. </div>
  212. <div>
  213. <br /><el-checkbox v-model="groupBatch.isReserveAddAsbitem">保留加做项目包括不属于原分组的没有设置分组的</el-checkbox>
  214. </div>
  215. </div>
  216. <span slot="footer" class="dialog-footer">
  217. <el-button type="primary" @click="groupBatchHandle"> </el-button>
  218. <el-button @click="dialogGroup = false"> </el-button>
  219. </span>
  220. </el-dialog>
  221. <!-- 批量调整分组 -->
  222. <el-dialog title="批量调整项目" :visible.sync="dialogAsbitem" width="400" height="800" :append-to-body="true"
  223. :close-on-click-modal="false">
  224. <div>
  225. <div>
  226. 批量调整分组只针对单位体检有效个人体检将忽略此操作不能调整已收费或已检的项目及已总检的体检人员
  227. </div>
  228. <div>
  229. <br /><el-radio v-model="asbitemBatch.operate" label="add">增加项目</el-radio>
  230. <el-radio v-model="asbitemBatch.operate" label="del">删除项目</el-radio>
  231. </div>
  232. <div>
  233. <br /><el-checkbox v-model="asbitemBatch.isDeleteGroup" :disabled="asbitemBatch.operate == 'add' ? true:false" >如果删除项目属于分组则删除体检记录信息的分组设置</el-checkbox>
  234. </div>
  235. <div>
  236. <br /><span>直接录入</span>
  237. <el-select v-model="asbitemBatch.asbItemId" placeholder="快速选择组合项目" size="small" filterable clearable remote
  238. :remote-method="remoteMethod" @change="quickChoosedAsb" default-first-option
  239. style="width:150px;text-align: left;padding-right: 15px;">
  240. <el-option v-for="item in quickAsb" :key="item.id" :value="item.id" :label="item.displayName" />
  241. </el-select>
  242. </div>
  243. <div>
  244. <el-table :data="asbitemBatch.asbitemsTemp"
  245. height="200" width="100%"
  246. show-summary @row-dblclick="removeAbs" size="small" @row-click="rowClickaAbitemCurr">
  247. <el-table-column label="组合项目" width="120" prop="asbitemName" />
  248. <el-table-column v-if="asbitemBatch.operate == 'add' ? true:false" label="数量" prop="amount" width="50">
  249. <template slot-scope="scope">
  250. <el-input type="number" v-model="scope.row.amount" size="small" />
  251. </template>
  252. </el-table-column>
  253. <el-table-column v-if="asbitemBatch.operate == 'add' ? true:false" label="实收价格" prop="chargePrice" width="70">
  254. <template slot-scope="scope">
  255. <el-input type="number" v-model="patientRegister.patientRegisterAbs[scope.$index].chargePrice" size="small" />
  256. </template>
  257. </el-table-column>
  258. <el-table-column v-if="asbitemBatch.operate == 'add' ? true:false" label="支付方式" prop="payTypeFlag" width="100">
  259. <template slot-scope="scope">
  260. <el-select v-model="scope.row.payTypeFlag" size="small">
  261. <el-option v-for="item in dict.payType" :key="item.id" :label="item.displayName" :value="item.id" />
  262. </el-select>
  263. </template>
  264. </el-table-column>
  265. </el-table>
  266. </div>
  267. </div>
  268. <span slot="footer" class="dialog-footer">
  269. <el-button type="primary" @click="asbitemBatchHandle"> </el-button>
  270. <el-button @click="dialogAsbitem = false"> </el-button>
  271. </span>
  272. </el-dialog>
  273. </div>
  274. </template>
  275. <script>
  276. import moment from "moment";
  277. import { mapState, mapActions } from "vuex";
  278. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  279. import { dddw, objCopy, arrayReduce, arrayExistObj } from "@/utlis/proFunc";
  280. import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue";
  281. import Camera from "../../components/patientRegister/Camera.vue";
  282. import PatientRegisterAsbItem from "../../components/patientRegister/patientRegisterAsbItem.vue";
  283. export default {
  284. components: {
  285. PatientRegisterEdit,
  286. Camera,
  287. PatientRegisterAsbItem,
  288. },
  289. data() {
  290. return {
  291. multipleSelection: [], //选中的数据列表
  292. dialogVisible: false,
  293. dialogCamera: false,
  294. dialogGuide: false,
  295. guideMsg: 'guideMsg',
  296. tabChoosed: "1",
  297. formInitData: {}, //体检登记初始表单数据
  298. editTimes: 0,
  299. rClickRow: null, //右击的行
  300. rClickColumn: null, //右击的列(预留)
  301. dialogGroup: false,
  302. groupBatch: {
  303. patientRegisterId: null,
  304. customerOrgGroupId: null,
  305. payTypeFlag: "1", //0:个人付费,1:单位付费 2:免费
  306. isReserveAddAsbitem: true, //是否保留加做项目
  307. },
  308. dialogAsbitem:false,
  309. asbitemBatch:{
  310. operate:'add',
  311. isDeleteGroup:false,
  312. asbItemId:'',
  313. asbitemsTemp:[], //删除或增加项目临时用
  314. asbitemCurr:{}, //当前选中要删除的项目(批量调整)
  315. },
  316. quickAsb:[], //可供快速选择的组合项目
  317. asbitemDelBatch:{
  318. isDeleteGroup:'N',
  319. patientRegisterId:null,
  320. asbitemIds:[],
  321. },
  322. asbitemAddBatch:{
  323. organizationUnitId: null,
  324. createRegisterAsbitemDtos: [],
  325. // [
  326. // {
  327. // asbitemId: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  328. // "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  329. // "standardPrice": 0,
  330. // "chargePrice": 0,
  331. // "payTypeFlag": "string",
  332. // "isCharge": "string",
  333. // "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  334. // "amount": 0,
  335. // "groupPackageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  336. // }
  337. // ]
  338. },
  339. };
  340. },
  341. created() { },
  342. //挂载完成
  343. mounted() {
  344. this.quickAsb = this.dict.asbItemAll;
  345. },
  346. computed: {
  347. ...mapState(["window", "dict", "patientRegister", "customerOrg"]),
  348. },
  349. methods: {
  350. ...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
  351. // 打印指引单(isPreview)
  352. async guidePrint(ReportCode, isPreview) {
  353. let token = localStorage.getItem('token');
  354. let user = localStorage.getItem('user');
  355. let toOutShell = {
  356. ReportCode, token,
  357. preViewCanPrint: 'N',
  358. Parameters: [
  359. { Name: 'printer', Value: user },
  360. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  361. ],
  362. };
  363. let lfind = -1;
  364. if (this.multipleSelection.length < 1) {
  365. this.$message.info("请勾选要打印指引单的人员记录!");
  366. return;
  367. }
  368. if (isPreview) {
  369. //
  370. //this.multipleSelection.forEach((item,index) =>{
  371. getapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.multipleSelection[0].id}`)
  372. .then((res) => {
  373. if (res.code != -1) {
  374. toOutShell.ReportTable = res.data;
  375. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  376. return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  377. }
  378. })
  379. .catch(err => {
  380. this.$message.warning(err);
  381. });
  382. // });
  383. } else {
  384. this.multipleSelection.forEach((item, index) => {
  385. getapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${item.id}`)
  386. .then((res) => {
  387. if (res.code != -1) {
  388. toOutShell.ReportTable = res.data;
  389. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  390. return this.$peisAPI.print(JSON.stringify(toOutShell));
  391. }
  392. })
  393. .then(res => {
  394. if (res.toLowerCase() == 'success') {
  395. //更新打印次数
  396. return postapi('api/app/patientregister/updatepatientregisterguideprinttimesmany', [item.id])
  397. }
  398. })
  399. .then(res => {
  400. if (res.code != -1) {
  401. lfind = arrayExistObj(this.patientRegister.prList, 'id', item.id)
  402. if (lfind > -1) {
  403. if (this.patientRegister.prList[lfind].guidePrintTimes) {
  404. this.patientRegister.prList[lfind].guidePrintTimes = Number(this.patientRegister.prList[lfind].guidePrintTimes) + 1;
  405. } else {
  406. this.patientRegister.prList[lfind].guidePrintTimes = 1;
  407. }
  408. }
  409. }
  410. })
  411. .catch(err => {
  412. this.$message.warning(err);
  413. });
  414. });
  415. }
  416. },
  417. handleSelectionChange(val) {
  418. this.multipleSelection = val;
  419. //console.log('this.multipleSelection',this.multipleSelection)
  420. },
  421. //获取单位分组 /api/app/customer-org-group/in-customer-org-id/3a0c0444-d7a0-871f-4074-19faf1655caf
  422. getCustomerOrgGroup(customerOrgld) {
  423. getapi(`/api/app/customer-org-group/in-customer-org-id/${customerOrgld}`)
  424. .then((res) => {
  425. console.log("getCustomerOrgGroup", res.data);
  426. if (res.code == 1) {
  427. this.patientRegister.customerOrgGroup = res.data;
  428. }
  429. });
  430. },
  431. //点击体检次数行
  432. rowick(row) {
  433. this.patientRegister.photo = ""; //清除照片缓存
  434. this.patientRegister.patientRegisterId = row.id;
  435. this.patientRegister.patientRegisterRd = row;
  436. this.patientRegister.query.customerOrgParentId = row.customerOrgParentId;
  437. this.patientRegister.customerOrgGroupChange = 0; //控制体检列表记录切换时,0 无需触发更换分组操作
  438. this.patientRegister.medicalPackageChange = 0; //控制体检列表记录切换时,0 无需触发更换套餐操作
  439. this.getCustomerOrgGroup(row.customerOrgParentId);
  440. this.dict.asbItem = [...this.dict.asbItemAll]
  441. this.getPatientRegisterAbs(row.id);
  442. },
  443. //体检次数 相关操作
  444. add() {
  445. let customerOrgId = this.patientRegister.query.customerOrgId;
  446. if (!customerOrgId) {
  447. alert("请选择单位或个人");
  448. return;
  449. }
  450. //console.log('customerOrgId',customerOrgId)
  451. this.patientRegister.patientRegisterId = "";
  452. // this.patientRegister.patientRegisterRd.photo = '';
  453. // this.patientRegister.patientRegisterRdInit.id = "";
  454. // this.patientRegister.patientRegisterRdInit.customerOrgId = this.patientRegister.query.customerOrgId;
  455. // this.patientRegister.addTimes++;
  456. // this.patientRegister.patientRegisterTimes++;
  457. this.patientRegister.patientRegisterRdInit.customerOrgId = this.patientRegister.query.customerOrgId;
  458. this.formInitData = { ...this.patientRegister.patientRegisterRdInit };
  459. this.patientRegister.patientRegisterAbs = [];
  460. this.dialogVisible = true;
  461. this.editTimes++; //触发表单窗口,数据更新
  462. this.getPatientRegisterAbs();
  463. },
  464. edit() {
  465. if (!this.patientRegister.patientRegisterRd.id) {
  466. alert("请选择要操作的记录");
  467. return;
  468. }
  469. //this.patientRegister.patientRegisterTimes++;
  470. this.getPatientRegisterAbs(this.patientRegister.patientRegisterRd.id);
  471. this.formInitData = { ...this.patientRegister.patientRegisterRd };
  472. this.dialogVisible = true;
  473. this.editTimes++; //触发表单窗口,数据更新
  474. },
  475. //拍照
  476. openCamera() {
  477. if (!this.patientRegister.patientRegisterId) {
  478. alert("请选择要操作的记录");
  479. return;
  480. }
  481. this.patientRegister.cameraVisble = true;
  482. },
  483. //删除(可批量删除)
  484. // /api/app/patient-register/many?PatientRegisterIds=3a0c2cac-f44c-f407-9504-c1fc5e80a159&PatientRegisterIds=3a0c2cb3-d10c-ed70-db6a-b835e75ce641
  485. del() {
  486. if (this.multipleSelection.length < 1) {
  487. alert("请先勾选要操作的记录");
  488. return;
  489. }
  490. let patientRegisterIds = [];
  491. for (let i = 0; i < this.multipleSelection.length; i++) {
  492. patientRegisterIds.push(this.multipleSelection[i]["id"]);
  493. }
  494. this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
  495. confirmButtonText: "确定",
  496. cancelButtonText: "取消",
  497. type: "warning",
  498. })
  499. .then(() => {
  500. //console.log('{patientRegisterIds}',{patientRegisterIds})
  501. return postapi(`/api/app/patient-register/delete-many`, {
  502. patientRegisterIds,
  503. });
  504. })
  505. .then((res) => {
  506. this.$message.success("删除成功");
  507. this.patientRegister.query.times++;
  508. this.patientRegister.patientRegisterId = "";
  509. })
  510. .catch(() => {
  511. this.$message({
  512. type: "info",
  513. message: "已取消删除",
  514. });
  515. });
  516. },
  517. //单个删除方式
  518. delBak() {
  519. if (!this.patientRegister.patientRegisterId) {
  520. alert("请选择要操作的记录");
  521. return;
  522. }
  523. this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
  524. confirmButtonText: "确定",
  525. cancelButtonText: "取消",
  526. type: "warning",
  527. })
  528. .then(() => {
  529. //console.log('${this.patientRegister.patientRegisterId}',this.patientRegister.patientRegisterId)
  530. return deletapi(`/api/app/patient-register/${this.patientRegister.patientRegisterId}`);
  531. })
  532. .then((res) => {
  533. this.$message.success("删除成功");
  534. this.patientRegister.query.times++;
  535. this.patientRegister.patientRegisterId = "";
  536. })
  537. .catch(() => {
  538. this.$message({ type: "info", message: "已取消删除", });
  539. });
  540. },
  541. ldddw(arrayData, key, value, display) {
  542. return dddw(arrayData, key, value, display);
  543. },
  544. lmoment(date, forMat) {
  545. return moment(new Date(date)).format(forMat);
  546. },
  547. //查询
  548. async query() {
  549. this.patientRegister.prList = [];
  550. const loading = this.$loading({
  551. lock: true,
  552. text: 'Loading',
  553. spinner: 'el-icon-loading',
  554. background: 'rgba(0, 0, 0, 0.7)'
  555. });
  556. let body = {}
  557. console.log(`this.patientRegister.query`, this.patientRegister.query)
  558. if (this.patientRegister.query.customerOrgFlag) {
  559. if (this.patientRegister.query.CustomerOrgParentId) {
  560. body.customerOrgId = this.patientRegister.query.CustomerOrgParentId
  561. } else {
  562. if (this.patientRegister.query.customerOrgId) body.customerOrgId = this.patientRegister.query.customerOrgId
  563. }
  564. }
  565. if (this.patientRegister.query.sex) body.sexId = this.patientRegister.query.sex
  566. if (this.patientRegister.query.patientName) body.patientName = this.patientRegister.query.patientName
  567. if (this.patientRegister.query.completeFlag) body.completeFlag = this.patientRegister.query.completeFlag
  568. //StartDate EndDate
  569. if (this.patientRegister.query.dateRange) {
  570. body.startDate = moment(new Date(this.patientRegister.query.dateRange[0])).format("yyyy-MM-DD")
  571. body.endDate = moment(new Date(this.patientRegister.query.dateRange[1])).format("yyyy-MM-DD")
  572. }
  573. if (this.patientRegister.query.idCardNo) body = { idNo: this.patientRegister.query.idCardNo }
  574. if (this.patientRegister.query.patientNo) body = { patientNo: this.patientRegister.query.patientNo }
  575. if (this.patientRegister.query.patientRegisterNo) body = { patientRegisterNo: this.patientRegister.query.patientRegisterNo }
  576. console.log('/api/app/patientregister/getlistinfilter', body)
  577. postapi('/api/app/patientregister/getlistinfilter', body)
  578. .then((res) => {
  579. if (res.code != -1) {
  580. this.patientRegister.prList = res.data.items;
  581. }
  582. loading.close();
  583. })
  584. .catch((err) => {
  585. loading.close();
  586. });
  587. // try {
  588. // let res =await postapi('/api/app/patientregister/getlistinfilter', body);
  589. // this.patientRegister.prList = res.data;
  590. // } catch (error) {
  591. // console.log("query error",error);
  592. // }
  593. },
  594. //右击菜单
  595. onCellRightClick(row, column) {
  596. this.rClickRow = { ...row }; //右击的行
  597. this.rClickColumn = { ...column }; //右击的列(预留)
  598. console.log(row, column.property);
  599. },
  600. onContextmenu(event) {
  601. //console.log('onContextmenu',event);
  602. if (!this.rClickRow) return false;
  603. let row = { ...this.rClickRow };
  604. this.$contextmenu({
  605. items: [
  606. {
  607. label: "发送检验申请",
  608. onClick: () => {
  609. this.lisRequest(row.id);
  610. }
  611. },
  612. {
  613. label: "预览检验条码",
  614. onClick: () => {
  615. this.lisPrint(row.id, '0002', true);
  616. }
  617. },
  618. {
  619. label: "打印检验条码",
  620. onClick: () => {
  621. this.lisPrint(row.id, '0002', false);
  622. }
  623. },
  624. {
  625. label: "预览Pacs条码",
  626. onClick: () => {
  627. this.pacsPrint(row.id, '0004', true);
  628. }
  629. },
  630. {
  631. label: "打印Pacs条码",
  632. onClick: () => {
  633. this.pacsPrint(row.id, '0004', false);
  634. }
  635. },
  636. ],
  637. event,
  638. //x: event.clientX,
  639. //y: event.clientY,
  640. customClass: "custom-class",
  641. zIndex: 3,
  642. minWidth: 80,
  643. });
  644. this.rClickRow = null;
  645. return false;
  646. },
  647. //批量更新分组按钮
  648. btnGroupBatch() {
  649. let customerOrgId = this.patientRegister.query.customerOrgId;
  650. if (!customerOrgId) {
  651. alert("请选择单位或个人");
  652. return;
  653. }
  654. if (this.multipleSelection.length < 1) {
  655. this.$message.info("请勾选要操作的人员!");
  656. return;
  657. }
  658. this.dialogGroup = true;
  659. },
  660. //批量更新分组处理
  661. async groupBatchHandle() {
  662. let groupBatch = { patientRegisterId: null, ...this.groupBatch };
  663. if (groupBatch.isReserveAddAsbitem) {
  664. groupBatch.isReserveAddAsbitem = 'Y';
  665. } else {
  666. groupBatch.isReserveAddAsbitem = 'N';
  667. }
  668. console.log('groupBatch', groupBatch);
  669. if (!groupBatch.customerOrgGroupId) {
  670. this.$message.warning("请选择分组");
  671. return;
  672. }
  673. for (let i = 0; i < this.multipleSelection.length; i++) {
  674. groupBatch.patientRegisterId = this.multipleSelection[i].id;
  675. try {
  676. await postapi('/api/app/patientregister/updatepatientregistercustomerorggroup', groupBatch);
  677. } catch (error) {
  678. console.log(error);
  679. }
  680. }
  681. this.dialogGroup = false;
  682. },
  683. remoteMethod(){
  684. },
  685. //快速选择项目
  686. quickChoosedAsb(){
  687. },
  688. //删除临时显示的组合项目
  689. removeAbs(row){
  690. let lfind = arrayExistObj(this.asbitemBatch.asbitemsTemp,'asbitemId',row.asbitemId);
  691. if(lfind > - 1){
  692. this.asbitemBatch.asbitemsTemp.slice(lfind,1);
  693. }
  694. },
  695. rowClickaAbitemCurr(row){
  696. this.asbitemBatch.asbitemCurr = row;
  697. },
  698. btnRemoveAbs(){
  699. if(!this.asbitemBatch.asbitemCurr.asbitemId){
  700. this.$message.warning("请选择要删除的组合项目!");
  701. return;
  702. }
  703. this.removeAbs(this.asbitemBatch.asbitemCurr);
  704. this.asbitemBatch.asbitemCurr.asbitemId = null;
  705. },
  706. removeAllAbs(){
  707. this.asbitemBatch.asbitemsTemp = [];
  708. },
  709. //批量更新项目
  710. asbBatch() {
  711. let customerOrgId = this.patientRegister.query.customerOrgId;
  712. if (!customerOrgId) {
  713. alert("请选择单位或个人");
  714. return;
  715. }
  716. this.dialogAsbitem = true;
  717. this.quickAsb = this.dict.asbItemAll;
  718. },
  719. asbitemBatchHandle(){
  720. },
  721. //检验申请
  722. async lisRequest(prId) {
  723. let isPrintLisRequest = false
  724. let res = null
  725. if (prId.length < 1) {
  726. this.$message.info("人员信息尚未保存,不可执行此操作!");
  727. return;
  728. }
  729. try {
  730. res = await postapi(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${prId}`);
  731. console.log(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${prId}`, res)
  732. } catch (error) {
  733. return;
  734. }
  735. if (res.Code != -1) {
  736. this.$message.info("发送检验申请成功!");
  737. isPrintLisRequest = true;
  738. }
  739. //重复申请,重打
  740. if (res.Code == -1 && res.Message.indexOf('已申请') > -1) {
  741. isPrintLisRequest = true;
  742. }
  743. if (!isPrintLisRequest) return;
  744. try {
  745. await this.$confirm("是否打印检验申请单?", "提示", {
  746. confirmButtonText: "是",
  747. cancelButtonText: "否",
  748. type: "info",
  749. showClose: false,
  750. closeOnClickModal: false,
  751. closeOnPressEscape: false,
  752. });
  753. } catch (error) {
  754. return;
  755. }
  756. //打印检验申请单
  757. this.lisPrint(prId, '0003', false);
  758. },
  759. //检验条码打印
  760. lisPrint(prId, ReportCode, isPreview) {
  761. let token = localStorage.getItem('token');
  762. let user = localStorage.getItem('user');
  763. let toOutShell = {
  764. ReportCode, token,
  765. preViewCanPrint: 'N',
  766. Parameters: [
  767. { Name: 'printer', Value: user },
  768. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  769. ],
  770. };
  771. if (isPreview) {
  772. //http://140.143.162.39:9529/api/app/printreport/getlisrequestreport?PatientRegisterId=3a0d2e90-da68-3746-6775-bf17e5f9b295
  773. //this.multipleSelection.forEach((item,index) =>{
  774. postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${prId}`)
  775. .then((res) => {
  776. if (res.code != -1) {
  777. toOutShell.ReportTable = { lisRequest: res.data };
  778. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  779. return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  780. }
  781. })
  782. .catch(err => {
  783. this.$message.warning(err);
  784. });
  785. // });
  786. } else {
  787. postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${prId}`)
  788. .then((res) => {
  789. if (res.code != -1) {
  790. toOutShell.ReportTable = { lisRequest: res.data };
  791. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  792. return this.$peisAPI.print(JSON.stringify(toOutShell));
  793. }
  794. })
  795. .then(res => {
  796. if (res.toLowerCase() == 'success') {
  797. //更新打印状态 /api/app/lisrequest/updatelisrequestisprint
  798. // {
  799. // "operateType": 0, 操作类型(1.按PatientRegisterId 2.按LisRequestId)
  800. // "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  801. // "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  802. // }
  803. return postapi('/api/app/lisrequest/updatelisrequestisprint', { operateType: 1, patientRegisterId: prId })
  804. }
  805. })
  806. .catch(err => {
  807. this.$message.warning(err);
  808. });
  809. }
  810. },
  811. //pacs条码打印
  812. pacsPrint(prId, ReportCode, isPreview) {
  813. let token = localStorage.getItem('token');
  814. let user = localStorage.getItem('user');
  815. let toOutShell = {
  816. ReportCode, token,
  817. preViewCanPrint: 'Y',
  818. Parameters: [
  819. { Name: 'printer', Value: user },
  820. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  821. ],
  822. };
  823. if (isPreview) {
  824. //http://140.143.162.39:9529/api/app/printreport/getpacsnoreport?PatientRegisterId=3a0c990e-5756-2dc0-19d5-69a617fe4048
  825. //this.multipleSelection.forEach((item,index) =>{
  826. postapi(`/api/app/printreport/getpacsnoreport?PatientRegisterId=${prId}`)
  827. .then((res) => {
  828. if (res.code != -1) {
  829. toOutShell.ReportTable = { lisRequest: res.data };
  830. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  831. return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  832. }
  833. })
  834. .catch(err => {
  835. this.$message.warning(err);
  836. });
  837. // });
  838. } else {
  839. postapi(`/api/app/printreport/getpacsnoreport?PatientRegisterId=${prId}`)
  840. .then((res) => {
  841. if (res.code != -1) {
  842. toOutShell.ReportTable = { lisRequest: res.data };
  843. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  844. return this.$peisAPI.print(JSON.stringify(toOutShell));
  845. }
  846. })
  847. .then(res => {
  848. if (res.toLowerCase() == 'success') {
  849. //更新打印状态 /api/app/lisrequest/updatelisrequestisprint
  850. // {
  851. // "operateType": 0, 操作类型(1.按PatientRegisterId 2.按LisRequestId)
  852. // "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  853. // "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  854. // }
  855. return postapi('/api/app/lisrequest/updatelisrequestisprint', { operateType: 1, patientRegisterId: prId })
  856. }
  857. })
  858. .catch(err => {
  859. this.$message.warning(err);
  860. });
  861. }
  862. },
  863. },
  864. //监听事件
  865. watch: {
  866. //触发查询事件
  867. "patientRegister.query.times"(newVal, oldVal) {
  868. if (newVal != oldVal) {
  869. //alert('触发查询事件')
  870. this.query();
  871. }
  872. },
  873. //新增后,触发赋值
  874. "patientRegister.patientRegisterRd.id"(newVal, oldVal) {
  875. if (newVal != oldVal) {
  876. //console.log('patientRegister.patientRegisterRd.customerOrgId',this.patientRegister.patientRegisterRd.customerOrgId)
  877. objCopy(this.patientRegister.patientRegisterRd, this.form);
  878. }
  879. },
  880. },
  881. };
  882. </script>
  883. <style scoped>
  884. .box {
  885. display: flex;
  886. }
  887. .listBtn {
  888. margin-top: 5px;
  889. text-align: center;
  890. }
  891. .btnClass {
  892. width: 110px;
  893. }
  894. </style>