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.

417 lines
16 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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; flex-wrap: wrap; width: 100%;height:140px; " >
  5. <div v-if="winAbsolute" style="position: absolute;top:3px;right:0px;">
  6. <el-tooltip content="关闭人员列表窗口" placement="bottom" effect="light">
  7. <i class="el-icon-close" @click="doctorCheck.doctorCheckDialogVisible = false;sumDoctorCheck.sumDoctorCheckDialogVisible = false;"
  8. style="font-size: 24px;color: red;cursor:pointer;"></i>
  9. </el-tooltip>
  10. </div>
  11. <div class="query" style="display: flex;">
  12. <el-input placeholder="请选择体检单位" v-model="patientRegister.query.cusOrgOCX" style="width:238px;" size="small" disabled>
  13. </el-input>
  14. <el-button icon="el-icon-search" @click="report.dialogCusOrgOCX = true" style="font-size: 20px;height:30px;min-width:30px; padding: 5px 5px;" size="small"></el-button>
  15. </div>
  16. <div class="query">
  17. <span>姓名</span>
  18. <el-input placeholder="姓名" v-model="patientRegister.query.patientName" size="small" clearable
  19. style="width: 100px" />
  20. </div>
  21. <div class="query">
  22. <span>性别</span>
  23. <el-select v-model="patientRegister.query.sex" placeholder="请选择" clearable style="width: 80px" size="small">
  24. <el-option v-for="item in dict.forSex" :key="item.id" :label="item.displayName" :value="item.id">
  25. </el-option>
  26. </el-select>
  27. </div>
  28. <div class="query">
  29. <span>检查状态</span>
  30. <el-select v-model="patientRegister.query.completeFlag" placeholder="请选择" clearable style="width: 80px"
  31. size="small">
  32. <el-option v-for="item in local.completeFlag" :key="item.id" :label="item.displayName" :value="item.id">
  33. </el-option>
  34. </el-select>
  35. <el-select v-model="patientRegister.query.isAudit" placeholder="请选择" clearable style="width: 75px;margin: 0 2px;"
  36. size="small">
  37. <el-option label="未审核" value="N"/>
  38. <el-option label="已审核" value="Y"/>
  39. </el-select>
  40. <el-checkbox v-if="win == 'doctorCheck' ? true:false" v-model="local.query.haveImage">有图</el-checkbox>
  41. </div>
  42. <div class="query" v-if="win == 'doctorCheck' ? true:false">
  43. <span>组合项目</span>
  44. <el-select v-model="local.query.checkAsb" placeholder="快速选择组合项目" size="small"
  45. filterable :filter-method="filterMethod"
  46. clearable @clear="quickAsb = deepCopy(asbItemQuick)"
  47. default-first-option ref="quickAsbOCX"
  48. style="width:157px;text-align: left;">
  49. <el-option v-for="item in quickAsb" :key="item.id" :value="item.id" :label="item.displayName" />
  50. </el-select>
  51. </div>
  52. <div class="query">
  53. <el-button class="commonbutton" type="primary" @click="query" size="small" style="width:60px;height:26px;padding: 5px 0 5px 0px;">查询</el-button>
  54. </div>
  55. </div>
  56. <!-- 人员列表 -->
  57. <el-table :data="dataList" border width="100%" :height="winAbsolute ? (window.pageHeight - 42 - 120 - 30) : (window.pageHeight - 42 - 120)" row-key="id" size="small"
  58. highlight-current-row @row-click="rowClick" @row-dblclick="rowDblclick" ref="dataList" style="border-radius:10px;">
  59. <el-table-column prop="customerOrgParentName" label="单位" width="120">
  60. <template slot-scope="scope">
  61. <div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgParentName : scope.row.customerOrgName }}</div>
  62. </template>
  63. </el-table-column>
  64. <el-table-column prop="customerOrgName" label="部门" width="100">
  65. <template slot-scope="scope">
  66. <div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgName : "" }}</div>
  67. </template>
  68. </el-table-column>
  69. <el-table-column prop="patientName" label="姓名" width="80"/>
  70. <el-table-column prop="sexId" label="性别">
  71. <template slot-scope="scope">
  72. <div>{{ ldddw(dict.sex, "id", scope.row.sexId, "displayName") }}</div>
  73. </template>
  74. </el-table-column>
  75. <el-table-column prop="age" label="年龄" />
  76. <el-table-column prop="patientRegisterNo" label="条码号" width="150" />
  77. <el-table-column prop="patientNo" label="档案号" />
  78. <el-table-column prop="medicalTimes" label="体检次数"></el-table-column>
  79. <el-table-column label="分组/套餐" width="150">
  80. <template slot-scope="scope">
  81. <div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId === dict.personOrgId">
  82. {{ ldddw(dict.medicalPackage, "id", scope.row.medicalPackageId, "displayName") }}
  83. </div>
  84. <div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId !== dict.personOrgId">
  85. {{ ldddw(dict.customerOrgGroupAll, "id", scope.row.customerOrgGroupId, "displayName") }}
  86. </div>
  87. </template>
  88. </el-table-column>
  89. <el-table-column prop="nationId" label="民族">
  90. <template slot-scope="scope">
  91. <div>
  92. {{ ldddw(dict.nation, "id", scope.row.nationId, "displayName") }}
  93. </div>
  94. </template>
  95. </el-table-column>
  96. <el-table-column prop="idNo" label="身份证" width="150" />
  97. <el-table-column prop="birthDate" label="出生日期" width="100">
  98. <template slot-scope="scope">
  99. <div v-if="scope.row.birthDate">
  100. {{ lmoment(scope.row.birthDate, "yyyy-MM-DD") }}
  101. </div>
  102. </template>
  103. </el-table-column>
  104. <el-table-column prop="email" label="邮箱" width="150" />
  105. <el-table-column prop="mobileTelephone" label="手机" width="100" />
  106. <el-table-column prop="telephone" label="电话" width="100" />
  107. <el-table-column prop="address" label="地址" width="300" />
  108. <el-table-column prop="medicalCardNo" label="体检卡号" />
  109. <el-table-column prop="jobCardNo" label="工卡号" />
  110. <el-table-column prop="maritalStatusId" label="婚姻状况">
  111. <template slot-scope="scope">
  112. <div>
  113. {{ ldddw(dict.maritalStatus, "id", scope.row.maritalStatusId, "displayName") }}
  114. </div>
  115. </template>
  116. </el-table-column>
  117. <el-table-column prop="medicalTypeId" label="体检类别">
  118. <template slot-scope="scope">
  119. <div v-if="scope.row.medicalTypeId !== dict.personOrgId">
  120. {{ ldddw(dict.medicalType, "id", scope.row.medicalTypeId, "displayName") }}
  121. </div>
  122. </template>
  123. </el-table-column>
  124. <el-table-column prop="personnelTypeId" label="人员类别">
  125. <template slot-scope="scope">
  126. <div v-if="scope.row.personnelTypeId !== dict.personOrgId">
  127. {{ ldddw(dict.personnelType, "id", scope.row.personnelTypeId, "displayName") }}
  128. </div>
  129. </template>
  130. </el-table-column>
  131. <el-table-column prop="jobPost" label="职务" />
  132. <el-table-column prop="jobTitle" label="职称" />
  133. <el-table-column prop="salesman" label="介绍人" />
  134. <el-table-column prop="isVip" label="是否VIP">
  135. <template slot-scope="scope">
  136. <div>{{ scope.row.isVip == "Y" ? "是" : "否" }}</div>
  137. </template>
  138. </el-table-column>
  139. <el-table-column prop="creatorName" label="登记人" />
  140. <el-table-column prop="creationTime" label="登记日期" width="100">
  141. <template slot-scope="scope">
  142. <div>{{ lmoment(scope.row.creationTime, "yyyy-MM-DD") }}</div>
  143. </template>
  144. </el-table-column>
  145. <el-table-column prop="isUpload" label="是否上传">
  146. <template slot-scope="scope">
  147. <div>{{ scope.row.isUpload == "Y" ? "是" : "否" }}</div>
  148. </template>
  149. </el-table-column>
  150. <el-table-column prop="completeFlag" label="体检进度">
  151. <template slot-scope="scope">
  152. <div>{{ ldddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}</div>
  153. </template>
  154. </el-table-column>
  155. <el-table-column prop="isLock" label="锁住">
  156. <template slot-scope="scope">
  157. <div>{{ scope.row.isLock == "Y" ? "是" : "否" }}</div>
  158. </template>
  159. </el-table-column>
  160. </el-table>
  161. <!--通用选单位体检次数分组的控件-->
  162. <el-dialog title="体检单位选择" :visible.sync="report.dialogCusOrgOCX"
  163. :close-on-click-modal="false" :append-to-body="true" width="800px" height="600px">
  164. <CusOrgOCX :useCustomerOrg="false" :initDateType="'medicalStartDate'"/>
  165. </el-dialog>
  166. </div>
  167. </template>
  168. <script>
  169. import moment from "moment";
  170. import { mapState, mapMutations } from "vuex";
  171. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  172. import { dddw, objCopy, arrayReduce,deepCopy } from "../../utlis/proFunc"
  173. import CusOrgOCX from "../../components/report/CusOrgOCX.vue"
  174. export default {
  175. components: {
  176. CusOrgOCX,
  177. },
  178. props: ['win','winAbsolute'],
  179. data() {
  180. return {
  181. dataList: [], //列表数据
  182. multipleSelection: [], //选中的数据列表
  183. dialogVisible: false,
  184. dialogCamera: false,
  185. local:{
  186. query:{
  187. haveImage:false,
  188. checkAsb:'', //检查项目
  189. },
  190. completeFlag:[]
  191. },
  192. quickAsb: [],
  193. asbItemQuick:[],
  194. };
  195. },
  196. created() {
  197. this.dictInit()
  198. },
  199. //挂载完成
  200. mounted() { },
  201. computed: {
  202. ...mapState(["window","dataTransOpts", "dict", "patientRegister", "customerOrg", "doctorCheck", "sumDoctorCheck","report"]),
  203. },
  204. methods: {
  205. ...mapMutations(['doctorCheckPrBaseInit', 'sumPREditInit']),
  206. dictInit(){
  207. // 默认 当天 体检日期
  208. let today = moment(new Date()).format('yyyy-MM-DD');
  209. this.report.dataCusOrgOCX = [{
  210. id: Date.now(),
  211. customerOrgId: "",
  212. customerOrgName: "",
  213. customerOrgRegister: {},
  214. customerOrgRegisterList: [],
  215. dateType: "medicalStartDate",
  216. startDate: today,
  217. endDate: today,
  218. customerOrgGroupIds: [],
  219. customerOrgGroupList: []
  220. }]
  221. this.patientRegister.query.cusOrgOCX = `(体检${today}~${today})`
  222. // 获取组合项目
  223. postapi('/api/app/asbitem/GetBasicList',{isFilterActive:'Y'}).then(res =>{
  224. if(res.code != -1){
  225. this.asbItemQuick = res.data
  226. this.quickAsb = res.data
  227. }
  228. });
  229. this.local.completeFlag = deepCopy(this.dict.completeFlag)
  230. this.local.completeFlag.splice(0,1) //预记选项去掉
  231. },
  232. //快速选择组合项目时,调整可按拼间简码及简称查找
  233. filterMethod(keyWords) {
  234. //console.log('filterMethod',this.asbItemQuick)
  235. if (keyWords) {
  236. this.quickAsb = [];
  237. this.asbItemQuick.forEach(item => {
  238. if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  239. || item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  240. || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1) {
  241. this.quickAsb.push(item);
  242. }
  243. });
  244. } else {
  245. this.quickAsb = deepCopy(this.asbItemQuick);
  246. }
  247. },
  248. //快速选择组合项目
  249. // quickChoosedAsb(v) {
  250. // //远程查询时,设置了 value-key 也不管用,只能取到value console.log('quickChoosedAsb',v)
  251. // let lfind = -1
  252. // if (v) {
  253. // lfind = arrayExistObj(this.asbItemQuick, 'id', v)
  254. // if (lfind > -1) {
  255. // this.addAbs([this.asbItemQuick[lfind]])
  256. // }
  257. // }
  258. // //this.$refs['quickAsbOCX'].focus(); //asbItemId
  259. // this.$nextTick(() => {
  260. // this.$refs['quickAsbOCX'].blur(); //total asbItemId
  261. // this.asbItemId = ''
  262. // this.quickAsb = deepCopy(this.asbItemQuick)
  263. // this.$refs['quickAsbOCX'].focus(); //total asbItemId
  264. // });
  265. // },
  266. //点击体检次数行
  267. rowClick(row) {
  268. this.dataTransOpts.tableS.patient_register = deepCopy(row)
  269. // setTimeout(() => {
  270. this.dataTransOpts.refresh.patient_register.S++ //人员体检登记信息刷新
  271. // }, 10);
  272. this.doctorCheckPrBaseInit()
  273. this.doctorCheck.prBase.patientRegisterNo = row.patientRegisterNo
  274. objCopy(row, this.doctorCheck.prBase) //基本信息
  275. this.patientRegister.photo = row.photo
  276. this.sumPREditInit()
  277. objCopy(row, this.sumDoctorCheck.sumPREdit) //总检信息
  278. },
  279. //双击选中客户记录后,并半闭列表
  280. rowDblclick(row){
  281. this.rowClick(row)
  282. if(this.win == 'doctorCheck'){
  283. this.doctorCheck.doctorCheckDialogVisible = false
  284. }else{
  285. this.sumDoctorCheck.sumDoctorCheckDialogVisible = false
  286. }
  287. },
  288. ldddw(arrayData, key, value, display) {
  289. return dddw(arrayData, key, value, display);
  290. },
  291. lmoment(date, forMat) {
  292. return moment(new Date(date)).format(forMat);
  293. },
  294. //查询
  295. query() {
  296. let body = {},customerOrgs=[]
  297. console.log('this.report.dataCusOrgOCX',this.report.dataCusOrgOCX)
  298. if (this.report.dataCusOrgOCX.length > 0) {
  299. this.report.dataCusOrgOCX.forEach(e => {
  300. let rd = {
  301. startDate: moment(e.startDate).format('yyyy-MM-DD'),
  302. endDate: moment(e.endDate).format('yyyy-MM-DD'),
  303. dateType: e.dateType == 'summaryDate' ? '3':(e.dateType == 'medicalStartDate' ? '2':'1')
  304. }
  305. if (e.customerOrgId) {
  306. rd.customerOrgId = e.customerOrgId
  307. if(e.customerOrgId == this.dict.personOrgId){
  308. rd.customerOrgRegisterId = null
  309. rd.customerOrgGroupId = []
  310. }else{
  311. rd.customerOrgRegisterId = e.customerOrgRegister.id
  312. rd.customerOrgGroupId = e.customerOrgGroupIds
  313. }
  314. }
  315. customerOrgs.push(rd)
  316. })
  317. }
  318. body.customerOrgs = customerOrgs
  319. if(this.patientRegister.query.patientName) body.patientName = this.patientRegister.query.patientName
  320. if(this.patientRegister.query.sex) body.sexId = this.patientRegister.query.sex
  321. if(this.patientRegister.query.isAudit) body.isAudit = this.patientRegister.query.isAudit
  322. if(this.patientRegister.query.completeFlag) body.completeFlag = this.patientRegister.query.completeFlag
  323. if(this.local.query.checkAsb) body.asbitems = [this.local.query.checkAsb]
  324. if(this.local.query.haveImage) body.isPicture = 'Y'
  325. body.maxResultCount = 1000
  326. body.isFilterPreRegistration = 'Y' //是否需要过滤预登记数据 Y=过滤预登记数据 N=不过滤 默认为N (备注:只有CompleteFlag参数的值不为0的情况才有效,null值也有效)
  327. // "patientName": "string",
  328. // "sexId": "string",
  329. // "isAudit": "string",
  330. // "completeFlag": "string",
  331. // "maxResultCount": 0
  332. console.log('/api/patientregister/getpeisrecordlist', body)
  333. // const loading = this.$loading({
  334. // lock: true,
  335. // text: "Loading",
  336. // spinner: "el-icon-loading",
  337. // background: "rgba(0, 0, 0, 0.7)",
  338. // });
  339. postapi('/api/patientregister/getpeisrecordlist', body)
  340. .then((res) => {
  341. if(res.code != -1){
  342. this.dataList = res.data.items;
  343. }
  344. })
  345. // .finally(() =>{
  346. // loading.close();
  347. // })
  348. ;
  349. },
  350. //关闭
  351. close() {
  352. //console.log('this.win',this.win)
  353. if (this.win == 'doctorCheck') {
  354. this.doctorCheck.doctorCheckDialogVisible = false
  355. } else {
  356. this.sumDoctorCheck.sumDoctorCheckDialogVisible = false
  357. }
  358. },
  359. },
  360. //监听事件
  361. watch: {
  362. },
  363. };
  364. </script>
  365. <style scoped>
  366. .box {
  367. display: flex;
  368. }
  369. .query {
  370. margin-left: 5px;
  371. margin-bottom: 2px;
  372. font-size: 14px;
  373. }
  374. .listBtn {
  375. margin-top: 10px;
  376. }
  377. </style>