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.

310 lines
12 KiB

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