12345678910111213141516171819202122232425262728293031 |
- import {json} from '@utils/ajax';
- import store from '@store';
- import {getUrlArgObject} from '@utils/tools';
- import { GET_PREC_LIST,SET_PREC_SHOW } from "../types/preIcss";
- import config from '@config/index';
- export const getPreMsg = () => {
- // return (dispatch) => {
- // let baseList = getState();
- // let state = baseList.patInfo.message;
- const inCode = config.preIcss.recordIdVal===-1?getUrlArgObject("recordId"):config.preIcss.recordIdVal;
- json('/api/prec/inquiryInfo/hisInquirys', {
- "hospitalCode": getUrlArgObject('hospitalId'),
- "inquiryCode":inCode,
- "isHaveDetail":1,
- "patientCode": getUrlArgObject("patientNo"),
- "dayLimit":config.preIcss.deadline===-1?undefined:config.preIcss.deadline
- },true).then((res) => {
- const data = res.data;
- if (data.code == 0) {
- let result = data.data;
- if(result.length > 0){
- store.dispatch({type:SET_PREC_SHOW})
- }
- store.dispatch({type:GET_PREC_LIST,preData:result});
- } else {
- // console.log(res)
- }
- })
- // }
- }
|