Преглед изворни кода

完善客户信息表+患者信息表逻辑

cgp пре 4 дана
родитељ
комит
25339646ab
1 измењених фајлова са 126 додато и 6 уклоњено
  1. 126 6
      src/views/qw/patientInfo/index.vue

+ 126 - 6
src/views/qw/patientInfo/index.vue

@@ -75,7 +75,7 @@
       <el-table-column label="接诊医生" align="center" prop="receptionDoctor" />
       <el-table-column label="接诊医生" align="center" prop="receptionDoctor" />
       <el-table-column label="所在市" align="center" prop="city" />
       <el-table-column label="所在市" align="center" prop="city" />
       <el-table-column label="诊断" align="center" prop="diagnosis" show-overflow-tooltip />
       <el-table-column label="诊断" align="center" prop="diagnosis" show-overflow-tooltip />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="260">
         <template slot-scope="scope">
         <template slot-scope="scope">
           <el-button
           <el-button
             size="mini"
             size="mini"
@@ -83,6 +83,18 @@
             icon="el-icon-view"
             icon="el-icon-view"
             @click="handleView(scope.row)"
             @click="handleView(scope.row)"
           >查看详情</el-button>
           >查看详情</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-view"
+            @click="handlePrescribe(scope.row)"
+          >查看处方</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-document"
+            @click="handleCollection(scope.row)"
+          >查看信息采集</el-button>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>
@@ -136,15 +148,64 @@
         <el-button @click="detailOpen = false">关 闭</el-button>
         <el-button @click="detailOpen = false">关 闭</el-button>
       </div>
       </div>
     </el-dialog>
     </el-dialog>
+
+    <!-- 处方列表弹窗 -->
+    <el-dialog title="处方信息" :visible.sync="prescribeOpen" width="1100px" append-to-body :close-on-click-modal="false">
+      <el-table v-loading="prescribeLoading" :data="prescribeList">
+        <el-table-column label="处方ID" align="center" prop="prescribeId" />
+        <el-table-column label="处方单号" align="center" prop="prescribeCode" />
+        <el-table-column label="处方类型" align="center" prop="prescribeType">
+          <template slot-scope="scope">
+            <dict-tag :options="prescribeTypeOptions" :value="scope.row.prescribeType" />
+          </template>
+        </el-table-column>
+        <el-table-column label="患者姓名" align="center" prop="patientName" />
+        <el-table-column label="医生姓名" align="center" prop="doctorName" />
+        <el-table-column label="是否确认" align="center" prop="doctorConfirm">
+          <template slot-scope="scope">
+            <dict-tag :options="doctorConfirmOptions" :value="scope.row.doctorConfirm" />
+          </template>
+        </el-table-column>
+        <el-table-column label="审核时间" align="center" prop="auditTime" width="180">
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.auditTime, '{y}-{m}-{d}') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="处方图片" align="center" prop="prescribeImgUrl">
+          <template slot-scope="scope">
+            <el-image
+              v-if="scope.row.doctorConfirm == 1 && scope.row.prescribeImgUrl"
+              style="width: 60px; height: 60px"
+              :src="scope.row.prescribeImgUrl"
+              :preview-src-list="[scope.row.prescribeImgUrl]"
+            />
+            <span v-else>-</span>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination
+        v-show="prescribeTotal > 0"
+        :total="prescribeTotal"
+        :page.sync="prescribeQueryParams.pageNum"
+        :limit.sync="prescribeQueryParams.pageSize"
+        @pagination="getPrescribeList"
+      />
+    </el-dialog>
+
+    <!-- 信息采集弹窗 -->
+    <collection-info-dialog :visible.sync="collectionVisible" :phone="currentPhone" />
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
 import { doctorPatientList, getDoctorPatientInfo } from '@/api/qw/patientInfo'
 import { doctorPatientList, getDoctorPatientInfo } from '@/api/qw/patientInfo'
+import { getPrescribeListByPhone } from '@/api/qw/companyCustomer'
 import { parseTime } from '@/utils/common'
 import { parseTime } from '@/utils/common'
+import CollectionInfoDialog from '../companyCustomer/CollectionInfoDialog.vue'
 
 
 export default {
 export default {
   name: 'DoctorPatientList',
   name: 'DoctorPatientList',
+  components: { CollectionInfoDialog },
   data() {
   data() {
     return {
     return {
       loading: false,
       loading: false,
@@ -165,7 +226,28 @@ export default {
         { label: '女', value: '0' },
         { label: '女', value: '0' },
         { label: '男', value: '1' },
         { label: '男', value: '1' },
         { label: '未知', value: '2' }
         { label: '未知', value: '2' }
-      ]
+      ],
+      // 处方相关
+      prescribeOpen: false,
+      prescribeLoading: false,
+      prescribeList: [],
+      prescribeTotal: 0,
+      currentPhone: '',
+      prescribeQueryParams: {
+        pageNum: 1,
+        pageSize: 10
+      },
+      doctorConfirmOptions: [
+        { dictValue: '0', dictLabel: "未确认" },
+        { dictValue: '1', dictLabel: "已确认" }
+      ],
+      prescribeTypeOptions: [
+        { dictValue: '1', dictLabel: "西药" },
+        { dictValue: '2', dictLabel: "中药" },
+        { dictValue: '3', dictLabel: "OTC" }
+      ],
+      // 信息采集弹窗控制
+      collectionVisible: false
     }
     }
   },
   },
   created() {
   created() {
@@ -177,15 +259,13 @@ export default {
       return this.sexOptions.find(o => o.value === row.sex)?.label ?? row.sex
       return this.sexOptions.find(o => o.value === row.sex)?.label ?? row.sex
     },
     },
 
 
-    /** 查询分页列表 */
+    /** 查询患者分页列表 */
     getList() {
     getList() {
       this.loading = true
       this.loading = true
       const params = this.addDateRange(this.queryParams, this.dateRange)
       const params = this.addDateRange(this.queryParams, this.dateRange)
 
 
       doctorPatientList(params)
       doctorPatientList(params)
         .then(res => {
         .then(res => {
-          // 关键修正:后端返回的是 TableDataInfo,字段为 rows 和 total
-          // res 结构:{ code:200, msg:"查询成功", rows:[...], total:1, ... }
           this.patientList = res.rows || []
           this.patientList = res.rows || []
           this.total = res.total || 0
           this.total = res.total || 0
           this.loading = false
           this.loading = false
@@ -211,7 +291,6 @@ export default {
     handleView(row) {
     handleView(row) {
       getDoctorPatientInfo(row.id)
       getDoctorPatientInfo(row.id)
         .then(res => {
         .then(res => {
-          // 假设详情接口返回 AjaxResult.success(对象),res 是AjaxResult对象,data字段装载具体信息
           this.detailData = res.data
           this.detailData = res.data
           this.detailOpen = true
           this.detailOpen = true
         })
         })
@@ -220,6 +299,47 @@ export default {
         })
         })
     },
     },
 
 
+    /** 打开处方弹窗 */
+    handlePrescribe(row) {
+      if (!row.phone) {
+        this.$message.warning('该患者未登记手机号,无法查询处方')
+        return
+      }
+      this.currentPhone = row.phone
+      this.prescribeQueryParams.pageNum = 1
+      this.prescribeOpen = true
+      this.getPrescribeList()
+    },
+
+    /** 查询处方列表 */
+    getPrescribeList() {
+      this.prescribeLoading = true
+      const params = {
+        phone: this.currentPhone,
+        pageNum: this.prescribeQueryParams.pageNum,
+        pageSize: this.prescribeQueryParams.pageSize
+      }
+      getPrescribeListByPhone(params)
+        .then(response => {
+          this.prescribeList = response.rows || []
+          this.prescribeTotal = response.total || 0
+          this.prescribeLoading = false
+        })
+        .catch(() => {
+          this.prescribeLoading = false
+        })
+    },
+
+    /** 打开信息采集弹窗 */
+    handleCollection(row) {
+      if (!row.phone) {
+        this.$message.warning('该患者未登记手机号,无法查看信息采集表')
+        return
+      }
+      this.currentPhone = row.phone
+      this.collectionVisible = true
+    },
+
     addDateRange(params, dateRange) {
     addDateRange(params, dateRange) {
       if (dateRange && dateRange.length === 2) {
       if (dateRange && dateRange.length === 2) {
         params.beginTime = dateRange[0]
         params.beginTime = dateRange[0]