Ver código fonte

bug-720:协定方分享权限没有起作用

张田田 5 dias atrás
pai
commit
70d7ad6a6f

+ 18 - 3
src/views/business/SuitableTech.vue

@@ -409,9 +409,12 @@
                   v-model="editData.showType"
                   placeholder="请选择"
                 >
-                  <el-option label="个人" value="0"></el-option>
-                  <el-option label="科室" value="1"></el-option>
-                  <el-option label="机构" value="2"></el-option>
+                  <el-option
+                    v-for="opt in shareOptions"
+                    :key="opt.value"
+                    :label="opt.label"
+                    :value="opt.value"
+                  ></el-option>
                 </el-select>
               </div>
             </div>
@@ -687,6 +690,18 @@ export default {
       };
       return map[this.searchData.shareType] || "姓名";
     },
+    shareOptions() {
+      const userInfo = this.$store.state.user.userInfo || {};
+      const perm = String(userInfo.prescriptionSharePerm || "");
+      const permList = perm.split(/[,,]/).map(v => v.trim());
+      const has = (v) => permList.includes(String(v));
+      const options = [];
+      if (has(0)) options.push({ label: "个人", value: "0" });
+      if (has(1) || has(2)) options.push({ label: "科室", value: "1" });
+      if (has(3)) options.push({ label: "医疗机构", value: "2" });
+         console.log("共享选项", options);
+      return options;
+    },
   },
   created() {
     this.getList();

+ 1 - 1
src/views/business/components/AcupointTable.vue

@@ -1480,7 +1480,7 @@ export default {
       this.prescriptionDataMap = {};
 
       treatmentList.forEach((item, index) => {
-        const unitPrice = Number(item.price) || 0;
+        const unitPrice = Number(item.basisStitutionsnondrug.price) || 0;
         const pricingUnit = item.basisStitutionsnondrug?.pricingUnit || "";
         this.prescriptions.push({
           category: "",