Quellcode durchsuchen

bug-702:协定方编辑的穴位详情需要新增项目后才能编辑

张田田 vor 6 Tagen
Ursprung
Commit
9410c2d24a
1 geänderte Dateien mit 16 neuen und 8 gelöschten Zeilen
  1. 16 8
      src/views/business/components/AcupointTable.vue

+ 16 - 8
src/views/business/components/AcupointTable.vue

@@ -120,7 +120,7 @@
         </div>
       </div>
 
-      <div class="table-container">
+      <div class="table-container" v-if="prescriptions.length">
         <!-- 表格 -->
         <div
           v-for="detailType in activeDetailTypes"
@@ -364,8 +364,12 @@
         </div>
       </div>
 
+      <div class="no-data-tip" v-else>
+        <span>暂无项目,请先点击"新增"添加项目</span>
+      </div>
+
       <!-- 底部统计 -->
-      <div class="table-bottom">
+      <div class="table-bottom" v-if="prescriptions.length">
         <div class="table-b-header">
           <div class="header-about">
             <div
@@ -732,9 +736,7 @@ export default {
       return validTypes.filter((t) => this.innerDetailTypes.includes(t));
     },
     currentPricingUnit() {
-      console.log("处方列表:", this.prescriptions);
       const p = this.prescriptions[this.activeIndex];
-      console.log("当前处方:", p);
       return p?.pricingUnit || "";
     },
   },
@@ -937,9 +939,6 @@ export default {
 
       // 价格
       const price = detailData.price || 0;
-      //计价单位
-      console.log("项目详情数据:", detailData);
-      // const pricingUnit = detailData.pricingUnit || "";
       // 保存旧 tab 数据
       if (this.prescriptions.length > 0) {
         this.saveCurrentTabData();
@@ -1449,7 +1448,6 @@ export default {
     },
     // 编辑时 回填组件数据
     loadFromServerData(treatmentList) {
-      console.log("接口返回的治疗明细项列表:", treatmentList);
       if (!Array.isArray(treatmentList) || !treatmentList.length) return;
 
       const TYPE_VALUE_MAP = {
@@ -1718,6 +1716,16 @@ export default {
     overflow: auto;
   }
 
+  .no-data-tip {
+    flex: 1;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    color: #999;
+    font-size: 14px;
+    padding: 40px 0;
+  }
+
   // 详情表格区域
   .detail-table-section {
     margin-bottom: 10px;