|
@@ -0,0 +1,67 @@
|
|
|
+<?php
|
|
|
+namespace Factory\Admin;
|
|
|
+
|
|
|
+use Dever;
|
|
|
+
|
|
|
+class Member extends Core
|
|
|
+{
|
|
|
+
|
|
|
+ public function getData()
|
|
|
+ {
|
|
|
+ $id = Dever::input('id');
|
|
|
+ $data = Dever::db('factory/member')->find($id);
|
|
|
+
|
|
|
+ return $data;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public function getList()
|
|
|
+ {
|
|
|
+ $data = Dever::db('factory/member')->select_page(array('factory_id' => $this->id));
|
|
|
+
|
|
|
+ $html = '';
|
|
|
+ if ($data) {
|
|
|
+ foreach ($data as $k => $v) {
|
|
|
+
|
|
|
+ $view = Dever::url('order_view?type=2&order_id=' . $v['id'], 'factory');
|
|
|
+
|
|
|
+ $button = '<a href="javascript:;" onclick="fastEdit($(this), \''.$view.'\', \'查看详情\', \'\', 1)"><button type="button" class="btn btn-info btn-rounded waves-effect waves-light m-b-5 layui-btn layui-btn-xs">查看详情</button></a>';
|
|
|
+
|
|
|
+
|
|
|
+ $html .= '<tr><td><input type="checkbox" name="mul_where_id[]" class="checkbox-checkall-list" lay-ignore value="'.$v['id'].'"/></td><td>'.$v['order_num'].'</td><td>'.$v['operdate'].'</td><td>'.$v['type_info']['name'].'</td><td>'.$ps_date.'</td><td>'.$v['p_price'].'</td><td>'.$v['status_name'].'</td><td>'.$button.'</td></tr>';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return $html;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public function getConfig()
|
|
|
+ {
|
|
|
+
|
|
|
+ $data['update'] = Dever::url('admin/member.update', 'factory');
|
|
|
+ return $data;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public function update_api()
|
|
|
+ {
|
|
|
+ $input = Dever::input();
|
|
|
+
|
|
|
+ $update['name'] = $input['update_name'];
|
|
|
+ $update['avatar'] = $input['update_avatar'];
|
|
|
+ $update['mobile'] = $input['update_mobile'];
|
|
|
+ $update['role_id'] = $input['update_role_id'];
|
|
|
+ $update['factory_id'] = $this->id;
|
|
|
+
|
|
|
+ $update['where_id'] = Dever::input('update_where_id');
|
|
|
+ if ($update['where_id']) {
|
|
|
+ Dever::db('factory/info')->update($update);
|
|
|
+ } else {
|
|
|
+ Dever::db('factory/info')->insert($update);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ return 'reload';
|
|
|
+ }
|
|
|
+}
|