From 13db38ab4a002d16fdc5032efc735edc547045b0 Mon Sep 17 00:00:00 2001
From: travis <310243791@qq.com>
Date: Thu, 5 Dec 2019 17:32:31 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E8=AE=A2=E5=8D=95?=
=?UTF-8?q?=E5=88=97=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../shop/models/searchs/OrderSearch.php | 70 ++++++++++++-------
.../modules/shop/views/order/order_info.php | 19 +++++
backend/modules/shop/views/order/pay_info.php | 39 +++++++++++
.../shop/views/order/shipping_info.php | 23 ++++++
.../shop/views/order/table_consignee_info.php | 22 +-----
5 files changed, 130 insertions(+), 43 deletions(-)
create mode 100644 backend/modules/shop/views/order/order_info.php
create mode 100644 backend/modules/shop/views/order/pay_info.php
create mode 100644 backend/modules/shop/views/order/shipping_info.php
diff --git a/backend/modules/shop/models/searchs/OrderSearch.php b/backend/modules/shop/models/searchs/OrderSearch.php
index a7b25a9..717b768 100755
--- a/backend/modules/shop/models/searchs/OrderSearch.php
+++ b/backend/modules/shop/models/searchs/OrderSearch.php
@@ -53,21 +53,47 @@ class OrderSearch extends Order
'width' => '2%',
'align' => 'center'
],
- 'id',
+ [
+ 'attribute' => 'id',
+ 'width' => '5%',
+ ],
[
'attribute' => 'user_id',
+ 'width' => '7%',
// 'value' => function ($model) {
// return base64_decode($model->user->nickname);
// }
],
- 'order_sn',
- 'invoice_id',
- 'status',
- 'type',
- 'goods_count',
- 'goods_amount',
- 'shipping_amount',
- 'shipping_type',
+ [
+ 'attribute' => 'order_sn',
+ 'width' => '8%',
+ ],
+ [
+ 'attribute' => 'invoice_id',
+ 'width' => '8%',
+ ],
+ [
+ 'attribute' => 'status',
+ 'width' => '5%',
+ ],
+ [
+ 'attribute' => 'type',
+ 'width' => '5%',
+ ],
+ [
+ 'label' => '订单信息',
+ 'format' => 'raw',
+ 'value' => function ($model) {
+ return Yii::$app->controller->renderPartial('order_info', ['model' => $model]);
+ },
+ ],
+ [
+ 'label' => '物流信息',
+ 'format' => 'raw',
+ 'value' => function ($model) {
+ return Yii::$app->controller->renderPartial('shipping_info', ['model' => $model]);
+ },
+ ],
[
'label' => '收货信息',
'format' => 'raw',
@@ -75,27 +101,23 @@ class OrderSearch extends Order
return Yii::$app->controller->renderPartial('table_consignee_info', ['model' => $model]);
},
],
- 'taking_site',
- 'pay_type',
- 'pay_at',
- 'payment_sn',
- 'payment_amount',
- 'receivables',
- 'remarks',
- 'discount_amount',
- 'discount_description',
[
- 'attribute' => 'updated_at',
- 'value' => function ($model) {
- return date('Y-m-d H:i:s', $model->updated_at);
- }
+ 'attribute' => 'remarks',
+ 'width' => '8%',
],
[
- 'attribute' => 'created_at',
+ 'attribute' => 'updated_at',
+ 'width' => '8%',
'value' => function ($model) {
- return date('Y-m-d H:i:s', $model->created_at);
+ return date('Y-m-d H:i:s', $model->updated_at);
}
],
+// [
+// 'attribute' => 'created_at',
+// 'value' => function ($model) {
+// return date('Y-m-d H:i:s', $model->created_at);
+// }
+// ],
[
'class' => 'iron\grid\ActionColumn',
'align' => 'center',
diff --git a/backend/modules/shop/views/order/order_info.php b/backend/modules/shop/views/order/order_info.php
new file mode 100644
index 0000000..a4a6dfd
--- /dev/null
+++ b/backend/modules/shop/views/order/order_info.php
@@ -0,0 +1,19 @@
+
+
+
+
+ 商品数量: |
+ = $model->goods_count ?> |
+
+
+ 商品金额: |
+ = $model->goods_amount ?> |
+
+
diff --git a/backend/modules/shop/views/order/pay_info.php b/backend/modules/shop/views/order/pay_info.php
new file mode 100644
index 0000000..9670e3c
--- /dev/null
+++ b/backend/modules/shop/views/order/pay_info.php
@@ -0,0 +1,39 @@
+
+
+
+
+ : |
+ = $model->pay_type ?> |
+
+
+ : |
+ = $model->pay_at ?> |
+
+
+ : |
+ = $model->payment_sn ?> |
+
+
+ : |
+ = $model->payment_amount ?> |
+
+
+ : |
+ = $model->receivables ?> |
+
+
+ : |
+ = $model->discount_amount ?> |
+
+
+ : |
+ = $model->discount_description ?> |
+
+
diff --git a/backend/modules/shop/views/order/shipping_info.php b/backend/modules/shop/views/order/shipping_info.php
new file mode 100644
index 0000000..953be44
--- /dev/null
+++ b/backend/modules/shop/views/order/shipping_info.php
@@ -0,0 +1,23 @@
+
+
+
+
+ 物流类型: |
+ = $model->shipping_type ?> |
+
+
+ 商品金额: |
+ = $model->goods_amount ?> |
+
+
+ 自提点: |
+ = $model->taking_site ?> |
+
+
diff --git a/backend/modules/shop/views/order/table_consignee_info.php b/backend/modules/shop/views/order/table_consignee_info.php
index 88d3595..5dfb8af 100644
--- a/backend/modules/shop/views/order/table_consignee_info.php
+++ b/backend/modules/shop/views/order/table_consignee_info.php
@@ -1,19 +1,7 @@
-