admin_orders_924_3
This commit is contained in:
@@ -89,7 +89,7 @@ class Orders extends HD_Controller
|
||||
|
||||
public function get()
|
||||
{
|
||||
$status_arr = $this->order_signs_model->get_status();
|
||||
$status_arr = $this->orders_model->statusAry(0);
|
||||
$id = $this->input->get('id');
|
||||
|
||||
$row = $this->orders_model->get(['id' => $id]);
|
||||
@@ -104,7 +104,7 @@ class Orders extends HD_Controller
|
||||
$row['price'] = number_format($row['price'], 2);
|
||||
$row['deposit'] = number_format($row['deposit'], 2);
|
||||
$row['c_time'] = date('Y-m-d', $row['c_time']);
|
||||
$row['sign_status_name'] = $status_arr[$sign['status']];
|
||||
$row['sign_status_name'] = $status_arr['list'][$sign['status']];
|
||||
$row['cf_title'] = $customers['cf_title'];
|
||||
$row['payway'] = intval($row['payway']);
|
||||
$row['item_id'] = intval($row['item_id']);
|
||||
@@ -126,6 +126,8 @@ class Orders extends HD_Controller
|
||||
$row_goods = $this->mdItems->get(array('id' => $row['item_id']));
|
||||
$row['vin'] = $row_goods['vin'];
|
||||
}
|
||||
$row['delry_time'] = $row['delry_time'] != '0000-00-00 00:00:00'
|
||||
? str_replace(" 00:00:00", "", $row['delry_time']) : '';
|
||||
//获取贷款信息
|
||||
if (!$row['payway'] && $row['status'] > 0) {
|
||||
$auto_finance_row = $this->auto_finance_model->get(['id' => $row['finance_id']], 'fin_id,num');
|
||||
@@ -143,8 +145,8 @@ class Orders extends HD_Controller
|
||||
//获取开票
|
||||
$bill = $this->order_bills_model->get(['o_id' => $row['id']], 'status,file,cardidA,cardidB');
|
||||
$bill['file'] = $bill['file'] ? build_qiniu_image_url($bill['file']) : '';
|
||||
$bill['cardidA'] = $bill['cardidA'] ? array('value' => $bill['cardidA'], 'src' => build_qiniu_image_url($bill['cardidA'])) : array('value' => '', 'src' =>'');
|
||||
$bill['cardidB'] = $bill['cardidB'] ? array('value' => $bill['cardidB'], 'src' => build_qiniu_image_url($bill['cardidB']) ) : array('value' => '', 'src' => '');
|
||||
$bill['cardidA'] = $bill['cardidA'] ? array('value' => $bill['cardidA'], 'src' => build_qiniu_image_url($bill['cardidA'])) : array('value' => '', 'src' => '');
|
||||
$bill['cardidB'] = $bill['cardidB'] ? array('value' => $bill['cardidB'], 'src' => build_qiniu_image_url($bill['cardidB'])) : array('value' => '', 'src' => '');
|
||||
$bill['status'] = intval($bill['status']);
|
||||
$row['bill'] = $bill;
|
||||
//获取合同文件
|
||||
@@ -229,25 +231,26 @@ class Orders extends HD_Controller
|
||||
* 更新身份证信息
|
||||
* @return bool
|
||||
*/
|
||||
function edit_cardID(){
|
||||
function edit_cardID()
|
||||
{
|
||||
$o_id = $this->input->post('o_id');
|
||||
$cardidA = $this->input->post('cardidA');
|
||||
$cardidB = $this->input->post('cardidB');
|
||||
if(!$cardidA || !$cardidB){
|
||||
return $this->show_json(SYS_CODE_FAIL,'请上传身份证照片');
|
||||
if (!$cardidA || !$cardidB) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '请上传身份证照片');
|
||||
}
|
||||
|
||||
$this->load->library('TcOrc');
|
||||
$cardidA_src = build_qiniu_image_url($cardidA);
|
||||
$result = $this->tcorc->IdentityCard($cardidA_src);
|
||||
if(!$result['code']){
|
||||
return $this->show_json(SYS_CODE_FAIL,'身份证校验不通过');
|
||||
if (!$result['code']) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '身份证校验不通过');
|
||||
} else {
|
||||
//校验姓名
|
||||
$uname = $result['data']['Name'];
|
||||
$row_order = $this->orders_model->get(['id'=>$o_id]);
|
||||
if($uname != $row_order['name']){
|
||||
return $this->show_json(SYS_CODE_FAIL,'身份证姓名与客户不一致');
|
||||
$row_order = $this->orders_model->get(['id' => $o_id]);
|
||||
if ($uname != $row_order['name']) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '身份证姓名与客户不一致');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -255,11 +258,11 @@ class Orders extends HD_Controller
|
||||
'cardidA' => $cardidA,
|
||||
'cardidB' => $cardidB
|
||||
);
|
||||
$result = $this->order_bills_model->update($upd,['o_id'=>$o_id]);
|
||||
if($result){
|
||||
return $this->show_json(SYS_CODE_SUCCESS,'保存成功');
|
||||
}else{
|
||||
return $this->show_json(SYS_CODE_FAIL,'保存失败');
|
||||
$result = $this->order_bills_model->update($upd, ['o_id' => $o_id]);
|
||||
if ($result) {
|
||||
return $this->show_json(SYS_CODE_SUCCESS, '保存成功');
|
||||
} else {
|
||||
return $this->show_json(SYS_CODE_FAIL, '保存失败');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -359,7 +362,7 @@ class Orders extends HD_Controller
|
||||
$ckcar && $replace['id'] = $ckcar['id'];
|
||||
$this->order_ckcars_model->replace($replace);
|
||||
}
|
||||
$this->data['params']= $params;
|
||||
$this->data['params'] = $params;
|
||||
return $result ? $this->show_json(SYS_CODE_SUCCESS, '保存成功') : $this->show_json(SYS_CODE_FAIL, '保存失败');
|
||||
}
|
||||
|
||||
@@ -424,8 +427,10 @@ class Orders extends HD_Controller
|
||||
$this->data['bill'] = $bill;
|
||||
return $this->show_view('receiver/orders/get_bill');
|
||||
}
|
||||
|
||||
//编辑发票信息
|
||||
public function edit_bill(){
|
||||
public function edit_bill()
|
||||
{
|
||||
$id = $this->input->post('id');
|
||||
$money = $this->input->post('money');
|
||||
$file = $this->input->post('file');
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
<tr>
|
||||
<th width="10%"><span>客户姓名</span></th>
|
||||
<th width="10%"><span>客户电话</span></th>
|
||||
<th width="25%"><span>车辆</span></th>
|
||||
<th width="27%"><span>车辆</span></th>
|
||||
<th width="10%"><span>车辆平台价</span></th>
|
||||
<th width="10%"><span>定金</span></th>
|
||||
<th width="10%"><span>付款方式</span></th>
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
<tr>
|
||||
<th width="10%"><span>客户姓名</span></th>
|
||||
<th width="10%"><span>客户电话</span></th>
|
||||
<th width="25%"><span>车辆</span></th>
|
||||
<th width="27%"><span>车辆</span></th>
|
||||
<th width="10%"><span>车辆平台价</span></th>
|
||||
<th width="10%"><span>定金</span></th>
|
||||
<th width="10%"><span>付款方式</span></th>
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
<tr>
|
||||
<th width="10%"><span>客户姓名</span></th>
|
||||
<th width="10%"><span>客户电话</span></th>
|
||||
<th width="25%"><span>车辆</span></th>
|
||||
<th width="27%"><span>车辆</span></th>
|
||||
<th width="10%"><span>车辆平台价</span></th>
|
||||
<th width="10%"><span>定金</span></th>
|
||||
<th width="10%"><span>付款方式</span></th>
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
<tr>
|
||||
<th width="10%"><span>客户姓名</span></th>
|
||||
<th width="10%"><span>客户电话</span></th>
|
||||
<th width="25%"><span>车辆</span></th>
|
||||
<th width="27%"><span>车辆</span></th>
|
||||
<th width="10%"><span>车辆平台价</span></th>
|
||||
<th width="10%"><span>定金</span></th>
|
||||
<th width="10%"><span>付款方式</span></th>
|
||||
|
||||
@@ -188,14 +188,14 @@
|
||||
<table class="am-table am-table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="10%"><span>客户姓名</span></th>
|
||||
<th width="9%"><span>客户姓名</span></th>
|
||||
<th width="9%"><span>客户电话</span></th>
|
||||
<th width="18%"><span>车辆</span></th>
|
||||
<th width="22%"><span>车辆</span></th>
|
||||
<th width="8%"><span>合同价</span></th>
|
||||
<th width="8%"><span>定金</span></th>
|
||||
<th width="5%"><span>付款</span></th>
|
||||
<th width="9%"><span>合同状态</span></th>
|
||||
<th width="15%"><span>销售员</span></th>
|
||||
<th width="8%"><span>合同状态</span></th>
|
||||
<th width="13%"><span>销售员</span></th>
|
||||
<th width="12%"><span>订单时间</span></th>
|
||||
<th width=""><span>操作</span></th>
|
||||
</tr>
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
<tr>
|
||||
<th width="10%"><span>客户姓名</span></th>
|
||||
<th width="10%"><span>客户电话</span></th>
|
||||
<th width="25%"><span>车辆</span></th>
|
||||
<th width="30%"><span>车辆</span></th>
|
||||
<th width="10%"><span>车辆平台价</span></th>
|
||||
<th width="10%"><span>定金</span></th>
|
||||
<th width="10%"><span>付款方式</span></th>
|
||||
|
||||
@@ -78,8 +78,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group am-u-lg-6">
|
||||
<label class="am-para-label label-width"> </label>
|
||||
<div class="am-para-input"> </div>
|
||||
<label class="am-para-label label-width"><span class="span-bold">期望交付时间:</span></label>
|
||||
<div class="am-para-input">
|
||||
<label class="am-para-label align-l w200">{{info.delry_time}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user