Commit 901d9859 by mushishixian

修复bug

parent dd854067
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace App\Http\Controllers\Api; namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Http\Services\AdminUserService;
use App\Model\BrandModel; use App\Model\BrandModel;
use App\Model\SelfClassifyModel; use App\Model\SelfClassifyModel;
use Illuminate\Http\Request; use Illuminate\Http\Request;
...@@ -60,4 +61,10 @@ class CommonApiController extends Controller ...@@ -60,4 +61,10 @@ class CommonApiController extends Controller
exit(); exit();
} }
public function test($request)
{
$as = new AdminUserService();
$as->getPurchaseUsers();
}
} }
...@@ -60,10 +60,10 @@ class SupplierApiController extends Controller ...@@ -60,10 +60,10 @@ class SupplierApiController extends Controller
//附加费 //附加费
'cn', 'cn',
'hk', 'hk',
// 'status',
//商品上传规则 //商品上传规则
'sku_upload_ruler', 'sku_upload_ruler',
'sku_audit_ruler',
]; ];
public function Entrance(Request $request, $id) public function Entrance(Request $request, $id)
...@@ -245,6 +245,7 @@ class SupplierApiController extends Controller ...@@ -245,6 +245,7 @@ class SupplierApiController extends Controller
{ {
$status = $request->get('status'); $status = $request->get('status');
$rejectReason = $request->get('reject_reason'); $rejectReason = $request->get('reject_reason');
$rejectReason = trim($rejectReason);
if (empty($status)) { if (empty($status)) {
$this->response(-1, '必须选择一个审核意见'); $this->response(-1, '必须选择一个审核意见');
} }
......
...@@ -41,7 +41,11 @@ class SupplierFilter ...@@ -41,7 +41,11 @@ class SupplierFilter
$query->where('channel_uid', 'like', "%{$map['channel_uid']}%"); $query->where('channel_uid', 'like', "%{$map['channel_uid']}%");
} }
if (!empty($map['create_uid'])) { if (!empty($map['create_uid'])) {
$query->where('create_uid', $map['create_uid']); //因为传过来的是内部编码,所以要转成admin_id
$adminService = new AdminUserService();
$user = $adminService->getAdminUserInfoByCodeId($map['create_uid']);
$adminId = $user['userId'];
$query->where('create_uid', $adminId);
} }
if (!empty($map['status'])) { if (!empty($map['status'])) {
$query->where('status', $map['status']); $query->where('status', $map['status']);
......
...@@ -54,6 +54,7 @@ class LogController extends Controller ...@@ -54,6 +54,7 @@ class LogController extends Controller
$supplierLogs = $query->where('supplier_id', $supplierId)->get(); $supplierLogs = $query->where('supplier_id', $supplierId)->get();
foreach ($supplierLogs as &$supplierLog) { foreach ($supplierLogs as &$supplierLog) {
$supplierLog['desc'] = array_get(config('fixed.SupplierLogType'), $supplierLog['type']) . ' : ' . $supplierLog['desc']; $supplierLog['desc'] = array_get(config('fixed.SupplierLogType'), $supplierLog['type']) . ' : ' . $supplierLog['desc'];
$supplierLog['add_time'] = date('Y-m-d H:i:s', $supplierLog['add_time']);
} }
unset($supplierLog); unset($supplierLog);
......
...@@ -184,8 +184,9 @@ class SupplierController extends Controller ...@@ -184,8 +184,9 @@ class SupplierController extends Controller
$this->data['supplier'] = $supplier; $this->data['supplier'] = $supplier;
$intracodeModel = new IntracodeModel(); $intracodeModel = new IntracodeModel();
$adminUserService = new AdminUserService(); $adminUserService = new AdminUserService();
$users = $adminUserService->getPurchaseUsers(); // $userCodes = $adminUserService->getPurchaseUserCodes();
$this->data['userCodes'] = $intracodeModel->getSampleEncode(); $this->data['userCodes'] = $intracodeModel->getSampleEncode();
// $this->data['userCodes'] =$userCodes;
$logModel = new LogModel(); $logModel = new LogModel();
$this->data['logs'] = $logModel->where('supplier_id', $supplierId) $this->data['logs'] = $logModel->where('supplier_id', $supplierId)
->where('action', '分配渠道开发员')->orderBy('id', 'desc') ->where('action', '分配渠道开发员')->orderBy('id', 'desc')
......
...@@ -41,18 +41,29 @@ class AdminUserService ...@@ -41,18 +41,29 @@ class AdminUserService
return $user ? $user->toArray() : []; return $user ? $user->toArray() : [];
} }
public function getCodeIdsByUserIds($userIds)
{
$intracodeModel = new IntracodeModel();
return $intracodeModel->whereIn('admin_id', $userIds)->pluck('code_id');
}
//获取渠道开发员(运营部)的所有用户信息 //获取渠道开发员(运营部)的所有用户信息
public function getPurchaseUsers() public function getPurchaseUsers()
{ //4,9 {
$departmentName = '运营部';
$departmentService = new DepartmentService(); $departmentService = new DepartmentService();
$departmentId = $departmentService->getDepartmentId($departmentName); //市场部
return $departmentService->getUserByDepartmentId($departmentId); $usersMarket = $departmentService->getUserByDepartmentId(4);
//运营部
$usersOperation = $departmentService->getUserByDepartmentId(9);
$users = array_merge($usersMarket, $usersOperation);
$userIds = array_column($users, 'userId');
$intracodeModel = new IntracodeModel();
$users = $intracodeModel->getEncodeByUserIds($userIds);
return $users;
}
public function getPurchaseUserCodes()
{
$users = $this->getPurchaseUsers();
$userCodes = [];
foreach ($users as $user) {
$userCodes[$user['code_id']] = $user['name'];
}
return $userCodes;
} }
} }
\ No newline at end of file
...@@ -41,7 +41,7 @@ class LogService ...@@ -41,7 +41,7 @@ class LogService
public function getLogs($supplierId, $type = '', $limit = 100) public function getLogs($supplierId, $type = '', $limit = 100)
{ {
$model = new LogModel(); $model = new LogModel();
$query = $model->where('id', '>', 0); $query = $model->orderBy('id', 'desc');
//显示默认的数据(有权限逻辑) //显示默认的数据(有权限逻辑)
$filter = new LogFilter(); $filter = new LogFilter();
$query = $filter->defaultFilter($query); $query = $filter->defaultFilter($query);
......
...@@ -60,6 +60,9 @@ class SupplierService ...@@ -60,6 +60,9 @@ class SupplierService
$channel['tax_number'] = ''; $channel['tax_number'] = '';
} }
} }
if (empty($channel['purchase_uid'])) {
unset($channel['purchase_uid']);
}
$channel['cn_delivery_time'] = $channel['cn_delivery_time'] . $channel['cn_delivery_time_period']; $channel['cn_delivery_time'] = $channel['cn_delivery_time'] . $channel['cn_delivery_time_period'];
$channel['us_delivery_time'] = $channel['us_delivery_time'] . $channel['us_delivery_time_period']; $channel['us_delivery_time'] = $channel['us_delivery_time'] . $channel['us_delivery_time_period'];
$channel['qualification_photos'] = $this->getPhotosData($channel['upload_file']); $channel['qualification_photos'] = $this->getPhotosData($channel['upload_file']);
...@@ -89,6 +92,8 @@ class SupplierService ...@@ -89,6 +92,8 @@ class SupplierService
//插入 //插入
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']);
$skuAuditRulerService = new SupplierSkuAuditRulerService();
$channel['sku_audit_ruler'] = $skuAuditRulerService->getSkuAuditRulerForDB($channel['sku_audit_ruler']);
if (empty($channel['supplier_id'])) { if (empty($channel['supplier_id'])) {
//先去插入到channel表 //先去插入到channel表
$channel['create_uid'] = request()->user->userId; $channel['create_uid'] = request()->user->userId;
...@@ -111,11 +116,13 @@ class SupplierService ...@@ -111,11 +116,13 @@ class SupplierService
$extraFaxService->saveSupplierExtraFee($extraFax); $extraFaxService->saveSupplierExtraFee($extraFax);
$supplierId = $this->newSupplierId = $channel['supplier_id']; $supplierId = $this->newSupplierId = $channel['supplier_id'];
$channel['status'] = SupplierChannelModel::STATUS_IN_REVIEW; $channel['status'] = SupplierChannelModel::STATUS_IN_REVIEW;
$channel['update_time'] = time();
$model->where('supplier_id', $supplierId)->update($channel); $model->where('supplier_id', $supplierId)->update($channel);
$this->saveSupplierCode($supplierId); $this->saveSupplierCode($supplierId);
} }
//插入系数到redis //插入系数到redis
$this->saveRatioToRedis($supplierId); $this->saveRatioToRedis($supplierId);
$this->saveSkuAuditRulerToRedis($supplierId,$channel['sku_audit_ruler']);
//重新生成外部显示的编码 //重新生成外部显示的编码
$supplierSn = $this->generateSupplierSn($supplierId, $channel['supplier_group']); $supplierSn = $this->generateSupplierSn($supplierId, $channel['supplier_group']);
//修改数据 //修改数据
...@@ -130,6 +137,10 @@ class SupplierService ...@@ -130,6 +137,10 @@ class SupplierService
$logType = !empty($channel['supplier_id']) ? LogModel::UPDATE_OPERATE : LogModel::ADD_OPERATE; $logType = !empty($channel['supplier_id']) ? LogModel::UPDATE_OPERATE : LogModel::ADD_OPERATE;
$logAction = !empty($channel['supplier_id']) ? "修改供应商基本资料" : "新增供应商"; $logAction = !empty($channel['supplier_id']) ? "修改供应商基本资料" : "新增供应商";
$logContent = !empty($channel['supplier_id']) ? '修改供应商' : '新增供应商'; $logContent = !empty($channel['supplier_id']) ? '修改供应商' : '新增供应商';
//判断是不是申请入驻
if ($oldSupplier['status'] === -2) {
$logAction = "申请重新入驻";
}
$logService->AddLog($this->newSupplierId, $logType, $logAction, $logContent, json_encode([ $logService->AddLog($this->newSupplierId, $logType, $logAction, $logContent, json_encode([
'old_supplier' => $oldSupplier, 'old_supplier' => $oldSupplier,
'new_supplier' => $newSupplier 'new_supplier' => $newSupplier
...@@ -191,6 +202,12 @@ class SupplierService ...@@ -191,6 +202,12 @@ class SupplierService
} }
} }
public function saveSkuAuditRulerToRedis($supplierId,$ruler)
{
$redis = new RedisModel();
$redis->hset('supplier_sku_audit_ruler', $supplierId, $ruler);
}
public function getAddress($supplierId) public function getAddress($supplierId)
{ {
......
<?php
namespace App\Http\Services;
//后台用户相关信息服务
use Illuminate\Support\Facades\DB;
class SupplierSkuAuditRulerService
{
//获取商品上传规则的具体描述
public function getSkuAuditRulerDesc($rule)
{
$rule = json_decode($rule, true);
$desc = '';
foreach ($rule as $name => $value) {
// $name = array_get(config('fixed.SkuAuditRuler'), $name);
// $desc .= $name . ":" . ($value ? "是" : "否") . ' ';
}
return $desc;
}
//给展示详情使用
public function getSkuAuditRuler($ruler)
{
if (empty($ruler)) {
return config('fixed.SkuAuditRuler');
}else{
return json_decode($ruler, true);
}
}
//获取需要存储到数据库的数据格式
public function getSkuAuditRulerForDB($auditData)
{
/**
* 无需审核规则,满足直接审核通过 优先级2
* audit_rule
* 1代表 型号与品牌已存在
* 2型号不存在,品牌存在
* 3型号不存在,品牌不存在
* 4型号存在,品牌不存在
*/
$defaultRuler = [
'1' => 1,
'2' => 1,
'3' => 1,
'4' => 1
];
$rulers = [];
foreach ($defaultRuler as $key => $ruler) {
if (empty($auditData[$key])) {
$rulers[$key] = 0;
} else {
$rulers[$key] = 1;
}
}
$isSkip = (int)$auditData['skip'];
$auditRuler['skip'] = $isSkip;
$auditRuler['audit_ruler'] = $rulers;
return json_encode($auditRuler);
}
}
\ No newline at end of file
...@@ -10,14 +10,27 @@ class SupplierSkuUploadRulerService ...@@ -10,14 +10,27 @@ class SupplierSkuUploadRulerService
{ {
//获取商品上传规则的具体描述 //获取商品上传规则的具体描述
public function getSkuUploadRulerDesc($rule) public function getSkuUploadRulerDesc($ruler)
{ {
$rule = json_decode($rule, true); if (empty($ruler)) {
return '允许库存为空:否 允许起订量为空:否 允许阶梯价为空:否';
}
$ruler = json_decode($ruler, true);
$desc = ''; $desc = '';
foreach ($rule as $name => $value) { foreach ($ruler as $name => $value) {
$name = array_get(config('fixed.SkuUploadRuler'), $name); $name = array_get(config('fixed.SkuUploadRuler'), $name);
$desc .= $name . ":" . ($value ? "是" : "否") . ' '; $desc .= $name . ":" . ($value ? "是" : "否") . ' ';
} }
return $desc; return $desc;
} }
//给默认的sku上传规则
public function getSkuUploadRuler($ruler)
{
if (empty($ruler)) {
return config('fixed.SkuUploadDefaultRuler');
}else{
return json_decode($ruler, true);
}
}
} }
\ No newline at end of file
...@@ -5,6 +5,8 @@ namespace App\Http\Transformers; ...@@ -5,6 +5,8 @@ namespace App\Http\Transformers;
use App\Http\Services\AdminUserService; use App\Http\Services\AdminUserService;
use App\Http\Services\SupplierSkuAuditRulerService;
use App\Http\Services\SupplierSkuUploadRulerService;
use App\Http\Services\ViewCheckService; use App\Http\Services\ViewCheckService;
use App\Model\IntracodeModel; use App\Model\IntracodeModel;
use App\Model\LogModel; use App\Model\LogModel;
...@@ -124,7 +126,10 @@ class SupplierTransformer ...@@ -124,7 +126,10 @@ class SupplierTransformer
$supplier['channel_username'] = $this->getChannelUserNames($supplier['channel_uid']); $supplier['channel_username'] = $this->getChannelUserNames($supplier['channel_uid']);
$supplier['purchase_username'] = array_get($users, $supplier['purchase_uid']); $supplier['purchase_username'] = array_get($users, $supplier['purchase_uid']);
$supplier['qualification_photos'] = $this->getPhotosDataForForm($supplier['qualification_photos']); $supplier['qualification_photos'] = $this->getPhotosDataForForm($supplier['qualification_photos']);
$supplier['sku_upload_ruler'] = json_decode($supplier['sku_upload_ruler'], true); $uploadRulerService = new SupplierSkuUploadRulerService();
$supplier['sku_upload_ruler'] = $uploadRulerService->getSkuUploadRuler($supplier['sku_upload_ruler']);
$ruleService = new SupplierSkuAuditRulerService();
$supplier['sku_audit_ruler'] = $ruleService->getSkuAuditRuler($supplier['sku_audit_ruler']);
$supplier['is_channel_or_purchase_user_view'] = $this->getIsChannelOrPurchaseUserView($supplier); $supplier['is_channel_or_purchase_user_view'] = $this->getIsChannelOrPurchaseUserView($supplier);
$supplier = $this->transformDeliveryTimeData($supplier); $supplier = $this->transformDeliveryTimeData($supplier);
$ExtendModel = new SupplierExtendModel(); $ExtendModel = new SupplierExtendModel();
......
...@@ -41,6 +41,7 @@ class IntracodeModel extends Model ...@@ -41,6 +41,7 @@ class IntracodeModel extends Model
return $result; return $result;
} }
//获取开发员的编码(渠道开发部门的优先排序)
public function getAdminIdEncode() public function getAdminIdEncode()
{ {
$codeList = $this->getEncode(); $codeList = $this->getEncode();
...@@ -62,11 +63,11 @@ class IntracodeModel extends Model ...@@ -62,11 +63,11 @@ class IntracodeModel extends Model
return $result; return $result;
} }
public function getEncodeByUserId($userId) public function getEncodeByUserIds($userIds = [])
{ {
$code = $this->where('admin_id', '>', 0)->join('user_info', 'lie_intracode.admin_id', '=', 'user_info.userId') $code = $this->where('admin_id', '>', 0)->join('user_info', 'lie_intracode.admin_id', '=', 'user_info.userId')
->where('user_info.userId', $userId) ->whereIn('user_info.userId', $userIds)
->select('code_id', 'admin_id', 'name', 'email', 'mobile')->first(); ->select('code_id', 'admin_id', 'name', 'email', 'mobile')->get();
if ($code) { if ($code) {
$code = $code->toArray(); $code = $code->toArray();
} }
......
...@@ -151,6 +151,13 @@ return [ ...@@ -151,6 +151,13 @@ return [
'allow_price_null' => '允许阶梯价为空', 'allow_price_null' => '允许阶梯价为空',
], ],
'SkuUploadDefaultRuler' => [
'allow_stock_lte_0' => 0,
'allow_moq_lte_0' => 0,
// 'allow_stock_lt_moq' => 0,
'allow_price_null' => 0,
],
/** /**
* 无需审核规则,满足直接审核通过 优先级2 * 无需审核规则,满足直接审核通过 优先级2
...@@ -162,18 +169,18 @@ return [ ...@@ -162,18 +169,18 @@ return [
*/ */
'SkuAuditRuler' => [ 'SkuAuditRuler' => [
"skip" => 0,//无需审核 "skip" => 0,//1无需审核,0需要审核
"audit_ruler" => [ "audit_ruler" => [
"1" => 0, //1=>1 如果其中一条数据型号与品牌都存在,value是1,代表需要审核;value是0,直接通过 "1" => 1, //1=>1 如果其中一条数据型号与品牌都存在,value是1,代表需要审核;value是0,直接通过
"2" => 0, //依次类推类推 "2" => 1, //依次类推类推
"3" => 0, "3" => 1,
"4" => 0, "4" => 1,
], ],
"name_map"=> [ "name_map" => [
"1"=>'型号与品牌已存在', "1" => '型号与品牌已存在',
"2"=>'型号不存在,品牌存在', "2" => '型号不存在,品牌存在',
"3"=>'型号不存在,品牌不存在', "3" => '型号不存在,品牌不存在',
"4"=>'型号存在,品牌不存在', "4" => '型号存在,品牌不存在',
] ]
], ],
......
...@@ -22,6 +22,10 @@ layui.config({ // common.js是配置layui扩展模块的目录,每个页面 ...@@ -22,6 +22,10 @@ layui.config({ // common.js是配置layui扩展模块的目录,每个页面
var layer = layui.layer; var layer = layui.layer;
var admin = layui.admin; var admin = layui.admin;
// $('.submit-loading').click(function () {
// admin.btnLoading('.submit-loading');
// });
}); });
/** 获取当前项目的根路径,通过获取layui.js全路径截取assets之前的地址 */ /** 获取当前项目的根路径,通过获取layui.js全路径截取assets之前的地址 */
......
...@@ -64,3 +64,9 @@ ...@@ -64,3 +64,9 @@
@include('script.'.$id.'Script') @include('script.'.$id.'Script')
@endif @endif
@endif @endif
<script>
$(function () {
});
</script>
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
, page: {} , page: {}
}); });
form.on('submit(auditSupplier)', function (data) { form.on('submit(auditSupplier)', function (data) {
admin.btnLoading('.submit-loading');
let supplierId = getQueryVariable('supplier_id'); let supplierId = getQueryVariable('supplier_id');
let url = '/api/supplier/AllocatePurchaseUser?supplier_id=' + supplierId; let url = '/api/supplier/AllocatePurchaseUser?supplier_id=' + supplierId;
let res = ajax(url, data.field); let res = ajax(url, data.field);
...@@ -46,5 +47,8 @@ ...@@ -46,5 +47,8 @@
} }
return false; return false;
}); });
form.on('submit(cancel)', function (data) {
admin.closeThisDialog();
});
}); });
</script> </script>
\ No newline at end of file
...@@ -19,5 +19,8 @@ ...@@ -19,5 +19,8 @@
} }
return false; return false;
}); });
form.on('submit(cancel)', function (data) {
admin.closeThisDialog();
});
}); });
</script> </script>
\ No newline at end of file
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
"' style='color: dodgerblue' ew-title='供应商详情 - " + data.supplier_code + "'>" + data.supplier_code + "</a>" "' style='color: dodgerblue' ew-title='供应商详情 - " + data.supplier_code + "'>" + data.supplier_code + "</a>"
} }
}, },
{field: 'supplier_name', title: '供应商名称', align: 'center',width: 270}, {field: 'supplier_name', title: '供应商名称', align: 'center', width: 270},
{field: 'supplier_group', title: '供应商性质', align: 'center', width: 120}, {field: 'supplier_group', title: '供应商性质', align: 'center', width: 120},
{ {
field: 'stockup_type', title: '合作类型', align: 'center', width: 120, templet: function (data) { field: 'stockup_type', title: '合作类型', align: 'center', width: 120, templet: function (data) {
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
} }
} }
}, },
{field: 'channel_username', title: '采购员', align: 'center'}, {field: 'channel_username', title: '采购员', align: 'center',width: 130},
{field: 'purchase_username', title: '渠道开发员', align: 'center', width: 120}, {field: 'purchase_username', title: '渠道开发员', align: 'center', width: 120},
{field: 'create_name', title: '创建人', align: 'center', width: 80}, {field: 'create_name', title: '创建人', align: 'center', width: 80},
{field: 'update_time', title: '最近修改时间', align: 'center', width: 160}, {field: 'update_time', title: '最近修改时间', align: 'center', width: 160},
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
@if(checkPerm('ViewFakeSupplier')) @if(checkPerm('ViewFakeSupplier'))
cols.push({ cols.push({
field: 'is_type', title: '正式供应商', align: 'center', width: 90, templet: function (data) { field: 'is_type', title: '正式供应商', align: 'center', width: 110, templet: function (data) {
return data.is_type === 0 ? '正式' : '<span style="color: red">竞调</span>'; return data.is_type === 0 ? '正式' : '<span style="color: red">竞调</span>';
} }
}) })
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
layer.msg('请先选择要操作的供应商', {icon: 5}) layer.msg('请先选择要操作的供应商', {icon: 5})
} else { } else {
const status = data[0].status; const status = data[0].status;
const hasSku = data[0].hasSku; const hasSku = data[0].sku_num;
if ((status === 3 || status === 2) && !hasSku) { if ((status === 3 || status === 2) && !hasSku) {
layer.confirm('对应供应商设为禁用并且审核通过后,猎芯将无法与其进行交易,如要再次启用,则须再次走入驻流程,是否执行当前操作?', function (index) { layer.confirm('对应供应商设为禁用并且审核通过后,猎芯将无法与其进行交易,如要再次启用,则须再次走入驻流程,是否执行当前操作?', function (index) {
let supplierId = data[0].supplier_id; let supplierId = data[0].supplier_id;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
form.on('submit(updateSupplier)', function (data) { form.on('submit(updateSupplier)', function (data) {
let confirmMessage = ''; let confirmMessage = '';
if (data.status === -2) { if (data.field.status === '-2') {
confirmMessage = '确定要重新入驻吗,该供应商就会再次进入审核阶段' confirmMessage = '确定要重新入驻吗,该供应商就会再次进入审核阶段'
} else { } else {
confirmMessage = '确定要修改供应商信息吗?一旦修改,该供应商就会再次进入审核阶段' confirmMessage = '确定要修改供应商信息吗?一旦修改,该供应商就会再次进入审核阶段'
......
...@@ -17,6 +17,13 @@ ...@@ -17,6 +17,13 @@
} }
}); });
if ({{$supplier['sku_audit_ruler']['skip']}}){
$(function () {
$('.audit_ruler_item').attr('disabled', true);
form.render()
})
}
//点击无需审核,所有选项变灰 //点击无需审核,所有选项变灰
form.on('radio(is_skip)', function(data){ form.on('radio(is_skip)', function(data){
if (data.value === '1') { if (data.value === '1') {
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<div align="center" style="margin-top: 20px"> <div align="center" style="margin-top: 20px">
<button type="button" class="layui-btn layui-btn-info" lay-submit lay-filter="load">保存</button> <button type="button" class="layui-btn layui-btn-info submit-loading" lay-submit lay-filter="load">保存</button>
</div> </div>
</div> </div>
</form> </form>
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<div align="center" style="margin-top: 20px"> <div align="center" style="margin-top: 20px">
<button type="button" id="addSupplierReceipt" class="layui-btn layui-btn-info" lay-submit <button type="button" id="addSupplierReceipt" class="layui-btn layui-btn-info submit-loading" lay-submit
lay-filter="addSupplierReceipt">保存 lay-filter="addSupplierReceipt">保存
</button> </button>
</div> </div>
......
...@@ -28,15 +28,17 @@ ...@@ -28,15 +28,17 @@
<div class="layui-inline" style="margin-left: -30px"> <div class="layui-inline" style="margin-left: -30px">
@inject('statusPresenter','App\Presenters\StatusPresenter') @inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('purchase_uid','渠道开发员',$supplier['purchase_uid'], {!! $statusPresenter->render('purchase_uid','渠道开发员',$supplier['purchase_uid'],
$userCodes,['required'=>true]) !!} $userCodes,['required'=>true,'width'=>'110px']) !!}
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<div align="center" style="margin-top: 20px;text-align: right"> <div align="center" style="margin-top: 20px;text-align: right">
<button type="button" class="layui-btn layui-btn-sm layui-btn-info" lay-submit <button type="button" class="layui-btn layui-btn-sm layui-btn-info submit-loading" lay-submit
lay-filter="auditSupplier">保存 lay-filter="auditSupplier">保存
<button type="button" class="layui-btn layui-btn-sm layui-btn-warm" lay-filter="cancel">取消 </button>
</button> <button type="button" class="layui-btn layui-btn-sm layui-btn-warm" lay-submit
lay-filter="cancel">取消
</button>
</div> </div>
</div> </div>
</form> </form>
......
...@@ -42,8 +42,13 @@ ...@@ -42,8 +42,13 @@
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<div align="center" style="margin-top: 20px"> <div align="center" style="margin-top: 20px;text-align: right">
<button type="button" class="layui-btn layui-btn-info" lay-submit lay-filter="auditSupplier">保存</button> <button type="button" class="layui-btn layui-btn-sm layui-btn-info submit-loading" lay-submit
lay-filter="auditSupplier">保存
</button>
<button type="button" class="layui-btn layui-btn-sm layui-btn-warm" lay-submit
lay-filter="cancel">取消
</button>
</div> </div>
</div> </div>
</form> </form>
......
...@@ -257,7 +257,7 @@ ...@@ -257,7 +257,7 @@
<div class="layui-form-item"> <div class="layui-form-item">
<div class="layui-inline"> <div class="layui-inline">
<label class="layui-form-label">数据新增规则 : </label> <label class="layui-form-label">数据新增规则 : </label>
<div class="layui-input-block"> <div class="layui-input-inline" style="width: 380px;margin-top: 0px">
@if(!empty($supplier['sku_upload_ruler'])) @if(!empty($supplier['sku_upload_ruler']))
@foreach($supplier['sku_upload_ruler'] as $key=>$flag) @foreach($supplier['sku_upload_ruler'] as $key=>$flag)
@if(!empty(array_get(config('fixed.SkuUploadRuler'),$key))) @if(!empty(array_get(config('fixed.SkuUploadRuler'),$key)))
...@@ -279,6 +279,47 @@ ...@@ -279,6 +279,47 @@
@endforeach @endforeach
@endif @endif
</div> </div>
<div class="layui-form-mid layui-word-aux">
SKU数据导入条件勾选后只要满足该条件,就可以导入数据;默认导入条件是有库存、价格、起订量且起订量>库存
</div>
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">审核内容配置 : </label>
<div class="layui-input-inline" style="width: 205px;margin-top: 0;">
<input type="radio" name="sku_audit_ruler[skip]" lay-filter="is_skip" disabled
@if($supplier['sku_audit_ruler']['skip']==1) checked @endif value="1" title="无需审核">
<input type="radio" name="sku_audit_ruler[skip]" lay-filter="is_skip" disabled
@if($supplier['sku_audit_ruler']['skip']==0) checked @endif value="0" title="需要审核内容">
</div>
<div class="layui-input-inline" style="width: 700px;margin-top: 0;">
@if(!empty($supplier['sku_audit_ruler']))
@foreach($supplier['sku_audit_ruler']['audit_ruler'] as $key=>$flag)
@if(!empty(array_get(config('fixed.SkuAuditRuler.audit_ruler'),$key)))
<input type="checkbox" name="sku_audit_ruler[{{$key}}]"
lay-skin="primary"
class="audit_ruler_item"
disabled
@if($flag)
checked
@endif
title="{{array_get(config('fixed.SkuAuditRuler.name_map'),$key)}}">
@endif
@endforeach
@else
@foreach(config('fixed.SkuAuditRuler.audit_ruler') as $key=>$flag)
<input type="checkbox" name="sku_audit_ruler[{{$key}}]" disabled
lay-skin="primary" class="audit_ruler_item"
title="{{array_get(config('fixed.SkuAuditRuler.name_map'),$key)}}">
@endforeach
@endif
</div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -33,7 +33,8 @@ ...@@ -33,7 +33,8 @@
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<div align="left" style="margin-top: 20px;margin-left: 40px"> <div align="left" style="margin-top: 20px;margin-left: 40px">
<button type="button" class="layui-btn layui-btn-info layui-btn-sm" lay-submit <button type="button"
class="layui-btn layui-btn-info layui-btn-sm submit-loading" lay-submit
lay-filter="addSupplierLog">添加信息记录 lay-filter="addSupplierLog">添加信息记录
</button> </button>
</div> </div>
...@@ -68,6 +69,7 @@ ...@@ -68,6 +69,7 @@
@else @else
<p>{{$log['action']}} : {{$log['content']}}</p> <p>{{$log['action']}} : {{$log['content']}}</p>
@endif @endif
<p style="color: grey">{{$log['add_time'].' '.$log['admin_name']}}</p>
<hr/> <hr/>
@endforeach @endforeach
@endif @endif
...@@ -83,6 +85,7 @@ ...@@ -83,6 +85,7 @@
@else @else
<p>{{$log['action']}} : {{$log['content']}}</p> <p>{{$log['action']}} : {{$log['content']}}</p>
@endif @endif
<p style="color: grey">{{$log['add_time'].' '.$log['admin_name']}}</p>
<hr/> <hr/>
@endforeach @endforeach
@endif @endif
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<div class="layui-col-md3"></div> <div class="layui-col-md3"></div>
</div> </div>
<div class="layui-row" style="margin-bottom: 25px;margin-top: 5px"> <div class="layui-row" 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 submit-loading" lay-submit
lay-filter="updateSupplier">提交 lay-filter="updateSupplier">提交
</button> </button>
<a id="supplierDetailUrl" <a id="supplierDetailUrl"
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
<div class="layui-tab-content"> <div class="layui-tab-content">
<div class="layui-tab-item layui-show"> <div class="layui-tab-item layui-show">
<div class="layui-row" style="padding: 10px"> <div class="layui-row" style="padding: 10px">
<input type="hidden" name="status" value="{{$supplier['status'] or 0}}">
<div class="layui-row"> <div class="layui-row">
@include('web.supplier.SupplierBase') @include('web.supplier.SupplierBase')
</div> </div>
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<div align="center" style="margin-top: 20px"> <div align="center" style="margin-top: 20px">
<button type="button" class="layui-btn layui-btn-info" lay-submit lay-filter="load">保存</button> <button type="button" class="layui-btn layui-btn-info submit-loading" lay-submit lay-filter="load">保存</button>
</div> </div>
</div> </div>
</form> </form>
......
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
</div> </div>
<div class="layui-row" style="text-align: right"> <div class="layui-row" style="text-align: right">
{{-- <div class="layui-btn-group" 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 submit-loading" lay-submit
lay-filter="addSupplier">确认 lay-filter="addSupplier">确认
</button> </button>
<button lay-filter="cancelAddSupplier" <button lay-filter="cancelAddSupplier"
......
...@@ -135,12 +135,12 @@ ...@@ -135,12 +135,12 @@
<div class="layui-inline" style="width: 100%"> <div class="layui-inline" style="width: 100%">
<label class="layui-form-label">审核内容配置 : </label> <label class="layui-form-label">审核内容配置 : </label>
<div class="layui-input-inline" style="width: 205px"> <div class="layui-input-inline" style="width: 205px">
<input type="radio" name="sku_audit_ruler[skip]" lay-filter="is_skip" value="1" title="无需审核"> <input type="radio" name="sku_audit_ruler[skip]" lay-filter="is_skip" @if($supplier['sku_audit_ruler']['skip']==1) checked @endif value="1" title="无需审核">
<input type="radio" name="sku_audit_ruler[skip]" lay-filter="is_skip" value="0" title="需要审核内容" checked> <input type="radio" name="sku_audit_ruler[skip]" lay-filter="is_skip" @if($supplier['sku_audit_ruler']['skip']==0) checked @endif value="0" title="需要审核内容">
</div> </div>
<div class="layui-input-inline" style="width: 700px"> <div class="layui-input-inline" style="width: 700px">
@if(!empty($supplier['sku_audit_ruler'])) @if(!empty($supplier['sku_audit_ruler']))
@foreach($supplier['sku_audit_ruler'] as $key=>$flag) @foreach($supplier['sku_audit_ruler']['audit_ruler'] as $key=>$flag)
@if(!empty(array_get(config('fixed.SkuAuditRuler.audit_ruler'),$key))) @if(!empty(array_get(config('fixed.SkuAuditRuler.audit_ruler'),$key)))
<input type="checkbox" name="sku_audit_ruler[{{$key}}]" <input type="checkbox" name="sku_audit_ruler[{{$key}}]"
lay-skin="primary" lay-skin="primary"
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
@if($flag) @if($flag)
checked checked
@endif @endif
title="{{array_get(config('fixed.SkuAuditRuler'),$key)}}"> title="{{array_get(config('fixed.SkuAuditRuler.name_map'),$key)}}">
@endif @endif
@endforeach @endforeach
@else @else
......
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