edit-api-order_list

This commit is contained in:
lccsw
2022-04-08 13:35:53 +08:00
parent d0dc2e69ba
commit be440fc735
3 changed files with 26 additions and 8 deletions
+1
View File
@@ -154,6 +154,7 @@ class Pay extends Wxapp{
'cor_id' => $row['cor_id'],
'incor_id' => $row['incor_id'],
'total_price' => $total,
'company_id' => $row['company_id'],
'entrust_uid' => $row['entrust_uid'],
'type' => 3,
'c_time' => time()
+3 -2
View File
@@ -311,7 +311,7 @@ class Cusorder extends Wxapp{
}else{
strlen($status) && $where['status'] = $status;
}
$fileds = 'id,name,mobile,brand_id,s_id,v_id,cor_id,incor_id,deposit,payway,status,c_time,money_json,srv_ids';
$fileds = 'id,name,mobile,brand_id,s_id,v_id,cor_id,incor_id,deposit,payway,status,c_time,money_json,srv_ids,rid';
$count = $this->orders_model->count($where);
$lists = [];
if($count){
@@ -356,8 +356,9 @@ class Cusorder extends Wxapp{
}
$lists[] = [
'id' => $val['id'],
'cus_id' => $val['rid'],
'name' => $val['name'],
'mobile' => mobile_asterisk($val['mobile']),
'mobile' => $val['mobile'],
'status_name' => $status_arr[$val['status']],
'other_data' => $other_data,
'remark' => $this->orders_entity->get_remark($val['status'])
+22 -6
View File
@@ -204,6 +204,11 @@ class CusorderV2 extends Wxapp{
}
}
$data['car_json'] = $data['money_json'] = json_encode($money_json,JSON_UNESCAPED_UNICODE);
if(in_array($row['biz_id'],[63,70]) && $biz['type']==1){ //判断金额
}
$o_id = $this->orders_model->add($data);
if($o_id){
//意向金订单
@@ -406,8 +411,10 @@ class CusorderV2 extends Wxapp{
}
}
$data['money_json'] = json_encode($money_json,JSON_UNESCAPED_UNICODE);
$info_json['business_id'] = $business_id;
$data['info_json'] = json_encode($info_json,JSON_UNESCAPED_UNICODE);
if($v_id!=$row['v_id']){ //修改不同车型才修改商务政策id
$info_json['business_id'] = $business_id;
$data['info_json'] = json_encode($info_json,JSON_UNESCAPED_UNICODE);
}
$result = $this->orders_model->update($data,['id'=>$row['id']]);
if($result){
$this->orders_v2_entity->edit_order($data,$row);
@@ -486,7 +493,7 @@ class CusorderV2 extends Wxapp{
$data = [
'id' => $id,
'name' => $row['name'],
'mobile' => mobile_asterisk($row['mobile']),
'mobile' => $row['mobile'],
'payway' => $row['brand_id'] ? $row['payway'] : '',
'car_data' => $car_data,
'pay_status' => $pay_status,
@@ -586,7 +593,7 @@ class CusorderV2 extends Wxapp{
}else{
strlen($status) && $where['status'] = $status;
}
$fileds = 'id,name,mobile,brand_id,s_id,v_id,cor_id,incor_id,payway,status,c_time,money_json,if_num';
$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';
$count = $this->orders_model->count($where);
$lists = [];
if($count){
@@ -619,6 +626,7 @@ class CusorderV2 extends Wxapp{
$status_arr = $this->orders_model->get_status();
$old_status_arr = $this->receiver_orders_model->get_status();
foreach($rows as $key=>$val){
$info_json = json_decode($val['info_json'],true);
if($val['id']>=Orders_v2_entity::V2_START_ID){
$money_json = json_decode($val['money_json'],true);
if($val['brand_id']){ //已选择车型
@@ -682,8 +690,12 @@ class CusorderV2 extends Wxapp{
}
$lists[] = [
'id' => $val['id'],
'cus_id' => $val['customer_id'],
'name' => $val['name'],
'mobile' => mobile_asterisk($val['mobile']),
'mobile' => $val['mobile'],
'owner_name' => $val['main_type'] ? '' : $val['owner_name'],
'owner_mobile' => $val['main_type'] ? '' : $val['owner_mobile'],
'company' => $val['main_type'] ? $info_json['c_company'] : '',
'status_name' => $status_arr[$val['status']],
'other_data' => $other_data,
];
@@ -714,8 +726,12 @@ class CusorderV2 extends Wxapp{
}
$lists[] = [
'id' => $val['id'],
'cus_id' => $val['customer_id'],
'name' => $val['name'],
'mobile' => mobile_asterisk($val['mobile']),
'mobile' => $val['mobile'],
'owner_name' => '',
'owner_mobile' => '',
'company' => '',
'status_name' => $old_status_arr[$status],
'other_data' => $other_data,
'remark' => $this->orders_entity->get_remark($status)