Commit f3710734 by 杨树贤

Merge branch 'ysx-供应商需求0717-20230717'

parents 8c8f386f a307281b
<?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use App\Http\Services\LogService;
use App\Http\Services\ChainService;
use App\Http\Services\SupplierExaminationService;
use App\Http\Transformers\SupplierLogTransformer;
use App\Http\Validators\SupplierExaminationValidator;
use App\Model\LogModel;
use App\Model\SupplierAccountModel;
use App\Model\SupplierApplyModel;
use App\Model\SupplierLogModel;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
//供应商检测
class ChainApiController extends Controller
{
public function Entrance(Request $request, $id)
{
$this->$id($request, $id);
}
//获取列表
public function GetChainList($request)
{
$service = new ChainService();
$list = $service->getChainList($request->all());
$this->response(0, 'ok', $list['data'], $list['total']);
}
}
......@@ -97,6 +97,7 @@ class SupplierApiController extends Controller
'is_business_abnormal',
'has_legal_ID_card',
'agency_brands',
'purchase_type',
];
public function Entrance(Request $request, $id)
......@@ -147,7 +148,6 @@ class SupplierApiController extends Controller
'account_adderss',
'certificate',
'swift_code',
]);
$channel = $request->only($channelMap);
//如果是有直接新增权限的(绕过天眼查等校验)
......@@ -555,6 +555,7 @@ class SupplierApiController extends Controller
$this->response(-1, '选择的供应商里面不存在对应的线上采购员');
}
$supplierService->batchAllocateYunxinChannelUser($supplierIds, $channelUid);
dd(1223);
$this->response(0, '批量分配线上采购员成功');
}
......
<?php
namespace App\Http\Controllers;
use App\Http\Services\RoleService;
use App\Http\Services\SupplierContactService;
use App\Http\Services\SupplierService;
use App\Http\Services\ViewCheckService;
use App\Model\IntracodeModel;
use App\Model\SupplierApplyModel;
use App\Model\SupplierChannelModel;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class ChainController extends Controller
{
public function info(Request $request, $id = '')
{
if ($request->path() == '/') {
$path = 'web/index';
} else {
$path = $request->path();
}
$this->data = [
'menus' => $request->menus,
'header' => $request->user->header,
'username' => $request->user->email,
'user_email' => $request->user->email,
'uri' => '/' . $path,
'id' => $id
];
return $this->$id($request);
}
public function __call($name, $arr)
{
$data['errinfo'] = '访问路径错误';
return view('errors.error', $data);
}
//操作日志列表
public function ChainList($request)
{
$this->data['title'] = '供应商申请列表';
$this->data['view'] = 'ChainList';
return $this->view('供应商申请列表');
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers\Filter;
use App\Model\SupplierAccountModel;
use App\Model\ChainModel;
use App\Model\SupplierChannelModel;
class ChainFilter
{
//查询条件
public function listFilter($map)
{
$model = new ChainModel();
$query = $model->orderBy('chain_id', 'desc');
if (!empty($map['com_name'])) {
$query->where('com_name', 'like', "%${map['com_name']}%");
}
if (!empty($map['link_name'])) {
$query->where('link_name', 'like', "%${map['link_name']}%");
}
if (!empty($map['mobile'])) {
$query->where('mobile', 'like', "%${map['mobile']}%");
}
if (!empty($map['data_type'])) {
$query->where('data_type', $map['data_type']);
}
if (!empty($map['supplier_type'])) {
$query->where('supplier_type', $map['supplier_type']);
}
if (!empty($map['create_time'])) {
$times = explode('~', $map['create_time']);
$startTime = strtotime($times[0]);
$endTime = strtotime($times[1]);
$query->whereBetween('create_time', [$startTime, $endTime]);
}
return $query;
}
}
\ No newline at end of file
......@@ -103,6 +103,9 @@ class SupplierFilter
$query->where('sku_tag', $map['sku_tag']);
}
if ((isset($map['purchase_type']) && $map['purchase_type'] === "0") || !empty($map['purchase_type'])) {
$query->where('purchase_type', $map['purchase_type']);
}
if (!empty($map['outside_contact_type'])) {
$query->where('outside_contact_type', $map['outside_contact_type']);
}
......@@ -124,6 +127,18 @@ class SupplierFilter
$endTime = strtotime($times[1]);
$query->whereBetween('update_time', [$startTime, $endTime]);
}
if (!empty($map['sku_create_time'])) {
$times = explode('~', $map['sku_create_time']);
$startTime = strtotime($times[0]);
$endTime = strtotime($times[1]);
$query->whereBetween('sku_create_time', [$startTime, $endTime]);
}
if (!empty($map['sku_update_time'])) {
$times = explode('~', $map['sku_update_time']);
$startTime = strtotime($times[0]);
$endTime = strtotime($times[1]);
$query->whereBetween('sku_update_time', [$startTime, $endTime]);
}
if (!empty($map['blacklist_uid'])) {
$query = $query->whereHas('blacklist', function ($q) use ($map) {
......
......@@ -39,7 +39,7 @@ class SupplierApplyController extends Controller
}
//操作日志列表
//芯链申请列表
public function SupplierApplyList($request)
{
$this->data['auditUidList'] = SupplierApplyModel::pluck('audit_name', 'audit_uid')->toArray();
......
<?php
namespace App\Http\Services;
//后台用户相关信息服务
use App\Http\Controllers\Filter\ChainFilter;
use App\Http\Transformers\ChainTransformer;
class ChainService
{
//供应商申请列表
public function getChainList($map)
{
$limit = array_get($map, 'limit', 10);
$filter = new ChainFilter();
$query = $filter->listFilter($map);
$list = $query->paginate($limit)->toArray();
$transformer = new ChainTransformer();
$list['data'] = $transformer->transformList($list['data']);
return $list;
}
}
\ No newline at end of file
......@@ -88,15 +88,6 @@ class SupplierContactService
$newContact = $model->where('contact_id', $contactId)->first()->toArray();
if ($result) {
// $needAudit = $this->checkNeedAudit($oldContact, $newContact);
// if ($needAudit) {
// //修改供应商为审核状态
// $supplierModel->where('supplier_id', $contact['supplier_id'])->update([
// 'update_time' => time(),
// 'status' => SupplierChannelModel::STATUS_PENDING,
// ]);
// }
$logService = new LogService();
$content = !empty($contact['contact_id']) ? '修改联系人' : '添加联系人';
$remark = json_encode([
......
......@@ -6,6 +6,7 @@ namespace App\Http\Services;
use App\Http\Controllers\Filter\SupplierFilter;
use App\Http\Transformers\SupplierTransformer;
use App\Http\Validators\SupplierValidator;
use App\Model\BigData\DataManageModel;
use App\Model\LogModel;
use App\Model\RedisModel;
use App\Model\SupplierAccountModel;
......@@ -59,7 +60,6 @@ class SupplierService
}
public function saveSupplier($channel)
{
$supplierTransformer = new SupplierTransformer();
......@@ -493,14 +493,21 @@ class SupplierService
$logService = new LogService();
$redis = new RedisModel();
foreach ($supplierIds as $supplierId) {
$preYunxinChannelUid = SupplierChannelModel::where('supplier_id', $supplierId)->value('yunxin_channel_uid');
$supplier = SupplierChannelModel::where('supplier_id', $supplierId)->select(['supplier_code', 'yunxin_channel_uid'])
->first()->toArray();
$preYunxinChannelUid = $supplier['yunxin_channel_uid'];
SupplierChannelModel::where('supplier_id', $supplierId)->update([
'yunxin_channel_uid' => $yunxinChannelUid
]);
//去查找数据对接系统是否有这个供应商,有的话,把采购员也改成这个
DataManageModel::where('canal', $supplier['supplier_code'])->update([
'pur_uid' => $yunxinChannelUid,
'update_time' => time(),
]);
$supplier = SupplierChannelModel::where('supplier_id', $supplierId)->first()->toArray();
//还要丢队列给批量修改sku的内部编码
$redisKey = 'lie_supplier_change_yunxin_user_' . $supplierId;
if (!$redis->get($redisKey)) {
if ($redis->get($redisKey)) {
$data = [
'canal' => $supplier['supplier_code'],
"encoded" => $yunxinChannelUid,
......
<?php
namespace App\Http\Transformers;
use App\Model\RedisModel;
use App\Model\SupplierApplyModel;
use App\Model\SupplierChannelModel;
class ChainTransformer
{
public function transformList($list)
{
$redis = new RedisModel();
foreach ($list as &$item) {
$item['create_time'] = $item['create_time'] ? date('Y-m-d H:i:s', $item['create_time']) : '';
$item['supplier_type_name'] = array_get(config('field.ChainSupplierType'), $item['supplier_type'], '无');
$item['data_type_name'] = array_get(config('field.ChainDataType'), $item['data_type'], '无');
}
unset($item);
return $list;
}
}
\ No newline at end of file
......@@ -30,18 +30,17 @@ class SupplierTransformer
$viewData = $viewCheckService->checkSupplierView($supplierIds);
$adminUserService = new AdminUserService();
//获取基石上传记录情况,展示第一次上传时间和最后一次上传时间
$firstUploadSkuTimes = SkuService::getUploadTimeBySupplierCodes(array_column($list, 'supplier_code'), 'first');
$lastUploadSkuTimes = SkuService::getUploadTimeBySupplierCodes(array_column($list, 'supplier_code'), 'last');
foreach ($list as &$supplier) {
$supplier['viewed'] = array_get($viewData, $supplier['supplier_id'], false);
$supplier = $this->getStockupType($supplier);
$supplier['supplier_group'] = array_get(config('fixed.SupplierGroup'), $supplier['supplier_group'], '未设置');
$supplier['purchase_type_name'] = array_get(config('field.PurchaseType'), $supplier['purchase_type'], '无');
$supplier['region_name'] = array_get(config('fixed.Region'), $supplier['region']);
$supplier['create_time'] = $supplier['create_time'] ? date('Y-m-d H:i:s', $supplier['create_time']) : '';
$supplier['audit_time'] = $supplier['audit_time'] ? date('Y-m-d H:i:s', $supplier['audit_time']) : '';
$supplier['update_time'] = $supplier['update_time'] ? date('Y-m-d H:i:s', $supplier['update_time']) : '';
$supplier['sku_create_time'] = $supplier['sku_create_time'] ? date('Y-m-d H:i:s', $supplier['sku_create_time']) : '';
$supplier['sku_update_time'] = $supplier['sku_update_time'] ? date('Y-m-d H:i:s', $supplier['sku_update_time']) : '';
$supplier['channel_username'] = $this->getChannelUserNames($supplier['channel_uid']);
$supplier['purchase_username'] = array_get($users, $supplier['purchase_uid']);
$supplier['yunxin_channel_username'] = array_get($users, $supplier['yunxin_channel_uid']);
......@@ -63,10 +62,6 @@ class SupplierTransformer
$userInfo = $adminUserService->getAdminUserInfo($supplier['create_uid']);
$supplier['create_name'] = array_get($userInfo, 'name');
}
$supplier['first_upload_sku_time'] = array_get($firstUploadSkuTimes, $supplier['supplier_code']) ? date('Y-m-d H:i:s',
$firstUploadSkuTimes[$supplier['supplier_code']]) : '';
$supplier['last_upload_sku_time'] = array_get($lastUploadSkuTimes, $supplier['supplier_code']) ? date('Y-m-d H:i:s',
$lastUploadSkuTimes[$supplier['supplier_code']]) : '';
//获取最新修改人以及下级审核员
$log = LogModel::getLastLog($supplier['supplier_id']);
......@@ -209,6 +204,8 @@ class SupplierTransformer
array_get($supplier, 'has_certification', ''), '');
$supplier['sku_tag_name'] = array_get(config('field.SkuTag'), array_get($supplier, 'sku_tag', ''), '无');
$supplier['sku_mode_name'] = array_get(config('field.SkuMode'), array_get($supplier, 'sku_mode', ''), '无');
// $supplier['purchase_type'] = array_get(config('field.PurchaseType'), array_get($supplier, 'purchase_type', ''), '无');
$supplier['purchase_type_name'] = array_get(config('field.PurchaseType'), $supplier['purchase_type'], '无');
return $supplier;
}
......
......@@ -32,6 +32,7 @@ Route::group(['middleware' => ['web', 'menu']], function () {
Route::match(['get', 'post'], '/supplier_apply/{key}', 'SupplierApplyController@info');
Route::match(['get', 'post'], '/purchase_remark/{key}', 'PurchaseRemarkController@info');
Route::match(['get', 'post'], '/shipping_cost_ruler/{key}', 'ShippingCostRulerController@info');
Route::match(['get', 'post'], '/chain/{key}', 'ChainController@info');
});
Route::group(['middleware' => ['web'], 'namespace' => 'Api'], function () {
......@@ -54,6 +55,7 @@ Route::group(['middleware' => ['web'], 'namespace' => 'Api'], function () {
Route::match(['get', 'post'], '/api/supplier_apply/{key}', 'SupplierApplyApiController@Entrance');
Route::match(['get', 'post'], '/api/purchase_remark/{key}', 'PurchaseRemarkApiController@Entrance');
Route::match(['get', 'post'], '/api/shipping_cost_ruler/{key}', 'ShippingCostRulerApiController@Entrance');
Route::match(['get', 'post'], '/api/chain/{key}', 'ChainApiController@Entrance');
//单独的统计接口
Route::match(['get', 'post'], '/statisticsSkuNumber', function () {
(new \App\Http\Services\DataService())->statisticsSkuNumberFromSKu();
......
<?php
namespace App\Model;
use App\Http\Services\AdminUserService;
use App\Http\Services\DepartmentService;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Redis;
class ChainModel extends Model
{
protected $connection = 'liexin';
protected $table = 'chain';
protected $primaryKey = 'chain_id';
public $timestamps = false;
}
......@@ -269,4 +269,24 @@ return [
1 => '小于',
2 => '大于等于'
],
//代购类型
'PurchaseType' => [
0 => '无',
1 => '国内代购',
2 => '海外代购',
3 => '非代购',
],
'ChainDataType' => [
1 => 'PC端',
2 => '移动端'
],
'ChainSupplierType' => [
1 => '自营供应商',
2 => '联营供应商',
3 => '国产推荐'
],
];
\ No newline at end of file
......@@ -56,5 +56,6 @@ return [
'ticket_time' => '到票时间',
'billing_period_detail' => '账期详情',
'registered_capital' => '注册资金(万)',
'purchase_type_name' => '代购类型',
]
];
\ No newline at end of file
<script>
layui.use(['table', 'form', 'element', 'upload', 'layer', 'Split', 'admin', 'xmSelect'], function () {
let $ = layui.jquery;
let Split = layui.Split;
let table = layui.table;
let upload = layui.upload;
let form = layui.form;
let admin = layui.admin;
let xmSelect = layui.xmSelect;
let initCondition = {source_type: 'all'};
let whereCondition = initCondition;
let type = 'all';
$(document).on("click", ".layui-table-body table.layui-table tbody tr", function () {
let index = $(this).attr('data-index');
let tableBox = $(this).parents('.layui-table-box');
let tableDiv = null;
if (tableBox.find(".layui-table-fixed.layui-table-fixed-l").length > 0) {
tableDiv = tableBox.find(".layui-table-fixed.layui-table-fixed-l");
} else {
tableDiv = tableBox.find(".layui-table-body.layui-table-main");
}
let checkCell = tableDiv.find("tr[data-index=" + index + "]").find("td div.laytable-cell-checkbox div.layui-form-checkbox I");
if (checkCell.length > 0) {
checkCell.click();
}
});
$(document).on("click", "td div.laytable-cell-checkbox div.layui-form-checkbox", function (e) {
e.stopPropagation();
});
//监听复选框事件,被选中的行高亮显示
table.on('checkbox(chainList)', function (obj) {
//拉黑就不用变色了
if (obj.data.status === -3) {
return
}
if (obj.checked === true && obj.type === 'all') {
//点击全选,拉黑的不用选上
$('.layui-table-body table.layui-table tbody tr:not(.block-class)').addClass('layui-table-click');
$('.layui-table-body table.layui-table tbody').find('.block-class').find('.layui-form-checkbox').remove();
$('.layui-table-body table.layui-table tbody tr .block-class').addClass('layui-table-click');
} else if (obj.checked === false && obj.type === 'all') {
//点击全不选
$('.layui-table-body table.layui-table tbody tr').removeClass('layui-table-click');
} else if (obj.checked === true && obj.type === 'one') {
//点击单行
if (obj.checked === true) {
obj.tr.addClass('layui-table-click');
} else {
obj.tr.removeClass('layui-table-click');
}
} else if (obj.checked === false && obj.type === 'one') {
//点击全选之后点击单行
if (obj.tr.hasClass('layui-table-click')) {
obj.tr.removeClass('layui-table-click');
}
}
});
let cols = [
{field: 'chain_id', title: '序号', align: 'center', width: 80},
{field: 'com_name', title: '公司名称', align: 'center', width: 250},
{field: 'link_name', title: '联系人', align: 'center', width: 170},
{field: 'mobile', title: '联系方式', align: 'center', width: 160},
{
field: 'main_brand', title: '主营产品', align: 'center'
},
{field: 'supplier_type_name', title: '入驻类型', align: 'center', width: 100},
{field: 'data_type_name', title: '来源', align: 'center', width: 100},
{field: 'ip_address', title: 'IP地址', align: 'center', width: 150},
{field: 'create_time', title: '创建时间', align: 'center', width: 150},
];
let currentPage = 0;
let url = '/api/chain/GetChainList';
$('#three_days_button').remove();
table.render({
elem: '#chainList'
, url: url
, method: 'post'
, size: 'sm'
, limit: 20
, height: 600
, cellMinWidth: 50 //全局定义常规单元格的最小宽度
, where: whereCondition
, loading: true
, first: true //不显示首页
, last: false //不显示尾页
, cols: [cols]
, id: 'chainList'
, page: {}
, done: function (res, curr, count) {
currentPage = curr;
}
});
$("#add_supplier_examination").click(function () {
layer.open({
type: 2,
content: '/supplier_examination/AddChain?view=iframe&supplier_id=' + getQueryVariable('supplier_id'),
area: ['80%', '90%'],
title: '添加IQC检测记录',
end: function () {
table.reload('chainList');
}
});
return false;
});
$("#update_supplier_examination").click(function () {
let checkStatus = table.checkStatus('chainList');
let data = checkStatus.data;
if (data.length > 1) {
layer.msg('该操作不支持多选', {icon: 5});
return;
}
if (!data.length) {
layer.msg('请先选择要操作的记录', {icon: 5});
} else {
let id = data[0].id;
layer.open({
type: 2,
content: '/supplier_examination/UpdateChain?view=iframe&id=' + id + '&supplier_id=' + getQueryVariable('supplier_id'),
area: ['80%', '90%'],
title: '添加IQC检测记录',
end: function () {
table.reload('chainList');
}
});
}
return false;
});
$("#batch_update_supplier_examination").click(function () {
let checkStatus = table.checkStatus('chainList');
let data = checkStatus.data;
let ids = [];
$.each(data, function (i, v) {
ids.push(v.id);
});
if (!ids) {
layer.msg('请先选择要操作的记录', {icon: 5});
} else {
ids = ids.join(',')
layer.open({
type: 2,
content: '/supplier_examination/BatchUpdateChain?view=iframe&ids=' + ids + '&supplier_id=' + getQueryVariable('supplier_id'),
area: ['80%', '90%'],
title: '批量修改IQC检测记录',
end: function () {
table.reload('chainList');
}
});
}
return false;
});
//启用
$("#delete_supplier_examination").click(function () {
let checkStatus = table.checkStatus('chainList');
let data = checkStatus.data;
if (!data.length) {
layer.msg('请先选择要操作的检测数据', {icon: 5})
} else {
layer.confirm('是否删除所选记录?', function (index) {
let ids = [];
$.each(data, function (index, value) {
ids.push(value.id);
});
ids = ids.join(',');
let res = ajax('/api/supplier_examination/DeleteChains', {ids: ids})
if (res.err_code === 0) {
table.reload('chainList');
layer.closeAll();
layer.msg(res.err_msg, {icon: 6})
} else {
layer.msg(res.err_msg, {icon: 5})
}
});
}
});
form.on('submit(load)', function (data) {
whereCondition = $.extend(false, initCondition, data.field);
//执行重载
table.reload('chainList', {
page: {
curr: 1
}
, where: whereCondition
});
return false;
});
form.on('submit(reset)', function (data) {
layer.load(1);
location.reload();
});
//执行实例
var uploadInst = upload.render({
elem: '#import_supplier_examination', //绑定元素
url: '/api/supplier_examination/ImportChain', //上传接口
auto: true,
exts: 'xlsx',
before: function (obj) { //obj参数包含的信息,跟 choose回调完全一致,可参见上文。
layer.msg('上传中', {icon: 16}); //上传loading
},
done: function (res) {
if (!res) {
return layui.msg('上传失败', {icon: 5});
}
if (res.err_code === 0) {
layer.msg(res.err_msg, {icon: 6});
table.reload('chainList');
} else {
let errMsg = res.err_msg;
let msg = '';
$.each(errMsg.split('&'), function (index, value) {
msg += "<span>" + value + "</span><br>"
});
layer.msg(msg, {icon: 5, time: 5000})
}
},
error: function () {
return layer.msg('上传失败', {icon: 5});
}
});
});
</script>
\ No newline at end of file
......@@ -120,6 +120,7 @@
return "<span title='" + data.stockup_type + "'>" + data.stockup_type + "</span>"
}
},
{field: 'purchase_type_name', title: '代购类型', align: 'center', width: 80},
{
field: 'has_quality_assurance_agreement',
title: '品质协议',
......@@ -183,8 +184,8 @@
{field: 'update_time', title: '最近修改时间', align: 'center', width: 145},
{field: 'supplier_type_name', title: '供应商类别', align: 'center', width: 110},
{field: 'create_time', title: '创建时间', align: 'center', width: 145},
{field: 'first_upload_sku_time', title: '首次上传sku时间', align: 'center', width: 145},
{field: 'last_upload_sku_time', title: '最新上传sku时间', align: 'center', width: 145},
{field: 'sku_create_time', title: '首次上传sku时间', align: 'center', width: 145},
{field: 'sku_update_time', title: '最新上传sku时间', align: 'center', width: 145},
];
cols.push(
);
......
......@@ -220,7 +220,8 @@
id="main_brands">
</div>
<a style="color: #009688;" id="batchAddMainBrands">+批量增加主营品牌</a>
<div id="batchAddMainBrandsDiv" style="padding-left: 30px;padding-top: 30px;padding-right: 30px;display: none">
<div id="batchAddMainBrandsDiv"
style="padding-left: 30px;padding-top: 30px;padding-right: 30px;display: none">
<div class="layui-col-md12">
<textarea rows="7" placeholder="标准品牌名称,多个用英文逗号隔开" class="layui-textarea"
id="batchAddMainBrandsTextarea"></textarea>
......@@ -228,8 +229,12 @@
<span style="color: red" id="invalid_${name}_name_list"></span>
</div>
<div class="layui-col-md12">
<button class="layui-btn layui-btn-sm" type="button" id="confirmBatchAddMainBrands">验证并且添加</button>
<button class="layui-btn layui-btn-sm layui-btn-primary" type="button" id="closeBatchAddMainBrands">关闭</button>
<button class="layui-btn layui-btn-sm" type="button" id="confirmBatchAddMainBrands">
验证并且添加
</button>
<button class="layui-btn layui-btn-sm layui-btn-primary" type="button"
id="closeBatchAddMainBrands">关闭
</button>
</div>
</div>
</div>
......@@ -246,16 +251,24 @@
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label"><span class="require">*</span>合作类型</label>
<div class="layui-input-block">
<input type="hidden" name="stockup_type"
value="{{$supplier['stockup_type'] or ''}}">
@foreach(config('fixed.StockupType') as $k=>$type)
<input type="checkbox" name="stockup_type[{{$k}}]" lay-filter="stockup_type_filter"
lay-skin="primary"
title="{{$type}}">
@endforeach
<div class="layui-col-md6">
<div class="layui-inline">
<label class="layui-form-label"><span class="require">*</span>合作类型</label>
<div class="layui-input-block">
<input type="hidden" name="stockup_type"
value="{{$supplier['stockup_type'] or ''}}">
@foreach(config('fixed.StockupType') as $k=>$type)
<input type="checkbox" name="stockup_type[{{$k}}]" lay-filter="stockup_type_filter"
lay-skin="primary"
title="{{$type}}">
@endforeach
</div>
</div>
</div>
<div class="layui-col-md6">
<div class="layui-inline">
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('purchase_type','代购类型 : ',!empty($supplier)?$supplier['purchase_type']:'',config('field.PurchaseType')) !!}
</div>
</div>
</div>
......
<div class="layui-collapse">
<form class="layui-form" style="margin-top: 15px">
<div class="layui-row">
<div class="layui-inline">
<label class="layui-form-label">公司名称</label>
<div class="layui-input-inline">
<input type="text" value="" name="com_name" placeholder="支持模糊匹配" autocomplete="off"
class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">联系人</label>
<div class="layui-input-inline">
<input type="text" value="" name="link_name" placeholder="支持模糊匹配" autocomplete="off"
class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">联系方式</label>
<div class="layui-input-inline">
<input type="text" value="" name="mobile" placeholder="支持模糊匹配" autocomplete="off"
class="layui-input">
</div>
</div>
<div class="layui-inline">
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('data_type','平台来源',request()->get('data_type'),config('field.ChainDataType')) !!}
</div>
<div class="layui-inline">
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('supplier_type','入驻类型',request()->get('data_type'),config('field.ChainSupplierType')) !!}
</div>
</div>
<div class="layui-row">
<div class="layui-inline" style="width: 600px">
@inject('transformableTimeIntervalPresenter','App\Presenters\Filter\TransformableTimeIntervalPresenter')
{!! $transformableTimeIntervalPresenter->render(['create_time'=>'创建时间']) !!}
</div>
</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" id="getSupplierListButton" lay-submit=""
lay-filter="load">查询
</button>
<button type="button" class="layui-btn layui-btn-sm layui-btn" lay-submit="" lay-filter="reset">重置
</button>
</div>
</form>
</div>
<div style="margin-left: 20px;margin-right: 20px">
<div class="layui-btn-group demoTable" style="margin-top: 15px">
</div>
<table class="layui-table" id="chainList" lay-filter="chainList"></table>
</div>
@include('script.ChainListScript')
......@@ -48,8 +48,9 @@
@else
{{$supplier['stockup_type_name']}}
@endif
</div>
{{-- <div class="layui-col-md2">--}}
{{-- </div>--}}
<div class="layui-col-md2">
线上采购员 : {{$supplier['yunxin_channel_username']}}
</div>
......@@ -199,6 +200,9 @@
<div class="layui-col-md3">
<span class="required_field">*</span> 合作类型 :{{$supplier['stockup_type_name']}}
</div>
<div class="layui-col-md2">
代购类型 : {{$supplier['purchase_type_name']}}
</div>
</div>
<div class="layui-row">
<div class="layui-col-md2">
......
......@@ -256,17 +256,25 @@
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label"><span class="require">*</span>合作类型</label>
<div class="layui-input-block">
@foreach(config('fixed.StockupType') as $k=>$type)
<input type="checkbox" lay-filter="stockup_type_filter" name="stockup_type[{{$k}}]"
lay-skin="primary"
@if(!empty($supplier['stockup_type_data'])&&in_array($k,$supplier['stockup_type_data']))
checked
@endif
title="{{$type}}">
@endforeach
<div class="layui-col-md6">
<div class="layui-inline">
<label class="layui-form-label"><span class="require">*</span>合作类型</label>
<div class="layui-input-block">
@foreach(config('fixed.StockupType') as $k=>$type)
<input type="checkbox" lay-filter="stockup_type_filter" name="stockup_type[{{$k}}]"
lay-skin="primary"
@if(!empty($supplier['stockup_type_data'])&&in_array($k,$supplier['stockup_type_data']))
checked
@endif
title="{{$type}}">
@endforeach
</div>
</div>
</div>
<div class="layui-col-md6">
<div class="layui-inline">
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('purchase_type','代购类型 : ',!empty($supplier)?$supplier['purchase_type']:'',config('field.PurchaseType')) !!}
</div>
</div>
</div>
......
......@@ -92,11 +92,11 @@
</a>
</div>
@endif
{{-- <div class="layui-row">--}}
{{-- <a title="公司性质为现货商性质的供应商没有上传品质协议" class="main_filter"--}}
{{-- id="no_quality_assurance_agreement">--}}
{{-- </a>--}}
{{-- </div>--}}
{{-- <div class="layui-row">--}}
{{-- <a title="公司性质为现货商性质的供应商没有上传品质协议" class="main_filter"--}}
{{-- id="no_quality_assurance_agreement">--}}
{{-- </a>--}}
{{-- </div>--}}
<div class="layui-row">
<a title="采购员全离职" class="main_filter" id="all_channel_user_resigned">
</a>
......@@ -257,12 +257,17 @@
{!! $multiTransformableSelectPresenter->render(['has_cooperation_agreement'=>'平台合作协议'],
['has_cooperation_agreement'=>[1=>'是',-1=>'否']]) !!}
</div>
<div class="layui-inline">
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('purchase_type','代购类型','',config('field.PurchaseType')) !!}
</div>
</div>
<div class="layui-row">
<div class="layui-inline" style="width: 600px">
@inject('transformableTimeIntervalPresenter','App\Presenters\Filter\TransformableTimeIntervalPresenter')
{!! $transformableTimeIntervalPresenter->render(['update_time'=>'更新时间','create_time'=>'创建时间']) !!}
{!! $transformableTimeIntervalPresenter->render(['update_time'=>'更新时间','create_time'=>'创建时间','sku_create_time' => '首次上传sku时间','sku_update_time'=> '最新上传sku时间']) !!}
</div>
</div>
<div class="layui-row" style="margin-top:10px;margin-bottom: 10px;margin-left: 20px;">
......
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