brand status about select 0306

This commit is contained in:
qianhy
2023-03-06 16:03:37 +08:00
committed by lccsw
parent 3de89800e0
commit e966dd36c2
10 changed files with 27 additions and 11 deletions
+9 -1
View File
@@ -1488,7 +1488,15 @@ class Common extends CI_Controller
}
if ($type == 1) {
$tp == 0 && $lists[] = array('id' => 0, 'name' => $name ? $name : '选择品牌');
$res = $this->mdAutoBrand->select($where, 'id desc', 0, 0, 'id,name');
#$res = $this->mdAutoBrand->select($where, 'id desc', 0, 0, 'id,name');
$res = array();
$rows = $this->mdAutoBrand->select($where, 'status desc, id asc', 0, 0, 'id,name');
foreach($rows as $v){
$res[] = array(
'id' => strlen($status) > 0 ? $v['id'] : " " . $v['id'],
'name' => $v['name'],
);
}
} else if ($type == 2) {
$tp == 0 && $lists[] = array('id' => 0, 'name' => $name ? $name : '选择车系');
$res = $this->mdAutoSeries->select(array_merge($where, ['brand_id' => $pid]), 'id desc', 0, 0, 'id,name');
+3 -2
View File
@@ -152,14 +152,15 @@ class Business extends HD_Controller{
public function get()
{
$id = $this->input->get('id');
$map_brand = $this->auto_brand_model->map('id', 'name', ['status>'=>-1], 'id desc', 0 , 0, 'id, name');
#$map_brand = $this->auto_brand_model->map('id', 'name', ['status>'=>-1], 'id desc', 0 , 0, 'id, name');
$map_brand = $this->auto_brand_model->map_brand_list($this->auto_brand_model->map_brand(array('status = 1' => null)));
$city_rows = $this->sys_city_model->select(['status'=>1],'id desc',0,0,'city_id,name');
$row = $this->auto_business_model->get(['id'=>$id]);
if($id && $row){
$info = [
'id' => $row['id'],
'city_id' => $row['city_id'],
'brand_id' => $row['brand_id'],
'brand_id' => ' '.$row['brand_id'],
's_id' => $row['s_id'],
'v_id' => $row['v_id'],
'price_car' => $row['price_car'],
+1
View File
@@ -44,6 +44,7 @@ class Finance extends HD_Controller{
$params['s_id'] && $where["$t2.s_id"] = $params['s_id'];
$params['v_id'] && $where["$t2.v_id"] = $params['v_id'];
$params['cor_id'] && $where["$t2.cor_id"] = $params['cor_id'];
$where[$t2.'.brand_id in (select id from lc_auto_brand where status = 1)'] = null;
$total = $this->auto_finance_model->count_finance($where);
$lists = array();
+2 -1
View File
@@ -152,7 +152,8 @@ class Introduce extends HD_Controller
);
$showInfo = ['title' => '请选择车型', 'url' => '/auto/introduce/add'];
}
$showInfo['brandList'] = $this->mdAutoBrand->select(["status<>-1" => null], 'id desc', 0, 0, 'id, name');
#$showInfo['brandList'] = $this->mdAutoBrand->select(["status<>-1" => null], 'id desc', 0, 0, 'id, name');
$showInfo['brandList'] = $this->mdAutoBrand->map_brand_list($this->mdAutoBrand->map_brand(array('status > -1' => null), false));
$this->data['_title'] = $_title;
$this->data['info'] = $info;
$this->data['showInfo'] = $showInfo;
+2 -1
View File
@@ -117,7 +117,8 @@ class Series extends HD_Controller{
return $this->show_json(SYS_CODE_FAIL, '数据不存在!');
}
}
$brands = $this->auto_brand_model->select([],'','','','id,name');
#$brands = $this->auto_brand_model->select([],'','','','id,name');
$brands = $this->auto_brand_model->map_brand_list($this->auto_brand_model->map_brand(array('status > -1' => null), false));
$this->data['brands'] = $brands;
$this->data['info'] = $info;
$this->data['_title'] = $id ? '编辑车系' : '新增车系';
+6 -1
View File
@@ -470,9 +470,14 @@ class Goods extends HD_Controller
$info['in_time'] = date('Y-m-d H:i:s');
$_title = '新增商品';
$edit_url = '/items/goods/goods/add';
$where_auto = ['status>' => -1];
}
if ($this->input->get('sold') != 1){
$where_auto = ['status' => 1];
}
$autoList[1] = $this->mdAutoBrand->select($where_auto, 'id desc', 0, 0, 'id,name');
#$autoList[1] = $this->mdAutoBrand->select($where_auto, 'id desc', 0, 0, 'id,name');
$autoList[1] = $this->mdAutoBrand->map_brand($where_auto, false);
$showInfo['autoList'] = $autoList;
$showInfo['comList'] = $comList;
$showInfo['statusAry'] = $this->statusAry;
+1 -1
View File
@@ -87,7 +87,7 @@
url: '/auto/brand/json_lists',
type: 'post',
dataType: 'json',
data: {status:1},
data: {status:'>-1'},
beforeSend: function () {},
success: function (data) {
if (1 == data.code) {
+1 -1
View File
@@ -108,7 +108,7 @@
methods:{
init_auto:function(){
var vm = this;
$.get('common/auto',{type:1,tp:1},function(response){
$.get('common/auto',{type:1,tp:1,status:3},function(response){
if (response.code == 1) {
vm.brand_arr = response.data;
}
-1
View File
@@ -66,7 +66,6 @@
<colgroup>
<col width="70%"/>
<col width="10%"/>
<col width="20%"/>
</colgroup>
<tbody>
<tr v-for="(v,i) in seriesList">
+2 -2
View File
@@ -253,7 +253,7 @@
<button type="button" class="am-btn am-btn-success am-btn-sm w100" @click="reset">重置</button>
</div>
<div class="am-form-group fl ml20">
<button type="button" data-open="/items/goods/goods/get"
<button type="button" data-open="/items/goods/goods/get?sold=1"
class="am-btn am-btn-success am-btn-sm w100">新增
</button>
</div>
@@ -342,7 +342,7 @@
:data-open="'/items/goods/logs/get?id='+v.id+'&title='+v.title"
class="am-btn am-btn-primary am-btn-xs">轨迹</a>
<a href="javascript:void(0);"
:data-open="'/items/goods/goods/get?id='+v.id"
:data-open="'/items/goods/goods/get?sold=1&id='+v.id"
class="am-btn am-btn-primary am-btn-xs">编辑</a></td>
</tr>
</template>