admin_customer_1029
This commit is contained in:
@@ -195,7 +195,26 @@ class Member extends HD_Controller{
|
||||
//批量操作(默认修改状态)
|
||||
public function batch()
|
||||
{
|
||||
|
||||
$field = $this->input->post('field');
|
||||
if ($field === 'ifcheck') {
|
||||
$status = intval($this->input->post('value'));
|
||||
$ids = $this->input->post('id');
|
||||
$ids = explode(',', $ids);
|
||||
if (!$ids || count($ids) < 1) {
|
||||
$this->show_json(0, '请选择要操作的选项');
|
||||
}
|
||||
$where = array('id in(' . implode(',', $ids) . ')' => null);
|
||||
} else {
|
||||
$id = intval($this->input->post('id'));
|
||||
$status = intval($this->input->post('value'));
|
||||
if (!$id) {
|
||||
$this->show_json(0, '参数错误');
|
||||
}
|
||||
$where['id'] = $id;
|
||||
}
|
||||
$data['status'] = $status;
|
||||
$this->userM->update($data, $where);
|
||||
return $this->show_json(SYS_CODE_SUCCESS, '保存成功');
|
||||
}
|
||||
|
||||
//导出数据列表
|
||||
|
||||
@@ -39,7 +39,9 @@
|
||||
<button type="submit" class="am-btn am-btn-success am-btn-sm w100">搜索</button>
|
||||
</div>
|
||||
<div class="am-form-group fl ml10">
|
||||
<button type="button" data-open="/app/licheb/member/get" class="am-btn am-btn-success am-btn-sm w100">添加用户</button>
|
||||
<button type="button" data-open="/app/licheb/member/get" class="am-btn am-btn-success am-btn-sm w100">
|
||||
添加用户
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -62,24 +64,38 @@
|
||||
<td><?= $v['id'] ?></td>
|
||||
<td><?= $v['uname'] ?></td>
|
||||
<td><?= $v['mobile'] ?></td>
|
||||
<td><?= $v['group_name']?></td>
|
||||
<td><?= $v['group_name'] ?></td>
|
||||
<td>
|
||||
<?php foreach($v['bizs'] as $val) {?>
|
||||
<span><?= $val['biz_name']?></span><br>
|
||||
<?}?>
|
||||
<?php foreach ($v['bizs'] as $val) { ?>
|
||||
<span><?= $val['biz_name'] ?></span><br>
|
||||
<? } ?>
|
||||
</td>
|
||||
<td><?= date('Y-m-d H:i:s',$v['c_time']) ?></td>
|
||||
<td><?= date('Y-m-d H:i:s', $v['c_time']) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" class="align-r">
|
||||
<a data-open="/app/licheb/member/get?id=<?=$v['id']?>" class="am-btn am-btn-primary am-btn-xs">修改</a>
|
||||
<?if($v['umajia']){?>
|
||||
<a class="am-btn am-btn-primary am-btn-xs" data-open="/app/appusual/umajia/get?uid=<?=$v['id']?>&app_id=<?=$app_id?>" data-title="编辑马甲">编辑马甲</a>
|
||||
<a href="javascript:void(0)" data-ajax="post" data-action="/app/appusual/umajia/del?app_id=<?=$app_id?>"
|
||||
data-params-uid="<?=$v['id']?>" class="am-btn am-btn-xs am-btn-danger">脱去马甲</a>
|
||||
<?}elseif(isset($v['umajia'])){?>
|
||||
<a class="am-btn am-btn-primary am-btn-xs" data-open="/app/appusual/umajia/get?uid=<?=$v['id']?>&app_id=<?=$app_id?>" data-title="披上马甲">披上马甲</a>
|
||||
<?}?>
|
||||
<input type="hidden" class="id-<?= $v['id'] ?>" name="id" value="<?= $v['id'] ?>" checked>
|
||||
<select data-update-group="" data-list-target=".id-<?= $v['id'] ?>"
|
||||
data-action="/app/licheb/member/batch" data-field=""
|
||||
style="height: 30px;width: 70px;">
|
||||
<option value="0" <?= 0 == $v['status'] ? 'selected' : '' ?>>下架</option>
|
||||
<option value="1" <?= 1 == $v['status'] ? 'selected' : '' ?>>上架</option>
|
||||
<option value="-1" <?= -1 == $v['status'] ? 'selected' : '' ?>>删除</option>
|
||||
</select>
|
||||
<a data-open="/app/licheb/member/get?id=<?= $v['id'] ?>"
|
||||
class="am-btn am-btn-primary am-btn-xs">修改</a>
|
||||
<? if ($v['umajia']) { ?>
|
||||
<a class="am-btn am-btn-primary am-btn-xs"
|
||||
data-open="/app/appusual/umajia/get?uid=<?= $v['id'] ?>&app_id=<?= $app_id ?>"
|
||||
data-title="编辑马甲">编辑马甲</a>
|
||||
<a href="javascript:void(0)" data-ajax="post"
|
||||
data-action="/app/appusual/umajia/del?app_id=<?= $app_id ?>"
|
||||
data-params-uid="<?= $v['id'] ?>" class="am-btn am-btn-xs am-btn-danger">脱去马甲</a>
|
||||
<? } elseif (isset($v['umajia'])) { ?>
|
||||
<a class="am-btn am-btn-primary am-btn-xs"
|
||||
data-open="/app/appusual/umajia/get?uid=<?= $v['id'] ?>&app_id=<?= $app_id ?>"
|
||||
data-title="披上马甲">披上马甲</a>
|
||||
<? } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
@@ -97,19 +113,19 @@
|
||||
var vm = new Vue({
|
||||
el: '#vue-app',
|
||||
data: {
|
||||
params:[],
|
||||
cityAry:[],//城市
|
||||
countyAry:[],//行政区
|
||||
bizAry:[],
|
||||
province_id:'350'
|
||||
params: [],
|
||||
cityAry: [],//城市
|
||||
countyAry: [],//行政区
|
||||
bizAry: [],
|
||||
province_id: '350'
|
||||
},
|
||||
mounted:function() {
|
||||
mounted: function () {
|
||||
var vm = this;
|
||||
vm.params = <?=json_encode($params)?>;
|
||||
vm.init_citys(vm.province_id);
|
||||
},
|
||||
methods: {
|
||||
init_citys:function(province_id) {
|
||||
init_citys: function (province_id) {
|
||||
var vm = this;
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
@@ -127,9 +143,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
get_bizs:function(){
|
||||
get_bizs: function () {
|
||||
var that = this;
|
||||
if(that.params.city_id>0 || that.params.county_id>0){
|
||||
if (that.params.city_id > 0 || that.params.county_id > 0) {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '/biz/store/store/json_lists',
|
||||
@@ -138,15 +154,15 @@
|
||||
province_id: that.province_id,
|
||||
city_id: that.params.city_id,
|
||||
county_id: that.params.county_id,
|
||||
status:1
|
||||
status: 1
|
||||
},
|
||||
success:function(response){
|
||||
success: function (response) {
|
||||
if (response.code == 1) {
|
||||
that.bizAry = response.data.list;
|
||||
if(that.params.biz_id>0){
|
||||
if (that.params.biz_id > 0) {
|
||||
var biz_id = '';
|
||||
for(var i in that.bizAry){
|
||||
if(that.params.biz_id == that.bizAry[i].id){
|
||||
for (var i in that.bizAry) {
|
||||
if (that.params.biz_id == that.bizAry[i].id) {
|
||||
biz_id = that.params.biz_id;
|
||||
break;
|
||||
}
|
||||
@@ -162,14 +178,14 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'params.city_id':function(nv, ov){
|
||||
watch: {
|
||||
'params.city_id': function (nv, ov) {
|
||||
var that = this;
|
||||
if(nv == ''){
|
||||
if (nv == '') {
|
||||
that.countyAry = [];
|
||||
that.params.county_id = '';
|
||||
} else {
|
||||
if(nv.substring(0,4) != that.params.county_id.substring(0, 4)){
|
||||
if (nv.substring(0, 4) != that.params.county_id.substring(0, 4)) {
|
||||
that.params.county_id = '';
|
||||
}
|
||||
$.ajax({
|
||||
@@ -178,10 +194,10 @@
|
||||
dataType: 'json',
|
||||
data: {
|
||||
id: nv,
|
||||
key:'county',
|
||||
type:1
|
||||
key: 'county',
|
||||
type: 1
|
||||
},
|
||||
success:function(response){
|
||||
success: function (response) {
|
||||
if (response.code == 1) {
|
||||
that.countyAry = response.data;
|
||||
}
|
||||
@@ -190,7 +206,7 @@
|
||||
}
|
||||
that.get_bizs();
|
||||
},
|
||||
'params.county_id':function(nv, ov){
|
||||
'params.county_id': function (nv, ov) {
|
||||
var that = this;
|
||||
that.get_bizs();
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w100">线上来源:</label>
|
||||
<label class="am-para-label w100">线下来源:</label>
|
||||
<div class="am-form-group am-para-inline w150">
|
||||
<select name="cf_clues" v-model="params.cf_clues">
|
||||
<option value="">请选择</option>
|
||||
@@ -55,7 +55,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w100">线下来源:</label>
|
||||
<label class="am-para-label w100">线上来源:</label>
|
||||
<div class="am-form-group am-para-inline w120">
|
||||
<select name="cfrom_id" v-model="cfrom_id">
|
||||
<option value=0>请选择</option>
|
||||
@@ -169,8 +169,8 @@
|
||||
<th width="5%"><span>客户电话</span></th>
|
||||
<th width="5%"><span>客户等级</span></th>
|
||||
<th width="6%"><span>来源类型</span></th>
|
||||
<th width="8%"><span>线上来源</span></th>
|
||||
<th width="8%"><span>线下来源</span></th>
|
||||
<th width="8%"><span>线上来源</span></th>
|
||||
<th width="8%"><span>所属门店</span></th>
|
||||
<th width="5%"><span>状态</span></th>
|
||||
<th width="5%"><span>销售员</span></th>
|
||||
@@ -354,6 +354,7 @@
|
||||
that.cfrom_id = 0;
|
||||
that.cfrom_id2 = 0;
|
||||
that.params.city_id_admin = '';
|
||||
that.params.cf_clues = '';
|
||||
$('#cf_time').val('');
|
||||
$(".order-times").map(function () {
|
||||
var id = this.value;
|
||||
|
||||
Reference in New Issue
Block a user