20240605
This commit is contained in:
@@ -240,7 +240,7 @@ class Orders extends HD_Controller
|
||||
{
|
||||
$id = $this->input->get('id');
|
||||
|
||||
$row = $this->receiver_orders_v2_model->get(['id' => $id]);
|
||||
$row = $this->receiver_orders_model->get(['id' => $id]);
|
||||
$customers = $this->customers_model->get(['id' => $row['customer_id']]);
|
||||
if (!$row) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '订单不存在!');
|
||||
@@ -251,247 +251,43 @@ class Orders extends HD_Controller
|
||||
$customers['of2_id'] && $of_title .= '-' . $of_ary['list'][$customers['of2_id']];
|
||||
$row['of_title'] = $of_title;
|
||||
}
|
||||
$money_json = json_decode($row['money_json'], true);
|
||||
$deposit = $money_json['price_book'];
|
||||
$row['money_json'] = json_decode($row['money_json'], true);
|
||||
$jsondata = $row['jsondata'] ? json_decode($row['jsondata'], true) : array();
|
||||
$row['price_discount'] = $money_json['price_discount'];
|
||||
//售价详细信息
|
||||
$sale_detail = "指导价:" . number_format($money_json['price_car'], 2);
|
||||
$money_json['price_discount'] && $sale_detail .= ',优惠金额:' . number_format($money_json['price_discount'], 2);
|
||||
$money_json['price_color'] && $sale_detail .= ',颜色加价:' . number_format($money_json['price_color'], 2);
|
||||
$money_json['price_coplus'] && $sale_detail .= ',公司加价:' . number_format($money_json['price_coplus'], 2);
|
||||
$row['sale_detail'] = $sale_detail;
|
||||
$sale_price = $this->orders_v2_entity->total_price($row['id']);
|
||||
$row['sale_price'] = number_format($sale_price, 2);
|
||||
$row['info_json'] = json_decode($row['info_json'], true);
|
||||
$row['status'] = intval($row['status']);
|
||||
$row['price'] = number_format($money_json['price_car'], 2);
|
||||
$row['deposit'] = number_format($deposit, 2);
|
||||
$row['c_time'] = date('Y-m-d', $row['c_time']);
|
||||
$row['payway'] = intval($row['payway']);
|
||||
$row['item_id'] = intval($row['item_id']);
|
||||
$row['cardid'] = $row['info_json']['c_cardid'] ? $row['info_json']['c_cardid'] : '';
|
||||
$row['address'] = $row['info_json']['c_address'] ? $row['info_json']['c_address'] : '';
|
||||
$row['owner_cardid'] = $row['info_json']['c_owner_cardid'] ? $row['info_json']['c_owner_cardid'] : '';
|
||||
$row['credit'] = $row['info_json']['c_credit'] ? $row['info_json']['c_credit'] : '';
|
||||
$row['company'] = $row['info_json']['c_company'] ? $row['info_json']['c_company'] : '';
|
||||
$row['car_city_name'] = '';
|
||||
if ($row['info_json']['car_city_id']) {
|
||||
$city_row = $this->sys_area_model->get(['city_id' => $row['info_json']['car_city_id']], 'city_name');
|
||||
$row['car_city_name'] = $city_row['city_name'];
|
||||
}
|
||||
$row['note'] = $jsondata['note'] ? $jsondata['note'] : '';
|
||||
//获取车信息
|
||||
$brand = $this->auto_brand_model->get(['id' => $row['brand_id']], 'name');
|
||||
$serie = $this->auto_series_model->get(['id' => $row['s_id']], 'name');
|
||||
$series = $this->auto_series_model->get(['id' => $row['series_id']], 'name');
|
||||
$car = $this->auto_cars_model->get(['id' => $row['car_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'] : '';
|
||||
//获取选择车辆vin
|
||||
if ($row['item_id']) {
|
||||
$this->load->model('items/items_model', 'mdItems');
|
||||
$row_goods = $this->mdItems->get(array('id' => $row['item_id']));
|
||||
$row['vin'] = $row_goods['vin'];
|
||||
}
|
||||
$row['if_usedcar_name'] = $row['if_usedcar'] ? ' (二手车)' : '';
|
||||
$row['s_name'] = $series['name'];
|
||||
$row['car_name'] = $car['name'];
|
||||
$row['delry_time'] = $row['delry_time'] != '0000-00-00 00:00:00'
|
||||
? str_replace(" 00:00:00", "", $row['delry_time']) : '';
|
||||
//获取车辆服务费
|
||||
$srv_info = $this->orders_v2_entity->order_srv_money($row['id'], 2);
|
||||
$fine_title = '';
|
||||
if ($row['fines']) {
|
||||
$fines = json_decode($row['fines'], true);
|
||||
$split = $fine_title = '';
|
||||
foreach ($fines as $key => $val) {
|
||||
$price = $val['price'] > 0 ? number_format(floatval($val['price']), 2) : '赠送';
|
||||
$fine_title .= $split . "{$val['txt']}:{$price}";
|
||||
$split = ' ';
|
||||
}
|
||||
}
|
||||
$row['fine_title'] = $fine_title;
|
||||
$srv_info['total'] = number_format($srv_info['total'], 2);
|
||||
$srv_detail = "";
|
||||
if ($srv_info['list']) {
|
||||
foreach ($srv_info['list'] as $key => $val) {
|
||||
$d = $srv_detail ? ',' : '';
|
||||
if ($val['key'] == 'price_fine_select' && $fine_title) {
|
||||
#$srv_detail .= $d . $val['title'] . ":" . number_format(floatval($val['money']), 2)."<span class='text-success'>[$fine_title]</span>";
|
||||
if ($val['money'] > 0) {
|
||||
$srv_detail .= $d . $val['title'] . ":" . number_format(floatval($val['money']), 2) . "<span class='text-success'>[$fine_title]</span>";
|
||||
} else {
|
||||
$srv_detail .= $d . $val['title'] . "<span class='text-success'>[$fine_title]</span>";
|
||||
}
|
||||
} else {
|
||||
$srv_detail .= $d . $val['title'] . ":" . number_format(floatval($val['money']), 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
$srv_info['detail'] = $srv_detail;
|
||||
$row['srv_info'] = $srv_info;
|
||||
//获取按揭信息
|
||||
if (!$row['payway']) {
|
||||
$loan = $this->order_loans_model->get(['o_id' => $row['id']]);
|
||||
|
||||
$notify_file_list = [];
|
||||
$file_list = $loan['notify_file'] ? explode(',', $loan['notify_file']) : array();
|
||||
if ($file_list) {
|
||||
foreach ($file_list as $item) {
|
||||
$notify_file_list[] = build_qiniu_image_url($item);
|
||||
}
|
||||
}
|
||||
$loan['notify_file_list'] = $notify_file_list;
|
||||
//$loan['notify_file_name'] = $loan['notify_file'] ? end(explode('/', $loan['notify_file'])) : '';
|
||||
$loan['lend_file'] = $loan['lend_file'] ? build_qiniu_image_url($loan['lend_file']) : '';
|
||||
$loan['lend_file_name'] = $loan['lend_file'] ? end(explode('/', $loan['lend_file'])) : '';
|
||||
|
||||
//$loan['finance_rows'] = $this->sys_finance_model->select(['status' => 1], '', 0, 0, 'id,title');
|
||||
$loan['finance_rows'] = $this->sys_supplier_model->select(['status' => 1, 'type' => 3], '', 0, 0, 'id,title');
|
||||
$loan['price_loan'] = $money_json['price_loan'] ? $money_json['price_loan'] : '';
|
||||
$loan['first_pay'] = 0;
|
||||
if ($money_json['price_loan']) {
|
||||
$loan['first_pay'] = $sale_price - $money_json['price_loan'];
|
||||
$money_json['price_loan0'] && $loan['first_pay'] -= $money_json['price_loan0']; // 首付按揭
|
||||
}
|
||||
!$loan['num'] && $loan['num'] = 36;
|
||||
$loan['is_tiexi'] = intval($loan['is_tiexi']);
|
||||
$loan['loan_time'] = $loan['loan_time'] != '0000-00-00 00:00:00' ? date('Y-m-d', strtotime($loan['loan_time'])) : '';
|
||||
$status_array = $this->receiver_order_status_model->select(['o_id' => $row['id'], 'pid_status' => 1], '', '', 'id,status');
|
||||
$loan['status_array'] = array_column($status_array, 'status');
|
||||
$row['loan_info'] = $loan;
|
||||
}
|
||||
|
||||
//获取按揭信息-首付按揭
|
||||
if (!$row['payway'] && $money_json['price_loan0']) {
|
||||
$loan = $this->order_loans0_model->get(['o_id' => $row['id']]);
|
||||
|
||||
$notify_file_list = [];
|
||||
$file_list = $loan['notify_file'] ? explode(',', $loan['notify_file']) : array();
|
||||
if ($file_list) {
|
||||
foreach ($file_list as $item) {
|
||||
$notify_file_list[] = build_qiniu_image_url($item);
|
||||
}
|
||||
}
|
||||
$loan['notify_file_list'] = $notify_file_list;
|
||||
$loan['lend_file'] = $loan['lend_file'] ? build_qiniu_image_url($loan['lend_file']) : '';
|
||||
$loan['lend_file_name'] = $loan['lend_file'] ? end(explode('/', $loan['lend_file'])) : '';
|
||||
|
||||
$loan['finance_rows'] = $this->sys_supplier_model->select(['status' => 1, 'type' => 3], '', 0, 0, 'id,title');
|
||||
$loan['price_loan'] = $money_json['price_loan0'] ? $money_json['price_loan0'] : '';
|
||||
$loan['first_pay'] = 0; // 不需要计算改值
|
||||
!$loan['num'] && $loan['num'] = 36;
|
||||
$loan['is_tiexi'] = intval($loan['is_tiexi']);
|
||||
$loan['loan_time'] = $loan['loan_time'] != '0000-00-00 00:00:00' ? date('Y-m-d', strtotime($loan['loan_time'])) : '';
|
||||
// 首付按揭的状态,根据记录值生成
|
||||
//$status_array = $this->receiver_order_status_model->select(['o_id'=>$row['id'],'pid_status'=>1],'','','id,status');
|
||||
//$loan['status_array'] = array_column($status_array,'status');
|
||||
$status_array = array();
|
||||
$row['finance_id0'] && $loan['notify_file'] && $status_array[] = 1;
|
||||
if ($this->app_liche_orders_model->get(['o_id' => $row['id'], 'type' => 8, 'status' => 1])) {
|
||||
$status_array[] = 2;
|
||||
}
|
||||
$loan['status_array'] = $status_array;
|
||||
$row['loan_info0'] = $loan;
|
||||
}
|
||||
|
||||
$row['downpayment_type_cn'] = $this->receiver_orders_model->downpayment_type($row['downpayment_type']);
|
||||
//获取审核资料信息
|
||||
$img_data = $this->receiver_order_datas_model->get(['o_id' => $row['id'], 'status>=' => 0]);
|
||||
$row['imgs_status'] = $this->order_datas_entity->data_ckinfo($img_data, $row['main_type']);
|
||||
//获取开票
|
||||
$bill_ck_img = json_decode($img_data['bill_ck_img'], true);
|
||||
if ($bill_ck_img) {
|
||||
foreach ($bill_ck_img as $key => $value) {
|
||||
$bill_ck_img[$key] = build_qiniu_image_url($value);
|
||||
}
|
||||
}
|
||||
$bill = $this->order_bills_model->get(['o_id' => $row['id']], 'status,file');
|
||||
$bill_status = $this->receiver_order_status_model->get(['o_id' => $row['id'], 'pid_status' => 3, 'status' => 1]); //是否已开票
|
||||
$bill['file'] = $bill['file'] ? build_qiniu_image_url($bill['file']) : '';
|
||||
$bill['file_type'] = $bill['file'] && strstr($bill['file'], '.pdf') ? 'pdf' : 'img';
|
||||
$bill['cardidA'] = $img_data['cardida'];
|
||||
$bill['cardidB'] = $img_data['cardidb'];
|
||||
$bill['business_licence'] = $img_data['business_licence'];
|
||||
$bill['bill_ck_img'] = $bill_ck_img;
|
||||
|
||||
$bill['status'] = $bill_status ? 1 : 0;
|
||||
$companys = $this->sys_company_model->select(['status' => 1, 'wx_mchid!=' => ''], 'id desc', '', '', 'id,short');
|
||||
$row['companys'] = $companys;
|
||||
$row_goods['company_id'] && $item_company = $this->sys_company_model->get(['id' => $row_goods['company_id']], 'id,short');
|
||||
if (!$item_company) {
|
||||
$item_html = '车辆归属<b>未选择</b>';
|
||||
} else {
|
||||
$item_html = "车辆公司归属<b>【{$item_company['short']}】</b>";
|
||||
}
|
||||
$pay_order = $this->app_liche_orders_model->get(['type' => 3, 'status' => 1, 'o_id' => $row['id']], 'mch_id');
|
||||
$pay_order && $pay_compay = $this->sys_company_model->get(['wx_mchid' => $pay_order['mch_id']], 'id,short');
|
||||
$pay_html = '';
|
||||
if ($pay_order) {
|
||||
$ck_html = $pay_compay['id'] == $item_company['id'] ? '<b class="am-text-success">一致</b>' : '<b class="am-text-warning">不一致</b>';
|
||||
$pay_html = "与尾款收款公司<b>【{$pay_compay['short']}】</b> {$ck_html}";
|
||||
}
|
||||
$bill['warning'] = $item_html . $pay_html;
|
||||
$row['bill'] = $bill;
|
||||
//获取合同文件
|
||||
$contracts = $this->order_contracts_model->select(['o_id' => $row['id'], 'status' => 1], '', '', '', 'id,type,file,status');
|
||||
$contract_data = [];
|
||||
if ($contracts) {
|
||||
foreach ($contracts as $key => $val) {
|
||||
$contract_data[$val['type']] = [
|
||||
'type' => $val['type'],
|
||||
'status' => $val['status'],
|
||||
// 'src' => http_host_com('api').'/'.$val['file'],
|
||||
'src' => http_host_com('api') . '/wxapp/licheb/protocol/pdf_img?id=' . $val['id'],
|
||||
];
|
||||
}
|
||||
}
|
||||
$row['contract_data'] = $contract_data;
|
||||
//获取图片识别信息
|
||||
$agent = $this->order_agents_model->get(['o_id' => $row['id']]);
|
||||
$company = $ins_risk = $business_risk = '';
|
||||
if ($agent) {
|
||||
$agent['ins_time'] = $agent['ins_time'] != '0000-00-00 00:00:00' ? date('Y-m-d', strtotime($agent['ins_time'])) : '';
|
||||
$agent_jsondata = $agent['jsondata'] ? json_decode($agent['jsondata'], true) : '';
|
||||
if ($agent_jsondata) {
|
||||
$company = $agent_jsondata['company'];
|
||||
$ins_risk = $agent_jsondata['ins_risk'];
|
||||
$business_risk = $agent_jsondata['business_risk'];
|
||||
}
|
||||
}
|
||||
$agent['company'] = $company;
|
||||
$agent['ins_risk'] = $ins_risk;
|
||||
$agent['business_risk'] = $business_risk;
|
||||
$insurance_img = json_decode($img_data['insurance_img'], true);
|
||||
$business_img = json_decode($img_data['business_img'], true);
|
||||
$accident_img = json_decode($img_data['accident_img'], true);
|
||||
$agent['insurance_price'] = $insurance_img['price'] ? $insurance_img['price'] : '';
|
||||
$agent['insurance_product'] = $insurance_img['product'] ? $insurance_img['product'] : '';
|
||||
$agent['business_price'] = $business_img['price'] ? $business_img['price'] : '';
|
||||
$agent['business_product'] = $business_img['product'] ? $business_img['product'] : '';
|
||||
$agent['car_num'] = $agent['car_num'] ? $agent['car_num'] : '';
|
||||
$agent['accident_price'] = $accident_img['price'] ? $accident_img['price'] : '';
|
||||
$agent['accident_title'] = $accident_img['product'] ? $accident_img['product'] : '';
|
||||
if (!$agent['ins_time'] && $business_img) {
|
||||
$img_jsondata = json_decode($img_data['jsondata'], true);
|
||||
$business_img_key = md5(build_qiniu_image_url($business_img['img']));
|
||||
$business_img_orc = $img_jsondata['ins_info'][$business_img_key];
|
||||
if ($business_img_orc['data']['投保日期']) {
|
||||
$agent['business_time'] = $business_img_orc['data']['投保日期'];
|
||||
} else {
|
||||
$agent['business_time'] = $business_img_orc['data']['coverYears'];
|
||||
}
|
||||
|
||||
}
|
||||
$row['agent'] = $agent;
|
||||
$img_data['business_licence'] && $img_data['business_licence'] = build_qiniu_image_url($img_data['business_licence']);
|
||||
$img_data['cardida'] && $img_data['cardida'] = build_qiniu_image_url($img_data['cardida']);
|
||||
$img_data['cardidb'] && $img_data['cardidb'] = build_qiniu_image_url($img_data['cardidb']);
|
||||
$img_data['pay_img'] && $img_data['pay_img'] = build_qiniu_image_url($img_data['pay_img']);
|
||||
$img_data['contract_img'] && $img_data['contract_img'] = build_qiniu_image_url($img_data['contract_img']);
|
||||
$img_data['car_img'] && $img_data['car_img'] = build_qiniu_image_url($img_data['car_img']);
|
||||
$img_data['car_auth_img'] && $img_data['car_auth_img'] = build_qiniu_image_url($img_data['car_auth_img']);
|
||||
$img_data['delivery_ck_img'] && $img_data['delivery_ck_img'] = build_qiniu_image_url($img_data['delivery_ck_img']);
|
||||
$img_data['equity_ck_img'] && $img_data['equity_ck_img'] = build_qiniu_image_url($img_data['equity_ck_img']);
|
||||
$img_data['bill_img'] && $img_data['bill_img'] = build_qiniu_image_url($img_data['bill_img']);
|
||||
$img_data['insurance_img'] && $img_data['insurance_img'] = build_qiniu_image_url($img_data['insurance_img']);
|
||||
$img_data['business_img'] && $img_data['business_img'] = build_qiniu_image_url($img_data['business_img']);
|
||||
$row['img_data'] = $img_data;
|
||||
//获取销售员
|
||||
if ($row['sale_id']) {
|
||||
$this->load->model('app/licheb/app_licheb_users_model', 'licheb_users_model');
|
||||
$this->load->model("biz/biz_model");
|
||||
$this->load->model("sys/sys_city_model", 'mdSysCity');
|
||||
$row_admin = $this->licheb_users_model->get(array('id' => $row['sale_id']));
|
||||
# 2023-03-20:如果 角色是 渠道经理 就显示 XX渠道 某某某, XX 取所在城市
|
||||
if ($row_admin['group_id'] == 4) {
|
||||
$row_city = $this->mdSysCity->get(['city_id' => $row_admin['city_id']]);
|
||||
$city_name = $row_city['name'] ? str_replace('市', '', $row_city['name']) . '渠道 ' : '';
|
||||
@@ -506,17 +302,9 @@ class Orders extends HD_Controller
|
||||
}
|
||||
$row['admin_name'] = $admin_name;
|
||||
}
|
||||
//订单状态
|
||||
if ($id > Orders_v2_entity::V2_START_ID) {
|
||||
$status_name = $this->orders_status_entity->last_status_cn($id);
|
||||
!$status_name && $status_name = '未下定';
|
||||
}
|
||||
$row['status_name'] = $status_name;
|
||||
$row['status_name'] = $this->receiver_orders_model->get_status($row['status']);
|
||||
//日志
|
||||
$where = [
|
||||
'order_id' => $row['id']
|
||||
];
|
||||
$logs = $this->order_oplogs_model->select($where, 'id desc', 1, 30, 'uname,log,c_time');
|
||||
$logs = [];
|
||||
$row['is_admin'] = $this->role == SUPER_ADMIN ? true : false;
|
||||
$row['is_admin'] = ($this->role == SUPER_ADMIN || $this->role == 40) ? true : false;
|
||||
|
||||
@@ -525,7 +313,7 @@ class Orders extends HD_Controller
|
||||
$this->data['logs'] = $logs;
|
||||
|
||||
$this->data['_title'] = '订单详情';
|
||||
return $this->show_view('receiver/orderv2/get/index', true);
|
||||
return $this->show_view('receiver/order/get/index', true);
|
||||
}
|
||||
|
||||
//添加单条数据
|
||||
@@ -1430,7 +1218,7 @@ class Orders extends HD_Controller
|
||||
$id = $this->input->post('id');
|
||||
$field = $this->input->post('filed');
|
||||
$save_value = $value = $this->input->post('value');
|
||||
$row = $this->receiver_orders_v2_model->get(['id' => $id]);
|
||||
$row = $this->receiver_orders_model->get(['id' => $id]);
|
||||
if (!$row) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '参数错误');
|
||||
}
|
||||
@@ -1448,60 +1236,9 @@ class Orders extends HD_Controller
|
||||
$update = [
|
||||
$field => $save_value
|
||||
];
|
||||
if ($field == 'insurance_img' || $field == 'business_img' || $field == 'accident_img') {
|
||||
$jsondata = json_decode($re_data['jsondata'], true);
|
||||
$img_url = build_qiniu_image_url($value);
|
||||
// $result = $this->qiniuorc->car_insure($img_url);
|
||||
$result = $this->tcmarket->autoInsurance($img_url);
|
||||
if (!$result['code'] && $field != 'accident_img') { //意外险不强制识别成功
|
||||
return $this->show_json(SYS_CODE_FAIL, '图片识别失败,请重新上传');
|
||||
}
|
||||
// $img_jsondata = [
|
||||
// 'img' => $value,
|
||||
// 'date' => $result['data']['投保确认时间'],
|
||||
// 'price' => floatval($result['data']['合计保费']),
|
||||
// 'product' => $result['data']['保险公司']
|
||||
// ];
|
||||
$img_jsondata = [
|
||||
'img' => $value,
|
||||
'date' => $result['data']['policyStartDate'],
|
||||
'price' => floatval($result['data']['premium']),
|
||||
'product' => $result['data']['companyName'] ? $result['data']['companyName'] : $result['data']['department']
|
||||
];
|
||||
|
||||
# 0612各保单支持返点系数, 保留系数
|
||||
if ($re_data) {
|
||||
$insurance_img = json_decode($re_data['insurance_img'], true);
|
||||
$business_img = json_decode($re_data['business_img'], true);
|
||||
$accident_img = json_decode($re_data['accident_img'], true);
|
||||
if ($field == 'insurance_img' && $insurance_img['rebate']) {
|
||||
$img_jsondata['rebate'] = $insurance_img['rebate'];
|
||||
} elseif ($field == 'business_img' && $business_img['rebate']) {
|
||||
$img_jsondata['rebate'] = $business_img['rebate'];
|
||||
} elseif ($field == 'accident_img' && $accident_img['rebate']) {
|
||||
$img_jsondata['rebate'] = $accident_img['rebate'];
|
||||
}
|
||||
}
|
||||
|
||||
$jsondata['ins_info'][md5($img_url)] = $result;
|
||||
$update[$field] = json_encode($img_jsondata, JSON_UNESCAPED_UNICODE);
|
||||
$update['jsondata'] = json_encode($jsondata, JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
//识别行驶证
|
||||
if ($field == 'car_img') {
|
||||
$result = $this->tcorc->VehicleLicense(build_qiniu_image_url($value));
|
||||
if (!$result['code']) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '图片识别失败,请重新上传');
|
||||
}
|
||||
$jsondata = json_decode($re_data['jsondata'], true);
|
||||
$jsondata['car_info'] = $result['data']['FrontInfo'];
|
||||
$update['jsondata'] = json_encode($jsondata, JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
$res = $this->receiver_order_datas_model->update($update, ['id' => $re_data_id]);
|
||||
if ($res) {
|
||||
if ($field == 'car_img') {//更新车牌号
|
||||
$this->order_datas_entity->up_car_num($id);
|
||||
}
|
||||
return $this->show_json(SYS_CODE_SUCCESS, '保存成功');
|
||||
} else {
|
||||
return $this->show_json(SYS_CODE_FAIL, '保存失败');
|
||||
|
||||
@@ -64,7 +64,7 @@ class OrdersList
|
||||
"status>=" => 0,
|
||||
];
|
||||
$_title = '全部订单';
|
||||
$view = 'receiver/orderv2/lists';
|
||||
$view = 'receiver/order/lists';
|
||||
$params['status_pid'] == 1 && $where["payway"] = 0;
|
||||
if (is_product()) {
|
||||
$where["biz_id<>"] = 1;
|
||||
@@ -73,9 +73,6 @@ class OrdersList
|
||||
$biz_ids = implode(',', $_SESSION['admin_info']['biz_id']);
|
||||
$where["biz_id in ($biz_ids)"] = null;
|
||||
}
|
||||
if ($params['biz_type']) {
|
||||
$where["biz_id in (select id from lc_biz where type = " . $params['biz_type'] . ')'] = null;
|
||||
}
|
||||
if ($params['of_id'] || $params['of2_id']) {
|
||||
$where_c = 'status>=0';
|
||||
$params['of_id'] && $where_c .= ' and of_id = ' . $params['of_id'];
|
||||
@@ -131,28 +128,6 @@ class OrdersList
|
||||
$where["ck_time <="] = $ck_time[1] . ' 23:59:59';
|
||||
}
|
||||
}
|
||||
if (strlen($params['is_bill'])) {
|
||||
if ($params['is_bill']) {
|
||||
$where["bill_time <> '0000-00-00 00:00:00'"] = null;
|
||||
} else {
|
||||
$where["bill_time"] = '0000-00-00 00:00:00';
|
||||
}
|
||||
}
|
||||
//交付时长
|
||||
if (strlen($params['over_id'])) {
|
||||
if ($params['over_id'] == 3) {
|
||||
$where["over_time>"] = date('Y-m-d', time() + 30 * 24 * 60 * 60);
|
||||
} else {
|
||||
if ($params['over_id'] == 1) {
|
||||
$e_day = 14;
|
||||
} elseif ($params['over_id'] == 2) {
|
||||
$e_day = 30;
|
||||
} else {
|
||||
$e_day = 7;
|
||||
}
|
||||
$where["over_time<="] = date('Y-m-d', time() + $e_day * 24 * 60 * 60);
|
||||
}
|
||||
}
|
||||
if ($params['brand_id']) {//品牌
|
||||
$where["brand_id"] = $params['brand_id'];
|
||||
} else {
|
||||
@@ -163,16 +138,6 @@ class OrdersList
|
||||
} else {
|
||||
$params['series_id'] = '';
|
||||
}
|
||||
if ($params['v_id']) {//车型
|
||||
$where["v_id"] = $params['v_id'];
|
||||
} else {
|
||||
$params['v_id'] = '';
|
||||
}
|
||||
if ($params['cor_id']) {//车身颜色
|
||||
$where["cor_id"] = $params['cor_id'];
|
||||
} else {
|
||||
$params['cor_id'] = '';
|
||||
}
|
||||
//销售员筛选
|
||||
if ($params['admin_id']) {
|
||||
$where["sale_id"] = $params['admin_id'];
|
||||
@@ -203,26 +168,11 @@ class OrdersList
|
||||
!$params['biz_id_admin'] && $params['biz_id_admin'] = '';
|
||||
$params['admin_id'] = '';
|
||||
}
|
||||
if (strlen($params['status_pid'])) {
|
||||
$where["brand_id>"] = 0;
|
||||
}
|
||||
if (strlen($params['status_pid']) && $params['status_pid'] != 21) { //付款-已下定
|
||||
$where["status <> 2"] = null;
|
||||
}
|
||||
if ($params['status_pid'] == 4) { //交付需要开票后才显示
|
||||
$where["id in (select o_id from lc_receiver_order_status where pid_status=3 and status=1)"] = null;
|
||||
}
|
||||
if (strlen($params['status_pid']) && !$params['status_pid']) { //付款列表 下定时间排序
|
||||
$orderby = "order_time desc";
|
||||
} elseif ($params['status_pid'] == 3) { // 开票列表 开票时间排序
|
||||
$orderby = "bill_time desc";
|
||||
} elseif ($params['status_pid'] == 21) { //退款时间排序
|
||||
$orderby = "refund_time desc";
|
||||
} elseif ($params['status_pid'] == 5 || ($params['status'] == 2 && $params['status_pid'] == 4)) { //交付时间排序
|
||||
$orderby = "ck_time desc,c_time desc";
|
||||
} else {
|
||||
$orderby = "c_time desc";
|
||||
|
||||
if (strlen($params['status'])) {
|
||||
$where['status'] = $params['status'];
|
||||
}
|
||||
$orderby = "c_time desc";
|
||||
$count = $this->ci->mdOrders->count($where);
|
||||
$rows = $this->ci->mdOrders->select($where, $orderby, $page, $size);
|
||||
$lists = [];
|
||||
@@ -273,17 +223,15 @@ class OrdersList
|
||||
$fields['o_id'] = $val['id'];
|
||||
$name = $val['name'];
|
||||
$mobile = $val['mobile'];
|
||||
$open_url = '/receiver/orderv2/orders/get?id=';
|
||||
$id_card_append = $info_json['c_owner_cardid'] ? '<br>' . $info_json['c_owner_cardid'] : '';
|
||||
$id_card = $info_json['c_owner_cardid'] ? '="' . $info_json['c_owner_cardid'] . '"' : '';
|
||||
$open_url = '/receiver/orders/get?id=';
|
||||
$fields['name'] = $size > 1000 ? $name
|
||||
: '<a href="javascript:;" data-open="' . $open_url . $val['id'] . '">' . $name . '<br>' . $mobile . $id_card_append . '</a>';
|
||||
$fields['id_card'] = $id_card;
|
||||
: '<a href="javascript:;" data-open="' . $open_url . $val['id'] . '">' . $name . '<br>' . $mobile . '<br>' . $val['card_id'] . '</a>';
|
||||
$fields['id_card'] = $val['card_id'];
|
||||
$fields['mobile'] = $size > 1000 ? '="' . $mobile . '"' : $mobile;
|
||||
$fields['car_name'] = "{$brand_name}-{$series_name}-{$car_name}";
|
||||
$fields['price_car'] = 0;
|
||||
$fields['payway_name'] = $this->paywayAry[$val['payway']];
|
||||
$fields['price'] = $fields['payway_name'] . "<br>" . $fields['price_car'];
|
||||
$fields['payway'] = $fields['payway_name'];
|
||||
$fields['brand_name'] = $brand_name;
|
||||
$fields['series_name'] = $series_name;
|
||||
$status_name = $order_status_cn[$val['status']];
|
||||
@@ -533,7 +481,7 @@ class OrdersList
|
||||
if (!strlen($status_pid)) {
|
||||
$fields2 = [
|
||||
'car_name' => ['title' => '车辆', 'width' => '27%'], 'biz_name' => ['title' => '门店', 'width' => '12%'],
|
||||
'price' => ['title' => '最终售价', 'width' => '9%'],
|
||||
'payway' => ['title' => '付款方式', 'width' => '9%'],
|
||||
'of_title' => ['title' => '客户来源', 'width' => '10%'], 'status_name' => ['title' => '状态', 'width' => '9%'],
|
||||
'c_time' => ['title' => '订单时间', 'width' => '9%'
|
||||
]
|
||||
@@ -541,7 +489,7 @@ class OrdersList
|
||||
} elseif ($status_pid == 3) {
|
||||
$fields2 = [
|
||||
'car_name' => ['title' => '车辆', 'width' => '27%'], 'biz_name' => ['title' => '门店', 'width' => '12%'],
|
||||
'price' => ['title' => '最终售价', 'width' => '9%'],
|
||||
'payway' => ['title' => '付款方式', 'width' => '9%'],
|
||||
// 'payway_name' => ['title' => '付款方式', 'width' => '8%'],
|
||||
'of_title' => ['title' => '客户来源', 'width' => '10%'], 'status_name' => ['title' => '状态', 'width' => '9%'],
|
||||
'bill_time' => ['title' => '开票时间', 'width' => '9%']
|
||||
@@ -549,7 +497,7 @@ class OrdersList
|
||||
} else {
|
||||
$fields2 = [
|
||||
'car_name' => ['title' => '车辆', 'width' => '27%'], 'biz_name' => ['title' => '门店', 'width' => '12%'],
|
||||
'price' => ['title' => '最终售价', 'width' => '9%'],
|
||||
'payway' => ['title' => '付款方式', 'width' => '9%'],
|
||||
'of_title' => ['title' => '客户来源', 'width' => '10%'], 'status_name' => ['title' => '状态', 'width' => '9%'],
|
||||
'order_time' => ['title' => '下定时间', 'width' => '9%'], 'over_time' => ['title' => '交付截止', 'width' => '9%']
|
||||
];
|
||||
|
||||
@@ -0,0 +1,357 @@
|
||||
<div class="am-panel am-panel-default">
|
||||
<div class="am-panel-hd">
|
||||
<span style="font-size: 20px">资料审核</span>
|
||||
<span style="float:right;margin-top:5px">
|
||||
</span>
|
||||
</div>
|
||||
<div class="am-form-group clearfix">
|
||||
<div class="" v-if="info.main_type==1">
|
||||
<p class="am-text-default mb10 ml30 pt15 pb10">
|
||||
营业执照:
|
||||
</p>
|
||||
<ul id="viewer-business_licence" class="photopic-list ml30 clearfix">
|
||||
<li style="position:relative;" v-if="info.img_data.business_licence">
|
||||
<div style="position:absolute;top:5px;right:0;padding:0 8px 2px 8px;line-height:22px; background-color:rgba(0,0,0,.5);font-size:14px;color:#fff;"
|
||||
onclick="del_img('data','business_licence','')">x
|
||||
</div>
|
||||
<a target="_blank" class="pic">
|
||||
<img alt="营业执照" onclick="showViewer('viewer-business_licence')"
|
||||
:src="info.img_data.business_licence"/>
|
||||
</a>
|
||||
<div class="f12 tc"></div>
|
||||
</li>
|
||||
<li v-else>
|
||||
<a href="javascript:void(0);" class="pic" data-file="1" data-type="jpg,png,gif,png,jpeg"
|
||||
data-uptype="qiniu" data-field="business_licence" data-mark="compalbum">
|
||||
<input type="hidden" class="" name="business_licence" data-type="1" value=""
|
||||
onchange="upImg('business_licence',this)">
|
||||
<div></div>
|
||||
</a>
|
||||
<div class="tc f12"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="" v-else>
|
||||
<p class="am-text-default mb10 ml30 pt15 pb10">
|
||||
身份证:
|
||||
</p>
|
||||
<ul id="viewer-cardida" class="photopic-list ml30 clearfix">
|
||||
<li style="position:relative;" v-if="info.img_data.cardida">
|
||||
<div style="position:absolute;top:5px;right:0;padding:0 8px 2px 8px;line-height:22px; background-color:rgba(0,0,0,.5);font-size:14px;color:#fff;"
|
||||
onclick="del_img('data','cardida','')">x
|
||||
</div>
|
||||
<a target="_blank" class="pic">
|
||||
<img alt="身份证正面" onclick="showViewer('viewer-cardida')"
|
||||
:src="info.img_data.cardida"/>
|
||||
</a>
|
||||
<div class="f12 tc">身份证正面<br>
|
||||
<a :href="info.img_data.cardida" target="_blank">查看原图</a>
|
||||
</div>
|
||||
</li>
|
||||
<li v-else>
|
||||
<a href="javascript:void(0);" class="pic" data-file="1" data-type="jpg,png,gif,png,jpeg"
|
||||
data-uptype="qiniu" data-field="cardida" data-mark="compalbum">
|
||||
<input type="hidden" class="cardida" name="cardida" data-type="1" value=""
|
||||
onchange="upImg('cardida',this)">
|
||||
<div></div>
|
||||
</a>
|
||||
<div class="tc f12">身份证正面</div>
|
||||
</li>
|
||||
<li style="position:relative;" v-if="info.img_data.cardidb">
|
||||
<div style="position:absolute;top:5px;right:0;padding:0 8px 2px 8px;line-height:22px; background-color:rgba(0,0,0,.5);font-size:14px;color:#fff;"
|
||||
onclick="del_img('data','cardidb','')">x
|
||||
</div>
|
||||
<a target="_blank" class="pic">
|
||||
<img alt="身份证反面" onclick="showViewer('viewer-cardida')"
|
||||
:src="info.img_data.cardidb"/>
|
||||
</a>
|
||||
<div class="f12 tc">身份证反面<br>
|
||||
<a :href="info.img_data.cardidb" target="_blank">查看原图</a>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<li v-else>
|
||||
<a href="javascript:void(0);" class="pic" data-file="1" data-type="jpg,png,gif,png,jpeg"
|
||||
data-uptype="qiniu" data-field="cardidb" data-mark="compalbum">
|
||||
<input type="hidden" class="cardidb" name="cardidb" data-type="1" value=""
|
||||
onchange="upImg('cardidb',this)">
|
||||
<div></div>
|
||||
</a>
|
||||
<div class="tc f12">身份证反面</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="am-form-group clearfix">
|
||||
<p class="am-text-default mb10 ml30 pt15 pb10">
|
||||
订单合同:
|
||||
</p>
|
||||
<ul id="viewer-contract_img" class="photopic-list ml30 clearfix">
|
||||
<li style="position:relative;" v-if="info.img_data.contract_img">
|
||||
<div style="position:absolute;top:5px;right:0;padding:0 8px 2px 8px;line-height:22px; background-color:rgba(0,0,0,.5);font-size:14px;color:#fff;"
|
||||
onclick="del_img('data','contract_img','')">x
|
||||
</div>
|
||||
<a target="_blank" class="pic">
|
||||
<img alt="订单合同" onclick="showViewer('viewer-contract_img')"
|
||||
:src="info.img_data.contract_img"/>
|
||||
</a>
|
||||
</li>
|
||||
<li v-else>
|
||||
<a href="javascript:void(0);" class="pic" data-file="1" data-type="jpg,png,gif,png,jpeg"
|
||||
data-uptype="qiniu" data-field="contract_img" data-mark="compalbum">
|
||||
<input type="hidden" class="contract_img" name="contract_img" data-type="1" value=""
|
||||
onchange="upImg('contract_img',this)">
|
||||
<div></div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="am-form-group clearfix">
|
||||
<p class="am-text-default mb10 ml30 pt15 pb10">
|
||||
付款凭证:
|
||||
</p>
|
||||
<ul id="viewer-pay_img" class="photopic-list ml30 clearfix">
|
||||
<li style="position:relative;" v-if="info.img_data.pay_img">
|
||||
<div style="position:absolute;top:5px;right:0;padding:0 8px 2px 8px;line-height:22px; background-color:rgba(0,0,0,.5);font-size:14px;color:#fff;"
|
||||
onclick="del_img('data','pay_img','')">x
|
||||
</div>
|
||||
<a target="_blank" class="pic">
|
||||
<img alt="付款凭证" onclick="showViewer('viewer-pay_img')"
|
||||
:src="info.img_data.pay_img"/>
|
||||
</a>
|
||||
</li>
|
||||
<li v-else>
|
||||
<a href="javascript:void(0);" class="pic" data-file="1" data-type="jpg,png,gif,png,jpeg"
|
||||
data-uptype="qiniu" data-field="pay_img" data-mark="compalbum">
|
||||
<input type="hidden" class="pay_img" name="pay_img" data-type="1" value=""
|
||||
onchange="upImg('pay_img',this)">
|
||||
<div></div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="am-form-group clearfix">
|
||||
<p class="am-text-default mb10 ml30 pt15 pb10">
|
||||
权益确认书:
|
||||
</p>
|
||||
<ul id="viewer-equity_ck_img" class="photopic-list ml30 clearfix">
|
||||
<li style="position:relative;" v-if="info.img_data.equity_ck_img">
|
||||
<div style="position:absolute;top:5px;right:0;padding:0 8px 2px 8px;line-height:22px; background-color:rgba(0,0,0,.5);font-size:14px;color:#fff;"
|
||||
onclick="del_img('data','equity_ck_img','')">x
|
||||
</div>
|
||||
<a target="_blank" class="pic">
|
||||
<img alt="权益确认书" onclick="showViewer('viewer-equity_ck_img')"
|
||||
:src="info.img_data.equity_ck_img"/>
|
||||
</a>
|
||||
</li>
|
||||
<li v-else>
|
||||
<a href="javascript:void(0);" class="pic" data-file="1" data-type="jpg,png,gif,png,jpeg"
|
||||
data-uptype="qiniu" data-field="equity_ck_img" data-mark="compalbum">
|
||||
<input type="hidden" class="equity_ck_img" name="equity_ck_img" data-type="1" value=""
|
||||
onchange="upImg('equity_ck_img',this)">
|
||||
<div></div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="am-form-group clearfix">
|
||||
<p class="am-text-default mb10 ml30 pt15 pb10">
|
||||
发票:
|
||||
</p>
|
||||
<ul id="viewer-bill_img" class="photopic-list ml30 clearfix">
|
||||
<li style="position:relative;" v-if="info.img_data.bill_img">
|
||||
<div style="position:absolute;top:5px;right:0;padding:0 8px 2px 8px;line-height:22px; background-color:rgba(0,0,0,.5);font-size:14px;color:#fff;"
|
||||
onclick="del_img('data','bill_img','')">x
|
||||
</div>
|
||||
<a target="_blank" class="pic">
|
||||
<img alt="发票" onclick="showViewer('viewer-bill_img')"
|
||||
:src="info.img_data.bill_img"/>
|
||||
</a>
|
||||
</li>
|
||||
<li v-else>
|
||||
<a href="javascript:void(0);" class="pic" data-file="1" data-type="jpg,png,gif,png,jpeg"
|
||||
data-uptype="qiniu" data-field="bill_img" data-mark="compalbum">
|
||||
<input type="hidden" class="bill_img" name="bill_img" data-type="1" value=""
|
||||
onchange="upImg('bill_img',this)">
|
||||
<div></div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="am-form-group clearfix">
|
||||
<p class="am-text-default mb10 ml30 pt15 pb10">
|
||||
行驶证:
|
||||
</p>
|
||||
<ul id="viewer-car_img" class="photopic-list ml30 clearfix">
|
||||
<li style="position:relative;" v-if="info.img_data.car_img">
|
||||
<div style="position:absolute;top:5px;right:0;padding:0 8px 2px 8px;line-height:22px; background-color:rgba(0,0,0,.5);font-size:14px;color:#fff;"
|
||||
onclick="del_img('data','car_img','')">x
|
||||
</div>
|
||||
<a target="_blank" class="pic">
|
||||
<img alt="行驶证" onclick="showViewer('viewer-car_img')"
|
||||
:src="info.img_data.car_img"/>
|
||||
</a>
|
||||
</li>
|
||||
<li v-else>
|
||||
<a href="javascript:void(0);" class="pic" data-file="1" data-type="jpg,png,gif,png,jpeg"
|
||||
data-uptype="qiniu" data-field="car_img" data-mark="compalbum">
|
||||
<input type="hidden" class="car_img" name="car_img" data-type="1" value=""
|
||||
onchange="upImg('car_img',this)">
|
||||
<div></div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group clearfix">
|
||||
<div class="">
|
||||
<p class="am-text-default mb10 ml30 pt15 pb10">
|
||||
保单:
|
||||
</p>
|
||||
<ul id="viewer-insurance_img" class="photopic-list ml30 clearfix">
|
||||
<li style="position:relative;" v-if="info.img_data.insurance_img">
|
||||
<div style="position:absolute;top:5px;right:0;padding:0 8px 2px 8px;line-height:22px; background-color:rgba(0,0,0,.5);font-size:14px;color:#fff;"
|
||||
onclick="del_img('data','insurance_img','')">x
|
||||
</div>
|
||||
<a target="_blank" class="pic">
|
||||
<img alt="交强险" onclick="showViewer('viewer-insurance_img')"
|
||||
:src="info.img_data.insurance_img"/>
|
||||
</a>
|
||||
<div class="f12 tc">交强险</div>
|
||||
</li>
|
||||
<li v-else>
|
||||
<a href="javascript:void(0);" class="pic" data-file="1" data-type="jpg,png,gif,png,jpeg"
|
||||
data-uptype="qiniu" data-field="insurance_img" data-mark="compalbum">
|
||||
<input type="hidden" class="insurance_img" name="insurance_img" data-type="1" value=""
|
||||
onchange="upImg('insurance_img',this)">
|
||||
<div></div>
|
||||
</a>
|
||||
<div class="tc f12">交强险</div>
|
||||
</li>
|
||||
<li style="position:relative;" v-if="info.img_data.business_img">
|
||||
<div style="position:absolute;top:5px;right:0;padding:0 8px 2px 8px;line-height:22px; background-color:rgba(0,0,0,.5);font-size:14px;color:#fff;"
|
||||
onclick="del_img('data','business_img','')">x
|
||||
</div>
|
||||
<a target="_blank" class="pic">
|
||||
<img alt="商业险" onclick="showViewer('viewer-insurance_img')"
|
||||
:src="info.img_data.business_img"/>
|
||||
</a>
|
||||
<div class="f12 tc">商业险</div>
|
||||
</li>
|
||||
<li v-else>
|
||||
<a href="javascript:void(0);" class="pic" data-file="1" data-type="jpg,png,gif,png,jpeg"
|
||||
data-uptype="qiniu" data-field="business_img" data-mark="compalbum">
|
||||
<input type="hidden" class="business_img" name="business_img" data-type="1" value=""
|
||||
onchange="upImg('business_img',this)">
|
||||
<div></div>
|
||||
</a>
|
||||
<div class="tc f12">商业险</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group clearfix">
|
||||
<div class="">
|
||||
<p class="am-text-default mb10 ml30 pt15 pb10">
|
||||
实名认证:
|
||||
</p>
|
||||
<ul id="viewer-car_auth_img" class="photopic-list ml30 clearfix">
|
||||
<li style="position:relative;" v-if="info.img_data.car_auth_img">
|
||||
<div style="position:absolute;top:5px;right:0;padding:0 8px 2px 8px;line-height:22px; background-color:rgba(0,0,0,.5);font-size:14px;color:#fff;"
|
||||
onclick="del_img('data','car_auth_img','')">x
|
||||
</div>
|
||||
<a target="_blank" class="pic">
|
||||
<img alt="交车合照" onclick="showViewer('viewer-cardida')"
|
||||
:src="info.img_data.car_auth_img"/>
|
||||
</a>
|
||||
</li>
|
||||
<li v-else>
|
||||
<a href="javascript:void(0);" class="pic" data-file="1" data-type="jpg,png,gif,png,jpeg"
|
||||
data-uptype="qiniu" data-field="car_auth_img" data-mark="compalbum">
|
||||
<input type="hidden" class="car_auth_img" name="car_auth_img" data-type="1" value=""
|
||||
onchange="upImg('car_auth_img',this)">
|
||||
<div></div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group clearfix">
|
||||
<div class="">
|
||||
<p class="am-text-default mb10 ml30 pt15 pb10">
|
||||
交车合照:
|
||||
</p>
|
||||
<ul id="viewer-delivery_ck_img" class="photopic-list ml30 clearfix">
|
||||
<li style="position:relative;" v-if="info.img_data.delivery_ck_img">
|
||||
<div style="position:absolute;top:5px;right:0;padding:0 8px 2px 8px;line-height:22px; background-color:rgba(0,0,0,.5);font-size:14px;color:#fff;"
|
||||
onclick="del_img('data','delivery_ck_img','')">x
|
||||
</div>
|
||||
<a target="_blank" class="pic">
|
||||
<img alt="交车合照" onclick="showViewer('viewer-delivery_ck_img')"
|
||||
:src="info.img_data.delivery_ck_img"/>
|
||||
</a>
|
||||
</li>
|
||||
<li v-else>
|
||||
<a href="javascript:void(0);" class="pic" data-file="1" data-type="jpg,png,gif,png,jpeg"
|
||||
data-uptype="qiniu" data-field="delivery_ck_img" data-mark="compalbum">
|
||||
<input type="hidden" class="delivery_ck_img" name="delivery_ck_img" data-type="1" value=""
|
||||
onchange="upImg('delivery_ck_img',this)">
|
||||
<div></div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function upImg(field, obj) {
|
||||
var value;
|
||||
if (field == 'ins_img' || field == 'other_img') {
|
||||
value = $(obj).val();
|
||||
} else {
|
||||
value = $(obj).val();
|
||||
}
|
||||
var loading = layer.msg('图片上传中..', {
|
||||
icon: 16
|
||||
, shade: 0.3
|
||||
, time: false
|
||||
});
|
||||
$.post("/receiver/orders/edit_imgs", {
|
||||
'id': <?=$info['id']?>,
|
||||
'filed': field,
|
||||
'value': value,
|
||||
}, function (data) {
|
||||
layer.closeAll()
|
||||
if (data.code) {
|
||||
layer.msg(data.msg, {time: 2000, icon: 1}, function () {
|
||||
$.form.reload();
|
||||
});
|
||||
} else {
|
||||
layer.msg(data.msg, {icon: 2});
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function del_img(type, field, value) {
|
||||
layer.confirm('您确定要删除?', {icon: 3, title: '提示'}, function (index) {
|
||||
layer.close(index);
|
||||
$.post("/receiver/orders/del_img", {
|
||||
'id': <?=$info['id']?>,
|
||||
'type': type,
|
||||
'field': field,
|
||||
'value': value,
|
||||
}, function (data) {
|
||||
if (data.code) {
|
||||
layer.msg(data.msg, {time: 2000, icon: 1}, function () {
|
||||
$.form.reload();
|
||||
});
|
||||
} else {
|
||||
layer.msg(data.msg, {icon: 2});
|
||||
}
|
||||
}, 'json');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,638 @@
|
||||
<style type="text/css">
|
||||
.span-bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.am-para-label-con {
|
||||
font-weight: 400;
|
||||
line-height: 37px;
|
||||
text-align: left;
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
|
||||
.input-group {
|
||||
width: 100%;
|
||||
padding-right: 30px;
|
||||
}
|
||||
|
||||
.input-group-addon {
|
||||
padding: 0px 0px 0px 0px;
|
||||
font-size: 1.6rem;
|
||||
font-weight: normal;
|
||||
line-height: 0px;
|
||||
color: #333;
|
||||
text-align: right;
|
||||
background-color: #fff;
|
||||
border: 0px solid #fff;
|
||||
border-radius: 0px;
|
||||
width: 110px;
|
||||
}
|
||||
|
||||
.table-td {
|
||||
width: 20%;
|
||||
padding-top: 15px;
|
||||
line-height: 37px;
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
|
||||
.label-width {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.input-left {
|
||||
margin-left: 150px;
|
||||
}
|
||||
|
||||
.group-width {
|
||||
width: 45%;
|
||||
height: 56px;
|
||||
}
|
||||
|
||||
.my-ul ul li {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.my-panel {
|
||||
padding: 10px;
|
||||
border: 1px solid #ddd;
|
||||
height: 90px;
|
||||
}
|
||||
|
||||
.btn-group .disabled {
|
||||
background-color: #eee;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.photopic-list li {
|
||||
float: left;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.photopic-list .pic {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
line-height: 150px;
|
||||
border: 1px solid #e5e5e5;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
margin: 5px 0 10px;
|
||||
padding: 0;
|
||||
font-size: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.photopic-list .pic img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
border: none;
|
||||
padding: 0;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.photopic-list .pic div {
|
||||
background: url(/static/images/webuploader/add_img_pic.png) center no-repeat;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
<div id="vue-edit" class="am-form am-form-horizontal" style="width: 98%;padding-top: 10px">
|
||||
<div class="am-u-lg-12">
|
||||
<!-- 基本信息 -->
|
||||
<div class="am-panel am-panel-default">
|
||||
<div class="am-panel-hd">
|
||||
<span style="font-size: 20px">基本信息</span>
|
||||
<span class="ml10">{{info.sid}}</span>
|
||||
</div>
|
||||
<div class="am-panel-bd am-g" style="margin-top: 10px;margin-bottom: 10px;">
|
||||
<div class="am-form-inline">
|
||||
<div class="am-form-group am-u-lg-4">
|
||||
<label class="am-para-label label-width"><span class="span-bold">下单时间:</span></label>
|
||||
<div class="am-para-input">
|
||||
<label class="am-para-label-con">{{info.c_time}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group am-u-lg-4">
|
||||
<label class="am-para-label label-width"><span class="span-bold">订单状态:</span></label>
|
||||
<div class="am-para-input">
|
||||
<label class="am-para-label-con">{{info.status_name}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group am-u-lg-4">
|
||||
<label class="am-para-label label-width"><span class="span-bold">客户来源:</span></label>
|
||||
<div class="am-para-input">
|
||||
<label class="am-para-label-con">{{info.of_title}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 客户信息 -->
|
||||
<div class="am-panel am-panel-default">
|
||||
<div class="am-panel-hd">
|
||||
<span style="font-size: 20px">客户信息</span>
|
||||
<span style="float:right;margin-top:5px">
|
||||
</span>
|
||||
</div>
|
||||
<div class="am-panel-bd am-g" style="margin-top: 10px;margin-bottom: 10px;">
|
||||
<!--车主信息-->
|
||||
<div class="am-form-inline">
|
||||
<div class="am-form-group am-u-lg-6">
|
||||
<label class="am-para-label label-width"><span
|
||||
class="span-bold">{{info.main_type==1 ? "企业名称":"姓名"}}:</span></label>
|
||||
<div class="am-para-input">
|
||||
<label class="am-para-label-con">{{info.name}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group am-u-lg-6">
|
||||
<label class="am-para-label label-width"><span
|
||||
class="span-bold">手机号:</span></label>
|
||||
<div class="am-para-input">
|
||||
<label class="am-para-label-con">{{info.mobile}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-inline">
|
||||
<div class="am-form-group am-u-lg-6">
|
||||
<label class="am-para-label label-width"><span
|
||||
class="span-bold">{{info.main_type==1 ? "企业信用代码":"身份证号码"}}:</span></label>
|
||||
<div class="am-para-input">
|
||||
<label class="am-para-label-con">{{info.card_id}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--订单明细-->
|
||||
<? $this->load->view("receiver/order/get/oinfo"); ?>
|
||||
<!--按揭明细-->
|
||||
<? $this->load->view("receiver/order/get/loaninfo"); ?>
|
||||
<!--资料审核-->
|
||||
<? $this->load->view("receiver/order/get/ckinfo"); ?>
|
||||
<!--日志-->
|
||||
<? //$this->load->view("receiver/orderv2/get/log"); ?>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
require(['laydate'], function (laydate) {
|
||||
//日期范围
|
||||
laydate.render({
|
||||
elem: '#loan_time'
|
||||
, type: 'date'
|
||||
});
|
||||
laydate.render({
|
||||
elem: '#loan_time0'
|
||||
, type: 'date'
|
||||
});
|
||||
laydate.render({
|
||||
elem: '#ins_time'
|
||||
, type: 'date'
|
||||
});
|
||||
});
|
||||
var vue_obj;
|
||||
var xz_num = 0;
|
||||
var xz_name = "xuan_zhuan_<?=time()?>";
|
||||
$(document).ready(function () {
|
||||
vue_obj = new Vue({
|
||||
el: '#vue-edit',
|
||||
data: {
|
||||
info: <?=json_encode($info, JSON_UNESCAPED_UNICODE)?>,
|
||||
carslist: [],
|
||||
page: [],
|
||||
bx_imgs: [],
|
||||
car_imgs: [],
|
||||
register_img: [],
|
||||
brand_list: [],
|
||||
series_list: [],
|
||||
v_list: [],
|
||||
cor_list: [],
|
||||
incor_list: [],
|
||||
brand_id: '',
|
||||
s_id: '',
|
||||
v_id: '',
|
||||
cor_id: '',
|
||||
incor_id: '',
|
||||
vin: ''
|
||||
},
|
||||
mounted: function () {
|
||||
var that = this;
|
||||
that.brand_id = <?=$info['brand_id']?>,
|
||||
that.s_id = <?=$info['series_id']?>,
|
||||
that.v_id = '',
|
||||
that.cor_id = '',
|
||||
that.incor_id = '',
|
||||
that.bx_imgs = <?=$info['bx_imgs'] ? json_encode($info['bx_imgs']) : []?>,
|
||||
that.car_imgs = <?=$info['car_imgs'] ? json_encode($info['car_imgs']) : []?>,
|
||||
that.register_img = <?=$info['register_img'] ? json_encode($info['register_img']) : []?>
|
||||
},
|
||||
computed: {},
|
||||
created: function () {
|
||||
},
|
||||
methods: {
|
||||
setauto: function (type) {
|
||||
var that = this;
|
||||
var p_data = {'tp': 1, 'type': type};
|
||||
if (type == 2) {
|
||||
p_data['pid'] = that.brand_id;
|
||||
} else if (type == 3) {
|
||||
p_data['pid'] = that.s_id;
|
||||
}
|
||||
$.get("/common/auto", p_data, function (result) {
|
||||
if (type == 1) {
|
||||
that.brand_list = result.data
|
||||
} else if (type == 2) {
|
||||
that.series_list = result.data
|
||||
} else if (type == 3) {
|
||||
that.v_list = result.data[3]
|
||||
that.cor_list = result.data[4]
|
||||
that.incor_list = result.data[5]
|
||||
}
|
||||
})
|
||||
},
|
||||
carModal: function () {
|
||||
var that = this
|
||||
that.setauto(1);
|
||||
that.setauto(2);
|
||||
that.setauto(3);
|
||||
that.getCars(1);
|
||||
layer.open({
|
||||
type: 1,
|
||||
area: ['60%', '85%'], //宽高
|
||||
content: $('#car-modal'),
|
||||
title: '选择车辆',
|
||||
shade: false,
|
||||
btn: ['保存'],
|
||||
yes: function (index) {
|
||||
$.post("/receiver/orderv2/orders/edit_item", {
|
||||
'id': that.info.id,
|
||||
'item_id': that.info.item_id,
|
||||
'buy_price': that.info.buy_price,
|
||||
'buy_price_origin': that.info.buy_price_origin,
|
||||
'estimated_rebate': that.info.estimated_rebate,
|
||||
'estimated_rebate_origin': that.info.estimated_rebate_origin,
|
||||
}, function (data) {
|
||||
if (data.code) {
|
||||
layer.msg(data.msg, {time: 2000, icon: 1}, function () {
|
||||
$.form.reload();
|
||||
});
|
||||
} else {
|
||||
layer.msg(data.msg, {icon: 2});
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
});
|
||||
},
|
||||
carModalInfo: function () {
|
||||
var that = this
|
||||
layer.open({
|
||||
type: 1,
|
||||
// area: ['40%', '50%'], //宽高
|
||||
area: ['400', '300'], //宽高
|
||||
content: $('#car-modal-info'),
|
||||
title: '确认采购成本与预估返利',
|
||||
shade: false,
|
||||
btn: ['确定'],
|
||||
yes: function (index) {
|
||||
// alert(that.info.vin);
|
||||
layer.close(index);
|
||||
}
|
||||
});
|
||||
},
|
||||
getCars: function (page) {
|
||||
var vm = this;
|
||||
$.ajax({
|
||||
url: '/common/items',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
page: page,
|
||||
select_id: vm.info.item_id,
|
||||
brand_id: vm.brand_id,
|
||||
s_id: vm.s_id,
|
||||
v_id: vm.v_id,
|
||||
cor_id: vm.cor_id,
|
||||
incor_id: vm.incor_id,
|
||||
vin: vm.vin
|
||||
},
|
||||
success: function (re) {
|
||||
var carslist = re.data.list;
|
||||
vm.page = re.data.page;
|
||||
carslist.map(function (_item, _index) {
|
||||
if (vm.info.item_id == _item.id) {
|
||||
carslist[_index].selected = 1;
|
||||
} else {
|
||||
carslist[_index].selected = 0;
|
||||
}
|
||||
});
|
||||
vm.carslist = carslist;
|
||||
}
|
||||
});
|
||||
},
|
||||
setCars: function (cars, checked) {
|
||||
var vm = this;
|
||||
var carslist = vm.carslist;
|
||||
carslist.map(function (_item, _index) {
|
||||
carslist[_index].selected = 0;
|
||||
});
|
||||
vm.carslist = carslist;
|
||||
if (checked) {
|
||||
vm.info.item_id = cars.id;
|
||||
cars.selected = 1;
|
||||
vm.info.vin = cars.vin;
|
||||
vm.info.buy_price = cars.buy_price;
|
||||
vm.info.buy_price_origin = cars.buy_price;
|
||||
vm.info.estimated_rebate = cars.estimated_rebate;
|
||||
vm.info.estimated_rebate_origin = cars.estimated_rebate;
|
||||
this.carModalInfo();
|
||||
} else {
|
||||
vm.info.item_id = 0;
|
||||
vm.info.vin = '';
|
||||
vm.info.buy_price = 0;
|
||||
vm.info.buy_price_origin = 0;
|
||||
vm.info.estimated_rebate = 0;
|
||||
vm.info.estimated_rebate_origin = 0;
|
||||
}
|
||||
},
|
||||
beforeUsersPage: function () {
|
||||
var vm = this;
|
||||
if (vm.page.page == 1) {
|
||||
layer.msg('已经是第一页了');
|
||||
return;
|
||||
}
|
||||
vm.page.page--;
|
||||
vm.getCars(vm.page.page);
|
||||
},
|
||||
afterUsersPage: function () {
|
||||
var vm = this;
|
||||
vm.page.page++;
|
||||
vm.getCars(vm.page.page);
|
||||
},
|
||||
finish_loan: function (status) {
|
||||
var that = this;
|
||||
var url = '/receiver/orderv2/orders/edit_loan';
|
||||
var if_loan0 = false; // 首付按揭
|
||||
if (status == 2) {
|
||||
var loan_time = $('#loan_time').val();
|
||||
// if (!loan_time) {
|
||||
// layer.msg("请填写放款时间");
|
||||
// return;
|
||||
// }
|
||||
this.info.loan_info.loan_time = loan_time;
|
||||
} else if (status == 3) {
|
||||
if_loan0 = true;
|
||||
} else if (status == 4) {
|
||||
if_loan0 = true;
|
||||
var loan_time = $('#loan_time0').val();
|
||||
// if (!loan_time) {
|
||||
// layer.msg("请填写放款时间");
|
||||
// return;
|
||||
// }
|
||||
this.info.loan_info0.loan_time = loan_time;
|
||||
}
|
||||
if (if_loan0) {
|
||||
status = status - 2;
|
||||
url = '/receiver/orderv2/orders/edit_loan0';
|
||||
}
|
||||
$.post(url, {
|
||||
'info': this.info,
|
||||
'status': status
|
||||
}, function (data) {
|
||||
console.dir(data);
|
||||
if (data.code) {
|
||||
layer.msg(data.msg, function () {
|
||||
$.form.reload();
|
||||
});
|
||||
} else {
|
||||
layer.msg(data.msg);
|
||||
}
|
||||
}, 'json');
|
||||
},
|
||||
upTz: function (type, event) {
|
||||
var that = this;
|
||||
var formData = new FormData();
|
||||
formData.append("file", $(event.currentTarget).get(0).files[0]); //上传一个files对象
|
||||
formData.append('id', this.info.id);
|
||||
formData.append('type', type);
|
||||
if (type) {
|
||||
var loan_time = $('#loan_time').val();
|
||||
if (!loan_time) {
|
||||
layer.msg("请填写放款时间");
|
||||
return;
|
||||
}
|
||||
formData.append('loan_time', loan_time);
|
||||
}
|
||||
$.ajax({//jQuery方法,此处可以换成其它请求方式
|
||||
url: '/receiver/orderv2/orders/edit_loan',
|
||||
dataType: "json",
|
||||
type: "post",
|
||||
data: formData,
|
||||
processData: false,//不去处理发送的数据
|
||||
contentType: false,//不去设置Content-Type请求头
|
||||
error: function (res) {
|
||||
layer.msg('上传失败')
|
||||
return;
|
||||
},
|
||||
success: function (res) {
|
||||
console.dir(res)
|
||||
if (res.code) {
|
||||
layer.msg(res.msg, function () {
|
||||
$.form.reload();
|
||||
});
|
||||
} else {
|
||||
layer.msg(res.msg);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
//保存身份证
|
||||
save_cardID: function () {
|
||||
var that = this;
|
||||
var data_post = {
|
||||
o_id: that.info.id,
|
||||
cardidA: that.info.bill.cardidA.value,
|
||||
cardidB: that.info.bill.cardidB.value
|
||||
};
|
||||
$.post("/receiver/orderv2/orders/edit_cardID", data_post, function (data) {
|
||||
if (data.code) {
|
||||
layer.msg(data.msg, {time: 2000, icon: 1}, function () {
|
||||
$.form.reload();
|
||||
});
|
||||
} else {
|
||||
layer.msg(data.msg, {icon: 2});
|
||||
}
|
||||
}, 'json');
|
||||
},
|
||||
save_edit: function (type) {
|
||||
var that = this;
|
||||
var data_post;
|
||||
if (type == 1) {
|
||||
data_post = {type: type, id: that.info.id, note: that.info.note};
|
||||
} else if (type == 2) {
|
||||
data_post = {
|
||||
type: type,
|
||||
id: that.info.id,
|
||||
business_licence: that.info.bill.business_licence.value
|
||||
};
|
||||
}
|
||||
$.post("/receiver/orderv2/orders/edit", data_post, function (data) {
|
||||
if (data.code) {
|
||||
layer.msg(data.msg, {time: 2000, icon: 1}, function () {
|
||||
$.form.reload();
|
||||
});
|
||||
} else {
|
||||
layer.msg(data.msg, {icon: 2});
|
||||
}
|
||||
}, 'json');
|
||||
},
|
||||
cancelItem: function () {
|
||||
var that = this;
|
||||
layer.confirm('你确定取消分配吗?', {icon: 3, title: '提示'}, function (index) {
|
||||
$.post("/receiver/orderv2/orders/edit_ckcar", {id: that.info.id}, function (data) {
|
||||
if (data.code) {
|
||||
layer.msg(data.msg, {time: 2000, icon: 1}, function () {
|
||||
$.form.reload();
|
||||
});
|
||||
} else {
|
||||
layer.msg(data.msg, {icon: 2});
|
||||
}
|
||||
}, 'json');
|
||||
});
|
||||
},
|
||||
save_agent: function () { //保存代办信息
|
||||
var post_data = $('#agent_form').serialize();
|
||||
$.post("/receiver/orderv2/orders/edit_agent", post_data, function (data) {
|
||||
if (data.code) {
|
||||
layer.msg(data.msg, {time: 2000, icon: 1}, function () {
|
||||
$.form.reload();
|
||||
});
|
||||
} else {
|
||||
layer.msg(data.msg, {icon: 2});
|
||||
}
|
||||
}, 'json');
|
||||
},
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function upBill(obj) {
|
||||
var loading = layer.msg('图片识别中..', {
|
||||
icon: 16
|
||||
, shade: 0.3
|
||||
, time: false
|
||||
});
|
||||
var that = this;
|
||||
var params = {
|
||||
'id': <?=$info['id']?>,
|
||||
'value': $(obj).val()
|
||||
}
|
||||
$.post("/receiver/orderv2/orders/edit_bill", params, function (data) {
|
||||
layer.closeAll()
|
||||
if (data.code == 1) {
|
||||
layer.msg(data.msg, {time: 2000, icon: 1}, function () {
|
||||
$.form.reload();
|
||||
});
|
||||
} else if (data.code == 2) {
|
||||
layer.open({
|
||||
type: 0,
|
||||
// title: '标题',
|
||||
content: data.msg,
|
||||
btn: ['重新上传', '二手车发票'],
|
||||
btn1: function (index, layero) {
|
||||
// 按钮1的逻辑
|
||||
layer.closeAll()
|
||||
},
|
||||
btn2: function (index, layero) {
|
||||
// 按钮2的逻辑
|
||||
layer.closeAll()
|
||||
params['if_usedcar'] = 1
|
||||
$.post("/receiver/orderv2/orders/edit_bill", params, function (data) {
|
||||
layer.closeAll()
|
||||
if (data.code) {
|
||||
layer.msg(data.msg, {time: 2000, icon: 1}, function () {
|
||||
$.form.reload();
|
||||
});
|
||||
} else {
|
||||
layer.msg(data.msg, {icon: 2});
|
||||
}
|
||||
}, 'json')
|
||||
},
|
||||
cancel: function () {
|
||||
// 右上角关闭事件的逻辑
|
||||
}
|
||||
});
|
||||
} else {
|
||||
layer.msg(data.msg, {icon: 2});
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function upLoanFile(type, obj) {
|
||||
var that = this;
|
||||
var params = {
|
||||
'id': <?=$info['id']?>,
|
||||
'value': $(obj).val(),
|
||||
'type': type
|
||||
};
|
||||
var url = '/receiver/orderv2/orders/edit_loanfile';
|
||||
var if_loan0 = false; // 首付按揭
|
||||
if (type == 1) {
|
||||
var loan_time = $('#loan_time').val();
|
||||
if (!loan_time) {
|
||||
layer.msg("请填写放款时间");
|
||||
return;
|
||||
}
|
||||
params['loan_time'] = loan_time;
|
||||
} else if (type == 2) {
|
||||
if_loan0 = true;
|
||||
} else if (type == 3) {
|
||||
if_loan0 = true;
|
||||
var loan_time = $('#loan_time0').val();
|
||||
if (!loan_time) {
|
||||
layer.msg("请填写首付放款时间");
|
||||
return;
|
||||
}
|
||||
params['loan_time'] = loan_time;
|
||||
}
|
||||
if (if_loan0) {
|
||||
params['type'] = type - 2;
|
||||
url = '/receiver/orderv2/orders/edit_loanfile0';
|
||||
}
|
||||
$.post(url, params, function (data) {
|
||||
layer.closeAll()
|
||||
if (data.code == 1) {
|
||||
layer.msg(data.msg, {time: 2000, icon: 1}, function () {
|
||||
$.form.reload();
|
||||
});
|
||||
} else {
|
||||
layer.msg(data.msg, {icon: 2});
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function edit_bill_img(obj) {
|
||||
var loading = layer.msg('上传中', {
|
||||
icon: 16
|
||||
, shade: 0.3
|
||||
, time: false
|
||||
});
|
||||
var value = $(obj).val();
|
||||
$.post("/receiver/orderv2/orders/edit_bill_img", {
|
||||
'id': <?=$info['id']?>,
|
||||
'value': value,
|
||||
}, function (data) {
|
||||
layer.closeAll()
|
||||
if (data.code) {
|
||||
layer.msg(data.msg, {time: 2000, icon: 1}, function () {
|
||||
$.form.reload();
|
||||
});
|
||||
} else {
|
||||
layer.msg(data.msg, {icon: 2});
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,34 @@
|
||||
<div class="am-panel am-panel-default" v-if="!info.payway">
|
||||
<div class="am-panel-hd">
|
||||
<span style="font-size: 20px">按揭明细</span>
|
||||
<span style="float:right;margin-top:5px">
|
||||
</span>
|
||||
</div>
|
||||
<div class="am-panel-bd am-g" style="margin-top: 10px;margin-bottom: 10px;">
|
||||
<div class="am-form-group am-u-lg-6">
|
||||
<label class="am-para-label label-width"><span class="span-bold">首付类型:</span></label>
|
||||
<div class="am-para-input" style="margin-left:120px">
|
||||
<label class="am-para-label-con">{{info.downpayment_type_cn}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group am-u-lg-6">
|
||||
<label class="am-para-label label-width"><span class="span-bold">贷款金额:</span></label>
|
||||
<div class="am-para-input">
|
||||
<label class="am-para-label-con">{{info.money_json.loan_amount ?
|
||||
info.money_json.loan_amount:''}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group am-u-lg-6">
|
||||
<label class="am-para-label label-width"><span class="span-bold">贷款期数:</span></label>
|
||||
<div class="am-para-input" style="margin-left:120px">
|
||||
<label class="am-para-label-con">{{info.money_json.loan_periods?info.money_json.loan_periods:''}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group am-u-lg-6">
|
||||
<label class="am-para-label label-width"><span class="span-bold">月供:</span></label>
|
||||
<div class="am-para-input">
|
||||
<label class="am-para-label-con">{{info.money_json.monthly_payment?info.money_json.monthly_payment:''}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,96 @@
|
||||
<div class="am-panel am-panel-default">
|
||||
<div class="am-panel-hd">
|
||||
<span style="font-size: 20px">订单明细</span>
|
||||
<span style="float:right;margin-top:5px">
|
||||
</span>
|
||||
</div>
|
||||
<div class="am-panel-bd am-g" style="margin-top: 10px;margin-bottom: 10px;">
|
||||
<div class="am-form-inline">
|
||||
<div class="am-form-group am-u-lg-6">
|
||||
<label class="am-para-label label-width"><span class="span-bold">品牌车型:</span></label>
|
||||
<div class="am-para-input">
|
||||
<label class="am-para-label-con">{{info.brand_name}}-{{info.s_name}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group am-u-lg-6">
|
||||
<label class="am-para-label label-width"><span class="span-bold">车型:</span></label>
|
||||
<div class="am-para-input">
|
||||
<label class="am-para-label-con">{{info.car_name}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-inline">
|
||||
<div class="am-form-group am-u-lg-6">
|
||||
<label class="am-para-label label-width"><span class="span-bold">定金金额:</span></label>
|
||||
<div class="am-para-input">
|
||||
<label class="am-para-label-con">{{info.money_json.confirm_amount}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group am-u-lg-6">
|
||||
<label class="am-para-label label-width"><span class="span-bold">车身颜色:</span></label>
|
||||
<div class="am-para-input">
|
||||
<label class="am-para-label-con">{{info.color}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-inline">
|
||||
<div class="am-form-group am-u-lg-6">
|
||||
<label class="am-para-label label-width"><span class="span-bold">车身优惠价:</span></label>
|
||||
<div class="am-para-input">
|
||||
<label class="am-para-label-con">{{info.money_json.discount_amount}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group am-u-lg-6">
|
||||
<label class="am-para-label label-width"><span class="span-bold">内饰颜色:</span></label>
|
||||
<div class="am-para-input">
|
||||
<label class="am-para-label-con">{{info.in_color}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-inline">
|
||||
<div class="am-form-group am-u-lg-6">
|
||||
<label class="am-para-label label-width"><span class="span-bold">上牌费:</span></label>
|
||||
<div class="am-para-input" style="margin-left:120px">
|
||||
<label class="am-para-label-con">{{info.money_json.register_amount}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group am-u-lg-6">
|
||||
<label class="am-para-label label-width"><span class="span-bold">付款方式:</span></label>
|
||||
<div class="am-para-input">
|
||||
<label class="am-para-label-con">
|
||||
<span v-if="info.payway">全款</span>
|
||||
<span v-else>按揭</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-inline">
|
||||
<div class="am-form-group am-u-lg-6">
|
||||
<label class="am-para-label label-width"><span class="span-bold">是否店内上牌:</span></label>
|
||||
<div class="am-para-input" style="margin-left:120px">
|
||||
<label class="am-para-label-con">{{info.if_num ? '是':'否'}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group am-u-lg-6">
|
||||
<label class="am-para-label label-width"><span class="span-bold">是否店内投保:</span></label>
|
||||
<div class="am-para-input">
|
||||
<label class="am-para-label-con">{{info.if_insure ? '是':'否'}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-inline">
|
||||
<div class="am-form-group am-u-lg-6">
|
||||
<label class="am-para-label label-width"><span class="span-bold">车管家:</span></label>
|
||||
<div class="am-para-input">
|
||||
<label class="am-para-label-con">{{info.admin_name}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group am-u-lg-6">
|
||||
<label class="am-para-label label-width"><span class="span-bold">期望交付时间:</span></label>
|
||||
<div class="am-para-input">
|
||||
<label class="am-para-label-con">{{info.delry_time}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -86,16 +86,6 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w100">是否开票:</label>
|
||||
<div class="am-para-inline w100">
|
||||
<select name="is_bill" v-model="params.is_bill">
|
||||
<option value="">请选择</option>
|
||||
<option value="0">否</option>
|
||||
<option value="1">是</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group" style="margin-bottom: 0px;"></div>
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w100">车型:</label>
|
||||
@@ -149,7 +139,7 @@
|
||||
</div>
|
||||
<div class="am-para-inline w120">
|
||||
<select name="admin_id" v-model="params.admin_id">
|
||||
<option value="">销售员</option>
|
||||
<option value="">车管家</option>
|
||||
<template v-for="(v,i) in admins.list">
|
||||
<option :value="v.id">{{v.title}}</option>
|
||||
</template>
|
||||
@@ -157,7 +147,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-para-inline w100">
|
||||
<select name="qdjl_id" v-model="params.qdjl_id">
|
||||
<option value=''>请选择</option>
|
||||
|
||||
@@ -60,7 +60,7 @@ class Sign extends Wxapp
|
||||
'qcode' => base64_encode($result['file']),
|
||||
'qrcode_count_time' => $time_out,
|
||||
'item' => $item,
|
||||
'key' => $key
|
||||
// 'key' => $key
|
||||
];
|
||||
return $data;
|
||||
}
|
||||
@@ -70,9 +70,8 @@ class Sign extends Wxapp
|
||||
{
|
||||
$cache_key = $this->input_param('key');
|
||||
$biz_info = $this->app_redis->get($cache_key);
|
||||
$data = ['key' => $cache_key, 'biz_info' => $biz_info];
|
||||
if (!$biz_info || !$biz_info['biz_uid'] || !$biz_info['biz_id']) {
|
||||
return ['type' => 'fail', 'msg' => '二维码过期,请重新扫码签到', 'data' => $data];
|
||||
return ['type' => 'fail', 'msg' => '二维码过期,请重新扫码签到'];
|
||||
}
|
||||
$biz_uid = $biz_info['biz_uid'];
|
||||
$biz_id = $biz_info['biz_id'];
|
||||
|
||||
@@ -89,7 +89,7 @@ class Receiver_customers_model extends HD_Model
|
||||
$this->load->model('receiver/receiver_clues_cfrom_model', 'clues_cfrom_model');
|
||||
$arr = [];
|
||||
if ($id) {
|
||||
$row = $this->clues_cfrom_model->get(['id' => $id], 'itle');
|
||||
$row = $this->clues_cfrom_model->get(['id' => $id], 'title');
|
||||
$lists = [];
|
||||
if ($row) {
|
||||
$rows = $this->clues_cfrom_model->select(['pid' => $id], '', 0, 0, 'id,title');
|
||||
@@ -97,7 +97,7 @@ class Receiver_customers_model extends HD_Model
|
||||
$lists[$item['id']] = $item['title'];
|
||||
}
|
||||
}
|
||||
$arr['name'] = $rows['title'];
|
||||
$arr['name'] = $row['title'];
|
||||
$arr['list'] = $lists;
|
||||
} else {
|
||||
$rows = $this->clues_cfrom_model->select(['status' => 1], 'pid asc', 0, 0, 'id,pid,title');
|
||||
|
||||
@@ -16,9 +16,14 @@ class Receiver_orders_model extends HD_Model
|
||||
* Notes:订单状态
|
||||
* @return array
|
||||
*/
|
||||
public function get_status()
|
||||
public function get_status($status = '')
|
||||
{
|
||||
return $this->status_arr;
|
||||
if (strlen($status)) {
|
||||
$return_status = $this->status_arr[$status];
|
||||
} else {
|
||||
$return_status = $this->status_arr;
|
||||
}
|
||||
return $return_status;
|
||||
}
|
||||
|
||||
public function downpayment_type($type = 0)
|
||||
|
||||
Reference in New Issue
Block a user