update
This commit is contained in:
parent
1304767f52
commit
0ee3af092f
@ -54,7 +54,7 @@ class FinanceInvoiceApplyController extends BaseAdminController
|
||||
public function add()
|
||||
{
|
||||
$params = (new FinanceInvoiceApplyValidate())->post()->goCheck('add');
|
||||
$result = FinanceInvoiceApplyLogic::add($params,$this->adminId);
|
||||
$result = FinanceInvoiceApplyLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ class FinancePaymentApplyController extends BaseAdminController
|
||||
public function add()
|
||||
{
|
||||
$params = (new FinancePaymentApplyValidate())->post()->goCheck('add');
|
||||
$result = FinancePaymentApplyLogic::add($params,$this->adminId);
|
||||
$result = FinancePaymentApplyLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ class FinancePaymentPlanController extends BaseAdminController
|
||||
public function add()
|
||||
{
|
||||
$params = (new FinancePaymentPlanValidate())->post()->goCheck('add');
|
||||
$result = FinancePaymentPlanLogic::add($params,$this->adminId);
|
||||
$result = FinancePaymentPlanLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ class FinanceReceiptRecordController extends BaseAdminController
|
||||
public function add()
|
||||
{
|
||||
$params = (new FinanceReceiptRecordValidate())->post()->goCheck('add');
|
||||
$result = FinanceReceiptRecordLogic::add($params,$this->adminId);
|
||||
$result = FinanceReceiptRecordLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ class FinanceRefundApplyController extends BaseAdminController
|
||||
public function add()
|
||||
{
|
||||
$params = (new FinanceRefundApplyValidate())->post()->goCheck('add');
|
||||
$result = FinanceRefundApplyLogic::add($params,$this->adminId);
|
||||
$result = FinanceRefundApplyLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ class FinanceRefundRecordController extends BaseAdminController
|
||||
public function add()
|
||||
{
|
||||
$params = (new FinanceRefundRecordValidate())->post()->goCheck('add');
|
||||
$result = FinanceRefundRecordLogic::add($params,$this->adminId);
|
||||
$result = FinanceRefundRecordLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ class FinanceReturnedMoneyController extends BaseAdminController
|
||||
public function add()
|
||||
{
|
||||
$params = (new FinanceReturnedMoneyValidate())->post()->goCheck('add');
|
||||
$result = FinanceReturnedMoneyLogic::add($params,$this->adminId);
|
||||
$result = FinanceReturnedMoneyLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ class FinanceReturnedRecordController extends BaseAdminController
|
||||
public function add()
|
||||
{
|
||||
$params = (new FinanceReturnedRecordValidate())->post()->goCheck('add');
|
||||
$result = FinanceReturnedRecordLogic::add($params,$this->adminId);
|
||||
$result = FinanceReturnedRecordLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
|
@ -18,8 +18,6 @@ namespace app\adminapi\lists\bank;
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\model\bank\BankAccount;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
use app\common\model\dept\Dept;
|
||||
use app\common\model\dept\Orgs;
|
||||
|
||||
|
||||
/**
|
||||
@ -58,16 +56,10 @@ class BankAccountLists extends BaseAdminDataLists implements ListsSearchInterfac
|
||||
public function lists(): array
|
||||
{
|
||||
return BankAccount::where($this->searchWhere)
|
||||
->field('id,org_id,dept_id,account_sn,deposit_bank,account_name,account,account_opening_date,opening_amount,remark')
|
||||
->field('id,account_sn,deposit_bank,account_name,account,account_opening_date,opening_amount,remark')
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
$org = Orgs::field('name')->where('id',$data['org_id'])->findOrEmpty();
|
||||
$dept = Dept::field('name')->where('id',$data['dept_id'])->findOrEmpty();
|
||||
$data['org_name'] = $org['name'];
|
||||
$data['dept_name'] = $dept['name'];
|
||||
return $data;
|
||||
})
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ class FinanceInvoiceApplyLists extends BaseAdminDataLists implements ListsSearch
|
||||
{
|
||||
return [
|
||||
'=' => ['project_id', 'contract_id','invoice_type'],
|
||||
'%like%' => ['invoicing_code'],
|
||||
'%like%' => ['invoicing_code','invoicing_company_name'],
|
||||
];
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ class FinanceInvoiceApplyLists extends BaseAdminDataLists implements ListsSearch
|
||||
$where[] = ['project_id','in',$project_ids];
|
||||
}
|
||||
return FinanceInvoiceApply::where($this->searchWhere)->where($where)
|
||||
->field('id,contract_id,project_id,invoicing_code,invoicing_date,period,tax_rate,invoice_type,invoicing_amount,tax_amount,amount_including_tax')
|
||||
->field('id,contract_id,project_id,invoicing_code,invoicing_date,period,tax_rate,invoice_type,invoicing_amount,tax_amount,amount_including_tax,invoicing_company_name')
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
|
@ -43,8 +43,6 @@ class BankAccountLogic extends BaseLogic
|
||||
Db::startTrans();
|
||||
try {
|
||||
BankAccount::create([
|
||||
'org_id' => $params['org_id'],
|
||||
'dept_id' => $params['dept_id'],
|
||||
'account_sn' => data_unique_code('BANK'),
|
||||
'deposit_bank' => $params['deposit_bank'],
|
||||
'account_name' => $params['account_name'],
|
||||
@ -75,8 +73,6 @@ class BankAccountLogic extends BaseLogic
|
||||
Db::startTrans();
|
||||
try {
|
||||
BankAccount::where('id', $params['id'])->update([
|
||||
'org_id' => $params['org_id'],
|
||||
'dept_id' => $params['dept_id'],
|
||||
'deposit_bank' => $params['deposit_bank'],
|
||||
'account_name' => $params['account_name'],
|
||||
'account' => $params['account'],
|
||||
@ -116,11 +112,7 @@ class BankAccountLogic extends BaseLogic
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = BankAccount::field('id,org_id,dept_id,account_sn,deposit_bank,account_name,account,account_opening_date,opening_amount,remark')->findOrEmpty($params['id']);
|
||||
$org = Orgs::field('name')->where('id',$data['org_id'])->findOrEmpty();
|
||||
$dept = Dept::field('name')->where('id',$data['dept_id'])->findOrEmpty();
|
||||
$data['org_name'] = $org['name'];
|
||||
$data['dept_name'] = $dept['name'];
|
||||
$data = BankAccount::field('id,account_sn,deposit_bank,account_name,account,account_opening_date,opening_amount,remark')->findOrEmpty($params['id']);
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
@ -43,13 +43,13 @@ class FinanceInvoiceApplyLogic extends BaseLogic
|
||||
* @author likeadmin
|
||||
* @date 2023/12/13 15:01
|
||||
*/
|
||||
public static function add(array $params,$admin_id): bool
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
$contract = Contract::field('project_id')->where('id',$params['contract_id'])->findOrEmpty();
|
||||
$tax_rate = DictData::where('type_value','tax_rate')->column('name','value');
|
||||
Db::startTrans();
|
||||
try {
|
||||
$res = FinanceInvoiceApply::create([
|
||||
FinanceInvoiceApply::create([
|
||||
'project_id' => $contract['project_id'],
|
||||
'contract_id' => $params['contract_id'],
|
||||
'invoicing_code' => data_unique_code('开票申请'),
|
||||
|
@ -43,7 +43,7 @@ class FinancePaymentApplyLogic extends BaseLogic
|
||||
* @author likeadmin
|
||||
* @date 2023/12/15 13:47
|
||||
*/
|
||||
public static function add(array $params,$admin_id): bool
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
if($params['contract_cate'] == 1){
|
||||
$contract = ProcurementContract::field('project_id')->where('id',$params['contract_id'])->findOrEmpty()->toArray();
|
||||
@ -55,7 +55,7 @@ class FinancePaymentApplyLogic extends BaseLogic
|
||||
}
|
||||
Db::startTrans();
|
||||
try {
|
||||
$res = FinancePaymentApply::create([
|
||||
FinancePaymentApply::create([
|
||||
'payment_apply_code' => data_unique_code('付款申请'),
|
||||
'supplier_id' => $params['supplier_id'],
|
||||
'project_id' => $contract['project_id'],
|
||||
|
@ -41,7 +41,7 @@ class FinancePaymentPlanLogic extends BaseLogic
|
||||
* @author likeadmin
|
||||
* @date 2023/12/15 11:14
|
||||
*/
|
||||
public static function add(array $params,$admin_id): bool
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
if($params['contract_cate'] == 1){
|
||||
$contract = ProcurementContract::field('project_id')->where('id',$params['contract_id'])->findOrEmpty()->toArray();
|
||||
@ -53,7 +53,7 @@ class FinancePaymentPlanLogic extends BaseLogic
|
||||
}
|
||||
Db::startTrans();
|
||||
try {
|
||||
$res = FinancePaymentPlan::create([
|
||||
FinancePaymentPlan::create([
|
||||
'supplier_id' => $params['supplier_id'],
|
||||
'project_id' => $contract['project_id'],
|
||||
'contract_id' => $params['contract_id'],
|
||||
|
@ -42,7 +42,7 @@ class FinanceReceiptRecordLogic extends BaseLogic
|
||||
* @author likeadmin
|
||||
* @date 2023/12/15 10:20
|
||||
*/
|
||||
public static function add(array $params,$admin_id): bool
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
if($params['contract_cate'] == 1){
|
||||
$contract = ProcurementContract::field('project_id')->where('id',$params['contract_id'])->findOrEmpty()->toArray();
|
||||
@ -55,7 +55,7 @@ class FinanceReceiptRecordLogic extends BaseLogic
|
||||
$tax_rate = DictData::where('type_value','tax_rate')->column('name','value');
|
||||
Db::startTrans();
|
||||
try {
|
||||
$res = FinanceReceiptRecord::create([
|
||||
FinanceReceiptRecord::create([
|
||||
'supplier_id' => $params['supplier_id'],
|
||||
'project_id' => $contract['project_id'],
|
||||
'contract_id' => $params['contract_id'],
|
||||
|
@ -41,12 +41,12 @@ class FinanceRefundApplyLogic extends BaseLogic
|
||||
* @author likeadmin
|
||||
* @date 2023/12/14 16:58
|
||||
*/
|
||||
public static function add(array $params,$admin_id): bool
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
$contract = Contract::field('project_id')->where('id',$params['contract_id'])->findOrEmpty();
|
||||
Db::startTrans();
|
||||
try {
|
||||
$res = FinanceRefundApply::create([
|
||||
FinanceRefundApply::create([
|
||||
'refund_code' => data_unique_code('退款申请'),
|
||||
'project_id' => $contract['project_id'],
|
||||
'contract_id' => $params['contract_id'],
|
||||
|
@ -42,7 +42,7 @@ class FinanceRefundRecordLogic extends BaseLogic
|
||||
* @author likeadmin
|
||||
* @date 2023/12/15 14:41
|
||||
*/
|
||||
public static function add(array $params,$admin_id): bool
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
if($params['contract_cate'] == 1){
|
||||
$contract = ProcurementContract::field('project_id')->where('id',$params['contract_id'])->findOrEmpty()->toArray();
|
||||
@ -54,7 +54,7 @@ class FinanceRefundRecordLogic extends BaseLogic
|
||||
}
|
||||
Db::startTrans();
|
||||
try {
|
||||
$res = FinanceRefundRecord::create([
|
||||
FinanceRefundRecord::create([
|
||||
'supplier_id' => $params['supplier_id'],
|
||||
'project_id' => $contract['project_id'],
|
||||
'contract_type' => $params['contract_cate'],
|
||||
|
@ -41,12 +41,12 @@ class FinanceReturnedMoneyLogic extends BaseLogic
|
||||
* @author likeadmin
|
||||
* @date 2023/12/13 15:38
|
||||
*/
|
||||
public static function add(array $params,$admin_id): bool
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
$contract = Contract::field('project_id')->where('id',$params['contract_id'])->findOrEmpty();
|
||||
Db::startTrans();
|
||||
try {
|
||||
$res = FinanceReturnedMoney::create([
|
||||
FinanceReturnedMoney::create([
|
||||
'project_id' => $contract['project_id'],
|
||||
'contract_id' => $params['contract_id'],
|
||||
'return_date' => strtotime($params['return_date']),
|
||||
|
@ -42,12 +42,12 @@ class FinanceReturnedRecordLogic extends BaseLogic
|
||||
* @author likeadmin
|
||||
* @date 2023/12/13 16:28
|
||||
*/
|
||||
public static function add(array $params,$admin_id): bool
|
||||
public static function add(array $params): bool
|
||||
{
|
||||
$contract = Contract::field('project_id')->where('id',$params['contract_id'])->findOrEmpty();
|
||||
Db::startTrans();
|
||||
try {
|
||||
$res = FinanceReturnedRecord::create([
|
||||
FinanceReturnedRecord::create([
|
||||
'project_id' => $contract['project_id'],
|
||||
'contract_id' => $params['contract_id'],
|
||||
'finance_returned_money_id' => $params['finance_returned_money_id'],
|
||||
|
@ -14,9 +14,6 @@
|
||||
|
||||
namespace app\adminapi\validate\bank;
|
||||
|
||||
|
||||
use app\common\model\dept\Dept;
|
||||
use app\common\model\dept\Orgs;
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
@ -34,8 +31,6 @@ class BankAccountValidate extends BaseValidate
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require',
|
||||
'org_id' => 'require|checkOrg',
|
||||
'dept_id' => 'require|checkDept',
|
||||
'deposit_bank' => 'require',
|
||||
'account_name' => 'require',
|
||||
'account' => 'require',
|
||||
@ -50,8 +45,6 @@ class BankAccountValidate extends BaseValidate
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'org_id' => '组织',
|
||||
'dept_id' => '部门',
|
||||
'deposit_bank' => '开户银行',
|
||||
'account_name' => '开户名称',
|
||||
'account' => '账号',
|
||||
@ -104,26 +97,5 @@ class BankAccountValidate extends BaseValidate
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function checkOrg($value): bool|string
|
||||
{
|
||||
$org = Orgs::where('id',$value)->findOrEmpty();
|
||||
if($org->isEmpty()){
|
||||
return '组织不存在';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkDept($value,$rule,$data): bool|string
|
||||
{
|
||||
$dept = Dept::where('id',$value)->findOrEmpty();
|
||||
if($dept->isEmpty()){
|
||||
return '部门不存在';
|
||||
}
|
||||
if($dept['org_id'] != $data['org_id']){
|
||||
return '部门无效';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -96,7 +96,7 @@ class BidSecurityApplyValidate extends BaseValidate
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
@ -145,15 +145,5 @@ class BidSecurityApplyValidate extends BaseValidate
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkAnnex($value): bool|string
|
||||
{
|
||||
if(!empty($value) && $value != ''){
|
||||
if(!is_array($value)){
|
||||
return '附件格式错误';
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -90,7 +90,7 @@ class BidSecurityRefundValidate extends BaseValidate
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
@ -128,16 +128,6 @@ class BidSecurityRefundValidate extends BaseValidate
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkAnnex($value): bool|string
|
||||
{
|
||||
if(!empty($value) && $value != ''){
|
||||
if(!is_array($value)){
|
||||
return '附件格式错误';
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkBankAccount($value): bool|string
|
||||
{
|
||||
$data = BankAccount::where('id',$value)->findOrEmpty();
|
||||
|
@ -96,7 +96,7 @@ class FinanceInvoiceApplyValidate extends BaseValidate
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
@ -160,15 +160,5 @@ class FinanceInvoiceApplyValidate extends BaseValidate
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkAnnex($value): bool|string
|
||||
{
|
||||
if(!empty($value) && $value != ''){
|
||||
if(!is_array($value)){
|
||||
return '附件格式错误';
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -112,7 +112,7 @@ class FinancePaymentApplyValidate extends BaseValidate
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
@ -207,16 +207,6 @@ class FinancePaymentApplyValidate extends BaseValidate
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkAnnex($value): bool|string
|
||||
{
|
||||
if(!empty($value) && $value != ''){
|
||||
if(!is_array($value)){
|
||||
return '附件格式错误';
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkBankAccount($value): bool|string
|
||||
{
|
||||
$bank = BankAccount::where('id',$value)->findOrEmpty();
|
||||
|
@ -98,7 +98,7 @@ class FinancePaymentPlanValidate extends BaseValidate
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
@ -171,15 +171,5 @@ class FinancePaymentPlanValidate extends BaseValidate
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkAnnex($value): bool|string
|
||||
{
|
||||
if(!empty($value) && $value != ''){
|
||||
if(!is_array($value)){
|
||||
return '附件格式错误';
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -99,7 +99,7 @@ class FinanceReceiptRecordValidate extends BaseValidate
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
@ -172,15 +172,5 @@ class FinanceReceiptRecordValidate extends BaseValidate
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkAnnex($value): bool|string
|
||||
{
|
||||
if(!empty($value) && $value != ''){
|
||||
if(!is_array($value)){
|
||||
return '附件格式错误';
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -99,7 +99,7 @@ class FinanceRefundApplyValidate extends BaseValidate
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
@ -146,16 +146,6 @@ class FinanceRefundApplyValidate extends BaseValidate
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkAnnex($value): bool|string
|
||||
{
|
||||
if(!empty($value) && $value != ''){
|
||||
if(!is_array($value)){
|
||||
return '附件格式错误';
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkBankAccount($value): bool|string
|
||||
{
|
||||
$bank = BankAccount::where('id',$value)->findOrEmpty();
|
||||
|
@ -99,7 +99,7 @@ class FinanceRefundRecordValidate extends BaseValidate
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
|
@ -35,7 +35,7 @@ class FinanceReturnedMoneyValidate extends BaseValidate
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require',
|
||||
'id' => 'require|checkData',
|
||||
'contract_id' => 'require|checkContract',
|
||||
'return_date' => 'require|dateFormat:Y-m-d',
|
||||
'period' => 'require|checkPeriod',
|
||||
@ -95,7 +95,7 @@ class FinanceReturnedMoneyValidate extends BaseValidate
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
@ -159,15 +159,5 @@ class FinanceReturnedMoneyValidate extends BaseValidate
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkAnnex($value): bool|string
|
||||
{
|
||||
if(!empty($value) && $value != ''){
|
||||
if(!is_array($value)){
|
||||
return '附件格式错误';
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -100,7 +100,7 @@ class FinanceReturnedRecordValidate extends BaseValidate
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
return $this->only(['id'])->remove('id','checkData');
|
||||
}
|
||||
|
||||
|
||||
@ -177,16 +177,6 @@ class FinanceReturnedRecordValidate extends BaseValidate
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkAnnex($value): bool|string
|
||||
{
|
||||
if(!empty($value) && $value != ''){
|
||||
if(!is_array($value)){
|
||||
return '附件格式错误';
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkBankAccount($value): bool|string
|
||||
{
|
||||
$bank = BankAccount::where('id',$value)->findOrEmpty();
|
||||
|
@ -31,10 +31,6 @@ class BidSecurityApply extends BaseModel
|
||||
use SoftDelete;
|
||||
protected $name = 'bid_security_apply';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getAnnexAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
|
||||
public function getRefundDateAttr($value): string
|
||||
{
|
||||
|
@ -30,10 +30,6 @@ class BidSecurityRefund extends BaseModel
|
||||
protected $name = 'bid_security_refund';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getAnnexAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
|
||||
public function getRefundDateAttr($value): string
|
||||
{
|
||||
return !empty($value) ? date('Y-m-d',$value) : '';
|
||||
|
@ -31,10 +31,6 @@ class FinanceInvoiceApply extends BaseModel
|
||||
protected $name = 'finance_invoice_apply';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getAnnexAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
|
||||
public function getInvoicingDateAttr($value): string
|
||||
{
|
||||
return !empty($value) ? date('Y-m-d',$value) : '';
|
||||
|
@ -31,10 +31,6 @@ class FinancePaymentApply extends BaseModel
|
||||
protected $name = 'finance_payment_apply';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getAnnexAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
|
||||
public function getContractTypeTextAttr($value,$data): string
|
||||
{
|
||||
$type = [1=>'采购合同',2=>'分包合同'];
|
||||
|
@ -31,10 +31,6 @@ class FinancePaymentPlan extends BaseModel
|
||||
protected $name = 'finance_payment_plan';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getAnnexAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
|
||||
public function getContractTypeTextAttr($value,$data): string
|
||||
{
|
||||
$type = [1=>'采购合同',2=>'分包合同'];
|
||||
|
@ -31,10 +31,6 @@ class FinanceReceiptRecord extends BaseModel
|
||||
protected $name = 'finance_receipt_record';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getAnnexAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
|
||||
public function getInvoicingDateAttr($value): string
|
||||
{
|
||||
return !empty($value) ? date('Y-m-d',$value) : '';
|
||||
|
@ -31,10 +31,6 @@ class FinanceRefundApply extends BaseModel
|
||||
protected $name = 'finance_refund_apply';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getAnnexAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
|
||||
public function getRefundTypeTextAttr($value,$data){
|
||||
$dict = DictData::where('type_value','refund_type')->column('name','value');
|
||||
return !empty($data['refund_type']) ? $dict[$data['refund_type']] : '';
|
||||
|
@ -31,10 +31,6 @@ class FinanceRefundRecord extends BaseModel
|
||||
protected $name = 'finance_refund_record';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getAnnexAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
|
||||
public function getContractTypeTextAttr($value,$data): string
|
||||
{
|
||||
$type = [1=>'采购合同',2=>'分包合同'];
|
||||
|
@ -31,10 +31,6 @@ class FinanceReturnedMoney extends BaseModel
|
||||
protected $name = 'finance_returned_money';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getAnnexAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
|
||||
public function getPeriodTextAttr($value,$data){
|
||||
$dict = DictData::where('type_value','pay_period')->column('name','value');
|
||||
return !empty($data['period']) ? $dict[$data['period']] : '';
|
||||
|
@ -31,10 +31,6 @@ class FinanceReturnedRecord extends BaseModel
|
||||
protected $name = 'finance_returned_record';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getAnnexAttr($value){
|
||||
return !empty($value) ? json_decode($value,true) : '';
|
||||
}
|
||||
|
||||
public function getCollectionTypeTextAttr($value,$data){
|
||||
$dict = DictData::where('type_value','collection_type')->column('name','value');
|
||||
return !empty($data['collection_type']) ? $dict[$data['collection_type']] : '';
|
||||
|
Loading…
x
Reference in New Issue
Block a user