维保查询未完成

master
rdpnr_hemingxia 2025-04-23 11:55:11 +08:00
parent a044272f5c
commit 2cfe2069bc
6 changed files with 156 additions and 22 deletions

View File

@ -11,9 +11,9 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label is-required">关联合同:</label> <label class="col-sm-4 control-label is-required">关联合同:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select name="orderId" class="form-control" required> <input style="display: none" name="orderId" class="form-control" readonly type="text" required>
<input name="orderName" class="form-control" readonly type="text" onclick="openList()" required>
</select>
</div> </div>
</div> </div>
</div> </div>
@ -128,20 +128,19 @@
focusCleanup: true focusCleanup: true
}); });
$(function (){ $(function (){
getOrderList()
}) })
function getOrderList() { // function getOrderList() {
$.operate.post(prefixOrder + "/list",{isTable:0}, function (res){ // $.operate.post(prefixOrder + "/list",{isTable:0}, function (res){
orderList=res.rows // orderList=res.rows
$("[name='orderId']").html( // $("[name='orderId']").html(
orderList.map((ele)=>{ // orderList.map((ele)=>{
return `<option value="${ele.id}">${ele.orderName}</option>` // return `<option value="${ele.id}">${ele.orderName}</option>`
}).join('') // }).join('')
) // )
//
}) // })
} // }
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-delivery-add').serialize()); $.operate.save(prefix + "/add", $('#form-delivery-add').serialize());
@ -159,6 +158,18 @@ function getOrderList() {
minView: "month", minView: "month",
autoclose: true autoclose: true
}); });
function openList(id){
var options = {
title: "关联合同",
url: prefix + '/selectOrder',
skin: 'layui-layer-gray',
btn: false,
maxmin: false,
full: false,
index:1000
};
$.modal.openOptions(options)
}
</script> </script>
</body> </body>
</html> </html>

View File

@ -12,9 +12,9 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label is-required">关联合同:</label> <label class="col-sm-4 control-label is-required">关联合同:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select name="orderId" class="form-control" th:orderId="*{orderId}" required> <input style="display: none" th:orderId="*{orderId}" name="orderId" class="form-control" readonly type="text" required>
<input name="orderName" th:orderName="*{orderName}" class="form-control" readonly type="text" onclick="openList()" required>
</select>
</div> </div>
</div> </div>
</div> </div>
@ -128,17 +128,19 @@
focusCleanup: true focusCleanup: true
}); });
$(function (){ $(function (){
getOrderList() setTimeout( getOrderList(),500)
}) })
function getOrderList() { function getOrderList() {
$.operate.post(prefixOrder + "/list",{isTable:0}, function (res){ $.operate.post(prefixOrder + "/list",{isTable:0}, function (res){
orderList=res.rows orderList=res.rows
var orderId=$("[name='orderId']").attr('orderid') var orderId=$("[name='orderId']").attr('orderid')
$("[name='orderId']").html( orderList.forEach((ele)=>{
orderList.map((ele)=>{ if(ele.id==orderId){
return `<option value="${ele.id}" ${orderId==ele.id?'selected':''}>${ele.orderName}</option>` $("[name='orderName']").val(ele.orderName)
}).join('') $("[name='orderId']").val(ele.id)
) }
})
}) })
} }
@ -159,6 +161,18 @@
minView: "month", minView: "month",
autoclose: true autoclose: true
}); });
function openList(){
var options = {
title: "关联合同",
url: prefix + '/selectOrder',
skin: 'layui-layer-gray',
btn: false,
maxmin: false,
full: false,
index:1000
};
$.modal.openOptions(options)
}
</script> </script>
</body> </body>
</html> </html>

View File

@ -63,6 +63,10 @@ url: prefix + "/list",
field: 'productCode', field: 'productCode',
title: '产品编码' title: '产品编码'
}, },
{
field: 'model',
title: '产品型号'
},
{ {
field: 'serialNumber', field: 'serialNumber',
title: '产品序列号' title: '产品序列号'

View File

@ -0,0 +1,56 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('关联合同')" />
</head>
<body class="gray-bg">
<div class="col-sm-12 select-table table-striped" >
<table id="bootstrap-table"></table>
</div>
<th:block th:include="include :: footer" />
<script>
var prefixOrder = ctx + "manage/order";
$(function() {
var options = {
url: prefixOrder + "/list",
showSearch:false,
showColumns:false,
showToggle:false,
showPageGo:true,
params:{
},
onClickRow:function (row,event) {
$(parent[parent.length-2].document).find("input[name='orderId']").val(row.id)
$(parent[parent.length-2].document).find("input[name='orderName']").val(row.orderName)
$.modal.close();
},
columns: [{
checkbox: false,
},
{
field: 'id',
title: '主键',
},
{
field: 'orderCode',
title: '合同编号'
},
{
field: 'orderName',
title: '合同名称'
},
]
};
$.table.init(options);
});
</script>
</body>
</html>

View File

@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('关联合同')" />
</head>
<body class="gray-bg">
<div class="col-sm-12 select-table table-striped" >
<h2>查询结果</h2>
<h4 style="margin-top: 40px;">产品信息</h4>
<table>
<tr>
<th>硬件序列号</th>
<th>产品号</th>
<th>产品描述</th>
<th>产品线描述</th>
<th>区域</th>
</tr>
<tr>
<td>2131340A.CZ02300002M</td>
<td>313048.C</td>
<td>H3C Workspace 云桌面许可证</td>
<td>云产品</td>
<td>CN</td>
</tr>
</table>
</div>
<th:block th:include="include :: footer" />
<script>
$(function() {
getData()
});
function getData() {
$.operate.get("/system/product/query",{isTable:0}, function (res){
})
}
</script>
</body>
</html>

View File

@ -27,5 +27,9 @@
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common</artifactId> <artifactId>ruoyi-common</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
</dependencies> </dependencies>
</project> </project>