95 lines
2.1 KiB
PHP
95 lines
2.1 KiB
PHP
|
<?php
|
||
|
|
||
|
namespace app\psi\controller;
|
||
|
|
||
|
|
||
|
use app\admin\controller\BaseAdminController;
|
||
|
use app\psi\lists\OutboundOrderLists;
|
||
|
use app\psi\logic\OutboundOrderLogic;
|
||
|
use app\psi\validate\OutboundOrderValidate;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* PsiOutboundOrder控制器
|
||
|
* Class OutboundOrderController
|
||
|
* @package app\psi\controller
|
||
|
*/
|
||
|
class OutboundOrderController extends BaseAdminController
|
||
|
{
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @notes 获取列表
|
||
|
* @return \think\response\Json
|
||
|
* @author admin
|
||
|
* @date 2025/03/10 11:08
|
||
|
*/
|
||
|
public function lists()
|
||
|
{
|
||
|
return $this->dataLists(new OutboundOrderLists());
|
||
|
}
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @notes 添加
|
||
|
* @return \think\response\Json
|
||
|
* @author admin
|
||
|
* @date 2025/03/10 11:08
|
||
|
*/
|
||
|
public function add()
|
||
|
{
|
||
|
$params = (new OutboundOrderValidate())->post()->goCheck('add');
|
||
|
$result = OutboundOrderLogic::add($params);
|
||
|
if (true === $result) {
|
||
|
return $this->success('添加成功', [], 1, 1);
|
||
|
}
|
||
|
return $this->fail(OutboundOrderLogic::getError());
|
||
|
}
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @notes 编辑
|
||
|
* @return \think\response\Json
|
||
|
* @author admin
|
||
|
* @date 2025/03/10 11:08
|
||
|
*/
|
||
|
public function edit()
|
||
|
{
|
||
|
$params = (new OutboundOrderValidate())->post()->goCheck('edit');
|
||
|
$result = OutboundOrderLogic::edit($params);
|
||
|
if (true === $result) {
|
||
|
return $this->success('编辑成功', [], 1, 1);
|
||
|
}
|
||
|
return $this->fail(OutboundOrderLogic::getError());
|
||
|
}
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @notes 删除
|
||
|
* @return \think\response\Json
|
||
|
* @author admin
|
||
|
* @date 2025/03/10 11:08
|
||
|
*/
|
||
|
public function delete()
|
||
|
{
|
||
|
$params = (new OutboundOrderValidate())->post()->goCheck('delete');
|
||
|
OutboundOrderLogic::delete($params);
|
||
|
return $this->success('删除成功', [], 1, 1);
|
||
|
}
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @notes 获取详情
|
||
|
* @return \think\response\Json
|
||
|
* @author admin
|
||
|
* @date 2025/03/10 11:08
|
||
|
*/
|
||
|
public function detail()
|
||
|
{
|
||
|
$params = (new OutboundOrderValidate())->goCheck('detail');
|
||
|
$result = OutboundOrderLogic::detail($params);
|
||
|
return $this->data($result);
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|