edit-admin-svr

This commit is contained in:
lccsw
2022-07-25 13:52:27 +08:00
parent 9dadd46b74
commit f36758c7b6
3 changed files with 45 additions and 3 deletions
+16
View File
@@ -21,6 +21,7 @@ class Srv extends HD_Controller{
$params = $this->input->get();
$params['id'] && $_SESSION['srv_biz_id'] = $params['id'];
!$params['type'] && $params['type'] = '';
!$params['title'] && $params['title'] = '';
!strlen($params['status']) && $params['status'] = '';
$page = $params['page'] ? $params['page'] : 1;
$pagesize = 20;
@@ -30,6 +31,7 @@ class Srv extends HD_Controller{
];
strlen($params['status']) && $where['status'] = $params['status'];
$params['type'] && $where['type'] = $params['type'];
$params['title'] && $where['title'] = $params['title'];
$count = $this->biz_settle_srv_model->count($where);
$lists = [];
if($count){
@@ -219,4 +221,18 @@ class Srv extends HD_Controller{
public function export(){
}
public function get_title(){
$biz_id = intval($_SESSION['srv_biz_id']);
$type = $this->input->get('type');
!$type && $type=1;
$where = [
'type' => $type,
'biz_id' => $biz_id,
'status' => 1
];
$rows = $this->biz_settle_srv_model->select_groupby('title', $where, '', 0, 20, 'id,title');
$this->data['lists'] = $rows;
return $this->show_json(SYS_CODE_SUCCESS, '保存成功');
}
}
+25 -1
View File
@@ -21,6 +21,15 @@
</select>
</div>
</div>
<div class="am-form-group fl">
<label class="am-para-label w80">全部:</label>
<div class="am-para-inline w100">
<select name="title" v-model="params.title">
<option value="">请选择</option>
<option v-for="(v,i) in titleAry" :value="v.title">{{v.title}}</option>
</select>
</div>
</div>
<div class="am-form-group fl ml20">
<button type="submit" class="am-btn am-btn-success am-btn-sm w100">搜索</button>
</div>
@@ -91,7 +100,8 @@
el: '#vue-app',
data: {
params: [],
typeAry:<?=$typeAry ? json_encode($typeAry) : '[]'?>
typeAry:<?=$typeAry ? json_encode($typeAry) : '[]'?>,
titleAry:[]
},
mounted: function () {
var vm = this;
@@ -100,6 +110,20 @@
methods: {
},
watch: {
'params.type': function (nv, ov) {
if(nv){
var that = this;
console.log(nv);
var data = {"type":nv}
$.get('/biz/srv/get_title',data,function(result){
if(result.code && result.data.lists){
that.titleAry = result.data.lists
}
},'json')
}else{
that.titleAry = []
}
}
}
});
$(function () {
@@ -64,7 +64,8 @@
<input type="hidden" class="" name="business_licence" data-type="1" value="" onchange="upLoan(0,this)">
<img :src="info.loan_info.notify_file" />
</a>
<div class="tc f12"></div>
<div class="tc f12">
</div>
</li>
</ul>
<?}else{?>
@@ -97,7 +98,8 @@
<input type="hidden" class="" name="business_licence" data-type="1" value="" onchange="upLoan(1,this)">
<img :src="info.loan_info.lend_file" />
</a>
<div class="tc f12"></div>
<div class="tc f12">
</div>
</li>
</ul>
<?}else{?>