Compare commits

..

No commits in common. "7e47ffa2a3485dfe16dd729396f23ccbedaa94b3" and "326dfe58103f00ac2de3ccfe908174955d7c01d0" have entirely different histories.

4 changed files with 380 additions and 419 deletions

View File

@ -1,177 +1,177 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head> <head>
<th:block th:include="include :: header('新增发货记录')" /> <th:block th:include="include :: header('新增发货记录')" />
<th:block th:include="include :: datetimepicker-css" /> <th:block th:include="include :: datetimepicker-css" />
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-delivery-add"> <form class="form-horizontal m" id="form-delivery-add">
<div class="col-xs-6"> <div class="col-xs-6">
<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">
<div class="input-group"> <div class="input-group">
<input style="display: none" name="orderId" class="form-control" readonly type="text" required> <input style="display: none" name="orderId" class="form-control" readonly type="text" required>
<input name="orderName" class="form-control" type="text" onclick="selectOrder()" required> <input name="orderName" class="form-control" type="text" onclick="selectOrder()" required>
<span class="input-group-addon"><i class="fa fa-search"></i></span> <span class="input-group-addon"><i class="fa fa-search"></i></span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<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">
<input name="deliveryCode" class="form-control" type="text" required> <input name="deliveryCode" class="form-control" type="text" required>
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<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">
<div class="input-group date"> <div class="input-group date">
<input name="deliveryDate" class="form-control" placeholder="yyyy-MM-dd" type="text" required> <input name="deliveryDate" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<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="deliveryType" class="form-control" th:with="type=${@dict.getType('delivery_type')}" required> <select name="deliveryType" class="form-control" th:with="type=${@dict.getType('delivery_type')}" required>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select> </select>
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">物流公司:</label> <label class="col-sm-4 control-label">物流公司:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="logisticsCompany" class="form-control" type="text"> <input name="logisticsCompany" class="form-control" type="text">
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">物流单号:</label> <label class="col-sm-4 control-label">物流单号:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="logisticsCode" class="form-control" type="text"> <input name="logisticsCode" class="form-control" type="text">
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<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">
<input name="receiverName" class="form-control" type="text" required> <input name="receiverName" class="form-control" type="text" required>
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<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">
<input name="receiverPhone" class="form-control" type="text" required> <input name="receiverPhone" class="form-control" type="text" required>
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<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">
<input name="receiverAddress" class="form-control" type="text" required> <input name="receiverAddress" class="form-control" type="text" required>
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<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">
<div class="radio-box" th:each="dict : ${@dict.getType('delivery_status')}"> <div class="radio-box" th:each="dict : ${@dict.getType('delivery_status')}">
<input type="radio" th:id="${'deliveryStatus_' + dict.dictCode}" name="deliveryStatus" th:value="${dict.dictValue}" th:checked="${dict.default}" required> <input type="radio" th:id="${'deliveryStatus_' + dict.dictCode}" name="deliveryStatus" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
<label th:for="${'deliveryStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> <label th:for="${'deliveryStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">签收时间:</label> <label class="col-sm-4 control-label">签收时间:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group date"> <div class="input-group date">
<input name="signTime" class="form-control" placeholder="yyyy-MM-dd" type="text"> <input name="signTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">备注:</label> <label class="col-sm-4 control-label">备注:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<textarea name="remark" class="form-control"></textarea> <textarea name="remark" class="form-control"></textarea>
</div> </div>
</div> </div>
</div> </div>
</form> </form>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" /> <th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "manage/delivery" var prefix = ctx + "manage/delivery"
var prefixOrder = ctx + "manage/order"; var prefixOrder = ctx + "manage/order";
let orderList=[] let orderList=[]
$("#form-delivery-add").validate({ $("#form-delivery-add").validate({
focusCleanup: true focusCleanup: true
}); });
$(function (){ $(function (){
}) })
// 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());
} }
} }
$("input[name='deliveryDate']").datetimepicker({ $("input[name='deliveryDate']").datetimepicker({
format: "yyyy-mm-dd", format: "yyyy-mm-dd",
minView: "month", minView: "month",
autoclose: true autoclose: true
}); });
$("input[name='signTime']").datetimepicker({ $("input[name='signTime']").datetimepicker({
format: "yyyy-mm-dd", format: "yyyy-mm-dd",
minView: "month", minView: "month",
autoclose: true autoclose: true
}); });
function openList(id){ function selectOrder(id){
var options = { var options = {
title: "关联合同", title: "关联合同",
url: prefix + '/selectOrder', url: prefix + '/selectOrder',
skin: 'layui-layer-gray', skin: 'layui-layer-gray',
btn: false, btn: true,
maxmin: false, maxmin: false,
full: false, full: false,
index:1000 index:1000
}; };
$.modal.openOptions(options) $.modal.openOptions(options)
} }
</script> </script>
</body> </body>
</html> </html>

View File

@ -1,184 +1,180 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head> <head>
<th:block th:include="include :: header('修改发货记录')" /> <th:block th:include="include :: header('修改发货记录')" />
<th:block th:include="include :: datetimepicker-css" /> <th:block th:include="include :: datetimepicker-css" />
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-delivery-edit" th:object="${orderDelivery}"> <form class="form-horizontal m" id="form-delivery-edit" th:object="${orderDelivery}">
<input name="id" th:field="*{id}" type="hidden"> <input name="id" th:field="*{id}" type="hidden">
<div class="col-xs-6"> <div class="col-xs-6">
<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">
<div class="input-group"> <div class="input-group">
<input style="display: none" th:orderId="*{orderId}" name="orderId" class="form-control" readonly type="text" 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" type="text" onclick="selectOrder()" required> <input name="orderName" th:orderName="*{orderName}" class="form-control" type="text" onclick="selectOrder()" required>
<span class="input-group-addon"><i class="fa fa-search"></i></span> <span class="input-group-addon"><i class="fa fa-search"></i></span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<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">
<input name="deliveryCode" th:field="*{deliveryCode}" class="form-control" type="text" required> <input name="deliveryCode" th:field="*{deliveryCode}" class="form-control" type="text" required>
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<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">
<div class="input-group date"> <div class="input-group date">
<input name="deliveryDate" th:value="${#dates.format(orderDelivery.deliveryDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required> <input name="deliveryDate" th:value="${#dates.format(orderDelivery.deliveryDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<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="deliveryType" class="form-control" th:with="type=${@dict.getType('delivery_type')}" required> <select name="deliveryType" class="form-control" th:with="type=${@dict.getType('delivery_type')}" required>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{deliveryType}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{deliveryType}"></option>
</select> </select>
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">物流公司:</label> <label class="col-sm-4 control-label">物流公司:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="logisticsCompany" th:field="*{logisticsCompany}" class="form-control" type="text"> <input name="logisticsCompany" th:field="*{logisticsCompany}" class="form-control" type="text">
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">物流单号:</label> <label class="col-sm-4 control-label">物流单号:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="logisticsCode" th:field="*{logisticsCode}" class="form-control" type="text"> <input name="logisticsCode" th:field="*{logisticsCode}" class="form-control" type="text">
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<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">
<input name="receiverName" th:field="*{receiverName}" class="form-control" type="text" required> <input name="receiverName" th:field="*{receiverName}" class="form-control" type="text" required>
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<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">
<input name="receiverPhone" th:field="*{receiverPhone}" class="form-control" type="text" required> <input name="receiverPhone" th:field="*{receiverPhone}" class="form-control" type="text" required>
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<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">
<input name="receiverAddress" th:field="*{receiverAddress}" class="form-control" type="text" required> <input name="receiverAddress" th:field="*{receiverAddress}" class="form-control" type="text" required>
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<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">
<div class="radio-box" th:each="dict : ${@dict.getType('delivery_status')}"> <div class="radio-box" th:each="dict : ${@dict.getType('delivery_status')}">
<input type="radio" th:id="${'deliveryStatus_' + dict.dictCode}" name="deliveryStatus" th:value="${dict.dictValue}" th:field="*{deliveryStatus}" required> <input type="radio" th:id="${'deliveryStatus_' + dict.dictCode}" name="deliveryStatus" th:value="${dict.dictValue}" th:field="*{deliveryStatus}" required>
<label th:for="${'deliveryStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> <label th:for="${'deliveryStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">签收时间:</label> <label class="col-sm-4 control-label">签收时间:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group date"> <div class="input-group date">
<input name="signTime" th:value="${#dates.format(orderDelivery.signTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> <input name="signTime" th:value="${#dates.format(orderDelivery.signTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">备注:</label> <label class="col-sm-4 control-label">备注:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<textarea name="remark" class="form-control">[[*{remark}]]</textarea> <textarea name="remark" class="form-control">[[*{remark}]]</textarea>
</div> </div>
</div> </div>
</div> </div>
</form> </form>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" /> <th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "manage/delivery"; var prefix = ctx + "manage/delivery";
var prefixOrder = ctx + "manage/order"; var prefixOrder = ctx + "manage/order";
$("#form-delivery-edit").validate({ $("#form-delivery-edit").validate({
focusCleanup: true focusCleanup: true
}); });
$(function (){ $(function (){
setTimeout( getOrderList(),500) 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')
orderList.forEach((ele)=>{ orderList.forEach((ele)=>{
if(ele.id==orderId){ if(ele.id==orderId){
$("[name='orderName']").val(ele.orderName) $("[name='orderName']").val(ele.orderName)
$("[name='orderId']").val(ele.id) $("[name='orderId']").val(ele.id)
} }
}) })
}) })
} }
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-delivery-edit').serialize()); $.operate.save(prefix + "/edit", $('#form-delivery-edit').serialize());
} }
} }
$("input[name='deliveryDate']").datetimepicker({ $("input[name='deliveryDate']").datetimepicker({
format: "yyyy-mm-dd", format: "yyyy-mm-dd",
minView: "month", minView: "month",
autoclose: true autoclose: true
}); });
$("input[name='signTime']").datetimepicker({ $("input[name='signTime']").datetimepicker({
format: "yyyy-mm-dd", format: "yyyy-mm-dd",
minView: "month", minView: "month",
autoclose: true autoclose: true
}); });
function openList(){ function selectOrder(){
var options = { var options = {
title: "关联合同", title: "关联合同",
url: prefix + '/selectOrder', url: prefix + '/selectOrder',
skin: 'layui-layer-gray', skin: 'layui-layer-gray',
btn: true, btn: true,
btn: ['关闭'], maxmin: false,
yes:function(index){ full: false,
$.modal.close(index) index:1000
}, };
maxmin: false, $.modal.openOptions(options)
full: false, }
index:1000 </script>
}; </body>
$.modal.openOptions(options)
}
</script>
</body>
</html> </html>

View File

@ -4,48 +4,12 @@
<th:block th:include="include :: header('关联合同')" /> <th:block th:include="include :: header('关联合同')" />
</head> </head>
<body class="gray-bg"> <body class="gray-bg">
<div class="col-sm-12 select-table table-striped" >
<div>
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>合同编号:</label>
<input type="text" name="orderCode"/>
</li>
<li>
<label>合同名称:</label>
<input type="text" name="orderName"/>
</li>
<li>
<label>客户名称:</label>
<input type="text" name="customerName"/>
</li>
<li>
<label>合同类型:</label>
<select name="orderType" th:with="type=${@dict.getType('order_type')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<table id="bootstrap-table"></table>
</div>
<div class="col-sm-12 select-table table-striped" > <div class="col-sm-12 select-table table-striped" >
<table id="bootstrap-table"></table> <table id="bootstrap-table"></table>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<script> <script>
var prefixOrder = ctx + "manage/order"; var prefixOrder = ctx + "manage/order";
$(function() { $(function() {
@ -54,8 +18,6 @@
showSearch:false, showSearch:false,
showColumns:false, showColumns:false,
showToggle:false, showToggle:false,
showRefresh:false,
showPageGo:true, showPageGo:true,
params:{ params:{

View File

@ -12,7 +12,7 @@
.container { .container {
/*width: 100%;*/ /*width: 100%;*/
margin: 0; margin: 0;
padding: 10px 0; padding: 20px 0;
background-color: white; background-color: white;
border-radius: 8px; border-radius: 8px;
display: flex; display: flex;
@ -62,7 +62,7 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
gap: 20px; gap: 20px;
margin: 30px 0 10px; margin: 20px 0;
align-items: center; align-items: center;
} }
.topBox .title{ .topBox .title{
@ -77,10 +77,10 @@
background: #ccc; background: #ccc;
} }
.table-striped thead th{ .table-striped thead th{
padding: 10px; padding: 8px;
} }
.table-striped tbody td{ .table-striped tbody td{
padding: 10px; padding: 8px;
} }
.tabBtn{ .tabBtn{
display: inline-block; display: inline-block;
@ -92,23 +92,24 @@
<body class="gray-bg"> <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="topBox">
<div class="title">单条查询 <span>(不支持第三方信息查询)</span></div> <div class="title">单条查询</div>
<!-- <div style="color: #dd242a">H3C产品保修条款</div>--> <div style="color: #dd242a">H3C产品保修条款</div>
</div> </div>
<p>(不支持第三方信息查询)</p>
<div class="container"> <div class="container">
<div class="form-group"> <div class="form-group">
<label for="serialNumber">序列号</label> <label for="serialNumber">序列号</label>
<input type="text" id="serialNumber" placeholder="请输入序列号"> <input type="text" id="serialNumber" placeholder="请输入序列号">
</div> </div>
<!-- <div class="form-group">--> <div class="form-group">
<!-- <label for="productCode">产品号</label>--> <label for="productCode">产品号</label>
<!-- <input type="text" id="productCode" placeholder="请输入产品号">--> <input type="text" id="productCode" placeholder="请输入产品号">
<!-- </div>--> </div>
<button type="button" onclick="getData()">查询</button> <button type="button" onclick="getData()">查询</button>
</div> </div>
<div style="font-size: 20px;text-align: left;width: 70vw;margin: 10px 0">查询结果</div> <h2>查询结果</h2>
<div style="font-size: 16px;text-align: left;width: 70vw;font-weight: 600;">产品信息</div> <h4 style="margin-top: 20px;">产品信息</h4>
<table class="tableBOx" id="tableBOx"> <table class="tableBOx" id="tableBOx">
<thead> <thead>
<tr> <tr>
@ -125,7 +126,7 @@
<div > <div >
<div style="margin: 20px 0;"> <div style="margin: 20px 0;">
<span id="btn1" class="tabBtn" onclick="changeTab(0)" style="background: #dd242a;color: #fff">合同</span> <span id="btn1" class="tabBtn" onclick="changeTab(0)" style="background: #dd242a;color: #fff">合同</span>
<span id="btn2" class="tabBtn" onclick="changeTab(1)">标准保修</span> <!-- <span id="btn2" class="tabBtn" onclick="changeTab(1)">标准保修</span>-->
</div> </div>
<table class="tableBOx" id="tableBOx2"> <table class="tableBOx" id="tableBOx2">
<thead> <thead>
@ -148,11 +149,11 @@
<table class="tableBOx" id="tableBOx3" style="display: none"> <table class="tableBOx" id="tableBOx3" style="display: none">
<thead> <thead>
<tr> <tr>
<th>服务项</th> <th>硬件序列号</th>
<th>服务项描述</th> <th>产品号</th>
<th>开始时间</th> <th>产品描述</th>
<th>结束时间</th> <th>产品线描述</th>
<th>状态</th> <th>区域</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -169,7 +170,9 @@
}); });
function getData() { function getData() {
let serialNumber=$('#serialNumber').val() let serialNumber=$('#serialNumber').val()
$.operate.get(`/system/product/product=${serialNumber}`, function (res){ let productCode=$('#productCode').val()
$.operate.get(`/system/product/query?productCode=${productCode}&serialNumber=${serialNumber}`, function (res){
let str=`<tr><td colspan="5" style="text-align: center">暂无数据</td></tr>` let str=`<tr><td colspan="5" style="text-align: center">暂无数据</td></tr>`
if(res.data.length){ if(res.data.length){
str=`` str=``
@ -185,14 +188,14 @@ let serialNumber=$('#serialNumber').val()
} }
$('#tableBOx tbody').html(str) $('#tableBOx tbody').html(str)
}) })
$.operate.get(`/manage/service/order=${serialNumber}`, function (res){ $.operate.get(`/manage/order/query?productCode=${productCode}&serialNumber=${serialNumber}`, function (res){
let str=`<tr><td colspan="9" style="text-align: center">暂无数据</td></tr>` let str=`<tr><td colspan="9" style="text-align: center">暂无数据</td></tr>`
if(res.data.length){ if(res.data.length){
str=`` str=``
res.data.forEach((ele)=>{ res.data.forEach((ele)=>{
str+=`<tr> str+=`<tr>
<td></td> <td></td>
<td>${ele.orderType == 'zq' ? '直签合同' : '代理合同'}</td> <td>${ele.orderType=='zq'?'直签合同':'代理合同'}</td>
<td></td> <td></td>
<td></td> <td></td>
<td></td> <td></td>
@ -200,7 +203,7 @@ let serialNumber=$('#serialNumber').val()
<td>${ele.createdAt}</td> <td>${ele.createdAt}</td>
<td></td> <td></td>
<td>${ele.statua == 0 ? '有效' : '无效'}</td> <td>${ele.statua==0?'有效':'无效'}</td>
</tr>` </tr>`
}) })