Commit 126ca0c6 by 杨树贤

临时暂存

parent 98f56bd5
...@@ -40,6 +40,7 @@ class SupplierApiController extends Controller ...@@ -40,6 +40,7 @@ class SupplierApiController extends Controller
'legal_representative', 'legal_representative',
'established_time', 'established_time',
'trading_method', 'trading_method',
'phone',
//省市 //省市
'province_city', 'province_city',
...@@ -173,6 +174,7 @@ class SupplierApiController extends Controller ...@@ -173,6 +174,7 @@ class SupplierApiController extends Controller
} }
$channelMap = array_merge($this->channelMap, config('field.AttachmentFields')); $channelMap = array_merge($this->channelMap, config('field.AttachmentFields'));
$channel = $request->only($channelMap); $channel = $request->only($channelMap);
dd($channel);
$service = new SupplierService(); $service = new SupplierService();
$result = $service->saveSupplier($channel); $result = $service->saveSupplier($channel);
if (!$result) { if (!$result) {
...@@ -285,6 +287,7 @@ class SupplierApiController extends Controller ...@@ -285,6 +287,7 @@ class SupplierApiController extends Controller
$supplierName = trim($request->get('supplier_name')); $supplierName = trim($request->get('supplier_name'));
$taxNumber = $request->get('tax_number'); $taxNumber = $request->get('tax_number');
$supplierId = $request->get('supplier_id'); $supplierId = $request->get('supplier_id');
$region = $request->get('region');
$model = new SupplierChannelModel(); $model = new SupplierChannelModel();
//如果是编辑操作,则要忽略非当前 //如果是编辑操作,则要忽略非当前
...@@ -315,11 +318,11 @@ class SupplierApiController extends Controller ...@@ -315,11 +318,11 @@ class SupplierApiController extends Controller
// } // }
} }
} }
$regionType = $region == 2 ? 1 : 2;
//还要去请求天眼查获取资料 //还要去请求天眼查获取资料
$company = (new CompanyService())->getCompanyInfo($supplierName, $taxNumber); $company = (new CompanyService())->getCompanyInfo($supplierName, $taxNumber,$regionType);
if (!$company) { if (!$company) {
$this->response(-1, '公司未进行工商注册,请修改后重新提交'); $this->response(-2, '公司未进行工商注册,请修改后重新提交');
} }
$this->response(0, '供应商名称合理', $company); $this->response(0, '供应商名称合理', $company);
} }
......
...@@ -12,11 +12,11 @@ use Illuminate\Support\Facades\DB; ...@@ -12,11 +12,11 @@ use Illuminate\Support\Facades\DB;
class CompanyService class CompanyService
{ {
public function getCompanyInfo($supplierName, $taxNumber) public function getCompanyInfo($supplierName, $taxNumber,$regionType = 1)
{ {
$params = [ $params = [
'keyword' => $supplierName ?: $taxNumber, 'keyword' => $supplierName ?: $taxNumber,
'region' => 1, 'region' => $regionType,
'select_type' => 1, 'select_type' => 1,
]; ];
$url = config('website.InternalApiDomain') . '/companyInfo'; $url = config('website.InternalApiDomain') . '/companyInfo';
...@@ -27,10 +27,10 @@ class CompanyService ...@@ -27,10 +27,10 @@ class CompanyService
$companyInfo = array_get($result['data'], 0); $companyInfo = array_get($result['data'], 0);
$company = [ $company = [
'supplier_name' => $companyInfo['com_name'], 'supplier_name' => $companyInfo['com_name'],
'registered_capital' => $companyInfo['registered_capital'], 'registered_capital' => (int)$companyInfo['registered_capital'],
'supplier_address' => $companyInfo['com_address'], 'supplier_address' => $companyInfo['com_address'],
'tax_number' => $companyInfo['tyc_info']['taxNumber'], 'tax_number' => $companyInfo['tyc_info']['tax_number'],
'phone' => $companyInfo['tyc_info']['phoneNumber'], 'phone' => $companyInfo['tyc_info']['phone_number'],
]; ];
} }
return $company; return $company;
......
...@@ -64,11 +64,6 @@ class SupplierAuditService ...@@ -64,11 +64,6 @@ class SupplierAuditService
if ($result) { if ($result) {
//如果状态是复审 //如果状态是复审
if ($supplier['status'] == SupplierChannelModel::STATUS_NEED_REVIEW) { if ($supplier['status'] == SupplierChannelModel::STATUS_NEED_REVIEW) {
// if ($status == SupplierChannelModel::STATUS_PASSED) {
// SupplierChannelModel::where('supplier_id', $supplierId)->update([
// 'level' => 'E',
// ]);
// }
$auditStatus = $status == SupplierChannelModel::STATUS_PASSED ? '复审通过' : '复审不通过,原因是 : ' . $rejectReason; $auditStatus = $status == SupplierChannelModel::STATUS_PASSED ? '复审通过' : '复审不通过,原因是 : ' . $rejectReason;
$action = '复审供应商'; $action = '复审供应商';
} else { } else {
...@@ -84,6 +79,8 @@ class SupplierAuditService ...@@ -84,6 +79,8 @@ class SupplierAuditService
//发送队列消息同步到金蝶 //发送队列消息同步到金蝶
$service = new SyncSupplierService(); $service = new SyncSupplierService();
$service->syncSupplierToErp($supplierId); $service->syncSupplierToErp($supplierId);
//同步给一体化系统
(new SyncSupplierService())->syncSupplierToUnited($supplierId);
} }
return $result; return $result;
} }
......
...@@ -48,8 +48,11 @@ class SupplierService ...@@ -48,8 +48,11 @@ class SupplierService
//走事务 //走事务
$supplierId = DB::connection('web')->transaction(function () use ($channel, $model, $oldSupplier) { $supplierId = DB::connection('web')->transaction(function () use ($channel, $model, $oldSupplier) {
$tagService = new SupplierTagService();
//是否直接申请审核
$isDirectApply = request()->get('direct_apply');
$tagService = new SupplierTagService();
//获取附加税数据 //获取附加税数据
$extraFax = [ $extraFax = [
'supplier_id' => $channel['supplier_id'], 'supplier_id' => $channel['supplier_id'],
...@@ -121,7 +124,7 @@ class SupplierService ...@@ -121,7 +124,7 @@ class SupplierService
}, $channel); }, $channel);
//默认是待审核 //默认是待审核
//判断是否是直接添加并且申请审核 //判断是否是直接添加并且申请审核
if (request()->get('direct_apply')) { if ($isDirectApply) {
$channel['status'] = SupplierChannelModel::STATUS_IN_REVIEW; $channel['status'] = SupplierChannelModel::STATUS_IN_REVIEW;
} else { } else {
$channel['status'] = SupplierChannelModel::STATUS_PENDING; $channel['status'] = SupplierChannelModel::STATUS_PENDING;
...@@ -179,7 +182,9 @@ class SupplierService ...@@ -179,7 +182,9 @@ class SupplierService
$supplierAddressService->saveShippingAddress($supplierId, $shippingAddress); $supplierAddressService->saveShippingAddress($supplierId, $shippingAddress);
} else { } else {
//这里的是更新供应商的操作
/**这里的是更新供应商的操作**/
$supplierId = $this->newSupplierId = $channel['supplier_id']; $supplierId = $this->newSupplierId = $channel['supplier_id'];
//要做进一步判断,部分字段修改不需要审核 //要做进一步判断,部分字段修改不需要审核
...@@ -242,14 +247,13 @@ class SupplierService ...@@ -242,14 +247,13 @@ class SupplierService
$oldSystemTags); $oldSystemTags);
$tagService->saveTags($supplierId, SupplierTagService::TAG_TYPE_CUSTOMER, $channel['customer_tags'], $tagService->saveTags($supplierId, SupplierTagService::TAG_TYPE_CUSTOMER, $channel['customer_tags'],
$oldCustomerTags); $oldCustomerTags);
return $supplierId;
} }
//重新生成外部显示的编码 //重新生成外部显示的编码
$this->generateSupplierSn($supplierId, $channel['supplier_group']); $this->generateSupplierSn($supplierId, $channel['supplier_group']);
//保存和搜索相关的标签情况 //保存和搜索相关的标签情况
$supplierSearchTagService = new SupplierSearchTagService(); $supplierSearchTagService = new SupplierSearchTagService();
$supplierSearchTagService->saveSupplierSearchTags($supplierId); $supplierSearchTagService->saveSupplierSearchTags($supplierId);
return $supplierId;
}); });
//保存日志 //保存日志
......
...@@ -8,6 +8,7 @@ use App\Model\SupplierAttachmentsModel; ...@@ -8,6 +8,7 @@ use App\Model\SupplierAttachmentsModel;
use App\Model\SupplierChannelModel; use App\Model\SupplierChannelModel;
use App\Model\SupplierContactModel; use App\Model\SupplierContactModel;
use App\Model\SupplierSyncModel; use App\Model\SupplierSyncModel;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use PhpAmqpLib\Connection\AMQPStreamConnection; use PhpAmqpLib\Connection\AMQPStreamConnection;
use PhpAmqpLib\Message\AMQPMessage; use PhpAmqpLib\Message\AMQPMessage;
...@@ -127,7 +128,7 @@ class SyncSupplierService ...@@ -127,7 +128,7 @@ class SyncSupplierService
'company_type' => 2, 'company_type' => 2,
'company_name' => $supplier['supplier_name'], 'company_name' => $supplier['supplier_name'],
'company_tax_no' => $supplier['tax_number'], 'company_tax_no' => $supplier['tax_number'],
'init_nature' => $supplier['supplier_group'], 'init_nature' => Arr::get(config('fixed.SupplierGroup'), $supplier['supplier_group']),
'region' => $supplier['region'] == 2 ? 1 : 2, 'region' => $supplier['region'] == 2 ? 1 : 2,
'pi_file_url' => $fileUrl ?: '', 'pi_file_url' => $fileUrl ?: '',
]; ];
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace App\Http\Validators; namespace App\Http\Validators;
use App\Http\Services\CompanyService;
use App\Http\Services\SupplierPayTypeService; use App\Http\Services\SupplierPayTypeService;
use App\Model\SupplierAttachmentsModel; use App\Model\SupplierAttachmentsModel;
use App\Model\SupplierChannelModel; use App\Model\SupplierChannelModel;
...@@ -68,6 +69,7 @@ class SupplierValidator ...@@ -68,6 +69,7 @@ class SupplierValidator
'cn_ratio' => 'min:1', 'cn_ratio' => 'min:1',
'us_ratio' => 'min:1', 'us_ratio' => 'min:1',
'is_business_abnormal' => 'required', 'is_business_abnormal' => 'required',
'phone' => 'required',
]; ];
$contactRuler = [ $contactRuler = [
'supplier_consignee' => 'required|max:50', 'supplier_consignee' => 'required|max:50',
...@@ -245,21 +247,21 @@ class SupplierValidator ...@@ -245,21 +247,21 @@ class SupplierValidator
if (!empty($supplierId)) { if (!empty($supplierId)) {
//还要去判断当前提交人是否存在与其关联的联系人没有完善 //还要去判断当前提交人是否存在与其关联的联系人没有完善
$codeId = request()->user->codeId; $codeId = request()->user->codeId;
$notCompleteContacts = SupplierContactModel::where('supplier_id', $supplierId) $notCompleteContacts = (new SupplierContactModel())->getNotCompletedContacts($supplierId, $codeId);
->where('can_check_uids', $codeId)
->where(function ($q) {
$q->where('supplier_consignee', '')
->orWhere('supplier_position', '')
->orWhere('supplier_email', '')
->orWhere('supplier_mobile', '')
->orWhere('supplier_telephone', '');
})->get();
$notCompleteContacts = !empty($notCompleteContacts) ? $notCompleteContacts->toArray() : [];
if ($notCompleteContacts) { if ($notCompleteContacts) {
$errorMessageList[] = "存在和你相关的联系人没有完善,请先去完善相关联系人"; $errorMessageList[] = "存在和你相关的联系人没有完善,请先去完善相关联系人";
} }
} }
if (!checkPerm('IgnoreCompanyCheck')) {
$regionType = $validateData['region'] == 2 ? 1 : 2;
//还要校验提交上来的公司是否有合法信息
$companyInfo = (new CompanyService())->getCompanyInfo($validateData['supplier_name'],
$validateData['tax_number'],
$regionType);
if (empty($companyInfo)) {
$errorMessageList[] = '公司未进行工商注册,请修改后重新提交';
}
}
return implode('|', $errorMessageList); return implode('|', $errorMessageList);
} }
...@@ -288,6 +290,7 @@ class SupplierValidator ...@@ -288,6 +290,7 @@ class SupplierValidator
'supplier_consignee.required' => '联系方式的联系人 不能为空', 'supplier_consignee.required' => '联系方式的联系人 不能为空',
'supplier_consignee.max' => '联系方式的联系人不能超过50个字符', 'supplier_consignee.max' => '联系方式的联系人不能超过50个字符',
'supplier_position.required' => '联系方式的职称 不能为空', 'supplier_position.required' => '联系方式的职称 不能为空',
'phone.required' => '公司电话 不能为空',
'supplier_position.max' => '联系方式的职称不能超过30个字符', 'supplier_position.max' => '联系方式的职称不能超过30个字符',
'supplier_telephone.required' => '联系方式的座机号 不能为空', 'supplier_telephone.required' => '联系方式的座机号 不能为空',
'supplier_mobile.required' => '联系方式的手机号 不能为空', 'supplier_mobile.required' => '联系方式的手机号 不能为空',
......
...@@ -60,5 +60,5 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function () ...@@ -60,5 +60,5 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function ()
}); });
Route::match(['get', 'post'], '/test', function () { Route::match(['get', 'post'], '/test', function () {
(new \App\Http\Services\SyncSupplierService())->syncSupplierToUnited(10); (new \App\Http\Services\SyncSupplierService())->syncSupplierToUnited(12421);
}); });
...@@ -7,26 +7,33 @@ use Request; ...@@ -7,26 +7,33 @@ use Request;
class SupplierContactModel extends Model class SupplierContactModel extends Model
{ {
protected $connection='web'; protected $connection = 'web';
protected $table='supplier_contact'; protected $table = 'supplier_contact';
public $timestamps = false; public $timestamps = false;
public function AddInfo($SupplierID='',$data=''){
if(empty($SupplierID) || empty($data) || !is_array($data)) return false; public function AddInfo($SupplierID = '', $data = '')
{
if (empty($SupplierID) || empty($data) || !is_array($data)) {
return false;
}
$Add = array(); $Add = array();
foreach ($data as $k=>$v){ foreach ($data as $k => $v) {
foreach($v as $kk=>$vv){ foreach ($v as $kk => $vv) {
$Add[$kk][$k] = $vv; $Add[$kk][$k] = $vv;
$Add[$kk]['supplier_id'] = $SupplierID; $Add[$kk]['supplier_id'] = $SupplierID;
} }
} }
foreach($Add as $v){ foreach ($Add as $v) {
$this->insert($v); $this->insert($v);
} }
return true; return true;
} }
public function AddContactInfo($data='', $is_update = false){ public function AddContactInfo($data = '', $is_update = false)
if(empty($data) || !is_array($data)) return false; {
if (empty($data) || !is_array($data)) {
return false;
}
if ($is_update) { // 更新 if ($is_update) { // 更新
$supplier_id = $data['supplier_id']; $supplier_id = $data['supplier_id'];
unset($data['supplier_id']); unset($data['supplier_id']);
...@@ -36,24 +43,43 @@ class SupplierContactModel extends Model ...@@ -36,24 +43,43 @@ class SupplierContactModel extends Model
} }
} }
public function SaveInfo($SupplierID='',$data=''){ public function SaveInfo($SupplierID = '', $data = '')
if($SupplierID<=0) return false; {
if ($SupplierID <= 0) {
return false;
}
$this->where('supplier_id', '=', $SupplierID)->delete(); $this->where('supplier_id', '=', $SupplierID)->delete();
return $this->AddInfo($SupplierID,$data); return $this->AddInfo($SupplierID, $data);
} }
public function ContactInfo($SupplierID=''){ public function ContactInfo($SupplierID = '')
$collert=Request::only('supplier_id'); {
$collert=TrimX($collert,true,['supplier_id']); $collert = Request::only('supplier_id');
empty($collert) && $collert['supplier_id']=$SupplierID; $collert = TrimX($collert, true, ['supplier_id']);
if(empty($collert['supplier_id'])) return false; empty($collert) && $collert['supplier_id'] = $SupplierID;
$info=$this->where('supplier_id','=',$collert['supplier_id'])->get(); if (empty($collert['supplier_id'])) {
if(!$info) return false; return false;
$info=$info->toArray(); }
// $Arr=[]; $info = $this->where('supplier_id', '=', $collert['supplier_id'])->get();
// foreach ($info as $k=>$v){ if (!$info) {
// $Arr[$v['address_type']]=$v; return false;
// } }
$info = $info->toArray();
return $info; return $info;
} }
//获取未完整的联系方式
public function getNotCompletedContacts($supplierId, $codeId)
{
$notCompleteContacts = SupplierContactModel::where('supplier_id', $supplierId)
->where('can_check_uids', $codeId)
->where(function ($q) {
$q->where('supplier_consignee', '')
->orWhere('supplier_position', '')
->orWhere('supplier_email', '')
->orWhere('supplier_mobile', '')
->orWhere('supplier_telephone', '');
})->get();
return !empty($notCompleteContacts) ? $notCompleteContacts->toArray() : [];
}
} }
...@@ -77,3 +77,11 @@ function ajax(url, data) { ...@@ -77,3 +77,11 @@ function ajax(url, data) {
layer.closeAll(); layer.closeAll();
return result; return result;
} }
function inArray(needle, haystack) {
var length = haystack.length;
for (var i = 0; i < length; i++) {
if (haystack[i] == needle) return true;
}
return false;
}
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
form.on('submit(addSupplier)', function (data) { form.on('submit(addSupplier)', function (data) {
admin.showLoading({ admin.showLoading({
type: 2, type: 3,
}); });
let file_name = []; let file_name = [];
let file_url = []; let file_url = [];
...@@ -95,6 +95,7 @@ ...@@ -95,6 +95,7 @@
location.href = "/supplier/SupplierList" location.href = "/supplier/SupplierList"
}, 1000); }, 1000);
} else { } else {
admin.removeLoading();
layer.msg(res.err_msg, {icon: 5}); layer.msg(res.err_msg, {icon: 5});
} }
} }
...@@ -128,6 +129,7 @@ ...@@ -128,6 +129,7 @@
data.field.validity_type = validity_type; data.field.validity_type = validity_type;
data.field.validity_period = validity_period; data.field.validity_period = validity_period;
data.field.apply_audit_reason = $('#apply_audit_reason').val(); data.field.apply_audit_reason = $('#apply_audit_reason').val();
if (data.field.supplier_type === '2') { if (data.field.supplier_type === '2') {
layer.open({ layer.open({
type: 1, type: 1,
...@@ -144,7 +146,9 @@ ...@@ -144,7 +146,9 @@
}, },
}); });
} else { } else {
layer.confirm('确定直接申请审核吗?确定后会直接进入审核中的状态,审核完成前无法进行二次修改', function (index) { let msg = '确定直接申请审核吗?确定后会直接进入审核中的状态,审核完成前无法进行二次修改';
//未上传品质保证协议(代理商则提示为“未上传代理证”),是否需要切换为临时供应商?
layer.confirm(msg, function (index) {
addSupplier(data); addSupplier(data);
}); });
} }
...@@ -178,5 +182,27 @@ ...@@ -178,5 +182,27 @@
} }
} }
} }
function attachmentsUploadedTips(){
let msg = '';
//已经上传品质保证协议(代理商则提示为“已经上传代理证”),是否切换为正式供应商?
if (data.field.supplier_type === 2) {
//如果已经上传品质保证协议,并且供应商性质不是代理商(代理商要代理证)
if (inArray('quality_assurance_agreement', data.field.field_name) && data.field.supplier_group !== 1) {
msg = '已经上传品质保证协议,是否切换为正式供应商?'
}
if (inArray('proxy_certificate', data.field.field_name) && data.field.supplier_group === 1) {
msg = '该供应商为代理供应商,已经上传代理证,是否切换为正式供应商?'
}
} else {
if (inArray('quality_assurance_agreement', data.field.field_name) && data.field.supplier_group !== 1) {
msg = '未上传品质保证协议,是否切换为临时供应商?'
}
if (inArray('proxy_certificate', data.field.field_name) && data.field.supplier_group === 1) {
msg = '该供应商为代理供应商,但是未上传代理证,是否切换为临时供应商?'
}
}
}
}); });
</script> </script>
\ No newline at end of file
...@@ -65,6 +65,9 @@ ...@@ -65,6 +65,9 @@
}); });
function updateSupplier(data) { function updateSupplier(data) {
admin.showLoading({
type: 3,
});
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) {
admin.putTempData("needFreshList", 1) admin.putTempData("needFreshList", 1)
...@@ -79,7 +82,7 @@ ...@@ -79,7 +82,7 @@
}); });
layer.msg(msg, {icon: 5}) layer.msg(msg, {icon: 5})
} }
admin.removeLoading();
} }
}); });
</script> </script>
\ No newline at end of file
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
let element = layui.element; let element = layui.element;
let xmSelect = layui.xmSelect; let xmSelect = layui.xmSelect;
//这里有个权限,是可以跳过公司信息审核的
let ignoreCompanyCheck = {{checkPerm('IgnoreCompanyCheck') ? 1:0}};
layDate.render({ layDate.render({
elem: '#established_time' elem: '#established_time'
, type: 'month' , type: 'month'
...@@ -18,19 +21,30 @@ ...@@ -18,19 +21,30 @@
$("#supplier_name").blur(function () { $("#supplier_name").blur(function () {
const supplier_name = $(this).val(); const supplier_name = $(this).val();
const supplier_id = supplierId; const supplier_id = supplierId;
const region = $('#region').val();
const taxNumber = $('#tax_number').val(); const taxNumber = $('#tax_number').val();
$('#supplier_check_tip').remove(); $('#supplier_check_tip').remove();
let url = '/api/supplier/CheckSupplierName?supplier_name=' + supplier_name + '&supplier_id=' + supplier_id + '&tax_number=' + taxNumber; let url = '/api/supplier/CheckSupplierName?supplier_name=' + supplier_name + '&supplier_id=' + supplier_id + '&tax_number=' + taxNumber + '&region=' + region;
let res = ajax(url); let res = ajax(url);
if (!res) { if (!res) {
layer.msg('网络错误,请重试', {icon: 5}); layer.msg('网络错误,请重试', {icon: 5});
} else { } else {
if (supplier_name !== '') { if (supplier_name !== '') {
if (res.err_code === -1) { if (res.err_code !== 0) {
layer.msg(res.err_msg, {icon: 5}); //当code=-2的时候,是公司信息校验有问题,但是如果有跳过检查权限,那么就什么都不处理
$(this).after("<div id='supplier_check_tip' style='margin-top: 5px'>" + if (res.err_code === -2) {
"<p style='color: red;'>" + res.err_msg + "</p></div>"); if (!ignoreCompanyCheck) {
$('#supplier_name').prop('disabled', false); layer.msg(res.err_msg, {icon: 5});
$(this).after("<div id='supplier_check_tip' style='margin-top: 5px'>" +
"<p style='color: red;'>" + res.err_msg + "</p></div>");
$('#supplier_name').prop('disabled', false);
}
} else {
layer.msg(res.err_msg, {icon: 5});
$(this).after("<div id='supplier_check_tip' style='margin-top: 5px'>" +
"<p style='color: red;'>" + res.err_msg + "</p></div>");
$('#supplier_name').prop('disabled', false);
}
} else if (res.err_code === 0) { } else if (res.err_code === 0) {
//如果供应商没有问题,就要去自动填补部分资料 //如果供应商没有问题,就要去自动填补部分资料
let companyInfo = res.data; let companyInfo = res.data;
...@@ -45,17 +59,6 @@ ...@@ -45,17 +59,6 @@
} }
}); });
//监听币种变化,人民币才显示公司税号
form.on('select(currency)', function (data) {
if (data.value === '1') {
$('#tax_number_div').show();
form.render('select');
} else {
$('#tax_number_div').hide();
form.render('select');
}
});
@if(!empty($supplier)) @if(!empty($supplier))
@if($supplier['region']==2) @if($supplier['region']==2)
$('.city-div').show(); $('.city-div').show();
...@@ -254,9 +257,13 @@ ...@@ -254,9 +257,13 @@
layer.msg('校验公司信息通过,自动补全相关数据', {icon: 6}) layer.msg('校验公司信息通过,自动补全相关数据', {icon: 6})
} else { } else {
admin.btnLoading('#recheck_company_info', false); admin.btnLoading('#recheck_company_info', false);
$('#supplier_name').after("<div id='supplier_check_tip' style='margin-top: 10px'>" + if (ignoreCompanyCheck) {
"<p style='color: red;'>公司未进行工商注册,请修改后重新提交</p></div>"); layer.msg('公司未进行工商注册')
layer.msg('公司未进行工商注册,请修改后重新提交', {icon: 5}) } else {
$('#supplier_name').after("<div id='supplier_check_tip' style='margin-top: 5px'>" +
"<p style='color: red;'>公司未进行工商注册,请修改后重新提交</p></div>");
layer.msg('公司未进行工商注册,请修改后重新提交', {icon: 5})
}
} }
} }
}); });
......
...@@ -231,7 +231,6 @@ ...@@ -231,7 +231,6 @@
@include('web.supplier.SkuRuler') @include('web.supplier.SkuRuler')
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@include('web.supplier.ApplyAuditReason') @include('web.supplier.ApplyAuditReason')
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
} }
//临时类型的供应商,不显示待转正选项 //临时类型的供应商,不显示待转正选项
if ($supplier['supplier_type'] == 2) { if ($supplier['supplier_type'] == 2 || $supplier['is_type'] == 0) {
unset($supplierType[3]); unset($supplierType[3]);
} }
?> ?>
...@@ -55,9 +55,10 @@ ...@@ -55,9 +55,10 @@
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" name="supplier_name" id="supplier_name" <input type="text" name="supplier_name" id="supplier_name"
placeholder="请输入供应商名称" class="layui-input @if ($supplier['sync_united_status']==1) placeholder="请输入供应商名称" class="layui-input @if ($supplier['sync_united_status']==1)
layui-disabled layui-disabled
@endif" @endif"
value="{{$supplier['supplier_name'] or ''}}" @if ($supplier['sync_united_status']==1) disabled @endif> value="{{$supplier['supplier_name'] or ''}}"
@if ($supplier['sync_united_status']==1) disabled @endif>
</div> </div>
</div> </div>
<div class="layui-col-md5"> <div class="layui-col-md5">
...@@ -139,8 +140,6 @@ ...@@ -139,8 +140,6 @@
</div> </div>
@endif @endif
</div> </div>
</div>
</div>
<div class="layui-form-item"> <div class="layui-form-item">
<div class="layui-row"> <div class="layui-row">
<div class="layui-col-md3"> <div class="layui-col-md3">
......
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