Pārlūkot izejas kodu

医生端增加不适合用药功能

cgp 2 dienas atpakaļ
vecāks
revīzija
273abf5a69

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

@@ -126,6 +126,11 @@
         </el-table>
       </el-form-item>
 
+      <!-- 不建议使用复选框 -->
+      <el-form-item label="不建议使用" label-width="120px">
+        <el-checkbox v-model="formData.notRecommendUse" :disabled="readonly">不建议使用</el-checkbox>
+      </el-form-item>
+
       <!-- 医生及药师信息(紧凑三列) -->
       <el-divider content-position="left">医生及药师信息</el-divider>
       <el-row :gutter="20">
@@ -198,7 +203,8 @@ export default {
         facialDiagnosis: '',
         foodAndExerciseGuidance: '',
         healingList: [],
-        noteTaboos: ''
+        noteTaboos: '',
+        notRecommendUse: false
       },
       formRules: {
         diagnose: [{ required: true, message: '请输入诊断', trigger: 'blur' }],
@@ -273,7 +279,8 @@ export default {
         facialDiagnosis: '',
         foodAndExerciseGuidance: '',
         healingList: [],
-        noteTaboos: ''
+        noteTaboos: '',
+        notRecommendUse: false
       };
       if (!this.readonly) this.addHealingRow();
       this.$nextTick(() => {
@@ -353,6 +360,7 @@ export default {
           this.formData.facialDiagnosis = data.facialDiagnosis || '';
           this.formData.foodAndExerciseGuidance = data.foodAndExerciseGuidance || '';
           this.formData.noteTaboos = data.noteTaboos || '';
+          this.formData.notRecommendUse = data.notRecommendUse || false;
           if (data.healingAreaJson) {
             try {
               const list = JSON.parse(data.healingAreaJson);
@@ -383,13 +391,14 @@ export default {
           facialDiagnosis: this.formData.facialDiagnosis,
           foodAndExerciseGuidance: this.formData.foodAndExerciseGuidance,
           healingAreaJson: healingAreaJson,
-          noteTaboos: this.formData.noteTaboos
+          noteTaboos: this.formData.noteTaboos,
+          notRecommendUse: this.formData.notRecommendUse
         };
         this.submitLoading = true;
         submitDoctorAdvice(params).then(() => {
           this.$message.success('处方建议提交成功');
           this.dialogVisible = false;
-          this.$emit('success');
+          this.$emit('success', { notRecommendUse: this.formData.notRecommendUse });
         }).catch(error => {
           console.error('提交失败', error);
           this.$message.error('提交失败,请重试');

+ 6 - 1
src/views/his/scrmPrescribe/index.vue

@@ -66,6 +66,7 @@
         <template slot-scope="scope">
           <span v-if="scope.row.doctorConfirm === 0" class="warning">待开方</span>
           <span v-else-if="scope.row.doctorConfirm === -2" class="primary">暂不开方</span>
+          <span v-else-if="scope.row.doctorConfirm === -3" class="primary">不建议使用</span>
           <span v-else-if="scope.row.status === 0" class="default">待审核</span>
           <span v-else-if="scope.row.status === 1" class="success">已完成</span>
           <span v-else-if="scope.row.status === 2" class="danger">已拒方</span>
@@ -297,8 +298,12 @@ export default {
       this.prescribeDialogVisible = true;
     },
     // 完善处方成功后的回调(询问是否开方)
-    handleAdviceSuccess() {
+    handleAdviceSuccess(payload) {
       this.getList();
+      // 如果是不建议使用,直接返回,不弹出开方询问
+      if (payload && payload.notRecommendUse === true) {
+        return;
+      }
       if (!this.isReadonlyAdvice) {
         this.$confirm('是否前往开方?', '提示', {
           confirmButtonText: '确定',