Commit 64a2ece9 by mushishixian

固定div

parent 9d87174c
......@@ -35,6 +35,7 @@ class SupplierApiController extends Controller
'tax_number',
'supplier_address',
'main_brands',
'purchase_uid',
'upload_file',
'legal_representative',
'established_time',
......@@ -96,7 +97,7 @@ class SupplierApiController extends Controller
$validator = new SupplierValidator();
$validateResult = $validator->checkSave($request);
if ($validateResult) {
// $this->response(-1, $validateResult);
$this->response(-1, $validateResult);
}
$channel = $request->only($this->channelMap);
$service = new SupplierService();
......
......@@ -66,20 +66,43 @@ class SupplierContactApiController extends Controller
$contactId = $request->get('contact_id');
if ($contactId) {
$model = new SupplierContactModel();
$supplierId = $model->where('contact_id', $contactId)->value('supplier_id');
$contactCount = $model->where('supplier_id', $supplierId)->count();
$contact = $model->where('contact_id', $contactId)->first();
$contactCount = $model->where('supplier_id', $contact['supplier_id'])->count();
if ($contactCount == 1) {
$this->response(-1, '供应商至少要有一个联系方式');
}
//从主表里面删除对应的采购
//先去判断这个采购是不是唯一的
$canCheckUids = $contact['can_check_uids'];
$userNum = $model->where('supplier_id', $contact['supplier_id'])->where('can_check_uids',
$canCheckUids)->count();
if ($userNum === 1) {
//如果只有一个,那就可以去主表删除对应的采购员了
$supplierModel = new SupplierChannelModel();
$supplier = $supplierModel->where('supplier_id',$contact['supplier_id'])->first();
$channelUid = explode(',',$supplier['channel_uid']);
if (in_array($canCheckUids, $channelUid)) {
//删除
$channelUid = array_filter($channelUid, function ($value)use($canCheckUids) {
return $value != $canCheckUids;
});
$supplierModel->where('supplier_id',$contact['supplier_id'])->update([
'channel_uid' => implode(',', $channelUid),
'update_time'=> time(),
]);
}
}
$result = $model->whereIn('contact_id', $contactId)->delete();
if (!$result) {
$this->response(-1, '删除失败');
}
$supplierModel = new SupplierChannelModel();
$supplierModel->where('supplier_id', $supplierId)->update([
'update_time' => time(),
'status' => 1,
]);
//修改为审核状态
//$supplierModel->where('supplier_id', $supplierId)->update([
// 'update_time' => time(),
// 'status' => 1,
//]);
$this->response(0, '删除成功');
}
$this->response(-1, '找不到删除对象');
......
......@@ -28,7 +28,7 @@ class SupplierFilter
$codes = explode(',', $map['supplier_code']);
$query->whereIn('supplier_code', $codes);
}
if (!empty($map['supplier_group']) || (isset($map['supplier_group'])&&$map['supplier_group'] === '0')) {
if (!empty($map['supplier_group']) || (isset($map['supplier_group']) && $map['supplier_group'] === '0')) {
$query->where('supplier_group', $map['supplier_group']);
}
if (!empty($map['stockup_type'])) {
......@@ -146,16 +146,17 @@ class SupplierFilter
->where('purchase_uid', '');
break;
case "invalid_channel_uid":
//不合理的采购(比如采购离职了)
//不合理的渠道开发(比如渠道开发离职了)
$adminUserService = new AdminUserService();
$resignedUsers = $adminUserService->getResignedUsers();
$resignedUserCodes = array_column($resignedUsers, 'code_id');
//存在无效(离职)开发员
$query->where('status', '!=', SupplierChannelModel::STATUS_DISABLE)
->whereIn('purchase_uid', $resignedUserCodes);
//因为可以查看自己部下相关的采购员,开发员的供应商,所以要构建复杂likeIn语句需要的数据
//注意下面三个条件最外层要用()包围起来,要不然mysql数据会有问题,具体自己查询mysql的and和or的语法注意事项
$likeSqlRaw = implode('|', $resignedUserCodes);
$query->whereRaw(DB::raw("(channel_uid REGEXP '$likeSqlRaw')"));
break;
case "invalid_purchase_uid":
//不合理的渠道开发(比如渠道开发离职了)
//不合理的采购(比如采购离职了)
$adminUserService = new AdminUserService();
$resignedUsers = $adminUserService->getResignedUsers();
$resignedUserCodes = array_column($resignedUsers, 'code_id');
......
......@@ -77,7 +77,7 @@ class SupplierController extends Controller
//记录查看日志(1个小时内查看的跳过)
$logModel = new LogModel();
$lastViewAddTime = $logModel->where('supplier_id', $supplierId)->where('admin_id', $request->user->userId)
->where('type', LogModel::VIEW_OPERATE)->value('add_time');
->where('type', LogModel::VIEW_OPERATE)->orderBy('id','desc')->value('add_time');
$oneHourTimestamp = 3600;
if (time() - $lastViewAddTime > $oneHourTimestamp) {
$logService = new LogService();
......@@ -178,7 +178,7 @@ class SupplierController extends Controller
$this->data['userCodes'] = $intracodeModel->getSampleEncode();
$logModel = new LogModel();
$this->data['logs'] = $logModel->where('supplier_id', $supplierId)
->where('action', 'allocate_purchase_user')->orderBy('id', 'desc')
->where('action', '分配渠道开发员')->orderBy('id', 'desc')
->limit(10)->get();
return $this->view('审核供应商');
}
......
......@@ -43,6 +43,14 @@ class SupplierContactService
{
$model = new SupplierContactModel();
//判断新增还是编辑
//还要将采购的数据整理重新写入
$supplierId = $contact['supplier_id'];
$supplierModel = new SupplierChannelModel();
$channelUid = $supplierModel->where('supplier_Id',$supplierId)->value('channel_uid');
$channelUid = explode(',', $channelUid);
$channelUid = array_filter($channelUid, function ($value) {
return !empty($value);
});
if (!empty($contact['contact_id'])) {
$contact['update_time'] = time();
$result = $model->where('contact_id', $contact['contact_id'])->update($contact);
......@@ -50,13 +58,21 @@ class SupplierContactService
$contact['add_time'] = time();
$result = $model->insert($contact);
}
//不存在则写入
if (!in_array($contact['can_check_uids'], $channelUid)) {
$channelUid[] = $contact['can_check_uids'];
}
$supplierModel->where('supplier_id',$supplierId)->update([
'channel_uid'=>implode(',',$channelUid),
'update_time' => time(),
]);
if ($result) {
//修改供应商为审核状态
$supplierModel = new SupplierChannelModel();
$supplierModel->where('supplier_id', $contact['supplier_id'])->update([
'update_time' => time(),
'status' => 1,
]);
// //修改供应商为审核状态
// $supplierModel = new SupplierChannelModel();
// $supplierModel->where('supplier_id', $contact['supplier_id'])->update([
// 'update_time' => time(),
// 'status' => 1,
// ]);
$logService = new LogService();
$content = !empty($contact['contact_id'])?'修改联系人':'添加联系人';
$remark = json_encode($contact);
......@@ -65,26 +81,4 @@ class SupplierContactService
return $result;
}
//批量保存联系方式,要区分新增还是修改还是删除
public function saveContacts($supplierId, $contacts)
{
//先找到原来所有contact
$model = new SupplierContactModel();
$originContactIds = $model->where('supplier_id', $supplierId)->pluck('contact_id')->toArray();
$newContactIds = array_column($contacts, 'contact_id');
$needDeleteContactIds = array_diff_assoc($originContactIds, $newContactIds);
$model->whereIn('contact_id', $needDeleteContactIds)->delete();
foreach ($contacts as $key => $contact) {
//新增
if (empty($contact['contact_id'])) {
$contact['can_check_uids'] = request()->user->userId;
$model->insert($contact);
} else {
unset($contact['can_check_uids']);
//修改
$model->where('contact_id', $contact['contact_id'])->update($contact);
}
}
}
}
\ No newline at end of file
......@@ -74,12 +74,8 @@ class SupplierService
'hk' => $channel['hk'],
'cn' => $channel['cn'],
];
$address = array_only($channel,
['supplier_id', 'shipping_address', 'return_address', 'return_consignee', 'return_phone']);
$supplierAddressService = new SupplierAddressService();
$supplierAddressService->saveAddress($address);
//插入
unset($channel['hk'], $channel['cn'], $channel['return_phone'], $channel['return_address'],
$channel['return_consignee'], $channel['shipping_address'], $channel['cn_delivery_time_period'], $channel['us_delivery_time_period']);
......@@ -88,6 +84,13 @@ class SupplierService
$channel['create_uid'] = request()->user->userId;
$channel['create_name'] = request()->user->name;
$channel['create_time'] = time();
$channel['update_time'] = time();
$channel = array_map(function ($value) {
if ($value === null) {
$value = (strval($value));
}
return $value;
}, $channel);
$channel['status'] = SupplierChannelModel::STATUS_PENDING;
$supplierId = $model->insertGetId($channel);
$this->saveSupplierCode($supplierId);
......@@ -96,6 +99,9 @@ class SupplierService
$newSupplier = $model->where('supplier_id', $supplierId)->first();
$logRemark = json_encode($newSupplier);
} else {
$supplierAddressService = new SupplierAddressService();
$supplierAddressService->saveAddress($address);
$extraFaxService = new SupplierExtraFeeService();
$extraFaxService->saveSupplierExtraFee($extraFax);
$supplierId = $channel['supplier_id'];
......
......@@ -28,6 +28,7 @@ class SupplierValidator
'return_address' => 'max:100',
'return_consignee' => 'max:50',
'return_phone' => 'max:50',
'upload_file.business_license' => 'required',
'cn_ratio' => 'min:1',
'us_ratio' => 'min:1',
'contact.supplier_consignee.*' => 'required|max:50',
......@@ -42,10 +43,14 @@ class SupplierValidator
$rules['tax_number'] = 'required';
}
//新增的时候,渠道开发不能为空
if (empty($requestData['supplier_id'])) {
$rules['purchase_uid'] = 'required';
}
//营业执照是不能为空的
$messages = $this->messages();
$validator = Validator::make($requestData, $rules, $messages);
//判断联系方式的表单验证
if ($validator->fails()) {
return $validator->errors()->first();
}
......@@ -62,9 +67,9 @@ class SupplierValidator
->where('supplier_id', '!=', $request->get('supplier_id'))->count();
//至少要有一个联系方式
$contactModel = new SupplierContactModel();
$contactCount = $contactModel->where('supplier_id',$request->get('supplier_id'))->count();
if ($contactCount) {
return "供应商至少要有一个联系方式,请补全";
$contactCount = $contactModel->where('supplier_id', $request->get('supplier_id'))->count();
if (!$contactCount) {
return "供应商至少要有一个联系,请补全";
}
}
if ($count) {
......@@ -82,9 +87,10 @@ class SupplierValidator
'stockup_type.required' => '合作类型不能为空',
'register_company_name.required' => '注册公司名不能为空',
'supplier_group.required' => '行业性质不能为空',
'region.required' => '所区域不能为空',
'region.required' => '所区域不能为空',
'purchase_uid.required' => '渠道开发员不能为空',
'cn_ratio.min' => '人民币系数必须是大于1的浮点数',
'upload_file.business_license.required' => '营业执照不能为空',
'us_ratio.min' => '美金系数必须是大于1的浮点数',
'us_delivery_time.regex' => '香港货期格式不正确',
'cn_delivery_time.regex' => '大陆货期格式不正确',
......
......@@ -52,7 +52,7 @@ return [
|
*/
'timezone' => 'UTC',
'timezone' => 'PRC',
/*
|--------------------------------------------------------------------------
......
......@@ -4,7 +4,7 @@
let form = layui.form;
let element = layui.element;
form.on('submit(load)', function (data) {
layer.confirm('确定要保存联系人吗?一旦保存,该供应商就会再次进入审核阶段', function (index) {
// layer.confirm('确定要保存联系人吗?一旦保存,该供应商就会再次进入审核阶段', function (index) {
let supplierId = getQueryVariable('supplier_id');
let url = '/api/supplier_contact/SaveSupplierContact?supplier_id=' + supplierId;
let res = ajax(url, data.field);
......@@ -20,6 +20,6 @@
}
});
return false;
});
// });
});
</script>
\ No newline at end of file
......@@ -13,7 +13,7 @@
, cellMinWidth: 80 //全局定义常规单元格的最小宽度
, where: {
supplier_id:{{$supplier['supplier_id']}},
action: 'allocate_purchase_user',
action: '分配渠道开发员',
}
, loading: true
, first: true //不显示首页
......
......@@ -104,10 +104,14 @@
} else {
let supplierId = data[0].supplier_id;
let status = data[0].status;
if (status !== 1) {
if (status !== 1 && status !== -1) {
layer.msg('该供应商已经被审核', {icon: 5})
return
}
if (status === -1) {
layer.msg('该供应商联系人未补全', {icon: 5});
return
}
layer.open({
type: 2,
content: '/supplier/AuditSupplier?view=iframe&supplier_id=' + supplierId,
......@@ -190,13 +194,10 @@
return false;
});
form.on('submit(export)', function (data) {
data.field.source_type = 'all';
let urlWithParams = convertObjToUrlParams(data.field);
window.open('/api/supplier/export?' + urlWithParams);
return false;
form.on('submit(reset)', function (data) {
layer.load(1);
location.reload();
});
});
</script>
\ No newline at end of file
......@@ -16,6 +16,7 @@
let res = ajax('/api/supplier/UpdateSupplier', data.field)
if (res.err_code === 0) {
table.reload('receiptList')
location.href = "/supplier/SupplierDetail?view=iframe&supplier_id={{$supplier['supplier_id']}}"
layer.msg(res.err_msg, {icon: 6})
} else {
layer.msg(res.err_msg, {icon: 5})
......
......@@ -58,9 +58,12 @@
let brandIds = $('#main_brands').attr('value');
brandSelector.setValue(brandIds.split(','));
form.on('submit(load)', function (data) {
let supplierId = getQueryVariable('supplier_id');
let url = '/api/supplier_contact/SaveSupplierContact?supplier_id=' + supplierId;
form.on('submit(cancelAddSupplier)', function (data) {
admin.closeThisDialog();
});
form.on('submit(addSupplier)', function (data) {
let url = '/api/supplier/AddSupplier';
let res = ajax(url, data.field);
if (!res) {
layer.msg('网络错误,请重试', {icon: 6});
......
......@@ -6,7 +6,9 @@
let admin = layui.admin;
let element = layui.element;
let upload = layui.upload;
let layer = layui.layer;
let fileName = '';
var loadIndex = 0;
upload.render({
elem: '.uploadButton'
, url: '{{config('website.UploadUrl')}}' //改成您自己的上传接口
......@@ -25,6 +27,7 @@
let files = obj.pushFile();
let recentFile = files[Object.keys(files)[Object.keys(files).length - 1]]
fileName = recentFile.name;
loadIndex = layer.load(1);
}
, done: function (res, index, upload) {
if (res.code === 200) {
......@@ -33,6 +36,7 @@
} else {
layer.msg('上传接口异常,请重试或者联系管理员 . ' + res.message);
}
layer.close(loadIndex);
}
});
});
......
......@@ -24,7 +24,7 @@
<div class="layui-form-item">
<label class="layui-form-label">审核意见 : </label>
<div class="layui-input-block">
<input type="radio" name="status" value="1" title="同意">
<input type="radio" name="status" value="2" title="同意">
<input type="radio" name="status" value="3" title="不同意">
</div>
</div>
......
<style>
.fix-top {
height: 140px;
margin-top: 15px;
padding: 10px 15px;
position: fixed;
top: 0;
background: white;
width: 100%;
z-index: 10;
}
</style>
<div class="layui-card">
<div class="layui-card-header" style="height: 140px;">
<div class="layui-card-header fix-top">
<div class="layui-row">
<div class="layui-col-md2">
<b>{{$supplier['supplier_name']}}</b>
......@@ -44,7 +56,7 @@
</div>
@endif
</div>
<div class="layui-card-body">
<div class="layui-card-body" style="margin-top: 160px">
<div class="layui-tab">
<ul class="layui-tab-title">
<li class="layui-this" id="base_info">基本信息</li>
......@@ -149,7 +161,7 @@
<div class="layui-col-md2">
退货收货人 :{{$address['return_consignee']}}
</div>
<div class="layui-col-md2">
<div class="layui-col-md3">
退货收货人电话 :{{$address['return_phone']}}
</div>
</div>
......
......@@ -12,6 +12,17 @@
line-height: 30px;
}
.fix-top {
height: 140px;
margin-top: 15px;
padding: 10px 15px;
position: fixed;
top: 0;
background: white;
width: 100%;
z-index: 10;
}
/*.layui-form-label {*/
/* width: 150px;*/
/*}*/
......@@ -22,7 +33,7 @@
</style>
<div class="layui-card">
<form class="layui-form" action="">
<div class="layui-card-header" style="height: 140px;">
<div class="layui-card-header fix-top">
<div class="layui-row">
<div class="layui-col-md2">
<b>{{$supplier['supplier_name']}}</b>
......@@ -49,18 +60,16 @@
</div>
<div class="layui-col-md8"></div>
</div>
<div class="layui-row">
<div class="layui-btn-group" style="margin-bottom: 25px;margin-top: 5px">
<button type="button" class="layui-btn layui-btn" lay-submit
lay-filter="updateSupplier">提交
</button>
<a id="supplierDetailUrl"
href="/supplier/SupplierDetail?view=iframe&supplier_id={{$supplier['supplier_id']}}"
class="layui-btn layui-btn-warm">取消</a>
</div>
<div class="layui-row" style="margin-bottom: 25px;margin-top: 5px">
<button type="button" class="layui-btn layui-btn" lay-submit
lay-filter="updateSupplier">提交
</button>
<a id="supplierDetailUrl"
href="/supplier/SupplierDetail?view=iframe&supplier_id={{$supplier['supplier_id']}}"
class="layui-btn layui-btn-primary">取消</a>
</div>
</div>
<div class="layui-card-body">
<div class="layui-card-body" style="margin-top: 160px">
<input type="hidden" name="supplier_id" value="{{$supplier['supplier_id']}}">
<input type="hidden" name="supplier_code" value="{{$supplier['supplier_code']}}">
<div class="layui-tab">
......@@ -80,7 +89,7 @@
<blockquote class="layui-elem-quote layui-text">
<b>系统设置</b>
</blockquote>
<div class="layui-row" style="margin-bottom: 10px">
<div class="layui-row" style="margin-bottom: 10px">
<div class="layui-col-md2">
供应商编码 :{{$supplier['supplier_code']}}
</div>
......@@ -89,12 +98,12 @@
</div>
</div>
<div class="layui-row">
<div class="layui-col-md3">
<div class="layui-inline" style="margin-left: -40px">
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('trading_method','交易方式 : ',
isset($supplier)?$supplier['trading_method']:'',config('fixed.TradingMethod'),['required'=>false]) !!}
</div>
<div class="layui-col-md3">
<div class="layui-inline" style="margin-left: -40px">
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('trading_method','交易方式 : ',
isset($supplier)?$supplier['trading_method']:'',config('fixed.TradingMethod'),['required'=>false]) !!}
</div>
</div>
<div class="layui-col-md3">
<div class="layui-inline" style="margin-left: -150px">
......@@ -128,7 +137,7 @@
value="{{$address['return_address']}}">
</div>
</div>
<div class="layui-form-item" style="width:60%">
<div class="layui-form-item" style="width:70%">
<div class="layui-inline">
<label class="layui-form-label">退货收货人 : </label>
<div class="layui-input-inline">
......@@ -139,9 +148,10 @@
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">退货收货人电话 : </label>
<label class="layui-form-label" style="width: 130px">退货收货人电话 : </label>
<div class="layui-input-inline">
<input type="text" name="return_phone" id="return_phone" placeholder="请输入退货收货人电话"
<input type="text" name="return_phone" id="return_phone"
placeholder="请输入退货收货人电话"
class="layui-input" value="{{$address['return_phone']}}">
</div>
</div>
......
......@@ -16,7 +16,7 @@
<label class="layui-form-label"><span class="require">*</span>注册公司名 : </label>
<div class="layui-input-block">
<input type="text" name="register_company_name" id="register_company_name"
placeholder="请输入注册公司名" class="layui-input @if(!empty($supplier))layui-disabled @endif"
placeholder="请输入注册公司名,注册公司名一旦设置,后续无法更改" class="layui-input @if(!empty($supplier))layui-disabled @endif"
value="{{$supplier['register_company_name'] or ''}}">
</div>
</div>
......@@ -138,7 +138,17 @@
</blockquote>
@inject('statusPresenter','App\Presenters\StatusPresenter')
<div class="layui-form-item">
{!! $statusPresenter->render('region','渠道开发员','',$userCodes,['required'=>true,'width'=>'150px']) !!}
{!! $statusPresenter->render('purchase_uid','渠道开发员','',$userCodes,['required'=>true,'width'=>'150px']) !!}
</div>
<div class="layui-row" style="text-align: right">
{{-- <div class="layui-btn-group" style="margin-bottom: 25px;margin-top: 5px">--}}
<button type="button" class="layui-btn layui-btn" lay-submit
lay-filter="addSupplier">确认
</button>
<button lay-filter="cancelAddSupplier"
type="button" lay-submit
class="layui-btn layui-btn-primary">取消</button>
{{-- </div>--}}
</div>
@endif
@include('script.supplier.SupplierBaseScript')
......
<div class="layui-form-item">
<div class="layui-row">
<div class="layui-col-md3">
<div class="layui-row" style="margin-bottom: 5px">
<div class="layui-col-sm5">
<label class="layui-form-label"><span class="require">*</span>营业执照 :
</label>
<div class="layui-upload">
......@@ -10,7 +10,7 @@
value="{{$supplier['qualification_photos']['business_license']['value'] or ''}}">
</div>
</div>
<div class="layui-col-md3">
<div class="layui-col-sm5">
<label class="layui-form-label">开票资料 :
</label>
<div class="layui-upload">
......@@ -21,8 +21,8 @@
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md3">
<div class="layui-row" style="margin-bottom: 5px">
<div class="layui-col-sm5">
<label class="layui-form-label">商业登记证 :
</label>
<div class="layui-upload">
......@@ -32,7 +32,7 @@
value="{{$supplier['qualification_photos']['registration_certificate']['value'] or ''}}">
</div>
</div>
<div class="layui-col-md3">
<div class="layui-col-sm5">
<label class="layui-form-label">公司注册证 :
</label>
<div class="layui-upload">
......@@ -43,8 +43,8 @@
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md3">
<div class="layui-row" style="margin-bottom: 5px">
<div class="layui-col-sm5">
<label class="layui-form-label">认证通知书 :
</label>
<div class="layui-upload">
......@@ -54,7 +54,7 @@
value="{{$supplier['qualification_photos']['certification_notice']['value'] or ''}}">
</div>
</div>
<div class="layui-col-md3">
<div class="layui-col-sm5">
<label class="layui-form-label">供应商调查表 :
</label>
<div class="layui-upload">
......@@ -65,8 +65,8 @@
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md3">
<div class="layui-row" style="margin-bottom: 5px">
<div class="layui-col-sm5">
<label class="layui-form-label">代理证 :
</label>
<div class="layui-upload">
......@@ -76,7 +76,7 @@
value="{{$supplier['qualification_photos']['proxy_certificate']['value'] or ''}}">
</div>
</div>
<div class="layui-col-md3">
<div class="layui-col-sm5">
<label class="layui-form-label">品质保证协议 :
</label>
<div class="layui-upload">
......@@ -87,8 +87,8 @@
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md3">
<div class="layui-row" style="margin-bottom: 5px">
<div class="layui-col-sm5">
<label class="layui-form-label">保密协议 :
</label>
<div class="layui-upload">
......@@ -98,7 +98,7 @@
value="{{$supplier['qualification_photos']['confidentiality_agreement']['value'] or ''}}">
</div>
</div>
<div class="layui-col-md3">
<div class="layui-col-sm5">
<label class="layui-form-label">合作协议 :
</label>
<div class="layui-upload">
......@@ -109,8 +109,8 @@
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md3">
<div class="layui-row" style="margin-bottom: 5px">
<div class="layui-col-sm5">
<label class="layui-form-label">其它附件 :
</label>
<div class="layui-upload">
......
<style>
.main_filter {
cursor:pointer;
}
</style>
<div class="layui-fluid" id="type_filter">
<div class="layui-card">
<div class="layui-card-body" style="padding: 0;">
......@@ -9,66 +14,66 @@
@if(checkPerm('SupplierPendingList'))
<div class="layui-row">
<a class="main_filter" id="pending">
</a>
</a>
</div>
@endif
@if(checkPerm('SupplierPendingList'))
@if(checkPerm('SupplierInReviewList'))
<div class="layui-row">
<a class="main_filter" id="in_review">
</a>
</a>
</div>
@endif
@if(checkPerm('SupplierPendingList'))
@if(checkPerm('SupplierPassedList'))
<div class="layui-row">
<a class="main_filter" id="passed">
</a>
</a>
</div>
@endif
@if(checkPerm('SupplierPendingList'))
@if(checkPerm('SupplierRejectList'))
<div class="layui-row">
<a class="main_filter" id="rejected">
</a>
</a>
</div>
@endif
@if(checkPerm('SupplierPendingList'))
@if(checkPerm('SupplierDisableList'))
<div class="layui-row">
<a class="main_filter" id="disable">
</a>
</a>
</div>
@endif
</div>
<div class="split-item" id="s3" style="text-align: center">
@if(checkPerm('SupplierPendingList'))
@if(checkPerm('SupplierNoPurchaseUidList'))
<div class="layui-row">
<a class="main_filter" id="no_purchase_uid">
</a>
<a title="非禁用状态的渠道开发员为空的供应商" class="main_filter" id="no_purchase_uid">
</a>
</div>
@endif
@if(checkPerm('SupplierPendingList'))
@if(checkPerm('SupplierInvalidChannelUidList'))
<div class="layui-row">
<a class="main_filter" id="invalid_channel_uid">
</a>
<a title="非禁止交易状态联系人绑定的采购员姓名不在组织架构中(采购员离职)的供应商" class="main_filter" id="invalid_channel_uid">
</a>
</div>
@endif
@if(checkPerm('SupplierPendingList'))
@if(checkPerm('SupplierInvalidPurchaseUidList'))
<div class="layui-row">
<a class="main_filter" id="invalid_purchase_uid">
</a>
<a title="非禁止交易状态联系人绑定的渠道开发员姓名不在组织架构中(渠道开发员离职)的供应商" class="main_filter" id="invalid_purchase_uid">
</a>
</div>
@endif
</div>
<div class="split-item" id="s4" style="text-align: center">
@if(checkPerm('SupplierPendingList'))
@if(checkPerm('SupplierToFollowUpList'))
<div class="layui-row">
<a class="main_filter" id="to_follow_up">
</a>
<a title="非禁止交易状态的供应商重新分配渠道员,且必填信息不完整;或者禁用状态的供应商重新分配渠道员" class="main_filter" id="to_follow_up">
</a>
</div>
@endif
@if(checkPerm('SupplierPendingList'))
@if(checkPerm('SupplierNoSkuList'))
<div class="layui-row">
<a class="main_filter" id="no_sku">
</a>
</a>
</div>
@endif
</div>
......@@ -120,7 +125,7 @@
</div>
<div class="layui-row" style="margin-top:10px;margin-bottom: 10px;margin-left: 20px;">
<button class="layui-btn layui-btn-sm layui-btn load" lay-submit="" lay-filter="load">查询</button>
<a class="layui-btn layui-btn-sm layui-btn " href="">重置</a>
<button type="button" class="layui-btn layui-btn-sm layui-btn" lay-submit="" lay-filter="reset" >重置</button>
<button type="button" class="layui-btn layui-btn-sm layui-btn hide_filter_type">隐藏罗盘</button>
<button type="button" class="layui-btn layui-btn-sm layui-btn show_filter_type"
style="display: none">显示罗盘
......@@ -140,6 +145,7 @@
});
}
}
supplierStatistics();
//罗盘隐藏
$('.hide_filter_type').click(function () {
......
......@@ -45,14 +45,14 @@
<div class="layui-inline">
<label class="layui-form-label">人民币系数</label>
<div class="layui-input-inline" style="width: 50px">
<input type="text" name="cn_ratio" value="{{$supplier['cn_ratio'] or 1}}" lay-verify="required"
<input type="text" name="cn_ratio" value="{{$supplier['cn_ratio'] or 1}}"
placeholder="请输入人民币系数" autocomplete="off" class="layui-input" style="display: inline-block">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">美金系数</label>
<div class="layui-input-inline" style="width: 50px">
<input type="text" name="us_ratio" value="{{$supplier['us_ratio'] or 1}}" lay-verify="required"
<input type="text" name="us_ratio" value="{{$supplier['us_ratio'] or 1}}"
placeholder="请输入采购附加费" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux">
......@@ -68,7 +68,7 @@
<label class="layui-form-label">大陆交期</label>
<div class="layui-input-inline" style="width: 50px">
<input type="text" name="cn_delivery_time" value="{{$supplier['cn_delivery_time'] or 1}}"
lay-verify="required" autocomplete="off" class="layui-input">
autocomplete="off" class="layui-input">
</div>
<div class="layui-input-inline" style="width: 50px">
<select name="cn_delivery_time_period">
......@@ -81,7 +81,7 @@
<label class="layui-form-label">香港交期</label>
<div class="layui-input-inline" style="width: 50px">
<input type="text" name="us_delivery_time" value="{{$supplier['us_delivery_time'] or 1}}"
lay-verify="required" autocomplete="off" class="layui-input">
autocomplete="off" class="layui-input">
</div>
<div class="layui-input-inline" style="width: 50px">
<select name="us_delivery_time_period">
......
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