问题修复

This commit is contained in:
hayu 2025-07-16 17:04:38 +08:00
parent ba8085e957
commit 58dcd1ab70
2 changed files with 59 additions and 12 deletions

View File

@ -10,9 +10,39 @@ layui.use(["form", "table", 'laydate'], function () {
range: ['#startDay', '#endDay'], range: ['#startDay', '#endDay'],
rangeLinked: true rangeLinked: true
}); });
getSupList();
initTable(); 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) { function queryTable(type) {
if (type === 1) { if (type === 1) {
@ -44,6 +74,7 @@ function reloadTable(pageNum) {
where: { where: {
encryptedData: JSON.stringify({ encryptedData: JSON.stringify({
'keyWord': $('#keyWord').val(), 'keyWord': $('#keyWord').val(),
'supId': $('#supId').val(),
}), }),
}, },
}, },
@ -63,6 +94,7 @@ function initTable() {
where: { where: {
encryptedData: JSON.stringify({ encryptedData: JSON.stringify({
'keyWord': $('#keyWord').val(), 'keyWord': $('#keyWord').val(),
'supId': $('#supId').val(),
}), }),
}, },
request: { request: {
@ -90,6 +122,13 @@ function initTable() {
return d.LAY_NUM; return d.LAY_NUM;
}, },
}, },
{
field: "supName",
width: '8%',
title: "供应商",
unresize: true,
align: "center",
},
{ {
field: "proName", field: "proName",
width: '11%', width: '11%',
@ -99,7 +138,7 @@ function initTable() {
}, },
{ {
field: "type", field: "type",
width: '4%', width: '3.9%',
title: "类型", title: "类型",
unresize: true, unresize: true,
align: "center", align: "center",
@ -116,7 +155,7 @@ function initTable() {
}, },
{ {
field: "code", field: "code",
width: '8.5%', width: '8.2%',
title: "需求计划编号", title: "需求计划编号",
unresize: true, unresize: true,
align: "center", align: "center",
@ -126,14 +165,14 @@ function initTable() {
}, },
{ {
field: "userName", field: "userName",
width: '7.1%', width: '6.1%',
title: "申请人", title: "申请人",
unresize: true, unresize: true,
align: "center", align: "center",
}, },
{ {
field: "appLyTime", field: "appLyTime",
width: '10%', width: '8%',
title: "申请时间", title: "申请时间",
unresize: true, unresize: true,
align: "center", align: "center",
@ -141,7 +180,7 @@ function initTable() {
}, },
{ {
field: "remark", field: "remark",
width: '10.5%', width: '9.5%',
title: "备注", title: "备注",
unresize: true, unresize: true,
align: "center", align: "center",
@ -169,8 +208,8 @@ function initTable() {
}, },
{ {
field: "dispatchNum", field: "dispatchNum",
width: '6%', width: '3.9%',
title: "派车数量", title: "数量",
unresize: true, unresize: true,
align: "center", align: "center",
}, },
@ -183,7 +222,7 @@ function initTable() {
}, },
{ {
field: "auditStatus", field: "auditStatus",
width: '7%', width: '6.9%',
title: "到货确认单", title: "到货确认单",
unresize: true, unresize: true,
align: "center", align: "center",
@ -193,7 +232,7 @@ function initTable() {
}, },
{ {
field: "fileStatus", field: "fileStatus",
width: '6%', width: '4.9%',
title: "状态", title: "状态",
unresize: true, unresize: true,
align: "center", align: "center",
@ -208,10 +247,10 @@ function initTable() {
case '待审核': case '待审核':
colorClass = 'layui-bg-orange'; // 橙色 colorClass = 'layui-bg-orange'; // 橙色
break; break;
case '审核通过': case '通过':
colorClass = 'layui-bg-green'; // 绿色 colorClass = 'layui-bg-green'; // 绿色
break; break;
case '审核驳回': case '驳回':
colorClass = 'layui-bg-red'; // 红色 colorClass = 'layui-bg-red'; // 红色
break; break;
default: default:

View File

@ -26,6 +26,12 @@
class="layui-input" lay-affix="clear" placeholder="输入关键字" maxlength="30"> class="layui-input" lay-affix="clear" placeholder="输入关键字" maxlength="30">
</div> </div>
</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"> <div class="layui-inline">
<button class="layui-btn layui-bg-blue" onclick="queryTable(1)"><i <button class="layui-btn layui-bg-blue" onclick="queryTable(1)"><i
class="layui-icon"></i> 搜 索</button> class="layui-icon"></i> 搜 索</button>
@ -44,10 +50,12 @@
</div> </div>
</div> </div>
<script src="../../lib/jquery-3.4.1/jquery-3.4.1.min.js" charset="utf-8"></script> <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/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="../../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/openIframe.js" charset="utf-8"></script>
<script src="../../js/car_demand_plan/arrival_confirm_list.js" charset="utf-8"></script>
</body> </body>
</html> </html>