AllocatePurchaseUserScript.blade.php
2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<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;
table.render({
elem: '#logList'
, url: '/api/log/GetLogList'
, method: 'post'
, size: 'sm'
, limit: 10
, cellMinWidth: 80 //全局定义常规单元格的最小宽度
, where: {
supplier_id:{{$supplier['supplier_id']}},
action: '分配渠道开发员',
}
, loading: true
, first: true //不显示首页
, last: false //不显示尾页
, cols: [[
{field: 'add_time', title: '日志时间', width: 150, align: 'center'},
{
field: 'content', title: '日志内容', align: 'center', templet: function (data) {
return data.admin_name + data.content;
}
},
]]
, id: 'logList'
, page: {}
});
form.on('submit(auditSupplier)', function (data) {
admin.btnLoading('.submit-loading');
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();
//修改罗盘显示数量(cao)
parent.layer.msg(res.err_msg, {icon: 6});
} else {
admin.btnLoading('.submit-loading',false);
parent.layer.msg(res.err_msg, {icon: 5});
}
}
return false;
});
form.on('submit(cancel)', function (data) {
admin.closeThisDialog();
});
});
</script>