Commit 01ede865 by mushishixian

temp

parent 3633024f
Showing with 553 additions and 205 deletions
......@@ -10,6 +10,7 @@ use App\Http\Services\BlacklistService;
use App\Http\Services\DepartmentService;
use App\Http\Services\LogService;
use App\Http\Services\MessageService;
use App\Http\Services\SupplierAuditService;
use App\Http\Services\SupplierService;
use App\Http\Services\SyncSupplierService;
use App\Http\Transformers\SupplierTransformer;
......@@ -81,6 +82,25 @@ class SupplierApiController extends Controller
$this->response(0, 'ok', $list['data'], $list['total']);
}
public function DisableSupplier($request)
{
$supplierId = $request->get('supplier_id');
$model = new SupplierChannelModel();
$result = $model->where('supplier_id', $supplierId)->update([
'update_time' => time(),
'status' => $model::STATUS_DISABLE,
]);
if ($result) {
//发送队列消息同步到金蝶
$service = new SyncSupplierService();
$service->syncSupplierToErp($supplierId);
$this->response(0, '禁用成功');
} else {
$this->response(-1, '禁用失败');
}
}
//修改状态(禁用,启用(审核通过),驳回,草稿,取消黑名单)
public function ChangeSupplierStatus($request)
{
......@@ -133,25 +153,6 @@ class SupplierApiController extends Controller
$this->response(0, '修改状态成功');
}
//添加供应商到黑名单
public function AddBlacklistSupplier($request)
{
$supplierId = $request->get('supplier_id');
$reason = $request->get('reason');
//先去修改主表的状态
$blacklistService = new BlacklistService();
$res = $blacklistService->addSupplierToBlacklist($supplierId, $reason);
if (!$res) {
$this->response(-1, '拉黑失败');
}
$service = new SyncSupplierService();
$service->syncSupplierToErp($supplierId);
$messageService = new MessageService();
$messageService->sendSupplierMessage($supplierId, -3);
$this->response(0, '拉黑成功');
}
//导出供应商信息申请表到word
public function ExportSupplierToWord($request)
{
......@@ -191,96 +192,42 @@ class SupplierApiController extends Controller
$this->response(0, '供应商名称合理');
}
public function SaveAddress($request)
//审核供应商
public function AuditSupplier($request)
{
$map = $request->only([
'supplier_id',
'shipping_address',
'return_address',
'return_consignee',
'return_phone'
]);
$service = new SupplierService();
$result = $service->saveAddress($map);
if (!$result) {
$this->response(-1, '保存失败');
$status = $request->get('status');
$rejectReason = $request->get('reject_reason');
if (empty($status)) {
$this->response(-1, '必须选择一个审核意见');
}
$this->response(0, '保存成功');
if ($status == 3 && empty($rejectReason)) {
$this->response(-1, '不同意时必须填写原因');
}
public function SaveApiData($request)
{
$map = $request->only([
'supplier_id',
'outside_contact_status',
'outside_contact_type',
'outside_contact_url',
'outside_contact_username',
'outside_contact_password'
]);
$service = new SupplierService();
$result = $service->saveApiData($map);
$supplierId = $request->get('supplier_id');
$service = new SupplierAuditService();
$result = $service->auditSupplier($supplierId, $status, $rejectReason);
if (!$result) {
$this->response(-1, '保存失败');
$this->response(-1, '审核失败');
}
$this->response(0, '保存成功');
$this->response(0, '审核成功');
}
//拉黑供应商
public function BlockSupplier($request)
//分配渠道开发员
public function AllocatePurchaseUser($request)
{
$purchaseUid = $request->get('purchase_uid');
$supplierId = $request->get('supplier_id');
$reason = $request->get('reason');
$data = [
'supplier_id' => $supplierId,
'reason' => $reason,
'blacklist_uid' => $request->user->userId,
'blacklist_name' => $request->user->name,
'add_time' => time(),
];
//先去修改状态
$supplierModel = new SupplierChannelModel();
$result = $supplierModel->where('supplier_id', $supplierId)->update([
'status' => -3,
'update_time' => time()
]);
if ($result) {
$model = new SupplierBlacklistModel();
$count = $model->where('supplier_id', $supplierId)->count();
if ($count) {
$result = $model->where('supplier_id', $supplierId)->update($data);
} else {
$result = $model->insert($data);
}
if (empty($purchaseUid)) {
$this->response(-1, '渠道开发员不能为空');
}
$service = new SupplierService();
$result = $service->allocatePurchaseUser($supplierId, $purchaseUid);
if (!$result) {
$this->response(-1, '加入黑名单失败');
}
$service = new SyncSupplierService();
$service->syncSupplierToErp($supplierId);
$this->response(0, '加入黑名单成功');
$this->response(-1, '分配渠道开发员失败');
}
$this->response(0, '分配渠道开发员成功');
//驳回申请
public function RejectSupplier($request)
{
$supplierId = $request->get('supplier_id');
$reason = $request->get('reject_reason');
//先去修改状态
$supplierModel = new SupplierChannelModel();
$result = $supplierModel->where('supplier_id', $supplierId)->update([
'status' => 3,
'reject_reason' => $reason,
'audit_uid' => $request->user->userId,
'audit_name' => $request->user->name,
]);
if (!$result) {
$this->response(-1, '驳回供应商失败');
}
$messageService = new MessageService();
$messageService->sendSupplierMessage($supplierId, 3);
$this->response(0, '驳回供应商成功');
}
//导出供应商
......
......@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use App\Http\Transformers\SupplierLogTransformer;
use App\Model\LogModel;
use App\Model\SupplierLogModel;
use Illuminate\Http\Request;
......@@ -24,7 +25,7 @@ class SupplierLogApiController extends Controller
$list = $model->where('supplier_id', $supplierId)->orderBy('id', 'desc')->paginate($limit)->toArray();
$transformer = new SupplierLogTransformer();
$list['data'] = $transformer->transformList($list['data']);
$this->response(0, 'ok', $list['data'],$list['total']);
$this->response(0, 'ok', $list['data'], $list['total']);
}
//添加
......@@ -44,9 +45,19 @@ class SupplierLogApiController extends Controller
$model = new SupplierLogModel();
$result = $model->insert($data);
if ($result) {
//还要添加操作记录
$logModel = new LogModel();
$data = [
'action' => '添加信息记录',
'content' => $data['desc'],
'add_time' => time(),
'admin_name' => $request->user->name,
'admin_id' => $request->user->userId,
];
$logModel->insert($data);
$this->response(0, '添加成功');
}
$this->response(-1, '添加失败',$result);
$this->response(-1, '添加失败', $result);
}
//删除
......@@ -58,6 +69,6 @@ class SupplierLogApiController extends Controller
if ($result) {
$this->response(0, '删除成功');
}
$this->response(-1, '删除失败',$result);
$this->response(-1, '删除失败', $result);
}
}
<?php
namespace App\Http\Controllers;
use App\Model\ApplyExamineUserModel;
use App\Model\ApplyModel;
use App\Model\DingTalk;
use App\Model\LogModel;
use App\Model\SupplierLogModel;
use App\Model\UserInfoModel;
use Common\Model\RedisModel;
use Illuminate\Http\Request;
use DB;
class LogController extends Controller
{
public function Entrance(Request $request, $id = 'index')
{
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($method, $parameters)
{
return $this->errhtml('Not', '没有这个页面');
}
public function SupplierLog($request)
{
$supplierId = $request->get('supplier_id',1);
$logModel = new LogModel();
// $logs = $logModel->where('supplier_id', $supplierId)->get();
$logs = $logModel->orderBy('id', 'desc')->get();
$updateLogs = $logModel->orderBy('id', 'desc')->get();
$viewLogs = $logModel->orderBy('id', 'desc')->get();
$supplierLogModel = new SupplierLogModel();
$supplierLogs = $supplierLogModel->orderBy('id', 'desc')->get();
$this->data['logs'] = $logs;
$this->data['supplierId'] = $supplierId;
$this->data['updateLogs'] = $updateLogs;
$this->data['viewLogs'] = $viewLogs;
$this->data['supplierLogs'] = $supplierLogs;
return $this->view('供应商日志');
}
}
<?php
namespace App\Http\Controllers;
use App\Jobs\ExportSelfGoods;
use App\Model\ClassifyAttrModel;
use App\Model\CodeModel;
use App\Model\ExamineModel;
use App\Model\GoodsModel;
use App\Model\HistoryPriceModel;
use App\Model\OfferModel;
use App\Model\RedisModel;
use App\Model\ResourceModel;
use App\Model\SampleClassModel;
use App\Model\SampleModel;
use App\Model\SelfClassifyModel;
use App\Model\SelfFinancialClassifyModel;
use App\Model\SupplierChannelModel;
use App\Model\UnitModel;
use App\Model\UploadLogModel;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
use Storage;
use Excel;
class SelfApiController extends Controller
{
public function Entrance(Request $request, $id)
{
return $this->$id($request, $id);
}
}
......@@ -7,6 +7,7 @@ use App\Http\Services\SupplierContactService;
use App\Http\Services\SupplierService;
use App\Http\Services\SupplierStatisticsService;
use App\Http\Services\ViewCheckService;
use App\Http\Transformers\SupplierTransformer;
use App\Model\IntracodeModel;
use App\Model\SupplierChannelModel;
use Illuminate\Http\Request;
......@@ -111,6 +112,34 @@ class SupplierController extends Controller
return $this->view('新增供应商');
}
//审核供应商
public function AuditSupplier($request)
{
$supplierId = $request->get('supplier_id');
$model = new SupplierChannelModel();
$supplier = $model->where('supplier_id', $supplierId)->first();
//获取最后一条非分配渠道员的日志
//todo
$this->data['supplier'] = $supplier ? $supplier->toArray() : [];
return $this->view('审核供应商');
}
//分配渠道员
public function AllocatePurchaseUser($request)
{
$supplierId = $request->get('supplier_id');
$model = new SupplierChannelModel();
$supplier = $model->where('supplier_id', $supplierId)->first();
$supplier = $supplier ? $supplier->toArray() : [];
$transformer = new SupplierTransformer();
$supplier = $transformer->transformInfo($supplier);
$this->data['supplier'] = $supplier;
$intracodeModel = new IntracodeModel();
$this->data['userCodes'] = $intracodeModel->getSampleEncode();
$this->data['logs'] = [];
return $this->view('审核供应商');
}
//操作日志列表
public function LogList($request, $data)
{
......
<?php
namespace App\Http\Services;
use App\Http\Transformers\SupplierTransformer;
use App\Model\SupplierAddressModel;
use App\Model\SupplierChannelModel;
use App\Model\SupplierContactModel;
use Illuminate\Support\Facades\DB;
use RedisDB;
class SupplierAuditService
{
public function auditSupplier($supplierId,$status,$rejectReason)
{
$model = new SupplierChannelModel();
$result = $model->where('supplier_id',$supplierId)->update([
'update_time'=>time(),
'status'=> $status,
'reject_reason' => $rejectReason,
]);
return $result;
}
}
\ No newline at end of file
......@@ -66,7 +66,7 @@ class SupplierService
$supplierId = $channel['supplier_id'];
$contactData = $contactService->getContactData($supplierId, $contact);
$model->where('supplier_id', $supplierId)->update($channel);
$contactService->saveContacts($supplierId,$contactData);
$contactService->saveContacts($supplierId, $contactData);
$this->saveSupplierCode($supplierId);
}
$supplierSn = $this->generateSupplierSn($supplierId, $channel['supplier_group']);
......@@ -135,62 +135,14 @@ class SupplierService
return [];
}
//保存收退货地址
public function saveAddress($map)
//分配开发员
public function allocatePurchaseUser($supplierId, $purchaseUid)
{
$supplierModel = new SupplierChannelModel();
$supplierCode = $supplierModel->where('supplier_id', $map['supplier_id'])->value('supplier_code');
//组装成两条数据(鬼知道以前为啥存两条)
$shippingData = [
'supplier_id' => $map['supplier_id'],
'supplier_code' => $supplierCode,
'address' => $map['shipping_address'],
'address_type' => 1,
];
$addressModel = new SupplierAddressModel();
$infoId = $addressModel->where('supplier_id', $map['supplier_id'])->where('address_type', 1)->value('info_id');
if ($infoId) {
$result = $addressModel->where('info_id', $infoId)->update($shippingData);
} else {
$result = $addressModel->insert($shippingData);
}
if (!$result) {
return $result;
}
$returnData = [
'supplier_id' => $map['supplier_id'],
'supplier_code' => $supplierCode,
'address' => $map['return_address'],
'address_type' => 2,
'consignee' => $map['return_consignee'],
'phone' => $map['return_phone'],
];
$infoId = $addressModel->where('supplier_id', $map['supplier_id'])->where('address_type', 2)->value('info_id');
if ($infoId) {
$result = $addressModel->where('info_id', $infoId)->update($returnData);
} else {
$result = $addressModel->insert($returnData);
}
$logService = new LogService();
$logService->AddLog($map['supplier_id'], 2, '保存地址信息', ' ');
return $result;
}
//保存接口信息
public function saveApiData($map)
{
$data = [
'supplier_id' => $map['supplier_id'],
'outside_contact_status' => $map['outside_contact_status'],
'outside_contact_type' => $map['outside_contact_type'],
'outside_contact_url' => $map['outside_contact_url'],
'outside_contact_username' => $map['outside_contact_username'],
'outside_contact_password' => $map['outside_contact_password'],
];
$supplierModel = new SupplierChannelModel();
$logService = new LogService();
$logService->AddLog($map['supplier_id'], 2, '保存接口对接信息', ' ');
return $supplierModel->where('supplier_id', $map['supplier_id'])->update($data);
$model = new SupplierChannelModel();
return $model->where('supplier_id', $supplierId)->update([
'update_time' => time(),
'purchase_uid' => $purchaseUid,
]);
}
}
\ No newline at end of file
......@@ -22,6 +22,7 @@ Route::group(['middleware' => ['web', 'menu']], function () {
Route::match(['get', 'post'], '/receipt/{key}', 'ReceiptController@info');
// Route::match(['get', 'post'], '/supplier_sync_log/{key}', 'SupplierSyncLogController@info');
Route::match(['get', 'post'], '/index/{key}', 'IndexController@Entrance');
Route::match(['get', 'post'], '/log/{key}', 'LogController@Entrance');
// Route::match(['get', 'post'], '/api/{key}', 'ApiController@Entrance');
// Route::match(['get', 'post'], '/hd/{key}', 'HandleController@Entrance');
......
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class LogModel extends Model
{
protected $connection='web';
protected $table='log';
public $timestamps = false;
}
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class SupplierLogModel extends Model
{
protected $connection='web';
protected $table='supplier_log';
protected $primaryKey = 'id';
public $timestamps = false;
}
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class SupplierSyncModel extends Model
{
protected $connection='web';
protected $table='supplier_sync';
public $timestamps = false;
}
This diff could not be displayed because it is too large.
/** EasyWeb iframe v3.1.8 date:2020-05-04 License By http://easyweb.vip */
layui.config({ // common.js是配置layui扩展模块的目录,每个页面都需要引入
version: '318', // 更新组件缓存,设为true不缓存,也可以设一个固定值
base: getProjectUrl() + 'assets/module/'
base: getProjectUrl() + 'assets/module/',
closeFooter: true,
}).extend({
steps: 'steps/steps',
notice: 'notice/notice',
......
......@@ -7,7 +7,8 @@
<title>控制台</title>
<link rel="stylesheet" href="/plugins/assets/libs/layui/css/layui.css"/>
<link rel="stylesheet" href="/plugins/assets/module/admin.css"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
{{-- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>--}}
<script src="/js/jquery-2.2.1.js"></script>
<script type="text/javascript" src="/plugins/assets/libs/layui/layui.js"></script>
<script type="text/javascript" src="/plugins/assets/js/common.js"></script>
<!--[if lt IE 9]>
......@@ -52,5 +53,5 @@
<!-- 引入同名的js,默认引入 -->
@if(empty($lead_in_js) || $lead_in_js === true)
{{-- <script type="text/javascript" src="/js/{{$id}}.js?v={{random(3,true)}}"></script>--}}
@include('script.'.$id)
@include('script.'.$id.'Script')
@endif
<script>
layui.use(['table', 'form', 'element', 'layer','admin'], function () {
let admin = layui.admin;
let form = layui.form;
let element = layui.element;
form.on('submit(auditSupplier)', function (data) {
let supplierId = getQueryVariable('supplier_id');
let url = '/api/supplier/AllocatePurchaseUser?supplier_id=' + supplierId;
let res = ajax(url, data.field);
if (!res) {
layer.msg('网络错误,请重试', {icon: 6});
} else {
if (res.err_code === 0) {
admin.closeThisDialog();
parent.layer.msg(res.err_msg, {icon: 6});
} else {
parent.layer.msg(res.err_msg, {icon: 5});
}
}
return false;
});
});
</script>
\ No newline at end of file
<script>
layui.use(['table', 'form', 'element', 'layer','admin'], function () {
let admin = layui.admin;
let form = layui.form;
let element = layui.element;
form.on('submit(auditSupplier)', function (data) {
let supplierId = getQueryVariable('supplier_id');
let url = '/api/supplier/AuditSupplier?supplier_id=' + supplierId;
let res = ajax(url, data.field);
if (!res) {
layer.msg('网络错误,请重试', {icon: 6});
} else {
if (res.err_code === 0) {
admin.closeThisDialog();
parent.layer.msg(res.err_msg, {icon: 6});
} else {
parent.layer.msg(res.err_msg, {icon: 5});
}
}
return false;
});
});
</script>
\ No newline at end of file
<script>
layui.use(['table', 'form', 'element', 'layer'], function () {
layui.use(['table', 'form', 'element', 'layer','admin'], function () {
let table = layui.table;
let form = layui.form;
let admin = layui.admin;
let element = layui.element;
table.render({
elem: '#receiptList',
url: '/api/receipt/getSupplierReceiptList',
method: 'get',
size: 'sm',
cellMinWidth: 80,//全局定义常规单元格的最小宽度
where: {
supplier_id: getQueryVariable("supplier_id")
......@@ -102,6 +104,17 @@
return false;
});
let supplierId = getQueryVariable('supplier_id')
// 打开右侧面板
layer.open({
type: 2,
content: '/log/SupplierLog?view=iframe&supplier_id=' + supplierId,
area: ['400px', '85%'],
shade: 0,
offset: 'rb',
title: '操作日志',
});
table.on('tool(list)', function (obj) {
let data = obj.data;
let layEvent = obj.event;
......
<script>
layui.use(['table', 'form', 'element', 'layer', 'Split','admin'], function () {
layui.use(['table', 'form', 'element', 'layer', 'Split', 'admin'], function () {
let $ = layui.jquery;
let Split = layui.Split;
let admin = layui.admin;
......@@ -59,27 +59,93 @@
{field: 'update_time', title: '最近修改时间', align: 'center', width: 160},
{field: 'create_time', title: '创建时间', align: 'center', width: 150},
]]
, id: 'SupplierList'
, id: 'list'
, page: {}
});
//新增供应商弹窗
$("#add_supplier").click(function () {
admin.open({
layer.open({
type: 2,
content: '/supplier/AddSupplier?view=iframe',
area: ['1000px', '720px'],
area: ['1000px', '97%'],
title: '新增供应商',
offset: ['10px'],
end: function () {
// table.reload('list');
}
});
})
//审批供应商弹窗
$("#audit_supplier").click(function () {
let checkStatus = table.checkStatus('list');
let data = checkStatus.data;
if (!data.length) {
layer.msg('请先选择要操作的供应商', {icon: 5})
} else {
let supplierId = data[0].supplier_id;
let status = data[0].status;
if (status !== 1) {
layer.msg('该供应商已经被审核',{icon: 5})
return
}
layer.open({
type: 2,
content: '/supplier/AuditSupplier?view=iframe&supplier_id=' + supplierId,
area: ['800px', '50%'],
title: '审核供应商',
end: function () {
table.reload('list');
}
});
}
})
//分配渠道员
$("#allocate_purchase_user").click(function () {
let checkStatus = table.checkStatus('list');
let data = checkStatus.data;
if (!data.length) {
layer.msg('请先选择要操作的供应商', {icon: 5})
} else {
let supplierId = data[0].supplier_id;
layer.open({
type: 2,
content: '/supplier/AllocatePurchaseUser?view=iframe&supplier_id=' + supplierId,
area: ['500px', '70%'],
title: '配置渠道开发员',
end: function () {
table.reload('list');
}
});
}
})
$("#disable_supplier").click(function () {
let checkStatus = table.checkStatus('list');
let data = checkStatus.data;
if (!data.length) {
layer.msg('请先选择要操作的供应商', {icon: 5})
} else {
layer.confirm('对应供应商设为禁用后,猎芯将无法与其进行交易,如要再次启用,则须再次走入驻流程,是否执行当前操作?', function (index) {
let supplierId = data[0].supplier_id;
let res = ajax('/api/supplier/DisableSupplier', {supplier_id: supplierId})
if (res.err_code === 0) {
layer.msg(res.err_msg, {icon: 6})
layer.closeAll();
table.reload('list')
} else {
layer.msg(res.err_msg, {icon: 5})
}
});
}
});
form.on('submit(load)', function (data) {
form.render();
//执行重载
table.reload('SupplierList', {
table.reload('list', {
page: {
curr: 1
}
......
<script>
layui.use(['table', 'form', 'element', 'layer', 'Split', 'admin'], function () {
let $ = layui.jquery;
let admin = layui.admin;
let table = layui.table;
let form = layui.form;
form.on('submit(addSupplierLog)', function (data) {
let supplierId = {{$supplierId}};
data.field.supplier_id = supplierId;
let res = ajax('/api/supplier_log/AddSupplierLog', data.field)
if (res.err_code === 0) {
layer.msg('新增信息记录成功', {'icon': 6});
location.reload();
} else {
layer.msg(res.err_msg, {'icon': 5});
}
});
});
</script>
\ No newline at end of file
......@@ -5,7 +5,8 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>{{config('website.webTitle')}} | {{$title or ''}}</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="/js/jquery-2.2.1.js"></script>
{{-- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>--}}
<link rel="stylesheet" href="/plugins/assets/libs/layui/css/layui.css"/>
<link rel="stylesheet" href="/plugins/assets/module/admin.css?v=317"/>
<!--[if lt IE 9]>
......
......@@ -83,6 +83,7 @@
</div>
</div>
</div>
</div>
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">资信调查 : </label>
<div class="layui-input-block">
......@@ -92,8 +93,8 @@
<div class="layui-form-item">
<label class="layui-form-label">
主营品牌</label>
<div class="layui-input-block">
<div id="brand_selector" class="layui-input-inline" style="width: 660px;">
<div class="layui-input-block" style="margin-top: 15px">
<div id="brand_selector" class="layui-input-inline" style="width: 100%;">
</div>
<input type="hidden" name="main_brands" value="{{$supplierInfo['main_brands'] or ''}}"
id="main_brands">
......@@ -144,5 +145,5 @@
</div>
</div>
</form>
</div>
</div>
</div>
\ No newline at end of file
<style>
.layui-form-item {
margin-bottom: 5px;
}
</style>
<div class="layui-card">
<div class="layui-card-header" style="height: 90px">
<div class="layui-row">
<div class="layui-col-xs6">
供应商名称 : <b>{{$supplier['supplier_name']}}</b>
</div>
<div class="layui-col-xs6">
状态 : {{$supplier['status_name']}}
</div>
<div class="layui-col-xs6">
公司性质 : {{$supplier['supplier_group']}}
</div>
<div class="layui-col-xs6">
合作类型 : {{$supplier['stockup_type']}}
</div>
</div>
</div>
<div class="layui-card-body">
<form class="layui-form" action="">
<input type="hidden" name="supplier_id" value="{{$supplier['supplier_id']}}">
<div class="layui-form-item">
<div class="layui-inline" style="margin-left: -30px">
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('purchase_uid','渠道开发员',$supplier['purchase_uid'],
$userCodes,['required'=>true]) !!}
</div>
</div>
<div class="layui-form-item">
<div align="center" style="margin-top: 20px;text-align: right">
<button type="button" class="layui-btn layui-btn-sm layui-btn-info" lay-submit
lay-filter="auditSupplier">保存
<button type="button" class="layui-btn layui-btn-sm layui-btn-warm" lay-filter="cancel">取消
</button>
</div>
</div>
</form>
</div>
</div>
<blockquote class="layui-elem-quote layui-text">
<b>操作日志</b>
</blockquote>
@foreach($logs as $log)
{{date('Y-m-d H:i:s',$log['add_time'])}} -- {{$log['content']}}
@endforeach
<style>
.layui-form-item {
margin-bottom: 5px;
}
</style>
<div class="layui-card">
<div class="layui-card-body">
<form class="layui-form" action="">
<input type="hidden" name="supplier_id" value="{{$supplier['supplier_id']}}">
<div class="layui-form-item">
<label class="layui-form-label">基本信息 : </label>
<div class="layui-input-inline">
{{$supplier['supplier_name']}}
<a style="color: dodgerblue;margin-left: 20px"
href="/supplier/SupplierDetail?view=iframe&supplier_id={{$supplier['supplier_id']}}">{{$supplier['supplier_code']}}</a>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">审核内容 : </label>
<div class="layui-input-inline">
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">审核意见 : </label>
<div class="layui-input-block">
<input type="radio" name="status" value="1" title="同意">
<input type="radio" name="status" value="3" title="不同意">
</div>
</div>
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">原因说明 : </label>
<div class="layui-input-block">
<textarea name="reject_reason" placeholder="不同意时必须填写原因" class="layui-textarea"></textarea>
</div>
</div>
<div class="layui-form-item">
<div align="center" style="margin-top: 20px">
<button type="button" class="layui-btn layui-btn-info" lay-submit lay-filter="auditSupplier">保存</button>
</div>
</div>
</form>
</div>
</div>
\ No newline at end of file
......@@ -22,7 +22,8 @@
公司性质 : {{$supplier['supplier_group']}}
</div>
<div class="layui-col-md2">
合作类型 : {{$supplier['stockup_type']}}
公司性质 : {{$supplier['supplier_group']}}
</div>
<div class="layui-col-md8"></div>
</div>
......
<div class="layui-card">
<div class="layui-card-body">
<div class="layui-tab">
<ul class="layui-tab-title">
<li style="padding: 0" class="layui-this" id="base_info">全部</li>
<li style="padding: 0" id="contact">修改记录</li>
<li style="padding: 0" id="ruler">查看记录</li>
<li style="padding: 0" id="ruler">信息记录</li>
</ul>
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
<form class="layui-form" action="">
<div class="layui-form-item" style="margin-left: -70px;margin-bottom: 0">
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('type','类型',
'',config('fixed.SupplierLogType'),['required'=>false]) !!}
</div>
<div class="layui-form-item layui-form-text" style="margin-left: -70px">
<div class="layui-input-block">
<textarea name="desc" placeholder="请输入具体的信息内容" class="layui-textarea"></textarea>
</div>
</div>
<div class="layui-form-item">
<div align="left" style="margin-top: 20px;margin-left: 40px">
<button type="button" class="layui-btn layui-btn-info layui-btn-sm" lay-submit
lay-filter="addSupplierLog">添加信息记录
</button>
</div>
</div>
</form>
<div id="logs" style="margin-left: 5px">
{{--所有操作记录列表查看--}}
@foreach($logs as $log)
<p>{{$log['action']}} : {{$log['content']}}</p>
<p style="color: grey">{{date('Y-m-d H:i:s',$log['add_time']).' '.$log['admin_name']}}</p>
<hr/>
@endforeach
</div>
</div>
<div class="layui-tab-item">
@foreach($updateLogs as $log)
<p>{{$log['content']}}</p>
<p style="color: grey">{{date('Y-m-d H:i:s',$log['add_time']).' '.$log['admin_name']}}</p>
<hr/>
@endforeach
</div>
<div class="layui-tab-item">
@foreach($viewLogs as $log)
<p>{{$log['content']}}</p>
<p style="color: grey">{{date('Y-m-d H:i:s',$log['add_time']).' '.$log['admin_name']}}</p>
<hr/>
@endforeach
</div>
<div class="layui-tab-item">
@foreach($supplierLogs as $log)
<p>{{$log['desc']}}</p>
<p style="color: grey">{{date('Y-m-d H:i:s',$log['add_time']).' '.$log['admin_name']}}</p>
<hr/>
@endforeach
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
......@@ -7,4 +7,4 @@
<table class="layui-table" lay-filter="contactList" id="contactList"></table>
</div>
@include('script.supplier.SupplierContact')
\ No newline at end of file
@include('script.supplier.SupplierContactScript')
\ No newline at end of file
......@@ -16,4 +16,4 @@
</div>
</div>
</div>
@include('script.supplier.SupplierFile')
\ No newline at end of file
@include('script.supplier.SupplierFileScript')
\ 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