Commit 8b6d97e4 by mushishixian

修正打印

parent e8785642
......@@ -142,4 +142,24 @@ class SupplierContactService
}
return false;
}
//如果申请人属于联营采购部/自营采购部,业务负责人取绑定的采购员为申请人的联系人(如果有多条,随机取一条);
//如果申请人属于渠道部,渠道开发员没有设置采购,则显示为空;如果渠道开发员显示自己为采购,显示自己对应的联系人;如果创建其他采购,显示创建采购对应的联系人(如果有多条,随机取一条)
//获取用于打印的联系方式
public function getContactForPrint($supplierId)
{
$userId = request()->user->userId;
$codeId = request()->user->codeId;
$contactModel = new SupplierContactModel();
$contact = $contactModel->where('can_check_uids',$codeId)->where('supplier_id',$supplierId)
->first();
$contact = !empty($contact) ? $contact->toArray() : [];
if (empty($contact)) {
$contact = $contactModel->where('admin_id',$userId)->where('supplier_id',$supplierId)
->first();
$contact = !empty($contact) ? $contact->toArray() : [];
}
return $contact;
}
}
\ No newline at end of file
......@@ -129,7 +129,8 @@ class SupplierService
}
return $value;
}, $channel);
$channel['status'] = SupplierChannelModel::STATUS_IN_REVIEW;
//默认是待审核
$channel['status'] = SupplierChannelModel::STATUS_PENDING;
//第一次新增的供应商,都需要进行复审
$channel['need_review'] = 1;
$contactField = [
......@@ -426,9 +427,8 @@ class SupplierService
$printData = $supplier;
$printData['apply_name'] = request()->user->name;
$printData['apply_time'] = date('Y-m-d H:i:s', time());
$contactModel = new SupplierContactModel();
$contact = $contactModel->where('supplier_id', $supplierId)->where('supplier_consignee', '!=', '')->first();
$contact = !empty($contact) ? $contact->toArray() : [];
$contactService = new SupplierContactService();
$contact = $contactService->getContactForPrint($supplierId);
$printData['contact'] = $contact;
$attachmentModel = new SupplierAttachmentModel();
$hasAgreement = $attachmentModel->where('supplier_id',
......
......@@ -17,7 +17,7 @@
</head>
<style>
html * {
font-size: 12px ;
font-size: 12px !important;
}
input:focus, textarea:focus {
......
......@@ -7,7 +7,7 @@
</head>
<style>
td {
height: 35px;
height: 35px !important;
}
/*.title-td {*/
......@@ -19,7 +19,7 @@
<div class="layui-col-md3">&nbsp;</div>
<div class="layui-col-md6" style="text-align: center">
<div class="layui-row" style="margin-bottom: 5px">
<div class="layui-col-md12"><span style="font-size: 20px;font-weight: bold;">新供应商引入申请单</span></div>
<div class="layui-col-md12"><span style="font-size: 20px !important;font-weight: bold;">新供应商引入申请单</span></div>
<div style="text-align: right">申请部门 : {{$printData['department_name']}}</div>
</div>
<table border="1" style="width: 100%;">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment