修改了部分样式
commit
97410847dc
|
@ -6,7 +6,11 @@ spring:
|
|||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
<<<<<<< HEAD
|
||||
url: jdbc:mysql://121.199.168.157:3306/unis_pms?useUnicode=true&rewriteBatchedStatements=true&allowMultiQueries=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
=======
|
||||
url: jdbc:mysql://121.199.168.157:3306/unis_pms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&allowMultiQueries=true
|
||||
>>>>>>> 86c13c73368897b23df2c463fbe3202d994b8609
|
||||
username: root
|
||||
password: unis@db
|
||||
# 从库数据源
|
||||
|
|
|
@ -1,28 +1,165 @@
|
|||
<!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('关联合同')" />
|
||||
<th:block th:include="include :: header('维保查询')" />
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
.container {
|
||||
/*width: 100%;*/
|
||||
margin: 0;
|
||||
padding: 20px 0;
|
||||
background-color: white;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 30px;
|
||||
justify-content: center;
|
||||
}
|
||||
h1 {
|
||||
text-align: center;
|
||||
color: #e74c3c;
|
||||
}
|
||||
.form-group {
|
||||
margin-bottom: 15px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
.tableBOx{
|
||||
width:70vw;
|
||||
}
|
||||
label {
|
||||
margin-bottom: 0;
|
||||
width: 80px;
|
||||
|
||||
}
|
||||
input[type="text"] {
|
||||
width: 100%;
|
||||
padding:5px 10px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
}
|
||||
button {
|
||||
width:100px;
|
||||
padding:0;
|
||||
height: 30px;
|
||||
background-color: #e74c3c;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
button:hover {
|
||||
background-color: #c0392b;
|
||||
}
|
||||
.topBox{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 20px;
|
||||
margin: 20px 0;
|
||||
align-items: center;
|
||||
}
|
||||
.topBox .title{
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.table-striped {
|
||||
display: flex;justify-content: flex-start;flex-direction: column;align-items: center
|
||||
}
|
||||
.table-striped thead{
|
||||
background: #ccc;
|
||||
}
|
||||
.table-striped thead th{
|
||||
padding: 8px;
|
||||
}
|
||||
.table-striped tbody td{
|
||||
padding: 8px;
|
||||
}
|
||||
.tabBtn{
|
||||
display: inline-block;
|
||||
padding: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="col-sm-12 select-table table-striped" >
|
||||
<div class="col-sm-12 select-table table-striped" >
|
||||
<div class="topBox">
|
||||
<div class="title">单条查询</div>
|
||||
<div style="color: #dd242a">H3C产品保修条款</div>
|
||||
</div>
|
||||
<p>(不支持第三方信息查询)</p>
|
||||
<div class="container">
|
||||
<div class="form-group">
|
||||
<label for="serialNumber">序列号</label>
|
||||
<input type="text" id="serialNumber" placeholder="请输入序列号">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="productCode">产品号</label>
|
||||
<input type="text" id="productCode" placeholder="请输入产品号">
|
||||
</div>
|
||||
<button type="button" onclick="getData()">查询</button>
|
||||
|
||||
</div>
|
||||
<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>
|
||||
<h4 style="margin-top: 20px;">产品信息</h4>
|
||||
<table class="tableBOx" id="tableBOx">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>硬件序列号</th>
|
||||
<th>产品号</th>
|
||||
<th>产品描述</th>
|
||||
<th>产品线描述</th>
|
||||
<th>区域</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div >
|
||||
<div style="margin: 20px 0;">
|
||||
<span id="btn1" class="tabBtn" onclick="changeTab(0)" style="background: #dd242a;color: #fff">合同</span>
|
||||
<!-- <span id="btn2" class="tabBtn" onclick="changeTab(1)">标准保修</span>-->
|
||||
</div>
|
||||
<table class="tableBOx" id="tableBOx2">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>服务项目识别号</th>
|
||||
<th>合同类型</th>
|
||||
<th>服务级别</th>
|
||||
<th>服务级别描述</th>
|
||||
<th>服务项</th>
|
||||
<th>服务项描述</th>
|
||||
<th>开始时间</th>
|
||||
<th>结束时间</th>
|
||||
<th>状态</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="tableBOx" id="tableBOx3" style="display: none">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>硬件序列号</th>
|
||||
<th>产品号</th>
|
||||
<th>产品描述</th>
|
||||
<th>产品线描述</th>
|
||||
<th>区域</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
|
||||
|
@ -32,10 +169,63 @@
|
|||
getData()
|
||||
});
|
||||
function getData() {
|
||||
let serialNumber=$('#serialNumber').val()
|
||||
let productCode=$('#productCode').val()
|
||||
|
||||
$.operate.get("/system/product/query",{isTable:0}, function (res){
|
||||
|
||||
$.operate.get(`/system/product/query?productCode=${productCode}&serialNumber=${serialNumber}`, function (res){
|
||||
let str=`<tr><td colspan="5" style="text-align: center">暂无数据</td></tr>`
|
||||
if(res.data.length){
|
||||
str=``
|
||||
res.data.forEach((ele)=>{
|
||||
str+=`<tr>
|
||||
<td>${ele.serialNumber}</td>
|
||||
<td>${ele.model}</td>
|
||||
<td>${ele.description}</td>
|
||||
<td>${ele.productName}</td>
|
||||
<td>${ele.model}</td>
|
||||
</tr>`
|
||||
})
|
||||
}
|
||||
$('#tableBOx tbody').html(str)
|
||||
})
|
||||
$.operate.get(`/manage/order/query?productCode=${productCode}&serialNumber=${serialNumber}`, function (res){
|
||||
let str=`<tr><td colspan="9" style="text-align: center">暂无数据</td></tr>`
|
||||
if(res.data.length){
|
||||
str=``
|
||||
res.data.forEach((ele)=>{
|
||||
str+=`<tr>
|
||||
<td></td>
|
||||
<td>${ele.orderType=='zq'?'直签合同':'代理合同'}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>${ele.createdAt}</td>
|
||||
<td></td>
|
||||
|
||||
<td>${ele.statua==0?'有效':'无效'}</td>
|
||||
|
||||
</tr>`
|
||||
})
|
||||
}
|
||||
$('#tableBOx2 tbody').html(str)
|
||||
})
|
||||
}
|
||||
function changeTab(show) {
|
||||
if(!show){
|
||||
$('#btn1').css({'background': '#dd242a','color':'#fff'})
|
||||
$('#btn2').css({'background': '#fff','color':'#333'})
|
||||
|
||||
$('#tableBOx2').show()
|
||||
$('#tableBOx3').hide()
|
||||
}else{
|
||||
$('#tableBOx3').show()
|
||||
$('#tableBOx2').hide()
|
||||
$('#btn2').css({'background': '#dd242a','color':'#fff'})
|
||||
$('#btn1').css({'background': '#fff','color':'#333'})
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@ package com.ruoyi.sip.domain;
|
|||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
|
@ -13,6 +15,8 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
|||
* @author mula
|
||||
* @date 2025-04-11
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ProductInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
@ -46,99 +50,6 @@ public class ProductInfo extends BaseEntity
|
|||
|
||||
/** 删除时间 */
|
||||
private Date deletedAt;
|
||||
private String serialNumber;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setProductCode(String productCode)
|
||||
{
|
||||
this.productCode = productCode;
|
||||
}
|
||||
|
||||
public String getProductCode()
|
||||
{
|
||||
return productCode;
|
||||
}
|
||||
|
||||
public void setProductName(String productName)
|
||||
{
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public String getProductName()
|
||||
{
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setModel(String model)
|
||||
{
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
public String getModel()
|
||||
{
|
||||
return model;
|
||||
}
|
||||
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setCreatedAt(Date createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Date getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setUpdatedAt(Date updatedAt)
|
||||
{
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public Date getUpdatedAt()
|
||||
{
|
||||
return updatedAt;
|
||||
}
|
||||
|
||||
public void setDeletedAt(Date deletedAt)
|
||||
{
|
||||
this.deletedAt = deletedAt;
|
||||
}
|
||||
|
||||
public Date getDeletedAt()
|
||||
{
|
||||
return deletedAt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("productCode", getProductCode())
|
||||
.append("productName", getProductName())
|
||||
.append("model", getModel())
|
||||
.append("description", getDescription())
|
||||
.append("remark", getRemark())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.append("deletedAt", getDeletedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,13 +43,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</foreach>
|
||||
</select>
|
||||
<select id="query" resultType="com.ruoyi.sip.domain.ProductInfo">
|
||||
<include refid="selectProductInfoVo"/>
|
||||
SELECT
|
||||
t1.id,
|
||||
t1.product_code,
|
||||
t1.product_name,
|
||||
t1.model,
|
||||
t1.description,
|
||||
t1.remark,
|
||||
t1.created_at,
|
||||
t1.updated_at,
|
||||
t1.deleted_at ,
|
||||
t2.serial_number
|
||||
FROM
|
||||
product_info t1 left join delivery_list t2 on t1.product_code=t2.product_code
|
||||
<where>
|
||||
<if test="serialNumber!=null and serialNumber!=''">
|
||||
and product_code in (select product_code from delivery_list where serial_number=#{serialNumber})
|
||||
and t2.serial_number=#{serialNumber}
|
||||
</if>
|
||||
<if test="productCode!=null and productCode!=''">
|
||||
and product_code=#{productCode}
|
||||
and t1.product_code=#{productCode}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
|
Loading…
Reference in New Issue