diff --git a/application/admin/controller/orders/Configorder.php b/application/admin/controller/orders/Configorder.php index e901e14..28da150 100644 --- a/application/admin/controller/orders/Configorder.php +++ b/application/admin/controller/orders/Configorder.php @@ -130,13 +130,16 @@ class Configorder extends Backend 'cost' => $params['cost'], 'offline_amount_type'=> $params['offline_amount_type'], 'amount_images' => $params['amount_images'], + 'material_cost' => $params['material_cost'] ]; $last_amount = bcadd($params['online_amount_last'],$params['offline_amount'],2); + $cost = bcadd($params['cost'],$params['material_cost'],2); + $data['total'] = bcadd($row->online_amount,$last_amount,2); $data['real_amount'] = bcsub($data['total'],$params['refund_amount'],2); - $data['performance'] = bcsub($data['real_amount'],$params['cost'],2); + $data['performance'] = bcsub($data['real_amount'],$cost,2); $result = $row->allowField(true)->save($data); //日志 diff --git a/application/admin/lang/zh-cn/order.php b/application/admin/lang/zh-cn/order.php index acac87c..8b92b5f 100644 --- a/application/admin/lang/zh-cn/order.php +++ b/application/admin/lang/zh-cn/order.php @@ -50,6 +50,7 @@ return [ 'Performance' => '利润', 'Sb_amount' => '垫付', 'Real_amount' => '实付', + 'Material_cost' => '材料成本', 'Cancel_reason_id' => '取消原因', 'Cancel_detail' => '取消详情', 'Abolish_reason_id' => '作废原因', diff --git a/application/admin/lang/zh-cn/orders/dispatch2.php b/application/admin/lang/zh-cn/orders/dispatch2.php index 6e51aa0..99d8bfa 100644 --- a/application/admin/lang/zh-cn/orders/dispatch2.php +++ b/application/admin/lang/zh-cn/orders/dispatch2.php @@ -30,6 +30,7 @@ return [ 'Total' => '线下尾款', 'Online' => '线上尾款', 'Amount' => '预计佣金', + 'Material_cost' => '材料成本', 'Offline_total_type' => '线下尾款类型', 'Offline_total_type 0' => '无', 'Offline_total_type 1' => '师傅收', diff --git a/application/admin/view/orders/auditorder/edit.html b/application/admin/view/orders/auditorder/edit.html index 5bf96d4..0178695 100644 --- a/application/admin/view/orders/auditorder/edit.html +++ b/application/admin/view/orders/auditorder/edit.html @@ -135,6 +135,14 @@ + +