Browse Source

[feat]售后管理:

新增出货设备列表
完成数据填充,页面展示,条件查询操作
dev
liuxiaoxu 5 months ago
parent
commit
8677432060
  1. 151
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AfterSalesShippingDeviceController.java
  2. 482
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/domain/AfterSalesShippingDevice.java
  3. 77
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/AfterSalesShippingDeviceMapper.java
  4. 75
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAfterSalesShippingDeviceService.java
  5. 126
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AfterSalesShippingDeviceServiceImpl.java
  6. 217
      ruoyi-admin/src/main/resources/mapper/aftersales/AfterSalesShippingDeviceMapper.xml
  7. 266
      ruoyi-admin/src/main/resources/templates/aftersales/shippingDevice/add.html
  8. 267
      ruoyi-admin/src/main/resources/templates/aftersales/shippingDevice/edit.html
  9. 330
      ruoyi-admin/src/main/resources/templates/aftersales/shippingDevice/shippingDevice.html

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

@ -0,0 +1,151 @@
package com.ruoyi.aftersales.controller;
import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.aftersales.domain.AfterSalesShippingDevice;
import com.ruoyi.aftersales.service.IAfterSalesShippingDeviceService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 出货设备Controller
*
* @author 刘晓旭
* @date 2024-04-22
*/
@Controller
@RequestMapping("/aftersales/shippingDevice")
public class AfterSalesShippingDeviceController extends BaseController
{
private String prefix = "aftersales/shippingDevice";
@Autowired
private IAfterSalesShippingDeviceService afterSalesShippingDeviceService;
@RequiresPermissions("aftersales:shippingDevice:view")
@GetMapping()
public String shippingDevice()
{
return prefix + "/shippingDevice";
}
/**
* 查询出货设备列表
*/
@RequiresPermissions("aftersales:shippingDevice:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(AfterSalesShippingDevice afterSalesShippingDevice)
{
startPage();
List<AfterSalesShippingDevice> list = afterSalesShippingDeviceService.selectAfterSalesShippingDeviceList(afterSalesShippingDevice);
return getDataTable(list);
}
/**
* 导出出货设备列表
*/
@RequiresPermissions("aftersales:shippingDevice:export")
@Log(title = "出货设备", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(AfterSalesShippingDevice afterSalesShippingDevice)
{
List<AfterSalesShippingDevice> list = afterSalesShippingDeviceService.selectAfterSalesShippingDeviceList(afterSalesShippingDevice);
ExcelUtil<AfterSalesShippingDevice> util = new ExcelUtil<AfterSalesShippingDevice>(AfterSalesShippingDevice.class);
return util.exportExcel(list, "出货设备数据");
}
/**
* 新增出货设备
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存出货设备
*/
@RequiresPermissions("aftersales:shippingDevice:add")
@Log(title = "出货设备", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(AfterSalesShippingDevice afterSalesShippingDevice)
{
return toAjax(afterSalesShippingDeviceService.insertAfterSalesShippingDevice(afterSalesShippingDevice));
}
/**
* 修改出货设备
*/
@GetMapping("/edit/{shippingDeviceCode}")
public String edit(@PathVariable("shippingDeviceCode") Long shippingDeviceCode, ModelMap mmap)
{
AfterSalesShippingDevice afterSalesShippingDevice = afterSalesShippingDeviceService.selectAfterSalesShippingDeviceById(shippingDeviceCode);
mmap.put("afterSalesShippingDevice", afterSalesShippingDevice);
return prefix + "/edit";
}
/**
* 修改保存出货设备
*/
@RequiresPermissions("aftersales:shippingDevice:edit")
@Log(title = "出货设备", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(AfterSalesShippingDevice afterSalesShippingDevice)
{
return toAjax(afterSalesShippingDeviceService.updateAfterSalesShippingDevice(afterSalesShippingDevice));
}
/**
* 删除出货设备
*/
@RequiresPermissions("aftersales:shippingDevice:remove")
@Log(title = "出货设备", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(afterSalesShippingDeviceService.deleteAfterSalesShippingDeviceByIds(ids));
}
/**
* 作废出货设备
*/
@RequiresPermissions("aftersales:shippingDevice:cancel")
@Log(title = "出货设备", businessType = BusinessType.CANCEL)
@GetMapping( "/cancel/{id}")
@ResponseBody
public AjaxResult cancel(@PathVariable("id") Long id){
return toAjax(afterSalesShippingDeviceService.cancelAfterSalesShippingDeviceById(id));
}
/**
* 恢复出货设备
*/
@RequiresPermissions("aftersales:shippingDevice:restore")
@Log(title = "出货设备", businessType = BusinessType.RESTORE)
@GetMapping( "/restore/{id}")
@ResponseBody
public AjaxResult restore(@PathVariable("id")Long id)
{
return toAjax(afterSalesShippingDeviceService.restoreAfterSalesShippingDeviceById(id));
}
}

482
ruoyi-admin/src/main/java/com/ruoyi/aftersales/domain/AfterSalesShippingDevice.java

@ -0,0 +1,482 @@
package com.ruoyi.aftersales.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 出货设备对象 aftersales_shipping_device
*
* @author 刘晓旭
* @date 2024-04-22
*/
public class AfterSalesShippingDevice extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 出货设备编号 */
private Long shippingDeviceCode;
/** 出货设备id */
@Excel(name = "出货设备id")
private String shippingDeviceId;
/** 关联单号 */
@Excel(name = "关联单号")
private String makeNo;
/** 料号 */
@Excel(name = "料号")
private String materialNo;
/** 物料图片 */
@Excel(name = "物料图片")
private String materialPhotourl;
/** 物料名称 */
@Excel(name = "物料名称")
private String materialName;
/** 物料类型 */
@Excel(name = "物料类型")
private String materialType;
/** 物料类别 */
@Excel(name = "物料类别")
private String materialClass;
/** 物料型号 */
@Excel(name = "物料型号")
private String materialModelCode;
/** 物料单位 */
@Excel(name = "物料单位")
private String materialUnit;
/** 物料品牌 */
@Excel(name = "物料品牌")
private String materialBrand;
/** 物料描述 */
@Excel(name = "物料描述")
private String materialDescribe;
/** 设备型号 */
@Excel(name = "设备型号")
private String deviceModelCode;
/** 设备流水号 */
@Excel(name = "设备流水号")
private String deviceRunningNumber;
/** 生产图片 */
@Excel(name = "生产图片")
private String makePhotourl;
/** SN号 */
@Excel(name = "SN号")
private String snCode;
/** 售后图片地址 */
@Excel(name = "售后图片地址")
private String aftersalesPhotourl;
/** 出厂日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "出厂日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date factoryDate;
/** 保修期 */
@Excel(name = "保修期")
private String guaranteePeriod;
/** 是否过保修期 */
@Excel(name = "是否过保修期")
private String guaranteePeriodFlag;
/** 锁机时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "锁机时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date lockDate;
/** 是否有锁机时间 */
@Excel(name = "是否有锁机时间")
private String lockDateFlag;
/** 损耗品到期时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "损耗品到期时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date wastageExpireDate;
/** 是否过损耗品到期时间 */
@Excel(name = "是否过损耗品到期时间")
private String wastageExpireFlag;
/** 二次维修后部件质保时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "二次维修后部件质保时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date componentGuaranteeDate;
/** 是否过二次维修后部件质保日期 */
@Excel(name = "是否过二次维修后部件质保日期")
private String componentGuaranteeFlag;
/** 工程员姓名 */
@Excel(name = "工程员姓名")
private String engineerName;
/** 业务员姓名 */
@Excel(name = "业务员姓名")
private String salesmanName;
/** 客户ID */
@Excel(name = "客户ID")
private String customerId;
/** 客户名称 */
@Excel(name = "客户名称")
private String customerName;
/** 维修单号 */
@Excel(name = "维修单号")
private String maintainOrderCode;
/** 维修时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "维修时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date maintainTime;
public void setShippingDeviceCode(Long shippingDeviceCode)
{
this.shippingDeviceCode = shippingDeviceCode;
}
public Long getShippingDeviceCode()
{
return shippingDeviceCode;
}
public void setShippingDeviceId(String shippingDeviceId)
{
this.shippingDeviceId = shippingDeviceId;
}
public String getShippingDeviceId()
{
return shippingDeviceId;
}
public void setMakeNo(String makeNo)
{
this.makeNo = makeNo;
}
public String getMakeNo()
{
return makeNo;
}
public void setMaterialNo(String materialNo)
{
this.materialNo = materialNo;
}
public String getMaterialNo()
{
return materialNo;
}
public void setMaterialPhotourl(String materialPhotourl)
{
this.materialPhotourl = materialPhotourl;
}
public String getMaterialPhotourl()
{
return materialPhotourl;
}
public void setMaterialName(String materialName)
{
this.materialName = materialName;
}
public String getMaterialName()
{
return materialName;
}
public void setMaterialType(String materialType)
{
this.materialType = materialType;
}
public String getMaterialType()
{
return materialType;
}
public void setMaterialClass(String materialClass)
{
this.materialClass = materialClass;
}
public String getMaterialClass()
{
return materialClass;
}
public void setMaterialModelCode(String materialModelCode)
{
this.materialModelCode = materialModelCode;
}
public String getMaterialModelCode()
{
return materialModelCode;
}
public void setMaterialUnit(String materialUnit)
{
this.materialUnit = materialUnit;
}
public String getMaterialUnit()
{
return materialUnit;
}
public void setMaterialBrand(String materialBrand)
{
this.materialBrand = materialBrand;
}
public String getMaterialBrand()
{
return materialBrand;
}
public void setMaterialDescribe(String materialDescribe)
{
this.materialDescribe = materialDescribe;
}
public String getMaterialDescribe()
{
return materialDescribe;
}
public void setDeviceModelCode(String deviceModelCode)
{
this.deviceModelCode = deviceModelCode;
}
public String getDeviceModelCode()
{
return deviceModelCode;
}
public void setDeviceRunningNumber(String deviceRunningNumber)
{
this.deviceRunningNumber = deviceRunningNumber;
}
public String getDeviceRunningNumber()
{
return deviceRunningNumber;
}
public void setMakePhotourl(String makePhotourl)
{
this.makePhotourl = makePhotourl;
}
public String getMakePhotourl()
{
return makePhotourl;
}
public void setSnCode(String snCode)
{
this.snCode = snCode;
}
public String getSnCode()
{
return snCode;
}
public void setAftersalesPhotourl(String aftersalesPhotourl)
{
this.aftersalesPhotourl = aftersalesPhotourl;
}
public String getAftersalesPhotourl()
{
return aftersalesPhotourl;
}
public void setFactoryDate(Date factoryDate)
{
this.factoryDate = factoryDate;
}
public Date getFactoryDate()
{
return factoryDate;
}
public void setGuaranteePeriod(String guaranteePeriod)
{
this.guaranteePeriod = guaranteePeriod;
}
public String getGuaranteePeriod()
{
return guaranteePeriod;
}
public void setGuaranteePeriodFlag(String guaranteePeriodFlag)
{
this.guaranteePeriodFlag = guaranteePeriodFlag;
}
public String getGuaranteePeriodFlag()
{
return guaranteePeriodFlag;
}
public void setLockDate(Date lockDate)
{
this.lockDate = lockDate;
}
public Date getLockDate()
{
return lockDate;
}
public void setLockDateFlag(String lockDateFlag)
{
this.lockDateFlag = lockDateFlag;
}
public String getLockDateFlag()
{
return lockDateFlag;
}
public void setWastageExpireDate(Date wastageExpireDate)
{
this.wastageExpireDate = wastageExpireDate;
}
public Date getWastageExpireDate()
{
return wastageExpireDate;
}
public void setWastageExpireFlag(String wastageExpireFlag)
{
this.wastageExpireFlag = wastageExpireFlag;
}
public String getWastageExpireFlag()
{
return wastageExpireFlag;
}
public void setComponentGuaranteeDate(Date componentGuaranteeDate)
{
this.componentGuaranteeDate = componentGuaranteeDate;
}
public Date getComponentGuaranteeDate()
{
return componentGuaranteeDate;
}
public void setComponentGuaranteeFlag(String componentGuaranteeFlag)
{
this.componentGuaranteeFlag = componentGuaranteeFlag;
}
public String getComponentGuaranteeFlag()
{
return componentGuaranteeFlag;
}
public void setEngineerName(String engineerName)
{
this.engineerName = engineerName;
}
public String getEngineerName()
{
return engineerName;
}
public void setSalesmanName(String salesmanName)
{
this.salesmanName = salesmanName;
}
public String getSalesmanName()
{
return salesmanName;
}
public void setCustomerId(String customerId)
{
this.customerId = customerId;
}
public String getCustomerId()
{
return customerId;
}
public void setCustomerName(String customerName)
{
this.customerName = customerName;
}
public String getCustomerName()
{
return customerName;
}
public void setMaintainOrderCode(String maintainOrderCode)
{
this.maintainOrderCode = maintainOrderCode;
}
public String getMaintainOrderCode()
{
return maintainOrderCode;
}
public void setMaintainTime(Date maintainTime)
{
this.maintainTime = maintainTime;
}
public Date getMaintainTime()
{
return maintainTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("shippingDeviceCode", getShippingDeviceCode())
.append("shippingDeviceId", getShippingDeviceId())
.append("makeNo", getMakeNo())
.append("materialNo", getMaterialNo())
.append("materialPhotourl", getMaterialPhotourl())
.append("materialName", getMaterialName())
.append("materialType", getMaterialType())
.append("materialClass", getMaterialClass())
.append("materialModelCode", getMaterialModelCode())
.append("materialUnit", getMaterialUnit())
.append("materialBrand", getMaterialBrand())
.append("materialDescribe", getMaterialDescribe())
.append("deviceModelCode", getDeviceModelCode())
.append("deviceRunningNumber", getDeviceRunningNumber())
.append("makePhotourl", getMakePhotourl())
.append("snCode", getSnCode())
.append("aftersalesPhotourl", getAftersalesPhotourl())
.append("factoryDate", getFactoryDate())
.append("guaranteePeriod", getGuaranteePeriod())
.append("guaranteePeriodFlag", getGuaranteePeriodFlag())
.append("lockDate", getLockDate())
.append("lockDateFlag", getLockDateFlag())
.append("wastageExpireDate", getWastageExpireDate())
.append("wastageExpireFlag", getWastageExpireFlag())
.append("componentGuaranteeDate", getComponentGuaranteeDate())
.append("componentGuaranteeFlag", getComponentGuaranteeFlag())
.append("engineerName", getEngineerName())
.append("salesmanName", getSalesmanName())
.append("customerId", getCustomerId())
.append("customerName", getCustomerName())
.append("maintainOrderCode", getMaintainOrderCode())
.append("maintainTime", getMaintainTime())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

77
ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/AfterSalesShippingDeviceMapper.java

@ -0,0 +1,77 @@
package com.ruoyi.aftersales.mapper;
import java.util.List;
import com.ruoyi.aftersales.domain.AfterSalesShippingDevice;
/**
* 出货设备Mapper接口
*
* @author 刘晓旭
* @date 2024-04-22
*/
public interface AfterSalesShippingDeviceMapper
{
/**
* 查询出货设备
*
* @param shippingDeviceCode 出货设备ID
* @return 出货设备
*/
public AfterSalesShippingDevice selectAfterSalesShippingDeviceById(Long shippingDeviceCode);
/**
* 查询出货设备列表
*
* @param afterSalesShippingDevice 出货设备
* @return 出货设备集合
*/
public List<AfterSalesShippingDevice> selectAfterSalesShippingDeviceList(AfterSalesShippingDevice afterSalesShippingDevice);
/**
* 新增出货设备
*
* @param afterSalesShippingDevice 出货设备
* @return 结果
*/
public int insertAfterSalesShippingDevice(AfterSalesShippingDevice afterSalesShippingDevice);
/**
* 修改出货设备
*
* @param afterSalesShippingDevice 出货设备
* @return 结果
*/
public int updateAfterSalesShippingDevice(AfterSalesShippingDevice afterSalesShippingDevice);
/**
* 删除出货设备
*
* @param shippingDeviceCode 出货设备ID
* @return 结果
*/
public int deleteAfterSalesShippingDeviceById(Long shippingDeviceCode);
/**
* 批量删除出货设备
*
* @param shippingDeviceCodes 需要删除的数据ID
* @return 结果
*/
public int deleteAfterSalesShippingDeviceByIds(String[] shippingDeviceCodes);
/**
* 作废出货设备
*
* @param shippingDeviceCode 出货设备ID
* @return 结果
*/
public int cancelAfterSalesShippingDeviceById(Long shippingDeviceCode);
/**
* 恢复出货设备
*
* @param shippingDeviceCode 出货设备ID
* @return 结果
*/
public int restoreAfterSalesShippingDeviceById(Long shippingDeviceCode);
}

75
ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAfterSalesShippingDeviceService.java

@ -0,0 +1,75 @@
package com.ruoyi.aftersales.service;
import java.util.List;
import com.ruoyi.aftersales.domain.AfterSalesShippingDevice;
/**
* 出货设备Service接口
*
* @author 刘晓旭
* @date 2024-04-22
*/
public interface IAfterSalesShippingDeviceService
{
/**
* 查询出货设备
*
* @param shippingDeviceCode 出货设备ID
* @return 出货设备
*/
public AfterSalesShippingDevice selectAfterSalesShippingDeviceById(Long shippingDeviceCode);
/**
* 查询出货设备列表
*
* @param afterSalesShippingDevice 出货设备
* @return 出货设备集合
*/
public List<AfterSalesShippingDevice> selectAfterSalesShippingDeviceList(AfterSalesShippingDevice afterSalesShippingDevice);
/**
* 新增出货设备
*
* @param afterSalesShippingDevice 出货设备
* @return 结果
*/
public int insertAfterSalesShippingDevice(AfterSalesShippingDevice afterSalesShippingDevice);
/**
* 修改出货设备
*
* @param afterSalesShippingDevice 出货设备
* @return 结果
*/
public int updateAfterSalesShippingDevice(AfterSalesShippingDevice afterSalesShippingDevice);
/**
* 批量删除出货设备
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteAfterSalesShippingDeviceByIds(String ids);
/**
* 删除出货设备信息
*
* @param shippingDeviceCode 出货设备ID
* @return 结果
*/
public int deleteAfterSalesShippingDeviceById(Long shippingDeviceCode);
/**
* 作废出货设备
* @param shippingDeviceCode 出货设备ID
* @return
*/
int cancelAfterSalesShippingDeviceById(Long shippingDeviceCode);
/**
* 恢复出货设备
* @param shippingDeviceCode 出货设备ID
* @return
*/
int restoreAfterSalesShippingDeviceById(Long shippingDeviceCode);
}

126
ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AfterSalesShippingDeviceServiceImpl.java

@ -0,0 +1,126 @@
package com.ruoyi.aftersales.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.aftersales.mapper.AfterSalesShippingDeviceMapper;
import com.ruoyi.aftersales.domain.AfterSalesShippingDevice;
import com.ruoyi.aftersales.service.IAfterSalesShippingDeviceService;
import com.ruoyi.common.core.text.Convert;
/**
* 出货设备Service业务层处理
*
* @author 刘晓旭
* @date 2024-04-22
*/
@Service
public class AfterSalesShippingDeviceServiceImpl implements IAfterSalesShippingDeviceService
{
@Autowired
private AfterSalesShippingDeviceMapper afterSalesShippingDeviceMapper;
/**
* 查询出货设备
*
* @param shippingDeviceCode 出货设备ID
* @return 出货设备
*/
@Override
public AfterSalesShippingDevice selectAfterSalesShippingDeviceById(Long shippingDeviceCode)
{
return afterSalesShippingDeviceMapper.selectAfterSalesShippingDeviceById(shippingDeviceCode);
}
/**
* 查询出货设备列表
*
* @param afterSalesShippingDevice 出货设备
* @return 出货设备
*/
@Override
public List<AfterSalesShippingDevice> selectAfterSalesShippingDeviceList(AfterSalesShippingDevice afterSalesShippingDevice)
{
return afterSalesShippingDeviceMapper.selectAfterSalesShippingDeviceList(afterSalesShippingDevice);
}
/**
* 新增出货设备
*
* @param afterSalesShippingDevice 出货设备
* @return 结果
*/
@Override
public int insertAfterSalesShippingDevice(AfterSalesShippingDevice afterSalesShippingDevice)
{
String loginName = ShiroUtils.getLoginName();
afterSalesShippingDevice.setCreateBy(loginName);
afterSalesShippingDevice.setCreateTime(DateUtils.getNowDate());
return afterSalesShippingDeviceMapper.insertAfterSalesShippingDevice(afterSalesShippingDevice);
}
/**
* 修改出货设备
*
* @param afterSalesShippingDevice 出货设备
* @return 结果
*/
@Override
public int updateAfterSalesShippingDevice(AfterSalesShippingDevice afterSalesShippingDevice)
{
String loginName = ShiroUtils.getLoginName();
afterSalesShippingDevice.setUpdateBy(loginName);
afterSalesShippingDevice.setUpdateTime(DateUtils.getNowDate());
return afterSalesShippingDeviceMapper.updateAfterSalesShippingDevice(afterSalesShippingDevice);
}
/**
* 删除出货设备对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteAfterSalesShippingDeviceByIds(String ids)
{
return afterSalesShippingDeviceMapper.deleteAfterSalesShippingDeviceByIds(Convert.toStrArray(ids));
}
/**
* 删除出货设备信息
*
* @param shippingDeviceCode 出货设备ID
* @return 结果
*/
@Override
public int deleteAfterSalesShippingDeviceById(Long shippingDeviceCode)
{
return afterSalesShippingDeviceMapper.deleteAfterSalesShippingDeviceById(shippingDeviceCode);
}
/**
* 作废出货设备
*
* @param shippingDeviceCode 出货设备ID
* @return 结果
*/
@Override
public int cancelAfterSalesShippingDeviceById(Long shippingDeviceCode)
{
return afterSalesShippingDeviceMapper.cancelAfterSalesShippingDeviceById(shippingDeviceCode);
}
/**
* 恢复出货设备信息
*
* @param shippingDeviceCode 出货设备ID
* @return 结果
*/
@Override
public int restoreAfterSalesShippingDeviceById(Long shippingDeviceCode)
{
return afterSalesShippingDeviceMapper.restoreAfterSalesShippingDeviceById(shippingDeviceCode);
}
}

217
ruoyi-admin/src/main/resources/mapper/aftersales/AfterSalesShippingDeviceMapper.xml

@ -0,0 +1,217 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.aftersales.mapper.AfterSalesShippingDeviceMapper">
<resultMap type="AfterSalesShippingDevice" id="AfterSalesShippingDeviceResult">
<result property="shippingDeviceCode" column="shipping_device_code" />
<result property="shippingDeviceId" column="shipping_device_id" />
<result property="makeNo" column="make_no" />
<result property="materialNo" column="material_no" />
<result property="materialPhotourl" column="material_photoUrl" />
<result property="materialName" column="material_name" />
<result property="materialType" column="material_type" />
<result property="materialClass" column="material_class" />
<result property="materialModelCode" column="material_model_code" />
<result property="materialUnit" column="material_unit" />
<result property="materialBrand" column="material_brand" />
<result property="materialDescribe" column="material_describe" />
<result property="deviceModelCode" column="device_model_code" />
<result property="deviceRunningNumber" column="device_running_number" />
<result property="makePhotourl" column="make_photoUrl" />
<result property="snCode" column="sn_code" />
<result property="aftersalesPhotourl" column="aftersales_photoUrl" />
<result property="factoryDate" column="factory_date" />
<result property="guaranteePeriod" column="guarantee_period" />
<result property="guaranteePeriodFlag" column="guarantee_period_flag" />
<result property="lockDate" column="lock_date" />
<result property="lockDateFlag" column="lock_date_flag" />
<result property="wastageExpireDate" column="wastage_expire_date" />
<result property="wastageExpireFlag" column="wastage_expire_flag" />
<result property="componentGuaranteeDate" column="component_guarantee_date" />
<result property="componentGuaranteeFlag" column="component_guarantee_flag" />
<result property="engineerName" column="engineer_name" />
<result property="salesmanName" column="salesman_name" />
<result property="customerId" column="customer_id" />
<result property="customerName" column="customer_name" />
<result property="maintainOrderCode" column="maintain_order_code" />
<result property="maintainTime" column="maintain_time" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectAfterSalesShippingDeviceVo">
select shipping_device_code, shipping_device_id, make_no, material_no, material_photoUrl, material_name, material_type, material_class, material_model_code, material_unit, material_brand, material_describe, device_model_code, device_running_number, make_photoUrl, sn_code, aftersales_photoUrl, factory_date, guarantee_period, guarantee_period_flag, lock_date, lock_date_flag, wastage_expire_date, wastage_expire_flag, component_guarantee_date, component_guarantee_flag, engineer_name, salesman_name, customer_id, customer_name, maintain_order_code, maintain_time, create_by, create_time, update_by, update_time from aftersales_shipping_device
</sql>
<select id="selectAfterSalesShippingDeviceList" parameterType="AfterSalesShippingDevice" resultMap="AfterSalesShippingDeviceResult">
<include refid="selectAfterSalesShippingDeviceVo"/>
<where>
<if test="shippingDeviceId != null and shippingDeviceId != ''"> and shipping_device_id = #{shippingDeviceId}</if>
<if test="makeNo != null and makeNo != ''"> and make_no = #{makeNo}</if>
<if test="materialNo != null and materialNo != ''"> and material_no = #{materialNo}</if>
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
<if test="deviceModelCode != null and deviceModelCode != ''"> and device_model_code = #{deviceModelCode}</if>
<if test="snCode != null and snCode != ''"> and sn_code = #{snCode}</if>
<if test="params.beginFactoryDate != null and params.beginFactoryDate != '' and params.endFactoryDate != null and params.endFactoryDate != ''"> and factory_date between #{params.beginFactoryDate} and #{params.endFactoryDate}</if>
<if test="guaranteePeriodFlag != null and guaranteePeriodFlag != ''"> and guarantee_period_flag = #{guaranteePeriodFlag}</if>
<if test="params.beginLockDate != null and params.beginLockDate != '' and params.endLockDate != null and params.endLockDate != ''"> and lock_date between #{params.beginLockDate} and #{params.endLockDate}</if>
<if test="lockDateFlag != null and lockDateFlag != ''"> and lock_date_flag = #{lockDateFlag}</if>
<if test="params.beginWastageExpireDate != null and params.beginWastageExpireDate != '' and params.endWastageExpireDate != null and params.endWastageExpireDate != ''"> and wastage_expire_date between #{params.beginWastageExpireDate} and #{params.endWastageExpireDate}</if>
<if test="wastageExpireFlag != null and wastageExpireFlag != ''"> and wastage_expire_flag = #{wastageExpireFlag}</if>
<if test="params.beginComponentGuaranteeDate != null and params.beginComponentGuaranteeDate != '' and params.endComponentGuaranteeDate != null and params.endComponentGuaranteeDate != ''"> and component_guarantee_date between #{params.beginComponentGuaranteeDate} and #{params.endComponentGuaranteeDate}</if>
<if test="componentGuaranteeFlag != null and componentGuaranteeFlag != ''"> and component_guarantee_flag = #{componentGuaranteeFlag}</if>
<if test="customerId != null and customerId != ''"> and customer_id = #{customerId}</if>
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
</where>
</select>
<select id="selectAfterSalesShippingDeviceById" parameterType="Long" resultMap="AfterSalesShippingDeviceResult">
<include refid="selectAfterSalesShippingDeviceVo"/>
where shipping_device_code = #{shippingDeviceCode}
</select>
<insert id="insertAfterSalesShippingDevice" parameterType="AfterSalesShippingDevice" useGeneratedKeys="true" keyProperty="shippingDeviceCode">
insert into aftersales_shipping_device
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="shippingDeviceId != null and shippingDeviceId != ''">shipping_device_id,</if>
<if test="makeNo != null">make_no,</if>
<if test="materialNo != null">material_no,</if>
<if test="materialPhotourl != null">material_photoUrl,</if>
<if test="materialName != null">material_name,</if>
<if test="materialType != null">material_type,</if>
<if test="materialClass != null">material_class,</if>
<if test="materialModelCode != null">material_model_code,</if>
<if test="materialUnit != null">material_unit,</if>
<if test="materialBrand != null">material_brand,</if>
<if test="materialDescribe != null">material_describe,</if>
<if test="deviceModelCode != null">device_model_code,</if>
<if test="deviceRunningNumber != null">device_running_number,</if>
<if test="makePhotourl != null">make_photoUrl,</if>
<if test="snCode != null">sn_code,</if>
<if test="aftersalesPhotourl != null">aftersales_photoUrl,</if>
<if test="factoryDate != null">factory_date,</if>
<if test="guaranteePeriod != null">guarantee_period,</if>
<if test="guaranteePeriodFlag != null">guarantee_period_flag,</if>
<if test="lockDate != null">lock_date,</if>
<if test="lockDateFlag != null">lock_date_flag,</if>
<if test="wastageExpireDate != null">wastage_expire_date,</if>
<if test="wastageExpireFlag != null">wastage_expire_flag,</if>
<if test="componentGuaranteeDate != null">component_guarantee_date,</if>
<if test="componentGuaranteeFlag != null">component_guarantee_flag,</if>
<if test="engineerName != null">engineer_name,</if>
<if test="salesmanName != null">salesman_name,</if>
<if test="customerId != null">customer_id,</if>
<if test="customerName != null">customer_name,</if>
<if test="maintainOrderCode != null">maintain_order_code,</if>
<if test="maintainTime != null">maintain_time,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="shippingDeviceId != null and shippingDeviceId != ''">#{shippingDeviceId},</if>
<if test="makeNo != null">#{makeNo},</if>
<if test="materialNo != null">#{materialNo},</if>
<if test="materialPhotourl != null">#{materialPhotourl},</if>
<if test="materialName != null">#{materialName},</if>
<if test="materialType != null">#{materialType},</if>
<if test="materialClass != null">#{materialClass},</if>
<if test="materialModelCode != null">#{materialModelCode},</if>
<if test="materialUnit != null">#{materialUnit},</if>
<if test="materialBrand != null">#{materialBrand},</if>
<if test="materialDescribe != null">#{materialDescribe},</if>
<if test="deviceModelCode != null">#{deviceModelCode},</if>
<if test="deviceRunningNumber != null">#{deviceRunningNumber},</if>
<if test="makePhotourl != null">#{makePhotourl},</if>
<if test="snCode != null">#{snCode},</if>
<if test="aftersalesPhotourl != null">#{aftersalesPhotourl},</if>
<if test="factoryDate != null">#{factoryDate},</if>
<if test="guaranteePeriod != null">#{guaranteePeriod},</if>
<if test="guaranteePeriodFlag != null">#{guaranteePeriodFlag},</if>
<if test="lockDate != null">#{lockDate},</if>
<if test="lockDateFlag != null">#{lockDateFlag},</if>
<if test="wastageExpireDate != null">#{wastageExpireDate},</if>
<if test="wastageExpireFlag != null">#{wastageExpireFlag},</if>
<if test="componentGuaranteeDate != null">#{componentGuaranteeDate},</if>
<if test="componentGuaranteeFlag != null">#{componentGuaranteeFlag},</if>
<if test="engineerName != null">#{engineerName},</if>
<if test="salesmanName != null">#{salesmanName},</if>
<if test="customerId != null">#{customerId},</if>
<if test="customerName != null">#{customerName},</if>
<if test="maintainOrderCode != null">#{maintainOrderCode},</if>
<if test="maintainTime != null">#{maintainTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateAfterSalesShippingDevice" parameterType="AfterSalesShippingDevice">
update aftersales_shipping_device
<trim prefix="SET" suffixOverrides=",">
<if test="shippingDeviceId != null and shippingDeviceId != ''">shipping_device_id = #{shippingDeviceId},</if>
<if test="makeNo != null">make_no = #{makeNo},</if>
<if test="materialNo != null">material_no = #{materialNo},</if>
<if test="materialPhotourl != null">material_photoUrl = #{materialPhotourl},</if>
<if test="materialName != null">material_name = #{materialName},</if>
<if test="materialType != null">material_type = #{materialType},</if>
<if test="materialClass != null">material_class = #{materialClass},</if>
<if test="materialModelCode != null">material_model_code = #{materialModelCode},</if>
<if test="materialUnit != null">material_unit = #{materialUnit},</if>
<if test="materialBrand != null">material_brand = #{materialBrand},</if>
<if test="materialDescribe != null">material_describe = #{materialDescribe},</if>
<if test="deviceModelCode != null">device_model_code = #{deviceModelCode},</if>
<if test="deviceRunningNumber != null">device_running_number = #{deviceRunningNumber},</if>
<if test="makePhotourl != null">make_photoUrl = #{makePhotourl},</if>
<if test="snCode != null">sn_code = #{snCode},</if>
<if test="aftersalesPhotourl != null">aftersales_photoUrl = #{aftersalesPhotourl},</if>
<if test="factoryDate != null">factory_date = #{factoryDate},</if>
<if test="guaranteePeriod != null">guarantee_period = #{guaranteePeriod},</if>
<if test="guaranteePeriodFlag != null">guarantee_period_flag = #{guaranteePeriodFlag},</if>
<if test="lockDate != null">lock_date = #{lockDate},</if>
<if test="lockDateFlag != null">lock_date_flag = #{lockDateFlag},</if>
<if test="wastageExpireDate != null">wastage_expire_date = #{wastageExpireDate},</if>
<if test="wastageExpireFlag != null">wastage_expire_flag = #{wastageExpireFlag},</if>
<if test="componentGuaranteeDate != null">component_guarantee_date = #{componentGuaranteeDate},</if>
<if test="componentGuaranteeFlag != null">component_guarantee_flag = #{componentGuaranteeFlag},</if>
<if test="engineerName != null">engineer_name = #{engineerName},</if>
<if test="salesmanName != null">salesman_name = #{salesmanName},</if>
<if test="customerId != null">customer_id = #{customerId},</if>
<if test="customerName != null">customer_name = #{customerName},</if>
<if test="maintainOrderCode != null">maintain_order_code = #{maintainOrderCode},</if>
<if test="maintainTime != null">maintain_time = #{maintainTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where shipping_device_code = #{shippingDeviceCode}
</update>
<delete id="deleteAfterSalesShippingDeviceById" parameterType="Long">
delete from aftersales_shipping_device where shipping_device_code = #{shippingDeviceCode}
</delete>
<delete id="deleteAfterSalesShippingDeviceByIds" parameterType="String">
delete from aftersales_shipping_device where shipping_device_code in
<foreach item="shippingDeviceCode" collection="array" open="(" separator="," close=")">
#{shippingDeviceCode}
</foreach>
</delete>
<update id="cancelAfterSalesShippingDeviceById" parameterType="Long">
update aftersales_shipping_device set del_flag = '1' where shipping_device_code = #{shippingDeviceCode}
</update>
<update id="restoreAfterSalesShippingDeviceById" parameterType="Long">
update aftersales_shipping_device set del_flag = '0' where shipping_device_code = #{shippingDeviceCode}
</update>
</mapper>

266
ruoyi-admin/src/main/resources/templates/aftersales/shippingDevice/add.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>

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

@ -0,0 +1,267 @@
<!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-edit" th:object="${afterSalesShippingDevice}">
<input name="shippingDeviceCode" th:field="*{shippingDeviceCode}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">出货设备id:</label>
<div class="col-sm-8">
<input name="shippingDeviceId" th:field="*{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" th:field="*{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" th:field="*{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" th:field="*{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" th:field="*{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" th:field="*{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" th:field="*{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" th:field="*{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" th:field="*{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" th:field="*{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">[[*{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>
<div class="col-sm-8">
<input name="engineerName" th:field="*{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" th:field="*{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" th:field="*{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" th:field="*{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" th:field="*{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" 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>
</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-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-shippingDevice-edit').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>

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

@ -0,0 +1,330 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('出货设备列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>出货设备ID:</label>
<input type="text" name="shippingDeviceId"/>
</li>
<li>
<label>关联单号:</label>
<input type="text" name="makeNo"/>
</li>
<li>
<label>客户ID:</label>
<input type="text" name="customerId"/>
</li>
<li>
<label>客户名称:</label>
<input type="text" name="customerName"/>
</li>
<li>
<label>料号:</label>
<input type="text" name="materialNo"/>
</li>
<li>
<label>物料名称:</label>
<input type="text" name="materialName"/>
</li>
<li>
<label>设备型号:</label>
<input type="text" name="deviceModelCode"/>
</li>
<li>
<label>SN号:</label>
<input type="text" name="snCode"/>
</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>
<label>是否过保修期:</label>
<select name="guaranteePeriodFlag" th:with="type=${@dict.getType('guarantee_period_flag')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>是否有锁机时间:</label>
<select name="lockDateFlag" th:with="type=${@dict.getType('lock_date_flag')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</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>
<label>是否过损耗品到期时间:</label>
<select name="wastageExpireFlag" th:with="type=${@dict.getType('wastage_expire_flag')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>是否过二次维修后部件质保日期:</label>
<select name="componentGuaranteeFlag" th:with="type=${@dict.getType('component_guarantee_flag')}">
<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>
<!-- <div class="btn-group-sm" id="toolbar" role="group">-->
<!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="aftersales:shippingDevice:add">-->
<!-- <i class="fa fa-plus"></i> 添加-->
<!-- </a>-->
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="aftersales:shippingDevice:edit">-->
<!-- <i class="fa fa-edit"></i> 修改-->
<!-- </a>-->
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="aftersales:shippingDevice:remove">-->
<!-- <i class="fa fa-remove"></i> 删除-->
<!-- </a>-->
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="aftersales:shippingDevice:export">-->
<!-- <i class="fa fa-download"></i> 导出-->
<!-- </a>-->
<!-- </div>-->
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('aftersales:shippingDevice:edit')}]];
var removeFlag = [[${@permission.hasPermi('aftersales:shippingDevice:remove')}]];
var cancelFlag = [[${@permission.hasPermi('aftersales:shippingDevice:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('aftersales:shippingDevice:restore')}]];
var guaranteePeriodFlagDatas = [[${@dict.getType('guarantee_period_flag')}]];
var lockDateFlagDatas = [[${@dict.getType('lock_date_flag')}]];
var wastageExpireFlagDatas = [[${@dict.getType('wastage_expire_flag')}]];
var componentGuaranteeFlagDatas = [[${@dict.getType('component_guarantee_flag')}]];
var prefix = ctx + "aftersales/shippingDevice";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
cancelUrl: prefix + "/cancel/{id}",
restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export",
modalName: "出货设备",
columns: [{
checkbox: true
},
{
title: '出货设备编号',
field: 'shippingDeviceCode',
visible: false
},
{
title: '出货设备ID',
field: 'shippingDeviceId',
},
{
title: '关联单号',
field: 'makeNo',
},
{
title: '料号',
field: 'materialNo',
},
{
title: '图片',
field: 'materialPhotourl',
},
{
title: '物料名称',
field: 'materialName',
},
{
title: '物料类型',
field: 'materialType',
},
// {
// title: '物料类别',
// field: 'materialClass',
// },
// {
// title: '物料型号',
// field: 'materialModelCode',
// },
{
title: '单位',
field: 'materialUnit',
},
{
title: '品牌',
field: 'materialBrand',
},
{
title: '描述',
field: 'materialDescribe',
},
{
title: '设备型号',
field: 'deviceModelCode',
},
{
title: '流水号',
field: 'deviceRunningNumber',
},
{
title: '生产图片',
field: 'makePhotourl',
},
{
title: 'SN号',
field: 'snCode',
},
{
title: '售后图片',
field: 'aftersalesPhotourl',
},
{
title: '出厂日期',
field: 'factoryDate',
},
{
title: '保修期',
field: 'guaranteePeriod',
},
{
title: '是否过保修期',
field: 'guaranteePeriodFlag',
formatter: function(value, row, index) {
return $.table.selectDictLabel(guaranteePeriodFlagDatas, value);
}
},
{
title: '是否有锁机时间',
field: 'lockDateFlag',
formatter: function(value, row, index) {
return $.table.selectDictLabel(lockDateFlagDatas, value);
}
},
{
title: '锁机时间',
field: 'lockDate',
},
{
title: '损耗品到期时间',
field: 'wastageExpireDate',
},
{
title: '是否过损耗品到期时间',
field: 'wastageExpireFlag',
formatter: function(value, row, index) {
return $.table.selectDictLabel(wastageExpireFlagDatas, value);
}
},
{
title: '二次维修后部件质保时间',
field: 'componentGuaranteeDate',
},
{
title: '是否过二次维修后部件质保日期',
field: 'componentGuaranteeFlag',
formatter: function(value, row, index) {
return $.table.selectDictLabel(componentGuaranteeFlagDatas, value);
}
},
{
title: '客户ID',
field: 'customerId',
},
{
title: '客户名称',
field: 'customerName',
},
{
title: '工程员',
field: 'engineerName',
},
// {
// title: '业务员姓名',
// field: 'salesmanName',
// },
// {
// title: '维修单号',
// field: 'maintainOrderCode',
// },
// {
// title: '维修时间',
// field: 'maintainTime',
// },
{
title: '录入时间',
field: 'createTime',
},
{
title: '更新人',
field: 'updateBy',
},
{
title: '上次更新时间',
field: 'updateTime',
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.shippingDeviceCode + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.shippingDeviceCode + '\')"><i class="fa fa-remove"></i>删除</a> ');
if(row.delFlag == '0'){
actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a> ');
}else{
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i>恢复</a> ');
}
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>
Loading…
Cancel
Save