chenyc
2024-12-21 83ef13dab87cb59fccf0514d7d47f2ca0cae9f0f
src/views/home/components/dietary_survey.vue
@@ -1,6 +1,6 @@
<template>
    <div class="dietarySurvey-home" >
        <el-row   style="padding-left: 10px;">
        <el-row v-if="patientsInfo.id"  style="padding-left: 10px;">
            <el-form size="small" :inline="true" :model="state.formInline"> 
                <el-form-item label="调差表">
                    <el-select style="width: 120px;"
@@ -160,13 +160,13 @@
    const pasm={
        page: state.page,
        size: state.size,
        wherecondition: `patient_code = '${patientsInfo.value.code}'`,
        wherecondition:`survery_form_type=0 and patient_code='${patientsInfo.value.code}'`,
        ordercondition: 'survery_time desc'
    }
    if(state.formInline.date.length===2){
    if(state.formInline?.date?.length===2){
        pasm.wherecondition+=` and survery_time BETWEEN '${state.formInline.date[0]} 00:00:00' AND '${state.formInline.date[1]} 23:59:59'`
    }
    if(state.formInline.formTableName){
    if(state.formInline?.formTableName){
        pasm.wherecondition+=`and suvery_form_name='${state.formInline.formTableName}'`
    }
    const loading = ElLoading.service({
@@ -199,10 +199,10 @@
    const pasm = {
        page: 1,
        size: 10,
        wherecondition:`patient_code='${patientsInfo.value.code}'`,
        wherecondition:`survery_form_type=0 and patient_code='${patientsInfo.value.code}'`,
        ordercondition:'survery_time DESC'
    }
    if(state.formInline.date.length===2){
    if(state.formInline?.date?.length===2){
        pasm.wherecondition+=`and survery_time BETWEEN '${state.formInline.date[0]} 00:00:00' AND '${state.formInline.date[1]} 23:59:59'`
    }
    if(state.formInline.formTableName){
@@ -231,15 +231,12 @@
 * 编辑
 */
const handleEdit = (index: number, row: any) => {
  console.log(index, row)
  if(state.formInline.formTableName){
        if(state.formInline.formTableName==='膳食调查表'){
            editDietaryRef.value.openShow('update',row)
        }else if(state.formInline.formTableName==='营养膳食调查表'){
            editDietaryRef2.value.openShow('update',row)
        }
  console.log(index, row,state.formInline.formTableName)
  if(row.suveryFormName==='膳食调查表'){
        editDietaryRef.value.openShow('update',row)
    }else if(row.suveryFormName==='营养膳食调查表'){
        editDietaryRef2.value.openShow('update',row)
    }
//   editDietaryRef.value.openShow('update',row)
}
const handleDelete = (index: number, row: any) => {
  console.log(index, row)