Browse Source

优化

master
nizongfeng 1 year ago
parent
commit
58a0ecfd9b
2 changed files with 8 additions and 3 deletions
  1. +4
    -2
      application/admin/controller/PaymentOrder.php
  2. +4
    -1
      application/admin/controller/ReceiptOrder.php

+ 4
- 2
application/admin/controller/PaymentOrder.php View File

@@ -75,10 +75,12 @@ class PaymentOrder extends Backend
$groupIds = $this->auth->getGroupIds();
$authGroup = new AuthGroup();
$cnt = $authGroup->where(["id" => ["in",$groupIds], "finance_flag" => 1])->count("*");
if ($cnt==0) {
$params=$this->request->post();
$model = new \app\admin\model\PaymentOrder();
$info = $model->where(["id"=>$params['id']])->find();
if ($cnt==0 && ($info['status']==2 || $params['status']==2)) {
return json(Util::returnArrEr("未获取财务部门权限"));
}
$params=$this->request->post();
$service = new PaymentOrderService();
$result = $service->setStatus($params['id'],$params['status']);
return json($result);


+ 4
- 1
application/admin/controller/ReceiptOrder.php View File

@@ -79,7 +79,10 @@ class ReceiptOrder extends Backend
$groupIds = $this->auth->getGroupIds();
$authGroup = new AuthGroup();
$cnt = $authGroup->where(["id" => ["in",$groupIds], "finance_flag" => 1])->count("*");
if ($cnt==0) {
$params=$this->request->post();
$model = new \app\admin\model\ReceiptOrder();
$info = $model->where(["id"=>$params['id']])->find();
if ($cnt==0 && ($info['status']==2 || $params['status']==2)) {
return json(Util::returnArrEr("未获取财务部门权限"));
}
$params=$this->request->post();


Loading…
Cancel
Save