user.html 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>管理员列表</title>
  5. #parse("sys/header.html")
  6. </head>
  7. <body>
  8. <div id="rrapp" v-cloak>
  9. <div v-show="showList">
  10. <Row :gutter="16">
  11. <div class="search-group">
  12. <i-col span="4">
  13. <i-input v-model="q.username" @on-enter="query" placeholder="用户名"/>
  14. </i-col>
  15. <i-button @click="query">查询</i-button>
  16. <i-button @click="reloadSearch">重置</i-button>
  17. </div>
  18. <div class="buttons-group">
  19. #if($shiro.hasPermission("sys:user:save"))
  20. <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
  21. #end
  22. #if($shiro.hasPermission("sys:user:update"))
  23. <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
  24. #end
  25. #if($shiro.hasPermission("sys:user:delete"))
  26. <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
  27. #end
  28. #if($shiro.hasPermission("sys:user:sysUserUpload"))
  29. <i-col style="display: inline-grid;">
  30. <Upload :show-upload-list="false" :on-success="uploadExcelSuccess" :on-error="uploadExcelError" :on-format-error="uploadExcelFormatError"
  31. :format="['xls','xlsx']"
  32. action="../sys/user/sysUserUpload">
  33. <i-button type="ghost" icon="ios-cloud-upload-outline">管理员导入</i-button>
  34. </Upload>
  35. </i-col>
  36. #end
  37. #if($shiro.hasPermission("sys:user:down"))
  38. &nbsp;&nbsp;&nbsp;<a href="../statics/file/sys_user_export.xls">管理员模板下载</a>&nbsp;&nbsp;&nbsp;&nbsp;
  39. #end
  40. </div>
  41. </Row>
  42. <table id="jqGrid"></table>
  43. <div id="jqGridPager"></div>
  44. </div>
  45. <Card v-show="!showList">
  46. <p slot="title">{{title}}</p>
  47. <i-form ref="formValidate" :model="user" :rules="ruleValidate" :label-width="120">
  48. <Form-item label="用户名" prop="username">
  49. <i-input v-model="user.username" placeholder="登录账号"/>
  50. </Form-item>
  51. <!--<Form-item label="所属部门" prop="deptName">
  52. <i-input type="text" v-model="user.deptName" icon="eye" readonly="readonly"
  53. @on-click="deptTree" readonly="readonly" placeholder="所属部门"/>
  54. </Form-item>-->
  55. <Form-item label="邮箱" prop="email">
  56. <i-input v-model="user.email" placeholder="邮箱"/>
  57. </Form-item>
  58. <Form-item label="手机号" prop="mobile">
  59. <i-input v-model="user.mobile" placeholder="手机号"/>
  60. </Form-item>
  61. <Form-item label="角色" prop="roleId">
  62. <i-select v-model="user.roleId" filterable placeholder="角色" label-in-value>
  63. <i-option v-for="role in roleList" :value="role.roleId" :key="role.roleId">{{role.roleName}}</i-option>
  64. </i-select>
  65. </Form-item>
  66. <Form-item label="数据角色类型" prop="roleType">
  67. <Radio-group v-model="user.roleType" @on-change="changeRole">
  68. <Radio label="1" v-show="isAdmin">操作员</Radio>
  69. <Radio label="2">店员</Radio>
  70. <Radio label="3">商户管理员</Radio>
  71. <Radio label="4">第三方商户管理员</Radio>
  72. </Radio-group>
  73. </Form-item>
  74. <Form-item label="商户" prop="merchSn" v-show="isMerchShow">
  75. <i-select v-model="user.merchSn" filterable placeholder="商户" @on-change="getStoresByMerch" label-in-value>
  76. <i-option v-for="merch in merchList" :value="merch.merchSn" :key="merch.merchSn">{{merch.merchName}}</i-option>
  77. </i-select>
  78. </Form-item>
  79. <Form-item label="第三方商户" prop="thirdPartyMerchCode" v-show="isThirdMerchShow">
  80. <i-select v-model="user.thirdPartyMerchCode" filterable placeholder="商户" @on-change="getStoresByThirdMerch" label-in-value>
  81. <i-option v-for="thirdMerchant in thirdMerchantBizList" :value="thirdMerchant.thirdPartyMerchCode"
  82. :key="thirdMerchant.thirdPartyMerchCode">{{thirdMerchant.thirdPartyMerchName}}</i-option>
  83. </i-select>
  84. </Form-item>
  85. <Form-item label="门店" prop="storeId" v-show="isStoreShow">
  86. <i-select v-model="user.storeId" placeholder="门店" label-in-value>
  87. <i-option v-for="store in storeList" :value="store.id" :key="store.id">{{store.storeName}}</i-option>
  88. </i-select>
  89. </Form-item>
  90. <Form-item label="状态" prop="status">
  91. <Radio-group v-model="user.status">
  92. <Radio label="0">
  93. <span>禁用</span>
  94. </Radio>
  95. <Radio label="1">
  96. <span>正常</span>
  97. </Radio>
  98. </Radio-group>
  99. </Form-item>
  100. <Form-item>
  101. <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
  102. <i-button type="warning" @click="reload" style="margin-left: 8px">返回</i-button>
  103. <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
  104. </Form-item>
  105. </i-form>
  106. </Card>
  107. </div>
  108. <!-- 选择部门 -->
  109. <div id="deptLayer" style="display: none;padding:10px;">
  110. <ul id="deptTree" class="ztree"></ul>
  111. </div>
  112. <script src="${rc.contextPath}/js/sys/user.js?_${date.systemTime}"></script>
  113. </body>
  114. </html>