Merge branch 'dev' into zhangwei
This commit is contained in:
commit
abdcaf74b2
@ -23,7 +23,7 @@ use app\adminapi\validate\supplier\SupplierContactsValidate;
|
||||
|
||||
|
||||
/**
|
||||
* SupplierContacts控制器
|
||||
* 供应商联系人
|
||||
* Class SupplierContactsController
|
||||
* @package app\adminapi\controller\supplier
|
||||
*/
|
||||
|
@ -23,7 +23,7 @@ use app\common\model\material\MaterialPurchaseRequestDetail;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
use app\common\model\project\Project;
|
||||
use app\common\model\project\ProjectMaterialBudgetDetail;
|
||||
|
||||
use think\facade\Db;
|
||||
|
||||
/**
|
||||
* 材料采购申请明细列表
|
||||
@ -71,11 +71,12 @@ class MaterialPurchaseRequestDetailLists extends BaseAdminDataLists implements L
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
$material_purchase_request = MaterialPurchaseRequest::field('material_purchase_request_code,project_id,apply_date,arrival_date')->where('id',$data['material_purchase_request_id'])->findOrEmpty();
|
||||
$project = Project::field('name,project_code')->where('id',$material_purchase_request['project_id'])->findOrEmpty();
|
||||
$project_material_budget_detail = ProjectMaterialBudgetDetail::field('material_id')->where('id',$data['project_material_budget_detail_id'])->findOrEmpty();
|
||||
$project = Project::where('id',$material_purchase_request['project_id'])->field('name,project_code,custom_id')->findOrEmpty();
|
||||
$project_material_budget_detail = ProjectMaterialBudgetDetail::field('material_id')->where('id',$data['project_material_budget_detail_id'])->findOrEmpty();
|
||||
$material = Material::field('first_level,second_level,three_level,name,code,specs,brand,parameter_description,unit')->where('id',$project_material_budget_detail['material_id'])->findOrEmpty();
|
||||
$material_classify = MaterialClassify::where('id','in',[$material['first_level'],$material['second_level'],$material['three_level']])->column('name','id');
|
||||
$data['material_purchase_request_code'] = $material_purchase_request['material_purchase_request_code'];
|
||||
$data['custom_name'] = Db::name('custom')->where('id',$project['custom_id'])->value('name');
|
||||
$data['project_name'] = $project['name'];
|
||||
$data['project_code'] = $project['project_code'];
|
||||
$data['apply_date'] = $material_purchase_request['apply_date'];
|
||||
|
@ -22,7 +22,7 @@ use app\common\lists\ListsSearchInterface;
|
||||
use think\facade\Db;
|
||||
|
||||
/**
|
||||
* SupplierContacts列表
|
||||
* 供应商联系人
|
||||
* Class SupplierContactsLists
|
||||
* @package app\adminapi\listssupplier
|
||||
*/
|
||||
@ -57,7 +57,8 @@ class SupplierContactsLists extends BaseAdminDataLists implements ListsSearchInt
|
||||
public function lists(): array
|
||||
{
|
||||
return SupplierContacts::where($this->searchWhere)
|
||||
->field('id,name,sex,birthday,contacts_type,responsible,contacts_cate,department,duties,work_phone,remark')
|
||||
->field('id,supplier_id,name,sex,birthday,contacts_type,responsible,contacts_cate,department,duties,work_phone,remark')
|
||||
->with(['supplier'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($data){
|
||||
|
@ -62,7 +62,7 @@ class BidBiddingDecisionLogic extends BaseLogic
|
||||
'project_assurance' => $params['project_assurance'] ?? 0,
|
||||
'bid_project_overview' => $params['bid_project_overview'] ?? '',
|
||||
'project_desc' => $params['project_desc'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
Project::where('id',$params['project_id'])->update([
|
||||
'status' => 2,
|
||||
@ -106,7 +106,7 @@ class BidBiddingDecisionLogic extends BaseLogic
|
||||
'project_assurance' => $params['project_assurance'] ?? 0,
|
||||
'bid_project_overview' => $params['bid_project_overview'] ?? '',
|
||||
'project_desc' => $params['project_desc'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'update_time' => time(),
|
||||
]);
|
||||
Db::commit();
|
||||
|
@ -58,7 +58,7 @@ class BidResultLogic extends BaseLogic
|
||||
'bidder_company' => $params['bidder_company'],
|
||||
'bidder_amount' => $params['bidder_amount'],
|
||||
'bid_summary' => $params['bid_summary'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'add_user' => $admin_id,
|
||||
'update_user' => $admin_id,
|
||||
]);
|
||||
@ -91,7 +91,7 @@ class BidResultLogic extends BaseLogic
|
||||
'bidder_company' => $params['bidder_company'],
|
||||
'bidder_amount' => $params['bidder_amount'],
|
||||
'bid_summary' => $params['bid_summary'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'update_user' => $admin_id,
|
||||
'update_time' => time(),
|
||||
]);
|
||||
|
@ -52,7 +52,7 @@ class BidSecurityApplyLogic extends BaseLogic
|
||||
'pay_type' => $params['pay_type'],
|
||||
'refund_date' => !empty($params['refund_date']) ? strtotime($params['refund_date']) : 0,
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'deposit_bank' => $params['deposit_bank'],
|
||||
'account_name' => $params['account_name'],
|
||||
'account' => $params['account'],
|
||||
@ -87,7 +87,7 @@ class BidSecurityApplyLogic extends BaseLogic
|
||||
'pay_type' => $params['pay_type'],
|
||||
'refund_date' => !empty($params['refund_date']) ? strtotime($params['refund_date']) : 0,
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'deposit_bank' => $params['deposit_bank'],
|
||||
'account_name' => $params['account_name'],
|
||||
'account' => $params['account'],
|
||||
|
@ -52,7 +52,7 @@ class BidSecurityRefundLogic extends BaseLogic
|
||||
'refund_amount' => $params['refund_amount'],
|
||||
'refund_date' => strtotime($params['refund_date']),
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'bank_account_id' => $params['bank_account_id'] ?? 0,
|
||||
]);
|
||||
Db::commit();
|
||||
@ -83,7 +83,7 @@ class BidSecurityRefundLogic extends BaseLogic
|
||||
'refund_amount' => $params['refund_amount'],
|
||||
'refund_date' => strtotime($params['refund_date']),
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'bank_account_id' => $params['bank_account_id'] ?? 0,
|
||||
]);
|
||||
|
||||
|
@ -76,7 +76,7 @@ class ContractLogic extends BaseLogic
|
||||
"contract_date" => strtotime($params['contract_date']),
|
||||
"main_content" => $params['main_content'] ?? '',
|
||||
"remark" => $params['remark'] ?? '',
|
||||
"annex" => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
foreach ($returned_money as $item)
|
||||
{
|
||||
@ -145,7 +145,7 @@ class ContractLogic extends BaseLogic
|
||||
"contract_date" => strtotime($params['contract_date']),
|
||||
"main_content" => $params['main_content'] ?? '',
|
||||
"remark" => $params['remark'] ?? '',
|
||||
"annex" => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
Db::commit();
|
||||
return true;
|
||||
|
@ -81,7 +81,7 @@ class ProcurementContractLogic extends BaseLogic
|
||||
//质保金比例
|
||||
'retention_money_rate' => $params['retention_money_rate'],
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
foreach ($procurement_contract_detail as $v)
|
||||
{
|
||||
@ -164,7 +164,7 @@ class ProcurementContractLogic extends BaseLogic
|
||||
//质保金比例
|
||||
'retention_money_rate' => $params['retention_money_rate'],
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
foreach ($procurement_contract_detail as $v)
|
||||
{
|
||||
|
@ -81,7 +81,7 @@ class SubcontractingContractLogic extends BaseLogic
|
||||
//质保金比例
|
||||
'retention_money_rate' => $params['retention_money_rate'],
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
foreach ($subcontracting_contract_detail as $v)
|
||||
{
|
||||
@ -165,7 +165,7 @@ class SubcontractingContractLogic extends BaseLogic
|
||||
//质保金比例
|
||||
'retention_money_rate' => $params['retention_money_rate'],
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
foreach ($subcontracting_contract_detail as $v)
|
||||
{
|
||||
|
@ -80,7 +80,7 @@ class CustomContactsLogic extends BaseLogic
|
||||
'telephone' => $params['telephone'] ?? '',
|
||||
'email' => $params['email'] ?? '',
|
||||
'notes' => $params['notes'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] :null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
Db::commit();
|
||||
return true;
|
||||
|
@ -83,7 +83,7 @@ class CustomFollowLogic extends BaseLogic
|
||||
'date' => strtotime($params['date']),
|
||||
'types' => $params['types'],
|
||||
'description' => $params['description'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] :null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'coordinate' => $params['coordinate'] ?? '',
|
||||
'executor' => $params['executor'] ?? '',
|
||||
'next_follow_date' => strtotime($params['next_follow_date']),
|
||||
|
@ -55,7 +55,7 @@ class CustomerDemandLogic extends BaseLogic
|
||||
'importance' => $params['importance'],
|
||||
'recording_time' => strtotime($params['recording_time']),
|
||||
'demand_content' => $params['demand_content'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'add_user' => $admin_id,
|
||||
'update_user' => $admin_id,
|
||||
]);
|
||||
@ -90,7 +90,7 @@ class CustomerDemandLogic extends BaseLogic
|
||||
'importance' => $params['importance'],
|
||||
'recording_time' => strtotime($params['recording_time']),
|
||||
'demand_content' => $params['demand_content'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'update_user' => $admin_id,
|
||||
'update_time' => time(),
|
||||
]);
|
||||
|
@ -55,7 +55,7 @@ class CustomerDemandSolutionLogic extends BaseLogic
|
||||
'submission_time' => strtotime($params['submission_time']),
|
||||
'solution_content' => $params['solution_content'] ?? '',
|
||||
'customer_feedback' => $params['customer_feedback'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'add_user' => $admin_id,
|
||||
'update_user' => $admin_id,
|
||||
]);
|
||||
@ -89,7 +89,7 @@ class CustomerDemandSolutionLogic extends BaseLogic
|
||||
'submission_time' => strtotime($params['submission_time']),
|
||||
'solution_content' => $params['solution_content'] ?? '',
|
||||
'customer_feedback' => $params['customer_feedback'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'update_user' => $admin_id,
|
||||
'update_time' => time(),
|
||||
]);
|
||||
|
@ -63,7 +63,7 @@ class FinanceInvoiceApplyLogic extends BaseLogic
|
||||
'content' => $params['content'] ?? '',
|
||||
'invoice_no' => $params['invoice_no'] ?? '',
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'invoicing_company_name' => $params['invoicing_company_name'] ?? '',
|
||||
'taxpayer_identification_number' => $params['taxpayer_identification_number'] ?? '',
|
||||
'deposit_bank' => $params['deposit_bank'] ?? '',
|
||||
@ -112,7 +112,7 @@ class FinanceInvoiceApplyLogic extends BaseLogic
|
||||
'content' => $params['content'] ?? '',
|
||||
'invoice_no' => $params['invoice_no'] ?? '',
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'invoicing_company_name' => $params['invoicing_company_name'] ?? '',
|
||||
'taxpayer_identification_number' => $params['taxpayer_identification_number'] ?? '',
|
||||
'deposit_bank' => $params['deposit_bank'] ?? '',
|
||||
|
@ -69,7 +69,7 @@ class FinancePaymentApplyLogic extends BaseLogic
|
||||
'amount' => $params['amount'],
|
||||
'desc' => $params['desc'] ?? '',
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'payee_bank' => $params['payee_bank'],
|
||||
'payee_account_name' => $params['payee_account_name'],
|
||||
'payee_account' => $params['payee_account'],
|
||||
@ -118,7 +118,7 @@ class FinancePaymentApplyLogic extends BaseLogic
|
||||
'amount' => $params['amount'],
|
||||
'desc' => $params['desc'] ?? '',
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'payee_bank' => $params['payee_bank'],
|
||||
'payee_account_name' => $params['payee_account_name'],
|
||||
'payee_account' => $params['payee_account'],
|
||||
|
@ -69,7 +69,7 @@ class FinanceReceiptRecordLogic extends BaseLogic
|
||||
'amount_excluding_tax' => $params['invoice_amount'] * (1 - $tax_rate[$params['invoice_tax_rate']] / 100),
|
||||
'receipt_date' => strtotime($params['receipt_date']),
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
Db::commit();
|
||||
return true;
|
||||
@ -116,7 +116,7 @@ class FinanceReceiptRecordLogic extends BaseLogic
|
||||
'amount_excluding_tax' => $params['invoice_amount'] * (1 - $tax_rate[$params['invoice_tax_rate']] / 100),
|
||||
'receipt_date' => strtotime($params['receipt_date']),
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
Db::commit();
|
||||
return true;
|
||||
|
@ -55,7 +55,7 @@ class FinanceRefundApplyLogic extends BaseLogic
|
||||
'refund_type' => $params['refund_type'],
|
||||
'refund_user' => $params['refund_user'] ?? '',
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'collection_bank' => $params['collection_bank'],
|
||||
'collection_account' => $params['collection_account'],
|
||||
'bank_account_id' => $params['bank_account_id'],
|
||||
@ -91,7 +91,7 @@ class FinanceRefundApplyLogic extends BaseLogic
|
||||
'refund_type' => $params['refund_type'],
|
||||
'refund_user' => $params['refund_user'] ?? '',
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'collection_bank' => $params['collection_bank'],
|
||||
'collection_account' => $params['collection_account'],
|
||||
'bank_account_id' => $params['bank_account_id'],
|
||||
|
@ -63,7 +63,7 @@ class FinanceRefundRecordLogic extends BaseLogic
|
||||
'refund_type' => $params['refund_type'],
|
||||
'reason' => $params['reason'] ?? '',
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'bank_account_id' => $params['bank_account_id'],
|
||||
]);
|
||||
Db::commit();
|
||||
@ -105,7 +105,7 @@ class FinanceRefundRecordLogic extends BaseLogic
|
||||
'refund_type' => $params['refund_type'],
|
||||
'reason' => $params['reason'] ?? '',
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'bank_account_id' => $params['bank_account_id'],
|
||||
'update_time' => time(),
|
||||
]);
|
||||
|
@ -54,7 +54,7 @@ class FinanceReturnedMoneyLogic extends BaseLogic
|
||||
'return_status' => $params['return_status'],
|
||||
'return_duty_id' => $params['return_duty_id'],
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
Db::commit();
|
||||
return true;
|
||||
@ -87,7 +87,7 @@ class FinanceReturnedMoneyLogic extends BaseLogic
|
||||
'return_status' => $params['return_status'],
|
||||
'return_duty_id' => $params['return_duty_id'],
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
Db::commit();
|
||||
return true;
|
||||
|
@ -58,7 +58,7 @@ class FinanceReturnedRecordLogic extends BaseLogic
|
||||
'return_desc' => $params['return_desc'] ?? '',
|
||||
'receiver' => $params['receiver'] ?? '',
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'bank_account_id' => $params['bank_account_id'],
|
||||
]);
|
||||
Db::commit();
|
||||
@ -95,7 +95,7 @@ class FinanceReturnedRecordLogic extends BaseLogic
|
||||
'return_desc' => $params['return_desc'] ?? '',
|
||||
'receiver' => $params['receiver'] ?? '',
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'bank_account_id' => $params['bank_account_id'],
|
||||
'update_time' => time(),
|
||||
]);
|
||||
|
@ -55,7 +55,7 @@ class MaterialLogic extends BaseLogic
|
||||
'inventory' => $params['inventory'] ?? 0,
|
||||
'sales_price' => $params['sales_price'] ?? 0,
|
||||
'cost_price' => $params['cost_price'] ?? 0,
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'add_user' => $admin_id,
|
||||
'update_user' => $admin_id,
|
||||
]);
|
||||
@ -93,7 +93,7 @@ class MaterialLogic extends BaseLogic
|
||||
'inventory' => $params['inventory'] ?? 0,
|
||||
'sales_price' => $params['sales_price'] ?? 0,
|
||||
'cost_price' => $params['cost_price'] ?? 0,
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'update_user' => $admin_id,
|
||||
'update_time' => time()
|
||||
]);
|
||||
|
@ -54,7 +54,7 @@ class MaterialPurchaseRequestLogic extends BaseLogic
|
||||
'apply_date' => strtotime($params['apply_date']),
|
||||
'arrival_date' => strtotime($params['arrival_date']),
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
foreach ($detail as $item)
|
||||
{
|
||||
@ -100,7 +100,7 @@ class MaterialPurchaseRequestLogic extends BaseLogic
|
||||
'apply_date' => strtotime($params['apply_date']),
|
||||
'arrival_date' => strtotime($params['arrival_date']),
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
Db::commit();
|
||||
return true;
|
||||
|
@ -55,7 +55,7 @@ class MaterialWarehouseLogic extends BaseLogic
|
||||
'address' => $params['address'] ?? '',
|
||||
'telephone' => $params['telephone'],
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
Db::commit();
|
||||
return true;
|
||||
@ -89,7 +89,7 @@ class MaterialWarehouseLogic extends BaseLogic
|
||||
'address' => $params['address'] ?? '',
|
||||
'telephone' => $params['telephone'],
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'update_time' => time()
|
||||
]);
|
||||
Db::commit();
|
||||
|
@ -55,7 +55,7 @@ class CompetitorLogic extends BaseLogic
|
||||
'competitor_advantages' => $params['competitor_advantages'] ?? '',
|
||||
'competitor_disadvantages' => $params['competitor_disadvantages'] ?? '',
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'add_user' => $admin_id,
|
||||
'update_user' => $admin_id,
|
||||
]);
|
||||
@ -92,7 +92,7 @@ class CompetitorLogic extends BaseLogic
|
||||
'competitor_advantages' => $params['competitor_advantages'] ?? '',
|
||||
'competitor_disadvantages' => $params['competitor_disadvantages'] ?? '',
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'add_user' => $admin_id,
|
||||
'update_time' => time(),
|
||||
]);
|
||||
|
@ -49,7 +49,7 @@ class ProjectDocumentLogic extends BaseLogic
|
||||
'name' => $params['name'],
|
||||
'describe' => $params['describe'],
|
||||
'version' => $params['version'],
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
Db::commit();
|
||||
return true;
|
||||
@ -78,7 +78,7 @@ class ProjectDocumentLogic extends BaseLogic
|
||||
'name' => $params['name'],
|
||||
'describe' => $params['describe'],
|
||||
'version' => $params['version'],
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
|
||||
Db::commit();
|
||||
|
@ -60,7 +60,7 @@ class ProjectEstimateLogic extends BaseLogic
|
||||
'technician' => $params['technician'] ?? 0,
|
||||
'estimate_amount' => $params['estimate_amount'] ?? 0,
|
||||
'ask' => $params['ask'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'add_user' => $admin_id,
|
||||
'update_user' => $admin_id,
|
||||
]);
|
||||
@ -98,7 +98,7 @@ class ProjectEstimateLogic extends BaseLogic
|
||||
'technician' => $params['technician'] ?? 0,
|
||||
'estimate_amount' => $params['estimate_amount'] ?? 0,
|
||||
'ask' => $params['ask'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'update_user' => $admin_id,
|
||||
'update_time' => time(),
|
||||
]);
|
||||
|
@ -55,7 +55,7 @@ class ProjectInsuranceManagementLogic extends BaseLogic
|
||||
'insurance_detail' => $params['insurance_detail'],
|
||||
'invoice_no' => $params['invoice_no'],
|
||||
'handler' => $params['handler'],
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
Db::commit();
|
||||
return true;
|
||||
@ -91,7 +91,7 @@ class ProjectInsuranceManagementLogic extends BaseLogic
|
||||
'insurance_detail' => $params['insurance_detail'],
|
||||
'invoice_no' => $params['invoice_no'],
|
||||
'handler' => $params['handler'],
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
Db::commit();
|
||||
return true;
|
||||
|
@ -57,7 +57,7 @@ class ProjectLaborContractLogic extends BaseLogic
|
||||
'release_time' => strtotime($params['release_time']),
|
||||
'release_reason' => $params['release_reason'],
|
||||
'remark' => $params['remark'],
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'add_user' => $admin_id,
|
||||
'update_user' => $admin_id,
|
||||
]);
|
||||
@ -96,7 +96,7 @@ class ProjectLaborContractLogic extends BaseLogic
|
||||
'release_time' => strtotime($params['release_time']),
|
||||
'release_reason' => $params['release_reason'],
|
||||
'remark' => $params['remark'],
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'update_user' => $admin_id,
|
||||
'update_time' => time(),
|
||||
]);
|
||||
|
@ -74,7 +74,7 @@ class ProjectLogic extends BaseLogic
|
||||
'strategic_significance' => $params['strategic_significance'] ?? 0,
|
||||
'industry' => $params['industry'] ?? 0,
|
||||
'unit_nature' => $params['unit_nature'] ?? 0,
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'status' => 0,
|
||||
'is_budget' => 0,
|
||||
'add_user' => $adminId
|
||||
@ -130,7 +130,7 @@ class ProjectLogic extends BaseLogic
|
||||
'strategic_significance' => $params['strategic_significance'] ?? 0,
|
||||
'industry' => $params['industry'] ?? 0,
|
||||
'unit_nature' => $params['unit_nature'] ?? 0,
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'update_time' => time(),
|
||||
]);
|
||||
Db::commit();
|
||||
|
@ -57,7 +57,7 @@ class ProjectManagerAppointmentLogic extends BaseLogic
|
||||
'start_date' => strtotime($params['start_date']),
|
||||
'delivery_date' => strtotime($params['delivery_date']),
|
||||
'remark' => $params['remark'],
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
Db::commit();
|
||||
return true;
|
||||
@ -90,7 +90,7 @@ class ProjectManagerAppointmentLogic extends BaseLogic
|
||||
'start_date' => strtotime($params['start_date']),
|
||||
'delivery_date' => strtotime($params['delivery_date']),
|
||||
'remark' => $params['remark'],
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
Db::commit();
|
||||
return true;
|
||||
|
@ -51,7 +51,7 @@ class ProjectMaterialBudgetLogic extends BaseLogic
|
||||
'project_id' => $params['project_id'],
|
||||
'material_budget_code' => data_unique_code('项目材料预算'),
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
foreach ($detail as $item)
|
||||
{
|
||||
@ -93,7 +93,7 @@ class ProjectMaterialBudgetLogic extends BaseLogic
|
||||
'dept_id' => $params['dept_id'],
|
||||
'project_id' => $params['project_id'],
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
foreach ($detail as $item)
|
||||
{
|
||||
|
@ -51,7 +51,7 @@ class ProjectPlanLogic extends BaseLogic
|
||||
'deliver_time' => strtotime($params['deliver_time']),
|
||||
'declare_time' => strtotime($params['declare_time']),
|
||||
'remark' => $params['remark'],
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'add_user' => $adminId,
|
||||
]);
|
||||
Db::commit();
|
||||
@ -82,7 +82,7 @@ class ProjectPlanLogic extends BaseLogic
|
||||
'deliver_time' => strtotime($params['deliver_time']),
|
||||
'declare_time' => strtotime($params['declare_time']),
|
||||
'remark' => $params['remark'],
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
Db::commit();
|
||||
return true;
|
||||
|
@ -55,7 +55,7 @@ class ProjectSalaryPaymentLogic extends BaseLogic
|
||||
'total_amount' => $params['total_amount'],
|
||||
'total_amount_uppercase' => $params['total_amount_uppercase'],
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
foreach($payment_detail as $v){
|
||||
ProjectSalaryDetail::create([
|
||||
|
@ -52,7 +52,7 @@ class ProjectSettlementLogic extends BaseLogic
|
||||
'remaining_amount' => $params['remaining_amount'],
|
||||
'settlement_date' => strtotime($params['settlement_date']),
|
||||
'remark' => $params['remark'],
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'add_user' => $admin_id
|
||||
]);
|
||||
Db::commit();
|
||||
@ -84,7 +84,7 @@ class ProjectSettlementLogic extends BaseLogic
|
||||
'remaining_amount' => $params['remaining_amount'],
|
||||
'settlement_date' => strtotime($params['settlement_date']),
|
||||
'remark' => $params['remark'],
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'update_time' => time()
|
||||
]);
|
||||
Db::commit();
|
||||
|
@ -52,7 +52,7 @@ class ProjectSubcontractSettlementLogic extends BaseLogic
|
||||
'remaining_amount' => $params['remaining_amount'],
|
||||
'settlement_date' => strtotime($params['settlement_date']),
|
||||
'remark' => $params['remark'],
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'add_user' => $admin_id,
|
||||
]);
|
||||
|
||||
@ -85,7 +85,7 @@ class ProjectSubcontractSettlementLogic extends BaseLogic
|
||||
'remaining_amount' => $params['remaining_amount'],
|
||||
'settlement_date' => strtotime($params['settlement_date']),
|
||||
'remark' => $params['remark'],
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'add_user' => $params['add_user'],
|
||||
'update_time' => time(),
|
||||
]);
|
||||
|
@ -51,7 +51,7 @@ class ProjectSubpackageBudgetLogic extends BaseLogic
|
||||
'project_id' => $params['project_id'],
|
||||
'subpackage_budget_code' => data_unique_code('项目分包预算'),
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
foreach ($detail as $item)
|
||||
{
|
||||
@ -96,7 +96,7 @@ class ProjectSubpackageBudgetLogic extends BaseLogic
|
||||
'project_id' => $params['project_id'],
|
||||
'subpackage_budget_code' => data_unique_code('项目分包预算'),
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
foreach ($detail as $item)
|
||||
{
|
||||
|
@ -67,7 +67,7 @@ class QuotationLogic extends BaseLogic
|
||||
'total_amount' => $amount_including_tax + $params['freight'] + $params['other_fee'],
|
||||
'customer_require' => $params['customer_require'] ?? '',
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
foreach ($quotation_detail as $item)
|
||||
{
|
||||
|
@ -61,7 +61,7 @@ class SupplierContactsLogic extends BaseLogic
|
||||
'id_type' => $params['id_type'] ?? 0,
|
||||
'idcard' => $params['idcard'] ?? '',
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
]);
|
||||
Db::commit();
|
||||
return true;
|
||||
@ -104,7 +104,7 @@ class SupplierContactsLogic extends BaseLogic
|
||||
'id_type' => $params['id_type'] ?? 0,
|
||||
'idcard' => $params['idcard'] ?? '',
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'update_time' => time(),
|
||||
]);
|
||||
Db::commit();
|
||||
|
@ -62,7 +62,7 @@ class SupplierLogic extends BaseLogic
|
||||
'email' => $params['email'] ?? '',
|
||||
'address' => $params['address'] ?? '',
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'invoice_company_name' => $params['invoice_company_name'] ?? '',
|
||||
'taxpayer_identification_number' => $params['taxpayer_identification_number'] ?? '',
|
||||
'bank_name' => $params['bank_name'] ?? '',
|
||||
@ -113,7 +113,7 @@ class SupplierLogic extends BaseLogic
|
||||
'email' => $params['email'] ?? '',
|
||||
'address' => $params['address'] ?? '',
|
||||
'remark' => $params['remark'] ?? '',
|
||||
'annex' => !empty($params['annex']) ? $params['annex'] : null,
|
||||
'annex' => $params['annex']? json_encode($params['annex']) : '',
|
||||
'invoice_company_name' => $params['invoice_company_name'] ?? '',
|
||||
'taxpayer_identification_number' => $params['taxpayer_identification_number'] ?? '',
|
||||
'bank_name' => $params['bank_name'] ?? '',
|
||||
|
@ -65,4 +65,7 @@ class SupplierContacts extends BaseModel
|
||||
return $dict[$data['id_type']];
|
||||
}
|
||||
|
||||
public function supplier(){
|
||||
return $this->hasOne(Supplier::class,'id','supplier_id')->bind(['supplier_name','supplier_code']);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user