فهرست منبع

转账按钮权限控制

liangpeile 1 سال پیش
والد
کامیت
e5c3f7e566

+ 32 - 25
medical_history-vue/src/views/admin/AdminDoctorUserList.vue

@@ -111,14 +111,14 @@
 
         <span slot="action" slot-scope="text, record">
           <a @click="handleEdit(record)">编辑</a>
-          <a-divider type="vertical" />
-          <a @click="giveMoney(record)">转账</a>
+          <a-divider type="vertical" v-show="moneyShow" />
+          <a @click="giveMoney(record)" v-show="moneyShow">转账</a>
 
           <a-divider type="vertical" />
-              <a @click="blsc(record.id,record.wisMhu)">病历上传({{record.wisMhu}})</a>
+              <a @click="blsc(record.id,record.wisMhu)">病历上传({{ record.wisMhu }})</a>
 
           <a-divider type="vertical" />
-              <a @click="wjdc(record.id,record.wisWjdc)">问卷调查({{record.wisWjdc}})</a>
+              <a @click="wjdc(record.id,record.wisWjdc)">问卷调查({{ record.wisWjdc }})</a>
 
           <a-divider type="vertical" />
           <a-dropdown>
@@ -166,7 +166,7 @@
       </a-row>
     </j-modal>
 
-<!--  转账-->
+    <!--  转账-->
     <j-modal
       title="转账"
       :width="width"
@@ -177,8 +177,8 @@
       @cancel="handleCancelzz"
       cancelText="关闭">
       <a-row>
-        <a-col :span="24" >
-          <a-form-model-item label="金额" :labelCol="labelCol" :wrapperCol="wrapperCol"  prop="money" >
+        <a-col :span="24">
+          <a-form-model-item label="金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="money">
             <a-input type="number" v-model="money" placeholder="请输入金额"></a-input>
           </a-form-model-item>
         </a-col>
@@ -202,6 +202,7 @@ import { mixinDevice } from '@/utils/mixin'
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import AdminDoctorUserModal from './modules/AdminDoctorUserModal'
 import { httpAction, getAction } from '@/api/manage'
+import { ENHANCE_PRE, USER_INFO } from '@/store/mutation-types'
 
 export default {
   name: 'AdminDoctorUserList',
@@ -217,7 +218,7 @@ export default {
       money: '',
       notes: '',
       userId: '',
-
+      moneyShow: false,
       userPhone: '',
       visiblezz: false,
       visiblezzMoney: false,
@@ -333,18 +334,18 @@ export default {
     }
   },
   methods: {
-    blsc(id,str){
+    blsc(id, str) {
 
       var that = this
       let str2
-      if (str =="允许"){
-         str2 = "不允许"
+      if (str == '允许') {
+        str2 = '不允许'
       }
-      if (str =="不允许"){
-         str2 = "允许"
+      if (str == '不允许') {
+        str2 = '允许'
       }
-      if (str ==null){
-        str2 = "允许"
+      if (str == null) {
+        str2 = '允许'
       }
       httpAction(that.url.edit, {
         id: id,
@@ -359,17 +360,17 @@ export default {
         }
       })
     },
-    wjdc(id,str){
+    wjdc(id, str) {
       var that = this
       let str2
-      if (str =="允许"){
-         str2 = "不允许"
+      if (str == '允许') {
+        str2 = '不允许'
       }
-      if (str =="不允许"){
-         str2 = "允许"
+      if (str == '不允许') {
+        str2 = '允许'
       }
-      if (str ==null){
-        str2 = "允许"
+      if (str == null) {
+        str2 = '允许'
       }
       httpAction(that.url.edit, {
         id: id,
@@ -395,7 +396,7 @@ export default {
       this.visiblezz = true
     },
     giveMoney(record) {
-      this.userId =record.id
+      this.userId = record.id
       this.money = record.money
       this.notes = record.notes
       this.visiblezzMoney = true
@@ -431,7 +432,7 @@ export default {
       httpAction(that.url.giveMoney, {
         id: that.userId,
         money: that.money,
-        notes: that.notes,
+        notes: that.notes
       }, 'post').then((res) => {
         if (res.success) {
           that.$message.success(res.message)
@@ -447,7 +448,13 @@ export default {
     },
 
     initDictConfig() {
-
+      const { yzh } = this.$store.getters.userInfo
+      if (yzh == 0) {
+        this.moneyShow = false
+      }
+      if (yzh == 1) {
+        this.moneyShow = true
+      }
     },
     getSuperFieldList() {
       let fieldList = []

+ 11 - 2
medical_history-vue/src/views/admin/AdminSpecialistUserList.vue

@@ -102,8 +102,8 @@
 
         <span slot="action" slot-scope="text, record">
           <a @click="handleEdit(record)">编辑</a>
-          <a-divider type="vertical" />
-          <a @click="giveMoney(record)">转账</a>
+          <a-divider type="vertical"v-show="moneyShow" />
+          <a @click="giveMoney(record)"v-show="moneyShow">转账</a>
 
           <a-divider type="vertical" />
           <a-dropdown>
@@ -201,6 +201,7 @@
         notes: '',
         userId: '',
         userPhone: '',
+        moneyShow: false,
         visiblezz: false,
         visiblezzMoney: false,
         labelCol: {
@@ -363,6 +364,14 @@
         this.visiblezzMoney = false
       },
       initDictConfig(){
+        const { yzh } = this.$store.getters.userInfo
+        if (yzh == 0) {
+          this.moneyShow = false
+        }
+        if (yzh == 1) {
+          this.moneyShow = true
+        }
+
       },
       getSuperFieldList(){
         let fieldList=[];

+ 3 - 0
medical_history/jeecg-boot-module-system/src/main/java/org/jeecg/modules/adminuser/entity/AdminCompSelect.java

@@ -82,6 +82,9 @@ public class AdminCompSelect implements Serializable {
     /**医生还是专家  1是医生  2是专家*/
     @ApiModelProperty(value = "医生还是专家  1是医生  2是专家")
     private String doctorAndSpecialist;
+    /**云账户权限*/
+    @ApiModelProperty(value = "  0是关闭  1是开启")
+    private String yzh;
 
 
 }

+ 23 - 11
medical_history/jeecg-boot-module-system/src/main/java/org/jeecg/modules/adminuser/service/impl/AdminUserServiceImpl.java

@@ -140,6 +140,7 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
             adminCompSelect.setAvatar(adminUser.getAvatar());
             adminCompSelect.setCardPic(adminUser.getCardPic());
             adminCompSelect.setDoctorAndSpecialist("1");
+            adminCompSelect.setYzh(user.getYzh());
 
 
             QueryWrapper<AdminCompSelect> adminCompSelectQueryWrapper = new QueryWrapper<>();
@@ -167,6 +168,7 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
             adminCompSelect.setAvatar(adminUser.getAvatar());
             adminCompSelect.setCardPic(adminUser.getCardPic());
             adminCompSelect.setDoctorAndSpecialist("1");
+            adminCompSelect.setYzh(user.getYzh());
 
             QueryWrapper<AdminCompSelect> adminCompSelectQueryWrapper = new QueryWrapper<>();
             adminCompSelectQueryWrapper.eq("phone", phone);
@@ -445,7 +447,7 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
     }
 
     @Override
-    public void updateByUser(AdminUser adminUser) {
+    public void     updateByUser(AdminUser adminUser) {
         String phone = adminUser.getPhone();
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         QueryWrapper<AdminCompSelect> adminCompSelectQueryWrapper = new QueryWrapper<>();
@@ -453,11 +455,15 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
         adminCompSelectQueryWrapper.eq("sys_org_code",sysUser.getOrgCode());
         adminCompSelectQueryWrapper.eq("doctor_and_specialist","1");
         AdminCompSelect adminCompSelect = adminCompSelectService.getOne(adminCompSelectQueryWrapper);
-        adminCompSelect.setKsName(adminUser.getKsname());
-        adminCompSelect.setDwName(adminUser.getDwname());
-        adminCompSelect.setAvatar(adminUser.getAvatar());
-        adminCompSelect.setCardPic(adminUser.getCardPic());
-        adminCompSelectService.updateById(adminCompSelect);
+        if (null!=adminCompSelect){
+            adminCompSelect.setKsName(adminUser.getKsname());
+            adminCompSelect.setDwName(adminUser.getDwname());
+            adminCompSelect.setAvatar(adminUser.getAvatar());
+            adminCompSelect.setCardPic(adminUser.getCardPic());
+            adminCompSelectService.updateById(adminCompSelect);
+        }
+        adminUserService.updateById(adminUser);
+
     }
 
     @Override
@@ -502,6 +508,7 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
             adminCompSelect.setAvatar(adminUser.getAvatar());
             adminCompSelect.setCardPic(adminUser.getCardPic());
             adminCompSelect.setDoctorAndSpecialist("2");
+            adminCompSelect.setYzh(user.getYzh());
 
             QueryWrapper<AdminCompSelect> adminCompSelectQueryWrapper = new QueryWrapper<>();
             adminCompSelectQueryWrapper.eq("phone", phone);
@@ -528,6 +535,7 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
             adminCompSelect.setAvatar(adminUser.getAvatar());
             adminCompSelect.setCardPic(adminUser.getCardPic());
             adminCompSelect.setDoctorAndSpecialist("2");
+            adminCompSelect.setYzh(user.getYzh());
 
             QueryWrapper<AdminCompSelect> adminCompSelectQueryWrapper = new QueryWrapper<>();
             adminCompSelectQueryWrapper.eq("phone", phone);
@@ -614,11 +622,15 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
         adminCompSelectQueryWrapper.eq("sys_org_code",sysUser.getOrgCode());
         adminCompSelectQueryWrapper.eq("doctor_and_specialist","2");
         AdminCompSelect adminCompSelect = adminCompSelectService.getOne(adminCompSelectQueryWrapper);
-        adminCompSelect.setKsName(adminUser.getKsname());
-        adminCompSelect.setDwName(adminUser.getDwname());
-        adminCompSelect.setAvatar(adminUser.getAvatar());
-        adminCompSelect.setCardPic(adminUser.getCardPic());
-        adminCompSelectService.updateById(adminCompSelect);
+        if (null!=adminCompSelect){
+            adminCompSelect.setKsName(adminUser.getKsname());
+            adminCompSelect.setDwName(adminUser.getDwname());
+            adminCompSelect.setAvatar(adminUser.getAvatar());
+            adminCompSelect.setCardPic(adminUser.getCardPic());
+            adminCompSelectService.updateById(adminCompSelect);
+        }
+        adminUserService.updateById(adminUser);
+
     }
 
 

+ 10 - 0
medical_history/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/controller/APIController.java

@@ -494,6 +494,16 @@ public class APIController {
             queryWrapper.eq("phone", userPhone);
             AdminUser storeMember1 = adminUserService.getOne(queryWrapper);
 
+            String phone = storeMember1.getPhone();
+            String sysOrgCode = storeMember1.getSysOrgCode();
+            QueryWrapper<AdminCompSelect> adminCompSelectQueryWrapper = new QueryWrapper<>();
+            adminCompSelectQueryWrapper.eq("phone",phone);
+            adminCompSelectQueryWrapper.eq("sys_org_code",sysOrgCode);
+            AdminCompSelect one = adminCompSelectService.getOne(adminCompSelectQueryWrapper);
+            if (null!=one){
+                storeMember1.setYzh(one.getYzh());
+            }
+
             if (storeMember1 == null) {
                 result.setMessage("token校验该用户不存在");
                 baseCommonService.addLog("用户校验失败,用户不存在!", CommonConstant.LOG_TYPE_1, null);