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.

377 lines
14 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
2 years ago
2 years ago
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. import Vue from "vue";
  2. import Vuex from "vuex";
  3. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  4. import { arrayReduce } from "@/utlis/proFunc";
  5. Vue.use(Vuex);
  6. export default new Vuex.Store({
  7. state: {
  8. changepassword: '',//用户密码
  9. set: "qqqq",
  10. importexcel: {
  11. },
  12. router: {
  13. path: '',
  14. },
  15. window: {
  16. pageHeight: 960, //页面高度
  17. pageWidth: 1920, //页面宽度
  18. },
  19. customerOrg: {
  20. //体检单位设置
  21. customerOrgTree: [], //体检单位列表
  22. treeprops: {
  23. label: "displayName",
  24. value: "id",
  25. children: "treeChildren",
  26. }, //树形组件的数据结构
  27. customerOrgId: "", //当前单位ID(可根据此值是否为空,判断是新增还是编辑)
  28. customerOrgRd: { id: "", isLock: "N", isActive: "Y", isLockBox: false, isActiveBox: true, }, //单个体检单位记录值
  29. customerOrgRegisterList: [{ id: 'uuid' }], //单位体检次数登记列表
  30. contactPersonList: [], //联系人列表
  31. contactMethodList: [], //联系方式列表
  32. orgEditStyle: '', //编辑表单样式
  33. orgDetailStyle: '', //体检次数样式
  34. orgDetailHeight: 300, //体检次数LIST表格高度
  35. personStyle: '', //联系人样式
  36. },
  37. //体检单位分组
  38. personnelUnit: {
  39. customerOrgGroupId: "",
  40. personnelgrouping: [], //人员分组
  41. id: "", //根据Id选择的数据
  42. form: { id: "" }, //列表每一项
  43. nogroupselected: [], //已选分组
  44. },
  45. //体检人员登记 add by pengjun
  46. patientRegister: {
  47. customerOrgTreeAll: [], //体检单位列表(含个人)
  48. patientRegisterId: "", //当前单位ID(可根据此值是否为空,判断是新增还是编辑)
  49. patientRegisterRd: { id: "" }, //体检人员记录
  50. patientRegisterTimes: 0, //体检人员登记窗口显示次数(弃用)
  51. addTimes: 0, //用于触发新增时初始化赋值
  52. saveTimes: 0, //用于体检登记时,触发分组调整保存
  53. photo: "/pic/Photo.jpg", //单独抽出,拍照时会更新
  54. cameraVisble: false, //拍照控件显示
  55. lisRequestVisble: false, //检验条码补打
  56. mergeAsbitemVisble: false, //合并项目
  57. patientRegisterRdInit: {
  58. id: "", //id
  59. patientId: "00000000-0000-0000-0000-000000000000", //档案号ID 选择了档案就传档案号,未选就传00000-0000...
  60. patientNo: "", //档案号
  61. customerOrgId: null, //单位编号
  62. customerOrgGroupId: null, //分组
  63. medicalPackageId: null, //套餐
  64. patientName: "", //姓名
  65. birthDate: "", //字符串 如:2012-01-29
  66. sexId: "U", //性别 默认未知U
  67. age: null, //年龄
  68. jobCardNo: "", //工卡号
  69. medicalCardNo: "", //体检卡号
  70. maritalStatusId: "9", //婚姻状况 默认未知
  71. medicalTypeId: null, //体检类别
  72. personnelTypeId: null, //人员类别
  73. jobPost: "", //职务
  74. jobTitle: "", //职称
  75. photo: "", //照片
  76. salesman: "", //介绍人
  77. sexHormoneTermId: null, //性激素期限
  78. isNameHide: "N", //隐藏姓名
  79. isPhoneFollow: "N", //电话随访
  80. isVip: "N", //vip客户
  81. remark: "", //
  82. isLock: "N", //是否锁住
  83. completeFlag: "1", //完成标志 0:预登记,1:未检,2:部份已检,3:已总检 【创建编辑时不操作】
  84. isMedicalStart: "N", //体检开始标志 【创建编辑时不操作】
  85. patientRegisterNo: "", //条码号 【创建编辑时不操作】
  86. medicalTimes: 1, //条码号 【创建编辑时不操作】
  87. organizationUnitId: null, //体检中心
  88. address: "", //地址
  89. email: "", //email
  90. idNo: "", //身份证号
  91. telephone: "", //电话
  92. mobileTelephone: "", //手机号
  93. nationId: null, //民族编号
  94. postalCode: "", //邮编
  95. creatorId: null,
  96. creationTime: "",
  97. lastModificationTime: "",
  98. lastModifierId: null,
  99. }, //体检人员记录(初始值)一般创建用
  100. customerOrgGroupAsb: [], //选中分组所包含的组合项目
  101. medicalPackageAsb: [], //选中套餐所包含的组合项目
  102. customerOrgGroupChange: 0, //控制体检列表记录切换时,0 无需触发更换分组操作
  103. medicalPackageChange: 0, //控制体检列表记录切换时,0 无需触发更换套餐操作
  104. query: {
  105. dateType: 'creationTime', //登记日期
  106. dateRange: null, //日期范围
  107. startDate: null,
  108. endDate: null,
  109. containRefuse: true, //包含弃检项目
  110. times: 0, //触发查询次数
  111. customerOrgId: "", //体检单位ID
  112. CustomerOrgParentId: "", //单位父级ID
  113. customerOrgFlag: true, //单位作为查询条件
  114. customerOrgRegister: {}, //单位体检次数
  115. checkAsbs: null,
  116. }, //查询条件
  117. customerOrgGroup: [], //分组(针对单位)
  118. patientRegisterAbs: [], //人员已选组合项目
  119. prList: [], //体检登记记录
  120. },
  121. //体检医生诊台
  122. doctorCheck: {
  123. prBase: {
  124. id: '', //体检登记ID
  125. }, //人员体检登记显示基本信息
  126. RegisterCheckEdit: {
  127. id: '',
  128. checkDoctorId: null,
  129. checkDate: '',
  130. completeFlag: '0',
  131. LastModificationTime: '',
  132. LastModifierId: null,
  133. isLock: 'N',
  134. isAudit: 'N',
  135. auditorUserId: null,
  136. auditTime: '',
  137. }, //组合项目详情
  138. doctorCheckDialogVisible: false,
  139. RegisterCheckList: [], //人员体检 组合项目列表
  140. RegisterCheck: {}, //单组合项目记录
  141. RegisterCheckId: '', //
  142. checkItemList: [], //组合项目包含的明细项目
  143. checkItem: {}, //单项目记录
  144. checkSummaryList: [], //小结
  145. checkSuggestionList: [], //建议
  146. },
  147. //总检医生
  148. sumDoctorCheck: {
  149. sumDoctorCheckDialogVisible: false,
  150. sumDiagnosisVisible:false,
  151. sumPREdit: {}, //总检医生时间等相关信息(sumPREditInit)
  152. summaryList: [], //综述
  153. suggestionList: [], //建议
  154. diagnosisList: [], //诊断
  155. },
  156. report: {
  157. dialogCusOrgOCX: false, //通用单位查询控件显示
  158. dataCusOrgOCX: [], //通用单位查询的数据
  159. dialogAsbitemOCX: false,
  160. dataAsbitemOCX: [], //通用组合项目查询的数据
  161. },
  162. //公共字典数据 add by pengjun
  163. dict: {
  164. personOrgId: "00000000-0000-0000-0000-000000000000", //个人体检单位ID
  165. organization: [], //体检中心
  166. sex: [], //性别(人员档案用)
  167. forSex: [], //适用性别
  168. medicalType: [], //体检类别
  169. personnelType: [], //人员类别
  170. maritalStatus: [], //婚姻状况
  171. sexHormoneTerm: [], //性激素期
  172. nation: [], //民族
  173. birthPlace: [], //籍惯 ,出生地
  174. completeFlag: [
  175. //体检完成标志
  176. { id: "0", displayName: "预登记" },
  177. { id: "1", displayName: "正式登记" },
  178. { id: "2", displayName: "部份已检" },
  179. { id: "3", displayName: "已总检" },
  180. ],
  181. checkCompleteFlag: [
  182. //体检完成标志
  183. { id: "0", displayName: "未检" },
  184. { id: "1", displayName: "已检" },
  185. { id: "2", displayName: "弃检" },
  186. ],
  187. sumAudit: [
  188. //总检审核
  189. { id: "Y", displayName: "已审核" },
  190. { id: "N", displayName: "未审核" }
  191. ],
  192. payType: [
  193. //支付方式,比如是0自费、2免费、1单位支付
  194. { id: "0", displayName: "个人支付" },
  195. { id: "1", displayName: "单位支付" },
  196. { id: "2", displayName: "赠送" },
  197. ],
  198. cardMode: [
  199. { id: "0", displayName: "充值卡" },
  200. { id: "1", displayName: "积分卡" },
  201. ],
  202. cardType: [], //会员卡类别
  203. billFlag: [
  204. { id: "0", displayName: "收费" },
  205. { id: "1", displayName: "退费" },
  206. { id: "2", displayName: "充值" },
  207. ],
  208. checkTypeFlag: [
  209. { id: "0", displayName: "检验" },
  210. { id: "1", displayName: "功能检查" },
  211. ],
  212. medicalPackage: [], //所有套餐
  213. customerOrgGroupAll: [], //所有分组,不限单位,不限次数
  214. customerOrg: [], //所有单位,非树结构
  215. payMode: [], //支付方式
  216. itemTypeTree: [], //体检类别 树结构
  217. asbItemAll: [], //所有组合项目
  218. asbItem: [], //显示的 未选组合项目
  219. asbItemQuick: [], //显示的 未选组合项目(供快速选择)
  220. },
  221. //项目特有的对象数据
  222. projPriv:{
  223. idNos:{
  224. Code: "Success", //读取成功/失败
  225. Name: "刘滔",
  226. Sex: "男",
  227. Nation: "汉",
  228. Birthday: "1986-01-22",
  229. Address: "湖南省长沙县春华镇九木村新元组367号",
  230. DepartmentIC: "长沙县公安局",
  231. StartDateIC: "2019-11-25",
  232. EndDateIC: "2039-11-25",
  233. IDCode: "430121198601223693",
  234. Photo: "base64编码字符串"
  235. }, //读取身份证信息
  236. },
  237. },
  238. getters: {
  239. },
  240. mutations: {
  241. //同步更改状态
  242. //通用设置 state 值 option {key:,value:} add by pengjun
  243. setData(state, option) {
  244. let array = option.key.split(".");
  245. switch (array.length) {
  246. case 1:
  247. state[array[0]] = option.value;
  248. break;
  249. case 2:
  250. state[array[0]][array[1]] = option.value;
  251. break;
  252. case 3:
  253. state[array[0]][array[1]][array[2]] = option.value;
  254. break;
  255. case 4:
  256. state[array[0]][array[1]][array[2]][array[3]] = option.value;
  257. break;
  258. }
  259. },
  260. doctorCheckPrBaseInit(state) {
  261. state.doctorCheck.prBase = {
  262. id: '', //体检登记ID
  263. patientRegisterNo: '', //条码号
  264. patientNo: '', //档案号
  265. patientName: '', //姓名
  266. sexId: '', //性别
  267. medicalTimes: '', //体检次数
  268. maritalStatusId: '', //婚姻
  269. creationTime: '', //体检日期
  270. customerOrgParentName: '', //单位
  271. customerOrgName: '', //部门
  272. medicalTypeId: '', //体检类别
  273. personnelTypeId: '', //人员类别
  274. nationId: '', //民族
  275. mobileTelephone: '', //手机
  276. } //人员体检登记显示基本信息
  277. },
  278. sumPREditInit(state) {
  279. state.sumDoctorCheck.sumPREdit = {
  280. id: '', //体检登记ID
  281. completeFlag: '', //完成状态
  282. summaryDoctor: '', //总检医生
  283. summaryDate: '', //总检日期
  284. isAudit: '', //审核状态
  285. auditDoctor: '', //审核医生
  286. auditDate: '', //审核日期
  287. isLock: '', //锁定状态
  288. patientId: '', //人员档案ID
  289. } //人员体检登记显示基本信息
  290. },
  291. },
  292. actions: {
  293. //获取体检人员所选组合项目
  294. getPatientRegisterAbs(context, id) {
  295. //console.log(`vuex getPatientRegisterAbs /api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`, context.state.dict.asbItemAll)
  296. if (id) {
  297. getapi(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`).then(
  298. (res) => {
  299. console.log(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`, res)
  300. if (res.code == 1) {
  301. let patientRegisterAbs = []
  302. res.data.forEach(e => {
  303. e.standTotal = e.amount * e.standardPrice
  304. e.total = e.amount * e.chargePrice
  305. patientRegisterAbs.push(e)
  306. });
  307. context.commit("setData", {
  308. key: "patientRegister.patientRegisterAbs",
  309. value: patientRegisterAbs,
  310. });
  311. context.commit("setData", {
  312. key: "dict.asbItem",
  313. value: arrayReduce(
  314. [...context.state.dict.asbItem],
  315. [...context.state.patientRegister.patientRegisterAbs],
  316. "id=asbitemId"
  317. ),
  318. });
  319. context.commit("setData", {
  320. key: "dict.asbItemQuick",
  321. value: arrayReduce([...context.state.dict.asbItemAll], [...context.state.patientRegister.patientRegisterAbs], "id=asbitemId"),
  322. });
  323. //console.log(`getPatientRegisterAbs ${id}`,context.state.dict.asbItemQuick)
  324. }
  325. }
  326. );
  327. } else {
  328. context.commit("setData", {
  329. key: "patientRegister.patientRegisterAbs",
  330. value: [],
  331. });
  332. context.commit("setData", {
  333. key: "dict.asbItem",
  334. value: [...context.state.dict.asbItemAll],
  335. });
  336. context.commit("setData", {
  337. key: "dict.asbItemQuick",
  338. value: [...context.state.dict.asbItemAll],
  339. });
  340. }
  341. },
  342. //获取单位分组 /api/app/customer-org-group/in-customer-org-id/3a0c0444-d7a0-871f-4074-19faf1655caf
  343. getCustomerOrgGroup(context, customerOrgld) {
  344. console.log(`vuex /api/app/customer-org-group/in-customer-org-id/${customerOrgld}`);
  345. getapi(`/api/app/customer-org-group/in-customer-org-id/${customerOrgld}`)
  346. .then((res) => {
  347. console.log("vuex getCustomerOrgGroup", res.data);
  348. if (res.code == 1) {
  349. //this.patientRegister.customerOrgGroup = res.data
  350. context.commit("setData", {
  351. key: "patientRegister.customerOrgGroup",
  352. value: res.data,
  353. });
  354. }
  355. });
  356. },
  357. },
  358. modules: {},
  359. });