hook
This commit is contained in:
parent
163f4785ec
commit
c5db908603
|
|
@ -31,6 +31,7 @@ class Auditorder extends Backend
|
|||
$this->model = new \app\admin\model\Order();
|
||||
//$this->view->assign("statusList", $this->model->getStatusList());
|
||||
$this->view->assign("statusList", $this->model->getAuditStatusList());
|
||||
$this->view->assign("offlineTotalTypeList", $this->model->getOfflineTotalTypeList());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ class Configorder extends Backend
|
|||
parent::_initialize();
|
||||
$this->model = new Order();
|
||||
$this->view->assign("statusList", $this->model->getStatusList());
|
||||
$this->view->assign("offlineTotalTypeList", $this->model->getOfflineTotalTypeList());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -40,8 +40,7 @@ class Dispatch2 extends Backend
|
|||
$this->model = new \app\admin\model\OrderDispatch;
|
||||
$this->view->assign("typeList", $this->model->getTypeList());
|
||||
$this->view->assign("statusList", $this->model->getStatusList());
|
||||
|
||||
|
||||
$this->view->assign("offlineTotalTypeList", $this->model->getOfflineTotalTypeList());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -61,4 +61,8 @@ return [
|
|||
'Dispatch_time' => '派单时间',
|
||||
'Delete_time' => '删除时间',
|
||||
'Coupons' => '优惠',
|
||||
'Offline_amount_type' => '线下尾款类型',
|
||||
'Offline_amount_type 0' => '无',
|
||||
'Offline_amount_type 1' => '师傅收',
|
||||
'Offline_amount_type 2' => '公司收',
|
||||
];
|
||||
|
|
|
|||
|
|
@ -41,6 +41,12 @@ return [
|
|||
'Total' => '总收款',
|
||||
'Online_amount' => '线上预付',
|
||||
'Online_amount_last' => '线上尾款',
|
||||
|
||||
'Offline_amount_type' => '线下尾款类型',
|
||||
'Offline_amount_type 0' => '无',
|
||||
'Offline_amount_type 1' => '师傅收',
|
||||
'Offline_amount_type 2' => '公司收',
|
||||
|
||||
'Offline_amount' => '线下尾款',
|
||||
'Discount_amount' => '优惠抵扣',
|
||||
'Real_amount' => '实际收款',
|
||||
|
|
|
|||
|
|
@ -42,6 +42,11 @@ return [
|
|||
'Online_amount' => '线上预付',
|
||||
'Online_amount_last' => '线上尾款',
|
||||
'Offline_amount' => '线下尾款',
|
||||
|
||||
'Offline_amount_type' => '线下尾款类型',
|
||||
'Offline_amount_type 0' => '无',
|
||||
'Offline_amount_type 1' => '师傅收',
|
||||
'Offline_amount_type 2' => '公司收',
|
||||
'Discount_amount' => '优惠抵扣',
|
||||
'Refund_amount' => '退款金额',
|
||||
'Real_amount' => '实际收款',
|
||||
|
|
|
|||
|
|
@ -30,6 +30,10 @@ return [
|
|||
'Total' => '线下尾款',
|
||||
'Online' => '线上尾款',
|
||||
'Amount' => '预计佣金',
|
||||
'Offline_total_type' => '线下尾款类型',
|
||||
'Offline_total_type 0' => '无',
|
||||
'Offline_total_type 1' => '师傅收',
|
||||
'Offline_total_type 2' => '公司收',
|
||||
'Remark' => '备注',
|
||||
'Notice_num' => '通知次数',
|
||||
'Plan_time' => '预约时间',
|
||||
|
|
|
|||
|
|
@ -30,7 +30,8 @@ class Order extends Model
|
|||
protected $append = [
|
||||
'status_text',
|
||||
'collect_text',
|
||||
'dispatch_type_text'
|
||||
'dispatch_type_text',
|
||||
'offline_amount_type_text'
|
||||
];
|
||||
|
||||
|
||||
|
|
@ -76,6 +77,12 @@ class Order extends Model
|
|||
}
|
||||
|
||||
|
||||
public function getOfflineTotalTypeList()
|
||||
{
|
||||
return ['0' => __('Offline_amount_type 0'), '1'=> __('Offline_amount_type 1'),'2' => __('Offline_amount_type 2')];
|
||||
}
|
||||
|
||||
|
||||
public function getStatusTextAttr($value, $data)
|
||||
{
|
||||
$value = $value ?: ($data['status'] ?? '');
|
||||
|
|
@ -83,6 +90,16 @@ class Order extends Model
|
|||
return $list[$value] ?? '';
|
||||
}
|
||||
|
||||
public function getOfflineAmountTypeTextAttr($value, $data)
|
||||
{
|
||||
$value = $value ?: ($data['offline_amount_type'] ?? '');
|
||||
$list = $this->getOfflineTotalTypeList();
|
||||
return $list[$value] ?? '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function getCollectTextAttr($value, $data)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -60,6 +60,11 @@ class OrderDispatch extends Model
|
|||
return ['0' => __('Is_notice 0'), '1' => __('Is_notice 1')];
|
||||
}
|
||||
|
||||
public function getOfflineTotalTypeList()
|
||||
{
|
||||
return ['0' => __('Offline_total_type 0'), '1'=> __('Offline_total_type 1'),'2' => __('Offline_total_type 2')];
|
||||
}
|
||||
|
||||
|
||||
public function getTypeTextAttr($value, $data)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -92,6 +92,14 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Total')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-total" readonly data-rule="required" class="form-control" step="0.01" name="row[total]" type="number" value="{$row.total|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Online_amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
|
@ -99,6 +107,13 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Online_amount_last')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-online_amount_last" data-rule="required" class="form-control" step="0.01" name="row[online_amount_last]" type="number" value="{$row.online_amount_last|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Offline_amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
|
@ -106,10 +121,11 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Total')}:</label>
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Offline_amount_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-total" readonly data-rule="required" class="form-control" step="0.01" name="row[total]" type="number" value="{$row.total|htmlentities}">
|
||||
{:build_select('offline_amount_type',$offlineTotalTypeList,$row['dispatch']['offline_total_type'],['class'=>'form-control','data-rule'=>'required'])}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -63,6 +63,13 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Offline_amount_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
{:build_select('offline_amount_type',$offlineTotalTypeList,$row['dispatch']['offline_total_type'],['class'=>'form-control','data-rule'=>'required'])}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Refund_amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
|
|
|||
|
|
@ -119,6 +119,13 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Offline_amount_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
{:build_select('offline_total_type',$offlineTotalTypeList,$row['offline_total_type'],['class'=>'form-control','data-rule'=>'required'])}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="c-image" class="control-label col-xs-12 col-sm-2">{:__('收款凭据')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
{field: 'online_amount', title: __('Online_amount'), operate:false},
|
||||
{field: 'online_amount_last', title: __('Online_amount_last'), operate:false},
|
||||
{field: 'offline_amount', title: __('Offline_amount'), operate:false},
|
||||
{field: 'offline_amount_type_text', title: __('Offline_amount_type'), operate:false},
|
||||
{field: 'total', title: __('Total'), operate:'BETWEEN'},
|
||||
{field: 'discount_amount', title: __('Discount_amount'), operate:false},
|
||||
{field: 'real_amount', title: __('Real_amount'), operate:false},
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
{field: 'online_amount_last', title: __('Online_amount_last'), operate:false},
|
||||
{field: 'offline_amount', title: __('Offline_amount'), operate:false},
|
||||
|
||||
{field: 'offline_amount_type_text', title: __('Offline_amount_type'), operate:false},
|
||||
|
||||
{field: 'refund_amount', title: __('Refund_amount'), operate:false},
|
||||
{field: 'real_amount', title: __('Real_amount'), operate:false},
|
||||
{field: 'cost', title: __('Cost'), operate:false},
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user