Browse Source

[feat]售后管理:

新增出库设备列表编辑页面客户信息
dev
liuxiaoxu 7 months ago
parent
commit
9e373da775
  1. 17
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AfterSalesShippingDeviceController.java
  2. 266
      ruoyi-admin/src/main/resources/templates/aftersales/shippingDevice/detail.html
  3. 162
      ruoyi-admin/src/main/resources/templates/aftersales/shippingDevice/edit.html

17
ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AfterSalesShippingDeviceController.java

@ -1,6 +1,10 @@
package com.ruoyi.aftersales.controller;
import java.util.List;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.domain.SysCustomer;
import com.ruoyi.system.service.ISysCustomerService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -34,6 +38,9 @@ public class AfterSalesShippingDeviceController extends BaseController
@Autowired
private IAfterSalesShippingDeviceService afterSalesShippingDeviceService;
@Autowired
private ISysCustomerService customerService;
@RequiresPermissions("aftersales:shippingDevice:view")
@GetMapping()
public String shippingDevice()
@ -96,7 +103,17 @@ public class AfterSalesShippingDeviceController extends BaseController
public String edit(@PathVariable("shippingDeviceCode") Long shippingDeviceCode, ModelMap mmap)
{
AfterSalesShippingDevice afterSalesShippingDevice = afterSalesShippingDeviceService.selectAfterSalesShippingDeviceById(shippingDeviceCode);
//查找客户信息
String customerId = afterSalesShippingDevice.getCustomerId();
SysCustomer sysCustomer = customerService.selectSysCustomerByEnterpriseCode(customerId);
if (StringUtils.isNotNull(sysCustomer)){
mmap.put("sysCustomer",sysCustomer);
}
//查找生产信息 后续补充
//查找仓库信息 后续补充
//查找售后信息 后续补充
mmap.put("afterSalesShippingDevice", afterSalesShippingDevice);
// mmap.put("sysCustomer",sysCustomer);
return prefix + "/edit";
}

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

@ -0,0 +1,266 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增出货设备')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-shippingDevice-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">出货设备id:</label>
<div class="col-sm-8">
<input name="shippingDeviceId" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">关联单号:</label>
<div class="col-sm-8">
<input name="makeNo" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">料号:</label>
<div class="col-sm-8">
<input name="materialNo" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料图片:</label>
<div class="col-sm-8">
<input name="materialPhotourl" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料名称:</label>
<div class="col-sm-8">
<input name="materialName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料类型:</label>
<div class="col-sm-8">
<input name="materialType" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料类别:</label>
<div class="col-sm-8">
<input name="materialClass" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料型号:</label>
<div class="col-sm-8">
<input name="materialModelCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料单位:</label>
<div class="col-sm-8">
<input name="materialUnit" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料品牌:</label>
<div class="col-sm-8">
<input name="materialBrand" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料描述:</label>
<div class="col-sm-8">
<textarea name="materialDescribe" class="form-control"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">设备型号:</label>
<div class="col-sm-8">
<input name="deviceModelCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">设备流水号:</label>
<div class="col-sm-8">
<input name="deviceRunningNumber" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">生产图片:</label>
<div class="col-sm-8">
<input name="makePhotourl" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">SN号:</label>
<div class="col-sm-8">
<input name="snCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">售后图片地址:</label>
<div class="col-sm-8">
<input name="aftersalesPhotourl" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出厂日期:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="factoryDate" 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 class="form-group">
<label class="col-sm-3 control-label">保修期:</label>
<div class="col-sm-8">
<input name="guaranteePeriod" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否过保修期:</label>
<div class="col-sm-8">
<select name="guaranteePeriodFlag" class="form-control m-b" th:with="type=${@dict.getType('guarantee_period_flag')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">锁机时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="lockDate" 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 class="form-group">
<label class="col-sm-3 control-label">是否有锁机时间:</label>
<div class="col-sm-8">
<select name="lockDateFlag" class="form-control m-b" th:with="type=${@dict.getType('lock_date_flag')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">损耗品到期时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="wastageExpireDate" 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 class="form-group">
<label class="col-sm-3 control-label">是否过损耗品到期时间:</label>
<div class="col-sm-8">
<select name="wastageExpireFlag" class="form-control m-b" th:with="type=${@dict.getType('wastage_expire_flag')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">二次维修后部件质保时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="componentGuaranteeDate" 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 class="form-group">
<label class="col-sm-3 control-label">是否过二次维修后部件质保日期:</label>
<div class="col-sm-8">
<select name="componentGuaranteeFlag" class="form-control m-b" th:with="type=${@dict.getType('component_guarantee_flag')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">工程员姓名:</label>
<div class="col-sm-8">
<input name="engineerName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">业务员姓名:</label>
<div class="col-sm-8">
<input name="salesmanName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户ID:</label>
<div class="col-sm-8">
<input name="customerId" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户名称:</label>
<div class="col-sm-8">
<input name="customerName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">维修单号:</label>
<div class="col-sm-8">
<input name="maintainOrderCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">维修时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="maintainTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "aftersales/shippingDevice"
$("#form-shippingDevice-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-shippingDevice-add').serialize());
}
}
$("input[name='factoryDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='lockDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='wastageExpireDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='componentGuaranteeDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='maintainTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

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

@ -27,7 +27,7 @@
</div>
</div>
<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">
<input name="materialPhotourl" th:field="*{materialPhotourl}" class="form-control" type="text">
</div>
@ -51,13 +51,7 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料型号:</label>
<div class="col-sm-8">
<input name="materialModelCode" th:field="*{materialModelCode}" class="form-control" type="text">
</div>
</div>
<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">
<input name="materialUnit" th:field="*{materialUnit}" class="form-control" type="text">
</div>
@ -74,151 +68,53 @@
<textarea name="materialDescribe" class="form-control">[[*{materialDescribe}]]</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">设备型号:</label>
<div class="col-sm-8">
<input name="deviceModelCode" th:field="*{deviceModelCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">设备流水号:</label>
<div class="col-sm-8">
<input name="deviceRunningNumber" th:field="*{deviceRunningNumber}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">生产图片:</label>
<div class="col-sm-8">
<input name="makePhotourl" th:field="*{makePhotourl}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">SN号:</label>
<div class="col-sm-8">
<input name="snCode" th:field="*{snCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">售后图片地址:</label>
<div class="col-sm-8">
<input name="aftersalesPhotourl" th:field="*{aftersalesPhotourl}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出厂日期:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="factoryDate" th:value="${#dates.format(afterSalesShippingDevice.factoryDate, '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 class="form-group">
<label class="col-sm-3 control-label">保修期:</label>
<div class="col-sm-8">
<input name="guaranteePeriod" th:field="*{guaranteePeriod}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否过保修期:</label>
<div class="col-sm-8">
<select name="guaranteePeriodFlag" class="form-control m-b" th:with="type=${@dict.getType('guarantee_period_flag')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{guaranteePeriodFlag}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">锁机时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="lockDate" th:value="${#dates.format(afterSalesShippingDevice.lockDate, '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 class="form-group">
<label class="col-sm-3 control-label">是否有锁机时间:</label>
<div class="col-sm-8">
<select name="lockDateFlag" class="form-control m-b" th:with="type=${@dict.getType('lock_date_flag')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{lockDateFlag}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">损耗品到期时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="wastageExpireDate" th:value="${#dates.format(afterSalesShippingDevice.wastageExpireDate, '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 class="form-group">
<label class="col-sm-3 control-label">是否过损耗品到期时间:</label>
<div class="col-sm-8">
<select name="wastageExpireFlag" class="form-control m-b" th:with="type=${@dict.getType('wastage_expire_flag')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{wastageExpireFlag}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">二次维修后部件质保时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="componentGuaranteeDate" th:value="${#dates.format(afterSalesShippingDevice.componentGuaranteeDate, '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 class="form-group">
<label class="col-sm-3 control-label">是否过二次维修后部件质保日期:</label>
<div class="col-sm-8">
<select name="componentGuaranteeFlag" class="form-control m-b" th:with="type=${@dict.getType('component_guarantee_flag')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{componentGuaranteeFlag}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">工程员姓名:</label>
</form>
<!-- 客户信息 -->
<div class="mb-4">
<h4 class="font-weight-bold">客户信息</h4>
<hr>
<form class="form-horizontal m" id="form-customer-edit" th:object="${sysCustomer}">
<div class="form-group">
<label class="col-sm-3 control-label">客户ID:</label>
<div class="col-sm-8">
<input name="engineerName" th:field="*{engineerName}" class="form-control" type="text">
<input name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="number" required >
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">业务员姓名</label>
<div class="form-group">
<label class="col-sm-3 control-label is-required">客户名称:</label>
<div class="col-sm-8">
<input name="salesmanName" th:field="*{salesmanName}" class="form-control" type="text">
<input name="enterpriseName" th:field="*{enterpriseName}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户ID</label>
<div class="form-group" >
<label class="col-sm-3 control-label is-required is-required" >客户联系人:</label>
<div class="col-sm-8">
<input name="customerId" th:field="*{customerId}" class="form-control" type="text">
<input name="customerContact" th:field="*{customerContact}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户名称</label>
<div class="form-group">
<label class="col-sm-3 control-label is-required">联系人电话:</label>
<div class="col-sm-8">
<input name="customerName" th:field="*{customerName}" class="form-control" type="text">
<input name="contactNumber" th:field="*{contactNumber}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">维修单号</label>
<div class="form-group">
<label class="col-sm-3 control-label">公司地址:</label>
<div class="col-sm-8">
<input name="maintainOrderCode" th:field="*{maintainOrderCode}" class="form-control" type="text">
<input name="customerAddress" th:field="*{customerAddress}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">维修时间</label>
<div class="form-group">
<label class="col-sm-3 control-label is-required">收货地址:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="maintainTime" th:value="${#dates.format(afterSalesShippingDevice.maintainTime, '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>
<input required name="deliveryAddress" th:field="*{deliveryAddress}" class="form-control" type="text">
</div>
</div>
</form>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">

Loading…
Cancel
Save