edit-api-create_order

This commit is contained in:
lccsw
2021-11-24 13:37:25 +08:00
parent dbf72cea68
commit b2aebccaed
15 changed files with 147 additions and 39 deletions
+15 -1
View File
@@ -89,7 +89,7 @@ class Progressopt{
'brand_id>' => 0,
"(mobile='{$mobile}' or (ifentrust=1 and json_extract(info_json,'$.entrust_mobile')='{$mobile}'))" => null
];
$rows = $this->ci->orders_model->select($where,'id asc','','','id,name,payway,money_json,status,s_id,v_id,cor_id,incor_id,srv_ids');
$rows = $this->ci->orders_model->select($where,'id asc','','','id,name,payway,money_json,status,s_id,v_id,cor_id,incor_id,srv_ids,jsondata');
$progress_list = [];
if($rows){
foreach($rows as $order){
@@ -105,7 +105,9 @@ class Progressopt{
$opt_row = $this->ci->receiver_order_oplogs_model->select(['order_id'=>$order['id'],'type'=>3],'id desc',1,1);//最后修改日志
$opt_row = json_decode($opt_row[0]['log_json'],true);
$opt_money_json = json_decode($opt_row['money_json'],true);
$opt_jsondata = json_decode($opt_row['jsondata'],true);
$money_json = json_decode($order['money_json'],true);
$jsondata = json_decode($order['jsondata'],true);
$progressOpt = [];
foreach($progress_arr as $item){
$imgs = [];
@@ -129,6 +131,18 @@ class Progressopt{
if($opt_row['srv_ids']!=$order['srv_ids']){
$need_resign_agent = true; //需要签服务补充协议
}
//修改精品
if($jsondata['if_fine']!=$opt_jsondata['if_fine']){
$need_resign_agent = true; //需要签服务补充协议
}
if($jsondata['if_fine'] && $opt_jsondata['if_fine']){
$price_fine = $money_json['price_fine_discount'] ? $money_json['fine_price'] - $money_json['price_fine_discount'] : $money_json['fine_price'];
$opt_price_fine = $opt_money_json['price_fine_discount'] ? $opt_money_json['fine_price'] - $opt_money_json['price_fine_discount'] : $opt_money_json['fine_price'];
if($price_fine!=$opt_price_fine){
$need_resign_agent = true; //需要签服务补充协议
}
}
if($need_resign_car && !$car_count){
$url = '/pages/mine/signContract/maiMaiBu?id='.$order['id'];
}elseif($need_resign_agent && !$agent_count){