소스 검색

update:信息采集

ct 1 일 전
부모
커밋
8c35d53918
2개의 변경된 파일30개의 추가작업 그리고 11개의 파일을 삭제
  1. 4 0
      src/views/order/userInformationOrder/index.vue
  2. 26 11
      src/views/order/userInformationOrder/userInfoDetail.vue

+ 4 - 0
src/views/order/userInformationOrder/index.vue

@@ -365,6 +365,8 @@ export default {
           this.queryParams.doctorType2Confirm=1;
         }else if (tab.name=="10"){
           this.queryParams.doctorType2Confirm="";
+        }else if (tab.name=="-1"){
+          this.queryParams.doctorType2Confirm=-1;
         }
       }else if(this.doctorType==1){
         if(tab.name=="0"){
@@ -373,6 +375,8 @@ export default {
           this.queryParams.doctorConfirm=1;
         }else if (tab.name=="10"){
           this.queryParams.doctorConfirm="";
+        }else if (tab.name=="-1"){
+          this.queryParams.doctorConfirm=-1;
         }
       }
 

+ 26 - 11
src/views/order/userInformationOrder/userInfoDetail.vue

@@ -57,6 +57,9 @@
         <el-descriptions-item label="患者姓名">
           {{ detail.patientName || '-' }}
         </el-descriptions-item>
+        <el-descriptions-item label="患者身份证号码">
+          {{ detail.patientIdCard || '-' }}
+        </el-descriptions-item>
         <el-descriptions-item label="订单编号">
           {{ detail.packageOrderCode || '-' }}
         </el-descriptions-item>
@@ -266,13 +269,19 @@ export default {
         } else {
           if (param.doctorType2Confirm === 0){
             return '已付款待药师确认'; // 或者您需要的其他状态
-          } else if (param.doctorType2Confirm === 1 ) {
+          }if (param.doctorType2Confirm ===- 1){
+            return '药师已拒绝'; // 或者您需要的其他状态
+          }
+          else if (param.doctorType2Confirm === 1 ) {
             return param.orderStatus;
           }
         }
 
 
-      } else {
+      } else if (param.userConfirm === 1 && param.doctorConfirm === -1) {
+        return  "医生已拒绝"
+      }
+      else {
         return '未知状态';
       }
     }
@@ -281,7 +290,6 @@ export default {
   methods: {
     /** 供父组件调用 —— 与旧组件保持一致 */
     getDetails(id,doctorType) {
-      console.log(this.doctorType)
       if (!id) return;
       this.loadDetail(id);
     },
@@ -294,10 +302,8 @@ export default {
     async loadDetail(id) {
       try {
         getUserInformation(id).then((response) => {
-          console.log(response.data)
           this.detail = response.data;
           this.packageInfo = this.detail.packageJson?JSON.parse(this.detail.packageJson) :null;
-          console.log("--------------",this.packageInfo);
           // 修复:productInfo 需要解析
           if (this.packageInfo && this.packageInfo.productJson) {
             if (typeof this.packageInfo.productJson === 'string') {
@@ -308,10 +314,6 @@ export default {
           } else {
             this.productInfo = [];
           }
-
-          console.log("解析后的 productInfo:", this.productInfo);
-          console.log("productInfo 类型:", typeof this.productInfo);
-          console.log("第一个商品:", this.productInfo[0]);
           this.doctorAdvice = this.detail.doctorAdvice || "";
 
           // 解析问卷 JSON
@@ -352,6 +354,18 @@ export default {
               }
               // 确保按 sort 字段排序
               this.jsonInfoData.sort((a, b) => (a.sort || 0) - (b.sort || 0));
+              // 添加用户承诺
+              if (this.detail.userCommitment){
+                // 确保 userCommitment 有值
+                const commitmentValue = this.detail.userCommitment.toString().trim();
+                if (commitmentValue) {
+                  this.jsonInfoData.push({
+                    "title": "用户承诺",  // 重要:改为 title
+                    "value": commitmentValue,
+                    "sort": 9999  // 确保显示在最后
+                  });
+                }
+              }
             } catch (e) {
               console.error("jsonInfo 解析失败", e);
               this.jsonInfoData = [];
@@ -374,6 +388,9 @@ export default {
 
     /** 获取采集信息选项名称 */
     getOptionName(options, value) {
+      if (!options || !Array.isArray(options)) {
+        return value || "-";
+      }
       if (!options || value === null || value === undefined) return "-";
       const option = options.find(opt => opt.value == value);
       return option ? option.name : value;
@@ -391,7 +408,6 @@ export default {
       try {
         this.detail.doctorAdvice = this.doctorAdvice;
         this.detail.doctorConfirm = status;
-        console.log(this.detail)
         doctorConfirm(this.detail).then(response => {
           this.msgSuccess("医生确认成功");
           this.open = false;
@@ -410,7 +426,6 @@ export default {
       try {
         this.detail.doctorAdvice = this.doctorAdvice;
         this.detail.doctorType2Confirm = status;
-        console.log(this.detail)
         doctorType2Confirm(this.detail).then(response => {
           this.msgSuccess("药师确认成功");
           this.open = false;