Commit e63de1c2 by 杨树贤

修复冲突

parents 40300e2f d0465329
......@@ -31,6 +31,6 @@ class SetSupplierFollowUp extends Command
public function handle()
{
$service = new DataService();
$service->importMainBrandData();
$service->importSupplierLevel();
}
}
......@@ -32,7 +32,11 @@ class SupplierShareApplyApiController extends Controller
$this->response(-1, '供应商名称不能为空');
}
$supplierModel = new SupplierChannelModel();
$supplier = $supplierModel->where('supplier_name', $supplierName)->first();
//下面的处理是为了兼容有问题的数据
if (!empty($supplier = $supplierModel->where('supplier_name', $supplierName)->first())) {
$supplier = $supplierModel->where('supplier_name', 'like', "%$supplierName%")->whereNotIn('status',
[SupplierChannelModel::STATUS_DISABLE, SupplierChannelModel::STATUS_REJECT])->first();
}
if (empty($supplier)) {
$this->response(-1, '该供应商名称不存在,请输入正确供应商名称');
}
......
......@@ -29,6 +29,25 @@ class LogService
$model->insert($data);
}
//添加日志
public function AddAdminLog($supplierId, $type, $action, $content, $remark = '')
{
$adminId = 1000;
$adminName = 'admin';
$data = [
'supplier_id' => $supplierId,
'type' => $type,
'action' => $action,
'content' => $content,
'remark' => $remark,
'admin_id' => $adminId,
'admin_name' => $adminName,
'add_time' => time(),
];
$model = new LogModel();
$model->insert($data);
}
public function getLogs($supplierId, $type = '', $limit = 100)
{
$model = new LogModel();
......
......@@ -14,6 +14,7 @@ class SupplierContactTransformer
foreach ($list as &$item) {
$user = $service->getAdminUserInfoByCodeId($item['can_check_uids']);
$item['channel_name'] = array_get($user, 'name');
$item['working_status'] = $service->checkIsResignedByCodeId($item['can_check_uids']) ? '离职' : '在职';
}
unset($item);
......
......@@ -195,6 +195,8 @@ class SupplierTransformer
//转换表单数据
public function transformPostData($channel)
{
$channel['supplier_name'] = trim($channel['supplier_name']);
if (!empty($channel['stockup_type'])) {
$stockupType = array_keys($channel['stockup_type']);
$stockupType = !empty($stockupType) ? implode(",", $stockupType) : '';
......
......@@ -23,6 +23,7 @@ class SupplierValidator
'legal_representative' => 'required',
'stockup_type' => 'required',
'main_brands' => 'required',
'currency' => 'required',
'main_customers' => 'max:100',
'ticket_time' => 'max:20',
'region' => 'required',
......@@ -159,6 +160,7 @@ class SupplierValidator
return [
'supplier_type.required' => '供应商类别不能为空',
'supplier_name.required' => '供应商名称不能为空',
'currency.required' => '结算币种不能为空',
'legal_representative.required' => '法人代表不能为空',
'stockup_type.required' => '合作类型不能为空',
'register_company_name.required' => '注册公司名不能为空',
......
......@@ -56,7 +56,7 @@ class IntracodeModel extends Model
}
}
$redis->set('EncodedList_all_supplier', json_encode($codeList));
$redis->expire('EncodedList_all_supplier', 60 * 10);//缓存10分钟
$redis->expire('EncodedList_all_supplier', 60);//缓存10分钟
}
}
return $codeList;
......
No preview for this file type
No preview for this file type
[ZoneTransfer]
ZoneId=3
HostUrl=about:internet
......@@ -29,7 +29,7 @@
form.on('radio(receipt_type)', function (data) {
if (data.value == 1) {
$('#swift_code_div').hide();
}else{
} else {
$('#swift_code_div').show();
}
});
......@@ -44,6 +44,8 @@
k2: k2,
source: 1
}
, accept: 'file'
, exts: 'jpg|png|bmp|jpeg|zip|pdf'
, before: function (obj) {
layer.msg('加载中', {
icon: 16
......@@ -52,7 +54,11 @@
let item = this.item;
//预读本地文件示例,不支持ie8
obj.preview(function (index, file, result) {
$('#' + item.attr('preview')).attr('src', result); //图片链接(base64)
// if (file.type.indexOf('image') !== -1){
// $('#' + item.attr('preview')).attr('src', result); //图片链接(base64)
// }else{
// $('#' + item.attr('preview')).attr('src', '/images/file.png');
// }
});
}
, done: function (res) {
......@@ -60,6 +66,7 @@
layer.msg('上传成功', {icon: 6});
let item = this.item;
$('#' + item.attr('data-obj')).val(res.data[0]);
$('#certificate_url').text(res.data[0]);
return false;
} else {
layer.msg('上传失败', {icon: 5});
......
......@@ -28,10 +28,11 @@
{field: 'supplier_position', title: '职位', align: 'center',width: 100},
{field: 'supplier_email', title: '邮箱', align: 'center',width: 200},
{field: 'supplier_mobile', title: '手机号', align: 'center',width: 150},
{field: 'supplier_telephone', title: '座机', align: 'center',width: 180},
{field: 'supplier_telephone', title: '座机', align: 'center',width: 150},
{field: 'supplier_qq', title: 'QQ', align: 'center',width: 120},
{field: 'supplier_fax', title: '传真', align: 'center',width: 140},
{field: 'channel_name', title: '采购员', align: 'center',width: 170},
{field: 'channel_name', title: '采购员', align: 'center',width: 110},
{field: 'working_status', title: '采购员状态', align: 'center',width: 120},
]],
id: 'contactList',
page: {},
......
......@@ -33,11 +33,10 @@
{field: 'bank_adderss', title: '开户行', align: 'center', width: 150},
{field: 'account_no', title: '银行账号', align: 'center', width: 130},
{field: 'account_name', title: '账户名称', align: 'center', width: 150},
{field: 'swift_code', title: '电汇号码', align: 'center', width: 150},
{field: 'swift_code', title: '电汇号码', align: 'center', width: 130},
{
field: 'certificate', title: '信息凭证', width: 150, align: 'center', templet: function (data) {
return "<a href='" + data.certificate + "' target='_blank'>" +
"<img class='certificate_img' style='width: 70px;height: 60px' src='" + data.certificate + "'></a>";
field: 'certificate', title: '信息凭证', width: 200, align: 'center', templet: function (data) {
return "<a href='" + data.certificate + "' target='_blank'>" + data.certificate + "</a>";
}
},
{field: 'remark', title: '备注', align: 'center', width: 200},
......
......@@ -82,10 +82,11 @@
value="{{$receipt['certificate'] or ''}}">
<button type="button" class="layui-btn upload-img" preview="preview" data-obj="certificate">
<i class="layui-icon">&#xe67c;</i>上传图片
<i class="layui-icon">&#xe67c;</i>上传文件
</button>
<img @if(!empty($receipt['certificate'])) src="{{$receipt['certificate'] or ''}}"
@endif class="layui-upload-img" width="50px" height="50px" id="preview">
<a target="_blank" id="certificate_url" href="{{$receipt['certificate'] or ''}}">{{$receipt['certificate'] or ''}}</a>
{{-- <img @if(!empty($receipt['certificate'])) src="{{$receipt['certificate'] or ''}}"--}}
{{-- @endif class="layui-upload-img" width="50px" height="50px" id="preview">--}}
</div>
</div>
<div class="layui-form-item">
......
......@@ -175,7 +175,7 @@
</div>
<div class="layui-row">
<div class="layui-col-md2">
结算币种 :{{$supplier['currency_name']}}
<span class="required_field">*</span> 结算币种 :{{$supplier['currency_name']}}
</div>
<div class="layui-col-md3">
@if ($supplier['currency']==1)
......
......@@ -170,7 +170,7 @@
<div class="layui-inline">
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('currency','结算币种',
isset($supplier)?$supplier['currency']:'',config('fixed.Currency'),['required'=>false]) !!}
isset($supplier)?$supplier['currency']:'',config('fixed.Currency'),['required'=>true]) !!}
</div>
<div class="layui-inline" id="tax_number_div"
@if(empty($supplier) || (!empty($supplier)&&$supplier['currency']!=1))
......
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