Browse Source

Merge branch 'master' of gitee.com:huangsanjia/minongyun

tincey 3 years ago
parent
commit
82c89c96e2

+ 1 - 0
application/admin/controller/Order.php

@@ -89,6 +89,7 @@ class Order extends Backend
         if ($this->dataLimit && $this->dataLimitFieldAutoFill) {
             $params[$this->dataLimitField] = $this->auth->id;
         }
+//        halt($params);die;
         $result = false;
         Db::startTrans();
         try {

+ 3 - 0
application/admin/controller/auth/Admin.php

@@ -189,6 +189,7 @@ class Admin extends Backend
                     } else {
                         unset($params['password'], $params['salt']);
                     }
+                    $params['company'] = Db::name('company')->where('id',$params['company_id'])->value('company');
                     //这里需要针对username和email做唯一验证
                     $adminValidate = \think\Loader::validate('Admin');
                     $adminValidate->rule([
@@ -232,7 +233,9 @@ class Admin extends Backend
         foreach ($grouplist as $k => $v) {
             $groupids[] = $v['id'];
         }
+        $company = Db::name('company')->select();
         $this->view->assign("row", $row);
+        $this->view->assign("company", $company);
         $this->view->assign("groupids", $groupids);
         return $this->view->fetch();
     }

+ 11 - 0
application/admin/view/auth/admin/edit.html

@@ -30,6 +30,17 @@
             <input type="text" class="form-control" id="nickname" name="row[nickname]" autocomplete="off" value="{$row.nickname|htmlentities}" data-rule="required" />
         </div>
     </div>
+    <div class="form-group">
+        <label for="nickname" class="control-label col-xs-12 col-sm-2">所属公司:</label>
+
+        <div class="col-xs-12 col-sm-8">
+            <select class="selectpicker form-control" id="company_id" name="row[company_id]">
+                {foreach name='company' id='vo'}
+                <option value="{$vo.id}">{$vo.company}</option>
+                {/foreach}
+            </select>
+        </div>
+    </div>
     <div class="form-group">
         <label for="password" class="control-label col-xs-12 col-sm-2">{:__('Password')}:</label>
         <div class="col-xs-12 col-sm-8">

+ 3 - 3
public/assets/js/backend/customer.js

@@ -26,10 +26,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                     [
                         {checkbox: true},
                         {field: 'id', title: __('Id')},
-                        {field: 'user_id', title: __('User_id')},
+                        // {field: 'user_id', title: __('User_id')},
                         {field: 'customer_name', title: __('Customer_name'), operate: 'LIKE'},
-                        {field: 'customer_id', title: __('Customer_id')},
-                        {field: 'company_id', title: __('Company_id')},
+                        // {field: 'customer_id', title: __('Customer_id')},
+                        // {field: 'company_id', title: __('Company_id')},
                         {field: 'create', title: __('Create'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
                         {field: 'update', title: __('Update'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
                         {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}