| | |
| | | <template> |
| | | <div class="dietarySurvey-item"> |
| | | <el-dialog v-model="state.dialogTableVisible" title="膳食生活调查22表" :fullscreen="true" width="100%"> |
| | | <div class="container" style="width: 100%; height: 100%;overflow: auto;"> |
| | | <el-dialog v-model="state.dialogTableVisible" title="膳食生活调查表" :fullscreen="true" width="100%"> |
| | | <div style="width: 100%; height: 100%;overflow: auto;"> |
| | | <div ref="printRef"> |
| | | <div> |
| | | <el-form size="small"> |
| | |
| | | import { useUserInfo } from '/@/stores/userInfo'; |
| | | import { usePatientsInfo } from '/@/stores/patientsInfo'; |
| | | const storesPat = usePatientsInfo(); |
| | | import {Add,update,deleteId,tiaochabiaoInfo} from '/@/api/tiaochabiao/index' |
| | | import {Add,update,list,tiaochabiaoInfo} from '/@/api/tiaochabiao/index' |
| | | import { storeToRefs } from 'pinia'; |
| | | import { useRoute,useRouter } from 'vue-router'; |
| | | import { ElMessage } from 'element-plus'; |
| | | import { ElLoading, ElMessage } from 'element-plus'; |
| | | const stores = useUserInfo(); |
| | | const { patientsInfo } = storeToRefs(storesPat); |
| | | const { userInfos } = storeToRefs(stores); |
| | |
| | | |
| | | } |
| | | // 打开查看或者编辑明细 |
| | | const openShow = (type: string,mode:tiaochabiaoInfo) => { |
| | | const openShow = async (type: string,mode:tiaochabiaoInfo) => { |
| | | console.log(type) |
| | | if(type==='add'){ |
| | | getPageInfo() |
| | | state.dialogTableVisible = true |
| | | const pasm={ |
| | | page: 0, |
| | | size: 1, |
| | | wherecondition:`survery_form_type=0 and patient_code='${patientsInfo.value.code}' and suvery_form_name='膳食生活调查表'`, |
| | | ordercondition: 'survery_time desc' |
| | | } |
| | | const re= await list(pasm); |
| | | console.log('店家--------',re.data) |
| | | if(re.data.list.length){ |
| | | const model=re.data.list[0] |
| | | state.tableData=JSON.parse(model.surveryJsonBody) |
| | | |
| | | state.dialogTableVisible = true |
| | | state.viewInfo={ |
| | | id: 0, |
| | | code: '', |
| | | clientCode: userInfos.value.clientCode, |
| | | patientCode: patientsInfo.value.code, |
| | | surveryTime: formatDate(new Date(), 'YYYY-mm-dd HH:MM:SS'), |
| | | surveryPerson: userInfos.value.code, |
| | | surveryJsonBody: '', |
| | | suveryFormName:'膳食生活调查表', |
| | | surveryFormType:0, |
| | | updateTime: '' |
| | | } |
| | | |
| | | }else{ |
| | | getPageInfo() |
| | | state.dialogTableVisible = true |
| | | } |
| | | |
| | | } |
| | | else if(type==='update'){ |
| | | console.log(mode) |