cgp пре 12 часа
родитељ
комит
91d71fd551

+ 3 - 3
src/api/his/scrmPrescribe.js

@@ -92,12 +92,12 @@ export function doctorRejectPrescribe(data) {
 
 
 /**
 /**
  * 获取客户问答信息
  * 获取客户问答信息
- * @param {number} prescribeId 处方ID
+ * @param {number} companyCustomerId 客户信息表主键id
  * @returns {Promise}
  * @returns {Promise}
  */
  */
-export function getCustomerQuestionAnswer(prescribeId) {
+export function getCustomerQuestionAnswer(companyCustomerId) {
   return request({
   return request({
-    url: `/his/prescribeDataScrm/getCustomerQuestionAnswer/${prescribeId}`,
+    url: `/his/prescribeDataScrm/getCustomerQuestionAnswer/${companyCustomerId}`,
     method: 'get'
     method: 'get'
   })
   })
 }
 }

+ 13 - 19
src/views/his/scrmPrescribe/DoctorAdviceDialog.vue

@@ -1,6 +1,6 @@
 <template>
 <template>
   <el-dialog
   <el-dialog
-    title="医生建议及处置"
+    title="完善处方"
     :visible.sync="dialogVisible"
     :visible.sync="dialogVisible"
     width="800px"
     width="800px"
     :close-on-click-modal="false"
     :close-on-click-modal="false"
@@ -17,6 +17,7 @@
       </div>
       </div>
       <el-divider />
       <el-divider />
     </div>
     </div>
+    <div class="section-title">医生建议及处置</div>
     <el-form :model="formData" :rules="formRules" ref="adviceForm" label-width="150px">
     <el-form :model="formData" :rules="formRules" ref="adviceForm" label-width="150px">
       <!-- 诊断 -->
       <!-- 诊断 -->
       <el-form-item label="诊断" prop="diagnose">
       <el-form-item label="诊断" prop="diagnose">
@@ -106,22 +107,11 @@ import { getDoctorSignInfo, submitDoctorAdvice,getCustomerQuestionAnswer } from
 export default {
 export default {
   name: "DoctorAdviceDialog",
   name: "DoctorAdviceDialog",
   props: {
   props: {
-    visible: {
-      type: Boolean,
-      default: false
-    },
-    prescribeId: {
-      type: Number,
-      default: null
-    },
-    doctorId: {
-      type: Number,
-      default: null
-    },
-    drugDoctorId: {
-      type: Number,
-      default: null
-    }
+    visible: Boolean,
+    prescribeId: Number,
+    doctorId: Number,
+    drugDoctorId: Number,
+    companyCustomerId: Number,
   },
   },
   data() {
   data() {
     return {
     return {
@@ -239,9 +229,13 @@ export default {
         this.$message.error('获取医生签名信息失败');
         this.$message.error('获取医生签名信息失败');
       });
       });
     },
     },
-    //获取问答信息
+    // 获取问答信息
     fetchQuestionAnswers() {
     fetchQuestionAnswers() {
-      getCustomerQuestionAnswer(this.prescribeId).then(response => {
+      if (!this.companyCustomerId) {
+        console.warn('companyCustomerId 为空,跳过获取问答信息');
+        return;
+      }
+      getCustomerQuestionAnswer(this.companyCustomerId).then(response => {
         this.questionAnswers = response.data || [];
         this.questionAnswers = response.data || [];
       }).catch(error => {
       }).catch(error => {
         console.error('获取问答信息失败', error);
         console.error('获取问答信息失败', error);

+ 20 - 12
src/views/his/scrmPrescribe/index.vue

@@ -104,27 +104,32 @@
         </template>
         </template>
       </el-table-column>
       </el-table-column>
       <el-table-column label="创建时间" align="center" prop="createTime" width="160" />
       <el-table-column label="创建时间" align="center" prop="createTime" width="160" />
-      <el-table-column label="操作" align="center" width="180">
+      <el-table-column
+        label="操作"
+        align="center"
+        width="220"
+        class-name="small-padding fixed-width"
+      >
         <template slot-scope="scope">
         <template slot-scope="scope">
           <el-button
           <el-button
-            type="primary"
-            size="small"
-            icon="el-icon-edit"
             v-if="scope.row.doctorConfirm === 0 && scope.row.status!==2 && scope.row.isDocument===0"
             v-if="scope.row.doctorConfirm === 0 && scope.row.status!==2 && scope.row.isDocument===0"
+            type="text"
+            size="mini"
+            icon="el-icon-edit"
             @click="handlePerfectPrescription(scope.row)"
             @click="handlePerfectPrescription(scope.row)"
-          >完善处方</el-button>
+          >完善信息</el-button>
           <el-button
           <el-button
-            type="success"
-            size="small"
+            v-if="scope.row.recipeType === 1 && (scope.row.doctorConfirm === 0 || scope.row.status===1) && scope.row.isDocument===0"
+            type="text"
+            size="mini"
             icon="el-icon-plus"
             icon="el-icon-plus"
-            v-if="scope.row.isDocument===0 && (scope.row.doctorConfirm === 0 || scope.row.status===1)"
             @click="handleOpenPrescribe(scope.row)"
             @click="handleOpenPrescribe(scope.row)"
           >开方</el-button>
           >开方</el-button>
           <el-button
           <el-button
-            type="danger"
-            size="small"
-            icon="el-icon-close"
             v-if="scope.row.doctorConfirm === 0 && scope.row.isDocument===0"
             v-if="scope.row.doctorConfirm === 0 && scope.row.isDocument===0"
+            type="text"
+            size="mini"
+            icon="el-icon-close"
             @click="handleRejectPrescribe(scope.row)"
             @click="handleRejectPrescribe(scope.row)"
           >拒方</el-button>
           >拒方</el-button>
         </template>
         </template>
@@ -146,6 +151,7 @@
       :prescribe-id="currentPrescribeId"
       :prescribe-id="currentPrescribeId"
       :doctor-id="currentDoctorId"
       :doctor-id="currentDoctorId"
       :drug-doctor-id="currentDrugDoctorId"
       :drug-doctor-id="currentDrugDoctorId"
+      :company-customer-id="currentCompanyCustomerId"
       @success="handleAdviceSuccess"
       @success="handleAdviceSuccess"
     />
     />
 
 
@@ -192,6 +198,7 @@ export default {
       currentPrescribeId: null,
       currentPrescribeId: null,
       currentDoctorId: null,
       currentDoctorId: null,
       currentDrugDoctorId: null,
       currentDrugDoctorId: null,
+      currentCompanyCustomerId: null,
 
 
     };
     };
   },
   },
@@ -214,7 +221,7 @@ export default {
       this.getList();
       this.getList();
     },
     },
     resetQuery() {
     resetQuery() {
-      this.$refs.queryForm.resetFields(); // 修复:使用 resetFields 方法
+      this.$refs.queryForm.resetFields();
       this.handleQuery();
       this.handleQuery();
     },
     },
     // 完善处方
     // 完善处方
@@ -222,6 +229,7 @@ export default {
       this.currentPrescribeId = row.prescribeId;
       this.currentPrescribeId = row.prescribeId;
       this.currentDoctorId = row.doctorId;
       this.currentDoctorId = row.doctorId;
       this.currentDrugDoctorId = row.drugDoctorId;
       this.currentDrugDoctorId = row.drugDoctorId;
+      this.currentCompanyCustomerId = row.companyCustomerId;
       this.dialogVisible = true;
       this.dialogVisible = true;
     },
     },
     // 直接开方
     // 直接开方