问题修复
This commit is contained in:
parent
ba8085e957
commit
58dcd1ab70
|
|
@ -10,9 +10,39 @@ layui.use(["form", "table", 'laydate'], function () {
|
|||
range: ['#startDay', '#endDay'],
|
||||
rangeLinked: true
|
||||
});
|
||||
getSupList();
|
||||
initTable();
|
||||
layui.form.render();
|
||||
});
|
||||
|
||||
// 供应商下拉选
|
||||
function getSupList() {
|
||||
let obj = {
|
||||
'type': ''
|
||||
}
|
||||
let params = {
|
||||
encryptedData: JSON.stringify(obj)
|
||||
}
|
||||
let url = dataUrl + 'backstage/carSup/getContractSupList';
|
||||
ajaxRequest(url, "POST", params, false, function () {
|
||||
}, function (result) {
|
||||
|
||||
if (result.code === 200) {
|
||||
setSelectData(result.data);
|
||||
}
|
||||
}, function (xhr, status, error) {
|
||||
errorFn(xhr, status, error)
|
||||
}, null);
|
||||
|
||||
function setSelectData(list) {
|
||||
let html = "<option value='' selected>请选择供应商</option>";
|
||||
$.each(list, function (index, item) {
|
||||
html += "<option item=" + JSON.stringify(item) + " value=" + item.id + ">" + item.name + "</option>";
|
||||
})
|
||||
$('#supId').empty().append(html);
|
||||
}
|
||||
}
|
||||
|
||||
// 查询/重置
|
||||
function queryTable(type) {
|
||||
if (type === 1) {
|
||||
|
|
@ -44,6 +74,7 @@ function reloadTable(pageNum) {
|
|||
where: {
|
||||
encryptedData: JSON.stringify({
|
||||
'keyWord': $('#keyWord').val(),
|
||||
'supId': $('#supId').val(),
|
||||
}),
|
||||
},
|
||||
},
|
||||
|
|
@ -63,6 +94,7 @@ function initTable() {
|
|||
where: {
|
||||
encryptedData: JSON.stringify({
|
||||
'keyWord': $('#keyWord').val(),
|
||||
'supId': $('#supId').val(),
|
||||
}),
|
||||
},
|
||||
request: {
|
||||
|
|
@ -90,6 +122,13 @@ function initTable() {
|
|||
return d.LAY_NUM;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: "supName",
|
||||
width: '8%',
|
||||
title: "供应商",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
field: "proName",
|
||||
width: '11%',
|
||||
|
|
@ -99,7 +138,7 @@ function initTable() {
|
|||
},
|
||||
{
|
||||
field: "type",
|
||||
width: '4%',
|
||||
width: '3.9%',
|
||||
title: "类型",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
|
|
@ -116,7 +155,7 @@ function initTable() {
|
|||
},
|
||||
{
|
||||
field: "code",
|
||||
width: '8.5%',
|
||||
width: '8.2%',
|
||||
title: "需求计划编号",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
|
|
@ -126,14 +165,14 @@ function initTable() {
|
|||
},
|
||||
{
|
||||
field: "userName",
|
||||
width: '7.1%',
|
||||
width: '6.1%',
|
||||
title: "申请人",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
field: "appLyTime",
|
||||
width: '10%',
|
||||
width: '8%',
|
||||
title: "申请时间",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
|
|
@ -141,7 +180,7 @@ function initTable() {
|
|||
},
|
||||
{
|
||||
field: "remark",
|
||||
width: '10.5%',
|
||||
width: '9.5%',
|
||||
title: "备注",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
|
|
@ -169,8 +208,8 @@ function initTable() {
|
|||
},
|
||||
{
|
||||
field: "dispatchNum",
|
||||
width: '6%',
|
||||
title: "派车数量",
|
||||
width: '3.9%',
|
||||
title: "数量",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
|
|
@ -183,7 +222,7 @@ function initTable() {
|
|||
},
|
||||
{
|
||||
field: "auditStatus",
|
||||
width: '7%',
|
||||
width: '6.9%',
|
||||
title: "到货确认单",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
|
|
@ -193,7 +232,7 @@ function initTable() {
|
|||
},
|
||||
{
|
||||
field: "fileStatus",
|
||||
width: '6%',
|
||||
width: '4.9%',
|
||||
title: "状态",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
|
|
@ -208,10 +247,10 @@ function initTable() {
|
|||
case '待审核':
|
||||
colorClass = 'layui-bg-orange'; // 橙色
|
||||
break;
|
||||
case '审核通过':
|
||||
case '已通过':
|
||||
colorClass = 'layui-bg-green'; // 绿色
|
||||
break;
|
||||
case '审核驳回':
|
||||
case '已驳回':
|
||||
colorClass = 'layui-bg-red'; // 红色
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -26,6 +26,12 @@
|
|||
class="layui-input" lay-affix="clear" placeholder="输入关键字" maxlength="30">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline" style="width: 300px;">
|
||||
<select class="layui-select" name="supId" id="supId" lay-verify="required">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<button class="layui-btn layui-bg-blue" onclick="queryTable(1)"><i
|
||||
class="layui-icon"></i> 搜 索</button>
|
||||
|
|
@ -44,10 +50,12 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="../../lib/jquery-3.4.1/jquery-3.4.1.min.js" charset="utf-8"></script>
|
||||
<script src="../../js/aes.js" charset="utf-8"></script>
|
||||
<script src="../../js/public.js" charset="utf-8"></script>
|
||||
<script src="../../js/jQuery.print.js" charset="utf-8"></script>
|
||||
<script src="../../lib/layui-v2.9.18/layui/layui.js" charset="utf-8"></script>
|
||||
<script src="../../js/car_demand_plan/arrival_confirm_list.js" charset="utf-8"></script>
|
||||
<script src="../../js/openIframe.js" charset="utf-8"></script>
|
||||
<script src="../../js/car_demand_plan/arrival_confirm_list.js" charset="utf-8"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Loading…
Reference in New Issue