作者 王智

222

... ... @@ -25,6 +25,7 @@ class Order extends Backend
$this->model = new \app\admin\model\Order;
$this->view->assign("orderStatusList", $this->model->getOrderStatusList());
$this->view->assign("invoiceStatusList", $this->model->getInvoiceStatusList());
$this->view->assign("ispay", $this->model->getIspay());
}
/**
... ...
<?php
return [
'Id' => 'ID',
'Total' => '总价',
'Order_sn' => '订单编号',
'User_id' => '用户ID',
'Shopping' => '快递公司',
'Shop_order' => '快递单号',
'Order_status' => '订单状态',
'Order_status 0' => '待审核',
'Order_status 1' => '待收货',
'Order_status 2' => '已完成',
'Order_status 3' => '已取消 ',
'Createtime' => '创建时间',
'Updatetime' => '更改时间',
'Address' => '地址',
'Address_con' => '详细地址',
'Mobile' => '手机号',
'Name' => '收货人',
'Invoice_status' => '发票状态',
'Id' => 'ID',
'Total' => '总价',
'Order_sn' => '订单编号',
'User_id' => '用户ID',
'Shopping' => '快递公司',
'Shop_order' => '快递单号',
'Order_status' => '订单状态',
'Order_status 0' => '待审核',
'Order_status 1' => '待收货',
'Order_status 2' => '已完成',
'Order_status 3' => '已取消 ',
'Createtime' => '创建时间',
'Updatetime' => '更改时间',
'Address' => '地址',
'Address_con' => '详细地址',
'Mobile' => '手机号',
'Name' => '收货人',
'Invoice_status' => '发票状态',
'Invoice_status 0' => '没有开票资格',
'Invoice_status 1' => '待开票',
'Invoice_status 2' => '开票中',
'Invoice_status 3' => '已开票',
'User.username' => '下单用户'
'Ispay 0' => '未支付',
'Ispay 1' => '已支付',
'User.username' => '下单用户'
];
... ...
... ... @@ -41,6 +41,10 @@ class Order extends Model
return ['0' => __('Invoice_status 0'), '1' => __('Invoice_status 1'), '2' => __('Invoice_status 2'), '3' => __('Invoice_status 3')];
}
public function getIspay()
{
return ['0' => __('Ispay 0'), '1' => __('Ispay 1')];
}
public function getOrderStatusTextAttr($value, $data)
{
... ...
... ... @@ -33,10 +33,10 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Order_status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="orderStatusList" item="vo"}
<label for="row[order_status]-{$key}"><input id="row[order_status]-{$key}" name="row[order_status]" type="radio" value="{$key}" {in name="key" value="0"}checked{/in} /> {$vo}</label>
<label for="row[order_status]-{$key}"><input id="row[order_status]-{$key}" name="row[order_status]" type="radio" value="{$key}" {in name="key" value="0"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
... ... @@ -69,15 +69,29 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Invoice_status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="invoiceStatusList" item="vo"}
<label for="row[invoice_status]-{$key}"><input id="row[invoice_status]-{$key}" name="row[invoice_status]" type="radio" value="{$key}" {in name="key" value="0"}checked{/in} /> {$vo}</label>
<label for="row[invoice_status]-{$key}"><input id="row[invoice_status]-{$key}" name="row[invoice_status]" type="radio" value="{$key}" {in name="key" value="0"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Ispay')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="ispay" item="vo"}
<label for="row[ispay]-{$key}"><input id="row[ispay]-{$key}" name="row[ispay]" type="radio" value="{$key}" {in name="key" value="0"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
... ...
... ... @@ -37,6 +37,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'address', title: __('Address')},
{field: 'address_con', title: __('Address_con')},
{field: 'invoice_status', title: __('Invoice_status'), searchList: {"0":__('Invoice_status 0'),"1":__('Invoice_status 1'),"2":__('Invoice_status 2'),"3":__('Invoice_status 3')}, formatter: Table.api.formatter.status},
{field: 'ispay', title: __('Ispay'), searchList: {"0":__('Ispay 0'),"1":__('Ispay 1'),}, formatter: Table.api.formatter.status},
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
... ...