This commit is contained in:
parent
ee4d778040
commit
77372a13a7
@ -55,6 +55,18 @@ class Category extends Backend
|
||||
}
|
||||
$data = ['searchlist' => $searchlist];
|
||||
$this->success('', null, $data);
|
||||
}
|
||||
/**
|
||||
* 搜索下拉列表
|
||||
*/
|
||||
public function list()
|
||||
{
|
||||
$result = $this->model->limit(10)->select();
|
||||
$searchlist = [];
|
||||
foreach ($result as $key => $value) {
|
||||
$searchlist[] = ['value' => $value['id'], 'text' => $value['name']];
|
||||
}
|
||||
echo json_encode($searchlist);
|
||||
}
|
||||
public function del($ids = null)
|
||||
{
|
||||
|
@ -228,6 +228,7 @@ class User extends Backend
|
||||
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.edit' : $name) : $this->modelValidate;
|
||||
$row->validateFailException(true)->validate($validate);
|
||||
}
|
||||
if(!empty($params['cardid'])){
|
||||
$cardinfo = $this->checkcardid($params['cardid']);
|
||||
if ($cardinfo['iscard'] == false) {
|
||||
$this->model->rollback();
|
||||
@ -236,12 +237,16 @@ class User extends Backend
|
||||
$params['birthday'] = $cardinfo['birthday'];
|
||||
$params['genderdata'] = $cardinfo['sex'];
|
||||
}
|
||||
}
|
||||
if(!empty($params['cardid'])){
|
||||
$has_frameno = $this->model->get(['frameno', $params['frameno']]);
|
||||
if (!empty($has_frameno->id)) {
|
||||
$this->model->rollback();
|
||||
$this->error('车架号重复');
|
||||
}
|
||||
$result = $this->model->allowField(true)->save($params);
|
||||
}
|
||||
|
||||
// $result = $this->model->allowField(true)->save($params);
|
||||
$result = $row->allowField(true)->save($params);
|
||||
$this->model->commit();
|
||||
} catch (ValidateException $e) {
|
||||
|
@ -211,6 +211,7 @@ class Visitlog extends Backend
|
||||
);
|
||||
//var_dump($visit_data);exit();
|
||||
$this->visit_model->where('id', $params['visit_id'])->update($visit_data);
|
||||
//$result = $row->allowField(true)->save($params);
|
||||
}
|
||||
unset($params['is_end']);
|
||||
//var_dump($params);exit();
|
||||
|
@ -23,7 +23,7 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Carno')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-carno" data-rule="required" class="form-control" name="row[carno]" type="text" value="{$row.carno|htmlentities}">
|
||||
<input id="c-carno" class="form-control" name="row[carno]" type="text" value="{$row.carno|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -37,7 +37,7 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Category_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-category_id" data-rule="required" data-source="user4s/category/selectpage" data-params='{"custom[type]":"user4s_user"}' class="form-control selectpage" name="row[category_id]" type="text" value="{$row.category_id|htmlentities}">
|
||||
<input id="c-category_id" data-rule="required" data-source="user4s/category/selectpage" class="form-control selectpage" name="row[category_id]" type="text" value="{$row.category_id|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -55,7 +55,7 @@
|
||||
<!-- <input id="c-star" min="0" class="form-control" name="row[star]" type="number" value="0"> -->
|
||||
<select id="c-star" data-rule="required" class="form-control selectpicker" name="row[star]">
|
||||
{foreach name="all_star" item="vo"}
|
||||
<option value="{$key}" {in name="key" value=""}selected{/in}>{$vo}</option>
|
||||
<option value="{$key}" {in name="key" value="5"}selected{/in}>{$vo}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
|
@ -70,7 +70,16 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'editable'], function
|
||||
// return row['level']['name'];
|
||||
// }
|
||||
// },
|
||||
{ field: 'category.name', title: __('Category_id'), searchList: $.getJSON("user4s/category/searchlist") },
|
||||
{
|
||||
field: 'category.name', title: __('Category_id'), searchList: $.getJSON("user4s/category/searchlist"),
|
||||
// editable: {
|
||||
// type: 'select',
|
||||
// autotext: true,
|
||||
// inputclass: '',
|
||||
// pk: 'value',
|
||||
// source: "user4s/category/list"
|
||||
// }
|
||||
},
|
||||
{ field: 'level.name', title: __('Level_id'), searchList: $.getJSON("user4s/level/searchlist") },
|
||||
{ field: 'balance', title: __('Balance'), operate: false},
|
||||
{ field: 'integral', title: __('Integral'), operate: false },
|
||||
|
@ -46,7 +46,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'editable'], function
|
||||
{field: 'visittime', title: __('Visittime'), operate:'BETWEEN', addclass:'datetimepicker',data:'data-date-format="YYYY-MM-DD",data-date-use-current="true"', autocomplete:false, formatter: Table.api.formatter.datetime,datetimeFormat:'YYYY-MM-DD'},
|
||||
//{field: 'admin.nickname', title: __('操作员'), operate: 'LIKE'},
|
||||
{ field: 'createtime', title: __('开单时间'), operate: 'BETWEEN', addclass: 'datetimepicker',data: 'data-date-format="YYYY-MM-DD",data-date-use-current="true"',datetimeFormat:'YYYY-MM-DD', autocomplete: false, formatter: Table.api.formatter.datetime },
|
||||
{field: 'description', title: __('Description'), operate:false,editable:true},
|
||||
{field: 'description', title: __('Description'), operate:false},
|
||||
{ field: 'status', title: __('Status'), operate: '=',searchList: { "0": __('进行中'), "1": __('已办结') }, formatter: Table.api.formatter.status },
|
||||
//{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||
{
|
||||
@ -338,7 +338,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'editable'], function
|
||||
// { field: 'user.model', title: __('车型'), operate: false },
|
||||
// { field: 'user.color', title: __('颜色'), operate: false },
|
||||
{field: 'star_f', title: __('满意度'), operate: false},
|
||||
{field: 'description', title: __('Description'), operate: false,editable:true},
|
||||
{field: 'description', title: __('Description'), operate: false},
|
||||
{
|
||||
field: 'visit_time', title: __('回访时间'), operate: 'BETWEEN', addclass: 'datetimepicker', data: 'data-date-format="YYYY-MM-DD",data-date-use-current="true"', autocomplete: false, formatter: Table.api.formatter.datetime, datetimeFormat: 'YYYY-MM-DD'
|
||||
},
|
||||
|
@ -0,0 +1,6 @@
|
||||
location / {
|
||||
if (!-e $request_filename) {
|
||||
rewrite ^(.*)$ /index.php?s=/$1 last;
|
||||
break;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user