admin_goods_1203
This commit is contained in:
@@ -37,6 +37,21 @@ class Goods extends HD_Controller
|
||||
$where_1 = $where_2 = $where_3 = array('m.id<>1' => null);
|
||||
$autoList = array();
|
||||
$search_type = 0;//0不连表,1联表筛选精品,2联表筛选销售,3联表筛选精品和销售
|
||||
if ($params['in_time']) {
|
||||
$in_time = explode(' ~ ', $params['in_time']);
|
||||
if ($in_time[0]) {
|
||||
$where['in_time >='] = $in_time[0] . ' 00:00:00';
|
||||
$where_1['in_time >='] = $in_time[0] . ' 00:00:00';
|
||||
$where_2['m.in_time >='] = $in_time[0] . ' 00:00:00';
|
||||
$where_3['m.in_time >='] = $in_time[0] . ' 00:00:00';
|
||||
}
|
||||
if ($in_time[1]) {
|
||||
$where['in_time <='] = $in_time[1] . ' 23:59:59';
|
||||
$where_1['in_time <='] = $in_time[1] . ' 23:59:59';
|
||||
$where_2['m.in_time <='] = $in_time[1] . ' 23:59:59';
|
||||
$where_3['m.in_time <='] = $in_time[1] . ' 23:59:59';
|
||||
}
|
||||
}
|
||||
if ($params['brand_id']) {
|
||||
$where['brand_id'] = $params['brand_id'];
|
||||
$where_1['brand_id'] = $params['brand_id'];
|
||||
@@ -84,12 +99,26 @@ class Goods extends HD_Controller
|
||||
$params['city_id'] && $where_biz['city_id'] = $params['city_id'];
|
||||
$params['county_id'] && $where_biz['county_id'] = $params['county_id'];
|
||||
$res_biz = $this->mdBiz->select($where_biz, 'id desc', 0, 0, 'id');
|
||||
if ($res_biz) {
|
||||
$res_addr = $this->addr_model->select($where_biz, 'id desc', 0, 0, 'id');
|
||||
if ($res_biz && $res_addr) {
|
||||
$str_ids = implode(',', array_column($res_biz, 'id'));
|
||||
$str_addr_ids = implode(',', array_column($res_addr, 'id'));
|
||||
$where["biz_id in ({$str_ids}) or addr_id in ({$str_addr_ids})"] = null;
|
||||
$where_1["biz_id in ({$str_ids}) or addr_id in ({$str_addr_ids})"] = null;
|
||||
$where_2["m.biz_id in ({$str_ids}) or m.addr_id in ({$str_addr_ids})"] = null;
|
||||
$where_3["m.biz_id in ({$str_ids}) or m.addr_id in ({$str_addr_ids})"] = null;
|
||||
} else if ($res_biz) {
|
||||
$str_ids = implode(',', array_column($res_biz, 'id'));
|
||||
$where["biz_id in ({$str_ids})"] = null;
|
||||
$where_1["biz_id in ({$str_ids})"] = null;
|
||||
$where_2["m.biz_id in ({$str_ids})"] = null;
|
||||
$where_3["m.biz_id in ({$str_ids})"] = null;
|
||||
} else if ($res_addr) {
|
||||
$str_addr_ids = implode(',', array_column($res_addr, 'id'));
|
||||
$where["addr_id in ({$str_addr_ids})"] = null;
|
||||
$where_1["addr_id in ({$str_addr_ids})"] = null;
|
||||
$where_2["m.addr_id in ({$str_addr_ids})"] = null;
|
||||
$where_3["m.addr_id in ({$str_addr_ids})"] = null;
|
||||
} else {
|
||||
$where['biz_id'] = -2;
|
||||
$where_1['biz_id'] = -2;
|
||||
|
||||
+145
-114
@@ -1,98 +1,3 @@
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/appitem/font-awesome.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/appitem/AdminLTE.min.css">
|
||||
<style>
|
||||
.label-group-wrap {
|
||||
margin-top: 10px;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.label-group {
|
||||
display: inline-block;
|
||||
margin-right: 4px;
|
||||
margin-bottom: 16px;
|
||||
font-size: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.label-group-wrap .label, .label-group > .label {
|
||||
font-size: 10px;
|
||||
font-weight: normal;
|
||||
margin-right: 1px;
|
||||
white-space: normal;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.label-group > span + a.label {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
border-left: 1px solid #fff;
|
||||
margin-left: -3px;
|
||||
}
|
||||
|
||||
.label-group-wrap .label, .label-group > .label {
|
||||
font-size: 10px;
|
||||
font-weight: normal;
|
||||
margin-right: 1px;
|
||||
white-space: normal;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.order-on {
|
||||
border-bottom: 2px solid #e61773;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.order-none {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.order {
|
||||
width: 150px;
|
||||
display: table-cell;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.order a {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
color: #5e5e5e;
|
||||
}
|
||||
|
||||
.angle_top {
|
||||
content: '';
|
||||
width: 0;
|
||||
height: 0;
|
||||
display: block;
|
||||
border-style: solid;
|
||||
border-width: 0 6px 6px;
|
||||
border-color: transparent transparent #5e5e5e;
|
||||
position: absolute;
|
||||
transform: rotate(180deg);
|
||||
bottom: 14px;
|
||||
right: 17px;
|
||||
}
|
||||
|
||||
.angle_bottom {
|
||||
content: '';
|
||||
width: 0;
|
||||
height: 0;
|
||||
display: block;
|
||||
border-style: solid;
|
||||
border-width: 0 6px 6px;
|
||||
border-color: transparent transparent #5e5e5e;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 17px;
|
||||
}
|
||||
</style>
|
||||
<div class="coms-table-wrap mt10">
|
||||
<form class=" form-search coms-table-hd clearfix no-border" onsubmit="return false"
|
||||
action="/items/goods/goods">
|
||||
@@ -185,15 +90,9 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label class="am-para-label w100">车架号:</label>
|
||||
<div class="am-para-inline w200">
|
||||
<input type="text" name="vin" placeholder="车架号关键字" v-model="params.vin"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w100">状态:</label>
|
||||
<div class="am-para-inline w120">
|
||||
<label class="am-para-label w70">状态:</label>
|
||||
<div class="am-para-inline w100">
|
||||
<select title="状态" name="status" v-model="params.status">
|
||||
<option value="">选择状态</option>
|
||||
<option :value="i" v-for="(v,i) in statusAry">{{v}}</option>
|
||||
@@ -201,7 +100,30 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label class="am-para-label w100">精品:</label>
|
||||
<label class="am-para-label w80">车架号:</label>
|
||||
<div class="am-para-inline w200">
|
||||
<input type="text" name="vin" placeholder="车架号关键字" v-model="params.vin"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w100">入库日期:</label>
|
||||
<div class="am-para-inline w300">
|
||||
<input id="order-lists-time" type="text" name="in_time" value="<?= $params['in_time'] ?>"
|
||||
autocomplete="off"
|
||||
placeholder="入库日期范围"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group fl mb10" style="padding-top: 5px">
|
||||
<div class="am-para-inline w250">
|
||||
<a class="mr10 order-lists-time-btn" href="javascript:void (0);" data-date="today">今天</a>
|
||||
<a class="mr10 order-lists-time-btn" href="javascript:void (0);"
|
||||
data-date="yesterday">昨日</a>
|
||||
<a class="mr10 order-lists-time-btn" href="javascript:void (0);" data-date="7day">最近7天</a>
|
||||
<a class="mr10 order-lists-time-btn" href="javascript:void (0);" data-date="30day">最近30天</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w60">精品:</label>
|
||||
<div class="am-para-inline">
|
||||
<div class="label-group-wrap label-group-sortable" style="display: inline">
|
||||
<div class="label-group" v-for="(v,i) in fines">
|
||||
@@ -240,15 +162,6 @@
|
||||
<table class="am-table am-table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="6%">
|
||||
<span :class="'order'+('id'==params.order?' order-on':' order-none')">
|
||||
<a href="javascript:void(0)" @click="set_order('id')">
|
||||
<span class="mr10">ID</span>
|
||||
<i class="angle_top" v-if="'desc'==params.sort||'id'!=params.order"></i>
|
||||
<i class="angle_bottom" v-if="'asc'==params.sort||'id'!=params.order"></i>
|
||||
</a>
|
||||
</span>
|
||||
</th>
|
||||
<th width="25%">
|
||||
<span :class="'order'+('brand_id'==params.order?' order-on':' order-none')">
|
||||
<a href="javascript:void(0)" @click="set_order('brand_id')">
|
||||
@@ -300,7 +213,6 @@
|
||||
<tbody>
|
||||
<template v-for="(v,i) in lists">
|
||||
<tr>
|
||||
<td>{{v.id}}</td>
|
||||
<td>{{v.title}}</td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" :data-modal="'/items/goods/goods/get_info?id='+v.id"
|
||||
@@ -401,6 +313,30 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
require(['laydate', 'autocomplete'], function (laydate) {
|
||||
//日期范围
|
||||
laydate.render({elem: '#order-lists-time', range: '~'});
|
||||
$('.order-lists-time-btn').click(function () {
|
||||
var type = $(this).data('date'), date = '', d_obj = new Date();
|
||||
switch (type) {
|
||||
case 'today':
|
||||
date = d_obj.Format('yyyy-MM-dd');
|
||||
date = date + ' ~ ' + date;
|
||||
break;
|
||||
case 'yesterday':
|
||||
date = (new Date(d_obj.getTime() - 86400000)).Format('yyyy-MM-dd');
|
||||
date = date + ' ~ ' + date;
|
||||
break;
|
||||
case '7day':
|
||||
date = (new Date(d_obj.getTime() - 86400000 * 7)).Format('yyyy-MM-dd') + ' ~ ' + d_obj.Format('yyyy-MM-dd');
|
||||
break;
|
||||
case '30day':
|
||||
date = (new Date(d_obj.getTime() - 86400000 * 30)).Format('yyyy-MM-dd') + ' ~ ' + d_obj.Format('yyyy-MM-dd');
|
||||
break;
|
||||
}
|
||||
$('#order-lists-time').val(date);
|
||||
});
|
||||
});
|
||||
function load_goods() {
|
||||
var file = $("#goods-file");
|
||||
if (file.val() == '') {
|
||||
@@ -850,3 +786,98 @@
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/appitem/font-awesome.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/appitem/AdminLTE.min.css">
|
||||
<style>
|
||||
.label-group-wrap {
|
||||
margin-top: 10px;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.label-group {
|
||||
display: inline-block;
|
||||
margin-right: 4px;
|
||||
margin-bottom: 16px;
|
||||
font-size: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.label-group-wrap .label, .label-group > .label {
|
||||
font-size: 10px;
|
||||
font-weight: normal;
|
||||
margin-right: 1px;
|
||||
white-space: normal;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.label-group > span + a.label {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
border-left: 1px solid #fff;
|
||||
margin-left: -3px;
|
||||
}
|
||||
|
||||
.label-group-wrap .label, .label-group > .label {
|
||||
font-size: 10px;
|
||||
font-weight: normal;
|
||||
margin-right: 1px;
|
||||
white-space: normal;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.order-on {
|
||||
border-bottom: 2px solid #e61773;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.order-none {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.order {
|
||||
width: 150px;
|
||||
display: table-cell;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.order a {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
color: #5e5e5e;
|
||||
}
|
||||
|
||||
.angle_top {
|
||||
content: '';
|
||||
width: 0;
|
||||
height: 0;
|
||||
display: block;
|
||||
border-style: solid;
|
||||
border-width: 0 6px 6px;
|
||||
border-color: transparent transparent #5e5e5e;
|
||||
position: absolute;
|
||||
transform: rotate(180deg);
|
||||
bottom: 14px;
|
||||
right: 17px;
|
||||
}
|
||||
|
||||
.angle_bottom {
|
||||
content: '';
|
||||
width: 0;
|
||||
height: 0;
|
||||
display: block;
|
||||
border-style: solid;
|
||||
border-width: 0 6px 6px;
|
||||
border-color: transparent transparent #5e5e5e;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 17px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -265,15 +265,6 @@
|
||||
<table class="am-table am-table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%">
|
||||
<span :class="'order'+('id'==params.order?' order-on':' order-none')">
|
||||
<a href="javascript:void(0)" @click="set_order('id')">
|
||||
<span class="mr10">ID</span>
|
||||
<i class="angle_top" v-if="'desc'==params.sort||'id'!=params.order"></i>
|
||||
<i class="angle_bottom" v-if="'asc'==params.sort||'id'!=params.order"></i>
|
||||
</a>
|
||||
</span>
|
||||
</th>
|
||||
<th width="25%">
|
||||
<span :class="'order'+('brand_id'==params.order?' order-on':' order-none')">
|
||||
<a href="javascript:void(0)" @click="set_order('brand_id')">
|
||||
@@ -334,7 +325,6 @@
|
||||
<tbody>
|
||||
<template v-for="(v,i) in lists">
|
||||
<tr>
|
||||
<td>{{v.id}}</td>
|
||||
<td>{{v.title}}</td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" :data-modal="'/items/goods/goods/get_info?id='+v.id"
|
||||
|
||||
@@ -42,7 +42,7 @@ class Home extends Wxapp
|
||||
$list = array();
|
||||
$res = [];
|
||||
if ($distribute == 1) {//分销
|
||||
$res = $this->mdAutoBrand->select(array('status' => 1), "id desc", 0, 0, 'id,name');
|
||||
$res = $this->mdAutoBrand->select(array('status' => 1, 'id<>' => 3), "id desc", 0, 0, 'id,name');
|
||||
} else {
|
||||
if ($this->biz_id) {//查找门店授权品牌
|
||||
$re_b = $this->mdBiz->get(array('id' => $this->biz_id, 'status' => 1));
|
||||
@@ -50,7 +50,7 @@ class Home extends Wxapp
|
||||
$jsondata = json_decode($re_b['jsondata'], true);
|
||||
if ($jsondata['auto_brands']) {
|
||||
$brand_ids = implode($jsondata['auto_brands'], ',');
|
||||
$res = $this->mdAutoBrand->select(array("id in ({$brand_ids})" => null, 'status' => 1), "id desc", 0, 0, 'id,name');
|
||||
$res = $this->mdAutoBrand->select(array("id in ({$brand_ids})" => null, 'status' => 1, 'id<>' => 3), "id desc", 0, 0, 'id,name');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -71,6 +71,7 @@ class Home extends Wxapp
|
||||
array_multisort($timeKey, SORT_DESC, $list);//排序,根据$total 排序
|
||||
}
|
||||
}
|
||||
$list[] = ['id' => '3', 'name' => '狸车'];//全品牌蓄客
|
||||
$this->data['title'] = '推广素材';
|
||||
$this->data['list'] = $list;
|
||||
$this->data['list_type'] = [['id' => 4, 'name' => '图片'], ['id' => 1, 'name' => '视频']];
|
||||
|
||||
@@ -120,6 +120,7 @@ class Topic extends Wxapp
|
||||
$brand_ids = implode(',', $re_t['brand_ids']);
|
||||
$brand_id = count($brand_ids) >= 2 ? $brand_ids[1] : $re_t['brand_ids'];
|
||||
}
|
||||
$brand_id == 3 && $brand_id = 0;//狸车品牌时设为0
|
||||
$row = $this->clues_model->get(['mobile' => $this->session['mobile']]);
|
||||
if ($row) {
|
||||
$update = ['en_time' => date('Y-m-d H:i:s')];
|
||||
|
||||
Reference in New Issue
Block a user