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.

225 lines
7.9 KiB

3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 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
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
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
3 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
  1. <template>
  2. <div style="display: flex;">
  3. <div :style="'margin-left: 5px;display: flex; flex-wrap: wrap; height:100px;width:' + (window.pageWidth - (orgEnable=='Y' ? 0:200) - 110 - 50) + 'px;'">
  4. <div class="query">
  5. <span class="spanClass">登记日期</span>
  6. <el-date-picker v-model="patientRegister.query.startDate" type="date" placeholder="起始日期" size="small" style="width:90px;"/>
  7. <span class="spanClass"></span>
  8. <el-date-picker v-model="patientRegister.query.endDate" type="date" placeholder="截止日期" size="small" style="width:90px;"/>
  9. </div>
  10. <div class="query">
  11. <span class="spanClass">条码号</span>
  12. <el-input placeholder="条码号" v-model="patientRegister.query.patientRegisterNo" size="small" clearable
  13. style="width: 130px" />
  14. </div>
  15. <div class="query">
  16. <span class="spanClass">档案号</span>
  17. <el-input placeholder="档案号" v-model="patientRegister.query.patientNo" size="small" clearable
  18. style="width: 110px" />
  19. </div>
  20. <div class="query">
  21. <span class="spanClass">姓名</span>
  22. <el-input placeholder="姓名" v-model="patientRegister.query.patientName" size="small" clearable
  23. style="width: 80px" />
  24. </div>
  25. <div class="query">
  26. <span class="spanClass">性别</span>
  27. <el-select v-model="patientRegister.query.sex" placeholder="请选择" style="width: 80px" size="small">
  28. <el-option v-for="item in dict.forSex" :key="item.id" :label="item.displayName" :value="item.id">
  29. </el-option>
  30. </el-select>
  31. </div>
  32. <div class="query">
  33. <span class="spanClass">手机号</span>
  34. <el-input placeholder="手机号/电话" v-model="patientRegister.query.phone" size="small" clearable
  35. style="width: 100px" />
  36. </div>
  37. <div class="query">
  38. <span class="spanClass">身份证号</span>
  39. <el-input placeholder="身份证号" v-model="patientRegister.query.idCardNo" size="small" clearable
  40. style="width: 150px" />
  41. </div>
  42. <div class="query">
  43. <el-checkbox v-model="patientRegister.query.customerOrgFlag">单位作为查询条件</el-checkbox>
  44. <el-cascader v-model="patientRegister.query.customerOrgId" :options="patientRegister.customerOrgTreeAll"
  45. :props="{checkStrictly: true,expandTrigger: 'hover',...customerOrg.treeprops,}" placeholder="请选择单位"
  46. :show-all-levels="false" clearable :disabled="orgEnable == 'Y' ? false : true" size="small" style="width:120px;">
  47. </el-cascader>
  48. </div>
  49. <div class="query">
  50. <span class="spanClass">次数</span>
  51. <el-select
  52. v-model="patientRegister.query.customerOrgRegister"
  53. placeholder="次数" @change="changeCustomerOrgRegister"
  54. style="width: 60px;"
  55. size="small"
  56. value-key="id"
  57. >
  58. <el-option
  59. v-for="item in customerOrgRegisterList"
  60. :key="item.id"
  61. :label="item.medicalTimes"
  62. :value="item"
  63. />
  64. </el-select>
  65. </div>
  66. <div class="query">
  67. <span class="spanClass">状态</span>
  68. <el-select v-model="patientRegister.query.completeFlag" placeholder="请选择" clearable style="width: 80px"
  69. size="small">
  70. <el-option v-for="item in dict.completeFlag" :key="item.id" :label="item.displayName" :value="item.id">
  71. </el-option>
  72. </el-select>
  73. </div>
  74. </div>
  75. <!-- 按钮区域 -->
  76. <div style="margin-left: 10px;">
  77. <div v-show="checkPagePriv(pagePriv.privs,'查询')" class="listBtn">
  78. <el-button class="btnClass" @click="btnQuery">查询</el-button>
  79. </div>
  80. <div v-show="checkPagePriv(pagePriv.privs,'读身份证')" class="listBtn">
  81. <el-button type="danger" class="btnClass" @click="readIdCard">读身份证</el-button>
  82. </div>
  83. </div>
  84. </div>
  85. </template>
  86. <script>
  87. import { mapState } from "vuex";
  88. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  89. import { getPagePriv,checkPagePriv, parsIcCardtoLocal, deepCopy} from '../../utlis/proFunc'
  90. export default {
  91. components: {},
  92. props: ["orgEnable"],
  93. data() {
  94. return {
  95. pagePriv:{
  96. routeUrlorPageName:'patientRegister', //当前页面归属路由或归属页面权限名称
  97. privs:[] // 页面权限
  98. },
  99. dialogVisible: false,
  100. customerOrgRegisterList:[],
  101. };
  102. },
  103. created() {
  104. //获取用户当前页面的权限
  105. let userPriv = window.sessionStorage.getItem('userPriv')
  106. if(userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
  107. let ldate = new Date();
  108. this.patientRegister.query.startDate = ldate;
  109. this.patientRegister.query.endDate = ldate;
  110. },
  111. //挂载完成
  112. mounted() { },
  113. computed: {
  114. ...mapState(["window", "dict", "patientRegister", "customerOrg"]),
  115. },
  116. methods: {
  117. checkPagePriv,
  118. //查询
  119. btnQuery() {
  120. this.patientRegister.query.times++;
  121. console.log("this.patientRegister.query", this.patientRegister.query);
  122. },
  123. changeCustomerOrgRegister(v){
  124. this.patientRegister.query.startDate = new Date(v.beginTime)
  125. if(v.isComplete == 'Y'){
  126. this.patientRegister.query.endDate = new Date(v.endTime)
  127. }else{
  128. this.patientRegister.query.endDate = new Date()
  129. }
  130. },
  131. //读身份证
  132. readIdCard() {
  133. if(!this.$peisAPI) {
  134. this.$message.info("此功能,需要在壳客户端才可运行!")
  135. return
  136. }
  137. this.$peisAPI.peopleIcCard().then(res => {
  138. console.log('peopleIcCard',res)
  139. let lres = JSON.parse(res)
  140. if (lres.code >= 0) {
  141. let idNos = parsIcCardtoLocal(lres.data, this.dict.sex, this.dict.nation)
  142. // this.form.patientName = idNos.Name
  143. // this.form.birthDate = idNos.birthDate
  144. // this.form.sexId = idNos.sexId
  145. // this.form.age = idNos.age
  146. // this.form.nationId = idNos.nationId
  147. // this.form.idNo = idNos.IDCode
  148. // this.form.address = idNos.Address
  149. // this.patientRegister.photo = 'data:image/bmp;base64,' + idNos.Photo
  150. this.patientRegister.query.patientName = idNos.Name
  151. this.patientRegister.query.sex = idNos.sexId
  152. this.patientRegister.query.idCardNo = idNos.IDCode
  153. }
  154. })
  155. },
  156. },
  157. watch:{
  158. 'patientRegister.query.customerOrgId'(newVal,oldVal){
  159. // console.log('patientRegister.query.customerOrgId',newVal,oldVal)
  160. if(newVal != oldVal){
  161. if(!newVal || newVal == this.dict.personOrgId){
  162. this.patientRegister.query.customerOrgRegister = null
  163. this.customerOrgRegisterList = []
  164. // this.patientRegister.query.times++
  165. }else{
  166. getapi(`/api/app/customer-org/parent/${newVal}
  167. `).then(res => {
  168. if(res.code != - 1){
  169. return getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${res.data}`)
  170. }
  171. }).then(res => {
  172. if (res.code != -1) {
  173. this.customerOrgRegisterList = res.data;
  174. if (res.data.length > 0) {
  175. this.patientRegister.query.customerOrgRegister = res.data[res.data.length - 1];
  176. this.changeCustomerOrgRegister(res.data[res.data.length - 1])
  177. }
  178. // this.patientRegister.query.times++
  179. // console.log('this.patientRegister.query.customerOrgRegister',this.patientRegister.query.customerOrgRegister)
  180. }
  181. });
  182. }
  183. }
  184. },
  185. },
  186. }
  187. </script>
  188. <style scoped>
  189. @import "../../assets/css/global_button.css";
  190. @import "../../assets/css/global_input.css";
  191. .query {
  192. margin-right: 10px;
  193. }
  194. .listBtn {
  195. margin-top: 5px;
  196. text-align: center;
  197. }
  198. .btnClass {
  199. /* position: absolute; */
  200. /* left: 0;
  201. top: 0; */
  202. width: 100px;
  203. }
  204. .spanClass{
  205. font-size: 14px;
  206. }
  207. </style>