From 1db3b3c9fde1f1697faade91afecace6439a9c89 Mon Sep 17 00:00:00 2001 From: xman <1946321327@qq.com> Date: Sun, 1 Jun 2025 23:18:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E8=AE=A2=E5=8D=95=E9=87=8D?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controller/aftersales/Aftersale.php | 1 + .../admin/lang/zh-cn/aftersales/aftersale.php | 2 +- application/admin/model/Aftersale.php | 16 ++++++- .../admin/view/aftersales/aftersale/edit.html | 48 ++++++++----------- 4 files changed, 37 insertions(+), 30 deletions(-) diff --git a/application/admin/controller/aftersales/Aftersale.php b/application/admin/controller/aftersales/Aftersale.php index 2124029..9fb52bd 100644 --- a/application/admin/controller/aftersales/Aftersale.php +++ b/application/admin/controller/aftersales/Aftersale.php @@ -35,6 +35,7 @@ class Aftersale extends Backend $this->view->assign("handleTypeList", $this->model->getHandleTypeList()); $this->view->assign("fromList", $this->model->getFromList()); $this->view->assign("refundTypeList", $this->model->getRefundTypeList()); + $this->view->assign("typeList", $this->model->getTypeList()); $this->view->assign("workerRefundEntryList", $this->model->getWorkerRefundEntryList()); } diff --git a/application/admin/lang/zh-cn/aftersales/aftersale.php b/application/admin/lang/zh-cn/aftersales/aftersale.php index 338e09f..d6647b0 100644 --- a/application/admin/lang/zh-cn/aftersales/aftersale.php +++ b/application/admin/lang/zh-cn/aftersales/aftersale.php @@ -12,7 +12,7 @@ return [ 'Set status to 3' => '设为已退款', 'Status -1' => '已作废', 'Set status to -1' => '设为已作废', - 'Handle_type' => '办结类型', + 'Handle_type' => '办结方式', 'Handle_type 1' => '退款', 'Handle_type 2' => '返修', 'Handle_type 3' => '客户无理取闹', diff --git a/application/admin/model/Aftersale.php b/application/admin/model/Aftersale.php index e581e46..92c9e43 100644 --- a/application/admin/model/Aftersale.php +++ b/application/admin/model/Aftersale.php @@ -29,7 +29,8 @@ class Aftersale extends Model 'handle_type_text', 'from_text', 'refund_type_text', - 'worker_refund_entry_text' + 'worker_refund_entry_text', + 'type_text' ]; @@ -57,6 +58,11 @@ class Aftersale extends Model return ['0' => __('Refund_type 0'),'1' => __('Refund_type 1'), '2' => __('Refund_type 2')]; } + public function getTypeList() + { + return ['1' => __('退款'),'2' => __('返修'), '3' => __('其它')]; + } + public function getWorkerRefundEntryList() { return ['0' => __('Worker_refund_entry 0'), '1' => __('Worker_refund_entry 1')]; @@ -79,6 +85,14 @@ class Aftersale extends Model } + public function getTypeTextAttr($value, $data) + { + $value = $value ?: ($data['type'] ?? ''); + $list = $this->getTypeList(); + return $list[$value] ?? ''; + } + + public function getFromTextAttr($value, $data) { $value = $value ?: ($data['from'] ?? ''); diff --git a/application/admin/view/aftersales/aftersale/edit.html b/application/admin/view/aftersales/aftersale/edit.html index 3a35b93..a241227 100644 --- a/application/admin/view/aftersales/aftersale/edit.html +++ b/application/admin/view/aftersales/aftersale/edit.html @@ -25,24 +25,13 @@
- + + +
-
- -
- -
-
+
@@ -56,6 +45,22 @@
+ + +
+ +
+ + + +
+
+ +
@@ -179,19 +184,6 @@
-
- -
- - - -
-
- {if condition='$row.status eq 1'}