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.

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