liuxiaoxu
7 months ago
9 changed files with 1771 additions and 0 deletions
@ -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.AftersalesOrder; |
|||
import com.ruoyi.aftersales.service.IAftersalesOrderService; |
|||
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-24 |
|||
*/ |
|||
@Controller |
|||
@RequestMapping("/aftersales/aftersalesOrder") |
|||
public class AftersalesOrderController extends BaseController |
|||
{ |
|||
private String prefix = "aftersales/aftersalesOrder"; |
|||
|
|||
@Autowired |
|||
private IAftersalesOrderService aftersalesOrderService; |
|||
|
|||
@RequiresPermissions("aftersales:aftersalesOrder:view") |
|||
@GetMapping() |
|||
public String aftersalesOrder() |
|||
{ |
|||
return prefix + "/aftersalesOrder"; |
|||
} |
|||
|
|||
/** |
|||
* 查询售后单列表 |
|||
*/ |
|||
@RequiresPermissions("aftersales:aftersalesOrder:list") |
|||
@PostMapping("/list") |
|||
@ResponseBody |
|||
public TableDataInfo list(AftersalesOrder aftersalesOrder) |
|||
{ |
|||
startPage(); |
|||
List<AftersalesOrder> list = aftersalesOrderService.selectAftersalesOrderList(aftersalesOrder); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
/** |
|||
* 导出售后单列表 |
|||
*/ |
|||
@RequiresPermissions("aftersales:aftersalesOrder:export") |
|||
@Log(title = "售后单", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
@ResponseBody |
|||
public AjaxResult export(AftersalesOrder aftersalesOrder) |
|||
{ |
|||
List<AftersalesOrder> list = aftersalesOrderService.selectAftersalesOrderList(aftersalesOrder); |
|||
ExcelUtil<AftersalesOrder> util = new ExcelUtil<AftersalesOrder>(AftersalesOrder.class); |
|||
return util.exportExcel(list, "售后单数据"); |
|||
} |
|||
|
|||
/** |
|||
* 新增售后单 |
|||
*/ |
|||
@GetMapping("/add") |
|||
public String add() |
|||
{ |
|||
return prefix + "/add"; |
|||
} |
|||
|
|||
/** |
|||
* 新增保存售后单 |
|||
*/ |
|||
@RequiresPermissions("aftersales:aftersalesOrder:add") |
|||
@Log(title = "售后单", businessType = BusinessType.INSERT) |
|||
@PostMapping("/add") |
|||
@ResponseBody |
|||
public AjaxResult addSave(AftersalesOrder aftersalesOrder) |
|||
{ |
|||
return toAjax(aftersalesOrderService.insertAftersalesOrder(aftersalesOrder)); |
|||
} |
|||
|
|||
/** |
|||
* 修改售后单 |
|||
*/ |
|||
@GetMapping("/edit/{aftersalesOrderId}") |
|||
public String edit(@PathVariable("aftersalesOrderId") Long aftersalesOrderId, ModelMap mmap) |
|||
{ |
|||
AftersalesOrder aftersalesOrder = aftersalesOrderService.selectAftersalesOrderById(aftersalesOrderId); |
|||
mmap.put("aftersalesOrder", aftersalesOrder); |
|||
return prefix + "/edit"; |
|||
} |
|||
|
|||
/** |
|||
* 修改保存售后单 |
|||
*/ |
|||
@RequiresPermissions("aftersales:aftersalesOrder:edit") |
|||
@Log(title = "售后单", businessType = BusinessType.UPDATE) |
|||
@PostMapping("/edit") |
|||
@ResponseBody |
|||
public AjaxResult editSave(AftersalesOrder aftersalesOrder) |
|||
{ |
|||
return toAjax(aftersalesOrderService.updateAftersalesOrder(aftersalesOrder)); |
|||
} |
|||
|
|||
/** |
|||
* 删除售后单 |
|||
*/ |
|||
@RequiresPermissions("aftersales:aftersalesOrder:remove") |
|||
@Log(title = "售后单", businessType = BusinessType.DELETE) |
|||
@PostMapping( "/remove") |
|||
@ResponseBody |
|||
public AjaxResult remove(String ids) |
|||
{ |
|||
return toAjax(aftersalesOrderService.deleteAftersalesOrderByIds(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 作废售后单 |
|||
*/ |
|||
@RequiresPermissions("aftersales:aftersalesOrder:cancel") |
|||
@Log(title = "售后单", businessType = BusinessType.CANCEL) |
|||
@GetMapping( "/cancel/{id}") |
|||
@ResponseBody |
|||
public AjaxResult cancel(@PathVariable("id") Long id){ |
|||
return toAjax(aftersalesOrderService.cancelAftersalesOrderById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 恢复售后单 |
|||
*/ |
|||
@RequiresPermissions("aftersales:aftersalesOrder:restore") |
|||
@Log(title = "售后单", businessType = BusinessType.RESTORE) |
|||
@GetMapping( "/restore/{id}") |
|||
@ResponseBody |
|||
public AjaxResult restore(@PathVariable("id")Long id) |
|||
{ |
|||
return toAjax(aftersalesOrderService.restoreAftersalesOrderById(id)); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,422 @@ |
|||
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_order |
|||
* |
|||
* @author 刘晓旭 |
|||
* @date 2024-04-24 |
|||
*/ |
|||
public class AftersalesOrder extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 售后单ID */ |
|||
private Long aftersalesOrderId; |
|||
|
|||
/** 售后单号 */ |
|||
@Excel(name = "售后单号") |
|||
private String aftersalesOrderCode; |
|||
|
|||
/** 关联销售订单号 */ |
|||
@Excel(name = "关联销售订单号") |
|||
private String salesOrderCode; |
|||
|
|||
/** 关联生产订单号 */ |
|||
private String makeNo; |
|||
|
|||
/** 用户ID */ |
|||
private Long userId; |
|||
|
|||
/** 审核状态 */ |
|||
private String auditStatus; |
|||
|
|||
/** 售后状态 */ |
|||
@Excel(name = "售后状态") |
|||
private String aftersalesStatus; |
|||
|
|||
/** 业务员 */ |
|||
@Excel(name = "业务员") |
|||
private String businessName; |
|||
|
|||
/** 售后员 */ |
|||
@Excel(name = "售后员") |
|||
private String aftersalesName; |
|||
|
|||
/** 客户ID */ |
|||
@Excel(name = "客户ID") |
|||
private String customerId; |
|||
|
|||
/** 客户名称 */ |
|||
@Excel(name = "客户名称") |
|||
private String customerName; |
|||
|
|||
/** 料号 */ |
|||
private String materialNo; |
|||
|
|||
/** 物料名称 */ |
|||
private String materialName; |
|||
|
|||
/** 物料数合计 */ |
|||
@Excel(name = "物料数合计") |
|||
private String materialSum; |
|||
|
|||
/** 数量合计 */ |
|||
@Excel(name = "数量合计") |
|||
private String enterpriseSum; |
|||
|
|||
/** 客户要求出发日期 */ |
|||
@JsonFormat(pattern = "yyyy-MM-dd") |
|||
@Excel(name = "客户要求出发日期", width = 30, dateFormat = "yyyy-MM-dd") |
|||
private Date startDate; |
|||
|
|||
/** 收货联系人 */ |
|||
@Excel(name = "收货联系人") |
|||
private String deliveryName; |
|||
|
|||
/** 收货电话 */ |
|||
@Excel(name = "收货电话") |
|||
private String deliveryNumber; |
|||
|
|||
/** 公司地址 */ |
|||
@Excel(name = "公司地址") |
|||
private String companyAddress; |
|||
|
|||
/** 服务内容 */ |
|||
private String serviceContent; |
|||
|
|||
/** 用户评价 */ |
|||
private String userCommentAttachment; |
|||
|
|||
/** 流程实例ID */ |
|||
private String instanceId; |
|||
|
|||
/** 流程实例类型 */ |
|||
private String instanceType; |
|||
|
|||
/** 流程提交实例ID */ |
|||
private String submitInstanceId; |
|||
|
|||
/** 申请标题 */ |
|||
private String applyTitle; |
|||
|
|||
/** 申请时间 */ |
|||
private Date applyTime; |
|||
|
|||
/** 申请人 */ |
|||
private String applyUser; |
|||
|
|||
/** 流程作废实例ID */ |
|||
private String cancelInstanceId; |
|||
|
|||
/** 流程恢复实例ID */ |
|||
private String restoreInstanceId; |
|||
|
|||
public void setAftersalesOrderId(Long aftersalesOrderId) |
|||
{ |
|||
this.aftersalesOrderId = aftersalesOrderId; |
|||
} |
|||
|
|||
public Long getAftersalesOrderId() |
|||
{ |
|||
return aftersalesOrderId; |
|||
} |
|||
public void setAftersalesOrderCode(String aftersalesOrderCode) |
|||
{ |
|||
this.aftersalesOrderCode = aftersalesOrderCode; |
|||
} |
|||
|
|||
public String getAftersalesOrderCode() |
|||
{ |
|||
return aftersalesOrderCode; |
|||
} |
|||
public void setSalesOrderCode(String salesOrderCode) |
|||
{ |
|||
this.salesOrderCode = salesOrderCode; |
|||
} |
|||
|
|||
public String getSalesOrderCode() |
|||
{ |
|||
return salesOrderCode; |
|||
} |
|||
public void setMakeNo(String makeNo) |
|||
{ |
|||
this.makeNo = makeNo; |
|||
} |
|||
|
|||
public String getMakeNo() |
|||
{ |
|||
return makeNo; |
|||
} |
|||
public void setUserId(Long userId) |
|||
{ |
|||
this.userId = userId; |
|||
} |
|||
|
|||
public Long getUserId() |
|||
{ |
|||
return userId; |
|||
} |
|||
public void setAuditStatus(String auditStatus) |
|||
{ |
|||
this.auditStatus = auditStatus; |
|||
} |
|||
|
|||
public String getAuditStatus() |
|||
{ |
|||
return auditStatus; |
|||
} |
|||
public void setAftersalesStatus(String aftersalesStatus) |
|||
{ |
|||
this.aftersalesStatus = aftersalesStatus; |
|||
} |
|||
|
|||
public String getAftersalesStatus() |
|||
{ |
|||
return aftersalesStatus; |
|||
} |
|||
public void setBusinessName(String businessName) |
|||
{ |
|||
this.businessName = businessName; |
|||
} |
|||
|
|||
public String getBusinessName() |
|||
{ |
|||
return businessName; |
|||
} |
|||
public void setAftersalesName(String aftersalesName) |
|||
{ |
|||
this.aftersalesName = aftersalesName; |
|||
} |
|||
|
|||
public String getAftersalesName() |
|||
{ |
|||
return aftersalesName; |
|||
} |
|||
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 setMaterialNo(String materialNo) |
|||
{ |
|||
this.materialNo = materialNo; |
|||
} |
|||
|
|||
public String getMaterialNo() |
|||
{ |
|||
return materialNo; |
|||
} |
|||
public void setMaterialName(String materialName) |
|||
{ |
|||
this.materialName = materialName; |
|||
} |
|||
|
|||
public String getMaterialName() |
|||
{ |
|||
return materialName; |
|||
} |
|||
public void setMaterialSum(String materialSum) |
|||
{ |
|||
this.materialSum = materialSum; |
|||
} |
|||
|
|||
public String getMaterialSum() |
|||
{ |
|||
return materialSum; |
|||
} |
|||
public void setEnterpriseSum(String enterpriseSum) |
|||
{ |
|||
this.enterpriseSum = enterpriseSum; |
|||
} |
|||
|
|||
public String getEnterpriseSum() |
|||
{ |
|||
return enterpriseSum; |
|||
} |
|||
public void setStartDate(Date startDate) |
|||
{ |
|||
this.startDate = startDate; |
|||
} |
|||
|
|||
public Date getStartDate() |
|||
{ |
|||
return startDate; |
|||
} |
|||
public void setDeliveryName(String deliveryName) |
|||
{ |
|||
this.deliveryName = deliveryName; |
|||
} |
|||
|
|||
public String getDeliveryName() |
|||
{ |
|||
return deliveryName; |
|||
} |
|||
public void setDeliveryNumber(String deliveryNumber) |
|||
{ |
|||
this.deliveryNumber = deliveryNumber; |
|||
} |
|||
|
|||
public String getDeliveryNumber() |
|||
{ |
|||
return deliveryNumber; |
|||
} |
|||
public void setCompanyAddress(String companyAddress) |
|||
{ |
|||
this.companyAddress = companyAddress; |
|||
} |
|||
|
|||
public String getCompanyAddress() |
|||
{ |
|||
return companyAddress; |
|||
} |
|||
public void setServiceContent(String serviceContent) |
|||
{ |
|||
this.serviceContent = serviceContent; |
|||
} |
|||
|
|||
public String getServiceContent() |
|||
{ |
|||
return serviceContent; |
|||
} |
|||
public void setUserCommentAttachment(String userCommentAttachment) |
|||
{ |
|||
this.userCommentAttachment = userCommentAttachment; |
|||
} |
|||
|
|||
public String getUserCommentAttachment() |
|||
{ |
|||
return userCommentAttachment; |
|||
} |
|||
public void setInstanceId(String instanceId) |
|||
{ |
|||
this.instanceId = instanceId; |
|||
} |
|||
|
|||
public String getInstanceId() |
|||
{ |
|||
return instanceId; |
|||
} |
|||
public void setInstanceType(String instanceType) |
|||
{ |
|||
this.instanceType = instanceType; |
|||
} |
|||
|
|||
public String getInstanceType() |
|||
{ |
|||
return instanceType; |
|||
} |
|||
public void setSubmitInstanceId(String submitInstanceId) |
|||
{ |
|||
this.submitInstanceId = submitInstanceId; |
|||
} |
|||
|
|||
public String getSubmitInstanceId() |
|||
{ |
|||
return submitInstanceId; |
|||
} |
|||
public void setApplyTitle(String applyTitle) |
|||
{ |
|||
this.applyTitle = applyTitle; |
|||
} |
|||
|
|||
public String getApplyTitle() |
|||
{ |
|||
return applyTitle; |
|||
} |
|||
public void setApplyTime(Date applyTime) |
|||
{ |
|||
this.applyTime = applyTime; |
|||
} |
|||
|
|||
public Date getApplyTime() |
|||
{ |
|||
return applyTime; |
|||
} |
|||
public void setApplyUser(String applyUser) |
|||
{ |
|||
this.applyUser = applyUser; |
|||
} |
|||
|
|||
public String getApplyUser() |
|||
{ |
|||
return applyUser; |
|||
} |
|||
public void setCancelInstanceId(String cancelInstanceId) |
|||
{ |
|||
this.cancelInstanceId = cancelInstanceId; |
|||
} |
|||
|
|||
public String getCancelInstanceId() |
|||
{ |
|||
return cancelInstanceId; |
|||
} |
|||
public void setRestoreInstanceId(String restoreInstanceId) |
|||
{ |
|||
this.restoreInstanceId = restoreInstanceId; |
|||
} |
|||
|
|||
public String getRestoreInstanceId() |
|||
{ |
|||
return restoreInstanceId; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|||
.append("aftersalesOrderId", getAftersalesOrderId()) |
|||
.append("aftersalesOrderCode", getAftersalesOrderCode()) |
|||
.append("salesOrderCode", getSalesOrderCode()) |
|||
.append("makeNo", getMakeNo()) |
|||
.append("userId", getUserId()) |
|||
.append("auditStatus", getAuditStatus()) |
|||
.append("aftersalesStatus", getAftersalesStatus()) |
|||
.append("businessName", getBusinessName()) |
|||
.append("aftersalesName", getAftersalesName()) |
|||
.append("customerId", getCustomerId()) |
|||
.append("customerName", getCustomerName()) |
|||
.append("materialNo", getMaterialNo()) |
|||
.append("materialName", getMaterialName()) |
|||
.append("materialSum", getMaterialSum()) |
|||
.append("enterpriseSum", getEnterpriseSum()) |
|||
.append("startDate", getStartDate()) |
|||
.append("deliveryName", getDeliveryName()) |
|||
.append("deliveryNumber", getDeliveryNumber()) |
|||
.append("companyAddress", getCompanyAddress()) |
|||
.append("createBy", getCreateBy()) |
|||
.append("createTime", getCreateTime()) |
|||
.append("updateBy", getUpdateBy()) |
|||
.append("updateTime", getUpdateTime()) |
|||
.append("remark", getRemark()) |
|||
.append("serviceContent", getServiceContent()) |
|||
.append("userCommentAttachment", getUserCommentAttachment()) |
|||
.append("instanceId", getInstanceId()) |
|||
.append("instanceType", getInstanceType()) |
|||
.append("submitInstanceId", getSubmitInstanceId()) |
|||
.append("applyTitle", getApplyTitle()) |
|||
.append("applyTime", getApplyTime()) |
|||
.append("applyUser", getApplyUser()) |
|||
.append("cancelInstanceId", getCancelInstanceId()) |
|||
.append("restoreInstanceId", getRestoreInstanceId()) |
|||
.toString(); |
|||
} |
|||
} |
@ -0,0 +1,77 @@ |
|||
package com.ruoyi.aftersales.mapper; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.aftersales.domain.AftersalesOrder; |
|||
|
|||
/** |
|||
* 售后单Mapper接口 |
|||
* |
|||
* @author 刘晓旭 |
|||
* @date 2024-04-24 |
|||
*/ |
|||
public interface AftersalesOrderMapper |
|||
{ |
|||
/** |
|||
* 查询售后单 |
|||
* |
|||
* @param aftersalesOrderId 售后单ID |
|||
* @return 售后单 |
|||
*/ |
|||
public AftersalesOrder selectAftersalesOrderById(Long aftersalesOrderId); |
|||
|
|||
/** |
|||
* 查询售后单列表 |
|||
* |
|||
* @param aftersalesOrder 售后单 |
|||
* @return 售后单集合 |
|||
*/ |
|||
public List<AftersalesOrder> selectAftersalesOrderList(AftersalesOrder aftersalesOrder); |
|||
|
|||
/** |
|||
* 新增售后单 |
|||
* |
|||
* @param aftersalesOrder 售后单 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertAftersalesOrder(AftersalesOrder aftersalesOrder); |
|||
|
|||
/** |
|||
* 修改售后单 |
|||
* |
|||
* @param aftersalesOrder 售后单 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateAftersalesOrder(AftersalesOrder aftersalesOrder); |
|||
|
|||
/** |
|||
* 删除售后单 |
|||
* |
|||
* @param aftersalesOrderId 售后单ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteAftersalesOrderById(Long aftersalesOrderId); |
|||
|
|||
/** |
|||
* 批量删除售后单 |
|||
* |
|||
* @param aftersalesOrderIds 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteAftersalesOrderByIds(String[] aftersalesOrderIds); |
|||
|
|||
/** |
|||
* 作废售后单 |
|||
* |
|||
* @param aftersalesOrderId 售后单ID |
|||
* @return 结果 |
|||
*/ |
|||
public int cancelAftersalesOrderById(Long aftersalesOrderId); |
|||
|
|||
/** |
|||
* 恢复售后单 |
|||
* |
|||
* @param aftersalesOrderId 售后单ID |
|||
* @return 结果 |
|||
*/ |
|||
public int restoreAftersalesOrderById(Long aftersalesOrderId); |
|||
} |
@ -0,0 +1,75 @@ |
|||
package com.ruoyi.aftersales.service; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.aftersales.domain.AftersalesOrder; |
|||
|
|||
/** |
|||
* 售后单Service接口 |
|||
* |
|||
* @author 刘晓旭 |
|||
* @date 2024-04-24 |
|||
*/ |
|||
public interface IAftersalesOrderService |
|||
{ |
|||
/** |
|||
* 查询售后单 |
|||
* |
|||
* @param aftersalesOrderId 售后单ID |
|||
* @return 售后单 |
|||
*/ |
|||
public AftersalesOrder selectAftersalesOrderById(Long aftersalesOrderId); |
|||
|
|||
/** |
|||
* 查询售后单列表 |
|||
* |
|||
* @param aftersalesOrder 售后单 |
|||
* @return 售后单集合 |
|||
*/ |
|||
public List<AftersalesOrder> selectAftersalesOrderList(AftersalesOrder aftersalesOrder); |
|||
|
|||
/** |
|||
* 新增售后单 |
|||
* |
|||
* @param aftersalesOrder 售后单 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertAftersalesOrder(AftersalesOrder aftersalesOrder); |
|||
|
|||
/** |
|||
* 修改售后单 |
|||
* |
|||
* @param aftersalesOrder 售后单 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateAftersalesOrder(AftersalesOrder aftersalesOrder); |
|||
|
|||
/** |
|||
* 批量删除售后单 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteAftersalesOrderByIds(String ids); |
|||
|
|||
/** |
|||
* 删除售后单信息 |
|||
* |
|||
* @param aftersalesOrderId 售后单ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteAftersalesOrderById(Long aftersalesOrderId); |
|||
|
|||
/** |
|||
* 作废售后单 |
|||
* @param aftersalesOrderId 售后单ID |
|||
* @return |
|||
*/ |
|||
int cancelAftersalesOrderById(Long aftersalesOrderId); |
|||
|
|||
/** |
|||
* 恢复售后单 |
|||
* @param aftersalesOrderId 售后单ID |
|||
* @return |
|||
*/ |
|||
int restoreAftersalesOrderById(Long aftersalesOrderId); |
|||
} |
@ -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.AftersalesOrderMapper; |
|||
import com.ruoyi.aftersales.domain.AftersalesOrder; |
|||
import com.ruoyi.aftersales.service.IAftersalesOrderService; |
|||
import com.ruoyi.common.core.text.Convert; |
|||
|
|||
/** |
|||
* 售后单Service业务层处理 |
|||
* |
|||
* @author 刘晓旭 |
|||
* @date 2024-04-24 |
|||
*/ |
|||
@Service |
|||
public class AftersalesOrderServiceImpl implements IAftersalesOrderService |
|||
{ |
|||
@Autowired |
|||
private AftersalesOrderMapper aftersalesOrderMapper; |
|||
|
|||
/** |
|||
* 查询售后单 |
|||
* |
|||
* @param aftersalesOrderId 售后单ID |
|||
* @return 售后单 |
|||
*/ |
|||
@Override |
|||
public AftersalesOrder selectAftersalesOrderById(Long aftersalesOrderId) |
|||
{ |
|||
return aftersalesOrderMapper.selectAftersalesOrderById(aftersalesOrderId); |
|||
} |
|||
|
|||
/** |
|||
* 查询售后单列表 |
|||
* |
|||
* @param aftersalesOrder 售后单 |
|||
* @return 售后单 |
|||
*/ |
|||
@Override |
|||
public List<AftersalesOrder> selectAftersalesOrderList(AftersalesOrder aftersalesOrder) |
|||
{ |
|||
return aftersalesOrderMapper.selectAftersalesOrderList(aftersalesOrder); |
|||
} |
|||
|
|||
/** |
|||
* 新增售后单 |
|||
* |
|||
* @param aftersalesOrder 售后单 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int insertAftersalesOrder(AftersalesOrder aftersalesOrder) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
aftersalesOrder.setCreateBy(loginName); |
|||
aftersalesOrder.setCreateTime(DateUtils.getNowDate()); |
|||
return aftersalesOrderMapper.insertAftersalesOrder(aftersalesOrder); |
|||
} |
|||
|
|||
/** |
|||
* 修改售后单 |
|||
* |
|||
* @param aftersalesOrder 售后单 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int updateAftersalesOrder(AftersalesOrder aftersalesOrder) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
aftersalesOrder.setUpdateBy(loginName); |
|||
aftersalesOrder.setUpdateTime(DateUtils.getNowDate()); |
|||
return aftersalesOrderMapper.updateAftersalesOrder(aftersalesOrder); |
|||
} |
|||
|
|||
/** |
|||
* 删除售后单对象 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteAftersalesOrderByIds(String ids) |
|||
{ |
|||
return aftersalesOrderMapper.deleteAftersalesOrderByIds(Convert.toStrArray(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 删除售后单信息 |
|||
* |
|||
* @param aftersalesOrderId 售后单ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteAftersalesOrderById(Long aftersalesOrderId) |
|||
{ |
|||
return aftersalesOrderMapper.deleteAftersalesOrderById(aftersalesOrderId); |
|||
} |
|||
|
|||
/** |
|||
* 作废售后单 |
|||
* |
|||
* @param aftersalesOrderId 售后单ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int cancelAftersalesOrderById(Long aftersalesOrderId) |
|||
{ |
|||
return aftersalesOrderMapper.cancelAftersalesOrderById(aftersalesOrderId); |
|||
} |
|||
|
|||
/** |
|||
* 恢复售后单信息 |
|||
* |
|||
* @param aftersalesOrderId 售后单ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int restoreAftersalesOrderById(Long aftersalesOrderId) |
|||
{ |
|||
return aftersalesOrderMapper.restoreAftersalesOrderById(aftersalesOrderId); |
|||
} |
|||
} |
@ -0,0 +1,198 @@ |
|||
<?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.AftersalesOrderMapper"> |
|||
|
|||
<resultMap type="AftersalesOrder" id="AftersalesOrderResult"> |
|||
<result property="aftersalesOrderId" column="aftersales_order_id" /> |
|||
<result property="aftersalesOrderCode" column="aftersales_order_code" /> |
|||
<result property="salesOrderCode" column="sales_order_code" /> |
|||
<result property="makeNo" column="make_no" /> |
|||
<result property="userId" column="user_id" /> |
|||
<result property="auditStatus" column="audit_status" /> |
|||
<result property="aftersalesStatus" column="aftersales_status" /> |
|||
<result property="businessName" column="business_name" /> |
|||
<result property="aftersalesName" column="aftersales_name" /> |
|||
<result property="customerId" column="customer_id" /> |
|||
<result property="customerName" column="customer_name" /> |
|||
<result property="materialNo" column="material_no" /> |
|||
<result property="materialName" column="material_name" /> |
|||
<result property="materialSum" column="material_sum" /> |
|||
<result property="enterpriseSum" column="enterprise_sum" /> |
|||
<result property="startDate" column="start_date" /> |
|||
<result property="deliveryName" column="delivery_name" /> |
|||
<result property="deliveryNumber" column="delivery_number" /> |
|||
<result property="companyAddress" column="company_address" /> |
|||
<result property="createBy" column="create_by" /> |
|||
<result property="createTime" column="create_time" /> |
|||
<result property="updateBy" column="update_by" /> |
|||
<result property="updateTime" column="update_time" /> |
|||
<result property="remark" column="remark" /> |
|||
<result property="serviceContent" column="service_content" /> |
|||
<result property="userCommentAttachment" column="user_comment_attachment" /> |
|||
<result property="instanceId" column="instance_id" /> |
|||
<result property="instanceType" column="instance_type" /> |
|||
<result property="submitInstanceId" column="submit_instance_id" /> |
|||
<result property="applyTitle" column="apply_title" /> |
|||
<result property="applyTime" column="apply_time" /> |
|||
<result property="applyUser" column="apply_user" /> |
|||
<result property="cancelInstanceId" column="cancel_instance_id" /> |
|||
<result property="restoreInstanceId" column="restore_instance_id" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectAftersalesOrderVo"> |
|||
select aftersales_order_id, aftersales_order_code, sales_order_code, make_no, user_id, audit_status, aftersales_status, business_name, aftersales_name, customer_id, customer_name, material_no, material_name, material_sum, enterprise_sum, start_date, delivery_name, delivery_number, company_address, create_by, create_time, update_by, update_time, remark, service_content, user_comment_attachment, instance_id, instance_type, submit_instance_id, apply_title, apply_time, apply_user, cancel_instance_id, restore_instance_id from aftersales_order |
|||
</sql> |
|||
|
|||
<select id="selectAftersalesOrderList" parameterType="AftersalesOrder" resultMap="AftersalesOrderResult"> |
|||
<include refid="selectAftersalesOrderVo"/> |
|||
<where> |
|||
<if test="aftersalesOrderCode != null and aftersalesOrderCode != ''"> and aftersales_order_code = #{aftersalesOrderCode}</if> |
|||
<if test="salesOrderCode != null and salesOrderCode != ''"> and sales_order_code = #{salesOrderCode}</if> |
|||
<if test="aftersalesStatus != null and aftersalesStatus != ''"> and aftersales_status = #{aftersalesStatus}</if> |
|||
<if test="businessName != null and businessName != ''"> and business_name like concat('%', #{businessName}, '%')</if> |
|||
<if test="aftersalesName != null and aftersalesName != ''"> and aftersales_name like concat('%', #{aftersalesName}, '%')</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="selectAftersalesOrderById" parameterType="Long" resultMap="AftersalesOrderResult"> |
|||
<include refid="selectAftersalesOrderVo"/> |
|||
where aftersales_order_id = #{aftersalesOrderId} |
|||
</select> |
|||
|
|||
<insert id="insertAftersalesOrder" parameterType="AftersalesOrder" useGeneratedKeys="true" keyProperty="aftersalesOrderId"> |
|||
insert into aftersales_order |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="aftersalesOrderCode != null">aftersales_order_code,</if> |
|||
<if test="salesOrderCode != null">sales_order_code,</if> |
|||
<if test="makeNo != null">make_no,</if> |
|||
<if test="userId != null">user_id,</if> |
|||
<if test="auditStatus != null">audit_status,</if> |
|||
<if test="aftersalesStatus != null">aftersales_status,</if> |
|||
<if test="businessName != null">business_name,</if> |
|||
<if test="aftersalesName != null">aftersales_name,</if> |
|||
<if test="customerId != null">customer_id,</if> |
|||
<if test="customerName != null">customer_name,</if> |
|||
<if test="materialNo != null">material_no,</if> |
|||
<if test="materialName != null">material_name,</if> |
|||
<if test="materialSum != null">material_sum,</if> |
|||
<if test="enterpriseSum != null">enterprise_sum,</if> |
|||
<if test="startDate != null">start_date,</if> |
|||
<if test="deliveryName != null">delivery_name,</if> |
|||
<if test="deliveryNumber != null">delivery_number,</if> |
|||
<if test="companyAddress != null">company_address,</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> |
|||
<if test="remark != null">remark,</if> |
|||
<if test="serviceContent != null">service_content,</if> |
|||
<if test="userCommentAttachment != null">user_comment_attachment,</if> |
|||
<if test="instanceId != null">instance_id,</if> |
|||
<if test="instanceType != null">instance_type,</if> |
|||
<if test="submitInstanceId != null">submit_instance_id,</if> |
|||
<if test="applyTitle != null">apply_title,</if> |
|||
<if test="applyTime != null">apply_time,</if> |
|||
<if test="applyUser != null">apply_user,</if> |
|||
<if test="cancelInstanceId != null">cancel_instance_id,</if> |
|||
<if test="restoreInstanceId != null">restore_instance_id,</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="aftersalesOrderCode != null">#{aftersalesOrderCode},</if> |
|||
<if test="salesOrderCode != null">#{salesOrderCode},</if> |
|||
<if test="makeNo != null">#{makeNo},</if> |
|||
<if test="userId != null">#{userId},</if> |
|||
<if test="auditStatus != null">#{auditStatus},</if> |
|||
<if test="aftersalesStatus != null">#{aftersalesStatus},</if> |
|||
<if test="businessName != null">#{businessName},</if> |
|||
<if test="aftersalesName != null">#{aftersalesName},</if> |
|||
<if test="customerId != null">#{customerId},</if> |
|||
<if test="customerName != null">#{customerName},</if> |
|||
<if test="materialNo != null">#{materialNo},</if> |
|||
<if test="materialName != null">#{materialName},</if> |
|||
<if test="materialSum != null">#{materialSum},</if> |
|||
<if test="enterpriseSum != null">#{enterpriseSum},</if> |
|||
<if test="startDate != null">#{startDate},</if> |
|||
<if test="deliveryName != null">#{deliveryName},</if> |
|||
<if test="deliveryNumber != null">#{deliveryNumber},</if> |
|||
<if test="companyAddress != null">#{companyAddress},</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> |
|||
<if test="remark != null">#{remark},</if> |
|||
<if test="serviceContent != null">#{serviceContent},</if> |
|||
<if test="userCommentAttachment != null">#{userCommentAttachment},</if> |
|||
<if test="instanceId != null">#{instanceId},</if> |
|||
<if test="instanceType != null">#{instanceType},</if> |
|||
<if test="submitInstanceId != null">#{submitInstanceId},</if> |
|||
<if test="applyTitle != null">#{applyTitle},</if> |
|||
<if test="applyTime != null">#{applyTime},</if> |
|||
<if test="applyUser != null">#{applyUser},</if> |
|||
<if test="cancelInstanceId != null">#{cancelInstanceId},</if> |
|||
<if test="restoreInstanceId != null">#{restoreInstanceId},</if> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateAftersalesOrder" parameterType="AftersalesOrder"> |
|||
update aftersales_order |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="aftersalesOrderCode != null">aftersales_order_code = #{aftersalesOrderCode},</if> |
|||
<if test="salesOrderCode != null">sales_order_code = #{salesOrderCode},</if> |
|||
<if test="makeNo != null">make_no = #{makeNo},</if> |
|||
<if test="userId != null">user_id = #{userId},</if> |
|||
<if test="auditStatus != null">audit_status = #{auditStatus},</if> |
|||
<if test="aftersalesStatus != null">aftersales_status = #{aftersalesStatus},</if> |
|||
<if test="businessName != null">business_name = #{businessName},</if> |
|||
<if test="aftersalesName != null">aftersales_name = #{aftersalesName},</if> |
|||
<if test="customerId != null">customer_id = #{customerId},</if> |
|||
<if test="customerName != null">customer_name = #{customerName},</if> |
|||
<if test="materialNo != null">material_no = #{materialNo},</if> |
|||
<if test="materialName != null">material_name = #{materialName},</if> |
|||
<if test="materialSum != null">material_sum = #{materialSum},</if> |
|||
<if test="enterpriseSum != null">enterprise_sum = #{enterpriseSum},</if> |
|||
<if test="startDate != null">start_date = #{startDate},</if> |
|||
<if test="deliveryName != null">delivery_name = #{deliveryName},</if> |
|||
<if test="deliveryNumber != null">delivery_number = #{deliveryNumber},</if> |
|||
<if test="companyAddress != null">company_address = #{companyAddress},</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> |
|||
<if test="remark != null">remark = #{remark},</if> |
|||
<if test="serviceContent != null">service_content = #{serviceContent},</if> |
|||
<if test="userCommentAttachment != null">user_comment_attachment = #{userCommentAttachment},</if> |
|||
<if test="instanceId != null">instance_id = #{instanceId},</if> |
|||
<if test="instanceType != null">instance_type = #{instanceType},</if> |
|||
<if test="submitInstanceId != null">submit_instance_id = #{submitInstanceId},</if> |
|||
<if test="applyTitle != null">apply_title = #{applyTitle},</if> |
|||
<if test="applyTime != null">apply_time = #{applyTime},</if> |
|||
<if test="applyUser != null">apply_user = #{applyUser},</if> |
|||
<if test="cancelInstanceId != null">cancel_instance_id = #{cancelInstanceId},</if> |
|||
<if test="restoreInstanceId != null">restore_instance_id = #{restoreInstanceId},</if> |
|||
</trim> |
|||
where aftersales_order_id = #{aftersalesOrderId} |
|||
</update> |
|||
|
|||
<delete id="deleteAftersalesOrderById" parameterType="Long"> |
|||
delete from aftersales_order where aftersales_order_id = #{aftersalesOrderId} |
|||
</delete> |
|||
|
|||
<delete id="deleteAftersalesOrderByIds" parameterType="String"> |
|||
delete from aftersales_order where aftersales_order_id in |
|||
<foreach item="aftersalesOrderId" collection="array" open="(" separator="," close=")"> |
|||
#{aftersalesOrderId} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<update id="cancelAftersalesOrderById" parameterType="Long"> |
|||
update aftersales_order set del_flag = '1' where aftersales_order_id = #{aftersalesOrderId} |
|||
</update> |
|||
|
|||
<update id="restoreAftersalesOrderById" parameterType="Long"> |
|||
update aftersales_order set del_flag = '0' where aftersales_order_id = #{aftersalesOrderId} |
|||
</update> |
|||
|
|||
</mapper> |
@ -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" /> |
|||
<th:block th:include="include :: summernote-css" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-aftersalesOrder-add"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">售后单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="aftersalesOrderCode" 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="salesOrderCode" 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="makeNo" 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="userId" 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="radio-box"> |
|||
<input type="radio" name="auditStatus" value=""> |
|||
<label th:for="auditStatus" th:text="未知"></label> |
|||
</div> |
|||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">售后状态:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="aftersalesStatus" class="form-control m-b" th:with="type=${@dict.getType('sales_aftersales_status')}"> |
|||
<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="businessName" 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="aftersalesName" 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="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="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="materialSum" 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="enterpriseSum" 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="startDate" 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="deliveryName" 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="deliveryNumber" 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="companyAddress" 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="remark" 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 type="hidden" class="form-control" name="serviceContent"> |
|||
<div class="summernote" id="serviceContent"></div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">用户评价:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="userCommentAttachment" 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="instanceId" 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="instanceType" class="form-control m-b"> |
|||
<option value="">所有</option> |
|||
</select> |
|||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">流程提交实例ID:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="submitInstanceId" 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="applyTitle" 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="applyTime" 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="applyUser" 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="cancelInstanceId" 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="restoreInstanceId" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<th:block th:include="include :: summernote-js" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "aftersales/aftersalesOrder" |
|||
$("#form-aftersalesOrder-add").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/add", $('#form-aftersalesOrder-add').serialize()); |
|||
} |
|||
} |
|||
|
|||
$("input[name='startDate']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
$("input[name='applyTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
$(function() { |
|||
$('.summernote').summernote({ |
|||
lang: 'zh-CN', |
|||
callbacks: { |
|||
onChange: function(contents, $edittable) { |
|||
$("input[name='" + this.id + "']").val(contents); |
|||
}, |
|||
onImageUpload: function(files) { |
|||
var obj = this; |
|||
var data = new FormData(); |
|||
data.append("file", files[0]); |
|||
$.ajax({ |
|||
type: "post", |
|||
url: ctx + "common/upload", |
|||
data: data, |
|||
cache: false, |
|||
contentType: false, |
|||
processData: false, |
|||
dataType: 'json', |
|||
success: function(result) { |
|||
if (result.code == web_status.SUCCESS) { |
|||
$('#' + obj.id).summernote('insertImage', result.url); |
|||
} else { |
|||
$.modal.alertError(result.msg); |
|||
} |
|||
}, |
|||
error: function(error) { |
|||
$.modal.alertWarning("图片上传失败。"); |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,185 @@ |
|||
<!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>售后单号:</label> |
|||
<input type="text" name="aftersalesOrderCode"/> |
|||
</li> |
|||
<li> |
|||
<label>关联销售订单号:</label> |
|||
<input type="text" name="salesOrderCode"/> |
|||
</li> |
|||
<li> |
|||
<label>业务员:</label> |
|||
<input type="text" name="businessName"/> |
|||
</li> |
|||
<li> |
|||
<label>售后员:</label> |
|||
<input type="text" name="aftersalesName"/> |
|||
</li> |
|||
<li> |
|||
<label>售后状态:</label> |
|||
<select name="aftersalesStatus" th:with="type=${@dict.getType('sales_aftersales_status')}"> |
|||
<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[beginCreateTime]"/> |
|||
<span>-</span> |
|||
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/> |
|||
</li> |
|||
<li> |
|||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
|||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</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:aftersalesOrder:add">--> |
|||
<!-- <i class="fa fa-plus"></i> 添加--> |
|||
<!-- </a>--> |
|||
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="aftersales:aftersalesOrder:edit">--> |
|||
<!-- <i class="fa fa-edit"></i> 修改--> |
|||
<!-- </a>--> |
|||
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="aftersales:aftersalesOrder:remove">--> |
|||
<!-- <i class="fa fa-remove"></i> 删除--> |
|||
<!-- </a>--> |
|||
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="aftersales:aftersalesOrder: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:aftersalesOrder:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('aftersales:aftersalesOrder:remove')}]]; |
|||
var cancelFlag = [[${@permission.hasPermi('aftersales:aftersalesOrder:cancel')}]]; |
|||
var restoreFlag = [[${@permission.hasPermi('aftersales:aftersalesOrder:restore')}]]; |
|||
var aftersalesStatusDatas = [[${@dict.getType('sales_aftersales_status')}]]; |
|||
var prefix = ctx + "aftersales/aftersalesOrder"; |
|||
|
|||
$(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: '售后单ID', |
|||
field: 'aftersalesOrderId', |
|||
visible: false |
|||
}, |
|||
|
|||
{ |
|||
title: '售后状态', |
|||
field: 'aftersalesStatus', |
|||
formatter: function (value, row, index) { |
|||
return $.table.selectDictLabel(aftersalesStatusDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
title: '售后单号', |
|||
field: 'aftersalesOrderCode', |
|||
}, |
|||
{ |
|||
title: '业务员', |
|||
field: 'businessName', |
|||
}, |
|||
{ |
|||
title: '关联销售单号', |
|||
field: 'salesOrderCode', |
|||
}, |
|||
{ |
|||
title: '客户ID', |
|||
field: 'customerId', |
|||
}, |
|||
{ |
|||
title: '客户名称', |
|||
field: 'customerName', |
|||
}, |
|||
{ |
|||
title: '物料合计', |
|||
field: 'materialSum', |
|||
}, |
|||
{ |
|||
title: '数量合计', |
|||
field: 'enterpriseSum', |
|||
}, |
|||
{ |
|||
title: '联系人', |
|||
field: 'deliveryName', |
|||
}, |
|||
{ |
|||
title: '联系电话', |
|||
field: 'deliveryNumber', |
|||
}, |
|||
{ |
|||
title: '客户要求出发日期', |
|||
field: 'startDate', |
|||
}, |
|||
{ |
|||
title: '公司地址', |
|||
field: 'companyAddress', |
|||
}, |
|||
{ |
|||
title: '售后员', |
|||
field: 'aftersalesName', |
|||
}, |
|||
{ |
|||
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.aftersalesOrderId + '\')"><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.aftersalesOrderId + '\')"><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> |
@ -0,0 +1,271 @@ |
|||
<!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" /> |
|||
<th:block th:include="include :: summernote-css" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-aftersalesOrder-edit" th:object="${aftersalesOrder}"> |
|||
<input name="aftersalesOrderId" th:field="*{aftersalesOrderId}" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">售后单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="aftersalesOrderCode" th:field="*{aftersalesOrderCode}" 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="salesOrderCode" th:field="*{salesOrderCode}" 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="makeNo" th:field="*{makeNo}" 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="userId" th:field="*{userId}" 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="radio-box"> |
|||
<input type="radio" name="auditStatus" value=""> |
|||
<label th:for="auditStatus" th:text="未知"></label> |
|||
</div> |
|||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">售后状态:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="aftersalesStatus" class="form-control m-b" th:with="type=${@dict.getType('sales_aftersales_status')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{aftersalesStatus}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">业务员:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="businessName" th:field="*{businessName}" 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="aftersalesName" th:field="*{aftersalesName}" 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="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="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="materialSum" th:field="*{materialSum}" 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="enterpriseSum" th:field="*{enterpriseSum}" 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="startDate" th:value="${#dates.format(aftersalesOrder.startDate, '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="deliveryName" th:field="*{deliveryName}" 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="deliveryNumber" th:field="*{deliveryNumber}" 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="companyAddress" th:field="*{companyAddress}" 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="remark" th:field="*{remark}" 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 type="hidden" class="form-control" th:field="*{serviceContent}"> |
|||
<div class="summernote" id="serviceContent"></div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">用户评价:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="userCommentAttachment" th:field="*{userCommentAttachment}" 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="instanceId" th:field="*{instanceId}" 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="instanceType" class="form-control m-b"> |
|||
<option value="">所有</option> |
|||
</select> |
|||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">流程提交实例ID:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="submitInstanceId" th:field="*{submitInstanceId}" 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="applyTitle" th:field="*{applyTitle}" 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="applyTime" th:value="${#dates.format(aftersalesOrder.applyTime, '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="applyUser" th:field="*{applyUser}" 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="cancelInstanceId" th:field="*{cancelInstanceId}" 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="restoreInstanceId" th:field="*{restoreInstanceId}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<th:block th:include="include :: summernote-js" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "aftersales/aftersalesOrder"; |
|||
$("#form-aftersalesOrder-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/edit", $('#form-aftersalesOrder-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
$("input[name='startDate']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
$("input[name='applyTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
$(function() { |
|||
$('.summernote').each(function(i) { |
|||
$('#' + this.id).summernote({ |
|||
lang: 'zh-CN', |
|||
callbacks: { |
|||
onChange: function(contents, $edittable) { |
|||
$("input[name='" + this.id + "']").val(contents); |
|||
}, |
|||
onImageUpload: function(files) { |
|||
var obj = this; |
|||
var data = new FormData(); |
|||
data.append("file", files[0]); |
|||
$.ajax({ |
|||
type: "post", |
|||
url: ctx + "common/upload", |
|||
data: data, |
|||
cache: false, |
|||
contentType: false, |
|||
processData: false, |
|||
dataType: 'json', |
|||
success: function(result) { |
|||
if (result.code == web_status.SUCCESS) { |
|||
$('#' + obj.id).summernote('insertImage', result.url); |
|||
} else { |
|||
$.modal.alertError(result.msg); |
|||
} |
|||
}, |
|||
error: function(error) { |
|||
$.modal.alertWarning("图片上传失败。"); |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
var content = $("input[name='" + this.id + "']").val(); |
|||
$('#' + this.id).summernote('code', content); |
|||
}) |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue