Commit dd854067 by mushishixian

temp

parent 7880b1f3
......@@ -142,9 +142,6 @@ class SupplierApiController extends Controller
//写日志
$logService = new LogService();
$logService->AddLog($supplierId, LogModel::UPDATE_OPERATE, '禁用', '禁用供应商');
//发送队列消息同步到金蝶
$service = new SyncSupplierService();
$service->syncSupplierToErp($supplierId);
$this->response(0, '操作成功,进入审核状态');
} else {
$this->response(-1, '操作失败,进入审核状态');
......
......@@ -49,7 +49,7 @@ class AdminUserService
//获取渠道开发员(运营部)的所有用户信息
public function getPurchaseUsers()
{
{ //4,9
$departmentName = '运营部';
$departmentService = new DepartmentService();
$departmentId = $departmentService->getDepartmentId($departmentName);
......
......@@ -38,7 +38,7 @@ class LogService
$model->insert($data);
}
public function getLogs($supplierId, $type = '',$limit = 100)
public function getLogs($supplierId, $type = '', $limit = 100)
{
$model = new LogModel();
$query = $model->where('id', '>', 0);
......@@ -81,8 +81,16 @@ class LogService
if (in_array($key, array_keys($columnMap))) {
$oldValue = array_get($oldSupplier, $key, '空');
$newValue = array_get($newSupplier, $key, '空');
$content = array_get($columnMap, $key) . '由 [ ' . $oldValue . ' ] 改成 [ ' . $newValue .' ]';
$content = array_get($columnMap, $key) . '由 [ ' . $oldValue . ' ] 改成 [ ' . $newValue . ' ];';
} else {
if ($key == 'sku_upload_ruler') {
$oldValue = array_get($oldSupplier, $key, '空');
$newValue = array_get($newSupplier, $key, '空');
$rulerService = new SupplierSkuUploadRulerService();
$oldValue = $rulerService->getSkuUploadRulerDesc($oldValue);
$newValue = $rulerService->getSkuUploadRulerDesc($newValue);
$content = 'Sku上传规则由 [ ' . $oldValue . ' ] 改成 [ ' . $newValue . ' ];';
}
// switch ($key) {
// case 'qualification_photos':
// $newSupplier['qualification_photos'] = json_decode($newSupplier['qualification_photos'], true);
......
......@@ -47,8 +47,7 @@ class SupplierAddressService
} else {
$result = $addressModel->insert($returnData);
}
$logService = new LogService();
$logService->AddLog($map['supplier_id'], LogModel::UPDATE_OPERATE, '保存地址信息', ' ');
return $result;
}
}
\ No newline at end of file
......@@ -39,6 +39,11 @@ class SupplierAuditService
//记录日志
if ($disableExist) {
$auditStatus = $status == -2 ? '审核通过,禁用供应商' : '审核不通过,原因是 : ' . $rejectReason;
if ($status == -2) {
//发送队列消息同步到金蝶
$service = new SyncSupplierService();
$service->syncSupplierToErp($supplierId);
}
} else {
$auditStatus = $status == 2 ? '审核通过' : '审核不通过,原因是 : ' . $rejectReason;
}
......
<?php
namespace App\Http\Services;
//后台用户相关信息服务
use Illuminate\Support\Facades\DB;
class SupplierSkuUploadRulerService
{
//获取商品上传规则的具体描述
public function getSkuUploadRulerDesc($rule)
{
$rule = json_decode($rule, true);
$desc = '';
foreach ($rule as $name => $value) {
$name = array_get(config('fixed.SkuUploadRuler'), $name);
$desc .= $name . ":" . ($value ? "是" : "否") . ' ';
}
return $desc;
}
}
\ No newline at end of file
......@@ -102,6 +102,9 @@ class SupplierTransformer
public function transformInfo($supplier)
{
if (empty($supplier)) {
return [];
}
$intracodeModel = new IntracodeModel();
$users = $intracodeModel->getSampleEncode();
$supplier['qualification_photos'] = trim($supplier['qualification_photos']);
......
......@@ -128,7 +128,6 @@ return [
],
'SUPPLIER_REDIS_PRE' => 'supp_extend_fee',
'SUPPLIER_INFO_REDIS_PRE' => 'supp_info_',
'SUPPLIER_ID' => '17', // 供应商id
......@@ -152,12 +151,38 @@ return [
'allow_price_null' => '允许阶梯价为空',
],
/**
* 无需审核规则,满足直接审核通过 优先级2
* audit_rule
* 1代表 型号与品牌已存在
* 2型号不存在,品牌存在
* 3型号不存在,品牌不存在
* 4型号存在,品牌不存在
*/
'SkuAuditRuler' => [
"skip" => 0,//无需审核
"audit_ruler" => [
"1" => 0, //1=>1 如果其中一条数据型号与品牌都存在,value是1,代表需要审核;value是0,直接通过
"2" => 0, //依次类推类推
"3" => 0,
"4" => 0,
],
"name_map"=> [
"1"=>'型号与品牌已存在',
"2"=>'型号不存在,品牌存在',
"3"=>'型号不存在,品牌不存在',
"4"=>'型号存在,品牌不存在',
]
],
'TradingMethod' => [
1=>'先款后货',
1 => '先款后货',
2 => '月结',
],
'FileNameMapping'=>[
'FileNameMapping' => [
'business_license' => '营业执照',
'billing_information' => '开票资料',
'registration_certificate' => '商业登记证',
......@@ -171,7 +196,7 @@ return [
'other_attachment' => '其它附件',
],
//罗盘菜单对应id
'CompassMenuMap'=> [
'CompassMenuMap' => [
'total' => '全部',
'pending' => '待审核',
'in_review' => '审核中',
......
......@@ -24,7 +24,7 @@ return [
'supplier_group_name' => '供应商分组',
'channel_user_name' => '采购员',
'purchase_user_name' => '开发员',
'tax_number' => '税务登记号',
'tax_number' => '公司税号',
'cn_ratio' => '人民币系数',
'us_ratio' => '美金系数',
'is_type' => '转正供应商',
......@@ -35,7 +35,7 @@ return [
'established_time' => '公司成立时间',
'credit_investigation' => '资信调查',
// 'qualification_photos' => '资质照片',
'sku_upload_ruler' => '上传sku的规则',
// 'sku_upload_ruler' => '上传sku的规则',
'register_company_name' => '注册公司名',
'trading_method_name' => '交易方式',
'channel_username' => '采购员',
......
......@@ -3,6 +3,7 @@ layui.config({ // common.js是配置layui扩展模块的目录,每个页面
version: '318', // 更新组件缓存,设为true不缓存,也可以设一个固定值
base: getProjectUrl() + 'assets/module/',
closeFooter: true,
// tabAutoRefresh: true,
}).extend({
steps: 'steps/steps',
notice: 'notice/notice',
......
......@@ -34,7 +34,7 @@
<li class="layui-nav-item" lay-unselect>
<a>
<img src="{{$header or '/img/missing_face.png'}}" class="layui-nav-img">
<img src="{{$header or '/images/missing_face.png'}}" class="layui-nav-img">
<cite>{{$username or ''}}</cite>
</a>
<dl class="layui-nav-child">
......
<script>
layui.use(['table', 'form', 'element', 'layer', 'admin', 'upload'], function () {
layui.use(['table', 'form', 'element', 'layer', 'admin', 'upload','index'], function () {
let table = layui.table;
let layer = layui.layer;
let form = layui.form;
let index = layui.index;
let admin = layui.admin;
let element = layui.element;
let upload = layui.upload;
......@@ -11,6 +12,15 @@
$('#updateSupplierUrl').click(function () {
layer.load(1);
})
// admin.on('tab', function (d) {
// console.log(d);
// });
{{--console.log("{{$supplier['update_time']}}")--}}
{{--if (admin.getTempData("{{$supplier['supplier_code']}}")!={{$supplier['update_time']}}){--}}
{{-- admin.putTempData('{{$supplier['supplier_code']}}', {{$supplier['update_time']}});--}}
{{--}--}}
index.setTabTitle('供应商详情 - {{$supplier['supplier_code'] or ''}}');
function openLogView() {
// 打开右侧面板
......
......@@ -3,7 +3,7 @@
let $ = layui.jquery;
let Split = layui.Split;
// 水平分割,需要分割的元素(id)、默认大小(百分比)、最小值(单位px)
Split(['#s1', '#s2', '#s3', '#s4', '#s5'], {sizes: [7, 9, 9, 9, 63], minSize: 70});
Split(['#s1', '#s2', '#s3', '#s4', '#s5'], {sizes: [9, 12, 12, 12, 55], minSize: 70});
let table = layui.table;
let form = layui.form;
......@@ -34,7 +34,7 @@
"' style='color: dodgerblue' ew-title='供应商详情 - " + data.supplier_code + "'>" + data.supplier_code + "</a>"
}
},
{field: 'supplier_name', title: '供应商名称', align: 'center'},
{field: 'supplier_name', title: '供应商名称', align: 'center',width: 270},
{field: 'supplier_group', title: '供应商性质', align: 'center', width: 120},
{
field: 'stockup_type', title: '合作类型', align: 'center', width: 120, templet: function (data) {
......@@ -58,7 +58,7 @@
}
}
},
{field: 'channel_username', title: '采购员', align: 'center', width: 130},
{field: 'channel_username', title: '采购员', align: 'center'},
{field: 'purchase_username', title: '渠道开发员', align: 'center', width: 120},
{field: 'create_name', title: '创建人', align: 'center', width: 80},
{field: 'update_time', title: '最近修改时间', align: 'center', width: 160},
......
<script>
layui.use(['table', 'form', 'element', 'layer', 'admin', 'laydate', 'xmSelect'], function () {
layui.use(['table', 'form', 'element', 'layer', 'admin', 'index', 'laydate', 'xmSelect'], function () {
let admin = layui.admin;
let form = layui.form;
let layDate = layui.laydate;
let table = layui.table;
let index = layui.index;
let element = layui.element;
let xmSelect = layui.xmSelect;
......@@ -11,6 +12,8 @@
layer.load(1);
});
index.setTabTitle('供应商修改 - {{$supplier['supplier_code'] or ''}}');
form.on('submit(updateSupplier)', function (data) {
let confirmMessage = '';
if (data.status === -2) {
......
......@@ -16,5 +16,19 @@
$('#hk_max').val(9999999);
}
});
//点击无需审核,所有选项变灰
form.on('radio(is_skip)', function(data){
if (data.value === '1') {
$('.audit_ruler_item').attr('disabled', true);
form.render()
}else{
$('.audit_ruler_item').attr('disabled', false);
form.render()
}
console.log(data.elem); //得到radio原始DOM对象
console.log(data.value); //被点击的radio的value值
});
});
</script>
\ No newline at end of file
......@@ -53,7 +53,7 @@
// 默认加载主页
index.loadHome({
menuPath: '/web/index?view=iframe',
menuPath: '/Index/index?view=iframe',
menuName: '<i class="layui-icon layui-icon-home"></i>'
});
......
......@@ -23,7 +23,7 @@
{{$auditContent['action'] .' : '}}
@if(is_array($auditContent['content']))
@foreach($auditContent['content'] as $content)
{{$content}} ;
{{$content}}
@endforeach
@endif
</div>
......
......@@ -38,10 +38,10 @@
合作类型 :{{$supplier['stockup_type_name']}}
</div>
<div class="layui-col-md3">
<div class="layui-col-md5">
采购员 : {{$supplier['channel_username']}}
</div>
<div class="layui-col-md5"></div>
<div class="layui-col-md3"></div>
</div>
@if($supplier['status']==\App\Model\SupplierChannelModel::STATUS_PENDING
||$supplier['status']==\App\Model\SupplierChannelModel::STATUS_PASSED
......@@ -61,7 +61,9 @@
@endif
@if($supplier['status']==\App\Model\SupplierChannelModel::STATUS_IN_REVIEW)
<div class="layui-row">
<button type="button" style="margin-bottom: 25px;margin-top: 5px" class="layui-btn layui-btn layui-btn-disabled">审核中,不能修改</button>
<button type="button" style="margin-bottom: 25px;margin-top: 5px"
class="layui-btn layui-btn layui-btn-disabled">审核中,不能修改
</button>
</div>
@endif
</div>
......@@ -202,18 +204,22 @@
@include('web.supplier.SupplierContact')
</div>
<div class="layui-tab-item">
<div class="layui-row">
<div class="layui-row" style="padding-bottom: 10px">
<blockquote class="layui-elem-quote layui-text">
<b>采购附加费设置</b>
</blockquote>
@if(empty($supplier['extra_fee']['cn']['max'])&&empty($supplier['extra_fee']['hk']['max']))
暂未设置附加费
@else
<div class="layui-row">
商品总价不满 {{$supplier['extra_fee']['cn']['max'] or ''}}
元,收取 {{$supplier['extra_fee']['cn']['price'] or ''}} 元
</div>
<div class="layui-row" style="margin-bottom: 10px">
<div class="layui-row">
商品总价不满 {{$supplier['extra_fee']['hk']['max'] or ''}}
美金,收取 {{$supplier['extra_fee']['hk']['price'] or ''}} 元
</div>
@endif
</div>
<blockquote class="layui-elem-quote layui-text">
<b>采购价格系数调整</b>
......@@ -228,8 +234,17 @@
<b>货期调整</b>
</blockquote>
<div class="layui-row" style="margin-bottom: 10px">
@if($supplier['cn_delivery_time'])
大陆交期 : {{$supplier['cn_delivery_time'] .' '. $supplier['cn_delivery_time_period']}} ,
@else
大陆交期未设置
@endif
@if($supplier['us_delivery_time'])
香港交期 : {{$supplier['us_delivery_time'] .' '. $supplier['us_delivery_time_period']}}
@else
香港交期未设置
@endif
<div class="layui-word-aux" style="margin-left: -5px">
单位为工作日,周. 格式 : 2-6 工作日,1-2 周
</div>
......@@ -248,7 +263,7 @@
@if(!empty(array_get(config('fixed.SkuUploadRuler'),$key)))
<input type="checkbox" name="sku_upload_ruler[{{$key}}]"
lay-skin="primary"
@if(array_get(config('fixed.SkuUploadRuler'),$key))
@if($flag)
checked
@endif
disabled
......
......@@ -59,10 +59,10 @@
<div class="layui-col-md2">
合作类型:{{$supplier['stockup_type_name']}}
</div>
<div class="layui-col-md3">
<div class="layui-col-md5">
采购员 : {{$supplier['channel_username']}}
</div>
<div class="layui-col-md5"></div>
<div class="layui-col-md3"></div>
</div>
<div class="layui-row" style="margin-bottom: 25px;margin-top: 5px">
<button type="button" class="layui-btn layui-btn" lay-submit
......
......@@ -16,7 +16,7 @@
<label class="layui-form-label"><span class="require">*</span>注册公司名 : </label>
<div class="layui-input-block">
<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"
value="{{$supplier['register_company_name'] or ''}}">
</div>
</div>
......
......@@ -5,12 +5,14 @@
<div class="layui-inline">
<label class="layui-form-label">商品总价不满</label>
<div class="layui-input-inline" style="width: 100px;">
<input class="layui-input" type="text" name="cn[max]" id="cn_max" value="{{$supplier['extra_fee']['cn']['max'] or ''}}"
<input class="layui-input" type="text" name="cn[max]" id="cn_max"
value="{{$supplier['extra_fee']['cn']['max'] or ''}}"
lay-verify="num">
</div>
<div class="layui-form-label" style="width: 100px;margin-left: -20px">元(人民币),收取</div>
<div class="layui-input-inline" style="width: 100px;">
<input class="layui-input" type="text" name="cn[price]" value="{{$supplier['extra_fee']['cn']['price'] or ''}}"
<input class="layui-input" type="text" name="cn[price]"
value="{{$supplier['extra_fee']['cn']['price'] or ''}}"
lay-verify="float" value="">
</div>
<div class="layui-form-label" style="width: 40px;margin-left: -20px">元运费</div>
......@@ -23,12 +25,14 @@
<div class="layui-inline">
<label class="layui-form-label">商品总价不满</label>
<div class="layui-input-inline" style="width: 100px;">
<input class="layui-input" type="text" name="hk[max]" id="hk_max" value="{{$supplier['extra_fee']['hk']['max'] or ''}}"
<input class="layui-input" type="text" name="hk[max]" id="hk_max"
value="{{$supplier['extra_fee']['hk']['max'] or ''}}"
lay-verify="num" value="">
</div>
<div class="layui-form-label" style="width: 55px;margin-left: -20px">美金,收取</div>
<div class="layui-input-inline" style="width: 100px;">
<input class="layui-input" type="text" name="hk[price]" value="{{$supplier['extra_fee']['hk']['price'] or ''}}"
<input class="layui-input" type="text" name="hk[price]"
value="{{$supplier['extra_fee']['hk']['price'] or ''}}"
lay-verify="float" value="">
</div>
<div class="layui-form-label" style="width: 40px;margin-left: -20px">元运费</div>
......@@ -99,15 +103,15 @@
<b>SKU相关设置 - 联营库存数据</b>
</blockquote>
<div class="layui-form-item">
<div class="layui-inline">
<div class="layui-inline" style="width: 100%">
<label class="layui-form-label">数据新增规则 : </label>
<div class="layui-input-block">
<div class="layui-input-inline" style="width: 380px">
@if(!empty($supplier['sku_upload_ruler']))
@foreach($supplier['sku_upload_ruler'] as $key=>$flag)
@if(!empty(array_get(config('fixed.SkuUploadRuler'),$key)))
<input type="checkbox" name="sku_upload_ruler[{{$key}}]"
lay-skin="primary"
@if(array_get(config('fixed.SkuUploadRuler'),$key))
@if($flag)
checked
@endif
title="{{array_get(config('fixed.SkuUploadRuler'),$key)}}">
......@@ -121,17 +125,42 @@
@endforeach
@endif
</div>
<div class="layui-form-mid layui-word-aux">
SKU数据导入条件勾选后只要满足该条件,就可以导入数据;默认导入条件是有库存、价格、起订量且起订量>库存
</div>
</div>
</div>
{{--<div class="layui-form-item">--}}
{{-- <div class="layui-inline">--}}
{{-- <label class="layui-form-label">审核内容配置 : </label>--}}
{{-- <div class="layui-input-inline" style="width: 50px">--}}
{{-- </div>--}}
{{-- </div>--}}
{{--</div>--}}
<div class="layui-form-item">
<div class="layui-inline" style="width: 100%">
<label class="layui-form-label">审核内容配置 : </label>
<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" value="0" title="需要审核内容" checked>
</div>
<div class="layui-input-inline" style="width: 700px">
@if(!empty($supplier['sku_audit_ruler']))
@foreach($supplier['sku_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"
@if($flag)
checked
@endif
title="{{array_get(config('fixed.SkuAuditRuler'),$key)}}">
@endif
@endforeach
@else
@foreach(config('fixed.SkuAuditRuler.audit_ruler') as $key=>$flag)
<input type="checkbox" name="sku_audit_ruler[{{$key}}]"
lay-skin="primary" class="audit_ruler_item"
title="{{array_get(config('fixed.SkuAuditRuler.name_map'),$key)}}">
@endforeach
@endif
</div>
</div>
</div>
@include('script.supplier.SupplierRulerScript')
\ No newline at end of file
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