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 @@
+
+
+
+
+
+
+
+