提交 9acd1ade authored 作者: 窦斌's avatar 窦斌

edit 增加展示信息

上级 ccf27f0c
...@@ -7,6 +7,7 @@ use App\Http\Controllers\Api\Verify\OrderManage\VerifyOrderController; ...@@ -7,6 +7,7 @@ use App\Http\Controllers\Api\Verify\OrderManage\VerifyOrderController;
use App\Http\Controllers\Common\CommonController; use App\Http\Controllers\Common\CommonController;
use App\Http\Models\Api\Export; use App\Http\Models\Api\Export;
use App\Http\Models\Api\ReceivablePay; use App\Http\Models\Api\ReceivablePay;
use App\Http\Models\Services\PublicSearch;
use App\Models\Business\WashOrder; use App\Models\Business\WashOrder;
use App\Services\ReceivablePay\ReceivablePayService; use App\Services\ReceivablePay\ReceivablePayService;
use Illuminate\Http\Request; use Illuminate\Http\Request;
...@@ -2705,4 +2706,55 @@ class WashOrderController extends Controller ...@@ -2705,4 +2706,55 @@ class WashOrderController extends Controller
return response()->json(['code' => 500, 'msg' =>'操作失败', 'data' =>'']); return response()->json(['code' => 500, 'msg' =>'操作失败', 'data' =>'']);
} }
} }
/**|---------------------------------------------------------------------------------
* @name 变更服务标准
* @param int ord_id 订单id
* @param int service_standard 更改类型
* @retrun \Illuminate\Http\JsonResponse
* @author dou 2026/4/27 15:08
* |---------------------------------------------------------------------------------
*/
public function editServiceStandard ( Request $request ){
// 获取当前操作账号信息
$user_info = Common::getUserInfo($request['api_token']);
if (!isset($request['ord_id']) || !isset($request['service_standard'])) {
return response()->json(['code'=>500, 'msg'=>'参数错误', 'data'=>'']);
}
$order = DB::table('order')
->where('ord_id', $request['ord_id'])
->first(['ord_service_standard','ord_order_number']);
$order = CommonService::dataToArray($order);
if($order){
$services = new PublicSearch();
$serviceStandard = $services->getServiceStandard(true);
$wor_id = DB::table('work_order')
->where("wor_order_id",$request['ord_id'])
->value("wor_id");
DB::beginTransaction();
$rea = DB::table('order')
->where('ord_id', $request['ord_id'])
->update(['ord_update_time'=>date("Y-m-d H:i:s"),'ord_service_standard'=>$request['service_standard']]);
if(empty($wor_id)){
$res = true;
}else{
$res = DB::table('work_order')
->where("wor_order_id",$request['ord_id'])
->update(['wor_update_time'=>date("Y-m-d H:i:s"),'wor_service_standard'=>$request['service_standard']]);
}
$oldStandard = $serviceStandard[$order['ord_service_standard']]??'其它';
$newStandard = $serviceStandard[$request['service_standard']]??'其它';
if($rea && $res) {
DB::commit();
$orlo_res = orderLog($user_info, $request['ord_id'], $wor_id, '变更服务标准:'.$oldStandard.'->'.$newStandard);
OperationLog::addLog($user_info, getRealIp($request), '订单列表', '变更服务标准', '变更['.$order['ord_order_number'].']服务标准:'.$oldStandard.'->'.$newStandard);
return $this->success('操作成功');
}else{
DB::rollBack();
return $this->success(['code' => 500, 'msg' =>'操作失败', 'data' =>'']);
}
}else{
return response()->json(['code' => 500, 'msg' =>'订单信息异常', 'data' =>'']);
}
}
} }
...@@ -569,6 +569,9 @@ class WashOrderService extends Service ...@@ -569,6 +569,9 @@ class WashOrderService extends Service
if ($value_b['pri_id'] == 896 && $value->ord_wor_state>=1) {//工单详情 if ($value_b['pri_id'] == 896 && $value->ord_wor_state>=1) {//工单详情
$list_items[$key]->list_button_two[] = $value_b; $list_items[$key]->list_button_two[] = $value_b;
} }
if ($value_b['pri_id'] == 897 && ($value->ord_wor_state==1 || ($value->ord_wor_state==2 && $new_ord_wor_state<202))) {//服务标准
$list_items[$key]->list_button_two[] = $value_b;
}
if ($value_b['pri_id'] == 886 && $value->ord_wor_state == 12) {//审核取消 if ($value_b['pri_id'] == 886 && $value->ord_wor_state == 12) {//审核取消
$list_items[$key]->list_button_two[] = $value_b; $list_items[$key]->list_button_two[] = $value_b;
} }
...@@ -4348,6 +4351,7 @@ class WashOrderService extends Service ...@@ -4348,6 +4351,7 @@ class WashOrderService extends Service
$status_name = $all_status[$new_ord_wor_state]??''; $status_name = $all_status[$new_ord_wor_state]??'';
$info->ord_wor_state_name = $status_name; $info->ord_wor_state_name = $status_name;
$info->service_standard = $serviceStandard[$info->ord_service_standard]??'其它'; $info->service_standard = $serviceStandard[$info->ord_service_standard]??'其它';
$info->service_standard_name = $serviceStandard[$info->ord_service_standard]??'其它';
$order = new OrderEnum(); $order = new OrderEnum();
// 获取枚举数据 // 获取枚举数据
$object_enum = new OrderEnum(); $object_enum = new OrderEnum();
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace App\Services\Business; namespace App\Services\Business;
use App\Http\Controllers\Common\CommonController; use App\Http\Controllers\Common\CommonController;
use App\Http\Models\Services\PublicSearch;
use App\Models\OperationLog; use App\Models\OperationLog;
use App\Services\CommonService; use App\Services\CommonService;
use Illuminate\Support\Facades\Request; use Illuminate\Support\Facades\Request;
...@@ -2988,11 +2989,14 @@ class WashWorkService extends Service ...@@ -2988,11 +2989,14 @@ class WashWorkService extends Service
->leftJoin('shop as s', 's.shop_id', '=', 'wo.wor_shop_id') ->leftJoin('shop as s', 's.shop_id', '=', 'wo.wor_shop_id')
->where('wor_id', $request['wor_id']) ->where('wor_id', $request['wor_id'])
->where('wor_shop_id', $user_info->adm_shop_id) ->where('wor_shop_id', $user_info->adm_shop_id)
->select('wor_id', 'wor_number', 'wor_create_id', 'wor_goo_amount', 'wor_actual_price', 'wor_account_state', 'wor_type', 'wor_state', 'wor_delete', 'wocl_channel_unit', 'wocl_name', 'wocl_phone', 'wocl_car_num', 'wocl_province', 'wocl_city', 'wocl_county', 'wocl_address', 'wocl_client_id', 'wor_appoint_time', 'wocl_appoint_remark', 'wocl_car_vehicle_type', 'wocl_pick_up_car_time', 'wocl_check_car_state', 'wocl_service_quality', 'wocl_car_vin', 'shop_store_name', 'wor_service_state', 'wor_province', 'wor_city', 'wor_county', 'wor_address', 'orcl_sales_adm_id', 'wocl_car_brand_series', 'wocl_carowner_name', 'wocl_carowner_phone', 'wor_create_time', 'wor_new_goo_amount', 'wor_explain as wor_remark', 'wocl_bus_name', 'wor_address_type', 'wor_address_id', 'wor_shop_id', 'wor_service_adm_id', 'wocl_carbrse_type', 'wor_order_id', 'wor_work_type', 'wor_other_audit', 'ord_type', 'ord_address', 'orcl_cus_msg', 'ord_id', 'orcl_cus_msg','orcl_mileage', 'orcl_check_goods', 'orcl_check_goods', 'wor_order_number', 'wor_list_pic', 'ord_new_type','ord_state', 'orcl_4sname', 'orcl_business_name', 'orcl_buac_name', 'orcl_buac_phone', 'orcl_name', 'orcl_phone', 'orcl_address', 'orcl_province', 'orcl_city', 'orcl_county', 'orcl_car_num', 'orcl_car_vin', 'ord_other_system_number') ->select('wor_id', 'wor_number', 'wor_create_id', 'wor_goo_amount', 'wor_actual_price', 'wor_account_state', 'wor_type', 'wor_state', 'wor_delete', 'wocl_channel_unit', 'wocl_name', 'wocl_phone', 'wocl_car_num', 'wocl_province', 'wocl_city', 'wocl_county', 'wocl_address', 'wocl_client_id', 'wor_appoint_time', 'wocl_appoint_remark', 'wocl_car_vehicle_type', 'wocl_pick_up_car_time', 'wocl_check_car_state', 'wocl_service_quality', 'wocl_car_vin', 'shop_store_name', 'wor_service_state', 'wor_province', 'wor_city', 'wor_county', 'wor_address', 'orcl_sales_adm_id', 'wocl_car_brand_series', 'wocl_carowner_name', 'wocl_carowner_phone', 'wor_create_time', 'wor_new_goo_amount', 'wor_explain as wor_remark', 'wocl_bus_name', 'wor_address_type', 'wor_address_id', 'wor_shop_id', 'wor_service_adm_id', 'wocl_carbrse_type', 'wor_order_id', 'wor_work_type', 'wor_other_audit', 'ord_type', 'ord_address', 'orcl_cus_msg', 'ord_id', 'orcl_cus_msg','orcl_mileage', 'orcl_check_goods', 'orcl_check_goods', 'wor_order_number', 'wor_list_pic', 'ord_new_type','ord_state', 'orcl_4sname', 'orcl_business_name', 'orcl_buac_name', 'orcl_buac_phone', 'orcl_name', 'orcl_phone', 'orcl_address', 'orcl_province', 'orcl_city', 'orcl_county', 'orcl_car_num', 'orcl_car_vin', 'ord_other_system_number', 'ord_service_standard')
->first(); ->first();
if (empty($info)) { if (empty($info)) {
return ['code'=>ErrorInc::DATA_EMPTY, 'msg'=>'当前工单不存在', 'data'=>'']; return ['code'=>ErrorInc::DATA_EMPTY, 'msg'=>'当前工单不存在', 'data'=>''];
} }
$services = new PublicSearch();
$serviceStandard = $services->getServiceStandard(true);
$info->service_standard_name = $serviceStandard[$info->ord_service_standard]??'其它';
$ord_Explainpic = []; $ord_Explainpic = [];
$Explainpic = WashOrderService::getExplainpic($user_info, $info->ord_id); $Explainpic = WashOrderService::getExplainpic($user_info, $info->ord_id);
if (!empty($Explainpic['data'])) { if (!empty($Explainpic['data'])) {
...@@ -3503,12 +3507,14 @@ class WashWorkService extends Service ...@@ -3503,12 +3507,14 @@ class WashWorkService extends Service
->leftJoin('order_client as orcl', 'ord.ord_orcl_id', '=', 'orcl.orcl_id') ->leftJoin('order_client as orcl', 'ord.ord_orcl_id', '=', 'orcl.orcl_id')
->leftJoin('shop as c', 'ord.ord_shop_id', '=', 'c.shop_id') ->leftJoin('shop as c', 'ord.ord_shop_id', '=', 'c.shop_id')
->where('ord_id', $request['ord_id']) ->where('ord_id', $request['ord_id'])
->select('ord_id', 'ord_create_id', 'ord_order_number', 'ord_goods_quantity', 'ord_state', 'ord_wor_state', 'ord_wor_quantity', 'ord_type', 'orcl_channel_unit', 'orcl_name', 'orcl_phone', 'orcl_car_num', 'orcl_province', 'orcl_city', 'orcl_county', 'orcl_address', 'ord_create_time', 'ord_delete', 'orcl_client_id', 'orcl_appoint_time', 'orcl_appoint_remark', 'orcl_car_vehicle_type', 'orcl_pick_up_car_time', 'orcl_pick_up_car_adm_id', 'orcl_check_car_state', 'orcl_car_vin', 'orcl_car_brand_series', 'orcl_signature_img', 'shop_store_name', 'ord_province', 'ord_city', 'ord_county', 'ord_address', 'orcl_sales_adm_id', 'orcl_carowner_name', 'orcl_carowner_phone', 'ord_explain as ord_remark', 'orcl_business_name', 'ord_address_type', 'ord_address_id', 'orcl_carbrse_type','ord_shop_id', 'ord_order_price', 'orcl_cus_msg', 'ord_new_type', 'ord_source', 'ord_add_type', 'orcl_buac_name', 'orcl_buac_phone', 'orcl_4sname', 'ord_other_system_number') ->select('ord_id', 'ord_create_id', 'ord_order_number', 'ord_goods_quantity', 'ord_state', 'ord_wor_state', 'ord_wor_quantity', 'ord_type', 'orcl_channel_unit', 'orcl_name', 'orcl_phone', 'orcl_car_num', 'orcl_province', 'orcl_city', 'orcl_county', 'orcl_address', 'ord_create_time', 'ord_delete', 'orcl_client_id', 'orcl_appoint_time', 'orcl_appoint_remark', 'orcl_car_vehicle_type', 'orcl_pick_up_car_time', 'orcl_pick_up_car_adm_id', 'orcl_check_car_state', 'orcl_car_vin', 'orcl_car_brand_series', 'orcl_signature_img', 'shop_store_name', 'ord_province', 'ord_city', 'ord_county', 'ord_address', 'orcl_sales_adm_id', 'orcl_carowner_name', 'orcl_carowner_phone', 'ord_explain as ord_remark', 'orcl_business_name', 'ord_address_type', 'ord_address_id', 'orcl_carbrse_type','ord_shop_id', 'ord_order_price', 'orcl_cus_msg', 'ord_new_type', 'ord_source', 'ord_add_type', 'orcl_buac_name', 'orcl_buac_phone', 'orcl_4sname', 'ord_other_system_number','ord_service_standard')
->first(); ->first();
if (empty($info)) { if (empty($info)) {
return ['code'=>ErrorInc::DATA_EMPTY, 'msg'=>'当前订单不存在', 'data'=>'']; return ['code'=>ErrorInc::DATA_EMPTY, 'msg'=>'当前订单不存在', 'data'=>''];
} }
$services = new PublicSearch();
$serviceStandard = $services->getServiceStandard(true);
$info->service_standard_name = $serviceStandard[$info->ord_service_standard]??'其它';
$info->orderLog = DB::table('order_log') $info->orderLog = DB::table('order_log')
->where("orlo_ord_id",$info->ord_id) ->where("orlo_ord_id",$info->ord_id)
->select('orlo_create_adm_name','orlo_content','orlo_time')->orderBy('orlo_id','desc')->get()->toArray(); ->select('orlo_create_adm_name','orlo_content','orlo_time')->orderBy('orlo_id','desc')->get()->toArray();
......
...@@ -1917,6 +1917,7 @@ Route::namespace('Mounting')->group(function () { ...@@ -1917,6 +1917,7 @@ Route::namespace('Mounting')->group(function () {
Route::post('v1/WashOrder/auditCancel', 'Business\WashOrderController@auditCancel'); //取消订单审核 Route::post('v1/WashOrder/auditCancel', 'Business\WashOrderController@auditCancel'); //取消订单审核
Route::post('v1/WashOrder/leadOpenBill', 'Business\WashOrderController@leadOpenBill'); //批量开票 Route::post('v1/WashOrder/leadOpenBill', 'Business\WashOrderController@leadOpenBill'); //批量开票
Route::post('v1/WashOrder/batchEditAdmin', 'Business\WashOrderController@batchEditAdmin'); //批量修改技师 Route::post('v1/WashOrder/batchEditAdmin', 'Business\WashOrderController@batchEditAdmin'); //批量修改技师
Route::post('v1/WashOrder/editServiceStandard', 'Business\WashOrderController@editServiceStandard'); //变更服务标准
// 业务系统-工单列表 // 业务系统-工单列表
Route::post('v1/WashWork/index', 'Business\WashWorkController@index'); //工单列表-列表 Route::post('v1/WashWork/index', 'Business\WashWorkController@index'); //工单列表-列表
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论