完成订单重构

This commit is contained in:
xman 2025-06-02 12:52:52 +08:00
parent fc7a74455b
commit 4874a8cae8
3 changed files with 13 additions and 11 deletions

View File

@ -94,15 +94,17 @@ class Dispatch2 extends Backend
$row->btn_record = false;
$now = date('Y-m-d H:i:s');
//未上门
if(empty($row->arrive_time) ){
if($row->plan_time < $now){
$row->btn_record = true;
}
}else{
//已上门 完成时间超了
if($row->estimated_finish_time > $now)
{ //预估完成时间过了
if($row->notice_num>0 ){
if($row->status == OrderDispatch::STATUS_PLANIT){ //待上门
if(empty($row->arrive_time))
{
if($row->plan_time < $now)
{
$row->btn_record = true;
}
}else{
//已上门 完成时间超了
if($row->estimated_finish_time > $now)
{ //预估完成时间过了
$row->btn_record = true;
}
}

View File

@ -188,7 +188,7 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('师傅提点(%)')}:</label>
<div class="col-xs-12 col-sm-8">
<input data-rule="required" name="row[cost_rate]" type="number" min="0" max="100" step="1" class="form-control" value="{$worker.rate|htmlentities}">
<input name="row[cost_rate]" readonly type="number" min="0" max="100" step="1" class="form-control" value="{$worker.rate|htmlentities}">
</div>
</div>

View File

@ -176,7 +176,7 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('师傅提点(%)')}:</label>
<div class="col-xs-12 col-sm-8">
<input data-rule="required" name="order[cost_rate]" type="number" min="0" max="100" step="1" class="form-control" value="{$worker.rate|htmlentities}">
<input readonly name="order[cost_rate]" type="number" min="0" max="100" step="1" class="form-control" value="{$worker.rate|htmlentities}">
</div>
</div>