Browse Source

[fix]

售后管理 出货设备
修改出货设备列表页面搜索栏字段顺序,修改表格定义,补充字段,修改顺序,添加列居中样式;
修改编辑出货设备页面,修改表单字段,新增问题列表表格及定义,新增导入模块及导入处理方法;
修改出货设备详情页面,修改表单字段,新增问题列表表格显示;
dev
王晓迪 3 months ago
parent
commit
3076e0d148
  1. 159
      ruoyi-admin/src/main/resources/templates/aftersales/shippingDevice/detail.html
  2. 251
      ruoyi-admin/src/main/resources/templates/aftersales/shippingDevice/edit.html
  3. 149
      ruoyi-admin/src/main/resources/templates/aftersales/shippingDevice/shippingDevice.html

159
ruoyi-admin/src/main/resources/templates/aftersales/shippingDevice/detail.html

@ -4,6 +4,24 @@
<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>
<style>
.fixed-table-container {
border: 0px solid #ddd;
min-height: 200px;
}
.bordered-container {
/* 自动高度,根据内容自动调整 */
min-height: 0; /* 确保高度能收缩至内容高度 */
/* 自动宽度,对于块级元素已经是默认行为,但如果你想强调这一点或针对特定情况,可以显式声明 */
width: auto;
height: auto;
border: 1px dashed blue; /* 灰色边框,可根据需要调整颜色 */
/* 以下可选,根据需要添加,用于控制内外边距和布局 */
padding: 1rem;
box-sizing: border-box; /* 包含边框和内边距在宽度计算中 */
margin-bottom: 20px;
}
</style>
<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-shippingDevice-edit" th:object="${afterSalesShippingDeviceDto}"> <form class="form-horizontal m" id="form-shippingDevice-edit" th:object="${afterSalesShippingDeviceDto}">
@ -41,13 +59,20 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">物料类型:</label> <label class="col-sm-3 control-label">物料类型:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="materialType" th:field="*{materialType}" class="form-control" type="text" disabled> <select disabled id="selectMaterialType" class="form-control m-b select2-multiple" th:field="*{materialType}" th:with="childList=${@category.getChildByCode('materialType')}">
<optgroup>
<option value="">请选择</option>
</optgroup>
<optgroup th:each="child: ${childList}" th:label="${child.name}">
<option th:each="childSon: ${child.children}" th:value="${childSon.code}" th:text="${#strings.concat(child.name,'-',childSon.name)}"></option>
</optgroup>
</select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">物料类别:</label> <label class="col-sm-3 control-label">物料型号</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="materialClass" th:field="*{materialClass}" class="form-control" type="text" disabled> <input readonly name="materialModel" th:field="*{materialModel}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -75,7 +100,7 @@
<hr> <hr>
<form class="form-horizontal m" id="form-customer-edit" th:object="${customerDto}"> <form class="form-horizontal m" id="form-customer-edit" th:object="${customerDto}">
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">客户ID:</label> <label class="col-sm-3 control-label is-required">客户ID:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" required disabled> <input name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" required disabled>
</div> </div>
@ -86,61 +111,60 @@
<input name="enterpriseName" th:field="*{enterpriseName}" class="form-control" type="text" required disabled> <input name="enterpriseName" th:field="*{enterpriseName}" class="form-control" type="text" required disabled>
</div> </div>
</div> </div>
<div class="form-group" > </form>
<label class="col-sm-3 control-label is-required is-required" >客户联系人:</label>
<div class="col-sm-8">
<input name="customerContact" th:field="*{customerContact}" class="form-control" type="text" required disabled>
</div>
</div> </div>
<!--生产信息-->
<div class="mb-4">
<h4 class="font-weight-bold">生产信息</h4>
<hr>
<form class="form-horizontal m" id="form-makeOrderDto-edit" th:object="${makeOrderDto}">
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">联系人电话:</label> <label class="col-sm-3 control-label">设备型号</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="contactNumber" th:field="*{contactNumber}" class="form-control" type="text" required disabled> <input name="deviceModelCode" th:field="*{deviceModelCode}" class="form-control" type="text" disabled>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">公司地址</label> <label class="col-sm-3 control-label is-required">追踪码</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="customerAddress" th:field="*{customerAddress}" class="form-control" type="text" disabled> <input name="deviceRunningNumber" th:field="*{deviceRunningNumber}" class="form-control" type="text" disabled>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">收货地址</label> <label class="col-sm-3 control-label">生产开始时间</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input required name="deliveryAddress" th:field="*{deliveryAddress}" class="form-control" type="text" disabled> <div class="input-group date">
<input disabled name="startMakeTime" th:value="${#dates.format(afterSalesShippingDeviceDto.startMakeTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
</form>
</div> </div>
<!--生产信息-->
<div class="mb-4">
<h4 class="font-weight-bold">生产信息</h4>
<hr>
<form class="form-horizontal m" id="form-makeOrderDto-edit" th:object="${makeOrderDto}">
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">设备型号</label> <label class="col-sm-3 control-label">生产结束时间:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="deviceModelCode" th:field="*{deviceModelCode}" class="form-control" type="number" required disabled> <div class="input-group date">
</div> <input disabled name="endMakeTime" th:value="${#dates.format(afterSalesShippingDeviceDto.endMakeTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">流水号:</label>
<div class="col-sm-8">
<input name="deviceRunningNumber" th:field="*{deviceRunningNumber}" class="form-control" type="number" required disabled>
</div> </div>
</div> </div>
<div class="form-group" > <div class="form-group" >
<label class="col-sm-3 control-label is-required is-required" >图片:</label> <label class="col-sm-3 control-label" >图片:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="makePhotoUrl" th:field="*{makePhotoUrl}" class="form-control" type="text" required disabled> <input name="makePhotoUrl" th:field="*{makePhotoUrl}" class="form-control" type="text" required disabled>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">生产员:</label> <label class="col-sm-3 control-label">生产员:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="makeName" th:field="*{makeName}" class="form-control" type="text" required disabled> <input name="makeName" th:field="*{makeName}" class="form-control" type="text" required disabled>
</div> </div>
</div> </div>
<div class="row" style="width: 1300px;margin-left: 80px;">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-processRecord-table"></table>
</div>
</div>
</form> </form>
</div> </div>
@ -238,28 +262,59 @@
focusCleanup: true focusCleanup: true
}); });
function submitHandler() { $(function() {
if ($.validate.form()) { var options = {
id: "bootstrap-processRecord-table",
// 获取表单数据 url: prefix + "/showRecords",
const shippingDeviceData = $("#form-shippingDevice-edit").serializeArray(); importTemplateUrl: prefix + "/importTemplate",
console.log(shippingDeviceData); modalName: "工序问题记录",
const customerData = $("#form-customer-edit").serializeArray(); pagination: false,
const makeOrderData= $("#form-makeOrderDto-edit").serializeArray(); showSearch: false,
showRefresh: false,
const warehouseAndAfterSalesData= $("#form-warehouseAndAfterSalesDto-edit").serializeArray(); showToggle: false,
showColumns: false,
// 合并表单数据为一个 JSON 对象 height: 40,
const combinedData = shippingDeviceData.concat(customerData, makeOrderData,warehouseAndAfterSalesData).reduce((acc, curr) => { queryParams: {
acc[curr.name] = curr.value; shippingDeviceId: $("#shippingDeviceId").val(),
return acc; serialNo: $("#deviceRunningNumber").val()
}, {}); },
// 使用 JSON.stringify() 序列化数据 columns: [
const jsonData = JSON.stringify(combinedData); {
// 发送 AJAX 请求到后端接口 field: 'process',
$.operate.saveJson(prefix + "/detail", jsonData); title: '工序',
} },
} {
field: 'abnormalTime',
title: '异常时间'
},
{
field: 'questionDescribe',
title: '问题描述'
},
{
field: 'solution',
title: '解决办法'
},
{
field: 'resolveTime',
title: '解决时间'
},
{
field: 'createBy',
title: '记录人'
},
{
field: 'approveBy',
title: '审核人'
},
{
field: 'remark',
title: '备注'
},
]
};
$.table.init(options);
});
$("input[name='factoryDate']").datetimepicker({ $("input[name='factoryDate']").datetimepicker({
format: "yyyy-mm-dd", format: "yyyy-mm-dd",

251
ruoyi-admin/src/main/resources/templates/aftersales/shippingDevice/edit.html

@ -4,6 +4,24 @@
<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>
<style>
.fixed-table-container {
border: 0px solid #ddd;
min-height: 200px;
}
.bordered-container {
/* 自动高度,根据内容自动调整 */
min-height: 0; /* 确保高度能收缩至内容高度 */
/* 自动宽度,对于块级元素已经是默认行为,但如果你想强调这一点或针对特定情况,可以显式声明 */
width: auto;
height: auto;
border: 1px dashed blue; /* 灰色边框,可根据需要调整颜色 */
/* 以下可选,根据需要添加,用于控制内外边距和布局 */
padding: 1rem;
box-sizing: border-box; /* 包含边框和内边距在宽度计算中 */
margin-bottom: 20px;
}
</style>
<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-shippingDevice-edit" th:object="${afterSalesShippingDeviceDto}"> <form class="form-horizontal m" id="form-shippingDevice-edit" th:object="${afterSalesShippingDeviceDto}">
@ -11,61 +29,68 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">出货设备id:</label> <label class="col-sm-3 control-label is-required">出货设备id:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="shippingDeviceId" th:field="*{shippingDeviceId}" class="form-control" type="text" required> <input readonly name="shippingDeviceId" id="shippingDeviceId" th:field="*{shippingDeviceId}" class="form-control" type="text" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">关联单号:</label> <label class="col-sm-3 control-label">关联单号:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="makeNo" th:field="*{makeNo}" class="form-control" type="text"> <input readonly name="makeNo" th:field="*{makeNo}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">料号:</label> <label class="col-sm-3 control-label">料号:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="materialNo" th:field="*{materialNo}" class="form-control" type="text"> <input readonly name="materialNo" th:field="*{materialNo}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">图片:</label> <label class="col-sm-3 control-label">图片:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="materialPhotourl" th:field="*{materialPhotourl}" class="form-control" type="text"> <input readonly name="materialPhotourl" th:field="*{materialPhotourl}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">物料名称:</label> <label class="col-sm-3 control-label">物料名称:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="materialName" th:field="*{materialName}" class="form-control" type="text"> <input readonly name="materialName" th:field="*{materialName}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">物料类型:</label> <label class="col-sm-3 control-label">物料类型:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="materialType" th:field="*{materialType}" class="form-control" type="text"> <select disabled id="selectMaterialType" class="form-control m-b select2-multiple" th:field="*{materialType}" th:with="childList=${@category.getChildByCode('materialType')}">
<optgroup>
<option value="">请选择</option>
</optgroup>
<optgroup th:each="child: ${childList}" th:label="${child.name}">
<option th:each="childSon: ${child.children}" th:value="${childSon.code}" th:text="${#strings.concat(child.name,'-',childSon.name)}"></option>
</optgroup>
</select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">物料类别:</label> <label class="col-sm-3 control-label">物料型号</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="materialClass" th:field="*{materialClass}" class="form-control" type="text"> <input readonly name="materialModel" th:field="*{materialModel}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">单位:</label> <label class="col-sm-3 control-label">单位:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="materialUnit" th:field="*{materialUnit}" class="form-control" type="text"> <input readonly name="materialUnit" th:field="*{materialUnit}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">物料品牌:</label> <label class="col-sm-3 control-label">物料品牌:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="materialBrand" th:field="*{materialBrand}" class="form-control" type="text"> <input readonly name="materialBrand" th:field="*{materialBrand}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">物料描述:</label> <label class="col-sm-3 control-label">物料描述:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<textarea name="materialDescribe" class="form-control">[[*{materialDescribe}]]</textarea> <textarea readonly name="materialDescribe" class="form-control">[[*{materialDescribe}]]</textarea>
</div> </div>
</div> </div>
</form> </form>
@ -75,70 +100,75 @@
<hr> <hr>
<form class="form-horizontal m" id="form-customer-edit" th:object="${customerDto}"> <form class="form-horizontal m" id="form-customer-edit" th:object="${customerDto}">
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">客户ID:</label> <label class="col-sm-3 control-label is-required">客户ID:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" required > <input readonly name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" required >
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">客户名称:</label> <label class="col-sm-3 control-label is-required">客户名称:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="enterpriseName" th:field="*{enterpriseName}" class="form-control" type="text" required> <input readonly name="enterpriseName" th:field="*{enterpriseName}" class="form-control" type="text" required>
</div> </div>
</div> </div>
<div class="form-group" >
<label class="col-sm-3 control-label is-required is-required" >客户联系人:</label> </form>
<div class="col-sm-8">
<input name="customerContact" th:field="*{customerContact}" class="form-control" type="text" required>
</div> </div>
<!--生产信息-->
<div class="mb-4">
<div class="row" style="padding-left: 15px;">
<span class="font-weight-bold" style="font-weight: bold">生产信息</span>
<a class="btn btn-success ml-auto " onclick="importProcessIssueRecord()">
<i class="fa fa-plus"></i> 上传问题记录
</a>
</div> </div>
<hr>
<form class="form-horizontal m" id="form-makeOrderDto-edit" th:object="${makeOrderDto}">
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">联系人电话:</label> <label class="col-sm-3 control-label">设备型号</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="contactNumber" th:field="*{contactNumber}" class="form-control" type="text" required> <input name="deviceModelCode" th:field="*{deviceModelCode}" class="form-control" type="text" required >
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">公司地址</label> <label class="col-sm-3 control-label is-required">追踪码</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="customerAddress" th:field="*{customerAddress}" class="form-control" type="text"> <input name="deviceRunningNumber" id="deviceRunningNumber" th:field="*{deviceRunningNumber}" class="form-control" type="text" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">收货地址</label> <label class="col-sm-3 control-label">生产开始时间</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input required name="deliveryAddress" th:field="*{deliveryAddress}" class="form-control" type="text"> <div class="input-group date">
<input name="startMakeTime" th:value="${#dates.format(afterSalesShippingDeviceDto.startMakeTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
</form>
</div> </div>
<!--生产信息-->
<div class="mb-4">
<h4 class="font-weight-bold">生产信息</h4>
<hr>
<form class="form-horizontal m" id="form-makeOrderDto-edit" th:object="${makeOrderDto}">
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">设备型号</label> <label class="col-sm-3 control-label">生产结束时间:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="deviceModelCode" th:field="*{deviceModelCode}" class="form-control" type="number" required > <div class="input-group date">
</div> <input name="endMakeTime" th:value="${#dates.format(afterSalesShippingDeviceDto.endMakeTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">流水号:</label>
<div class="col-sm-8">
<input name="deviceRunningNumber" th:field="*{deviceRunningNumber}" class="form-control" type="number" required>
</div> </div>
</div> </div>
<div class="form-group" > <div class="form-group" >
<label class="col-sm-3 control-label is-required is-required" >图片:</label> <label class="col-sm-3 control-label" >图片:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="makePhotoUrl" th:field="*{makePhotoUrl}" class="form-control" type="text" required> <input name="makePhotoUrl" th:field="*{makePhotoUrl}" class="form-control" type="text" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">生产员:</label> <label class="col-sm-3 control-label">生产员:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="makeName" th:field="*{makeName}" class="form-control" type="text" required> <input readonly name="makeName" th:field="*{makeName}" class="form-control" type="text" required>
</div>
</div>
<div class="row" style="width: 1300px;margin-left: 80px;">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-processRecord-table"></table>
</div> </div>
</div> </div>
</form> </form>
@ -152,13 +182,13 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">出库单号:</label> <label class="col-sm-3 control-label">出库单号:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="outOrderCode" th:field="*{outOrderCode}" class="form-control" type="text"> <input readonly name="outOrderCode" th:field="*{outOrderCode}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">仓库员:</label> <label class="col-sm-3 control-label">仓库员:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="warehouseName" th:field="*{warehouseName}" class="form-control" type="text"> <input readonly name="warehouseName" th:field="*{warehouseName}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -236,6 +266,60 @@
focusCleanup: true focusCleanup: true
}); });
$(function() {
var options = {
id: "bootstrap-processRecord-table",
url: prefix + "/showRecords",
importTemplateUrl: prefix + "/importTemplate",
modalName: "工序问题记录",
pagination: false,
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
height: 40,
queryParams: {
shippingDeviceId: $("#shippingDeviceId").val(),
serialNo: $("#deviceRunningNumber").val()
},
columns: [
{
field: 'process',
title: '工序',
},
{
field: 'abnormalTime',
title: '异常时间'
},
{
field: 'questionDescribe',
title: '问题描述'
},
{
field: 'solution',
title: '解决办法'
},
{
field: 'resolveTime',
title: '解决时间'
},
{
field: 'createBy',
title: '记录人'
},
{
field: 'approveBy',
title: '审核人'
},
{
field: 'remark',
title: '备注'
},
]
};
$.table.init(options);
});
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
@ -246,19 +330,81 @@
const makeOrderData= $("#form-makeOrderDto-edit").serializeArray(); const makeOrderData= $("#form-makeOrderDto-edit").serializeArray();
const warehouseAndAfterSalesData= $("#form-warehouseAndAfterSalesDto-edit").serializeArray(); const warehouseAndAfterSalesData= $("#form-warehouseAndAfterSalesDto-edit").serializeArray();
// 合并表单数据为一个 JSON 对象
const combinedData = shippingDeviceData.concat(customerData, makeOrderData,warehouseAndAfterSalesData).reduce((acc, curr) => { const combinedData = shippingDeviceData.concat(customerData, makeOrderData,warehouseAndAfterSalesData).reduce((acc, curr) => {
acc[curr.name] = curr.value; acc[curr.name] = curr.value;
return acc; return acc;
}, {}); }, {});
// 使用 JSON.stringify() 序列化数据
var processRecords = $("#bootstrap-processRecord-table").bootstrapTable('getData');
combinedData.processIssueRecordList = processRecords;
const jsonData = JSON.stringify(combinedData); const jsonData = JSON.stringify(combinedData);
// 发送 AJAX 请求到后端接口
$.operate.saveJson(prefix + "/edit", jsonData); $.operate.saveJson(prefix + "/edit", jsonData);
} }
} }
//导入问题记录
function importProcessIssueRecord() {
table.set();
layer.open({
type: 1,
area: ['400px', '230px'],
fix: false,
// 不固定
maxmin: true,
shade: 0.3,
title: '导入' + table.options.modalName + '数据',
content: $('#importTpl').html(),
btn: ['<i class="fa fa-check"></i> 导入', '<i class="fa fa-remove"></i> 取消'],
// 弹层外区域关闭
shadeClose: true,
btn1: function(index, layero){
var file = layero.find('#file').val();
if (file == '' || (!$.common.endWith(file, '.xls') && !$.common.endWith(file, '.xlsx'))) {
$.modal.msgWarning("请选择后缀为 “xls”或“xlsx”的文件。");
return false;
}
var index = layer.load(2, {shade: false});
$.modal.disable();
var formData = new FormData(layero.find('form')[0]);
$.ajax({
url: prefix + "/importRecords",
data: formData,
cache: false,
contentType: false,
processData: false,
type: 'POST',
success: function (result) {
$.modal.closeAll();
var rowData = result.rows;
if(result.total <= 0){
$.modal.alertWarning("导入问题记录文件解析为空,请检查!")
}else{
updateProcessTable(rowData);
}
$.modal.enable();
}
});
}
});
}
function updateProcessTable(rowData){
rowData.forEach(function (item){
var newRow = {
process: item.process,
abnormalTime: item.abnormalTime,
questionDescribe: item.questionDescribe,
solution: item.solution,
resolveTime: item.resolveTime,
createBy: item.createBy,
approveBy: item.approveBy,
remark: item.remark,
}
$("#bootstrap-processRecord-table").bootstrapTable('append',newRow);
})
}
$("input[name='factoryDate']").datetimepicker({ $("input[name='factoryDate']").datetimepicker({
format: "yyyy-mm-dd", format: "yyyy-mm-dd",
minView: "month", minView: "month",
@ -290,4 +436,17 @@
}); });
</script> </script>
</body> </body>
<!-- 导入区域 -->
<script id="importTpl" type="text/template">
<form enctype="multipart/form-data" class="mt20 mb10">
<div class="col-xs-offset-1">
<input style="width: 240px;" type="file" id="file" name="file"/>
<a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
<font color="red" class="pull-left mt10" style="margin-top: 20px;">
提示:仅允许导入“xls”或“xlsx”格式文件!
</font>
</div>
</form>
</script>
</html> </html>

149
ruoyi-admin/src/main/resources/templates/aftersales/shippingDevice/shippingDevice.html

@ -42,30 +42,6 @@
<label>SN号:</label> <label>SN号:</label>
<input type="text" name="snCode"/> <input type="text" name="snCode"/>
</li> </li>
<li class="select-time">
<label>出厂日期:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginFactoryDate]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endFactoryDate]"/>
</li>
<li class="select-time">
<label>损耗品到期时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginWastageExpireDate]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endWastageExpireDate]"/>
</li>
<li class="select-time">
<label>二次维修后部件质保时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginComponentGuaranteeDate]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endComponentGuaranteeDate]"/>
</li>
<li class="select-time">
<label>录入时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
</li>
<li> <li>
<label>是否过保修期:</label> <label>是否过保修期:</label>
<select name="guaranteePeriodFlag" th:with="type=${@dict.getType('guarantee_period_flag')}"> <select name="guaranteePeriodFlag" th:with="type=${@dict.getType('guarantee_period_flag')}">
@ -74,32 +50,56 @@
</select> </select>
</li> </li>
<li> <li>
<label>是否有锁机时间:</label> <label>是否过损耗品到期时间:</label>
<select name="lockDateFlag" th:with="type=${@dict.getType('lock_date_flag')}"> <select name="wastageExpireFlag" th:with="type=${@dict.getType('wastage_expire_flag')}">
<option value="">所有</option> <option value="">所有</option>
<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>
</li> </li>
<li class="select-time">
<label>锁机时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginLockDate]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endLockDate]"/>
</li>
<li> <li>
<label>是否过损耗品到期时间</label> <label>是否过二次维修后部件质保日期:</label>
<select name="wastageExpireFlag" th:with="type=${@dict.getType('wastage_expire_flag')}"> <select name="componentGuaranteeFlag" th:with="type=${@dict.getType('component_guarantee_flag')}">
<option value="">所有</option> <option value="">所有</option>
<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>
</li> </li>
<li> <li>
<label>是否过二次维修后部件质保日期</label> <label>是否有锁机时间</label>
<select name="componentGuaranteeFlag" th:with="type=${@dict.getType('component_guarantee_flag')}"> <select name="lockDateFlag" th:with="type=${@dict.getType('lock_date_flag')}">
<option value="">所有</option> <option value="">所有</option>
<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>
</li> </li>
<li class="select-time">
<label>锁机时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginLockDate]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endLockDate]"/>
</li>
<li class="select-time">
<label>录入时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
</li>
<li class="select-time">
<label>出厂日期:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginFactoryDate]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endFactoryDate]"/>
</li>
<li class="select-time">
<label>损耗品到期时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginWastageExpireDate]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endWastageExpireDate]"/>
</li>
<li class="select-time">
<label>二次维修后部件质保时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginComponentGuaranteeDate]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endComponentGuaranteeDate]"/>
</li>
<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-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> <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
@ -123,6 +123,7 @@
var guaranteePeriodFlagDatas = [[${@dict.getType('guarantee_period_flag')}]]; var guaranteePeriodFlagDatas = [[${@dict.getType('guarantee_period_flag')}]];
var lockDateFlagDatas = [[${@dict.getType('lock_date_flag')}]]; var lockDateFlagDatas = [[${@dict.getType('lock_date_flag')}]];
var wastageExpireFlagDatas = [[${@dict.getType('wastage_expire_flag')}]]; var wastageExpireFlagDatas = [[${@dict.getType('wastage_expire_flag')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var componentGuaranteeFlagDatas = [[${@dict.getType('component_guarantee_flag')}]]; var componentGuaranteeFlagDatas = [[${@dict.getType('component_guarantee_flag')}]];
var prefix = ctx + "aftersales/shippingDevice"; var prefix = ctx + "aftersales/shippingDevice";
@ -135,6 +136,8 @@
cancelUrl: prefix + "/cancel/{id}", cancelUrl: prefix + "/cancel/{id}",
restoreUrl: prefix + "/restore/{id}", restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export", exportUrl: prefix + "/export",
fixedColumns: true, // 启用冻结列
fixedRightNumber: 1, // 冻结右列个数
modalName: "出货设备", modalName: "出货设备",
columns: [{ columns: [{
checkbox: true checkbox: true
@ -147,77 +150,105 @@
{ {
title: '出货设备ID', title: '出货设备ID',
field: 'shippingDeviceId', field: 'shippingDeviceId',
align: 'center',
}, },
{ {
title: '关联单号', title: '关联单号',
align: 'center',
field: 'makeNo', field: 'makeNo',
}, },
{ {
title: '料号', title: 'SN号',
field: 'materialNo', align: 'center',
field: 'snCode',
}, },
{ {
title: '图片', title: '料号',
field: 'materialPhotourl', align: 'center',
field: 'materialNo',
}, },
{ {
title: '物料名称', title: '物料名称',
align: 'center',
field: 'materialName', field: 'materialName',
}, },
{
title: '图片',
align: 'center',
field: 'materialPhotourl',
},
{ {
title: '物料类型', title: '物料类型',
align: 'center',
field: 'materialType', field: 'materialType',
formatter: function(value, row, index) {
return $.table.selectCategoryLabel(materialTypeDatas, value);
}
},
{
title: '型号',
align: 'center',
field: 'materialModelCode',
}, },
// {
// title: '物料类别',
// field: 'materialClass',
// },
// {
// title: '物料型号',
// field: 'materialModelCode',
// },
{ {
title: '单位', title: '单位',
align: 'center',
field: 'materialUnit', field: 'materialUnit',
}, },
{ {
title: '品牌', title: '品牌',
align: 'center',
field: 'materialBrand', field: 'materialBrand',
}, },
{ {
title: '描述', title: '描述',
align: 'center',
field: 'materialDescribe', field: 'materialDescribe',
}, },
{ {
title: '设备型号', title: '设备型号',
align: 'center',
field: 'deviceModelCode', field: 'deviceModelCode',
}, },
{ {
title: '流水号', title: '追踪码',
align: 'center',
field: 'deviceRunningNumber', field: 'deviceRunningNumber',
}, },
{ {
title: '生产图片', title: '生产开始时间',
field: 'makePhotourl', align: 'center',
field: 'startMakeTime',
}, },
{ {
title: 'SN号', title: '生产结束时间',
field: 'snCode', align: 'center',
field: 'endMakeTime',
},
{
title: '生产图片',
align: 'center',
field: 'makePhotourl',
}, },
{ {
title: '售后图片', title: '售后图片',
align: 'center',
field: 'aftersalesPhotourl', field: 'aftersalesPhotourl',
}, },
{ {
title: '出厂日期', title: '出厂日期',
align: 'center',
field: 'factoryDate', field: 'factoryDate',
}, },
{ {
title: '保修期', title: '保修期',
align: 'center',
field: 'guaranteePeriod', field: 'guaranteePeriod',
}, },
{ {
title: '是否过保修期', title: '是否过保修期',
align: 'center',
field: 'guaranteePeriodFlag', field: 'guaranteePeriodFlag',
formatter: function(value, row, index) { formatter: function(value, row, index) {
return $.table.selectDictLabel(guaranteePeriodFlagDatas, value); return $.table.selectDictLabel(guaranteePeriodFlagDatas, value);
@ -225,6 +256,7 @@
}, },
{ {
title: '是否有锁机时间', title: '是否有锁机时间',
align: 'center',
field: 'lockDateFlag', field: 'lockDateFlag',
formatter: function(value, row, index) { formatter: function(value, row, index) {
return $.table.selectDictLabel(lockDateFlagDatas, value); return $.table.selectDictLabel(lockDateFlagDatas, value);
@ -232,15 +264,18 @@
}, },
{ {
title: '锁机时间', title: '锁机时间',
align: 'center',
field: 'lockDate', field: 'lockDate',
}, },
{ {
title: '损耗品到期时间', title: '损耗品到期时间',
align: 'center',
field: 'wastageExpireDate', field: 'wastageExpireDate',
}, },
{ {
title: '是否过损耗品到期时间', title: '是否过损耗品到期时间',
align: 'center',
field: 'wastageExpireFlag', field: 'wastageExpireFlag',
formatter: function(value, row, index) { formatter: function(value, row, index) {
return $.table.selectDictLabel(wastageExpireFlagDatas, value); return $.table.selectDictLabel(wastageExpireFlagDatas, value);
@ -248,10 +283,12 @@
}, },
{ {
title: '二次维修后部件质保时间', title: '二次维修后部件质保时间',
align: 'center',
field: 'componentGuaranteeDate', field: 'componentGuaranteeDate',
}, },
{ {
title: '是否过二次维修后部件质保日期', title: '是否过二次维修后部件质保日期',
align: 'center',
field: 'componentGuaranteeFlag', field: 'componentGuaranteeFlag',
formatter: function(value, row, index) { formatter: function(value, row, index) {
return $.table.selectDictLabel(componentGuaranteeFlagDatas, value); return $.table.selectDictLabel(componentGuaranteeFlagDatas, value);
@ -259,14 +296,17 @@
}, },
{ {
title: '客户ID', title: '客户ID',
align: 'center',
field: 'customerId', field: 'customerId',
}, },
{ {
title: '客户名称', title: '客户名称',
align: 'center',
field: 'customerName', field: 'customerName',
}, },
{ {
title: '工程员', title: '工程员',
align: 'center',
field: 'engineerName', field: 'engineerName',
}, },
// { // {
@ -283,14 +323,17 @@
// }, // },
{ {
title: '录入时间', title: '录入时间',
align: 'center',
field: 'createTime', field: 'createTime',
}, },
{ {
title: '更新人', title: '更新人',
align: 'center',
field: 'updateBy', field: 'updateBy',
}, },
{ {
title: '上次更新时间', title: '上次更新时间',
align: 'center',
field: 'updateTime', field: 'updateTime',
}, },
{ {

Loading…
Cancel
Save