Commit cdb6e112 by mushishixian

查询供应商页面

parent b8164862
......@@ -732,4 +732,12 @@ class SupplierApiController extends Controller
exit;
}
//查询供应商
public function querySupplier($request)
{
$supplierName = $request->input('supplier_name');
$supplier = (new SupplierService())->querySupplier($supplierName);
$this->response(0, 'ok', $supplier);
}
}
......@@ -396,4 +396,10 @@ class SupplierController extends Controller
return $this->view('批量分配渠道开发员');
}
//查询供应商
public function QuerySupplier($request)
{
return $this->view('查询供应商');
}
}
\ No newline at end of file
......@@ -733,4 +733,12 @@ class SupplierService
exportCsv($csvData, '导出供应商列表', $header);
}
//查询供应商
public function querySupplier($supplierName)
{
$supplier = SupplierChannelModel::where('supplier_name',$supplierName)->first();
$supplier = !empty($supplier)?$supplier->toArray():[];
return $supplier;
}
}
\ No newline at end of file
<script>
layui.use(['table', 'form', 'element', 'table', 'layer', 'admin'], function () {
let admin = layui.admin;
let form = layui.form;
let table = layui.table
let element = layui.element;
form.on('submit(auditSupplier)', function (data) {
admin.showLoading({
type: 3
});
let supplierIds = getQueryVariable('supplier_ids');
let url = '/api/supplier/BatchAllocatePurchaseUser?supplier_ids=' + supplierIds;
$.ajax({
url: url,
type: 'GET',
async: true,
data: data.field,
dataType: 'json',
timeout: 20000,
success: function (res) {
admin.removeLoading();
if (res.err_code === 0) {
admin.closeThisDialog();
parent.layer.msg(res.err_msg, {icon: 6});
} else {
parent.layer.msg(res.err_msg, {icon: 5});
}
},
error: function () {
admin.removeLoading();
parent.layer.msg('网络错误', {icon: 5});
}
});
return false;
});
form.on('submit(cancel)', function (data) {
admin.closeThisDialog();
});
});
</script>
\ 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: 170px">
<blockquote class="layui-elem-quote layui-text">
<b>渠道开发员设置</b>
</blockquote>
<form class="layui-form" action="">
<input type="hidden" name="supplier_ids" value="{{$supplierIds}}">
<div class="layui-form-item">
<div class="layui-inline" style="margin-left: -30px">
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('purchase_uid','渠道开发员',null,
$userCodes,['required'=>true,'width'=>'150px']) !!}
</div>
</div>
<div class="layui-form-item">
<div align="center" style="margin-top: 10px;text-align: right">
<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-primary" lay-submit
lay-filter="cancel">取消
</button>
</div>
</div>
</form>
</div>
<div class="layui-card-body">
<blockquote class="layui-elem-quote layui-text">
<b>当前选中需要批量修改渠道员的供应商列表</b>
</blockquote>
<table class="layui-table">
<colgroup>
<col width="300">
<col width="100">
<col>
</colgroup>
<thead>
<tr>
<th>供应商名称</th>
<th>当前渠道开发员</th>
</tr>
</thead>
<tbody>
@foreach($suppliers as $supplier)
<tr>
<td>{{$supplier['supplier_name']}}</td>
<td>{{$supplier['purchase_username']}}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
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