刘帅
2026-09-08 572df690f72ed4a077d934823f261dec39b3cc7d
cloud-server-management/src/main/webapp/WEB-INF/view/system/user/user_edit.html
@@ -5,6 +5,7 @@
         <input type="hidden" id="id" value="${user.id}">
         <input type="hidden" id="sexValue" value="${user.sex}">
         <input type="hidden" id="roleid_" value="${user.roleid}">
         <input type="hidden" id="selectedStoreIds" value="${selectedStoreIds}">
         <div class="row">
            <div class="col-sm-6">
               <div id="driverInfoContent">
@@ -22,13 +23,24 @@
               <option value="${l.id}" ${l.id == user.roleid ? 'selected=selected' : ''}>${l.name}</option>
               @}
            </#select>
               @if(role == 1){
            @if(role == 1){
               <#select id="deptid" name="角色" underline="true" >
               @for(l in depts){
                   <option value="${l.id}" ${l.id == user.deptid ? 'selected=selected' : ''}>${l.fullname}</option>
               @}
               </#select>
            @}
               <div class="form-group">
                  <label class="col-sm-3 control-label">归属门店</label>
                  <div class="col-sm-9">
                     <select class="form-control" id="storeIds" name="storeIds" multiple="multiple">
                        @for(store in stores){
                        <option value="${store.id}">${store.name}</option>
                        @}
                     </select>
                     <span class="help-block">可多选:Windows/Linux 按住 Ctrl 键逐项点击;Mac 按住 ⌘ 键逐项点击。</span>
                  </div>
               </div>
         </div>
      </div>
   </div>
@@ -60,5 +72,12 @@
   laydate.render({
      elem: '#birthday'
   });
   $(function () {
      // 门店随编辑页一次性渲染,避免异步请求失败时多选框没有任何回显。
      var selectedStoreIds = ($("#selectedStoreIds").val() || "").split(",");
      $("#storeIds option").each(function () {
         this.selected = $.inArray(String(this.value), selectedStoreIds) !== -1;
      });
   });
</script>
@}