update
This commit is contained in:
parent
33dc29bd2e
commit
5e8ce86683
app
adminapi
logic
bid
contract
finance
FinanceInvoiceApplyLogic.phpFinancePaymentApplyLogic.phpFinancePaymentPlanLogic.phpFinanceReceiptRecordLogic.phpFinanceRefundApplyLogic.phpFinanceRefundRecordLogic.phpFinanceReturnedMoneyLogic.phpFinanceReturnedRecordLogic.php
material
project
ProjectCostAdjustmentLogic.phpProjectCostBudgetLogic.phpProjectEquipmentBudgetLogic.phpProjectExpenseReimbursementLogic.phpProjectLaborBudgetLogic.phpProjectLoanApplyLogic.phpProjectMaterialBudgetLogic.phpProjectSettlementLogic.phpProjectSubcontractSettlementLogic.phpProjectSubpackageBudgetLogic.phpProjectTotalBudgetLogic.phpProjectTravelReimbursementLogic.phpProjectTripApplyLogic.php
validate
bid
contract
finance
FinanceInvoiceApplyValidate.phpFinancePaymentApplyValidate.phpFinancePaymentPlanValidate.phpFinanceReceiptRecordValidate.phpFinanceRefundApplyValidate.phpFinanceRefundRecordValidate.phpFinanceReturnedMoneyValidate.phpFinanceReturnedRecordValidate.php
material
project
ProjectCostAdjustmentValidate.phpProjectCostBudgetValidate.phpProjectEquipmentBudgetValidate.phpProjectExpenseReimbursementValidate.phpProjectLaborBudgetValidate.phpProjectLoanApplyValidate.phpProjectMaterialBudgetValidate.phpProjectSettlementValidate.phpProjectSubcontractSettlementValidate.phpProjectSubpackageBudgetValidate.phpProjectTotalBudgetValidate.phpProjectTravelReimbursementValidate.phpProjectTripApplyValidate.php
common/validate
@ -79,17 +79,6 @@ class BidDocumentExaminationLogic extends BaseLogic
|
||||
]);
|
||||
}
|
||||
}
|
||||
//添加审批信息
|
||||
addApprove(
|
||||
'标书审查',
|
||||
$res->id,
|
||||
'app\common\model\bid\BidDocumentExamination',
|
||||
'app\adminapi\logic\bid\BidDocumentExaminationLogic',
|
||||
$params['approve_detail']['path'],
|
||||
$params['approve_detail']['flow_type'],
|
||||
$params['approve_detail']['flow_path'],
|
||||
$admin_id
|
||||
);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
@ -70,17 +70,6 @@ class ContractNegotiationLogic extends BaseLogic
|
||||
'negotiation_quotation' => !empty($params['negotiation_quotation']) ? $params['negotiation_quotation'] : null,
|
||||
'negotiation_basis' => !empty($params['negotiation_basis']) ? $params['negotiation_basis'] : null,
|
||||
]);
|
||||
//添加审批信息
|
||||
addApprove(
|
||||
'项目合同洽商',
|
||||
$res->id,
|
||||
'app\common\model\contract\ContractNegotiation',
|
||||
'app\adminapi\logic\contract\ContractNegotiationLogic',
|
||||
$params['approve_detail']['path'],
|
||||
$params['approve_detail']['flow_type'],
|
||||
$params['approve_detail']['flow_path'],
|
||||
$admin_id
|
||||
);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
@ -59,17 +59,6 @@ class SubcontractingContractNegotiationLogic extends BaseLogic
|
||||
'negotiation_quotation' => $params['negotiation_quotation'] ? json_encode($params['negotiation_quotation']) : null,
|
||||
'negotiation_basis' => $params['negotiation_basis'] ? json_encode($params['negotiation_basis']) : null,
|
||||
]);
|
||||
//添加审批信息
|
||||
addApprove(
|
||||
'分包合同洽商',
|
||||
$res->id,
|
||||
'app\common\model\contract\SubcontractingContractNegotiation',
|
||||
'app\adminapi\logic\contract\SubcontractingContractNegotiationLogic',
|
||||
$params['approve_detail']['path'],
|
||||
$params['approve_detail']['flow_type'],
|
||||
$params['approve_detail']['flow_path'],
|
||||
$admin_id
|
||||
);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
@ -76,17 +76,6 @@ class FinanceInvoiceApplyLogic extends BaseLogic
|
||||
'mailing_type' => $params['mailing_type'] ?? '',
|
||||
'mailing_no' => $params['mailing_no'] ?? '',
|
||||
]);
|
||||
//添加审批信息
|
||||
addApprove(
|
||||
'开票申请',
|
||||
$res->id,
|
||||
'app\common\model\finance\FinanceInvoiceApply',
|
||||
'app\adminapi\logic\finance\FinanceInvoiceApplyLogic',
|
||||
$params['approve_detail']['path'],
|
||||
$params['approve_detail']['flow_type'],
|
||||
$params['approve_detail']['flow_path'],
|
||||
$admin_id
|
||||
);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
@ -76,17 +76,6 @@ class FinancePaymentApplyLogic extends BaseLogic
|
||||
'payee_account' => $params['payee_account'],
|
||||
'bank_account_id' => $params['bank_account_id'],
|
||||
]);
|
||||
//添加审批信息
|
||||
addApprove(
|
||||
'付款申请',
|
||||
$res->id,
|
||||
'app\common\model\finance\FinancePaymentApply',
|
||||
'app\adminapi\logic\finance\FinancePaymentApplyLogic',
|
||||
$params['approve_detail']['path'],
|
||||
$params['approve_detail']['flow_type'],
|
||||
$params['approve_detail']['flow_path'],
|
||||
$admin_id
|
||||
);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
@ -66,17 +66,6 @@ class FinancePaymentPlanLogic extends BaseLogic
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => $params['annex'] ? json_encode($params['annex']) : null,
|
||||
]);
|
||||
//添加审批信息
|
||||
addApprove(
|
||||
'付款计划',
|
||||
$res->id,
|
||||
'app\common\model\finance\FinancePaymentPlan',
|
||||
'app\adminapi\logic\finance\FinancePaymentPlanLogic',
|
||||
$params['approve_detail']['path'],
|
||||
$params['approve_detail']['flow_type'],
|
||||
$params['approve_detail']['flow_path'],
|
||||
$admin_id
|
||||
);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
@ -72,17 +72,6 @@ class FinanceReceiptRecordLogic extends BaseLogic
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
||||
]);
|
||||
//添加审批信息
|
||||
addApprove(
|
||||
'收票记录',
|
||||
$res->id,
|
||||
'app\common\model\finance\FinanceReceiptRecord',
|
||||
'app\adminapi\logic\finance\FinanceReceiptRecordLogic',
|
||||
$params['approve_detail']['path'],
|
||||
$params['approve_detail']['flow_type'],
|
||||
$params['approve_detail']['flow_path'],
|
||||
$admin_id
|
||||
);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
@ -61,17 +61,6 @@ class FinanceRefundApplyLogic extends BaseLogic
|
||||
'collection_account' => $params['collection_account'],
|
||||
'bank_account_id' => $params['bank_account_id'],
|
||||
]);
|
||||
//添加审批信息
|
||||
addApprove(
|
||||
'项目退款申请',
|
||||
$res->id,
|
||||
'app\common\model\finance\FinanceRefundApply',
|
||||
'app\adminapi\logic\finance\FinanceRefundApplyLogic',
|
||||
$params['approve_detail']['path'],
|
||||
$params['approve_detail']['flow_type'],
|
||||
$params['approve_detail']['flow_path'],
|
||||
$admin_id
|
||||
);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
@ -67,17 +67,6 @@ class FinanceRefundRecordLogic extends BaseLogic
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
||||
'bank_account_id' => $params['bank_account_id'],
|
||||
]);
|
||||
//添加审批信息
|
||||
addApprove(
|
||||
'退款记录',
|
||||
$res->id,
|
||||
'app\common\model\finance\FinanceRefundRecord',
|
||||
'app\adminapi\logic\finance\FinanceRefundRecordLogic',
|
||||
$params['approve_detail']['path'],
|
||||
$params['approve_detail']['flow_type'],
|
||||
$params['approve_detail']['flow_path'],
|
||||
$admin_id
|
||||
);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
@ -57,17 +57,6 @@ class FinanceReturnedMoneyLogic extends BaseLogic
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
||||
]);
|
||||
//添加审批信息
|
||||
addApprove(
|
||||
'项目回款计划',
|
||||
$res->id,
|
||||
'app\common\model\finance\FinanceReturnedMoney',
|
||||
'app\adminapi\logic\finance\FinanceReturnedMoneyLogic',
|
||||
$params['approve_detail']['path'],
|
||||
$params['approve_detail']['flow_type'],
|
||||
$params['approve_detail']['flow_path'],
|
||||
$admin_id
|
||||
);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
@ -62,17 +62,6 @@ class FinanceReturnedRecordLogic extends BaseLogic
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
||||
'bank_account_id' => $params['bank_account_id'],
|
||||
]);
|
||||
//添加审批信息
|
||||
addApprove(
|
||||
'项目回款记录',
|
||||
$res->id,
|
||||
'app\common\model\finance\FinanceReturnedRecord',
|
||||
'app\adminapi\logic\finance\FinanceReturnedRecordLogic',
|
||||
$params['approve_detail']['path'],
|
||||
$params['approve_detail']['flow_type'],
|
||||
$params['approve_detail']['flow_path'],
|
||||
$admin_id
|
||||
);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
@ -72,17 +72,6 @@ class MaterialPurchaseRequestLogic extends BaseLogic
|
||||
ProjectMaterialBudgetDetail::where('id',$item['project_material_budget_detail_id'])->update(['is_residual'=>1,'update_time'=>time()]);
|
||||
}
|
||||
}
|
||||
//添加审批信息
|
||||
addApprove(
|
||||
'采购申请',
|
||||
$MaterialPurchaseRequestRes->id,
|
||||
'app\common\model\material\MaterialPurchaseRequest',
|
||||
'app\adminapi\logic\material\MaterialPurchaseRequestLogic',
|
||||
$params['approve_detail']['path'],
|
||||
$params['approve_detail']['flow_type'],
|
||||
$params['approve_detail']['flow_path'],
|
||||
$admin_id
|
||||
);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
@ -52,17 +52,6 @@ class ProjectCostAdjustmentLogic extends BaseLogic
|
||||
'add_user' => $admin_id,
|
||||
'update_user' => $admin_id,
|
||||
]);
|
||||
//添加审批信息
|
||||
addApprove(
|
||||
'成本调整',
|
||||
$res->id,
|
||||
'app\common\model\project\ProjectCostAdjustment',
|
||||
'app\adminapi\logic\project\ProjectCostAdjustmentLogic',
|
||||
$params['approve_detail']['path'],
|
||||
$params['approve_detail']['flow_type'],
|
||||
$params['approve_detail']['flow_path'],
|
||||
$admin_id
|
||||
);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
@ -65,17 +65,6 @@ class ProjectCostBudgetLogic extends BaseLogic
|
||||
'remark' => $item['remark'] ?? '',
|
||||
]);
|
||||
}
|
||||
//添加审批信息
|
||||
addApprove(
|
||||
'项目费用预算',
|
||||
$res->id,
|
||||
'app\common\model\project\ProjectCostBudget',
|
||||
'app\adminapi\logic\project\ProjectCostBudgetLogic',
|
||||
$params['approve_detail']['path'],
|
||||
$params['approve_detail']['flow_type'],
|
||||
$params['approve_detail']['flow_path'],
|
||||
$admin_id
|
||||
);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
@ -68,17 +68,6 @@ class ProjectEquipmentBudgetLogic extends BaseLogic
|
||||
'remark' => $item['remark'] ?? '',
|
||||
]);
|
||||
}
|
||||
//添加审批信息
|
||||
addApprove(
|
||||
'项目机具预算',
|
||||
$res->id,
|
||||
'app\common\model\project\ProjectEquipmentBudget',
|
||||
'app\adminapi\logic\project\ProjectEquipmentBudgetLogic',
|
||||
$params['approve_detail']['path'],
|
||||
$params['approve_detail']['flow_type'],
|
||||
$params['approve_detail']['flow_path'],
|
||||
$admin_id
|
||||
);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
@ -85,17 +85,6 @@ class ProjectExpenseReimbursementLogic extends BaseLogic
|
||||
'remark' => $item['remark'] ?? '',
|
||||
]);
|
||||
}
|
||||
//添加审批信息
|
||||
addApprove(
|
||||
'费用报销',
|
||||
$res->id,
|
||||
'app\common\model\project\ProjectExpenseReimbursement',
|
||||
'app\adminapi\logic\project\ProjectExpenseReimbursementLogic',
|
||||
$params['approve_detail']['path'],
|
||||
$params['approve_detail']['flow_type'],
|
||||
$params['approve_detail']['flow_path'],
|
||||
$admin_id
|
||||
);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
@ -66,17 +66,6 @@ class ProjectLaborBudgetLogic extends BaseLogic
|
||||
'remark' => $item['remark'] ?? '',
|
||||
]);
|
||||
}
|
||||
//添加审批信息
|
||||
addApprove(
|
||||
'项目人工预算',
|
||||
$res->id,
|
||||
'app\common\model\project\ProjectLaborBudget',
|
||||
'app\adminapi\logic\project\ProjectLaborBudgetLogic',
|
||||
$params['approve_detail']['path'],
|
||||
$params['approve_detail']['flow_type'],
|
||||
$params['approve_detail']['flow_path'],
|
||||
$admin_id
|
||||
);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
@ -56,17 +56,6 @@ class ProjectLoanApplyLogic extends BaseLogic
|
||||
'annex' => $params['annex'] ? json_encode($params['annex']) : null,
|
||||
'bank_account_id' => $params['bank_account_id'],
|
||||
]);
|
||||
//添加审批信息
|
||||
addApprove(
|
||||
'借款申请',
|
||||
$res->id,
|
||||
'app\common\model\project\ProjectLoanApply',
|
||||
'app\adminapi\logic\project\ProjectLoanApplyLogic',
|
||||
$params['approve_detail']['path'],
|
||||
$params['approve_detail']['flow_type'],
|
||||
$params['approve_detail']['flow_path'],
|
||||
$admin_id
|
||||
);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
@ -67,17 +67,6 @@ class ProjectMaterialBudgetLogic extends BaseLogic
|
||||
'remark' => $item['remark'] ?? '',
|
||||
]);
|
||||
}
|
||||
//添加审批信息
|
||||
addApprove(
|
||||
'项目材料结算',
|
||||
$project_material_budget->id,
|
||||
'app\common\model\project\ProjectMaterialBudget',
|
||||
'app\adminapi\logic\project\ProjectMaterialBudgetLogic',
|
||||
$params['approve_detail']['path'],
|
||||
$params['approve_detail']['flow_type'],
|
||||
$params['approve_detail']['flow_path'],
|
||||
$admin_id
|
||||
);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
@ -55,17 +55,6 @@ class ProjectSettlementLogic extends BaseLogic
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
||||
'add_user' => $admin_id
|
||||
]);
|
||||
//添加审批信息
|
||||
addApprove(
|
||||
'项目结算',
|
||||
$res->id,
|
||||
'app\common\model\project\ProjectSettlement',
|
||||
'app\adminapi\logic\project\ProjectSettlementLogic',
|
||||
$params['approve_detail']['path'],
|
||||
$params['approve_detail']['flow_type'],
|
||||
$params['approve_detail']['flow_path'],
|
||||
$admin_id
|
||||
);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
@ -55,17 +55,6 @@ class ProjectSubcontractSettlementLogic extends BaseLogic
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
||||
'add_user' => $admin_id,
|
||||
]);
|
||||
//添加审批信息
|
||||
addApprove(
|
||||
'分包结算',
|
||||
$res->id,
|
||||
'app\common\model\project\ProjectSubcontractSettlement',
|
||||
'app\adminapi\logic\project\ProjectSubcontractSettlementLogic',
|
||||
$params['approve_detail']['path'],
|
||||
$params['approve_detail']['flow_type'],
|
||||
$params['approve_detail']['flow_path'],
|
||||
$admin_id
|
||||
);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
@ -68,17 +68,6 @@ class ProjectSubpackageBudgetLogic extends BaseLogic
|
||||
'remark' => $item['remark'] ?? '',
|
||||
]);
|
||||
}
|
||||
//添加审批信息
|
||||
addApprove(
|
||||
'项目分包预算',
|
||||
$res->id,
|
||||
'app\common\model\project\ProjectSubpackageBudget',
|
||||
'app\adminapi\logic\project\ProjectSubpackageBudgetLogic',
|
||||
$params['approve_detail']['path'],
|
||||
$params['approve_detail']['flow_type'],
|
||||
$params['approve_detail']['flow_path'],
|
||||
$admin_id
|
||||
);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
@ -64,17 +64,6 @@ class ProjectTotalBudgetLogic extends BaseLogic
|
||||
'is_budget' => 1,
|
||||
'update_time' => time(),
|
||||
]);
|
||||
//添加审批信息
|
||||
addApprove(
|
||||
'项目总预算',
|
||||
$res->id,
|
||||
'app\common\model\project\ProjectTotalBudget',
|
||||
'app\adminapi\logic\project\ProjectTotalBudgetLogic',
|
||||
$params['approve_detail']['path'],
|
||||
$params['approve_detail']['flow_type'],
|
||||
$params['approve_detail']['flow_path'],
|
||||
$admin_id
|
||||
);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
@ -95,17 +95,6 @@ class ProjectTravelReimbursementLogic extends BaseLogic
|
||||
'remark' => $item['remark'] ?? '',
|
||||
]);
|
||||
}
|
||||
//添加审批信息
|
||||
addApprove(
|
||||
'差旅报销',
|
||||
$res->id,
|
||||
'app\common\model\project\ProjectTravelReimbursement',
|
||||
'app\adminapi\logic\project\ProjectTravelReimbursementLogic',
|
||||
$params['approve_detail']['path'],
|
||||
$params['approve_detail']['flow_type'],
|
||||
$params['approve_detail']['flow_path'],
|
||||
$admin_id
|
||||
);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
@ -57,17 +57,6 @@ class ProjectTripApplyLogic extends BaseLogic
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => $params['annex'] ? json_encode($params['annex']) : null,
|
||||
]);
|
||||
//添加审批信息
|
||||
addApprove(
|
||||
'出差申请',
|
||||
$res->id,
|
||||
'app\common\model\project\ProjectTripApply',
|
||||
'app\adminapi\logic\project\ProjectTripApplyLogic',
|
||||
$params['approve_detail']['path'],
|
||||
$params['approve_detail']['flow_type'],
|
||||
$params['approve_detail']['flow_path'],
|
||||
$admin_id
|
||||
);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
@ -41,13 +41,11 @@ class BidDocumentExaminationValidate extends BaseValidate
|
||||
'tax_rate' => 'checkTaxRate',
|
||||
'pay_type' => 'checkPayType',
|
||||
'quotation_detail' => 'checkQuotationDetail',
|
||||
'approve_detail' => 'require|checkApproveDetail',
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
'id.require' => '缺少必要参数',
|
||||
'buy_bidding_document_id.require' => '请选择标书编号',
|
||||
'approve_detail.require' => '请填写审批流程信息',
|
||||
];
|
||||
|
||||
|
||||
|
@ -48,7 +48,6 @@ class ContractNegotiationValidate extends BaseValidate
|
||||
'warranty_expire_date' => 'dateFormat:Y-m-d',
|
||||
'negotiation_quotation' => 'checkAnnex',
|
||||
'negotiation_basis' => 'checkAnnex',
|
||||
'approve_detail' => 'require|checkApproveDetail',
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
@ -68,7 +67,6 @@ class ContractNegotiationValidate extends BaseValidate
|
||||
'warranty_amount.float' => '洽商质保金额值必须是数字',
|
||||
'warranty_amount.egt' => '洽商质保金额值必须大于等于0',
|
||||
'warranty_expire_date.dateFormat' => '洽商质保到期时间数据格式错误',
|
||||
'approve_detail.require' => '请填写审批流程信息',
|
||||
];
|
||||
|
||||
|
||||
|
@ -43,7 +43,6 @@ class SubcontractingContractNegotiationValidate extends BaseValidate
|
||||
'warranty_expire_date' => 'dateFormat:Y-m-d',
|
||||
'negotiation_quotation' => 'checkAnnex',
|
||||
'negotiation_basis' => 'checkAnnex',
|
||||
'approve_detail' => 'require|checkApproveDetail',
|
||||
];
|
||||
|
||||
|
||||
@ -60,7 +59,6 @@ class SubcontractingContractNegotiationValidate extends BaseValidate
|
||||
'negotiation_type' => '洽商类别',
|
||||
'warranty_amount' => '洽商质保金额',
|
||||
'warranty_expire_date' => '洽商质保到期时间',
|
||||
'approve_detail' => '审批流程'
|
||||
];
|
||||
|
||||
|
||||
|
@ -42,7 +42,6 @@ class FinanceInvoiceApplyValidate extends BaseValidate
|
||||
'invoice_type' => 'require|checkInvoiceType',
|
||||
'invoicing_amount' => 'require|float|gt:0',
|
||||
'annex' => 'checkAnnex',
|
||||
'approve_detail' => 'require|checkApproveDetail',
|
||||
];
|
||||
|
||||
|
||||
@ -59,7 +58,6 @@ class FinanceInvoiceApplyValidate extends BaseValidate
|
||||
'tax_rate' => '税率',
|
||||
'invoice_type' => '发票类型',
|
||||
'invoicing_amount' => '开票金额(含税)',
|
||||
'approve_detail' => '审批流程'
|
||||
];
|
||||
|
||||
|
||||
|
@ -52,7 +52,6 @@ class FinancePaymentApplyValidate extends BaseValidate
|
||||
'payee_account_name' => 'require',
|
||||
'payee_account' => 'require',
|
||||
'bank_account_id' => 'require|checkBankAccount',
|
||||
'approve_detail' => 'require|checkApproveDetail',
|
||||
];
|
||||
|
||||
|
||||
@ -75,7 +74,6 @@ class FinancePaymentApplyValidate extends BaseValidate
|
||||
'payee_account_name' => '收款人开户名称',
|
||||
'payee_account' => '收款人账号',
|
||||
'bank_account_id' => '付款银行账户id',
|
||||
'approve_detail' => '审批流程'
|
||||
];
|
||||
|
||||
|
||||
|
@ -44,7 +44,6 @@ class FinancePaymentPlanValidate extends BaseValidate
|
||||
'amount' => 'require|float|gt:0',
|
||||
'status' => 'require|checkStatus',
|
||||
'annex' => 'checkAnnex',
|
||||
'approve_detail' => 'require|checkApproveDetail',
|
||||
];
|
||||
|
||||
|
||||
@ -61,7 +60,6 @@ class FinancePaymentPlanValidate extends BaseValidate
|
||||
'pay_date' => '计划付款日期',
|
||||
'amount' => '金额',
|
||||
'status' => '状态',
|
||||
'approve_detail' => '审批流程'
|
||||
];
|
||||
|
||||
|
||||
|
@ -44,7 +44,6 @@ class FinanceReceiptRecordValidate extends BaseValidate
|
||||
'invoice_tax_rate' => 'require|checkInvoiceTaxRate',
|
||||
'receipt_date' => 'require|dateFormat:Y-m-d',
|
||||
'annex' => 'checkAnnex',
|
||||
'approve_detail' => 'require|checkApproveDetail',
|
||||
];
|
||||
|
||||
|
||||
@ -62,7 +61,6 @@ class FinanceReceiptRecordValidate extends BaseValidate
|
||||
'invoice_amount' => '发票金额',
|
||||
'invoice_tax_rate' => '发票税率',
|
||||
'receipt_date' => '收票日期',
|
||||
'approve_detail' => '审批流程'
|
||||
];
|
||||
|
||||
|
||||
|
@ -44,7 +44,6 @@ class FinanceRefundApplyValidate extends BaseValidate
|
||||
'collection_bank' => 'require',
|
||||
'collection_account' => 'require',
|
||||
'bank_account_id' => 'require|checkBankAccount',
|
||||
'approve_detail' => 'require|checkApproveDetail',
|
||||
];
|
||||
|
||||
|
||||
@ -62,7 +61,6 @@ class FinanceRefundApplyValidate extends BaseValidate
|
||||
'collection_bank' => '收款银行',
|
||||
'collection_account' => '收款账号',
|
||||
'bank_account_id' => '付款银行账号',
|
||||
'approve_detail' => '审批流程'
|
||||
];
|
||||
|
||||
|
||||
|
@ -45,7 +45,6 @@ class FinanceRefundRecordValidate extends BaseValidate
|
||||
'refund_type' => 'require|checkRefundType',
|
||||
'annex' => 'checkAnnex',
|
||||
'bank_account_id' => 'require|checkBankAccount',
|
||||
'approve_detail' => 'require|checkApproveDetail',
|
||||
];
|
||||
|
||||
|
||||
@ -62,7 +61,6 @@ class FinanceRefundRecordValidate extends BaseValidate
|
||||
'refund_date' => '退款日期',
|
||||
'refund_type' => '退款方式',
|
||||
'bank_account_id' => '收款账户id',
|
||||
'approve_detail' => '审批流程'
|
||||
];
|
||||
|
||||
|
||||
|
@ -42,7 +42,6 @@ class FinanceReturnedMoneyValidate extends BaseValidate
|
||||
'return_status' => 'require|checkReturnStatus',
|
||||
'return_duty_id' => 'require|checkReturnDuty',
|
||||
'annex' => 'checkAnnex',
|
||||
'approve_detail' => 'require|checkApproveDetail',
|
||||
];
|
||||
|
||||
|
||||
@ -58,7 +57,6 @@ class FinanceReturnedMoneyValidate extends BaseValidate
|
||||
'amount' => '金额',
|
||||
'return_status' => '回款状态',
|
||||
'return_duty_id' => '回款责任人',
|
||||
'approve_detail' => '审批流程'
|
||||
];
|
||||
|
||||
|
||||
|
@ -45,7 +45,6 @@ class FinanceReturnedRecordValidate extends BaseValidate
|
||||
'pay_type' => 'require|checkPayType',
|
||||
'annex' => 'checkAnnex',
|
||||
'bank_account_id' => 'require|checkBankAccount',
|
||||
'approve_detail' => 'require|checkApproveDetail',
|
||||
];
|
||||
|
||||
|
||||
@ -63,7 +62,6 @@ class FinanceReturnedRecordValidate extends BaseValidate
|
||||
'invoice_status' => '开票状态',
|
||||
'pay_type' => '付款方式',
|
||||
'bank_account_id' => '银行账号',
|
||||
'approve_detail' => '审批流程'
|
||||
];
|
||||
|
||||
|
||||
|
@ -44,7 +44,6 @@ class MaterialPurchaseRequestValidate extends BaseValidate
|
||||
'arrival_date' => 'require|dateFormat:Y-m-d',
|
||||
'annex' => 'checkAnnex',
|
||||
'purchase_request_detail' => 'require|checkPurchaseRequestDetail',
|
||||
'approve_detail' => 'require|checkApproveDetail',
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
@ -57,7 +56,6 @@ class MaterialPurchaseRequestValidate extends BaseValidate
|
||||
'arrival_date.require' => '请选择希望到货日期',
|
||||
'arrival_date.dateFormat' => '希望到货日期数据格式错误',
|
||||
'purchase_request_detail.require' => '申购明细内容不能为空',
|
||||
'approve_detail.require' => '审批流程不能为空'
|
||||
];
|
||||
|
||||
|
||||
|
@ -37,7 +37,6 @@ class ProjectCostAdjustmentValidate extends BaseValidate
|
||||
'adjust_date' => 'require|dateFormat:Y-m-d',
|
||||
'adjust_amount' => 'require|float|gt:0',
|
||||
'annex' => 'checkAnnex',
|
||||
'approve_detail' => 'require|checkApproveDetail',
|
||||
];
|
||||
|
||||
|
||||
@ -50,7 +49,6 @@ class ProjectCostAdjustmentValidate extends BaseValidate
|
||||
'project_id' => '项目id',
|
||||
'adjust_date' => '调整日期',
|
||||
'adjust_amount' => '调整金额',
|
||||
'approve_detail' => '审批流程'
|
||||
];
|
||||
|
||||
|
||||
|
@ -42,7 +42,6 @@ class ProjectCostBudgetValidate extends BaseValidate
|
||||
'project_id' => 'require|checkProject',
|
||||
'annex' => 'checkAnnex',
|
||||
'cost_budget_detail' => 'require|checkCostBudgetDetail',
|
||||
'approve_detail' => 'require|checkApproveDetail',
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
@ -51,7 +50,6 @@ class ProjectCostBudgetValidate extends BaseValidate
|
||||
'dept_id.require' => '请选择部门',
|
||||
'project_id.require' => '请选择项目',
|
||||
'cost_budget_detail.require' => '请填写费用预算清单',
|
||||
'approve_detail.require' => '请填写审批流程信息',
|
||||
];
|
||||
|
||||
|
||||
|
@ -41,7 +41,6 @@ class ProjectEquipmentBudgetValidate extends BaseValidate
|
||||
'project_id' => 'require|checkProject',
|
||||
'annex' => 'checkAnnex',
|
||||
'equipment_budget_detail' => 'require|checkEquipmentBudgetDetail',
|
||||
'approve_detail' => 'require|checkApproveDetail',
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
@ -50,7 +49,6 @@ class ProjectEquipmentBudgetValidate extends BaseValidate
|
||||
'dept_id.require' => '请选择部门',
|
||||
'project_id.require' => '请选择项目',
|
||||
'equipment_budget_detail.require' => '请填机具预算清单',
|
||||
'approve_detail.require' => '请填写审批流程信息',
|
||||
];
|
||||
|
||||
|
||||
|
@ -52,7 +52,6 @@ class ProjectExpenseReimbursementValidate extends BaseValidate
|
||||
'bank_account_id' => 'require|checkBankAccount',
|
||||
'reimbursement_detail' => 'require|checkReimbursementDetail',
|
||||
'invoice_detail' => 'require|checkInvoiceDetail',
|
||||
'approve_detail' => 'require|checkApproveDetail',
|
||||
];
|
||||
|
||||
|
||||
@ -74,7 +73,6 @@ class ProjectExpenseReimbursementValidate extends BaseValidate
|
||||
'bank_account_id' => '付款银行账户id',
|
||||
'reimbursement_detail' => '报销明细',
|
||||
'invoice_detail' => '发票明细',
|
||||
'approve_detail' => '审批流程'
|
||||
];
|
||||
|
||||
|
||||
|
@ -42,7 +42,6 @@ class ProjectLaborBudgetValidate extends BaseValidate
|
||||
'project_id' => 'require|checkProject',
|
||||
'annex' => 'checkAnnex',
|
||||
'labor_budget_detail' => 'require|checkLaborBudgetDetail',
|
||||
'approve_detail' => 'require|checkApproveDetail',
|
||||
];
|
||||
|
||||
|
||||
@ -52,7 +51,6 @@ class ProjectLaborBudgetValidate extends BaseValidate
|
||||
'dept_id.require' => '请选择部门',
|
||||
'project_id.require' => '请选择项目',
|
||||
'labor_budget_detail.require' => '请填写人工预算清单',
|
||||
'approve_detail.require' => '请填写审批流程信息',
|
||||
];
|
||||
|
||||
|
||||
|
@ -43,7 +43,6 @@ class ProjectLoanApplyValidate extends BaseValidate
|
||||
'payee_account' => 'require',
|
||||
'annex' => 'checkAnnex',
|
||||
'bank_account_id' => 'require|checkBankAccount',
|
||||
'approve_detail' => 'require|checkApproveDetail',
|
||||
];
|
||||
|
||||
|
||||
@ -61,7 +60,6 @@ class ProjectLoanApplyValidate extends BaseValidate
|
||||
'payee_bank' => '收款银行',
|
||||
'payee_account' => '收款账号',
|
||||
'bank_account_id' => '付款银行账户id',
|
||||
'approve_detail' => '审批流程'
|
||||
];
|
||||
|
||||
|
||||
|
@ -41,7 +41,6 @@ class ProjectMaterialBudgetValidate extends BaseValidate
|
||||
'project_id' => 'require|checkProject',
|
||||
'annex' => 'checkAnnex',
|
||||
'material_budget_detail' => 'require|checkMaterialBudgetDetail',
|
||||
'approve_detail' => 'require|checkApproveDetail',
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
@ -50,7 +49,6 @@ class ProjectMaterialBudgetValidate extends BaseValidate
|
||||
'dept_id.require' => '请选择部门',
|
||||
'project_id.require' => '请选择项目',
|
||||
'material_budget_detail.require' => '请填写材料预算清单',
|
||||
'approve_detail.require' => '请填写审批流程信息',
|
||||
];
|
||||
|
||||
|
||||
|
@ -40,7 +40,6 @@ class ProjectSettlementValidate extends BaseValidate
|
||||
'settlement_amount' => 'require|float|egt:0',
|
||||
'settlement_date' => 'require|dateFormat:Y-m-d',
|
||||
'annex' => 'checkAnnex',
|
||||
'approve_detail' => 'require|checkApproveDetail',
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
@ -52,7 +51,6 @@ class ProjectSettlementValidate extends BaseValidate
|
||||
'settlement_amount.egt' => '结算金额值必须大于等于0',
|
||||
'settlement_date.require' => '请选择结算日期',
|
||||
'settlement_date.dateFormat' => '结算日期格式错误',
|
||||
'approve_detail.require' => '请填写审批流程信息',
|
||||
];
|
||||
|
||||
|
||||
|
@ -38,7 +38,6 @@ class ProjectSubcontractSettlementValidate extends BaseValidate
|
||||
'settlement_amount' => 'require|float|egt:0',
|
||||
'settlement_date' => 'require|dateFormat:Y-m-d',
|
||||
'annex' => 'checkAnnex',
|
||||
'approve_detail' => 'require|checkApproveDetail',
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
@ -50,7 +49,6 @@ class ProjectSubcontractSettlementValidate extends BaseValidate
|
||||
'settlement_amount.egt' => '结算金额值必须大于等于0',
|
||||
'settlement_date.require' => '请选择结算日期',
|
||||
'settlement_date.dateFormat' => '结算日期格式错误',
|
||||
'approve_detail.require' => '请填写审批流程信息',
|
||||
];
|
||||
|
||||
|
||||
|
@ -41,7 +41,6 @@ class ProjectSubpackageBudgetValidate extends BaseValidate
|
||||
'project_id' => 'require|checkProject',
|
||||
'annex' => 'checkAnnex',
|
||||
'subpackage_budget_detail' => 'require|checkSubpackageBudgetDetail',
|
||||
'approve_detail' => 'require|checkApproveDetail',
|
||||
];
|
||||
|
||||
/**
|
||||
@ -54,7 +53,6 @@ class ProjectSubpackageBudgetValidate extends BaseValidate
|
||||
'dept_id' => '部门id',
|
||||
'project_id' => '项目id',
|
||||
'material_budget_detail' => '分包预算明细',
|
||||
'approve_detail' => '审批流程',
|
||||
];
|
||||
|
||||
|
||||
|
@ -47,7 +47,6 @@ class ProjectTotalBudgetValidate extends BaseValidate
|
||||
'budget_list' => 'checkAnnex',
|
||||
'budget_date' => 'require|dateFormat:Y-m-d',
|
||||
'project_manager' => 'require',
|
||||
'approve_detail' => 'require|checkApproveDetail',
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
@ -70,7 +69,6 @@ class ProjectTotalBudgetValidate extends BaseValidate
|
||||
'jj_cost.egt' => '机具成本值必须大于等于0',
|
||||
'budget_date.dateFormat' => '预算日期数据格式错误',
|
||||
'project_manager' => '请填写项目经理',
|
||||
'approve_detail.require' => '请填写审批流程信息',
|
||||
];
|
||||
|
||||
|
||||
|
@ -52,7 +52,6 @@ class ProjectTravelReimbursementValidate extends BaseValidate
|
||||
'bank_account_id' => 'require|checkBankAccount',
|
||||
'reimbursement_detail' => 'require|checkReimbursementDetail',
|
||||
'invoice_detail' => 'require|checkInvoiceDetail',
|
||||
'approve_detail' => 'require|checkApproveDetail',
|
||||
];
|
||||
|
||||
|
||||
@ -74,7 +73,6 @@ class ProjectTravelReimbursementValidate extends BaseValidate
|
||||
'bank_account_id' => '付款银行账户id',
|
||||
'reimbursement_detail' => '报销明细',
|
||||
'invoice_detail' => '发票明细',
|
||||
'approve_detail' => '审批流程'
|
||||
];
|
||||
|
||||
|
||||
|
@ -41,7 +41,6 @@ class ProjectTripApplyValidate extends BaseValidate
|
||||
'start_date' => 'require|dateFormat:Y-m-d',
|
||||
'end_date' => 'require|dateFormat:Y-m-d|checkEndDate',
|
||||
'annex' => 'checkAnnex',
|
||||
'approve_detail' => 'require|checkApproveDetail',
|
||||
];
|
||||
|
||||
|
||||
@ -57,7 +56,6 @@ class ProjectTripApplyValidate extends BaseValidate
|
||||
'traffic' => '交通工具',
|
||||
'start_date' => '出差时间',
|
||||
'end_date' => '结束时间',
|
||||
'approve_detail' => '审批流程'
|
||||
];
|
||||
|
||||
|
||||
|
@ -86,27 +86,4 @@ class BaseValidate extends Validate
|
||||
// 3.成功返回数据
|
||||
return $params;
|
||||
}
|
||||
|
||||
public function checkApproveDetail($value): bool|string
|
||||
{
|
||||
if(empty($value) || !is_array($value)){
|
||||
return '审批流程数据格式错误';
|
||||
}
|
||||
if(empty($value['flow_type'])){
|
||||
return '请选择审批类型';
|
||||
}else{
|
||||
$ft = FlowType::where('id',$value['flow_type'])->findOrEmpty();
|
||||
if($ft->isEmpty()) return '审批类型数据不存在';
|
||||
}
|
||||
if(empty($value['flow_path'])){
|
||||
return '请选择审批流程';
|
||||
}else{
|
||||
$fp = Flow::where('id',$value['flow_path'])->where('flow_cate',$value['flow_type'])->findOrEmpty();
|
||||
if($fp->isEmpty()) return '审批流程数据不存在';
|
||||
}
|
||||
if(empty($value['path'])){
|
||||
return 'path字段不能为空';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user