Browse Source

系统配置中增加是否开通科室二维码设置选择是和否;选择是则可以进行科室设置

seimin 3 years ago
parent
commit
f1d3249b48
1 changed files with 24 additions and 3 deletions
  1. 24 3
      pages/receiptpage/receiptpage.vue

+ 24 - 3
pages/receiptpage/receiptpage.vue

@@ -249,9 +249,6 @@
249 249
           {
250 250
             text: "我的任务",
251 251
           },
252
-          {
253
-            text: "二维码设置",
254
-          },
255 252
         ],
256 253
         // 当前选中tab页名称
257 254
         selectedLabelSlots: "待接单",
@@ -308,6 +305,28 @@
308 305
       bigScreen,
309 306
     },
310 307
     methods: {
308
+      // 获取科室二维码设置开关
309
+      getDeptQRCode() {
310
+        let postData = {
311
+          "idx": 0,
312
+          "sum": 1,
313
+          systemConfiguration: {
314
+            keyconfig: "deptQRCode"
315
+          }
316
+        };
317
+        post("/simple/data/fetchDataList/systemConfiguration", postData).then((result) => {
318
+          if (result.status == 200) {
319
+            let flag = result.list[0].valueconfig;
320
+            if (flag == 1) {
321
+              this.content.push({
322
+                text: "二维码设置",
323
+              });
324
+            } else {
325
+              this.content = this.content.filter(item => item.text !== '二维码设置');
326
+            }
327
+          }
328
+        })
329
+      },
311 330
       // 拍照
312 331
       photograph(data) {
313 332
         photographTool(data);
@@ -803,6 +822,8 @@
803 822
       },
804 823
     },
805 824
     onLoad() {
825
+      // 获取科室二维码设置开关
826
+      this.getDeptQRCode();
806 827
       //判断当前登陆人具体角色 start
807 828
       let roles = uni.getStorageSync("userData").user.role;
808 829
       this.pharmacistFlag = roles.some(item => item.rolecode === "pharmacist");