From 4ca1a1b348542024eddecb8f05860e42b8363cff Mon Sep 17 00:00:00 2001
From: 15090180611 <215509543@qq.com>
Date: Fri, 6 Dec 2024 18:47:05 +0800
Subject: [PATCH] =?UTF-8?q?pc=E5=90=8E=E5=8F=B0,=E8=AF=BE=E7=A8=8B?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD,=E4=BD=8D=E7=BD=AE=E7=9B=B8=E5=85=B3=20?=
=?UTF-8?q?=E9=80=80=E6=AC=BE=E5=85=A8=E6=B5=81=E7=A8=8B=20=E8=AF=BE?=
=?UTF-8?q?=E7=A8=8B=E5=A2=9E=E5=8A=A0=E7=B1=BB=E5=9E=8B=EF=BC=88=E5=8D=95?=
=?UTF-8?q?=E9=80=89=20=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=BA=9Bbug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../admin/controller/manystore/Index.php | 4 +-
.../controller/school/classes/ClassesLib.php | 2 +-
.../admin/controller/school/classes/Type.php | 37 +++
.../controller/school/classes/order/Order.php | 36 +++
.../school/classes/order/ServiceOrder.php | 156 ++++++++++++
.../admin/lang/zh-cn/school/classes/type.php | 14 ++
.../admin/model/school/classes/Type.php | 59 +++++
.../admin/validate/school/classes/Type.php | 27 ++
.../admin/view/manystore/index/add.html | 8 +-
.../admin/view/manystore/index/edit.html | 8 +-
.../school/classes/classes_lib/addnew.html | 32 ++-
.../view/school/classes/classes_lib/edit.html | 27 +-
.../classes/order/order/after_sales.html | 21 ++
.../service_order/admin_confirmation.html | 61 +++++
.../classes/order/service_order/index.html | 28 +--
.../service_order/shop_confirmation.html | 61 +++++
.../service_order/user_confirmation.html | 61 +++++
.../order/service_order_log/index.html | 28 +--
.../admin/view/school/classes/type/add.html | 33 +++
.../admin/view/school/classes/type/edit.html | 33 +++
.../admin/view/school/classes/type/index.html | 46 ++++
.../view/school/classes/type/recyclebin.html | 25 ++
application/api/controller/Index.php | 5 +-
application/api/controller/school/Classes.php | 47 +++-
application/common/controller/Backend.php | 20 ++
.../common/controller/ManystoreBase.php | 16 +-
application/common/library/Virtual.php | 37 +++
.../model/school/classes/ClassesLib.php | 7 +-
.../common/model/school/classes/Type.php | 109 ++++++++
.../school/classes/order/ServiceOrder.php | 29 ++-
.../manystore/controller/general/Profile.php | 1 +
.../controller/school/classes/ClassesLib.php | 8 +-
.../controller/school/classes/Type.php | 40 +++
.../school/classes/order/ServiceOrder.php | 148 +++++++++++
.../school/classes/order/service_order.php | 3 +-
.../lang/zh-cn/school/classes/type.php | 12 +
.../manystore/model/school/classes/Type.php | 57 +++++
.../validate/school/classes/Type.php | 27 ++
.../view/school/classes/classes_lib/add.html | 8 +-
.../school/classes/classes_lib/addnew.html | 28 ++-
.../view/school/classes/classes_lib/edit.html | 20 +-
.../service_order/admin_confirmation.html | 61 +++++
.../classes/order/service_order/index.html | 26 +-
.../service_order/shop_confirmation.html | 61 +++++
.../service_order/user_confirmation.html | 61 +++++
.../order/service_order_log/index.html | 24 +-
.../view/school/classes/type/add.html | 34 +++
.../view/school/classes/type/edit.html | 34 +++
.../view/school/classes/type/index.html | 44 ++++
.../view/school/classes/type/recyclebin.html | 25 ++
public/assets/js/backend/manystore/index.js | 10 +-
.../js/backend/school/classes/order/order.js | 44 ++++
.../school/classes/order/service_order.js | 237 ++++++++++++++++--
.../school/classes/order/service_order_log.js | 39 +--
.../assets/js/backend/school/classes/type.js | 116 +++++++++
.../manystore/school/classes/order/order.js | 16 ++
.../school/classes/order/service_order.js | 210 +++++++++++++---
.../school/classes/order/service_order_log.js | 34 +--
.../js/manystore/school/classes/type.js | 115 +++++++++
59 files changed, 2430 insertions(+), 190 deletions(-)
create mode 100644 application/admin/controller/school/classes/Type.php
create mode 100644 application/admin/lang/zh-cn/school/classes/type.php
create mode 100644 application/admin/model/school/classes/Type.php
create mode 100644 application/admin/validate/school/classes/Type.php
create mode 100644 application/admin/view/school/classes/order/order/after_sales.html
create mode 100644 application/admin/view/school/classes/order/service_order/admin_confirmation.html
create mode 100644 application/admin/view/school/classes/order/service_order/shop_confirmation.html
create mode 100644 application/admin/view/school/classes/order/service_order/user_confirmation.html
create mode 100644 application/admin/view/school/classes/type/add.html
create mode 100644 application/admin/view/school/classes/type/edit.html
create mode 100644 application/admin/view/school/classes/type/index.html
create mode 100644 application/admin/view/school/classes/type/recyclebin.html
create mode 100644 application/common/model/school/classes/Type.php
create mode 100644 application/manystore/controller/school/classes/Type.php
create mode 100644 application/manystore/lang/zh-cn/school/classes/type.php
create mode 100644 application/manystore/model/school/classes/Type.php
create mode 100644 application/manystore/validate/school/classes/Type.php
create mode 100644 application/manystore/view/school/classes/order/service_order/admin_confirmation.html
create mode 100644 application/manystore/view/school/classes/order/service_order/shop_confirmation.html
create mode 100644 application/manystore/view/school/classes/order/service_order/user_confirmation.html
create mode 100644 application/manystore/view/school/classes/type/add.html
create mode 100644 application/manystore/view/school/classes/type/edit.html
create mode 100644 application/manystore/view/school/classes/type/index.html
create mode 100644 application/manystore/view/school/classes/type/recyclebin.html
create mode 100644 public/assets/js/backend/school/classes/type.js
create mode 100644 public/assets/js/manystore/school/classes/type.js
diff --git a/application/admin/controller/manystore/Index.php b/application/admin/controller/manystore/Index.php
index cce8a69..7da7b55 100644
--- a/application/admin/controller/manystore/Index.php
+++ b/application/admin/controller/manystore/Index.php
@@ -59,6 +59,7 @@ class Index extends Backend
$this->view->assign("statusList", $this->shopModel->getStatusList());
$this->view->assign("typeList", $this->shopModel->getTypeList());
$this->view->assign("shop_backend_url", config("site.shop_backend_url"));
+ $this->getCity();
}
@@ -514,11 +515,12 @@ class Index extends Backend
exception('商家信息删除失败');
}
db()->commit();
- $this->success('删除成功');
+
}catch (\Exception $e){
db()->rollback();
$this->error($e->getMessage());
}
+ $this->success('删除成功');
}
$this->error(__('You have no permission'));
}
diff --git a/application/admin/controller/school/classes/ClassesLib.php b/application/admin/controller/school/classes/ClassesLib.php
index 8d385a6..dfce4f2 100644
--- a/application/admin/controller/school/classes/ClassesLib.php
+++ b/application/admin/controller/school/classes/ClassesLib.php
@@ -61,7 +61,7 @@ class ClassesLib extends Backend
$this->view->assign("specStatusList", (new \app\admin\model\school\classes\ClassesSpec)->getStatusList());
-
+ $this->getCity();
}
diff --git a/application/admin/controller/school/classes/Type.php b/application/admin/controller/school/classes/Type.php
new file mode 100644
index 0000000..e745c54
--- /dev/null
+++ b/application/admin/controller/school/classes/Type.php
@@ -0,0 +1,37 @@
+model = new \app\admin\model\school\classes\Type;
+ $this->view->assign("statusList", $this->model->getStatusList());
+ }
+
+
+
+ /**
+ * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
+ * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
+ * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
+ */
+
+
+}
diff --git a/application/admin/controller/school/classes/order/Order.php b/application/admin/controller/school/classes/order/Order.php
index 894655a..1c66271 100644
--- a/application/admin/controller/school/classes/order/Order.php
+++ b/application/admin/controller/school/classes/order/Order.php
@@ -105,4 +105,40 @@ class Order extends Backend
return $this->view->fetch();
}
+
+
+ /**发起售后
+ * @return string
+ * @throws \think\Exception
+ * @throws \think\exception\DbException
+ */
+ public function after_sales($ids = ""){
+
+ if($this->request->isPost())
+ {
+ try{
+ $params = $this->request->post("row/a");
+ $classes_order = $params["id"];
+ $reason = $params["reason"];
+
+ $model = (new \app\common\model\school\classes\order\ServiceOrder());
+ $remark = "总后台管理员帮忙下售后单";
+ $model->afterSales($classes_order,$reason,$remark,'admin',$this->auth->id,true);
+ }catch (\Exception $e){
+ $this->error($e->getMessage());
+ }
+ $this->success("执行成功");
+ }
+
+ $row = $this->model->where(array('id'=>$ids))->find();
+ if (!$row) {
+ $this->error(__('No Results were found'));
+ }
+
+// $row = $this->model->get($param['ids']);
+ $this->view->assign('row', $row);
+ return $this->view->fetch();
+ }
+
+
}
diff --git a/application/admin/controller/school/classes/order/ServiceOrder.php b/application/admin/controller/school/classes/order/ServiceOrder.php
index d9e34ed..3ce84d8 100644
--- a/application/admin/controller/school/classes/order/ServiceOrder.php
+++ b/application/admin/controller/school/classes/order/ServiceOrder.php
@@ -77,4 +77,160 @@ class ServiceOrder extends Backend
return $this->view->fetch();
}
+
+
+
+
+
+
+ /**用户确认
+ * @return string
+ * @throws \think\Exception
+ * @throws \think\exception\DbException
+ */
+ public function user_confirmation($ids = ""){
+
+ if($this->request->isPost())
+ {
+ try{
+ $params = $this->request->post("row/a");
+ $order_no = $params["order_no"];
+ $reject_images = $params["reject_images"];
+ $reject_reason = $params["reject_reason"];
+ $status = $params["status"];
+ $model = (new \app\common\model\school\classes\order\ServiceOrder());
+ $model->userConfirmation($order_no,$status,$reject_reason,$reject_images,0,true,'admin',$this->auth->id,true);
+ }catch (\Exception $e){
+ $this->error($e->getMessage());
+ }
+
+ $this->success("已完成审核");
+ }
+
+ $row = $this->model->where(array('id'=>$ids))->find();
+ if (!$row) {
+ $this->error(__('No Results were found'));
+ }
+
+// $row = $this->model->get($param['ids']);
+ $this->view->assign("statusList", ["yes"=>"同意", "no"=>"拒绝"]);
+ $this->view->assign('row', $row);
+ return $this->view->fetch();
+ }
+
+
+
+
+ /**机构确认
+ * @return string
+ * @throws \think\Exception
+ * @throws \think\exception\DbException
+ */
+ public function shop_confirmation($ids = ""){
+
+ if($this->request->isPost())
+ {
+ try{
+ $params = $this->request->post("row/a");
+ $order_no = $params["order_no"];
+ $reject_images = $params["reject_images"];
+ $reject_reason = $params["reject_reason"];
+ $price = $params["price"];
+ $status = $params["status"];
+ $model = (new \app\common\model\school\classes\order\ServiceOrder());
+ $model->shopConfirmation($order_no,$status,$price,$reject_reason,$reject_images,0,true,'admin',$this->auth->id,true);
+ }catch (\Exception $e){
+ $this->error($e->getMessage());
+ }
+
+ $this->success("已完成审核");
+ }
+
+ $row = $this->model->where(array('id'=>$ids))->find();
+ if (!$row) {
+ $this->error(__('No Results were found'));
+ }
+
+// $row = $this->model->get($param['ids']);
+ $this->view->assign("statusList", ["yes"=>"同意", "no"=>"拒绝"]);
+ $this->view->assign('row', $row);
+ return $this->view->fetch();
+ }
+
+
+
+ /**系统确认
+ * @return string
+ * @throws \think\Exception
+ * @throws \think\exception\DbException
+ */
+ public function admin_confirmation($ids = ""){
+
+ if($this->request->isPost())
+ {
+ try{
+ $params = $this->request->post("row/a");
+ $order_no = $params["order_no"];
+ $reject_images = $params["reject_images"];
+ $reject_reason = $params["reject_reason"];
+ $status = $params["status"];
+ $model = (new \app\common\model\school\classes\order\ServiceOrder());
+ $model->adminConfirmation($order_no,$status,$reject_reason,$reject_images,0,true,'admin',$this->auth->id,true);
+ }catch (\Exception $e){
+ $this->error($e->getMessage());
+ }
+
+ $this->success("已完成审核");
+ }
+
+ $row = $this->model->where(array('id'=>$ids))->find();
+ if (!$row) {
+ $this->error(__('No Results were found'));
+ }
+
+// $row = $this->model->get($param['ids']);
+
+ $this->view->assign("statusList", ["yes"=>"同意", "no"=>"拒绝"]);
+ $this->view->assign('row', $row);
+ return $this->view->fetch();
+ }
+
+
+
+
+
+ /**
+ * 后台核销
+ * @return string
+ * @throws \think\Exception
+ * @throws \think\db\exception\BindParamException
+ * @throws \think\exception\DbException
+ * @throws \think\exception\PDOException
+ */
+ public function cancel($ids = ''){
+ $param = $this->request->param();
+ if($this->request->isPost()){
+ try{
+ if(isset($param['ids']))$ids = $param['ids'];
+ //设置模拟资格
+ $model = (new \app\common\model\school\classes\order\ServiceOrder());
+ $model->cancel($ids,0,true,'admin',$this->auth->id,true);
+
+ }catch (\Exception $e){
+ $this->error($e->getMessage());
+ }
+ $this->success('取消成功!');
+ }
+ $row = $this->model->get($ids);
+
+ $this->view->assign('vo', $row);
+ return $this->view->fetch();
+ }
+
+
+
+
+
+
+
}
diff --git a/application/admin/lang/zh-cn/school/classes/type.php b/application/admin/lang/zh-cn/school/classes/type.php
new file mode 100644
index 0000000..29e7fc8
--- /dev/null
+++ b/application/admin/lang/zh-cn/school/classes/type.php
@@ -0,0 +1,14 @@
+ '分类名',
+ 'Status' => '状态',
+ 'Status 1' => '上架',
+ 'Set status to 1'=> '设为上架',
+ 'Status 2' => '下架',
+ 'Set status to 2'=> '设为下架',
+ 'Weigh' => '权重',
+ 'Createtime' => '创建时间',
+ 'Updatetime' => '修改时间',
+ 'Deletetime' => '删除时间'
+];
diff --git a/application/admin/model/school/classes/Type.php b/application/admin/model/school/classes/Type.php
new file mode 100644
index 0000000..37614df
--- /dev/null
+++ b/application/admin/model/school/classes/Type.php
@@ -0,0 +1,59 @@
+getPk();
+ $row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
+ }
+ });
+ }
+
+
+ public function getStatusList()
+ {
+ return ['1' => __('Status 1'), '2' => __('Status 2')];
+ }
+
+
+ public function getStatusTextAttr($value, $data)
+ {
+ $value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
+ $list = $this->getStatusList();
+ return isset($list[$value]) ? $list[$value] : '';
+ }
+
+
+
+
+}
diff --git a/application/admin/validate/school/classes/Type.php b/application/admin/validate/school/classes/Type.php
new file mode 100644
index 0000000..c8c9b23
--- /dev/null
+++ b/application/admin/validate/school/classes/Type.php
@@ -0,0 +1,27 @@
+ [],
+ 'edit' => [],
+ ];
+
+}
diff --git a/application/admin/view/manystore/index/add.html b/application/admin/view/manystore/index/add.html
index 22a177f..ec66c5d 100644
--- a/application/admin/view/manystore/index/add.html
+++ b/application/admin/view/manystore/index/add.html
@@ -142,11 +142,11 @@
diff --git a/application/admin/view/school/classes/classes_lib/addnew.html b/application/admin/view/school/classes/classes_lib/addnew.html
index 6c66719..c90e52b 100644
--- a/application/admin/view/school/classes/classes_lib/addnew.html
+++ b/application/admin/view/school/classes/classes_lib/addnew.html
@@ -65,6 +65,26 @@
+
+
+
+
+
+
+
+