Commit 1de5f431 by 杨树贤

查漏补缺页面

parent 944c38a1
......@@ -131,7 +131,9 @@ class SupplierApiController extends Controller
//先去表单验证
$validator = new SupplierValidator();
$data = $request->all();
$validateResult = $validator->checkSave($data, false);
$isAudit = (bool)$request->input('is_audit');
$supplierId = $request->input('supplier_id');
$validateResult = $validator->checkSave($data, $isAudit);
if ($validateResult) {
$this->response(-1, $validateResult);
}
......@@ -141,9 +143,18 @@ class SupplierApiController extends Controller
$service = new SupplierService();
$result = $service->saveSupplier($channel);
if (!$result) {
$this->response(-1, '操作失败');
$this->response(-1, '修改失败');
}
$this->response(0, '操作成功');
//如果是申请审核,还要去修改审核状态
if ($isAudit) {
$supplierService = new SupplierService();
$auditData[] = [
'supplier_id' => $supplierId,
'apply_audit_reason' => '申请审核',
];
$supplierService->batchApplyInReviewSupplier($auditData);
}
$this->response(0, $isAudit ? '申请审核成功' : '修改成功');
}
......
......@@ -86,7 +86,8 @@ class SupplierContactApiController extends Controller
$data = BatchTrim($data);
//先去表单验证
$validator = new SupplierContactValidator();
$validateResult = $validator->checkSave($request);
$requestData = $request->all();
$validateResult = $validator->checkSave($requestData);
if ($validateResult) {
$this->response(-1, $validateResult);
}
......
......@@ -39,7 +39,8 @@ class SupplierReceiptApiController extends Controller
{
//先去表单验证
$validator = new ReceiptValidator();
$validateResult = $validator->checkSave($request);
$requestData = $request->all();
$validateResult = $validator->checkSave($requestData);
if ($validateResult) {
$this->response(-1, $validateResult);
}
......
......@@ -25,6 +25,9 @@ class SupplierFilter
if (!empty($map['supplier_id'])) {
$query->where('supplier_channel.supplier_id', $map['supplier_id']);
}
if (!empty($map['supplier_type'])) {
$query->where('supplier_channel.supplier_type', $map['supplier_type']);
}
if (!empty($map['supplier_name'])) {
$query->where('supplier_name', 'like', "{$map['supplier_name']}%");
}
......
......@@ -10,16 +10,15 @@ class ReceiptValidator
{
//保存相关的验证,别问我为什么不用laravel自带的form-request类
//因为控制器那边已经被之前的人魔改的难用的一比,而且控制器那边还接收了一大堆统一变量
public function checkSave($request)
public function checkSave($data,$returnAllError = false)
{
$receipt = $data;
//整理下请求数据
$receipt = $request->all();
$rules = [
"bank_name" => "required",
"bank_adderss" => "required",
"account_no" => "required",
"receipt_type" => 'required',
// "account_name" => "required",
"certificate" => "required",
];
if ($receipt['receipt_type'] == 2) {
......@@ -30,20 +29,24 @@ class ReceiptValidator
//判断联系方式的表单验证
if ($validator->fails()) {
if ($returnAllError) {
return $validator->errors()->all();
}else{
return $validator->errors()->first();
}
}
}
private function messages()
{
return [
'receipt_type.required' => '开户名称不能为空',
'bank_name.required' => '类型不能为空',
'bank_adderss.required' => '开户行不能为空',
'receipt_type.required' => '开户名称 不能为空',
'bank_name.required' => '类型 不能为空',
'bank_adderss.required' => '开户行 不能为空',
'swift_code.required' => '电汇号码 Swift Code 不能为空',
'account_no.required' => '银行账号不能为空',
'account_name.required' => '账户名称不能为空',
'certificate.required' => '银行信息凭证不能为空',
'account_no.required' => '银行账号 不能为空',
'account_name.required' => '账户名称 不能为空',
'certificate.required' => '银行信息凭证 不能为空',
];
}
}
\ No newline at end of file
......@@ -33,10 +33,10 @@ class SupplierAttachmentValidator
private function messages()
{
return [
'field_name.required' => '附件类型不能为空',
'validity.required' => '有效期类型不能为空',
'file_url.required' => '上传文件不能为空',
'file_name.required' => '文件名不能为空',
'field_name.required' => '附件类型 不能为空',
'validity.required' => '有效期类型 不能为空',
'file_url.required' => '上传文件 不能为空',
'file_name.required' => '文件名 不能为空',
];
}
}
\ No newline at end of file
......@@ -9,10 +9,8 @@ use Validator;
class SupplierContactValidator
{
public function checkSave($request)
public function checkSave($data)
{
$data = $request->all();
$data = BatchTrim($data);
$rules = [
"supplier_consignee" => "required",
......@@ -57,13 +55,13 @@ class SupplierContactValidator
private function messages()
{
return [
'supplier_consignee.required' => '联系人不能为空',
'supplier_email.required' => '联系人邮箱不能为空',
'supplier_consignee.required' => '联系人 不能为空',
'supplier_email.required' => '联系人邮箱 不能为空',
'supplier_email.email' => '邮箱格式不对',
'supplier_mobile.required' => '联系人电话不能为空',
'supplier_telephone.required' => '联系人座机不能为空',
'supplier_position.required' => '联系人职位不能为空',
'can_check_uids.required' => '采购员不能为空',
'supplier_mobile.required' => '联系人电话 不能为空',
'supplier_telephone.required' => '联系人座机 不能为空',
'supplier_position.required' => '联系人职位 不能为空',
'can_check_uids.required' => '采购员 不能为空',
];
}
}
\ No newline at end of file
......@@ -5,8 +5,10 @@ namespace App\Http\Validators;
use App\Http\Services\SupplierPayTypeService;
use App\Model\SupplierAttachmentModel;
use App\Model\SupplierAttachmentsModel;
use App\Model\SupplierChannelModel;
use App\Model\SupplierContactModel;
use App\Model\SupplierReceiptModel;
use Validator;
class SupplierValidator
......@@ -17,11 +19,12 @@ class SupplierValidator
{
//整理下请求数据
$validateData = $this->transformRequestData($validateData);
//这个supplierId是用来判断是新增还是修改的
$supplierId = array_get($validateData, 'supplier_id');
//如果是修改直接提交,不是点申请审核的,只需要校验供应商名称是否存在即可
if (!$isAudit) {
if (empty($validateData['supplier_name'])) {
return '供应商名称不能为空';
return '供应商名称 不能为空';
}
if (empty($supplierId)) {
......@@ -43,6 +46,8 @@ class SupplierValidator
'legal_representative' => 'required',
'stockup_type' => 'required',
'main_brands' => 'required',
'pay_type' => 'required',
'settlement_type' => 'required',
'currency' => 'required',
'main_customers' => 'max:100',
'ticket_time' => 'max:20',
......@@ -50,7 +55,7 @@ class SupplierValidator
'cn_delivery_time' => 'regex:/^\d+\-\d$/',
'us_delivery_time' => 'regex:/^\d+\-\d$/',
'shipping_address' => 'max:100',
'billing_period_detail' => 'required|max:100',
//'billing_period_detail' => 'required|max:100',
'return_address' => 'max:100',
'return_consignee' => 'max:50',
'return_phone' => 'max:50',
......@@ -66,48 +71,84 @@ class SupplierValidator
'can_check_uids' => 'required',
];
$errorMessageList = [];
/**
* --->>附件必填要求:
* 如果供应商类别为正式供应商,营业执照、开票资料必须上传,供应商性质为现货商,则品质保证协议必须上传;
* 如果供应商类别为临时供应商,营业执照、开票资料必须上传,品质保证协议不需要上传
**/
//只有在提交供应商是正式的时候,才会去校验附件
if ($validateData['supplier_type'] == 1) {
if ($isAudit) {
//产品要把表单校验改成审核的时候才去校验,这个时候附件就要单独去取值了,要不然这个时候提交上来的肯定没有附件信息
$attachments = SupplierAttachmentModel::where('supplier_id', $supplierId)->first();
$attachments = !empty($attachments) ? $attachments->toArray() : [];
$validateData = array_merge($validateData, $attachments);
}
//校验附件,只要营业执照、商业登记证、公司注册证至少其中一个上传了附件,就判定已经上传了附件
$attachmentValidateFields = [
'business_license',
'registration_certificate',
'incorporation_certificate'
];
//校验附件这块,新增和修改判断的逻辑不一样
if (empty($supplierId)) {
$attachmentFields = $validateData['field_name'];
} else {
$attachmentFields = SupplierAttachmentsModel::where('supplier_id',
$supplierId)->get()->pluck('field_name')->toArray();
}
if (!$attachmentFields) {
$errorMessageList[] = '请上传附件';
}
$attachmentFields = array_unique($attachmentFields);
//fixed.php FileNameMapping 可以知道所有对应关系
if (!$validateData['billing_information']) {
return '附件 : 请上传开票资料!';
if (!in_array('business_license', $attachmentFields)) {
$errorMessageList[] = '营业执照必须上传';
}
$attachmentValidateFieldsExist = false;
foreach ($attachmentValidateFields as $field) {
if (array_get($validateData, $field)) {
$attachmentValidateFieldsExist = true;
break;
if (!in_array('billing_information', $attachmentFields)) {
$errorMessageList[] = '开票资料必须上传';
}
if ($validateData['supplier_type'] == 1 && $validateData['supplier_group'] == 2) {
if (!in_array('quality_assurance_agreement', $attachmentFields)) {
$errorMessageList[] = '供应商为正式供应商,并且供应商类型是现货商,则品质保证协议必须上传';
}
if (!$attachmentValidateFieldsExist) {
return '附件里营业执照、商业登记证、公司注册证至少要上传一个';
}
//如果供应商性质是现货商,那么品质协议也不能为空
if ($validateData['supplier_group'] == 2) {
if (empty($validateData['quality_assurance_agreement'])) {
return '该供应商为现货商,请上传品质协议!';
//银行信息校验
$receiptValidator = new ReceiptValidator();
if (empty($supplierId)) {
$receiptData = array_only($validateData, [
'receipt_type',
'bank_name',
'bank_adderss',
'account_no',
'account_name',
'account_adderss',
'certificate',
'swift_code',
]);
$receiptValidateResult = $receiptValidator->checkSave($receiptData, true);
if ($receiptValidateResult) {
$errorMessageList = array_merge($errorMessageList, $receiptValidateResult);
}
} else {
$receipts = SupplierReceiptModel::where('supplier_id', $supplierId)->get()->toArray();
if (!$receipts) {
$errorMessageList[] = '供应商至少有一个财务信息,请补全';
} else {
foreach ($receipts as $receipt) {
$receiptValidateResult = $receiptValidator->checkSave($receipt);
if ($receiptValidateResult) {
$errorMessageList[] = $receiptValidateResult;
}
}
}
}
//第一次新增的时候,是要校验联系人的
if (empty($validateData['supplier_id'])) {
//联系人校验
if (empty($supplierId)) {
$rules = array_merge($rules, $contactRuler);
} else {
//修改的时候,还要去判断联系人是否有
//至少要有一个联系方式
$contactCount = SupplierContactModel::where('supplier_id', $supplierId)->count();
if (!$contactCount) {
$errorMessageList[] = "供应商至少要有一个联系人,请补全";
}
}
//币种为人民币的话需要验证税号
......@@ -115,19 +156,28 @@ class SupplierValidator
$rules['tax_number'] = 'required';
}
//新增的时候,渠道开发不能为空
if (empty($validateData['supplier_id'])) {
//如果付款方式为账期,那么月结天数一定要选
if ($validateData['pay_type'] == 1) {
if (!$validateData['pay_type_value']) {
$errorMessageList[] = '付款方式选择账期,月结天数必须设置';
}
}
//新增的时候,渠道开发 不能为空
if (empty($supplierId)) {
$rules['purchase_uid'] = 'required';
}
$messages = $this->messages();
$validator = Validator::make($validateData, $rules, $messages);
if ($validator->fails()) {
return $validator->errors()->first();
$errors = $validator->errors()->all();
$errorMessageList = array_merge($errors, $errorMessageList);
}
//检验名称是否已经存在数据库
if (!empty($validateData['supplier_name'])) {
$companyNameCount = 0;
if (empty($supplierId)) {
$count = SupplierChannelModel::where('supplier_name', $validateData['supplier_name'])->count();
......@@ -136,17 +186,13 @@ class SupplierValidator
} else {
$count = SupplierChannelModel::where('supplier_name', $validateData['supplier_name'])
->where('supplier_id', '!=', $supplierId)->count();
//至少要有一个联系方式
$contactCount = SupplierContactModel::where('supplier_id', $supplierId)->count();
if (!$contactCount) {
return "供应商至少要有一个联系人,请补全";
}
}
if ($count) {
return "该供应商名称已经存在,请核验后再提交";
$errorMessageList[] = "该供应商名称已经存在,请核验后再提交";
}
if ($companyNameCount) {
return "该注册公司名已经存在,请核验后再提交";
$errorMessageList[] = "该注册公司名已经存在,请核验后再提交";
}
}
if (!empty($supplierId)) {
......@@ -163,56 +209,63 @@ class SupplierValidator
})->get();
$notCompleteContacts = !empty($notCompleteContacts) ? $notCompleteContacts->toArray() : [];
if ($notCompleteContacts) {
return "存在和你相关的联系人没有完善,请先去完善相关联系人";
$errorMessageList[] = "存在和你相关的联系人没有完善,请先去完善相关联系人";
}
}
return implode('|', $errorMessageList);
}
private function messages()
private
function messages()
{
return [
'supplier_type.required' => '供应商类别不能为空',
'supplier_name.required' => '供应商名称不能为空',
'currency.required' => '结算币种不能为空',
'legal_representative.required' => '法人代表不能为空',
'stockup_type.required' => '合作类型不能为空',
'register_company_name.required' => '注册公司名不能为空',
'supplier_group.required' => '公司性质不能为空',
'supplier_address.required' => '注册地址不能为空',
'region.required' => '所在区域不能为空',
'purchase_uid.required' => '渠道开发员不能为空',
'supplier_type.required' => '供应商类别 不能为空',
'supplier_name.required' => '供应商名称 不能为空',
'currency.required' => '结算币种 不能为空',
'legal_representative.required' => '法人代表 不能为空',
'stockup_type.required' => '合作类型 不能为空',
'pay_type.required' => '付款方式 不能为空',
'settlement_type.required' => '结算方式 不能为空',
'register_company_name.required' => '注册公司名 不能为空',
'supplier_group.required' => '公司性质 不能为空',
'supplier_address.required' => '注册地址 不能为空',
'region.required' => '所在区域 不能为空',
'purchase_uid.required' => '渠道开发员 不能为空',
'cn_ratio.min' => '人民币系数必须是大于1的浮点数',
'business_license.required' => '营业执照不能为空',
'established_time.required' => '成立时间不能为空',
'business_license.required' => '营业执照 不能为空',
'established_time.required' => '成立时间 不能为空',
'us_ratio.min' => '美金系数必须是大于1的浮点数',
'us_delivery_time.regex' => '香港货期格式不正确',
'cn_delivery_time.regex' => '大陆货期格式不正确',
'tax_number.required' => '如果选择币种为人民币,则公司税号不能为空',
'supplier_consignee.required' => '联系方式的联系人不能为空',
'tax_number.required' => '如果选择币种为人民币,则公司税号 不能为空',
'supplier_consignee.required' => '联系方式的联系人 不能为空',
'supplier_consignee.max' => '联系方式的联系人不能超过50个字符',
'supplier_position.required' => '联系方式的职称不能为空',
'supplier_position.required' => '联系方式的职称 不能为空',
'supplier_position.max' => '联系方式的职称不能超过30个字符',
'supplier_telephone.required' => '联系方式的座机号不能为空',
'supplier_mobile.required' => '联系方式的手机号不能为空',
'supplier_telephone.required' => '联系方式的座机号 不能为空',
'supplier_mobile.required' => '联系方式的手机号 不能为空',
'supplier_mobile.max' => '联系方式的手机号不能超过30个字符',
'supplier_email.required' => '联系方式的邮箱不能为空',
'supplier_email.required' => '联系方式的邮箱 不能为空',
'supplier_email.email' => '联系方式的邮箱格式不对',
'can_check_uids.required' => '联系方式对应的采购员不能为空',
'shipping_address.required' => '发货地址不能为空',
'can_check_uids.required' => '联系方式对应的采购员 不能为空',
'shipping_address.required' => '发货地址 不能为空',
'shipping_address.max' => '发货地址不能超过100个字符',
'return_address.max' => '退货地址不能超过100个字符',
'return_consignee.max' => '退货收货人不能超过50个字符',
'return_phone.max' => '退货收货人电话不能超过50个字符',
'main_brands.required' => '主营品牌不能为空',
'main_brands.required' => '主营品牌 不能为空',
'main_customers.max' => '3-5家客户描述不能超过100个字符',
'ticket_time.max' => '到票时间不能超过20个字符',
'billing_period_detail.required' => '账期详情不能为空',
'billing_period_detail.required' => '账期详情 不能为空',
'billing_period_detail.max' => '账期详情不能超过100个字符',
];
}
public function transformRequestData($validateData)
{
public
function transformRequestData(
$validateData
) {
foreach ($validateData as &$item) {
if (!is_array($item)) {
$item = trim($item);
......
......@@ -205,19 +205,21 @@ return [
1 => '先款后货',
2 => '月结',
],
'FileNameMapping' => [
'business_license' => '营业执照',
'billing_information' => '开票资料',
'quality_assurance_agreement' => '品质保证协议',
'registration_certificate' => '商业登记证',
'cooperation_agreement' => '合作协议',
'proxy_certificate' => '代理证',
'incorporation_certificate' => '公司注册证',
'certification_notice' => '认证通知书',
'supplier_survey' => '供应商调查表',
'proxy_certificate' => '代理证',
'quality_assurance_agreement' => '品质保证协议',
'confidentiality_agreement' => '保密协议',
'cooperation_agreement' => '合作协议',
'other_attachment' => '其它附件',
],
//罗盘菜单对应id
'CompassMenuMap' => [
'total' => '全部',
......
......@@ -46,6 +46,7 @@
}
, accept: 'file'
, exts: 'jpg|png|bmp|jpeg|zip|pdf'
, size: 20000
, before: function (obj) {
layer.msg('加载中', {
icon: 16
......
......@@ -27,6 +27,7 @@
}
, accept: 'file'
, exts: 'jpg|png|bmp|jpeg|zip|pdf'
, size: 20000
, before: function (obj) {
layer.msg('加载中', {
icon: 16
......@@ -75,7 +76,6 @@
admin.closeThisTabs();
} else {
layer.msg(res.err_msg, {icon: 5});
//todo
}
}
return false;
......@@ -94,7 +94,12 @@
layer.msg(res.err_msg, {icon: 6});
admin.closeThisTabs();
} else {
layer.msg(res.err_msg, {icon: 5});
let errMsg = res.err_msg;
let msg = '';
$.each(errMsg.split('|'), function (index, value) {
msg += "<span>" + value + "</span><br>"
});
layer.msg(msg, {icon: 5})
}
}
});
......
<script>
layui.use(['table', 'form', 'element', 'layer', 'admin', 'index', 'laydate', 'xmSelect'], function () {
let admin = layui.admin;
let index = layui.index;
let form = layui.form;
let table = layui.table;
......@@ -8,18 +9,35 @@
layer.load(1);
});
form.on('submit(updateSupplier)', function (data) {
let confirmMessage = '';
if (data.field.status === '-2') {
confirmMessage = '确定要重新入驻吗,该供应商就会再次进入审核阶段'
} else if (data.field.status === '-1') {
confirmMessage = '确定要提交新增供应商信息吗?一旦提交,该供应商就会进入待复审阶段,审核过程中无法进行信息修改'
}else if (data.field.status === '3') {
} else if (data.field.status === '3') {
confirmMessage = '确定要重新提交审核吗?一旦提交,该供应商就会再次进入审核中阶段,审核过程中无法进行信息修改';
} else {
//修改不需要进入审核了,有个单独提交审核的按钮
confirmMessage = '确定要修改供应商信息吗?<br>一旦修改关键字段,该供应商就会再次进入<b>待审核</b>状态,需要去列表页<b>提交申请审核</b>,送至主管审核';
updateSupplier(data);
return;
}
layer.confirm(confirmMessage, function (index) {
updateSupplier(data);
});
})
form.on('submit(applyAuditSupplier)', function (data) {
let confirmMessage = '确定要修改供应商信息吗?<br>一旦修改关键字段,该供应商就会再次进入<b>审核中</b>状态,送至主管审核,期间不允许修改供应商信息';
layer.confirm(confirmMessage, function (index) {
data.field.is_audit = 1;
updateSupplier(data);
});
});
function updateSupplier(data) {
let res = ajax('/api/supplier/UpdateSupplier', data.field);
if (res.err_code === 0) {
admin.putTempData("needFreshList", 1)
......@@ -28,10 +46,14 @@
layer.msg(res.err_msg, {icon: 6})
layer.close(index);
} else {
layer.msg(res.err_msg, {icon: 5})
}
let errMsg = res.err_msg;
let msg = '';
$.each(errMsg.split('|'), function (index, value) {
msg += "<span>" + value + "</span><br>"
});
})
layer.msg(msg, {icon: 5})
}
}
});
</script>
\ No newline at end of file
......@@ -39,20 +39,20 @@
page: {},
});
//新增银行弹窗
//新增附件弹窗
$("#add_attachment").click(function () {
layer.open({
type: 2,
content: '/supplier_attachment/AddSupplierAttachment?view=iframe&supplier_id=' + supplierId,
area: ['50%', '70%'],
title: '新增银行',
title: '新增附件',
end: function () {
table.reload('attachmentList');
}
});
})
//修改银行弹窗
//修改附件弹窗
$("#update_attachment").click(function () {
let checkStatus = table.checkStatus('attachmentList');
let data = checkStatus.data;
......
......@@ -22,16 +22,6 @@
}
});
// laydate.render({
// elem: '.validity_period',
// type: 'date',
// trigger: 'click',
// range: '~', //或 range: '~' 来自定义分割字符,
// value: '',
// });
form.on('select(validity_period_selector)', function (data) {
fileType = data.value;
let validityPeriodTimeSelector = $(this).parents('.layui-col-md7')
......@@ -45,8 +35,6 @@
}
});
upload.render({
elem: '#upload_button',
url: '{{config('website.UploadUrl')}}', //改成您自己的上传接口
......@@ -93,7 +81,7 @@
} else {
layer.msg('上传接口异常,请重试或者联系管理员 . ' + res.message);
}
lay('.validity_period').each(function(){
lay('.validity_period').each(function () {
console.log(this)
laydate.render({
elem: this,
......
......@@ -18,17 +18,18 @@
<div class="layui-card-body">
<style>
.fix-button {
height: 110px;
height: 40px;
margin-top: 0;
margin-left: -30px;
margin-left: -90px;
padding: 10px 45px;
position: fixed;
bottom: 0;
top: 0;
background: white;
width: 100%;
z-index: 10;
}
</style>
<div style="height:40px"></div>
<blockquote class="layui-elem-quote layui-text">
<b>基本信息</b>
</blockquote>
......@@ -177,7 +178,7 @@
<input type="hidden" name="stockup_type"
value="{{$supplier['stockup_type'] or ''}}">
@foreach(config('fixed.StockupType') as $k=>$type)
<input type="checkbox"
<input type="checkbox" name="stockup_type[{{$k}}]"
lay-skin="primary"
title="{{$type}}">
@endforeach
......@@ -193,7 +194,7 @@
<div class="layui-form-item">
<div class="layui-inline" id="tax_number_div"
style="display: none;"
style="display: none;margin-top: 10px"
>
<label class="layui-form-label"><span class="require">*</span>公司税号</label>
<div class="layui-input-inline">
......@@ -204,7 +205,6 @@
@include('web.supplier.SupplierPayType')
<blockquote class="layui-elem-quote layui-text">
<b>财务信息</b>
</blockquote>
......@@ -292,7 +292,7 @@
<b>联系人</b>
</blockquote>
<div class="layui-form-item">
<div class="layui-col-md5">
<div class="layui-col-md4">
<label class="layui-form-label"><span class="require">*</span>联系人</label>
<div class="layui-input-block block-42">
<input type="text" name="supplier_consignee" id="supplier_consignee"
......@@ -300,7 +300,7 @@
value="">
</div>
</div>
<div class="layui-col-md5">
<div class="layui-col-md4">
<label class="layui-form-label"><span class="require">*</span>职位</label>
<div class="layui-input-block block-42">
<input type="text" name="supplier_position" id="supplier_position"
......@@ -308,11 +308,7 @@
value="">
</div>
</div>
<div class="layui-col-md2">
</div>
</div>
<div class="layui-form-item">
<div class="layui-col-md5">
<div class="layui-col-md4">
<label class="layui-form-label"><span class="require">*</span>邮箱</label>
<div class="layui-input-block block-42">
<input type="text" name="supplier_email" id="supplier_email"
......@@ -320,7 +316,9 @@
value="">
</div>
</div>
<div class="layui-col-md5">
</div>
<div class="layui-form-item">
<div class="layui-col-md4">
<label class="layui-form-label"><span class="require">*</span>手机号</label>
<div class="layui-input-block block-42">
<input type="text" name="supplier_mobile" id="supplier_mobile"
......@@ -328,10 +326,7 @@
value="">
</div>
</div>
<div class="layui-col-md2"></div>
</div>
<div class="layui-form-item">
<div class="layui-col-md5">
<div class="layui-col-md4">
<label class="layui-form-label"><span class="require">*</span>座机</label>
<div class="layui-input-block block-42">
<input type="text" name="supplier_telephone" id="supplier_telephone"
......@@ -339,7 +334,7 @@
value="">
</div>
</div>
<div class="layui-col-md5">
<div class="layui-col-md4">
<label class="layui-form-label">QQ</label>
<div class="layui-input-block block-42">
<input type="text" name="supplier_qq" id="supplier_qq"
......@@ -347,10 +342,9 @@
value="">
</div>
</div>
<div class="layui-col-md2"></div>
</div>
<div class="layui-form-item">
<div class="layui-col-md5">
<div class="layui-col-md4">
<label class="layui-form-label">传真</label>
<div class="layui-input-block block-42">
<input type="text" name="supplier_fax" id="supplier_fax"
......@@ -358,44 +352,48 @@
value="">
</div>
</div>
<div class="layui-col-md5">
<div class="layui-col-md4">
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('can_check_uids','采购员','',
$userCodes,['required'=>true]) !!}
</div>
<div class="layui-col-md2"></div>
<div class="layui-col-md4"></div>
</div>
<blockquote class="layui-elem-quote layui-text">
<b>附件管理</b>
</blockquote>
@include('web.supplier.SupplierFile')
<div style="height: 100px"></div>
{{-- <div class="fix-button">--}}
<div>
<div class="layui-row" style="width: 90%;">
<hr>
<div class="layui-col-md7">
<div class="layui-form-item" style="margin-top: 10px;margin-left: 10px">
<p>
<b>特别说明:</b>
</p>
<p>
1.在创建新的供应商前,请先查询该供应商是否已经存在。如果供应商已存在,则不允许新增。
1、在创建新的供应商前,请先查询该供应商是否已经存在。如果供应商已存在,则不允许新增。
</p>
<p>
2.附件上传支持小于20M的PDF/ZIP/JPG/PNG/BMP格式,每个类型最多支持上传一个文件
2、附件上传支持小于20M的PDF/ZIP/JPG/PNG/BMP格式,每个类型允许上传多份;
</p>
<P>
3.此处新增供应商基本信息以及配置跟进人,其他信息补全必须进入编辑页面
3、此处新增供应商基本信息以及配置跟进人,其他信息补全必须进入编辑页面;
</P>
<P>
4、正式供应商建档必须上传营业执照,开票资料,现货商类型必须上传品质协议;
</P>
<P>
5、正式供应商建档必须维护至少一条银行信息;
</P>
</div>
<div class="layui-col-md5" style="margin-top: 30px">
<div class="layui-row" style="text-align: right">
<div class="fix-button">
<div>
<div class="layui-row" style="width: 100%;padding-left: 50px" >
<div class="layui-col-md12">
<div class="layui-row" style="text-align: left">
<button type="button" class="layui-btn layui-btn submit-loading" lay-submit
lay-filter="addSupplier">保存
</button>
<button type="button" class="layui-btn layui-btn submit-loading" id="apply_audit_button"
lay-submit lay-filter="addAndApplySupplier">申请审核
</button>
<button type="button" class="layui-btn layui-btn submit-loading" lay-submit
lay-filter="addSupplier">确认
</button>
<button lay-filter="cancelAddSupplier"
type="button" lay-submit
class="layui-btn layui-btn-primary">取消
......@@ -403,9 +401,10 @@
</div>
</div>
</div>
<hr>
</div>
</div>
</form>
<hr/>
</div>
</div>
@include('script.supplier.SupplierBaseScript')
......
......@@ -113,9 +113,12 @@
style="text-align: left;padding-left: 20px">{{$printData['ticket_time'] or ''}}</td>
</tr>
<tr>
<td width="20%" colspan="1">账期详情*</td>
{{-- <td width="20%" colspan="1">账期详情*</td>--}}
<td width="20%" colspan="1"></td>
{{-- <td width="80%" colspan="5"--}}
{{-- style="text-align: left;padding-left: 20px">{{$printData['billing_period_detail'] or ''}}</td>--}}
<td width="80%" colspan="5"
style="text-align: left;padding-left: 20px">{{$printData['billing_period_detail'] or ''}}</td>
style="text-align: left;padding-left: 20px"></td>
</tr>
<tr>
<td width="20%" colspan="1">业务负责人</td>
......
......@@ -189,7 +189,7 @@
到票时间 :{{$supplier['ticket_time']}}
</div>
<div class="layui-col-md3">
<span class="required_field">*</span> 账期详情 :{{$supplier['billing_period_detail']}}
{{-- <span class="required_field">*</span> 账期详情 :{{$supplier['billing_period_detail']}}--}}
</div>
</div>
<div class="layui-row" style="width: 700px">
......@@ -273,10 +273,14 @@
</div>
<hr/>
<blockquote class="layui-elem-quote layui-text">
<b>财务信息</b>
<b><span class="require">*</span>财务信息</b>
</blockquote>
@include('web.supplier.SupplierReceipt')
<blockquote class="layui-elem-quote layui-text">
<b><span class="require">*</span>附件管理</b>
</blockquote>
@include('web.supplier.SupplierAttachment')
<blockquote class="layui-elem-quote layui-text">
<b>运输信息</b>
</blockquote>
<div class="layui-row">
......
......@@ -81,6 +81,9 @@
<button type="button" class="layui-btn layui-btn submit-loading" lay-submit
lay-filter="updateSupplier">确认修改供应商
</button>
<button type="button" class="layui-btn layui-btn submit-loading" lay-submit
lay-filter="applyAuditSupplier">申请审核
</button>
@endif
<a id="supplierDetailUrl"
href="/supplier/SupplierDetail?view=iframe&supplier_id={{$supplier['supplier_id']}}"
......
......@@ -199,14 +199,14 @@
value="{{$supplier['ticket_time'] or ''}}">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label"><span class="require">*</span>账期详情</label>
<div class="layui-input-block">
<input type="text" name="billing_period_detail" style="width: 470px" placeholder="请输入账期详情"
class="layui-input"
value="{{$supplier['billing_period_detail'] or ''}}">
</div>
</div>
{{-- <div class="layui-inline">--}}
{{-- <label class="layui-form-label"><span class="require">*</span>账期详情</label>--}}
{{-- <div class="layui-input-block">--}}
{{-- <input type="text" name="billing_period_detail" style="width: 470px" placeholder="请输入账期详情"--}}
{{-- class="layui-input"--}}
{{-- value="{{$supplier['billing_period_detail'] or ''}}">--}}
{{-- </div>--}}
{{-- </div>--}}
</div>
@if($operate!='add' && checkPerm('UpdateSupplierTags'))
<blockquote class="layui-elem-quote layui-text">
......
......@@ -53,7 +53,7 @@
</div>
<div class="layui-col-md7">
<label class="layui-form-label">有效期 : </label>
<div class="layui-input-inline" style="width: 100px">
<div class="layui-input-inline" style="width: 100px">$attachmentFields
<select name="validity_type[]" lay-filter="validity_period_selector">
<option value="">请选择</option>
<option value="1">长期有效</option>
......
......@@ -177,7 +177,7 @@
<div class="layui-col-md3">
<div class="layui-inline">
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('pay_type','付款方式 : ',
{!! $statusPresenter->render('pay_type','付款周期 : ',
isset($supplier['pay_type'])?$supplier['pay_type']:'',config('fixed.SupplierPayType'),['required'=>true]) !!}
</div>
</div>
......@@ -205,7 +205,7 @@
{{-- <input type="hidden" class="valueInput" name="pay_type_extra" value="%">--}}
{{-- </div>--}}
</div>
<div class="pay_type_1_div" style="display: none">
<div class="pay_type_1_div" style="display: none;margin-left: -100px">
<div class="layui-row">
<span class="require">*</span>月结 : &nbsp
<div class="layui-input-inline" style="width: 80px;">
......
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