edit-admin-edit_order
This commit is contained in:
@@ -588,7 +588,7 @@ class Clues extends HD_Controller
|
||||
foreach ($ids_arr as $val) {
|
||||
$clues_row = $clues_rows[$val][0];
|
||||
//判断是否已分配
|
||||
$cus_row = $this->customers_model->get(['rid' => $val, 'status != 3' => null]);
|
||||
$cus_row = $this->customers_model->get(['rid' => $val]);
|
||||
if ($clues_row && !$cus_row) {
|
||||
$jsondata = json_decode($clues_row['jsondata'], true);
|
||||
$add_data = [
|
||||
|
||||
@@ -403,6 +403,14 @@ class Orders extends HD_Controller
|
||||
}
|
||||
$update = [];
|
||||
if ($file) { //上传按揭通知函
|
||||
if($params['type']){
|
||||
$loan_time = $params['loan_time'];
|
||||
if (!$loan_time) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '请选择放款时间!');
|
||||
}
|
||||
$update['loan_time'] = date('Y-m-d H:i:s', strtotime($loan_time));
|
||||
$update['status'] = 3;
|
||||
}
|
||||
$path = FCPATH . 'temp/';
|
||||
if (!file_exists($path)) {
|
||||
$oldumask = umask(0);
|
||||
@@ -471,7 +479,7 @@ class Orders extends HD_Controller
|
||||
];
|
||||
$ckcar && $replace['id'] = $ckcar['id'];
|
||||
$this->order_ckcars_model->replace($replace);
|
||||
} elseif ($params['status'] == 3) { //设置完成按揭
|
||||
} elseif ($params['status'] == 3 || ($file && $params['type'])) { //设置完成按揭
|
||||
$order_row = $this->orders_model->get(['id' => $row['o_id']], 'status');
|
||||
if ($order_row['status'] == 4) { //完成代办
|
||||
$this->orders_model->update(['status' => 5], ['id' => $oid]);
|
||||
|
||||
@@ -474,9 +474,12 @@
|
||||
}
|
||||
$.post("/receiver/orders/edit_loan", {'info': this.info, 'status': status}, function (data) {
|
||||
console.dir(data);
|
||||
layer.msg(data.msg);
|
||||
if (data.code) {
|
||||
$.form.reload();
|
||||
layer.msg(data.msg,function(){
|
||||
$.form.reload();
|
||||
});
|
||||
}else{
|
||||
layer.msg(data.msg);
|
||||
}
|
||||
}, 'json');
|
||||
},
|
||||
@@ -486,6 +489,14 @@
|
||||
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/orders/edit_loan',
|
||||
dataType: "json",
|
||||
@@ -499,13 +510,12 @@
|
||||
},
|
||||
success: function (res) {
|
||||
console.dir(res)
|
||||
layer.msg(res.msg);
|
||||
if (res.code) {
|
||||
if (type) {
|
||||
that.info.loan_info.lend_file = res.data.file_url;
|
||||
} else {
|
||||
that.info.loan_info.notify_file = res.data.file_url;
|
||||
}
|
||||
layer.msg(res.msg,function(){
|
||||
$.form.reload();
|
||||
});
|
||||
}else{
|
||||
layer.msg(res.msg);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user