update
This commit is contained in:
parent
ab0fe99ac3
commit
a38f1e18ad
@ -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\financial;
|
||||||
|
|
||||||
|
|
||||||
|
use app\adminapi\controller\BaseAdminController;
|
||||||
|
use app\adminapi\lists\financial\FinancialCollectionPlanLists;
|
||||||
|
use app\adminapi\logic\financial\FinancialCollectionPlanLogic;
|
||||||
|
use app\adminapi\validate\financial\FinancialCollectionPlanValidate;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 财务管理--合同收款计划控制器
|
||||||
|
* Class FinancialCollectionPlanController
|
||||||
|
* @package app\adminapi\controller\financial
|
||||||
|
*/
|
||||||
|
class FinancialCollectionPlanController extends BaseAdminController
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 获取财务管理--合同收款计划列表
|
||||||
|
* @return \think\response\Json
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2024/04/13 13:46
|
||||||
|
*/
|
||||||
|
public function lists()
|
||||||
|
{
|
||||||
|
return $this->dataLists(new FinancialCollectionPlanLists());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 添加财务管理--合同收款计划
|
||||||
|
* @return \think\response\Json
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2024/04/13 13:46
|
||||||
|
*/
|
||||||
|
public function add()
|
||||||
|
{
|
||||||
|
$params = (new FinancialCollectionPlanValidate())->post()->goCheck('add');
|
||||||
|
$result = FinancialCollectionPlanLogic::add($params);
|
||||||
|
if (true === $result) {
|
||||||
|
return $this->success('添加成功', [], 1, 1);
|
||||||
|
}
|
||||||
|
return $this->fail(FinancialCollectionPlanLogic::getError());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 编辑财务管理--合同收款计划
|
||||||
|
* @return \think\response\Json
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2024/04/13 13:46
|
||||||
|
*/
|
||||||
|
public function edit()
|
||||||
|
{
|
||||||
|
$params = (new FinancialCollectionPlanValidate())->post()->goCheck('edit');
|
||||||
|
$result = FinancialCollectionPlanLogic::edit($params);
|
||||||
|
if (true === $result) {
|
||||||
|
return $this->success('编辑成功', [], 1, 1);
|
||||||
|
}
|
||||||
|
return $this->fail(FinancialCollectionPlanLogic::getError());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 删除财务管理--合同收款计划
|
||||||
|
* @return \think\response\Json
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2024/04/13 13:46
|
||||||
|
*/
|
||||||
|
public function delete()
|
||||||
|
{
|
||||||
|
$params = (new FinancialCollectionPlanValidate())->post()->goCheck('delete');
|
||||||
|
FinancialCollectionPlanLogic::delete($params);
|
||||||
|
return $this->success('删除成功', [], 1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 获取财务管理--合同收款计划详情
|
||||||
|
* @return \think\response\Json
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2024/04/13 13:46
|
||||||
|
*/
|
||||||
|
public function detail()
|
||||||
|
{
|
||||||
|
$params = (new FinancialCollectionPlanValidate())->goCheck('detail');
|
||||||
|
$result = FinancialCollectionPlanLogic::detail($params);
|
||||||
|
return $this->data($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
106
app/adminapi/lists/financial/FinancialCollectionPlanLists.php
Normal file
106
app/adminapi/lists/financial/FinancialCollectionPlanLists.php
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
<?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\financial;
|
||||||
|
|
||||||
|
|
||||||
|
use app\adminapi\lists\BaseAdminDataLists;
|
||||||
|
use app\common\lists\ListsSearchInterface;
|
||||||
|
use app\common\model\financial\FinancialCollectionPlan;
|
||||||
|
use app\common\model\marketing\MarketingContract;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 财务管理--合同收款计划列表
|
||||||
|
* Class FinancialCollectionPlanLists
|
||||||
|
* @package app\adminapi\listsfinancial
|
||||||
|
*/
|
||||||
|
class FinancialCollectionPlanLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 设置搜索条件
|
||||||
|
* @return \string[][]
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2024/04/13 13:46
|
||||||
|
*/
|
||||||
|
public function setSearch(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'=' => ['contract_id'],
|
||||||
|
'%like%' => ['collection_user'],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 获取财务管理--合同收款计划列表
|
||||||
|
* @return array
|
||||||
|
* @throws \think\db\exception\DataNotFoundException
|
||||||
|
* @throws \think\db\exception\DbException
|
||||||
|
* @throws \think\db\exception\ModelNotFoundException
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2024/04/13 13:46
|
||||||
|
*/
|
||||||
|
public function lists(): array
|
||||||
|
{
|
||||||
|
$params = $this->request->get();
|
||||||
|
$where = [];
|
||||||
|
if (!empty($params['contract_name'])) {
|
||||||
|
$contract_ids = MarketingContract::where('contract_name', 'like', '%' . $params['contract_name'] . '%')->column('id');
|
||||||
|
$where[] = ['contract_id', 'in', $contract_ids];
|
||||||
|
}
|
||||||
|
if (!empty($params['collection_date'])) {
|
||||||
|
$date = explode(',', $params['collection_date']);
|
||||||
|
$where[] = ['collection_date', 'between', [strtotime($date[0] . ' 00:00:00'), strtotime($date[1] . ' 23:59:59')]];
|
||||||
|
}
|
||||||
|
return FinancialCollectionPlan::where($this->searchWhere)->where($where)
|
||||||
|
->field(['id', 'contract_id', 'collection_amount', 'collection_date', 'collection_user', 'remark', 'annex'])
|
||||||
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
|
->order(['id' => 'desc'])
|
||||||
|
->select()->each(function ($data) {
|
||||||
|
$contract = MarketingContract::field('contract_name,contract_type,business_nature,part_a,signed_amount,create_time')->where('id', $data['contract_id'])->findOrEmpty();
|
||||||
|
$data['contract_name'] = $contract?->contract_name;
|
||||||
|
$data['contract_type'] = $contract?->contract_type_text;
|
||||||
|
$data['business_nature'] = $contract?->business_nature_text;
|
||||||
|
$data['signed_amount'] = $contract?->signed_amount;
|
||||||
|
$data['signed_date'] = $contract?->create_time;
|
||||||
|
})
|
||||||
|
->toArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 获取财务管理--合同收款计划数量
|
||||||
|
* @return int
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2024/04/13 13:46
|
||||||
|
*/
|
||||||
|
public function count(): int
|
||||||
|
{
|
||||||
|
$params = $this->request->get();
|
||||||
|
$where = [];
|
||||||
|
if (!empty($params['contract_name'])) {
|
||||||
|
$contract_ids = MarketingContract::where('contract_name', 'like', '%' . $params['contract_name'] . '%')->column('id');
|
||||||
|
$where[] = ['contract_id', 'in', $contract_ids];
|
||||||
|
}
|
||||||
|
if (!empty($params['collection_date'])) {
|
||||||
|
$date = explode(',', $params['collection_date']);
|
||||||
|
$where[] = ['collection_date', 'between', [strtotime($date[0] . ' 00:00:00'), strtotime($date[1] . ' 23:59:59')]];
|
||||||
|
}
|
||||||
|
return FinancialCollectionPlan::where($this->searchWhere)->where($where)->count();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
134
app/adminapi/logic/financial/FinancialCollectionPlanLogic.php
Normal file
134
app/adminapi/logic/financial/FinancialCollectionPlanLogic.php
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
<?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\financial;
|
||||||
|
|
||||||
|
|
||||||
|
use app\common\logic\BaseLogic;
|
||||||
|
use app\common\model\financial\FinancialCollectionPlan;
|
||||||
|
use app\common\model\financial\FinancialInvoice;
|
||||||
|
use app\common\model\financial\FinancialRefund;
|
||||||
|
use app\common\model\financial\FinancialSettlement;
|
||||||
|
use app\common\model\marketing\MarketingContract;
|
||||||
|
use app\common\model\marketing\MarketingCustom;
|
||||||
|
use think\facade\Db;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 财务管理--合同收款计划逻辑
|
||||||
|
* Class FinancialCollectionPlanLogic
|
||||||
|
* @package app\adminapi\logic\financial
|
||||||
|
*/
|
||||||
|
class FinancialCollectionPlanLogic extends BaseLogic
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 添加财务管理--合同收款计划
|
||||||
|
* @param array $params
|
||||||
|
* @return bool
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2024/04/13 13:46
|
||||||
|
*/
|
||||||
|
public static function add(array $params): bool
|
||||||
|
{
|
||||||
|
Db::startTrans();
|
||||||
|
try {
|
||||||
|
FinancialCollectionPlan::create([
|
||||||
|
'contract_id' => $params['contract_id'],
|
||||||
|
'collection_amount' => $params['collection_amount'],
|
||||||
|
'collection_date' => !empty($params['collection_date']) ? strtotime($params['collection_date']) : 0,
|
||||||
|
'collection_user' => $params['collection_user'],
|
||||||
|
'remark' => $params['remark'] ?? '',
|
||||||
|
'annex' => $params['annex'] ? json_encode($params['annex']) : null,
|
||||||
|
]);
|
||||||
|
Db::commit();
|
||||||
|
return true;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
Db::rollback();
|
||||||
|
self::setError($e->getMessage());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 编辑财务管理--合同收款计划
|
||||||
|
* @param array $params
|
||||||
|
* @return bool
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2024/04/13 13:46
|
||||||
|
*/
|
||||||
|
public static function edit(array $params): bool
|
||||||
|
{
|
||||||
|
Db::startTrans();
|
||||||
|
try {
|
||||||
|
FinancialCollectionPlan::where('id', $params['id'])->update([
|
||||||
|
'contract_id' => $params['contract_id'],
|
||||||
|
'collection_amount' => $params['collection_amount'],
|
||||||
|
'collection_date' => !empty($params['collection_date']) ? strtotime($params['collection_date']) : 0,
|
||||||
|
'collection_user' => $params['collection_user'],
|
||||||
|
'remark' => $params['remark'] ?? '',
|
||||||
|
'annex' => $params['annex'] ? json_encode($params['annex']) : null,
|
||||||
|
]);
|
||||||
|
Db::commit();
|
||||||
|
return true;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
Db::rollback();
|
||||||
|
self::setError($e->getMessage());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 删除财务管理--合同收款计划
|
||||||
|
* @param array $params
|
||||||
|
* @return bool
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2024/04/13 13:46
|
||||||
|
*/
|
||||||
|
public static function delete(array $params): bool
|
||||||
|
{
|
||||||
|
return FinancialCollectionPlan::destroy($params['id']);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 获取财务管理--合同收款计划详情
|
||||||
|
* @param $params
|
||||||
|
* @return array
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2024/04/13 13:46
|
||||||
|
*/
|
||||||
|
public static function detail($params): array
|
||||||
|
{
|
||||||
|
$data = FinancialCollectionPlan::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
|
||||||
|
$contract = MarketingContract::field('contract_name,contract_type,business_nature,part_a,signed_amount,create_time')->where('id', $data['contract_id'])->findOrEmpty();
|
||||||
|
$custom = MarketingCustom::field('name')->where('id', $contract['part_a'])->findOrEmpty();
|
||||||
|
$data['contract_name'] = $contract?->contract_name;
|
||||||
|
$data['contract_type'] = $contract?->contract_type_text;
|
||||||
|
$data['business_nature'] = $contract?->business_nature_text;
|
||||||
|
$data['signed_amount'] = $contract?->signed_amount;
|
||||||
|
$data['signed_date'] = $contract?->create_time;
|
||||||
|
$data['part_a_name'] = $custom?->name;
|
||||||
|
//开票金额
|
||||||
|
$data['total_invoice_amount'] = FinancialInvoice::where('contract_id', $data['contract_id'])->sum('apply_amount');
|
||||||
|
//到账金额
|
||||||
|
$data['total_refund_amount'] = FinancialRefund::where('contract_id', $data['contract_id'])->sum('amount');
|
||||||
|
//结算金额
|
||||||
|
$data['total_settlement_amount'] = FinancialSettlement::where('contract_id', $data['contract_id'])->sum('amount');
|
||||||
|
return $data->toArray();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,119 @@
|
|||||||
|
<?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\financial;
|
||||||
|
|
||||||
|
|
||||||
|
use app\common\model\financial\FinancialCollectionPlan;
|
||||||
|
use app\common\model\marketing\MarketingContract;
|
||||||
|
use app\common\validate\BaseValidate;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 财务管理--合同收款计划验证器
|
||||||
|
* Class FinancialCollectionPlanValidate
|
||||||
|
* @package app\adminapi\validate\financial
|
||||||
|
*/
|
||||||
|
class FinancialCollectionPlanValidate extends BaseValidate
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置校验规则
|
||||||
|
* @var string[]
|
||||||
|
*/
|
||||||
|
protected $rule = [
|
||||||
|
'id' => 'require|checkData',
|
||||||
|
'contract_id' => 'require|checkContract',
|
||||||
|
'collection_amount' => 'require|float|egt:0',
|
||||||
|
'collection_date' => 'require|dateFormat:Y-m-d',
|
||||||
|
'collection_user' => 'require',
|
||||||
|
'annex' => 'checkAnnex',
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 参数描述
|
||||||
|
* @var string[]
|
||||||
|
*/
|
||||||
|
protected $field = [
|
||||||
|
'id' => 'id',
|
||||||
|
'contract_id' => '合同id',
|
||||||
|
'collection_amount' => '计划收款金额',
|
||||||
|
'collection_date' => '计划日期',
|
||||||
|
'collection_user' => '计划人',
|
||||||
|
'remark' => '备注',
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 添加场景
|
||||||
|
* @return FinancialCollectionPlanValidate
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2024/04/13 13:46
|
||||||
|
*/
|
||||||
|
public function sceneAdd()
|
||||||
|
{
|
||||||
|
return $this->only(['contract_id', 'collection_amount', 'collection_date', 'collection_user', 'remark', 'annex']);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 编辑场景
|
||||||
|
* @return FinancialCollectionPlanValidate
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2024/04/13 13:46
|
||||||
|
*/
|
||||||
|
public function sceneEdit()
|
||||||
|
{
|
||||||
|
return $this->only(['id', 'contract_id', 'collection_amount', 'collection_date', 'collection_user', 'remark', 'annex']);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 删除场景
|
||||||
|
* @return FinancialCollectionPlanValidate
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2024/04/13 13:46
|
||||||
|
*/
|
||||||
|
public function sceneDelete()
|
||||||
|
{
|
||||||
|
return $this->only(['id'])->remove('id', 'checkData');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 详情场景
|
||||||
|
* @return FinancialCollectionPlanValidate
|
||||||
|
* @author likeadmin
|
||||||
|
* @date 2024/04/13 13:46
|
||||||
|
*/
|
||||||
|
public function sceneDetail()
|
||||||
|
{
|
||||||
|
return $this->only(['id']);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function checkData($value): bool|string
|
||||||
|
{
|
||||||
|
$data = FinancialCollectionPlan::where('id', $value)->findOrEmpty();
|
||||||
|
return $data->isEmpty() ? '数据不存在' : true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function checkContract($value): bool|string
|
||||||
|
{
|
||||||
|
$data = MarketingContract::where('id', $value)->findOrEmpty();
|
||||||
|
return $data->isEmpty() ? '合同数据不存在' : true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
38
app/common/model/financial/FinancialCollectionPlan.php
Normal file
38
app/common/model/financial/FinancialCollectionPlan.php
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<?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\financial;
|
||||||
|
|
||||||
|
|
||||||
|
use app\common\model\BaseModel;
|
||||||
|
use think\model\concern\SoftDelete;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 财务管理--合同收款计划模型
|
||||||
|
* Class FinancialCollectionPlan
|
||||||
|
* @package app\common\model\financial
|
||||||
|
*/
|
||||||
|
class FinancialCollectionPlan extends BaseModel
|
||||||
|
{
|
||||||
|
use SoftDelete;
|
||||||
|
|
||||||
|
protected $name = 'financial_collection_plan';
|
||||||
|
protected $deleteTime = 'delete_time';
|
||||||
|
|
||||||
|
public function getCollectionDateAttr($value): string
|
||||||
|
{
|
||||||
|
return !empty($value) ? date('Y-m-d', $value) : '';
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user