更新页面
This commit is contained in:
parent
6e3fd822d5
commit
3ae4c3bafb
108
app/adminapi/controller/bid/BidBiddingDecisionController.php
Normal file
108
app/adminapi/controller/bid/BidBiddingDecisionController.php
Normal file
@ -0,0 +1,108 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace app\adminapi\controller\bid;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\bid\BidBiddingDecisionLists;
|
||||
use app\adminapi\logic\bid\BidBiddingDecisionLogic;
|
||||
use app\adminapi\validate\bid\BidBiddingDecisionValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 投标决策控制器
|
||||
* Class BidBiddingDecisionController
|
||||
* @package app\adminapi\controller\bid
|
||||
*/
|
||||
class BidBiddingDecisionController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取投标决策列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:14
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new BidBiddingDecisionLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加投标决策
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:14
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new BidBiddingDecisionValidate())->post()->goCheck('add');
|
||||
$result = BidBiddingDecisionLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(BidBiddingDecisionLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑投标决策
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:14
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new BidBiddingDecisionValidate())->post()->goCheck('edit');
|
||||
$result = BidBiddingDecisionLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(BidBiddingDecisionLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除投标决策
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:14
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new BidBiddingDecisionValidate())->post()->goCheck('delete');
|
||||
BidBiddingDecisionLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取投标决策详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:14
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new BidBiddingDecisionValidate())->goCheck('detail');
|
||||
$result = BidBiddingDecisionLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
108
app/adminapi/controller/bid/BidBuyBiddingDocumentController.php
Normal file
108
app/adminapi/controller/bid/BidBuyBiddingDocumentController.php
Normal file
@ -0,0 +1,108 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace app\adminapi\controller\bid;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\bid\BidBuyBiddingDocumentLists;
|
||||
use app\adminapi\logic\bid\BidBuyBiddingDocumentLogic;
|
||||
use app\adminapi\validate\bid\BidBuyBiddingDocumentValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 购买标书控制器
|
||||
* Class BidBuyBiddingDocumentController
|
||||
* @package app\adminapi\controller\bid
|
||||
*/
|
||||
class BidBuyBiddingDocumentController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取购买标书列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:22
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new BidBuyBiddingDocumentLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加购买标书
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:22
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new BidBuyBiddingDocumentValidate())->post()->goCheck('add');
|
||||
$result = BidBuyBiddingDocumentLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(BidBuyBiddingDocumentLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑购买标书
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:22
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new BidBuyBiddingDocumentValidate())->post()->goCheck('edit');
|
||||
$result = BidBuyBiddingDocumentLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(BidBuyBiddingDocumentLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除购买标书
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:22
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new BidBuyBiddingDocumentValidate())->post()->goCheck('delete');
|
||||
BidBuyBiddingDocumentLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取购买标书详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:22
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new BidBuyBiddingDocumentValidate())->goCheck('detail');
|
||||
$result = BidBuyBiddingDocumentLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
108
app/adminapi/controller/quotation/QuotationController.php
Normal file
108
app/adminapi/controller/quotation/QuotationController.php
Normal file
@ -0,0 +1,108 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace app\adminapi\controller\quotation;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\quotation\QuotationLists;
|
||||
use app\adminapi\logic\quotation\QuotationLogic;
|
||||
use app\adminapi\validate\quotation\QuotationValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 报价单控制器
|
||||
* Class QuotationController
|
||||
* @package app\adminapi\controller\quotation
|
||||
*/
|
||||
class QuotationController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取报价单列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:23
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new QuotationLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加报价单
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:23
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new QuotationValidate())->post()->goCheck('add');
|
||||
$result = QuotationLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(QuotationLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑报价单
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:23
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new QuotationValidate())->post()->goCheck('edit');
|
||||
$result = QuotationLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(QuotationLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除报价单
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:23
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new QuotationValidate())->post()->goCheck('delete');
|
||||
QuotationLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取报价单详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:23
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new QuotationValidate())->goCheck('detail');
|
||||
$result = QuotationLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
108
app/adminapi/controller/quotation/QuotationDetailController.php
Normal file
108
app/adminapi/controller/quotation/QuotationDetailController.php
Normal file
@ -0,0 +1,108 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace app\adminapi\controller\quotation;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\quotation\QuotationDetailLists;
|
||||
use app\adminapi\logic\quotation\QuotationDetailLogic;
|
||||
use app\adminapi\validate\quotation\QuotationDetailValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 报价明细控制器
|
||||
* Class QuotationDetailController
|
||||
* @package app\adminapi\controller\quotation
|
||||
*/
|
||||
class QuotationDetailController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取报价明细列表
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:59
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new QuotationDetailLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加报价明细
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:59
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new QuotationDetailValidate())->post()->goCheck('add');
|
||||
$result = QuotationDetailLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(QuotationDetailLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑报价明细
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:59
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new QuotationDetailValidate())->post()->goCheck('edit');
|
||||
$result = QuotationDetailLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(QuotationDetailLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除报价明细
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:59
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new QuotationDetailValidate())->post()->goCheck('delete');
|
||||
QuotationDetailLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取报价明细详情
|
||||
* @return \think\response\Json
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:59
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new QuotationDetailValidate())->goCheck('detail');
|
||||
$result = QuotationDetailLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
77
app/adminapi/lists/bid/BidBiddingDecisionLists.php
Normal file
77
app/adminapi/lists/bid/BidBiddingDecisionLists.php
Normal file
@ -0,0 +1,77 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\lists\bid;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\bid\BidBiddingDecision;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 投标决策列表
|
||||
* Class BidBiddingDecisionLists
|
||||
* @package app\adminapi\listsbid
|
||||
*/
|
||||
class BidBiddingDecisionLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:14
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['project_id'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取投标决策列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:14
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return BidBiddingDecision::where($this->searchWhere)
|
||||
->field(['id', 'project_id', 'project_estimation', 'bidding_project_fund_source', 'bidding_time', 'buy_bid_document_date', 'bid_type', 'competitor', 'is_margin', 'margin_amount', 'bid_opening_date', 'margin_amount_return_date', 'is_internal_resources', 'project_assurance'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取投标决策数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:14
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return BidBiddingDecision::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
77
app/adminapi/lists/bid/BidBuyBiddingDocumentLists.php
Normal file
77
app/adminapi/lists/bid/BidBuyBiddingDocumentLists.php
Normal file
@ -0,0 +1,77 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\lists\bid;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\bid\BidBuyBiddingDocument;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 购买标书列表
|
||||
* Class BidBuyBiddingDocumentLists
|
||||
* @package app\adminapi\listsbid
|
||||
*/
|
||||
class BidBuyBiddingDocumentLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:22
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['project_id', 'bid_document_no', 'invite_tenders_company_name', 'bid_company_name'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取购买标书列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:22
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return BidBuyBiddingDocument::where($this->searchWhere)
|
||||
->field(['id', 'project_id', 'bid_document_no', 'invite_tenders_company_name', 'bid_company_name', 'buyer', 'amount', 'project_fund_source', 'bid_date', 'buy_date', 'invite_tenders_type', 'bid_address', 'is_margin', 'margin_amount', 'bid_project_overview', 'project_desc', 'annex'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取购买标书数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:22
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return BidBuyBiddingDocument::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
77
app/adminapi/lists/quotation/QuotationDetailLists.php
Normal file
77
app/adminapi/lists/quotation/QuotationDetailLists.php
Normal file
@ -0,0 +1,77 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\lists\quotation;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\quotation\QuotationDetail;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 报价明细列表
|
||||
* Class QuotationDetailLists
|
||||
* @package app\adminapi\listsquotation
|
||||
*/
|
||||
class QuotationDetailLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:59
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['quotation_id', 'product_id', 'product_num', 'tax_rate'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取报价明细列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:59
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return QuotationDetail::where($this->searchWhere)
|
||||
->field(['id', 'quotation_id', 'product_id', 'product_num', 'tax_rate', 'remark'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取报价明细数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:59
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return QuotationDetail::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
77
app/adminapi/lists/quotation/QuotationLists.php
Normal file
77
app/adminapi/lists/quotation/QuotationLists.php
Normal file
@ -0,0 +1,77 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\lists\quotation;
|
||||
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\quotation\Quotation;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
|
||||
/**
|
||||
* 报价单列表
|
||||
* Class QuotationLists
|
||||
* @package app\adminapi\listsquotation
|
||||
*/
|
||||
class QuotationLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置搜索条件
|
||||
* @return \string[][]
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:23
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['customer_id', 'contacts', 'create_user'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取报价单列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:23
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return Quotation::where($this->searchWhere)
|
||||
->field(['id', 'customer_id', 'quotation_date', 'contacts', 'contacts_phone', 'create_user', 'invoice_type', 'amount_including_tax', 'freight', 'other_fee', 'total_amount'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取报价单数量
|
||||
* @return int
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:23
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return Quotation::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
}
|
136
app/adminapi/logic/bid/BidBiddingDecisionLogic.php
Normal file
136
app/adminapi/logic/bid/BidBiddingDecisionLogic.php
Normal file
@ -0,0 +1,136 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\logic\bid;
|
||||
|
||||
|
||||
use app\common\model\bid\BidBiddingDecision;
|
||||
use app\common\logic\BaseLogic;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 投标决策逻辑
|
||||
* Class BidBiddingDecisionLogic
|
||||
* @package app\adminapi\logic\bid
|
||||
*/
|
||||
class BidBiddingDecisionLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加投标决策
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:14
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
BidBiddingDecision::create([
|
||||
'project_id' => $params['project_id'],
|
||||
'project_estimation' => $params['project_estimation'],
|
||||
'bidding_project_fund_source' => $params['bidding_project_fund_source'],
|
||||
'bidding_time' => $params['bidding_time'],
|
||||
'buy_bid_document_date' => $params['buy_bid_document_date'],
|
||||
'bid_type' => $params['bid_type'],
|
||||
'competitor' => $params['competitor'],
|
||||
'is_margin' => $params['is_margin'],
|
||||
'margin_amount' => $params['margin_amount'],
|
||||
'bid_opening_date' => $params['bid_opening_date'],
|
||||
'margin_amount_return_date' => $params['margin_amount_return_date'],
|
||||
'is_internal_resources' => $params['is_internal_resources'],
|
||||
'project_assurance' => $params['project_assurance'],
|
||||
'bid_project_overview' => $params['bid_project_overview'],
|
||||
'project_desc' => $params['project_desc'],
|
||||
'annex' => $params['annex']
|
||||
]);
|
||||
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
Db::rollback();
|
||||
self::setError($e->getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑投标决策
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:14
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
BidBiddingDecision::where('id', $params['id'])->update([
|
||||
'project_id' => $params['project_id'],
|
||||
'project_estimation' => $params['project_estimation'],
|
||||
'bidding_project_fund_source' => $params['bidding_project_fund_source'],
|
||||
'bidding_time' => $params['bidding_time'],
|
||||
'buy_bid_document_date' => $params['buy_bid_document_date'],
|
||||
'bid_type' => $params['bid_type'],
|
||||
'competitor' => $params['competitor'],
|
||||
'is_margin' => $params['is_margin'],
|
||||
'margin_amount' => $params['margin_amount'],
|
||||
'bid_opening_date' => $params['bid_opening_date'],
|
||||
'margin_amount_return_date' => $params['margin_amount_return_date'],
|
||||
'is_internal_resources' => $params['is_internal_resources'],
|
||||
'project_assurance' => $params['project_assurance'],
|
||||
'bid_project_overview' => $params['bid_project_overview'],
|
||||
'project_desc' => $params['project_desc'],
|
||||
'annex' => $params['annex']
|
||||
]);
|
||||
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
Db::rollback();
|
||||
self::setError($e->getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除投标决策
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:14
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return BidBiddingDecision::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取投标决策详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:14
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
return BidBiddingDecision::findOrEmpty($params['id'])->toArray();
|
||||
}
|
||||
}
|
136
app/adminapi/logic/bid/BidBuyBiddingDocumentLogic.php
Normal file
136
app/adminapi/logic/bid/BidBuyBiddingDocumentLogic.php
Normal file
@ -0,0 +1,136 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\logic\bid;
|
||||
|
||||
|
||||
use app\common\model\bid\BidBuyBiddingDocument;
|
||||
use app\common\logic\BaseLogic;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 购买标书逻辑
|
||||
* Class BidBuyBiddingDocumentLogic
|
||||
* @package app\adminapi\logic\bid
|
||||
*/
|
||||
class BidBuyBiddingDocumentLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加购买标书
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:22
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
BidBuyBiddingDocument::create([
|
||||
'project_id' => $params['project_id'],
|
||||
'bid_document_no' => $params['bid_document_no'],
|
||||
'invite_tenders_company_name' => $params['invite_tenders_company_name'],
|
||||
'bid_company_name' => $params['bid_company_name'],
|
||||
'buyer' => $params['buyer'],
|
||||
'amount' => $params['amount'],
|
||||
'project_fund_source' => $params['project_fund_source'],
|
||||
'bid_date' => strtotime($params['bid_date']),
|
||||
'buy_date' => strtotime($params['buy_date']),
|
||||
'invite_tenders_type' => $params['invite_tenders_type'],
|
||||
'bid_address' => $params['bid_address'],
|
||||
'is_margin' => $params['is_margin'],
|
||||
'margin_amount' => $params['margin_amount'],
|
||||
'bid_project_overview' => $params['bid_project_overview'],
|
||||
'project_desc' => $params['project_desc'],
|
||||
'annex' => $params['annex']
|
||||
]);
|
||||
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
Db::rollback();
|
||||
self::setError($e->getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑购买标书
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:22
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
BidBuyBiddingDocument::where('id', $params['id'])->update([
|
||||
'project_id' => $params['project_id'],
|
||||
'bid_document_no' => $params['bid_document_no'],
|
||||
'invite_tenders_company_name' => $params['invite_tenders_company_name'],
|
||||
'bid_company_name' => $params['bid_company_name'],
|
||||
'buyer' => $params['buyer'],
|
||||
'amount' => $params['amount'],
|
||||
'project_fund_source' => $params['project_fund_source'],
|
||||
'bid_date' => strtotime($params['bid_date']),
|
||||
'buy_date' => strtotime($params['buy_date']),
|
||||
'invite_tenders_type' => $params['invite_tenders_type'],
|
||||
'bid_address' => $params['bid_address'],
|
||||
'is_margin' => $params['is_margin'],
|
||||
'margin_amount' => $params['margin_amount'],
|
||||
'bid_project_overview' => $params['bid_project_overview'],
|
||||
'project_desc' => $params['project_desc'],
|
||||
'annex' => $params['annex']
|
||||
]);
|
||||
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
Db::rollback();
|
||||
self::setError($e->getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除购买标书
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:22
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return BidBuyBiddingDocument::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取购买标书详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:22
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
return BidBuyBiddingDocument::findOrEmpty($params['id'])->toArray();
|
||||
}
|
||||
}
|
114
app/adminapi/logic/quotation/QuotationDetailLogic.php
Normal file
114
app/adminapi/logic/quotation/QuotationDetailLogic.php
Normal file
@ -0,0 +1,114 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\logic\quotation;
|
||||
|
||||
|
||||
use app\common\model\quotation\QuotationDetail;
|
||||
use app\common\logic\BaseLogic;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 报价明细逻辑
|
||||
* Class QuotationDetailLogic
|
||||
* @package app\adminapi\logic\quotation
|
||||
*/
|
||||
class QuotationDetailLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加报价明细
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:59
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
QuotationDetail::create([
|
||||
'quotation_id' => $params['quotation_id'],
|
||||
'product_id' => $params['product_id'],
|
||||
'product_num' => $params['product_num'],
|
||||
'tax_rate' => $params['tax_rate'],
|
||||
'remark' => $params['remark']
|
||||
]);
|
||||
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
Db::rollback();
|
||||
self::setError($e->getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑报价明细
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:59
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
QuotationDetail::where('id', $params['id'])->update([
|
||||
'quotation_id' => $params['quotation_id'],
|
||||
'product_id' => $params['product_id'],
|
||||
'product_num' => $params['product_num'],
|
||||
'tax_rate' => $params['tax_rate'],
|
||||
'remark' => $params['remark']
|
||||
]);
|
||||
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
Db::rollback();
|
||||
self::setError($e->getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除报价明细
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:59
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return QuotationDetail::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取报价明细详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:59
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
return QuotationDetail::findOrEmpty($params['id'])->toArray();
|
||||
}
|
||||
}
|
130
app/adminapi/logic/quotation/QuotationLogic.php
Normal file
130
app/adminapi/logic/quotation/QuotationLogic.php
Normal file
@ -0,0 +1,130 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\logic\quotation;
|
||||
|
||||
|
||||
use app\common\model\quotation\Quotation;
|
||||
use app\common\logic\BaseLogic;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 报价单逻辑
|
||||
* Class QuotationLogic
|
||||
* @package app\adminapi\logic\quotation
|
||||
*/
|
||||
class QuotationLogic extends BaseLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加报价单
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:23
|
||||
*/
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
Quotation::create([
|
||||
'customer_id' => $params['customer_id'],
|
||||
'quotation_date' => $params['quotation_date'],
|
||||
'contacts' => $params['contacts'],
|
||||
'contacts_phone' => $params['contacts_phone'],
|
||||
'create_user' => $params['create_user'],
|
||||
'invoice_type' => $params['invoice_type'],
|
||||
'amount_including_tax' => $params['amount_including_tax'],
|
||||
'freight' => $params['freight'],
|
||||
'other_fee' => $params['other_fee'],
|
||||
'total_amount' => $params['total_amount'],
|
||||
'customer_require' => $params['customer_require'],
|
||||
'remark' => $params['remark'],
|
||||
'annex' => $params['annex']
|
||||
]);
|
||||
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
Db::rollback();
|
||||
self::setError($e->getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑报价单
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:23
|
||||
*/
|
||||
public static function edit(array $params): bool
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
Quotation::where('id', $params['id'])->update([
|
||||
'customer_id' => $params['customer_id'],
|
||||
'quotation_date' => $params['quotation_date'],
|
||||
'contacts' => $params['contacts'],
|
||||
'contacts_phone' => $params['contacts_phone'],
|
||||
'create_user' => $params['create_user'],
|
||||
'invoice_type' => $params['invoice_type'],
|
||||
'amount_including_tax' => $params['amount_including_tax'],
|
||||
'freight' => $params['freight'],
|
||||
'other_fee' => $params['other_fee'],
|
||||
'total_amount' => $params['total_amount'],
|
||||
'customer_require' => $params['customer_require'],
|
||||
'remark' => $params['remark'],
|
||||
'annex' => $params['annex']
|
||||
]);
|
||||
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
Db::rollback();
|
||||
self::setError($e->getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除报价单
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:23
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
return Quotation::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取报价单详情
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:23
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
return Quotation::findOrEmpty($params['id'])->toArray();
|
||||
}
|
||||
}
|
94
app/adminapi/validate/bid/BidBiddingDecisionValidate.php
Normal file
94
app/adminapi/validate/bid/BidBiddingDecisionValidate.php
Normal file
@ -0,0 +1,94 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\validate\bid;
|
||||
|
||||
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 投标决策验证器
|
||||
* Class BidBiddingDecisionValidate
|
||||
* @package app\adminapi\validate\bid
|
||||
*/
|
||||
class BidBiddingDecisionValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return BidBiddingDecisionValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:14
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->remove('id', true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return BidBiddingDecisionValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:14
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return BidBiddingDecisionValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:14
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return BidBiddingDecisionValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:14
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
}
|
94
app/adminapi/validate/bid/BidBuyBiddingDocumentValidate.php
Normal file
94
app/adminapi/validate/bid/BidBuyBiddingDocumentValidate.php
Normal file
@ -0,0 +1,94 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\validate\bid;
|
||||
|
||||
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 购买标书验证器
|
||||
* Class BidBuyBiddingDocumentValidate
|
||||
* @package app\adminapi\validate\bid
|
||||
*/
|
||||
class BidBuyBiddingDocumentValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return BidBuyBiddingDocumentValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:22
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->remove('id', true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return BidBuyBiddingDocumentValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:22
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return BidBuyBiddingDocumentValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:22
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return BidBuyBiddingDocumentValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 18:22
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
}
|
94
app/adminapi/validate/quotation/QuotationDetailValidate.php
Normal file
94
app/adminapi/validate/quotation/QuotationDetailValidate.php
Normal file
@ -0,0 +1,94 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\validate\quotation;
|
||||
|
||||
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 报价明细验证器
|
||||
* Class QuotationDetailValidate
|
||||
* @package app\adminapi\validate\quotation
|
||||
*/
|
||||
class QuotationDetailValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return QuotationDetailValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:59
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->remove('id', true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return QuotationDetailValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:59
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return QuotationDetailValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:59
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return QuotationDetailValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:59
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
}
|
94
app/adminapi/validate/quotation/QuotationValidate.php
Normal file
94
app/adminapi/validate/quotation/QuotationValidate.php
Normal file
@ -0,0 +1,94 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\validate\quotation;
|
||||
|
||||
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 报价单验证器
|
||||
* Class QuotationValidate
|
||||
* @package app\adminapi\validate\quotation
|
||||
*/
|
||||
class QuotationValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return QuotationValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:23
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->remove('id', true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return QuotationValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:23
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return QuotationValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:23
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return QuotationValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/11/27 17:23
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
}
|
34
app/common/model/bid/BidBiddingDecision.php
Normal file
34
app/common/model/bid/BidBiddingDecision.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\bid;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 投标决策模型
|
||||
* Class BidBiddingDecision
|
||||
* @package app\common\model\bid
|
||||
*/
|
||||
class BidBiddingDecision extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'bid_bidding_decision';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
|
||||
}
|
34
app/common/model/bid/BidBuyBiddingDocument.php
Normal file
34
app/common/model/bid/BidBuyBiddingDocument.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\bid;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 购买标书模型
|
||||
* Class BidBuyBiddingDocument
|
||||
* @package app\common\model\bid
|
||||
*/
|
||||
class BidBuyBiddingDocument extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'bid_buy_bidding_document';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
|
||||
}
|
34
app/common/model/quotation/Quotation.php
Normal file
34
app/common/model/quotation/Quotation.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\quotation;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 报价单模型
|
||||
* Class Quotation
|
||||
* @package app\common\model\quotation
|
||||
*/
|
||||
class Quotation extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'quotation';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
|
||||
}
|
34
app/common/model/quotation/QuotationDetail.php
Normal file
34
app/common/model/quotation/QuotationDetail.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\quotation;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 报价明细模型
|
||||
* Class QuotationDetail
|
||||
* @package app\common\model\quotation
|
||||
*/
|
||||
class QuotationDetail extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'quotation_detail';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user