作者 王智

222

... ... @@ -25,7 +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("ispayList", $this->model->getIspay());
$this->view->assign("isPayList", $this->model->getIsPay());
}
/**
... ...
... ... @@ -23,7 +23,7 @@ return [
'Invoice_status 1' => '待开票',
'Invoice_status 2' => '开票中',
'Invoice_status 3' => '已开票',
'Ispay 0' => '未支付',
'Ispay 1' => '已支付',
'Is_pay 0' => '未支付',
'Is_pay 1' => '已支付',
'User.username' => '下单用户'
];
... ...
... ... @@ -37,17 +37,9 @@ class Order extends Model
return ['0' => __('Invoice_status 0'), '1' => __('Invoice_status 1'), '2' => __('Invoice_status 2'), '3' => __('Invoice_status 3')];
}
public function getIspay()
public function getIsPay()
{
return ['0' => __('Ispay 0'), '1' => __('Ispay 1')];
}
public function getIspayTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['ispay']) ? $data['ispay'] : '');
$list = $this->getIspay();
return isset($list[$value]) ? $list[$value] : '';
return ['0' => __('Is_pay 0'), '1' => __('Is_pay 1')];
}
public function getOrderStatusTextAttr($value, $data)
... ...
... ... @@ -37,7 +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: 'is_pay', title: __('Is_pay'), searchList: {"0":__('Is_pay 0'),"1":__('Is_pay 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}
... ...