diff --git a/application/admin/controller/orders/Auditorder.php b/application/admin/controller/orders/Auditorder.php index aca5b36..022f970 100644 --- a/application/admin/controller/orders/Auditorder.php +++ b/application/admin/controller/orders/Auditorder.php @@ -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()); } diff --git a/application/admin/controller/orders/Configorder.php b/application/admin/controller/orders/Configorder.php index 54b54d3..5a14389 100644 --- a/application/admin/controller/orders/Configorder.php +++ b/application/admin/controller/orders/Configorder.php @@ -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()); + } diff --git a/application/admin/controller/orders/Dispatch2.php b/application/admin/controller/orders/Dispatch2.php index 162df7c..d65d820 100644 --- a/application/admin/controller/orders/Dispatch2.php +++ b/application/admin/controller/orders/Dispatch2.php @@ -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()); } diff --git a/application/admin/lang/zh-cn/order.php b/application/admin/lang/zh-cn/order.php index 4232711..bbd74eb 100644 --- a/application/admin/lang/zh-cn/order.php +++ b/application/admin/lang/zh-cn/order.php @@ -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' => '公司收', ]; diff --git a/application/admin/lang/zh-cn/orders/auditorder.php b/application/admin/lang/zh-cn/orders/auditorder.php index c23df85..ce505ed 100644 --- a/application/admin/lang/zh-cn/orders/auditorder.php +++ b/application/admin/lang/zh-cn/orders/auditorder.php @@ -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' => '实际收款', diff --git a/application/admin/lang/zh-cn/orders/configorder.php b/application/admin/lang/zh-cn/orders/configorder.php index c565930..55166ab 100644 --- a/application/admin/lang/zh-cn/orders/configorder.php +++ b/application/admin/lang/zh-cn/orders/configorder.php @@ -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' => '实际收款', diff --git a/application/admin/lang/zh-cn/orders/dispatch2.php b/application/admin/lang/zh-cn/orders/dispatch2.php index 828346f..e95ea7d 100644 --- a/application/admin/lang/zh-cn/orders/dispatch2.php +++ b/application/admin/lang/zh-cn/orders/dispatch2.php @@ -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' => '预约时间', diff --git a/application/admin/model/Order.php b/application/admin/model/Order.php index 49e7437..6ccc972 100644 --- a/application/admin/model/Order.php +++ b/application/admin/model/Order.php @@ -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) { diff --git a/application/admin/model/OrderDispatch.php b/application/admin/model/OrderDispatch.php index b4b073f..3207bcd 100644 --- a/application/admin/model/OrderDispatch.php +++ b/application/admin/model/OrderDispatch.php @@ -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) { diff --git a/application/admin/view/orders/auditorder/edit.html b/application/admin/view/orders/auditorder/edit.html index 5392f79..a1085aa 100644 --- a/application/admin/view/orders/auditorder/edit.html +++ b/application/admin/view/orders/auditorder/edit.html @@ -92,6 +92,14 @@ + +
+ +
+ +
+
+
@@ -99,6 +107,13 @@
+
+ +
+ +
+
+
@@ -106,10 +121,11 @@
+
- +
- + {:build_select('offline_amount_type',$offlineTotalTypeList,$row['dispatch']['offline_total_type'],['class'=>'form-control','data-rule'=>'required'])}
diff --git a/application/admin/view/orders/configorder/edit.html b/application/admin/view/orders/configorder/edit.html index dba29b4..36d8d19 100644 --- a/application/admin/view/orders/configorder/edit.html +++ b/application/admin/view/orders/configorder/edit.html @@ -63,6 +63,13 @@ +
+ +
+ {:build_select('offline_amount_type',$offlineTotalTypeList,$row['dispatch']['offline_total_type'],['class'=>'form-control','data-rule'=>'required'])} +
+
+
diff --git a/application/admin/view/orders/dispatch2/edit.html b/application/admin/view/orders/dispatch2/edit.html index c567552..fb9b9e2 100644 --- a/application/admin/view/orders/dispatch2/edit.html +++ b/application/admin/view/orders/dispatch2/edit.html @@ -119,6 +119,13 @@
+
+ +
+ {:build_select('offline_total_type',$offlineTotalTypeList,$row['offline_total_type'],['class'=>'form-control','data-rule'=>'required'])} +
+
+
diff --git a/public/assets/js/backend/orders/auditorder.js b/public/assets/js/backend/orders/auditorder.js index 3ca18b4..b675927 100644 --- a/public/assets/js/backend/orders/auditorder.js +++ b/public/assets/js/backend/orders/auditorder.js @@ -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}, diff --git a/public/assets/js/backend/orders/configorder.js b/public/assets/js/backend/orders/configorder.js index 991e878..2aaf6bf 100644 --- a/public/assets/js/backend/orders/configorder.js +++ b/public/assets/js/backend/orders/configorder.js @@ -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},