Commit 64a2ece9 by mushishixian

固定div

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