This commit is contained in:
zmj 2024-03-29 15:18:24 +08:00
parent 8817db6abe
commit ff1fe3a30b
55 changed files with 1612 additions and 1500 deletions

View File

@ -1,108 +0,0 @@
<?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\FinancialExpenseReimbursementLists;
use app\adminapi\logic\financial\FinancialExpenseReimbursementLogic;
use app\adminapi\validate\financial\FinancialExpenseReimbursementValidate;
/**
* 财务管理--费用报销单控制器
* Class FinancialExpenseReimbursementController
* @package app\adminapi\controller\financial
*/
class FinancialExpenseReimbursementController extends BaseAdminController
{
/**
* @notes 获取财务管理--费用报销单列表
* @return \think\response\Json
* @author likeadmin
* @date 2024/03/28 14:45
*/
public function lists()
{
return $this->dataLists(new FinancialExpenseReimbursementLists());
}
/**
* @notes 添加财务管理--费用报销单
* @return \think\response\Json
* @author likeadmin
* @date 2024/03/28 14:45
*/
public function add()
{
$params = (new FinancialExpenseReimbursementValidate())->post()->goCheck('add');
$result = FinancialExpenseReimbursementLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(FinancialExpenseReimbursementLogic::getError());
}
/**
* @notes 编辑财务管理--费用报销单
* @return \think\response\Json
* @author likeadmin
* @date 2024/03/28 14:45
*/
public function edit()
{
$params = (new FinancialExpenseReimbursementValidate())->post()->goCheck('edit');
$result = FinancialExpenseReimbursementLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(FinancialExpenseReimbursementLogic::getError());
}
/**
* @notes 删除财务管理--费用报销单
* @return \think\response\Json
* @author likeadmin
* @date 2024/03/28 14:45
*/
public function delete()
{
$params = (new FinancialExpenseReimbursementValidate())->post()->goCheck('delete');
FinancialExpenseReimbursementLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取财务管理--费用报销单详情
* @return \think\response\Json
* @author likeadmin
* @date 2024/03/28 14:45
*/
public function detail()
{
$params = (new FinancialExpenseReimbursementValidate())->goCheck('detail');
$result = FinancialExpenseReimbursementLogic::detail($params);
return $this->data($result);
}
}

View File

@ -1,108 +0,0 @@
<?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\FinancialTravelReimbursementLists;
use app\adminapi\logic\financial\FinancialTravelReimbursementLogic;
use app\adminapi\validate\financial\FinancialTravelReimbursementValidate;
/**
* 财务管理--差旅费报销单控制器
* Class FinancialTravelReimbursementController
* @package app\adminapi\controller\financial
*/
class FinancialTravelReimbursementController extends BaseAdminController
{
/**
* @notes 获取财务管理--差旅费报销单列表
* @return \think\response\Json
* @author likeadmin
* @date 2024/03/28 14:45
*/
public function lists()
{
return $this->dataLists(new FinancialTravelReimbursementLists());
}
/**
* @notes 添加财务管理--差旅费报销单
* @return \think\response\Json
* @author likeadmin
* @date 2024/03/28 14:45
*/
public function add()
{
$params = (new FinancialTravelReimbursementValidate())->post()->goCheck('add');
$result = FinancialTravelReimbursementLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(FinancialTravelReimbursementLogic::getError());
}
/**
* @notes 编辑财务管理--差旅费报销单
* @return \think\response\Json
* @author likeadmin
* @date 2024/03/28 14:45
*/
public function edit()
{
$params = (new FinancialTravelReimbursementValidate())->post()->goCheck('edit');
$result = FinancialTravelReimbursementLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(FinancialTravelReimbursementLogic::getError());
}
/**
* @notes 删除财务管理--差旅费报销单
* @return \think\response\Json
* @author likeadmin
* @date 2024/03/28 14:45
*/
public function delete()
{
$params = (new FinancialTravelReimbursementValidate())->post()->goCheck('delete');
FinancialTravelReimbursementLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取财务管理--差旅费报销单详情
* @return \think\response\Json
* @author likeadmin
* @date 2024/03/28 14:45
*/
public function detail()
{
$params = (new FinancialTravelReimbursementValidate())->goCheck('detail');
$result = FinancialTravelReimbursementLogic::detail($params);
return $this->data($result);
}
}

View File

@ -1,78 +0,0 @@
<?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\model\financial\FinancialExpenseReimbursement;
use app\common\lists\ListsSearchInterface;
/**
* 财务管理--费用报销单列表
* Class FinancialExpenseReimbursementLists
* @package app\adminapi\listsfinancial
*/
class FinancialExpenseReimbursementLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 设置搜索条件
* @return \string[][]
* @author likeadmin
* @date 2024/03/28 14:45
*/
public function setSearch(): array
{
return [
'=' => ['contract_id', 'fee_application_id', 'pay_type'],
'%like%' => ['theme', 'code', 'create_user'],
];
}
/**
* @notes 获取财务管理--费用报销单列表
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author likeadmin
* @date 2024/03/28 14:45
*/
public function lists(): array
{
return FinancialExpenseReimbursement::where($this->searchWhere)
->field(['id', 'contract_id', 'fee_application_id', 'theme', 'code', 'bill_num', 'pay_type', 'content', 'create_user', 'create_time'])
->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->select()
->toArray();
}
/**
* @notes 获取财务管理--费用报销单数量
* @return int
* @author likeadmin
* @date 2024/03/28 14:45
*/
public function count(): int
{
return FinancialExpenseReimbursement::where($this->searchWhere)->count();
}
}

View File

@ -1,77 +0,0 @@
<?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\model\financial\FinancialTravelReimbursement;
use app\common\lists\ListsSearchInterface;
/**
* 财务管理--差旅费报销单列表
* Class FinancialTravelReimbursementLists
* @package app\adminapi\listsfinancial
*/
class FinancialTravelReimbursementLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 设置搜索条件
* @return \string[][]
* @author likeadmin
* @date 2024/03/28 14:45
*/
public function setSearch(): array
{
return [
'=' => ['code', 'approve_dept', 'cost_type', 'pay_type', 'create_user'],
];
}
/**
* @notes 获取财务管理--差旅费报销单列表
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author likeadmin
* @date 2024/03/28 14:45
*/
public function lists(): array
{
return FinancialTravelReimbursement::where($this->searchWhere)
->field(['id', 'code', 'approve_dept', 'cost_type', 'pay_type', 'tax_deductible_amount', 'bill_num', 'fee_application_id', 'content', 'create_user', 'create_time'])
->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->select()
->toArray();
}
/**
* @notes 获取财务管理--差旅费报销单数量
* @return int
* @author likeadmin
* @date 2024/03/28 14:45
*/
public function count(): int
{
return FinancialTravelReimbursement::where($this->searchWhere)->count();
}
}

View File

@ -1,124 +0,0 @@
<?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\model\financial\FinancialExpenseReimbursement;
use app\common\logic\BaseLogic;
use think\facade\Db;
/**
* 财务管理--费用报销单逻辑
* Class FinancialExpenseReimbursementLogic
* @package app\adminapi\logic\financial
*/
class FinancialExpenseReimbursementLogic extends BaseLogic
{
/**
* @notes 添加财务管理--费用报销单
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/03/28 14:45
*/
public static function add(array $params): bool
{
Db::startTrans();
try {
FinancialExpenseReimbursement::create([
'contract_id' => $params['contract_id'],
'fee_application_id' => $params['fee_application_id'],
'theme' => $params['theme'],
'code' => $params['code'],
'bill_num' => $params['bill_num'],
'pay_type' => $params['pay_type'],
'content' => $params['content'],
'annex' => $params['annex'],
'create_user' => $params['create_user'],
'create_time' => $params['create_time']
]);
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/03/28 14:45
*/
public static function edit(array $params): bool
{
Db::startTrans();
try {
FinancialExpenseReimbursement::where('id', $params['id'])->update([
'contract_id' => $params['contract_id'],
'fee_application_id' => $params['fee_application_id'],
'theme' => $params['theme'],
'code' => $params['code'],
'bill_num' => $params['bill_num'],
'pay_type' => $params['pay_type'],
'content' => $params['content'],
'annex' => $params['annex'],
'create_user' => $params['create_user'],
'create_time' => $params['create_time']
]);
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/03/28 14:45
*/
public static function delete(array $params): bool
{
return FinancialExpenseReimbursement::destroy($params['id']);
}
/**
* @notes 获取财务管理--费用报销单详情
* @param $params
* @return array
* @author likeadmin
* @date 2024/03/28 14:45
*/
public static function detail($params): array
{
return FinancialExpenseReimbursement::findOrEmpty($params['id'])->toArray();
}
}

View File

@ -1,124 +0,0 @@
<?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\model\financial\FinancialTravelReimbursement;
use app\common\logic\BaseLogic;
use think\facade\Db;
/**
* 财务管理--差旅费报销单逻辑
* Class FinancialTravelReimbursementLogic
* @package app\adminapi\logic\financial
*/
class FinancialTravelReimbursementLogic extends BaseLogic
{
/**
* @notes 添加财务管理--差旅费报销单
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/03/28 14:45
*/
public static function add(array $params): bool
{
Db::startTrans();
try {
FinancialTravelReimbursement::create([
'code' => $params['code'],
'approve_dept' => $params['approve_dept'],
'cost_type' => $params['cost_type'],
'pay_type' => $params['pay_type'],
'tax_deductible_amount' => $params['tax_deductible_amount'],
'bill_num' => $params['bill_num'],
'fee_application_id' => $params['fee_application_id'],
'content' => $params['content'],
'create_user' => $params['create_user'],
'create_time' => $params['create_time']
]);
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/03/28 14:45
*/
public static function edit(array $params): bool
{
Db::startTrans();
try {
FinancialTravelReimbursement::where('id', $params['id'])->update([
'code' => $params['code'],
'approve_dept' => $params['approve_dept'],
'cost_type' => $params['cost_type'],
'pay_type' => $params['pay_type'],
'tax_deductible_amount' => $params['tax_deductible_amount'],
'bill_num' => $params['bill_num'],
'fee_application_id' => $params['fee_application_id'],
'content' => $params['content'],
'create_user' => $params['create_user'],
'create_time' => $params['create_time']
]);
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/03/28 14:45
*/
public static function delete(array $params): bool
{
return FinancialTravelReimbursement::destroy($params['id']);
}
/**
* @notes 获取财务管理--差旅费报销单详情
* @param $params
* @return array
* @author likeadmin
* @date 2024/03/28 14:45
*/
public static function detail($params): array
{
return FinancialTravelReimbursement::findOrEmpty($params['id'])->toArray();
}
}

View File

@ -1,112 +0,0 @@
<?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\validate\BaseValidate;
/**
* 财务管理--费用报销单验证器
* Class FinancialExpenseReimbursementValidate
* @package app\adminapi\validate\financial
*/
class FinancialExpenseReimbursementValidate extends BaseValidate
{
/**
* 设置校验规则
* @var string[]
*/
protected $rule = [
'id' => 'require',
'contract_id' => 'require',
'fee_application_id' => 'require',
'theme' => 'require',
'code' => 'require',
'bill_num' => 'require',
'pay_type' => 'require',
'content' => 'require',
'create_user' => 'require',
'create_time' => 'require',
];
/**
* 参数描述
* @var string[]
*/
protected $field = [
'id' => 'id',
'contract_id' => '合同id',
'fee_application_id' => '费用申请id',
'theme' => '单据主题',
'code' => '单据编号',
'bill_num' => '单据张数',
'pay_type' => '支付方式',
'content' => '事由',
'create_user' => '申请人员',
'create_time' => '报销日期',
];
/**
* @notes 添加场景
* @return FinancialExpenseReimbursementValidate
* @author likeadmin
* @date 2024/03/28 14:45
*/
public function sceneAdd()
{
return $this->only(['contract_id','fee_application_id','theme','code','bill_num','pay_type','content','create_user','create_time']);
}
/**
* @notes 编辑场景
* @return FinancialExpenseReimbursementValidate
* @author likeadmin
* @date 2024/03/28 14:45
*/
public function sceneEdit()
{
return $this->only(['id','contract_id','fee_application_id','theme','code','bill_num','pay_type','content','create_user','create_time']);
}
/**
* @notes 删除场景
* @return FinancialExpenseReimbursementValidate
* @author likeadmin
* @date 2024/03/28 14:45
*/
public function sceneDelete()
{
return $this->only(['id']);
}
/**
* @notes 详情场景
* @return FinancialExpenseReimbursementValidate
* @author likeadmin
* @date 2024/03/28 14:45
*/
public function sceneDetail()
{
return $this->only(['id']);
}
}

View File

@ -1,114 +0,0 @@
<?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\validate\BaseValidate;
/**
* 财务管理--差旅费报销单验证器
* Class FinancialTravelReimbursementValidate
* @package app\adminapi\validate\financial
*/
class FinancialTravelReimbursementValidate extends BaseValidate
{
/**
* 设置校验规则
* @var string[]
*/
protected $rule = [
'id' => 'require',
'code' => 'require',
'approve_dept' => 'require',
'cost_type' => 'require',
'pay_type' => 'require',
'tax_deductible_amount' => 'require',
'bill_num' => 'require',
'fee_application_id' => 'require',
'content' => 'require',
'create_user' => 'require',
'create_time' => 'require',
];
/**
* 参数描述
* @var string[]
*/
protected $field = [
'id' => 'id',
'code' => '单据编号',
'approve_dept' => '审批部门',
'cost_type' => '费用类别',
'pay_type' => '支付方式',
'tax_deductible_amount' => '可抵扣税额',
'bill_num' => '附单据张数',
'fee_application_id' => '关联费用申请',
'content' => '事由',
'create_user' => '申请人',
'create_time' => '申请日期',
];
/**
* @notes 添加场景
* @return FinancialTravelReimbursementValidate
* @author likeadmin
* @date 2024/03/28 14:45
*/
public function sceneAdd()
{
return $this->only(['code','approve_dept','cost_type','pay_type','tax_deductible_amount','bill_num','fee_application_id','content','create_user','create_time']);
}
/**
* @notes 编辑场景
* @return FinancialTravelReimbursementValidate
* @author likeadmin
* @date 2024/03/28 14:45
*/
public function sceneEdit()
{
return $this->only(['id','code','approve_dept','cost_type','pay_type','tax_deductible_amount','bill_num','fee_application_id','content','create_user','create_time']);
}
/**
* @notes 删除场景
* @return FinancialTravelReimbursementValidate
* @author likeadmin
* @date 2024/03/28 14:45
*/
public function sceneDelete()
{
return $this->only(['id']);
}
/**
* @notes 详情场景
* @return FinancialTravelReimbursementValidate
* @author likeadmin
* @date 2024/03/28 14:45
*/
public function sceneDetail()
{
return $this->only(['id']);
}
}

View File

@ -1,34 +0,0 @@
<?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 FinancialExpenseReimbursement
* @package app\common\model\financial
*/
class FinancialExpenseReimbursement extends BaseModel
{
use SoftDelete;
protected $name = 'financial_expense_reimbursement';
protected $deleteTime = 'delete_time';
}

View File

@ -1,34 +0,0 @@
<?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 FinancialTravelReimbursement
* @package app\common\model\financial
*/
class FinancialTravelReimbursement extends BaseModel
{
use SoftDelete;
protected $name = 'financial_travel_reimbursement';
protected $deleteTime = 'delete_time';
}

View File

@ -1,13 +0,0 @@
INSERT INTO `gc_system_menu`(`pid`, `type`, `name`, `icon`, `sort`, `perms`, `paths`, `component`, `selected`, `params`, `is_cache`, `is_show`, `is_disable`, `create_time`, `update_time`)
VALUES (1551, 'C', '差旅费报销单', '', 1, 'financial.financial_travel_reimbursement/lists', 'financial_travel_reimbursement', 'financial_travel_reimbursement/index', '', '', 0, 1, 0, 1711608323, 1711608323);
SELECT @pid := LAST_INSERT_ID();
INSERT INTO `gc_system_menu`(`pid`, `type`, `name`, `icon`, `sort`, `perms`, `paths`, `component`, `selected`, `params`, `is_cache`, `is_show`, `is_disable`, `create_time`, `update_time`)
VALUES (@pid, 'A', '添加', '', 1, 'financial.financial_travel_reimbursement/add', '', '', '', '', 0, 1, 0, 1711608323, 1711608323);
INSERT INTO `gc_system_menu`(`pid`, `type`, `name`, `icon`, `sort`, `perms`, `paths`, `component`, `selected`, `params`, `is_cache`, `is_show`, `is_disable`, `create_time`, `update_time`)
VALUES (@pid, 'A', '编辑', '', 1, 'financial.financial_travel_reimbursement/edit', '', '', '', '', 0, 1, 0, 1711608323, 1711608323);
INSERT INTO `gc_system_menu`(`pid`, `type`, `name`, `icon`, `sort`, `perms`, `paths`, `component`, `selected`, `params`, `is_cache`, `is_show`, `is_disable`, `create_time`, `update_time`)
VALUES (@pid, 'A', '删除', '', 1, 'financial.financial_travel_reimbursement/delete', '', '', '', '', 0, 1, 0, 1711608323, 1711608323);

View File

@ -1,26 +0,0 @@
import request from '@/utils/request'
// 财务管理--费用报销单列表
export function apiFinancialExpenseReimbursementLists(params: any) {
return request.get({ url: '/financial.financial_expense_reimbursement/lists', params })
}
// 添加财务管理--费用报销单
export function apiFinancialExpenseReimbursementAdd(params: any) {
return request.post({ url: '/financial.financial_expense_reimbursement/add', params })
}
// 编辑财务管理--费用报销单
export function apiFinancialExpenseReimbursementEdit(params: any) {
return request.post({ url: '/financial.financial_expense_reimbursement/edit', params })
}
// 删除财务管理--费用报销单
export function apiFinancialExpenseReimbursementDelete(params: any) {
return request.post({ url: '/financial.financial_expense_reimbursement/delete', params })
}
// 财务管理--费用报销单详情
export function apiFinancialExpenseReimbursementDetail(params: any) {
return request.get({ url: '/financial.financial_expense_reimbursement/detail', params })
}

View File

@ -1,26 +0,0 @@
import request from '@/utils/request'
// 财务管理--差旅费报销单列表
export function apiFinancialTravelReimbursementLists(params: any) {
return request.get({ url: '/financial.financial_travel_reimbursement/lists', params })
}
// 添加财务管理--差旅费报销单
export function apiFinancialTravelReimbursementAdd(params: any) {
return request.post({ url: '/financial.financial_travel_reimbursement/add', params })
}
// 编辑财务管理--差旅费报销单
export function apiFinancialTravelReimbursementEdit(params: any) {
return request.post({ url: '/financial.financial_travel_reimbursement/edit', params })
}
// 删除财务管理--差旅费报销单
export function apiFinancialTravelReimbursementDelete(params: any) {
return request.post({ url: '/financial.financial_travel_reimbursement/delete', params })
}
// 财务管理--差旅费报销单详情
export function apiFinancialTravelReimbursementDetail(params: any) {
return request.get({ url: '/financial.financial_travel_reimbursement/detail', params })
}

View File

@ -1,185 +0,0 @@
<template>
<div class="edit-popup">
<popup
ref="popupRef"
:title="popupTitle"
:async="true"
width="550px"
@confirm="handleSubmit"
@close="handleClose"
>
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
<el-form-item label="合同id" prop="contract_id">
<el-input v-model="formData.contract_id" clearable placeholder="请输入合同id" />
</el-form-item>
<el-form-item label="费用申请id" prop="fee_application_id">
<el-input v-model="formData.fee_application_id" clearable placeholder="请输入费用申请id" />
</el-form-item>
<el-form-item label="单据主题" prop="theme">
<el-input v-model="formData.theme" clearable placeholder="请输入单据主题" />
</el-form-item>
<el-form-item label="单据编号" prop="code">
<el-input v-model="formData.code" clearable placeholder="请输入单据编号" />
</el-form-item>
<el-form-item label="单据张数" prop="bill_num">
<el-input v-model="formData.bill_num" clearable placeholder="请输入单据张数" />
</el-form-item>
<el-form-item label="支付方式" prop="pay_type">
<el-input v-model="formData.pay_type" clearable placeholder="请输入支付方式" />
</el-form-item>
<el-form-item label="事由" prop="content">
<el-input v-model="formData.content" clearable placeholder="请输入事由" />
</el-form-item>
<el-form-item label="附件" prop="annex">
<el-input v-model="formData.annex" clearable placeholder="请输入附件" />
</el-form-item>
<el-form-item label="申请人员" prop="create_user">
<el-input v-model="formData.create_user" clearable placeholder="请输入申请人员" />
</el-form-item>
<el-form-item label="报销日期" prop="create_time">
<el-input v-model="formData.create_time" clearable placeholder="请输入报销日期" />
</el-form-item>
</el-form>
</popup>
</div>
</template>
<script lang="ts" setup name="financialExpenseReimbursementEdit">
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import { apiFinancialExpenseReimbursementAdd, apiFinancialExpenseReimbursementEdit, apiFinancialExpenseReimbursementDetail } from '@/api/financial_expense_reimbursement'
import { timeFormat } from '@/utils/util'
import type { PropType } from 'vue'
defineProps({
dictData: {
type: Object as PropType<Record<string, any[]>>,
default: () => ({})
}
})
const emit = defineEmits(['success', 'close'])
const formRef = shallowRef<FormInstance>()
const popupRef = shallowRef<InstanceType<typeof Popup>>()
const mode = ref('add')
//
const popupTitle = computed(() => {
return mode.value == 'edit' ? '编辑财务管理--费用报销单' : '新增财务管理--费用报销单'
})
//
const formData = reactive({
id: '',
contract_id: '',
fee_application_id: '',
theme: '',
code: '',
bill_num: '',
pay_type: '',
content: '',
annex: '',
create_user: '',
create_time: '',
})
//
const formRules = reactive<any>({
contract_id: [{
required: true,
message: '请输入合同id',
trigger: ['blur']
}],
fee_application_id: [{
required: true,
message: '请输入费用申请id',
trigger: ['blur']
}],
theme: [{
required: true,
message: '请输入单据主题',
trigger: ['blur']
}],
code: [{
required: true,
message: '请输入单据编号',
trigger: ['blur']
}],
bill_num: [{
required: true,
message: '请输入单据张数',
trigger: ['blur']
}],
pay_type: [{
required: true,
message: '请输入支付方式',
trigger: ['blur']
}],
content: [{
required: true,
message: '请输入事由',
trigger: ['blur']
}],
create_user: [{
required: true,
message: '请输入申请人员',
trigger: ['blur']
}],
create_time: [{
required: true,
message: '请输入报销日期',
trigger: ['blur']
}]
})
//
const setFormData = async (data: Record<any, any>) => {
for (const key in formData) {
if (data[key] != null && data[key] != undefined) {
//@ts-ignore
formData[key] = data[key]
}
}
}
const getDetail = async (row: Record<string, any>) => {
const data = await apiFinancialExpenseReimbursementDetail({
id: row.id
})
setFormData(data)
}
//
const handleSubmit = async () => {
await formRef.value?.validate()
const data = { ...formData, }
mode.value == 'edit'
? await apiFinancialExpenseReimbursementEdit(data)
: await apiFinancialExpenseReimbursementAdd(data)
popupRef.value?.close()
emit('success')
}
//
const open = (type = 'add') => {
mode.value = type
popupRef.value?.open()
}
//
const handleClose = () => {
emit('close')
}
defineExpose({
open,
setFormData,
getDetail
})
</script>

View File

@ -1,153 +0,0 @@
<template>
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form
class="mb-[-16px]"
:model="queryParams"
inline
>
<el-form-item label="合同id" prop="contract_id">
<el-input class="w-[280px]" v-model="queryParams.contract_id" clearable placeholder="请输入合同id" />
</el-form-item>
<el-form-item label="费用申请id" prop="fee_application_id">
<el-input class="w-[280px]" v-model="queryParams.fee_application_id" clearable placeholder="请输入费用申请id" />
</el-form-item>
<el-form-item label="单据主题" prop="theme">
<el-input class="w-[280px]" v-model="queryParams.theme" clearable placeholder="请输入单据主题" />
</el-form-item>
<el-form-item label="单据编号" prop="code">
<el-input class="w-[280px]" v-model="queryParams.code" clearable placeholder="请输入单据编号" />
</el-form-item>
<el-form-item label="支付方式" prop="pay_type">
<el-input class="w-[280px]" v-model="queryParams.pay_type" clearable placeholder="请输入支付方式" />
</el-form-item>
<el-form-item label="申请人员" prop="create_user">
<el-input class="w-[280px]" v-model="queryParams.create_user" clearable placeholder="请输入申请人员" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="resetPage">查询</el-button>
<el-button @click="resetParams">重置</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
<el-button v-perms="['financial.financial_expense_reimbursement/add']" type="primary" @click="handleAdd">
<template #icon>
<icon name="el-icon-Plus" />
</template>
新增
</el-button>
<el-button
v-perms="['financial.financial_expense_reimbursement/delete']"
:disabled="!selectData.length"
@click="handleDelete(selectData)"
>
删除
</el-button>
<div class="mt-4">
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" />
<el-table-column label="合同id" prop="contract_id" show-overflow-tooltip />
<el-table-column label="费用申请id" prop="fee_application_id" show-overflow-tooltip />
<el-table-column label="单据主题" prop="theme" show-overflow-tooltip />
<el-table-column label="单据编号" prop="code" show-overflow-tooltip />
<el-table-column label="单据张数" prop="bill_num" show-overflow-tooltip />
<el-table-column label="支付方式" prop="pay_type" show-overflow-tooltip />
<el-table-column label="事由" prop="content" show-overflow-tooltip />
<el-table-column label="申请人员" prop="create_user" show-overflow-tooltip />
<el-table-column label="报销日期" prop="create_time" show-overflow-tooltip />
<el-table-column label="操作" width="120" fixed="right">
<template #default="{ row }">
<el-button
v-perms="['financial.financial_expense_reimbursement/edit']"
type="primary"
link
@click="handleEdit(row)"
>
编辑
</el-button>
<el-button
v-perms="['financial.financial_expense_reimbursement/delete']"
type="danger"
link
@click="handleDelete(row.id)"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="flex mt-4 justify-end">
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
</div>
</template>
<script lang="ts" setup name="financialExpenseReimbursementLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiFinancialExpenseReimbursementLists, apiFinancialExpenseReimbursementDelete } from '@/api/financial_expense_reimbursement'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
//
const showEdit = ref(false)
//
const queryParams = reactive({
contract_id: '',
fee_application_id: '',
theme: '',
code: '',
pay_type: '',
create_user: ''
})
//
const selectData = ref<any[]>([])
//
const handleSelectionChange = (val: any[]) => {
selectData.value = val.map(({ id }) => id)
}
//
const { dictData } = useDictData('')
//
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: apiFinancialExpenseReimbursementLists,
params: queryParams
})
//
const handleAdd = async () => {
showEdit.value = true
await nextTick()
editRef.value?.open('add')
}
//
const handleEdit = async (data: any) => {
showEdit.value = true
await nextTick()
editRef.value?.open('edit')
editRef.value?.setFormData(data)
}
//
const handleDelete = async (id: number | any[]) => {
await feedback.confirm('确定要删除?')
await apiFinancialExpenseReimbursementDelete({ id })
getLists()
}
getLists()
</script>

View File

@ -2,4 +2,9 @@ import request from '@/utils/request'
// 人工明细列表
export function buildreportDetaillists(params: any) {
return request.get({ url: '/build.build_report_detail/lists', params })
}
// 某个施工汇报下的人工明细列表
export function apibuild_reportLists(params: any) {
return request.get({ url: '/build.build_report/personDetails', params })
}

View File

@ -0,0 +1,32 @@
import request from '@/utils/request'
// 财务管理--借款单列表
export function apiFinancialBorrowMoneyLists(params: any) {
return request.get({ url: '/financial.financial_borrow_money/lists', params })
}
// 添加财务管理--借款单
export function apiFinancialBorrowMoneyAdd(params: any) {
return request.post({ url: '/financial.financial_borrow_money/add', params })
}
// 编辑财务管理--借款单
export function apiFinancialBorrowMoneyEdit(params: any) {
return request.post({ url: '/financial.financial_borrow_money/edit', params })
}
// 删除财务管理--借款单
export function apiFinancialBorrowMoneyDelete(params: any) {
return request.post({ url: '/financial.financial_borrow_money/delete', params })
}
// 财务管理--借款单详情
export function apiFinancialBorrowMoneyDetail(params: any) {
return request.get({ url: '/financial.financial_borrow_money/detail', params })
}
// 财务管理--借款单列表
export function apiFinancialBorrowMoneySearch(params: any) {
return request.get({ url: '/financial.financial_borrow_money/datas', params })
}

View File

@ -0,0 +1,26 @@
import request from '@/utils/request'
// 财务管理--还款单列表
export function apiFinancialRepaymentLists(params: any) {
return request.get({ url: '/financial.financial_repayment/lists', params })
}
// 添加财务管理--还款单
export function apiFinancialRepaymentAdd(params: any) {
return request.post({ url: '/financial.financial_repayment/add', params })
}
// 编辑财务管理--还款单
export function apiFinancialRepaymentEdit(params: any) {
return request.post({ url: '/financial.financial_repayment/edit', params })
}
// 删除财务管理--还款单
export function apiFinancialRepaymentDelete(params: any) {
return request.post({ url: '/financial.financial_repayment/delete', params })
}
// 财务管理--还款单详情
export function apiFinancialRepaymentDetail(params: any) {
return request.get({ url: '/financial.financial_repayment/detail', params })
}

View File

@ -0,0 +1,35 @@
import request from '@/utils/request'
// 财务管理--用款申请单列表
export function apiFinancialUsingFundsLists(params: any) {
return request.get({ url: '/financial.financial_using_funds/lists', params })
}
// 添加财务管理--用款申请单
export function apiFinancialUsingFundsAdd(params: any) {
return request.post({ url: '/financial.financial_using_funds/add', params })
}
// 编辑财务管理--用款申请单
export function apiFinancialUsingFundsEdit(params: any) {
return request.post({ url: '/financial.financial_using_funds/edit', params })
}
// 删除财务管理--用款申请单
export function apiFinancialUsingFundsDelete(params: any) {
return request.post({ url: '/financial.financial_using_funds/delete', params })
}
// 财务管理--用款申请单详情
export function apiFinancialUsingFundsDetail(params: any) {
return request.get({ url: '/financial.financial_using_funds/detail', params })
}
// 财务管理--用款申请单列表
export function apiFinancialUsingFundsDetailLists(params: any) {
return request.get({ url: '/financial.financial_using_funds_detail/lists', params })
}
// 删除财务管理--用款申请单
export function apiFinancialUsingFundsDetailDelete(params: any) {
return request.post({ url: '/financial.financial_using_funds_detail/delete', params })
}

BIN
src/assets/images/CWGL.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
src/assets/images/GCJL.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
src/assets/images/SGGL.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
src/assets/images/XMGL.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
src/assets/images/XMZX.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
src/assets/images/XT.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
src/assets/images/ZJZX.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -22,19 +22,6 @@
<el-table-column label="工序步骤号" prop="process_step_no" show-overflow-tooltip />
<el-table-column label="工序步骤" prop="process_step" show-overflow-tooltip />
<el-table-column label="质量控制点" prop="quality_control_points" show-overflow-tooltip />
<el-table-column label="图例说明" prop="file" show-overflow-tooltip>
<template #default="{ row }">
<div v-if="row.file && row.file.length > 0">
<div v-for="(item, i) in row.file " :key='i'>
<el-link :href="item" target="_blank">文件{{ i + 1 }}查看</el-link>
</div>
</div>
<div v-else>
暂无文件
</div>
</template>
</el-table-column>
</el-table>
</div>

View File

@ -640,5 +640,39 @@ export const financial_fee_application: Iconfig = {
],
};
import { apiFinancialBorrowMoneyLists } from '@/api/financial_borrow_money'
export const financial_borrow_money: Iconfig = {
fetchFn: apiFinancialBorrowMoneyLists,
dictData:"cost_type,financial_pay_type",
serchList: [
{
label: "单据编号",
value: "code",
},
{
label: "费用类别",
value: "cost_type",
select:'cost_type'
},
{
label: "支付方式",
value: "pay_type",
select:'financial_pay_type'
},
],
tableList: [
{ code: "单据编号" },
{ dept_name: "所在部门" },
{ cost_type_text: "费用类别" },
{ pay_type_text: "支付方式" },
{ amount: "金额" },
{ content: "事由" },
{ create_user: "申请人" },
{ create_time: "申请日期" },
],
};

View File

@ -10,9 +10,7 @@
<el-button @click="handleDelete(row)">-</el-button>
</template>
</el-table-column>
<slot></slot>
<el-table-column :label="item.label" v-for="(item, index) in config.tableConfig" :key="index"
:prop="item[value]">
<template #default="{ row }">
@ -24,9 +22,11 @@
<el-date-picker class="flex-1 !flex" v-model="row[item.value]" clearable value-format="YYYY-MM-DD"
placeholder="请选择日期" v-else-if="item.date">
</el-date-picker>
<el-input v-model="row[item.value]" v-else-if="item.label.includes('单位')"
@input="row[item.value] = row[item.value].replace(/\d+/g, '')" />
<el-input v-model="row[item.value]" v-else />
<el-input v-model="row[item.value]" v-else :type="item.type == 'number' ? 'number' : 'text'" />
</template>
</el-table-column>
<template #empty>
@ -39,8 +39,6 @@
</template>
<script lang="ts" setup>
import { defineProps, onMounted, ref } from "vue"
import { useDictData } from '@/hooks/useDictOptions'
/** config
*
* title: 标题
@ -88,13 +86,4 @@ const handleDelete = async (row: any) => {
props.formData.splice(index, 1);
};
//
// const dictValue = props.config.tableConfig.map(item => Array.isArray(item.select) ? null : item.select).filter(item => item).join(',')
// if (!props.dictData) {
// props.dictData = useDictData(dictValue)
// }
</script>

View File

@ -1,13 +1,18 @@
<template>
<div class="flex mt-3 h-7">
<div class="mr-1 cursor-pointer leading-7 px-2.5 hover:bg-primary-light-9 hover:text-primary transition-all duration-300"
<div class="flex mt-3">
<!-- <div class="mr-1 cursor-pointer leading-7 px-2.5 hover:bg-primary-light-9 hover:text-primary transition-all duration-300"
@click="menuClick(item.id)" v-for="(item, index) in menuList" v-show="item.paths != 'workbench'"
:class="menuName == item.name ? 'bg-primary-light-9 text-primary' : ''">
{{ item.name }}
</div> -->
<div class="mr-5 cursor-pointer flex items-center flex-col transition-all duration-300 h-28 "
@click="menuClick(item.id)" v-for="(item, index) in menuList" v-show="item.paths != 'workbench'">
<el-image class="w-[35px] h-[35px] mb-[5px]" :src="getImgById(item.id)" />
{{ item.name }}
</div>
</div>
</template>
<script setup>
<script setup lang="ts">
import { getUserInfo } from "@/api/user"
import useUserStore from '@/stores/modules/user'
import { useWatchRoute } from '@/hooks/useWatchRoute'
@ -36,4 +41,17 @@ useWatchRoute((route) => {
}
})
const getImgById = (id: number) => {
if (id == 173) return '/src/assets/images/XT.png';
else if (id == 174) return '/src/assets/images/SGGL.png';
else if (id == 1046) return '/src/assets/images/ZJZX.png';
else if (id == 1117) return '/src/assets/images/GCJL.png';
else if (id == 1399) return '/src/assets/images/XMGL.png';
else if (id == 1436) return '/src/assets/images/XMZX.png';
else if (id == 1548) return '/src/assets/images/CWGL.png';
else return "/"
}
</script>

View File

@ -1,6 +1,6 @@
<template>
<div class="flex">
<div class="menu flex-1 flex flex-wrap px-4">
<div class="menu flex-1 flex flex-wrap px-4 mt-8">
<div v-for="(item, index) in tabsLists" class="flex py-1 px-5 cursor-pointer mb-2 items-center"
:class="{ act: (currentRoute == item.fullPath) }">
<span v-show="currentRoute == item.fullPath" class="w-1.5 h-1.5 mr-1 bg-primary rounded"></span>

View File

@ -36,9 +36,9 @@
<el-table border :data="pager.lists" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" />
<el-table-column label="序号" type="index" width="55" />
<el-table-column label="投标编号" prop="security_apply_code" :render-header="pager.calcWidth" />
<el-table-column label="客户名称" prop="custom_name" :render-header="pager.calcWidth" />
<el-table-column label="项目名称" prop="project_name" :render-header="pager.calcWidth" />
<el-table-column label="投标编号" prop="security_apply_code" />
<el-table-column label="客户名称" prop="custom_name" />
<el-table-column label="项目名称" prop="project_name" />
<el-table-column label="投标时间" prop="bidding_time" show-overflow-tooltip />
<el-table-column label="预计退还时间" prop="refund_date" show-overflow-tooltip />
<el-table-column label="保证金金额" prop="margin_amount" show-overflow-tooltip />

View File

@ -0,0 +1,122 @@
import { apibuild_reportLists } from '@/api/build/build_report_detail'
const detailConfig = {
title: "施工汇报表",
config: [
{
label: "作业编码",
value: "zy_code"
},
{
label: "项目名称",
value: "project_name"
},
{
label: "项目编码",
value: "project_code"
},
{
label: "工序步骤号",
value: "process_step_no"
},
{
label: "工序步骤",
value: "process_step"
},
{
label: "图例说明",
value: "process_file",
column: 1
},
{
label: "质量控制点",
value: "quality_control_points"
},
{
label: "计划开始日期",
value: "plan_start_date"
},
{
label: "计划结束日期",
value: "plan_end_date",
},
{
label: "班组长",
value: "project_member_name"
},
{
label: "施工内容",
value: "work_content"
},
{
label: "作业量",
value: "workload"
},
{
label: "剩余作业量",
value: "residue_workload"
},
{
label: "填报人",
value: "add_user_name"
},
{
label: "今日完工量",
value: "report_workload"
},
{
label: "单位",
value: "unit"
},
{
label: "单价",
value: "price"
},
{
label: "金额",
value: "report_amount"
},
{
label: "现场照片",
value: "scene_file",
column: 1
},
{
label: "备注",
value: "remark"
},
],
table: {
title: "人工明细",
tableConfig: [
{
label: "姓名",
value: 'person_name',
},
{
label: "身份证号",
value: 'person_idcard'
},
{
label: "工种",
value: 'person_work_type_text',
},
{
label: "今日完工量",
value: 'work_num',
},
{
label: "备注",
value: '',
},
],
query: 'report_id',
fetchFun: apibuild_reportLists,
}
}
export default detailConfig;

View File

@ -1,8 +1,7 @@
<template>
<div class="edit-popup">
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
@close="handleClose">
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
@ -37,7 +36,7 @@
<el-input v-model="process_step" clearable disabled placeholder="系统自动填写" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-col :span="8">
<el-form-item label="图例说明">
<div v-if="process_file && process_file.length > 0">
<!-- <material-picker v-model="item.uri"/> -->
@ -78,9 +77,9 @@
</el-form-item>
</el-col>
<el-col :span="24">
<el-col :span="8">
<el-form-item label="施工内容" prop="plan_id">
<el-input v-model="work_content" clearable disabled placeholder="系统自动填写" />
<el-input v-model="work_content" clearable disabled placeholder="系统自动填写" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="8">
@ -100,14 +99,14 @@
<el-input v-model="filluser" clearable disabled placeholder="系统自动填写" />
</el-form-item>
</el-col>
<el-col :span="8">
<!-- <el-col :span="8">
<el-form-item label="填报日期" prop="plan_id"
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
<el-date-picker class="flex-1 !flex" v-model="filluserdate" clearable type="date"
value-format="YYYY-MM-DD " disabled placeholder="系统自动填写">
</el-date-picker>
</el-form-item>
</el-col>
</el-col> -->
</el-row>
<div class="tit" style="margin:10px 0">
人工明细
@ -130,7 +129,8 @@
<el-table-column label="身份证号" prop="name2">
<template #default="{ row }"> <el-input v-model="row.name2" readonly />
</template></el-table-column>
</template>
</el-table-column>
<el-table-column label="工种" prop="name3">
<template #default="{ row }"> <el-input v-model="row.name3" /> </template></el-table-column>
@ -181,7 +181,7 @@
</el-col>
<el-col :span="24">
<el-form-item label="现场照片" prop="file">
<material-picker v-model="formData.scene_file" :limit="100" />
<uploadAnnex :formData="formData" value="scene_file"></uploadAnnex>
</el-form-item>
</el-col>
<el-col :span="24">

View File

@ -57,7 +57,7 @@
@click="handleDelete(row.id)">
删除
</el-button>
<el-button v-perms="['project.project_plan/detail']" link @click="handledetail(row)">
<el-button v-perms="['project.project_plan/detail']" link @click="handleDetail(row.id)">
详情
</el-button>
@ -70,7 +70,8 @@
</div>
</el-card>
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
<detailPage v-if="showDetail" ref="detailRef" @close="showDetail = false" :detailConfig="detailConfig" />
</div>
</template>
@ -79,10 +80,11 @@ import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { buildreportLists, buildreportDelete, buildreportDetail } from '@/api/build/build_report'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
import DetailPopup from './detail.vue'
import detailConfig from './detail'
const showDetail = ref(false)
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
//
@ -150,14 +152,16 @@ const handleDelete = async (id: number | any[]) => {
await buildreportDelete({ id })
getLists()
}
const handledetail = async (data: any) => {
let res = await buildreportDetail({ id: data.id })
showDtail.value = true
//
const handleDetail = async (id: any) => {
let res = await buildreportDetail({ id })
showDetail.value = true
await nextTick()
detailRef.value?.open()
detailRef.value?.setFormData(res)
}
getLists()
</script>

View File

@ -0,0 +1,46 @@
const detailConfig = {
title: "财务管理--用款申请单",
config: [
{
label: "单据编号",
value: "code"
},
{
label: "所在部门",
value: "approve_dept_name"
},
{
label: "费用类别",
value: "cost_type_text"
},
{
label: "支付方式",
value: "pay_type_text"
},
{
label: "金额",
value: "amount"
},
{
label: "事由",
value: "content",
column: 1
},
{
label: "附件",
value: "annex",
column: 1
},
{
label: "申请人",
value: "create_user"
},
{
label: "申请时间",
value: "create_time"
},
],
}
export default detailConfig;

View File

@ -1,55 +1,53 @@
<template>
<div class="edit-popup">
<popup
ref="popupRef"
:title="popupTitle"
:async="true"
width="550px"
@confirm="handleSubmit"
@close="handleClose"
>
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
<el-form-item label="单据编号" prop="code">
<el-input v-model="formData.code" clearable placeholder="请输入单据编号" />
<el-form-item label="单据编号">
<el-input v-model="formData.code" clearable placeholder="系统自动生成" disabled />
</el-form-item>
<el-form-item label="审批部门" prop="approve_dept">
<el-input v-model="formData.approve_dept" clearable placeholder="请输入审批部门" />
<el-form-item label="所在部门" prop="dept">
<el-select v-model="formData.dept" placeholder="请选择部门" class="flex-1">
<el-option :label="item.name" :value="item.id" v-for="item in deptList">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="费用类别" prop="cost_type">
<el-input v-model="formData.cost_type" clearable placeholder="请输入费用类别" />
<el-select v-model="formData.cost_type" placeholder="请选择费用类别" class="flex-1">
<el-option :label="item.name" :value="parseInt(item.value)" v-for="item in dictData.cost_type">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="支付方式" prop="pay_type">
<el-input v-model="formData.pay_type" clearable placeholder="请输入支付方式" />
<el-select v-model="formData.pay_type" placeholder="请选择支付方式" class="flex-1">
<el-option :label="item.name" :value="parseInt(item.value)"
v-for="item in dictData.financial_pay_type">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="可抵扣税额" prop="tax_deductible_amount">
<el-input v-model="formData.tax_deductible_amount" clearable placeholder="请输入可抵扣税额" />
</el-form-item>
<el-form-item label="附单据张数" prop="bill_num">
<el-input v-model="formData.bill_num" clearable placeholder="请输入附单据张数" />
</el-form-item>
<el-form-item label="关联费用申请" prop="fee_application_id">
<el-input v-model="formData.fee_application_id" clearable placeholder="请输入关联费用申请" />
<el-form-item label="金额" prop="amount">
<el-input v-model="formData.amount" clearable placeholder="请输入金额" type="number" />
</el-form-item>
<el-form-item label="事由" prop="content">
<el-input v-model="formData.content" clearable placeholder="请输入事由" />
<el-input v-model="formData.content" clearable placeholder="请输入事由" type="textarea" />
</el-form-item>
<el-form-item label="申请人" prop="create_user">
<el-input v-model="formData.create_user" clearable placeholder="请输入申请人" />
</el-form-item>
<el-form-item label="申请日期" prop="create_time">
<el-input v-model="formData.create_time" clearable placeholder="请输入申请日期" />
<el-form-item label="附件">
<uploadAnnex :formData="formData"></uploadAnnex>
</el-form-item>
<createUserLable :formData="formData" name="申请"></createUserLable>
</el-form>
</popup>
</div>
</template>
<script lang="ts" setup name="financialTravelReimbursementEdit">
<script lang="ts" setup name="financialBorrowMoneyEdit">
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import { apiFinancialTravelReimbursementAdd, apiFinancialTravelReimbursementEdit, apiFinancialTravelReimbursementDetail } from '@/api/financial_travel_reimbursement'
import { apiFinancialBorrowMoneyAdd, apiFinancialBorrowMoneyEdit, apiFinancialBorrowMoneyDetail } from '@/api/financial_borrow_money'
import { timeFormat } from '@/utils/util'
import type { PropType } from 'vue'
import { deptLists } from "@/api/org/department"
defineProps({
dictData: {
type: Object as PropType<Record<string, any[]>>,
@ -64,20 +62,19 @@ const mode = ref('add')
//
const popupTitle = computed(() => {
return mode.value == 'edit' ? '编辑财务管理--差旅费报销单' : '新增财务管理--差旅费报销单'
return mode.value == 'edit' ? '编辑财务管理--借款单' : '新增财务管理--借款单'
})
//
const formData = reactive({
id: '',
code: '',
approve_dept: '',
dept: '',
cost_type: '',
pay_type: '',
tax_deductible_amount: '',
bill_num: '',
fee_application_id: '',
amount: '',
content: '',
annex: '',
create_user: '',
create_time: '',
})
@ -90,9 +87,9 @@ const formRules = reactive<any>({
message: '请输入单据编号',
trigger: ['blur']
}],
approve_dept: [{
dept: [{
required: true,
message: '请输入审批部门',
message: '请输入所在部门',
trigger: ['blur']
}],
cost_type: [{
@ -105,19 +102,9 @@ const formRules = reactive<any>({
message: '请输入支付方式',
trigger: ['blur']
}],
tax_deductible_amount: [{
amount: [{
required: true,
message: '请输入可抵扣税额',
trigger: ['blur']
}],
bill_num: [{
required: true,
message: '请输入附单据张数',
trigger: ['blur']
}],
fee_application_id: [{
required: true,
message: '请输入关联费用申请',
message: '请输入金额',
trigger: ['blur']
}],
content: [{
@ -146,12 +133,12 @@ const setFormData = async (data: Record<any, any>) => {
formData[key] = data[key]
}
}
}
const getDetail = async (row: Record<string, any>) => {
const data = await apiFinancialTravelReimbursementDetail({
const data = await apiFinancialBorrowMoneyDetail({
id: row.id
})
setFormData(data)
@ -161,10 +148,10 @@ const getDetail = async (row: Record<string, any>) => {
//
const handleSubmit = async () => {
await formRef.value?.validate()
const data = { ...formData, }
mode.value == 'edit'
? await apiFinancialTravelReimbursementEdit(data)
: await apiFinancialTravelReimbursementAdd(data)
const data = { ...formData, }
mode.value == 'edit'
? await apiFinancialBorrowMoneyEdit(data)
: await apiFinancialBorrowMoneyAdd(data)
popupRef.value?.close()
emit('success')
}
@ -180,7 +167,12 @@ const handleClose = () => {
emit('close')
}
const deptList = ref([])
const getDeptList = async () => {
let res = await deptLists()
deptList.value = res.lists
}
getDeptList()
defineExpose({
open,

View File

@ -1,25 +1,28 @@
<template>
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form
class="mb-[-16px]"
:model="queryParams"
inline
>
<el-form class="mb-[-16px]" :model="queryParams" inline>
<el-form-item label="单据编号" prop="code">
<el-input class="w-[280px]" v-model="queryParams.code" clearable placeholder="请输入单据编号" />
</el-form-item>
<el-form-item label="审批部门" prop="approve_dept">
<el-input class="w-[280px]" v-model="queryParams.approve_dept" clearable placeholder="请输入审批部门" />
<el-form-item label="所在部门" prop="dept">
<el-select v-model="queryParams.approve_dept" placeholder="请选择部门" class="flex-1">
<el-option :label="item.name" :value="item.id" v-for="item in deptList">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="费用类别" prop="cost_type">
<el-input class="w-[280px]" v-model="queryParams.cost_type" clearable placeholder="请输入费用类别" />
<el-select v-model="queryParams.cost_type" placeholder="请选择费用类别" class="flex-1">
<el-option :label="item.name" :value="parseInt(item.value)" v-for="item in dictData.cost_type">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="支付方式" prop="pay_type">
<el-input class="w-[280px]" v-model="queryParams.pay_type" clearable placeholder="请输入支付方式" />
</el-form-item>
<el-form-item label="申请人" prop="create_user">
<el-input class="w-[280px]" v-model="queryParams.create_user" clearable placeholder="请输入申请人" />
<el-select v-model="queryParams.pay_type" placeholder="请选择支付方式" class="flex-1">
<el-option :label="item.name" :value="parseInt(item.value)"
v-for="item in dictData.financial_pay_type">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="resetPage">查询</el-button>
@ -28,50 +31,41 @@
</el-form>
</el-card>
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
<el-button v-perms="['financial.financial_travel_reimbursement/add']" type="primary" @click="handleAdd">
<el-button v-perms="['financial.financial_borrow_money/add']" type="primary" @click="handleAdd">
<template #icon>
<icon name="el-icon-Plus" />
</template>
新增
</el-button>
<el-button
v-perms="['financial.financial_travel_reimbursement/delete']"
:disabled="!selectData.length"
@click="handleDelete(selectData)"
>
<el-button v-perms="['financial.financial_borrow_money/delete']" :disabled="!selectData.length"
@click="handleDelete(selectData)">
删除
</el-button>
<div class="mt-4">
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" />
<el-table-column label="单据编号" prop="code" show-overflow-tooltip />
<el-table-column label="审批部门" prop="approve_dept" show-overflow-tooltip />
<el-table-column label="费用类别" prop="cost_type" show-overflow-tooltip />
<el-table-column label="支付方式" prop="pay_type" show-overflow-tooltip />
<el-table-column label="可抵扣税额" prop="tax_deductible_amount" show-overflow-tooltip />
<el-table-column label="附单据张数" prop="bill_num" show-overflow-tooltip />
<el-table-column label="关联费用申请" prop="fee_application_id" show-overflow-tooltip />
<el-table-column label="所在部门" prop="dept_name" show-overflow-tooltip />
<el-table-column label="费用类别" prop="cost_type_text" show-overflow-tooltip />
<el-table-column label="支付方式" prop="pay_type_text" show-overflow-tooltip />
<el-table-column label="金额" prop="amount" show-overflow-tooltip />
<el-table-column label="事由" prop="content" show-overflow-tooltip />
<el-table-column label="申请人" prop="create_user" show-overflow-tooltip />
<el-table-column label="申请日期" prop="create_time" show-overflow-tooltip />
<el-table-column label="操作" width="120" fixed="right">
<el-table-column label="操作" width="170" fixed="right">
<template #default="{ row }">
<el-button
v-perms="['financial.financial_travel_reimbursement/edit']"
type="primary"
link
@click="handleEdit(row)"
>
<el-button v-perms="['financial.financial_borrow_money/edit']" type="primary" link
@click="handleEdit(row)">
编辑
</el-button>
<el-button
v-perms="['financial.financial_travel_reimbursement/delete']"
type="danger"
link
@click="handleDelete(row.id)"
>
<el-button v-perms="['financial.financial_borrow_money/delete']" type="danger" link
@click="handleDelete(row.id)">
删除
</el-button>
<el-button v-perms="['financial.financial_borrow_money/detail']" link
@click="handleDetail(row.id)">
详情
</el-button>
</template>
</el-table-column>
</el-table>
@ -81,26 +75,32 @@
</div>
</el-card>
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
<detailPage v-if="showDetail" ref="detailRef" @close="showDetail = false" :detailConfig="detailConfig" />
</div>
</template>
<script lang="ts" setup name="financialTravelReimbursementLists">
<script lang="ts" setup name="financialBorrowMoneyLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiFinancialTravelReimbursementLists, apiFinancialTravelReimbursementDelete } from '@/api/financial_travel_reimbursement'
import { apiFinancialBorrowMoneyLists, apiFinancialBorrowMoneyDelete, apiFinancialBorrowMoneyDetail } from '@/api/financial_borrow_money'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
import detailConfig from './detail'
import { deptLists } from "@/api/org/department"
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
const detailRef = ref('')
//
const showEdit = ref(false)
const showDetail = ref(false)
//
const queryParams = reactive({
code: '',
approve_dept: '',
dept: '',
cost_type: '',
pay_type: '',
create_user: ''
@ -115,11 +115,11 @@ const handleSelectionChange = (val: any[]) => {
}
//
const { dictData } = useDictData('')
const { dictData } = useDictData('cost_type,financial_pay_type')
//
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: apiFinancialTravelReimbursementLists,
fetchFun: apiFinancialBorrowMoneyLists,
params: queryParams
})
@ -132,19 +132,36 @@ const handleAdd = async () => {
//
const handleEdit = async (data: any) => {
let res = await apiFinancialBorrowMoneyDetail({ id: data.id })
showEdit.value = true
await nextTick()
editRef.value?.open('edit')
editRef.value?.setFormData(data)
editRef.value?.setFormData(res)
}
//
const handleDelete = async (id: number | any[]) => {
await feedback.confirm('确定要删除?')
await apiFinancialTravelReimbursementDelete({ id })
await apiFinancialBorrowMoneyDelete({ id })
getLists()
}
//
const handleDetail = async (id: any) => {
let res = await apiFinancialBorrowMoneyDetail({ id })
showDetail.value = true
await nextTick()
detailRef.value?.open()
detailRef.value?.setFormData(res)
}
const deptList = ref([])
const getDeptList = async () => {
let res = await deptLists()
deptList.value = res.lists
}
getDeptList()
getLists()
</script>

View File

@ -0,0 +1,37 @@
const detailConfig = {
title: "财务管理--用款申请单",
config: [
{
label: "借款单编号",
value: "borrow_code"
},
{
label: "单据编号",
value: "code"
},
{
label: "还款人",
value: "payer_name"
},
{
label: "还款金额",
value: "amount"
},
{
label: "说明",
value: "desc",
},
{
label: "经办人",
value: "create_user"
},
{
label: "还款日期",
value: "create_time"
},
],
}
export default detailConfig;

View File

@ -0,0 +1,196 @@
<template>
<div class="edit-popup">
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
<el-form-item label="借款单编号" prop="borrow_code">
<el-input v-model="formData.borrow_code" clearable placeholder="点击选择借款单" readonly
@click="showDialog = true" />
</el-form-item>
<el-form-item label="单据编号">
<el-input v-model="formData.code" clearable placeholder="系统自动生成" disabled />
</el-form-item>
<el-form-item label="还款人" prop="payer_name">
<el-input v-model="formData.payer_name" clearable placeholder="点击选择还款人" @click="userclick" />
</el-form-item>
<el-form-item label="还款金额" prop="amount">
<el-input v-model="formData.amount" clearable placeholder="请输入还款金额" type="number" />
</el-form-item>
<el-form-item label="说明">
<el-input v-model="formData.desc" clearable placeholder="请输入说明" type="textarea" />
</el-form-item>
<el-form-item label="经办人" prop="create_user">
<el-input v-model="formData.create_user" clearable placeholder="请输入经办人" />
</el-form-item>
<el-form-item label="还款日期" prop="create_time">
<el-date-picker class="flex-1 !flex" v-model="formData.create_time" clearable type="datetime"
value-format="YYYY-MM-DD HH:mm:ss" placeholder="选择还款日期">
</el-date-picker>
</el-form-item>
</el-form>
<el-dialog v-model="showDialog" title="选择借款单" width="70%">
<dialogTable :config="financial_borrow_money" @customEvent="customEvent">
</dialogTable>
</el-dialog>
<div v-if="showDialog3">
<personnelselector ref="personnel" @confirm="submituser" type="1">
</personnelselector>
</div>
</popup>
</div>
</template>
<script lang="ts" setup name="financialRepaymentEdit">
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import { apiFinancialRepaymentAdd, apiFinancialRepaymentEdit, apiFinancialRepaymentDetail } from '@/api/financial_repayment'
import { timeFormat } from '@/utils/util'
import type { PropType } from 'vue'
import { financial_borrow_money } from "@/components/dialogTable/dialogTableConfig";
import useUserStore from "@/stores/modules/user";
const userStore = useUserStore().userInfo;
defineProps({
dictData: {
type: Object as PropType<Record<string, any[]>>,
default: () => ({})
}
})
const emit = defineEmits(['success', 'close'])
const formRef = shallowRef<FormInstance>()
const popupRef = shallowRef<InstanceType<typeof Popup>>()
const mode = ref('add')
const showDialog = ref(false)
const showDialog3 = ref(false)
const personnel = ref<any>()
//
const popupTitle = computed(() => {
return mode.value == 'edit' ? '编辑财务管理--还款单' : '新增财务管理--还款单'
})
//
const userclick = async (e: any, key) => {
showDialog3.value = true
await nextTick()
personnel.value.open()
}
//
const submituser = (e: any) => {
formData.payer = e.id
formData.payer_name = e.name
showDialog3.value = false
}
//
const formData = reactive({
id: '',
borrow_money_id: '',
borrow_code: '',
code: '',
payer: '',
payer_name: "",
amount: '',
desc: '',
create_user: userStore.account,
create_time: timeFormat('', 'yyyy-mm-dd hh:MM:ss'),
})
const customEvent = (e) => {
formData.borrow_money_id = e.id
formData.borrow_code = e.code
showDialog.value = false
}
//
const formRules = reactive<any>({
borrow_money_id: [{
required: true,
message: '请输入借款单id',
trigger: ['blur']
}],
code: [{
required: true,
message: '请输入单据编号',
trigger: ['blur']
}],
payer_name: [{
required: true,
message: '请输入还款人',
trigger: ['blur']
}],
amount: [{
required: true,
message: '请输入还款金额',
trigger: ['blur']
}],
desc: [{
required: true,
message: '请输入说明',
trigger: ['blur']
}],
create_user: [{
required: true,
message: '请输入经办人',
trigger: ['blur']
}],
create_time: [{
required: true,
message: '请输入还款日期',
trigger: ['blur']
}]
})
//
const setFormData = async (data: Record<any, any>) => {
for (const key in formData) {
if (data[key] != null && data[key] != undefined) {
//@ts-ignore
formData[key] = data[key]
}
}
}
const getDetail = async (row: Record<string, any>) => {
const data = await apiFinancialRepaymentDetail({
id: row.id
})
setFormData(data)
}
//
const handleSubmit = async () => {
await formRef.value?.validate()
const data = { ...formData, }
mode.value == 'edit'
? await apiFinancialRepaymentEdit(data)
: await apiFinancialRepaymentAdd(data)
popupRef.value?.close()
emit('success')
}
//
const open = (type = 'add') => {
mode.value = type
popupRef.value?.open()
}
//
const handleClose = () => {
emit('close')
}
defineExpose({
open,
setFormData,
getDetail
})
</script>

View File

@ -0,0 +1,146 @@
<template>
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form class="mb-[-16px]" :model="queryParams" inline>
<el-form-item label="借款单" prop="borrow_money_id">
<select-remote model="borrow_money_id" :formData="queryParams"
:api="apiFinancialBorrowMoneySearch"></select-remote>
</el-form-item>
<el-form-item label="单据编号" prop="code">
<el-input class="w-[280px]" v-model="queryParams.code" clearable placeholder="请输入单据编号" />
</el-form-item>
<el-form-item label="经办人" prop="create_user">
<el-input class="w-[280px]" v-model="queryParams.create_user" clearable placeholder="请输入经办人" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="resetPage">查询</el-button>
<el-button @click="resetParams">重置</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
<el-button v-perms="['financial.financial_repayment/add']" type="primary" @click="handleAdd">
<template #icon>
<icon name="el-icon-Plus" />
</template>
新增
</el-button>
<el-button v-perms="['financial.financial_repayment/delete']" :disabled="!selectData.length"
@click="handleDelete(selectData)">
删除
</el-button>
<div class="mt-4">
<el-table :data="pager.lists" @selection-change="handleSelectionChange" border>
<el-table-column type="selection" width="55" />
<el-table-column label="借款单编号" prop="borrow_code" show-overflow-tooltip />
<el-table-column label="单据编号" prop="code" show-overflow-tooltip />
<el-table-column label="还款人" prop="payer_name" show-overflow-tooltip />
<el-table-column label="还款金额" prop="amount" show-overflow-tooltip />
<el-table-column label="说明" prop="desc" show-overflow-tooltip />
<el-table-column label="经办人" prop="create_user" show-overflow-tooltip />
<el-table-column label="还款日期" prop="create_time" show-overflow-tooltip />
<el-table-column label="操作" width="170" fixed="right">
<template #default="{ row }">
<el-button v-perms="['financial.financial_repayment/edit']" type="primary" link
@click="handleEdit(row)">
编辑
</el-button>
<el-button v-perms="['financial.financial_repayment/delete']" type="danger" link
@click="handleDelete(row.id)">
删除
</el-button>
<el-button v-perms="['financial.financial_repayment/detail']" link
@click="handleDetail(row.id)">
详情
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="flex mt-4 justify-end">
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
<detailPage v-if="showDetail" ref="detailRef" @close="showDetail = false" :detailConfig="detailConfig" :column="1"
width="550px" />
</div>
</template>
<script lang="ts" setup name="financialRepaymentLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiFinancialRepaymentLists, apiFinancialRepaymentDelete, apiFinancialRepaymentDetail } from '@/api/financial_repayment'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
import detailConfig from './detail'
import { apiFinancialBorrowMoneySearch } from '@/api/financial_borrow_money'
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
const detailRef = ref('')
//
const showEdit = ref(false)
const showDetail = ref(false)
//
const queryParams = reactive({
borrow_money_id: '',
code: '',
create_user: '',
create_time: ''
})
//
const selectData = ref<any[]>([])
//
const handleSelectionChange = (val: any[]) => {
selectData.value = val.map(({ id }) => id)
}
//
const { dictData } = useDictData('')
//
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: apiFinancialRepaymentLists,
params: queryParams
})
//
const handleAdd = async () => {
showEdit.value = true
await nextTick()
editRef.value?.open('add')
}
//
const handleEdit = async (data: any) => {
let res = await apiFinancialRepaymentDetail({ id: data.id })
showEdit.value = true
await nextTick()
editRef.value?.open('edit')
editRef.value?.setFormData(res)
}
//
const handleDelete = async (id: number | any[]) => {
await feedback.confirm('确定要删除?')
await apiFinancialRepaymentDelete({ id })
getLists()
}
//
const handleDetail = async (id: any) => {
let res = await apiFinancialRepaymentDetail({ id })
showDetail.value = true
await nextTick()
detailRef.value?.open()
detailRef.value?.setFormData(res)
}
getLists()
</script>

View File

@ -58,7 +58,7 @@
</el-col>
<create-user-lable flag name="申请" :form-data="formData"></create-user-lable>
</el-row>
<FormTable :form-data="formData.detail" :config="tableConfig">
<FormTable :form-data="formData.detail" :config="tableConfig" @getSummaries="getSummaries">
<el-table-column label="部门">
<template #default="{ row }">
<el-select v-model="row.dept_id" placeholder="请选择部门">
@ -89,10 +89,10 @@
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import { apiFinancialTravelReimbursementAdd, apiFinancialTravelReimbursementEdit, apiFinancialTravelReimbursementDetail, apiFinancialTravelReimbursementDetailLists, apiFinancialTravelReimbursementDetailDelete } from '@/api/financial_travel_reimbursement'
import { timeFormat } from '@/utils/util'
import type { PropType } from 'vue'
import { deptLists } from "@/api/org/department"
import { financial_fee_application } from "@/components/dialogTable/dialogTableConfig";
import { watch } from "vue"
defineProps({
@ -140,7 +140,8 @@ const formData = reactive({
"subsidy_price": 0,
"subsidy_amount": 0,
"subsidy_deduction": 0,
"abstract": ""
"abstract": "",
subtotal: 0
}
]
})
@ -162,45 +163,88 @@ const tableConfig = reactive(
{
label: "交通费",
value: 'traffic_amount',
type: 'number'
},
{
label: "住宿费",
value: 'stay_amount',
type: 'number'
},
{
label: "住宿天数",
value: 'stay_days',
type: 'number'
},
{
label: "住宿单价",
value: 'stay_price',
type: 'number'
},
{
label: "补助天数",
value: 'subsidy_days',
type: 'number'
},
{
label: "补助金额",
value: 'subsidy_amount',
type: 'number'
},
{
label: "补贴减扣",
value: 'subsidy_deduction',
type: 'number'
},
{
label: "补助标准",
value: 'subsidy_price',
type: 'number'
},
{
label: "摘要",
value: 'abstract',
type: 'number'
},
// {
// label: "",
// value: 'subtotal',
// type: 'number'
// },
],
deleteApi: apiFinancialTravelReimbursementDetailDelete,
}
)
// watch(
// () => formData.detail.map((item: any) => { item.traffic_amount, item.stay_amount, item.stay_price, item.stay_days, item.subsidy_days, item.subsidy_price, item.subsidy_amount, item.subsidy_deduction }),
// (newVal, oldVal) => {
// console.log(`checked values changed from `);
// formData.detail.forEach(element => {
// element.subtotal = (+element.traffic_amount) + (+element.stay_price) * (+element.stay_days) + (+element.stay_price) + (+element.subsidy_price) + (+element.subsidy_amount) + (+element.subsidy_deduction)
// });
// }
// );
//
const getSummaries = (value: any) => {
}
const customEvent1 = (e) => {
formData.fee_application_id = e.id
formData.fee_application_theme = e.theme

View File

@ -0,0 +1,119 @@
import { apiFinancialUsingFundsDetailLists } from '@/api/financial_using_funds'
const detailConfig = {
title: "财务管理--用款申请单",
config: [
{
label: "单据编号",
value: "code"
},
{
label: "审批部门",
value: "approve_dept_name"
},
{
label: "费用类别",
value: "cost_type_text"
},
{
label: "支付方式",
value: "pay_type_text"
},
{
label: "付款原因",
value: "pay_reason"
},
{
label: "支出合同",
value: "contract_name"
},
{
label: "已支付金额",
value: "has_pay_amount"
},
{
label: "本次支付金额",
value: "this_pay_amount"
},
{
label: "付往单位",
value: "accept_company",
},
{
label: "收款账号",
value: "accept_acount"
},
{
label: "开户省份",
value: "province_name"
},
{
label: "开户城市",
value: "city"
},
{
label: "收款银行",
value: "accept_bank"
},
{
label: "收款开户行",
value: "accept_deposit"
},
{
label: "附单据张数",
value: "bill_num"
},
{
label: "事由",
value: "content"
},
{
label: "申请人",
value: "create_user"
},
{
label: "申请时间",
value: "create_time"
},
{
label: "附件",
value: "annex",
column: 1
},
],
table: {
title: "用款申请明细",
tableConfig: [
{
label: "部门",
value: 'dept_name',
},
{
label: "发生日期",
value: 'date'
},
{
label: "科目名称",
value: 'subject_name_text',
},
{
label: "金额",
value: 'amount',
},
{
label: "摘要",
value: 'abstract',
},
{
label: "关联发票",
value: 'invoice',
},
],
query: 'using_funds_id',
fetchFun: apiFinancialUsingFundsDetailLists,
}
}
export default detailConfig;

View File

@ -0,0 +1,413 @@
<template>
<div class="edit-popup">
<popup ref="popupRef" :title="popupTitle" :async="true" width="80vw" @confirm="handleSubmit" @close="handleClose">
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
<el-row>
<el-col :span="8">
<el-form-item label="单据编号">
<el-input v-model="formData.code" clearable placeholder="系统自动生成" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="审批部门" prop="approve_dept">
<el-select v-model="formData.approve_dept" placeholder="请选择部门" class="flex-1">
<el-option :label="item.name" :value="item.id" v-for="item in deptList">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="费用类别" prop="cost_type">
<el-select v-model="formData.cost_type" placeholder="请选择费用类别" class="flex-1">
<el-option :label="item.name" :value="parseInt(item.value)"
v-for="item in dictData.cost_type">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="支付方式" prop="pay_type">
<el-select v-model="formData.pay_type" placeholder="请选择支付方式" class="flex-1">
<el-option :label="item.name" :value="parseInt(item.value)"
v-for="item in dictData.financial_pay_type">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="付款原因" prop="pay_reason">
<el-input v-model="formData.pay_reason" clearable placeholder="请输入付款原因" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="支出合同">
<el-input v-model="formData.contract_name" clearable placeholder="点击选择合同"
@click="showDialog = true" readonly />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="已支付金额">
<el-input v-model="formData.has_pay_amount" clearable placeholder="请输入已支付金额" type="number" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="本次支付金额">
<el-input v-model="formData.this_pay_amount" clearable placeholder="请输入本次支付金额" type="number" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="付往单位" prop="accept_company">
<el-input v-model="formData.accept_company" clearable placeholder="请输入付往单位" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="收款账号" prop="accept_acount">
<el-input v-model="formData.accept_acount" clearable placeholder="请输入收款账号" type="number" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="开户省份" prop="province">
<el-select v-model="formData.province" clearable placeholder="请选择开户省份" @change="province_change"
class="flex-1">
<el-option v-for="(item, index) in datas.provinceOptions" :key="index"
:label="item.province_name" :value="(item.province_code)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="开户城市" prop="city">
<el-select v-model="formData.city" clearable placeholder="请选择开户城市" class="flex-1">
<el-option v-for="(item, index) in datas.cityOptions" :key="index" :label="item.city_name"
:value="(item.city_code)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="收款银行" prop="accept_bank">
<el-input v-model="formData.accept_bank" clearable placeholder="请输入收款银行" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="收款开户行" prop="accept_deposit">
<el-input v-model="formData.accept_deposit" clearable placeholder="请输入收款开户行" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="附单据张数">
<el-input v-model="formData.bill_num" clearable placeholder="请输入附单据张数" type="number" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="事由" prop="content">
<el-input v-model="formData.content" clearable placeholder="请输入事由" type="textarea" />
</el-form-item>
</el-col>
<createUserLable :formData="formData" name="申请" flag></createUserLable>
<!-- <el-col :span="8">
<el-form-item label="附件">
<uploadAnnex :formData="formData"></uploadAnnex>
</el-form-item>
</el-col> -->
</el-row>
<FormTable :form-data="formData.detail" :config="tableConfig" @getSummaries="getSummaries"
:dict-data="dictData">
<el-table-column label="部门">
<template #default="{ row }">
<el-select v-model="row.dept_id" placeholder="请选择部门">
<el-option :label="item.name" :value="item.id" v-for="item in deptList">
</el-option>
</el-select>
</template>
</el-table-column>
</FormTable>
</el-form>
<el-dialog v-model="showDialog" title="选择合同" width="70%">
<dialogTable :config="cost_approved_projects" @customEvent="customEvent">
</dialogTable>
</el-dialog>
</popup>
</div>
</template>
<script lang="ts" setup name="financialUsingFundsEdit">
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import { apiFinancialUsingFundsAdd, apiFinancialUsingFundsEdit, apiFinancialUsingFundsDetail, apiFinancialUsingFundsDetailDelete, apiFinancialUsingFundsDetailLists } from '@/api/financial_using_funds'
import { timeFormat } from '@/utils/util'
import type { PropType } from 'vue'
import { deptLists } from "@/api/org/department"
import { cost_approved_projects } from "@/components/dialogTable/dialogTableConfig";
import { apiCityList, apiProvinceList } from "@/api/common";
defineProps({
dictData: {
type: Object as PropType<Record<string, any[]>>,
default: () => ({})
}
})
const emit = defineEmits(['success', 'close'])
const formRef = shallowRef<FormInstance>()
const popupRef = shallowRef<InstanceType<typeof Popup>>()
const mode = ref('add')
const showDialog = ref(false)
const datas = reactive({
provinceOptions: [],
cityOptions: [],
});
const getProvinceList = async () => {
const data = await apiProvinceList({});
datas["provinceOptions"] = data;
};
const getCityList = async () => {
const data = await apiCityList({ province_code: formData.province });
datas["cityOptions"] = data;
};
//
function province_change(value: string) {
getCityList();
}
getProvinceList();
//
const popupTitle = computed(() => {
return mode.value == 'edit' ? '编辑财务管理--用款申请单' : '新增财务管理--用款申请单'
})
//
const formData = reactive({
id: '',
code: '',
approve_dept: '',
cost_type: '',
pay_type: '',
pay_reason: '',
contract_id: '',
contract_name: "",
has_pay_amount: '',
this_pay_amount: '',
accept_company: '',
accept_acount: '',
province: '',
city: '',
accept_bank: '',
accept_deposit: '',
bill_num: '',
content: '',
create_user: '',
create_time: '',
annex: [],
"detail": [
]
})
const tableConfig = reactive(
{
title: "用款申请明细",
tableConfig: [
{
label: "发生日期",
value: 'date',
date: true
},
{
label: "科目名称",
value: 'subject_name',
select: 'subject_category'
},
{
label: "金额 ",
value: 'amount',
type: 'number'
},
{
label: "摘要",
value: 'abstract',
},
{
label: "关联发票",
value: 'invoice',
},
],
deleteApi: apiFinancialUsingFundsDetailDelete,
}
)
const customEvent = (e) => {
formData.contract_id = e.id
formData.contract_name = e.contract_name
// formData.contract_type = e.contract_type
// formData.part_a = e.part_a
// formData.part_b = e.part_b
// formData.sign_money = e.money
// formData.sign_time = e.sign_date
// formData.total_invoice_amount = e.total_invoice_amount
// formData.total_refund_amount = e.total_refund_amount
showDialog.value = false
}
//
const formRules = reactive<any>({
code: [{
required: true,
message: '请输入单据编号',
trigger: ['blur']
}],
approve_dept: [{
required: true,
message: '请输入审批部门',
trigger: ['blur']
}],
cost_type: [{
required: true,
message: '请输入费用类别',
trigger: ['blur']
}],
pay_type: [{
required: true,
message: '请输入支付方式',
trigger: ['blur']
}],
pay_reason: [{
required: true,
message: '请输入付款原因',
trigger: ['blur']
}],
contract_id: [{
required: true,
message: '请输入支出合同',
trigger: ['blur']
}],
has_pay_amount: [{
required: true,
message: '请输入已支付金额',
trigger: ['blur']
}],
this_pay_amount: [{
required: true,
message: '请输入本次支付金额',
trigger: ['blur']
}],
accept_company: [{
required: true,
message: '请输入付往单位',
trigger: ['blur']
}],
accept_acount: [{
required: true,
message: '请输入收款账号',
trigger: ['blur']
}],
province: [{
required: true,
message: '请输入开户省份',
trigger: ['blur']
}],
city: [{
required: true,
message: '请输入开户城市',
trigger: ['blur']
}],
accept_bank: [{
required: true,
message: '请输入收款银行',
trigger: ['blur']
}],
accept_deposit: [{
required: true,
message: '请输入收款开户行',
trigger: ['blur']
}],
bill_num: [{
required: true,
message: '请输入附单据张数',
trigger: ['blur']
}],
content: [{
required: true,
message: '请输入事由',
trigger: ['blur']
}],
create_user: [{
required: true,
message: '请输入申请人',
trigger: ['blur']
}],
create_time: [{
required: true,
message: '请输入申请日期',
trigger: ['blur']
}]
})
//
const setFormData = async (data: Record<any, any>) => {
for (const key in formData) {
if (data[key] != null && data[key] != undefined) {
//@ts-ignore
formData[key] = data[key]
}
}
let res = await apiFinancialUsingFundsDetailLists({ using_funds_id: data.id })
formData.detail = res.lists
getCityList()
}
const getDetail = async (row: Record<string, any>) => {
const data = await apiFinancialUsingFundsDetail({
id: row.id
})
setFormData(data)
}
//
const handleSubmit = async () => {
await formRef.value?.validate()
const data = { ...formData, }
mode.value == 'edit'
? await apiFinancialUsingFundsEdit(data)
: await apiFinancialUsingFundsAdd(data)
popupRef.value?.close()
emit('success')
}
//
const open = (type = 'add') => {
mode.value = type
popupRef.value?.open()
}
//
const handleClose = () => {
emit('close')
}
const deptList = ref([])
const getDeptList = async () => {
let res = await deptLists()
deptList.value = res.lists
}
getDeptList()
defineExpose({
open,
setFormData,
getDetail
})
</script>

View File

@ -0,0 +1,174 @@
<template>
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form class="mb-[-16px]" :model="queryParams" inline>
<el-form-item label="单据编号" prop="code">
<el-input class="w-[280px]" v-model="queryParams.code" clearable placeholder="请输入单据编号" />
</el-form-item>
<el-form-item label="审批部门" prop="approve_dept">
<el-select v-model="queryParams.approve_dept" placeholder="请选择部门" class="flex-1">
<el-option :label="item.name" :value="item.id" v-for="item in deptList">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="费用类别" prop="cost_type">
<el-select v-model="queryParams.cost_type" placeholder="请选择费用类别" class="flex-1">
<el-option :label="item.name" :value="parseInt(item.value)" v-for="item in dictData.cost_type">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="支付方式" prop="pay_type">
<el-select v-model="queryParams.pay_type" placeholder="请选择支付方式" class="flex-1">
<el-option :label="item.name" :value="parseInt(item.value)"
v-for="item in dictData.financial_pay_type">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="付往单位" prop="accept_company">
<el-input class="w-[280px]" v-model="queryParams.accept_company" clearable placeholder="请输入付往单位" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="resetPage">查询</el-button>
<el-button @click="resetParams">重置</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
<el-button v-perms="['financial.financial_using_funds/add']" type="primary" @click="handleAdd">
<template #icon>
<icon name="el-icon-Plus" />
</template>
新增
</el-button>
<el-button v-perms="['financial.financial_using_funds/delete']" :disabled="!selectData.length"
@click="handleDelete(selectData)">
删除
</el-button>
<div class="mt-4">
<el-table :data="pager.lists" @selection-change="handleSelectionChange" border>
<el-table-column type="selection" width="55" />
<el-table-column label="支出合同" prop="contract_name" show-overflow-tooltip />
<el-table-column label="单据编号" prop="code" show-overflow-tooltip />
<el-table-column label="审批部门" prop="approve_dept_name" show-overflow-tooltip />
<el-table-column label="费用类别" prop="cost_type_text" show-overflow-tooltip />
<el-table-column label="支付方式" prop="pay_type_text" show-overflow-tooltip />
<el-table-column label="付款原因" prop="pay_reason" show-overflow-tooltip />
<el-table-column label="签订金额" prop="contract_money" show-overflow-tooltip />
<el-table-column label="已支付金额" prop="has_pay_amount" show-overflow-tooltip />
<el-table-column label="本次支付金额" prop="this_pay_amount" show-overflow-tooltip />
<el-table-column label="付往单位" prop="accept_company" show-overflow-tooltip />
<el-table-column label="收款账号" prop="accept_acount" show-overflow-tooltip />
<el-table-column label="事由" prop="content" show-overflow-tooltip />
<el-table-column label="申请人" prop="create_user" show-overflow-tooltip />
<el-table-column label="申请日期" prop="create_time" show-overflow-tooltip />
<el-table-column label="操作" width="170" fixed="right">
<template #default="{ row }">
<el-button v-perms="['financial.financial_using_funds/edit']" type="primary" link
@click="handleEdit(row)">
编辑
</el-button>
<el-button v-perms="['financial.financial_using_funds/delete']" type="danger" link
@click="handleDelete(row.id)">
删除
</el-button>
<el-button v-perms="['financial.financial_using_funds/detail']" link
@click="handleDetail(row.id)">
详情
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="flex mt-4 justify-end">
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
<detailPage v-if="showDetail" ref="detailRef" @close="showDetail = false" :detailConfig="detailConfig" />
</div>
</template>
<script lang="ts" setup name="financialUsingFundsLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiFinancialUsingFundsLists, apiFinancialUsingFundsDelete, apiFinancialUsingFundsDetail } from '@/api/financial_using_funds'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
import detailConfig from './detail'
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
const detailRef = ref('')
//
const showEdit = ref(false)
const showDetail = ref(false)
//
const queryParams = reactive({
code: '',
approve_dept: '',
cost_type: '',
pay_type: '',
accept_company: '',
create_user: ''
})
//
const selectData = ref<any[]>([])
//
const handleSelectionChange = (val: any[]) => {
selectData.value = val.map(({ id }) => id)
}
//
const { dictData } = useDictData('cost_type,financial_pay_type,subject_category')
//
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: apiFinancialUsingFundsLists,
params: queryParams
})
//
const handleAdd = async () => {
showEdit.value = true
await nextTick()
editRef.value?.open('add')
}
//
const handleEdit = async (data: any) => {
let res = await apiFinancialUsingFundsDetail({ id: data.id })
showEdit.value = true
await nextTick()
editRef.value?.open('edit')
editRef.value?.setFormData(res)
}
//
const handleDelete = async (id: number | any[]) => {
await feedback.confirm('确定要删除?')
await apiFinancialUsingFundsDelete({ id })
getLists()
}
//
const handleDetail = async (id: any) => {
let res = await apiFinancialUsingFundsDetail({ id })
showDetail.value = true
await nextTick()
detailRef.value?.open()
detailRef.value?.setFormData(res)
}
const deptList = ref([])
const getDeptList = async () => {
let res = await deptLists()
deptList.value = res.lists
}
getDeptList()
getLists()
</script>

View File

@ -1,7 +1,6 @@
<template>
<div class="edit-popup">
<popup ref="popupRef" :title="popupTitle" :async="true" width="80vw" @confirm="handleSubmit"
@close="handleClose">
<popup ref="popupRef" :title="popupTitle" :async="true" width="80vw" @confirm="handleSubmit" @close="handleClose">
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
<el-row>
<el-col :span="8">
@ -34,8 +33,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="行业" prop="industry">
<el-select class="flex-1" v-model="formData.industry_nature" clearable
placeholder="请选择行业类型">
<el-select class="flex-1" v-model="formData.industry_nature" clearable placeholder="请选择行业类型">
<el-option v-for="(item, index) in dictData.supervision_project_industry" :key="index"
:label="item.name" :value="item.value" />
</el-select>
@ -63,8 +61,7 @@
<el-row>
<el-col :span="8">
<el-form-item label="已支付总额" prop="total_pay_amount">
<el-input v-model="formData.total_pay_amount" clearable placeholder="请输入已支付总额"
type="number" />
<el-input v-model="formData.total_pay_amount" clearable placeholder="请输入已支付总额" type="number" />
</el-form-item>
</el-col>
<el-col :span="8">

View File

@ -4,8 +4,8 @@
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
<el-row>
<el-col :span="8">
<el-form-item label="出差申请单号" prop="trip_apply_code">
<el-input v-model="formData.trip_apply_code" clearable placeholder="点击选择" readonle
<el-form-item label="出差申请单号" prop="trip_reimbursement_code">
<el-input v-model="formData.trip_reimbursement_code" clearable placeholder="点击选择" readonle
@click="showDialog = true" />
</el-form-item>
</el-col>
@ -297,7 +297,7 @@ const showDialog4 = ref(false)
const customEvent = (e) => {
formData.trip_apply_id = e.id
formData.project_id = e.project_id
formData.trip_apply_code = e.trip_apply_code
formData.trip_reimbursement_code = e.trip_apply_code
showDialog.value = false
}
const customEvent1 = (e) => {
@ -342,7 +342,7 @@ const formData = reactive({
id: '',
project_id: "",
"trip_apply_id": "",
"trip_apply_code": "",
"trip_reimbursement_code": "",
"reimbursement_type": [],
"loan_apply_id": "", //id
"loan_apply_code": "", //id

View File

@ -1,7 +1,6 @@
<template>
<div class="edit-popup">
<popup ref="popupRef" :title="popupTitle" :async="true" width="80vw" @confirm="handleSubmit"
@close="handleClose">
<popup ref="popupRef" :title="popupTitle" :async="true" width="80vw" @confirm="handleSubmit" @close="handleClose">
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
<el-row>
<el-col :span="8">
@ -85,18 +84,17 @@
<template #default="{ row }">
<el-select class="flex-1" v-model="row.task_type_id" clearable placeholder="请选择任务类型">
<el-option v-for="(item, index) in dictData.task_type" :key="index"
:label="item.name" :value="parseInt(item.value)" />
<el-option v-for="(item, index) in dictData.task_type" :key="index" :label="item.name"
:value="parseInt(item.value)" />
</el-select>
</template>
</el-table-column>
<el-table-column label="专业类型" prop="professional_type" width="200px">
<template #default="{ row }">
<el-select class="flex-1" v-model="row.professional_type" clearable
placeholder="请选择专业类型">
<el-option v-for="(item, index) in dictData.major_type" :key="index"
:label="item.name" :value="item.value" />
<el-select class="flex-1" v-model="row.professional_type" clearable placeholder="请选择专业类型">
<el-option v-for="(item, index) in dictData.major_type" :key="index" :label="item.name"
:value="item.value" />
</el-select>
</template>
</el-table-column>
@ -130,7 +128,7 @@
<el-table-column label="天数" prop="days" width="200px">
<template #default="{ row }">
<el-input v-model="row.days" />
<el-input v-model="row.days" type="number" />
</template>
</el-table-column>
<el-table-column label="开始日期" prop="start_date" width="220px">
@ -152,19 +150,19 @@
<el-table-column label="中标金额(元)" prop="bid_winning_amount" width="200px">
<template #default="{ row }">
<el-input v-model="row.bid_winning_amount" />
<el-input v-model="row.bid_winning_amount" type="number" />
</template>
</el-table-column>
<el-table-column label="送审造价(元)" prop="cost" width="200px">
<template #default="{ row }">
<el-input v-model="row.cost" />
<el-input v-model="row.cost" type="number" />
</template>
</el-table-column>
<el-table-column label="第三方核定金额(元)" prop="approved_amount" width="200px">
<template #default="{ row }">
<el-input v-model="row.approved_amount" />
<el-input v-model="row.approved_amount" type="number" />
</template>
</el-table-column>
<el-table-column label="施工单位" prop="construction_unit" width="200px">
@ -174,15 +172,13 @@
</template>
</el-table-column>
<el-table-column label="联系人" prop="contact" width="200px">
<template #default="{ row }">
<el-input v-model="row.contact" />
</template>
</el-table-column>
<el-table-column label="联系电话" prop="contact_phone" width="200px">
<template #default="{ row }">
<el-input v-model="row.contact_phone" />
<el-input v-model="row.contact_phone" v-type="'phone'" />
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" width="200px">

View File

@ -1,7 +1,6 @@
<template>
<div class="edit-popup">
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit"
@close="handleClose">
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
<el-form-item label="标识" prop="dataid">
<el-input v-model="formData.dataid" clearable placeholder="请输入" />
@ -9,12 +8,12 @@
<el-form-item label="所属项目" prop="cost_project_id">
<el-select v-model="formData.cost_project_id" remote filterable :remote-method="queryCostProject"
:loading="loading" class="flex-1">
<el-option v-for="(item, index) in optionsData.projectList" :key="index"
:label="item.projectinfo" :value="item.id" />
<el-option v-for="(item, index) in optionsData.projectList" :key="index" :label="item.projectinfo"
:value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="任务编号" prop="num">
<el-input v-model="formData.num" clearable placeholder="请输入任务编号" />
<el-input v-model="formData.num" clearable placeholder="请输入任务编号" v-type="'code'" />
</el-form-item>
<el-form-item label="任务名称" prop="name">
<el-input v-model="formData.name" clearable placeholder="请输入任务名称" />