- 移除了供应链相关代码,包括 SupplierController、SupplierLists 和 SupplierLogic - 更新了 PurchaseOrderController 和 PurchaseProductController,调整了相关逻辑 - 修改了 PurchaseProductLists 中的供应商名称获取方式 - 优化了 PurchaseOrderLogic 中的订单编辑逻辑 - 更新了 Supplier 模型的表名
94 lines
2.0 KiB
PHP
94 lines
2.0 KiB
PHP
<?php
|
|
|
|
namespace app\psi\controller\supplier;
|
|
|
|
|
|
use app\admin\controller\BaseAdminController;
|
|
use app\psi\lists\supplier\SupplierLists;
|
|
use app\psi\logic\supplier\SupplierLogic;
|
|
|
|
|
|
/**
|
|
* 供应链控制器
|
|
* Class SupplierController
|
|
* @package app\admin\controller\supplier
|
|
*/
|
|
class SupplierController extends BaseAdminController
|
|
{
|
|
|
|
|
|
/**
|
|
* @notes 获取供应链列表
|
|
* @return \think\response\Json
|
|
* @author admin
|
|
* @date 2024/08/15 14:10
|
|
*/
|
|
public function lists()
|
|
{
|
|
return $this->dataLists(new SupplierLists());
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 添加供应链
|
|
* @return \think\response\Json
|
|
* @author admin
|
|
* @date 2024/08/15 14:10
|
|
*/
|
|
public function add()
|
|
{
|
|
$params = $this->request->post();
|
|
$result = SupplierLogic::add($params);
|
|
if (true === $result) {
|
|
return $this->success('添加成功', [], 1, 1);
|
|
}
|
|
return $this->fail(SupplierLogic::getError());
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 编辑供应链
|
|
* @return \think\response\Json
|
|
* @author admin
|
|
* @date 2024/08/15 14:10
|
|
*/
|
|
public function edit()
|
|
{
|
|
$params = $this->request->post();
|
|
$result = SupplierLogic::edit($params);
|
|
if (true === $result) {
|
|
return $this->success('编辑成功', [], 1, 1);
|
|
}
|
|
return $this->fail(SupplierLogic::getError());
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 删除供应链
|
|
* @return \think\response\Json
|
|
* @author admin
|
|
* @date 2024/08/15 14:10
|
|
*/
|
|
public function delete()
|
|
{
|
|
$params = $this->request->post();
|
|
SupplierLogic::delete($params);
|
|
return $this->success('删除成功', [], 1, 1);
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 获取供应链详情
|
|
* @return \think\response\Json
|
|
* @author admin
|
|
* @date 2024/08/15 14:10
|
|
*/
|
|
public function detail()
|
|
{
|
|
$params = $this->request->post();
|
|
$result = SupplierLogic::detail($params);
|
|
return $this->data($result);
|
|
}
|
|
|
|
|
|
} |