新增材料成本

This commit is contained in:
xman 2025-04-22 14:36:08 +08:00
parent c004a039b4
commit 5ce43cf42d
7 changed files with 33 additions and 1 deletions

View File

@ -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);
//日志

View File

@ -50,6 +50,7 @@ return [
'Performance' => '利润',
'Sb_amount' => '垫付',
'Real_amount' => '实付',
'Material_cost' => '材料成本',
'Cancel_reason_id' => '取消原因',
'Cancel_detail' => '取消详情',
'Abolish_reason_id' => '作废原因',

View File

@ -30,6 +30,7 @@ return [
'Total' => '线下尾款',
'Online' => '线上尾款',
'Amount' => '预计佣金',
'Material_cost' => '材料成本',
'Offline_total_type' => '线下尾款类型',
'Offline_total_type 0' => '无',
'Offline_total_type 1' => '师傅收',

View File

@ -135,6 +135,14 @@
<input id="c-cost" readonly class="form-control" step="0.01" name="row[cost]" type="number" value="{$row.cost|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('材料成本')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-material_cost" readonly class="form-control" step="0.01" name="row[material_cost]" type="number" value="{$row.material_cost|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Performance')}:</label>
<div class="col-xs-12 col-sm-8">

View File

@ -97,6 +97,15 @@
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Material_cost')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-material_cost" data-rule="required" class="form-control" step="0.01" name="row[material_cost]" type="number" value="{$row.dispatch.material_cost|htmlentities}">
</div>
</div>
{/if}
@ -149,6 +158,14 @@
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('材料成本')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-material_cost" data-rule="required" class="form-control" step="0.01" name="row[material_cost]" type="number" value="{$row.material_cost|htmlentities}">
</div>
</div>
{/if}

View File

@ -82,6 +82,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'real_amount', title: __('Real_amount'), operate:false},
{field: 'refund_amount', title: __('Refund_amount'), operate:false},
{field: 'cost', title: __('Cost'), operate:false},
{field: 'material_cost', title: __('材料成本'), operate:false},
{field: 'performance', title: __('Performance'), operate:false},
// {field: 'cancel_reason_id', title: __('Cancel_reason_id')},
//{field: 'cancel_detail', title: __('Cancel_detail'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},

View File

@ -59,6 +59,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'refund_amount', title: __('Refund_amount'), operate:false},
{field: 'real_amount', title: __('Real_amount'), operate:false},
{field: 'cost', title: __('Cost'), operate:false},
{field: 'material_cost', title: __('材料成本'), operate:false},
{field: 'performance', title: __('Performance'), operate:false},
// {field: 'dispatch_type', title: __('Dispatch_type')},