edit-api-add_over_time
This commit is contained in:
@@ -708,6 +708,30 @@ class Orders extends HD_Controller
|
||||
$this->data['list'] = $list;
|
||||
$hasNext = ceil($count / $size) > $page ? 1 : 0;
|
||||
$this->data['commonPage'] = array('page' => $page, 'pageLimit' => $size, 'pageCount' => $count, 'hasNext' => $hasNext);
|
||||
|
||||
$car_info = [
|
||||
'vin' => ''
|
||||
];
|
||||
$row = $this->receiver_orders_v2_model->get(['id' => $params['id']]);
|
||||
$car_info['name'] = $row['owner_name'];
|
||||
//获取车信息
|
||||
$brand = $this->auto_brand_model->get(['id' => $row['brand_id']], 'name');
|
||||
$serie = $this->auto_series_model->get(['id' => $row['s_id']], 'name');
|
||||
$row['brand_name'] = $brand['name'];
|
||||
$row['s_name'] = $serie['name'];
|
||||
$attr_arr = [$row['v_id'], $row['cor_id'], $row['incor_id']];
|
||||
$attr = $this->auto_attr_model->get_map_by_ids($attr_arr, 'id,title');
|
||||
$row['v_name'] = isset($attr[$row['v_id']]) ? $attr[$row['v_id']][0]['title'] : '';
|
||||
$row['cor_name'] = isset($attr[$row['cor_id']]) ? $attr[$row['cor_id']][0]['title'] : '';
|
||||
$row['incor_name'] = isset($attr[$row['incor_id']]) ? $attr[$row['incor_id']][0]['title'] : '';
|
||||
$car_info['car'] = "{$row['brand_name']}-{$row['s_name']}-{$row['v_name']}-{$row['incor_name']}";
|
||||
//获取选择车辆vin
|
||||
if ($row['item_id']) {
|
||||
$this->load->model('items/items_model', 'mdItems');
|
||||
$row_goods = $this->mdItems->get(array('id' => $row['item_id']));
|
||||
$car_info['vin'] = $row_goods['vin'];
|
||||
}
|
||||
$this->data['car_info'] = $car_info;
|
||||
return $this->show_json(SYS_CODE_SUCCESS, '操作成功');
|
||||
}
|
||||
$this->data['id'] = $this->input->get('id');
|
||||
|
||||
@@ -323,8 +323,8 @@ class Ordersv2List
|
||||
$fields['name'] = $size > 1000 ? $val['name']
|
||||
: '<a href="javascript:;" data-open="' . $open_url . $val['id'] . '">' . $val['name'] . $o_tp . '<br>' . $val['mobile'] . '</a>';
|
||||
}
|
||||
$fields['id_card'] = $info_json['c_owner_cardid'] ? $info_json['c_owner_cardid'].'\t' : '';
|
||||
$fields['mobile'] = $size > 1000 ? $mobile.'\t' : $mobile;
|
||||
$fields['id_card'] = $info_json['c_owner_cardid'] ? '\t'.$info_json['c_owner_cardid'] : '';
|
||||
$fields['mobile'] = $size > 1000 ? '\t'.$mobile : $mobile;
|
||||
$fields['car_name'] = "{$brand_name}-{$series_name}-{$v_name}-{$cor_name}";
|
||||
$fields['price_car'] = number_format($money_json['price_car'],2);
|
||||
$fields['payway_name'] = $this->paywayAry[$val['payway']];
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
<div class="coms-table-wrap mt10" id="paylog_content" style="min-height:400px;overflow:hidden">
|
||||
<div class="align-l ml10">
|
||||
车主: {{car_info.name}}
|
||||
车型: {{car_info.car}}
|
||||
<span v-if="car_info.vin">车架号: {{car_info.vin}}<span>
|
||||
</div>
|
||||
<div class="align-r">
|
||||
<a class="am-btn am-btn-primary am-btn-xs mr10" data-modal="/receiver/orderv2/orders/add_paylog?id=<?=$id?>">添加收款记录</a>
|
||||
</div>
|
||||
@@ -60,6 +65,7 @@
|
||||
list:[],
|
||||
pay_price: '',
|
||||
need_price: '',
|
||||
car_info : [],
|
||||
},
|
||||
mounted: function () {
|
||||
this.getData(1);
|
||||
@@ -73,6 +79,7 @@
|
||||
that.page = result.data.commonPage;
|
||||
that.pay_price = result.data.pay_price;
|
||||
that.need_price = result.data.need_price;
|
||||
that.car_info = result.data.car_info;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -674,7 +674,8 @@ class CusorderV2 extends Wxapp{
|
||||
$where["order_time >="] = date('Y-m-d 00:00:00',strtotime($order_s_time));
|
||||
$where["order_time <="] = date('Y-m-d 00:00:00',strtotime($order_e_time));
|
||||
}
|
||||
$fileds = 'id,customer_id,name,mobile,brand_id,s_id,v_id,cor_id,incor_id,payway,status,c_time,money_json,if_num,info_json,main_type,owner_name,owner_mobile,item_id';
|
||||
$fileds = 'id,customer_id,name,mobile,brand_id,s_id,v_id,cor_id,incor_id,payway,
|
||||
status,c_time,money_json,if_num,info_json,main_type,owner_name,owner_mobile,item_id,order_time,over_time';
|
||||
$count = $this->orders_model->count($where);
|
||||
$lists = [];
|
||||
if ($count) {
|
||||
@@ -787,7 +788,8 @@ class CusorderV2 extends Wxapp{
|
||||
$other_data['交车合照'] = ['type' => 'text', 'value' => $img_status['other_img']['text'], 'bg_color' => $img_status['other_img']['color']];
|
||||
$other_data['交付'] = ['type' => 'checkbox', 'value' => '', 'lists' => $ck_status, 'bg_color' => ''];
|
||||
}
|
||||
$other_data['订单日期'] = ['type' => 'text', 'value' => date('Y-m-d', $val['c_time']), 'bg_color' => ''];
|
||||
$val['order_time']!='0000-00-00 00:00:00' && $other_data['下定时间'] = ['type' => 'text', 'value' => date('Y-m-d', strtotime($val['order_time'])), 'bg_color' => ''];
|
||||
$val['over_time']!='0000-00-00 00:00:00' && $other_data['截止交付'] = ['type' => 'text', 'value' => date('Y-m-d', strtotime($val['over_time'])), 'bg_color' => ''];
|
||||
} else {
|
||||
$price_intention = $money_json['price_intention'] ? $money_json['price_intention'] : '';
|
||||
$other_data = [
|
||||
|
||||
Reference in New Issue
Block a user