订单增加赠送时长字段,增加服务暂停管理列表,身份证号验证方法优化
This commit is contained in:
parent
d80f3aca1a
commit
340399c720
@ -1,11 +1,9 @@
|
|||||||
package com.stdiet.web.controller.custom;
|
package com.stdiet.web.controller.custom;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.stdiet.custom.domain.SysPhysicalSigns;
|
import com.stdiet.custom.domain.SysPhysicalSigns;
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
|
|
||||||
import com.stdiet.common.utils.bean.ObjectUtils;
|
import com.stdiet.common.utils.bean.ObjectUtils;
|
||||||
import com.stdiet.custom.dto.request.CustomerInvestigateRequest;
|
import com.stdiet.custom.dto.request.CustomerInvestigateRequest;
|
||||||
@ -67,6 +65,7 @@ public class SysCustomerController extends BaseController
|
|||||||
CustomerListResponse customerListResponse = null;
|
CustomerListResponse customerListResponse = null;
|
||||||
for (SysCustomer customer : list) {
|
for (SysCustomer customer : list) {
|
||||||
customerListResponse = ObjectUtils.getObjectByObject(customer.getSign(), CustomerListResponse.class);
|
customerListResponse = ObjectUtils.getObjectByObject(customer.getSign(), CustomerListResponse.class);
|
||||||
|
customerListResponse.setCreateTime(customer.getCreateTime());
|
||||||
customerListResponse.setName(customer.getName());
|
customerListResponse.setName(customer.getName());
|
||||||
customerListResponse.setPhone(customer.getPhone());
|
customerListResponse.setPhone(customer.getPhone());
|
||||||
StringBuilder signStr = new StringBuilder();
|
StringBuilder signStr = new StringBuilder();
|
||||||
|
@ -0,0 +1,106 @@
|
|||||||
|
package com.stdiet.web.controller.custom;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.stdiet.common.annotation.Log;
|
||||||
|
import com.stdiet.common.core.controller.BaseController;
|
||||||
|
import com.stdiet.common.core.domain.AjaxResult;
|
||||||
|
import com.stdiet.common.enums.BusinessType;
|
||||||
|
import com.stdiet.custom.domain.SysOrderPause;
|
||||||
|
import com.stdiet.custom.service.ISysOrderPauseService;
|
||||||
|
import com.stdiet.common.utils.poi.ExcelUtil;
|
||||||
|
import com.stdiet.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单服务暂停Controller
|
||||||
|
*
|
||||||
|
* @author wonder
|
||||||
|
* @date 2021-01-07
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/orderPause/pause")
|
||||||
|
public class SysOrderPauseController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ISysOrderPauseService sysOrderPauseService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询订单服务暂停列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('orderPause:pause:query')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(SysOrderPause sysOrderPause)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<SysOrderPause> list = sysOrderPauseService.selectSysOrderPauseList(sysOrderPause);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出订单服务暂停列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('orderPause:pause:export')")
|
||||||
|
@Log(title = "订单服务暂停", businessType = BusinessType.EXPORT)
|
||||||
|
@GetMapping("/export")
|
||||||
|
public AjaxResult export(SysOrderPause sysOrderPause)
|
||||||
|
{
|
||||||
|
List<SysOrderPause> list = sysOrderPauseService.selectSysOrderPauseList(sysOrderPause);
|
||||||
|
ExcelUtil<SysOrderPause> util = new ExcelUtil<SysOrderPause>(SysOrderPause.class);
|
||||||
|
return util.exportExcel(list, "pause");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取订单服务暂停详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('orderPause:pause:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(sysOrderPauseService.selectSysOrderPauseById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增订单服务暂停
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('orderPause:pause:add')")
|
||||||
|
@Log(title = "订单服务暂停", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody SysOrderPause sysOrderPause)
|
||||||
|
{
|
||||||
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
System.out.println(simpleDateFormat.format(sysOrderPause.getPauseStartDate()));
|
||||||
|
return toAjax(sysOrderPauseService.insertSysOrderPause(sysOrderPause));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改订单服务暂停
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('orderPause:pause:edit')")
|
||||||
|
@Log(title = "订单服务暂停", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody SysOrderPause sysOrderPause)
|
||||||
|
{
|
||||||
|
return toAjax(sysOrderPauseService.updateSysOrderPause(sysOrderPause));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除订单服务暂停
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('orderPause:pause:remove')")
|
||||||
|
@Log(title = "订单服务暂停", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(sysOrderPauseService.deleteSysOrderPauseByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
@ -169,6 +169,12 @@ public class SysOrder extends BaseEntity {
|
|||||||
@Excel(name = "服务时长")
|
@Excel(name = "服务时长")
|
||||||
private String serveTime;
|
private String serveTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 赠送时长
|
||||||
|
*/
|
||||||
|
@Excel(name = "赠送时长", width = 30, suffix = "天")
|
||||||
|
private String giveServeDay;
|
||||||
|
|
||||||
private Long serveTimeId;
|
private Long serveTimeId;
|
||||||
|
|
||||||
@Excel(name = "审核状态", dictType = "cus_review_status")
|
@Excel(name = "审核状态", dictType = "cus_review_status")
|
||||||
@ -448,6 +454,14 @@ public class SysOrder extends BaseEntity {
|
|||||||
return orderTime;
|
return orderTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getGiveServeDay() {
|
||||||
|
return giveServeDay;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGiveServeDay(String giveServeDay) {
|
||||||
|
this.giveServeDay = giveServeDay;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
@ -0,0 +1,127 @@
|
|||||||
|
package com.stdiet.custom.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.stdiet.common.annotation.Excel;
|
||||||
|
import com.stdiet.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单服务暂停对象 sys_order_pause
|
||||||
|
*
|
||||||
|
* @author xzj
|
||||||
|
* @date 2021-01-07
|
||||||
|
*/
|
||||||
|
public class SysOrderPause extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** $column.columnComment */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 订单id */
|
||||||
|
private Long orderId;
|
||||||
|
|
||||||
|
/** 服务暂停开始时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "服务暂停开始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date pauseStartDate;
|
||||||
|
|
||||||
|
/** 服务暂停结束时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "服务暂停结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date pauseEndDate;
|
||||||
|
|
||||||
|
/** 服务暂停理由 */
|
||||||
|
@Excel(name = "服务暂停理由")
|
||||||
|
private String reason;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
@Excel(name = "备注")
|
||||||
|
private String remarks;
|
||||||
|
|
||||||
|
/** 删除标识 0未删除 1已删除,默认0 */
|
||||||
|
private Integer delFlag;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setOrderId(Long orderId)
|
||||||
|
{
|
||||||
|
this.orderId = orderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getOrderId()
|
||||||
|
{
|
||||||
|
return orderId;
|
||||||
|
}
|
||||||
|
public void setPauseStartDate(Date pauseStartDate)
|
||||||
|
{
|
||||||
|
this.pauseStartDate = pauseStartDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getPauseStartDate()
|
||||||
|
{
|
||||||
|
return pauseStartDate;
|
||||||
|
}
|
||||||
|
public void setPauseEndDate(Date pauseEndDate)
|
||||||
|
{
|
||||||
|
this.pauseEndDate = pauseEndDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getPauseEndDate()
|
||||||
|
{
|
||||||
|
return pauseEndDate;
|
||||||
|
}
|
||||||
|
public void setReason(String reason)
|
||||||
|
{
|
||||||
|
this.reason = reason;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReason()
|
||||||
|
{
|
||||||
|
return reason;
|
||||||
|
}
|
||||||
|
public void setRemarks(String remarks)
|
||||||
|
{
|
||||||
|
this.remarks = remarks;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRemarks()
|
||||||
|
{
|
||||||
|
return remarks;
|
||||||
|
}
|
||||||
|
public void setDelFlag(Integer delFlag)
|
||||||
|
{
|
||||||
|
this.delFlag = delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDelFlag()
|
||||||
|
{
|
||||||
|
return delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("orderId", getOrderId())
|
||||||
|
.append("pauseStartDate", getPauseStartDate())
|
||||||
|
.append("pauseEndDate", getPauseEndDate())
|
||||||
|
.append("reason", getReason())
|
||||||
|
.append("remarks", getRemarks())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("delFlag", getDelFlag())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
@ -3,6 +3,8 @@ package com.stdiet.custom.dto.response;
|
|||||||
import com.stdiet.common.annotation.Excel;
|
import com.stdiet.common.annotation.Excel;
|
||||||
import com.stdiet.common.core.domain.BaseEntity;
|
import com.stdiet.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 客户体征信息响应DTO
|
* 客户体征信息响应DTO
|
||||||
*
|
*
|
||||||
@ -17,6 +19,10 @@ public class CustomerListResponse extends BaseEntity
|
|||||||
/** $column.columnComment */
|
/** $column.columnComment */
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
/** 名字 */
|
/** 名字 */
|
||||||
@Excel(name = "名字")
|
@Excel(name = "名字")
|
||||||
private String name;
|
private String name;
|
||||||
@ -361,4 +367,14 @@ public class CustomerListResponse extends BaseEntity
|
|||||||
public void setDifficulty(String difficulty) {
|
public void setDifficulty(String difficulty) {
|
||||||
this.difficulty = difficulty;
|
this.difficulty = difficulty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Date getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCreateTime(Date createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
}
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.stdiet.custom.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.stdiet.custom.domain.SysOrderPause;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单服务暂停Mapper接口
|
||||||
|
*
|
||||||
|
* @author wonder
|
||||||
|
* @date 2021-01-07
|
||||||
|
*/
|
||||||
|
public interface SysOrderPauseMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询订单服务暂停
|
||||||
|
*
|
||||||
|
* @param id 订单服务暂停ID
|
||||||
|
* @return 订单服务暂停
|
||||||
|
*/
|
||||||
|
public SysOrderPause selectSysOrderPauseById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询订单服务暂停列表
|
||||||
|
*
|
||||||
|
* @param sysOrderPause 订单服务暂停
|
||||||
|
* @return 订单服务暂停集合
|
||||||
|
*/
|
||||||
|
public List<SysOrderPause> selectSysOrderPauseList(SysOrderPause sysOrderPause);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增订单服务暂停
|
||||||
|
*
|
||||||
|
* @param sysOrderPause 订单服务暂停
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSysOrderPause(SysOrderPause sysOrderPause);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改订单服务暂停
|
||||||
|
*
|
||||||
|
* @param sysOrderPause 订单服务暂停
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSysOrderPause(SysOrderPause sysOrderPause);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除订单服务暂停
|
||||||
|
*
|
||||||
|
* @param id 订单服务暂停ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSysOrderPauseById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除订单服务暂停
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSysOrderPauseByIds(Long[] ids);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.stdiet.custom.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.stdiet.custom.domain.SysOrderPause;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单服务暂停Service接口
|
||||||
|
*
|
||||||
|
* @author wonder
|
||||||
|
* @date 2021-01-07
|
||||||
|
*/
|
||||||
|
public interface ISysOrderPauseService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询订单服务暂停
|
||||||
|
*
|
||||||
|
* @param id 订单服务暂停ID
|
||||||
|
* @return 订单服务暂停
|
||||||
|
*/
|
||||||
|
public SysOrderPause selectSysOrderPauseById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询订单服务暂停列表
|
||||||
|
*
|
||||||
|
* @param sysOrderPause 订单服务暂停
|
||||||
|
* @return 订单服务暂停集合
|
||||||
|
*/
|
||||||
|
public List<SysOrderPause> selectSysOrderPauseList(SysOrderPause sysOrderPause);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增订单服务暂停
|
||||||
|
*
|
||||||
|
* @param sysOrderPause 订单服务暂停
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSysOrderPause(SysOrderPause sysOrderPause);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改订单服务暂停
|
||||||
|
*
|
||||||
|
* @param sysOrderPause 订单服务暂停
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSysOrderPause(SysOrderPause sysOrderPause);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除订单服务暂停
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的订单服务暂停ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSysOrderPauseByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除订单服务暂停信息
|
||||||
|
*
|
||||||
|
* @param id 订单服务暂停ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSysOrderPauseById(Long id);
|
||||||
|
}
|
@ -0,0 +1,96 @@
|
|||||||
|
package com.stdiet.custom.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.stdiet.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.stdiet.custom.mapper.SysOrderPauseMapper;
|
||||||
|
import com.stdiet.custom.domain.SysOrderPause;
|
||||||
|
import com.stdiet.custom.service.ISysOrderPauseService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单服务暂停Service业务层处理
|
||||||
|
*
|
||||||
|
* @author wonder
|
||||||
|
* @date 2021-01-07
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SysOrderPauseServiceImpl implements ISysOrderPauseService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private SysOrderPauseMapper sysOrderPauseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询订单服务暂停
|
||||||
|
*
|
||||||
|
* @param id 订单服务暂停ID
|
||||||
|
* @return 订单服务暂停
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SysOrderPause selectSysOrderPauseById(Long id)
|
||||||
|
{
|
||||||
|
return sysOrderPauseMapper.selectSysOrderPauseById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询订单服务暂停列表
|
||||||
|
*
|
||||||
|
* @param sysOrderPause 订单服务暂停
|
||||||
|
* @return 订单服务暂停
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SysOrderPause> selectSysOrderPauseList(SysOrderPause sysOrderPause)
|
||||||
|
{
|
||||||
|
return sysOrderPauseMapper.selectSysOrderPauseList(sysOrderPause);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增订单服务暂停
|
||||||
|
*
|
||||||
|
* @param sysOrderPause 订单服务暂停
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertSysOrderPause(SysOrderPause sysOrderPause)
|
||||||
|
{
|
||||||
|
sysOrderPause.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return sysOrderPauseMapper.insertSysOrderPause(sysOrderPause);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改订单服务暂停
|
||||||
|
*
|
||||||
|
* @param sysOrderPause 订单服务暂停
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateSysOrderPause(SysOrderPause sysOrderPause)
|
||||||
|
{
|
||||||
|
sysOrderPause.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return sysOrderPauseMapper.updateSysOrderPause(sysOrderPause);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除订单服务暂停
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的订单服务暂停ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSysOrderPauseByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return sysOrderPauseMapper.deleteSysOrderPauseByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除订单服务暂停信息
|
||||||
|
*
|
||||||
|
* @param id 订单服务暂停ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSysOrderPauseById(Long id)
|
||||||
|
{
|
||||||
|
return sysOrderPauseMapper.deleteSysOrderPauseById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -35,13 +35,14 @@
|
|||||||
<result property="serveTime" column="serve_time"/>
|
<result property="serveTime" column="serve_time"/>
|
||||||
<result property="serveTimeId" column="serve_time_id"/>
|
<result property="serveTimeId" column="serve_time_id"/>
|
||||||
<result property="reviewStatus" column="review_status"/>
|
<result property="reviewStatus" column="review_status"/>
|
||||||
|
<result property="giveServeDay" column="give_serve_day"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectSysOrderVo">
|
<sql id="selectSysOrderVo">
|
||||||
select o.order_id, o.review_status, o.customer, o.phone, o.amount, o.start_time, o.pause_time, o.status, o.weight, ser.dict_label as serve_time,
|
select o.order_id, o.review_status, o.customer, o.phone, o.amount, o.start_time, o.pause_time, o.status, o.weight, ser.dict_label as serve_time,
|
||||||
o.serve_time_id, o.pay_type_id, pay.dict_label as pay_type, o.pre_sale_id, o.create_by, o.create_time, o.after_sale_id, o.update_by, o.update_time,
|
o.serve_time_id, o.pay_type_id, pay.dict_label as pay_type, o.pre_sale_id, o.create_by, o.create_time, o.after_sale_id, o.update_by, o.update_time,
|
||||||
o.nutritionist_id, o.remark, o.nutri_assis_id, o.account_id, acc.dict_label as account, o.planner_id, o.planner_assis_id, o.operator_id, o.operator_assis_id,
|
o.nutritionist_id, o.remark, o.nutri_assis_id, o.account_id, acc.dict_label as account, o.planner_id, o.planner_assis_id, o.operator_id, o.operator_assis_id,
|
||||||
o.recommender, o.order_time from sys_order o
|
o.recommender, o.order_time,o.give_serve_day from sys_order o
|
||||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_pay_type') AS pay ON pay.dict_value = o.pay_type_id
|
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_pay_type') AS pay ON pay.dict_value = o.pay_type_id
|
||||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_account') AS acc ON acc.dict_value = o.account_id
|
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_account') AS acc ON acc.dict_value = o.account_id
|
||||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_serve_time') AS ser ON ser.dict_value = o.serve_time_id
|
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_serve_time') AS ser ON ser.dict_value = o.serve_time_id
|
||||||
@ -133,6 +134,7 @@
|
|||||||
<if test="orderTime != null">order_time,</if>
|
<if test="orderTime != null">order_time,</if>
|
||||||
<if test="serveTimeId != null">serve_time_id,</if>
|
<if test="serveTimeId != null">serve_time_id,</if>
|
||||||
<if test="reviewStatus != null">review_status,</if>
|
<if test="reviewStatus != null">review_status,</if>
|
||||||
|
<if test="giveServeDay != null">give_serve_day,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="orderId != null and orderId != ''">#{orderId},</if>
|
<if test="orderId != null and orderId != ''">#{orderId},</if>
|
||||||
@ -162,6 +164,7 @@
|
|||||||
<if test="orderTime != null">#{orderTime},</if>
|
<if test="orderTime != null">#{orderTime},</if>
|
||||||
<if test="serveTimeId != null">#{serveTimeId},</if>
|
<if test="serveTimeId != null">#{serveTimeId},</if>
|
||||||
<if test="reviewStatus != null">#{reviewStatus},</if>
|
<if test="reviewStatus != null">#{reviewStatus},</if>
|
||||||
|
<if test="giveServeDay != null">#{giveServeDay},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -194,6 +197,7 @@
|
|||||||
<if test="orderTime != null">order_time = #{orderTime},</if>
|
<if test="orderTime != null">order_time = #{orderTime},</if>
|
||||||
<if test="serveTimeId != null">serve_time_id = #{serveTimeId},</if>
|
<if test="serveTimeId != null">serve_time_id = #{serveTimeId},</if>
|
||||||
<if test="reviewStatus != null">review_status = #{reviewStatus},</if>
|
<if test="reviewStatus != null">review_status = #{reviewStatus},</if>
|
||||||
|
<if test="giveServeDay != null">give_serve_day = #{giveServeDay},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where order_id = #{orderId}
|
where order_id = #{orderId}
|
||||||
</update>
|
</update>
|
||||||
|
@ -0,0 +1,100 @@
|
|||||||
|
<?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.stdiet.custom.mapper.SysOrderPauseMapper">
|
||||||
|
|
||||||
|
<resultMap type="SysOrderPause" id="SysOrderPauseResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="orderId" column="order_id" />
|
||||||
|
<result property="pauseStartDate" column="pause_start_date" />
|
||||||
|
<result property="pauseEndDate" column="pause_end_date" />
|
||||||
|
<result property="reason" column="reason" />
|
||||||
|
<result property="remarks" column="remarks" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="delFlag" column="del_flag" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectSysOrderPauseVo">
|
||||||
|
select id, order_id, pause_start_date, pause_end_date, reason, remarks, create_time, create_by, update_time, update_by, del_flag from sys_order_pause sop
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectSysOrderPauseList" parameterType="SysOrderPause" resultMap="SysOrderPauseResult">
|
||||||
|
<!--select sop.id, sop.order_id, sop.pause_start_date, sop.pause_end_date, sop.reason, sop.remarks, sop.create_time, sop.create_by, sop.update_time, sop.update_by, sop.del_flag,
|
||||||
|
so.customer,so.order_time
|
||||||
|
from sys_order_pause sop
|
||||||
|
left join sys_order so on so.order_id = sop.order_id-->
|
||||||
|
<include refid="selectSysOrderPauseVo"></include>
|
||||||
|
where sop.del_flag = 0
|
||||||
|
<if test="orderId != null "> and sop.order_id = #{orderId}</if>
|
||||||
|
<if test="pauseStartDate != null "> and sop.pause_start_date = #{pauseStartDate}</if>
|
||||||
|
<if test="pauseEndDate != null "> and sop.pause_end_date = #{pauseEndDate}</if>
|
||||||
|
<if test="reason != null and reason != ''"> and sop.reason = #{reason}</if>
|
||||||
|
<if test="remarks != null and remarks != ''"> and sop.remarks = #{remarks}</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSysOrderPauseById" parameterType="Long" resultMap="SysOrderPauseResult">
|
||||||
|
<include refid="selectSysOrderPauseVo"/>
|
||||||
|
where id = #{id} and del_flag = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertSysOrderPause" parameterType="SysOrderPause" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into sys_order_pause
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="orderId != null">order_id,</if>
|
||||||
|
<if test="pauseStartDate != null">pause_start_date,</if>
|
||||||
|
<if test="pauseEndDate != null">pause_end_date,</if>
|
||||||
|
<if test="reason != null">reason,</if>
|
||||||
|
<if test="remarks != null">remarks,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="delFlag != null">del_flag,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="orderId != null">#{orderId},</if>
|
||||||
|
<if test="pauseStartDate != null">#{pauseStartDate},</if>
|
||||||
|
<if test="pauseEndDate != null">#{pauseEndDate},</if>
|
||||||
|
<if test="reason != null">#{reason},</if>
|
||||||
|
<if test="remarks != null">#{remarks},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="delFlag != null">#{delFlag},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateSysOrderPause" parameterType="SysOrderPause">
|
||||||
|
update sys_order_pause
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="orderId != null">order_id = #{orderId},</if>
|
||||||
|
<if test="pauseStartDate != null">pause_start_date = #{pauseStartDate},</if>
|
||||||
|
<if test="pauseEndDate != null">pause_end_date = #{pauseEndDate},</if>
|
||||||
|
<if test="reason != null">reason = #{reason},</if>
|
||||||
|
<if test="remarks != null">remarks = #{remarks},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteSysOrderPauseById" parameterType="Long">
|
||||||
|
update sys_order_pause set del_flag = 1 where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteSysOrderPauseByIds" parameterType="String">
|
||||||
|
update sys_order_pause set del_flag = 1 where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
</mapper>
|
53
stdiet-ui/src/api/custom/orderPause.js
Normal file
53
stdiet-ui/src/api/custom/orderPause.js
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询订单服务暂停列表
|
||||||
|
export function listPause(query) {
|
||||||
|
return request({
|
||||||
|
url: '/orderPause/pause/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询订单服务暂停详细
|
||||||
|
export function getPause(id) {
|
||||||
|
return request({
|
||||||
|
url: '/orderPause/pause/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增订单服务暂停
|
||||||
|
export function addPause(data) {
|
||||||
|
return request({
|
||||||
|
url: '/orderPause/pause',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改订单服务暂停
|
||||||
|
export function updatePause(data) {
|
||||||
|
return request({
|
||||||
|
url: '/orderPause/pause',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除订单服务暂停
|
||||||
|
export function delPause(id) {
|
||||||
|
return request({
|
||||||
|
url: '/orderPause/pause/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出订单服务暂停
|
||||||
|
export function exportPause(query) {
|
||||||
|
return request({
|
||||||
|
url: '/orderPause/pause/export',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
@ -67,7 +67,20 @@ export const constantRoutes = [
|
|||||||
path: 'index',
|
path: 'index',
|
||||||
component: (resolve) => require(['@/views/custom/order'], resolve),
|
component: (resolve) => require(['@/views/custom/order'], resolve),
|
||||||
name: '订单',
|
name: '订单',
|
||||||
meta: { title: '订单', icon: 'build', noCache: true, affix: true }
|
meta: { title: '订单管理', icon: 'build', noCache: true, affix: true }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/order',
|
||||||
|
component: Layout,
|
||||||
|
hidden: true,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'orderPause/:orderId',
|
||||||
|
component: (resolve) => require(['@/views/custom/order/orderPause'], resolve),
|
||||||
|
name: 'orderPause',
|
||||||
|
meta: { title: '订单暂停记录'}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -218,6 +218,9 @@ export function validatorIDCard(idcode, type) {
|
|||||||
msg: "为了避免javascript数值范围误差,idcode 必须是字符串"
|
msg: "为了避免javascript数值范围误差,idcode 必须是字符串"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(idcode != null && idcode.indexOf("x") != -1){
|
||||||
|
idcode = idcode.replace("x", "X");
|
||||||
|
}
|
||||||
const idcard_patter = /^[1-9][0-9]{5}([1][9][0-9]{2}|[2][0][0|1][0-9])([0][1-9]|[1][0|1|2])([0][1-9]|[1|2][0-9]|[3][0|1])[0-9]{3}([0-9]|[X])$/;
|
const idcard_patter = /^[1-9][0-9]{5}([1][9][0-9]{2}|[2][0][0|1][0-9])([0][1-9]|[1][0|1|2])([0][1-9]|[1|2][0-9]|[3][0|1])[0-9]{3}([0-9]|[X])$/;
|
||||||
// 判断格式是否正确
|
// 判断格式是否正确
|
||||||
const format = idcard_patter.test(idcode);
|
const format = idcard_patter.test(idcode);
|
||||||
|
@ -233,6 +233,11 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="手机号" align="center" prop="phone" width="120"/>
|
<el-table-column label="手机号" align="center" prop="phone" width="120"/>
|
||||||
<el-table-column label="服务时长" align="center" prop="serveTime" width="80"/>
|
<el-table-column label="服务时长" align="center" prop="serveTime" width="80"/>
|
||||||
|
<el-table-column label="赠送时长" align="center" prop="giveServeDay" width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{scope.row.giveServeDay ? `${scope.row.giveServeDay}天` : '0天'}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="收款方式" align="center" prop="payType" width="120"/>
|
<el-table-column label="收款方式" align="center" prop="payType" width="120"/>
|
||||||
<el-table-column label="售前" align="center" prop="preSale" width="120"/>
|
<el-table-column label="售前" align="center" prop="preSale" width="120"/>
|
||||||
<el-table-column label="售后" align="center" prop="afterSale" width="120"/>
|
<el-table-column label="售后" align="center" prop="afterSale" width="120"/>
|
||||||
@ -255,6 +260,14 @@
|
|||||||
v-hasPermi="['custom:order:edit']"
|
v-hasPermi="['custom:order:edit']"
|
||||||
>修改
|
>修改
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-s-data"
|
||||||
|
@click="orderPauseManage(scope.row)"
|
||||||
|
v-hasPermi="['orderPause:pause:query']"
|
||||||
|
>暂停记录管理
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@ -339,6 +352,18 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="赠送时长" prop="serveTime">
|
||||||
|
<el-select v-model="form.giveServeDay" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in giveTimeIdOption"
|
||||||
|
:key="dict.dictValue"
|
||||||
|
:label="dict.dictLabel"
|
||||||
|
:value="parseInt(dict.dictValue)"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="售前" prop="preSaleId">
|
<el-form-item label="售前" prop="preSaleId">
|
||||||
<el-select v-model="form.preSaleId" placeholder="请选择">
|
<el-select v-model="form.preSaleId" placeholder="请选择">
|
||||||
@ -545,6 +570,8 @@
|
|||||||
accountIdOptions: [],
|
accountIdOptions: [],
|
||||||
// 服务时长
|
// 服务时长
|
||||||
serveTimeIdOption: [],
|
serveTimeIdOption: [],
|
||||||
|
// 赠送时长
|
||||||
|
giveTimeIdOption: [],
|
||||||
// 审核状态
|
// 审核状态
|
||||||
reviewStatusOptions: [],
|
reviewStatusOptions: [],
|
||||||
// 策划助理字典
|
// 策划助理字典
|
||||||
@ -672,6 +699,9 @@
|
|||||||
this.getDicts("cus_serve_time").then(response => {
|
this.getDicts("cus_serve_time").then(response => {
|
||||||
this.serveTimeIdOption = response.data;
|
this.serveTimeIdOption = response.data;
|
||||||
});
|
});
|
||||||
|
this.getDicts("give_serve_daye_type").then(response => {
|
||||||
|
this.giveTimeIdOption = response.data;
|
||||||
|
});
|
||||||
this.getDicts("cus_review_status").then(response => {
|
this.getDicts("cus_review_status").then(response => {
|
||||||
this.reviewStatusOptions = response.data;
|
this.reviewStatusOptions = response.data;
|
||||||
})
|
})
|
||||||
@ -736,6 +766,7 @@
|
|||||||
reset() {
|
reset() {
|
||||||
const defaultPayType = this.payTypeIdOptions.find(opt => opt.remark === 'default');
|
const defaultPayType = this.payTypeIdOptions.find(opt => opt.remark === 'default');
|
||||||
const defaultServeTime = this.serveTimeIdOption.find(opt => opt.remark === 'default');
|
const defaultServeTime = this.serveTimeIdOption.find(opt => opt.remark === 'default');
|
||||||
|
const defaultGiveServeTime = this.giveTimeIdOption.find(opt => opt.remark === 'default');
|
||||||
const defaultAccount = this.accountIdOptions.find(opt => opt.remark === 'default');
|
const defaultAccount = this.accountIdOptions.find(opt => opt.remark === 'default');
|
||||||
const defaultOperator = this.operatorIdOptions.find(opt => opt.remark === 'default');
|
const defaultOperator = this.operatorIdOptions.find(opt => opt.remark === 'default');
|
||||||
const defaultOperatorAssis = this.operatorAssisIdOptions.find(opt => opt.remark === 'default');
|
const defaultOperatorAssis = this.operatorAssisIdOptions.find(opt => opt.remark === 'default');
|
||||||
@ -771,7 +802,8 @@
|
|||||||
recommender: null,
|
recommender: null,
|
||||||
orderTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
|
orderTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
|
||||||
serveTimeId: defaultServeTime ? parseInt(defaultServeTime.dictValue) : null,
|
serveTimeId: defaultServeTime ? parseInt(defaultServeTime.dictValue) : null,
|
||||||
reviewStatus: this.review
|
reviewStatus: this.review,
|
||||||
|
giveServeDay: defaultGiveServeTime ? parseInt(defaultGiveServeTime.dictValue) : null
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
@ -804,6 +836,7 @@
|
|||||||
const orderId = row.orderId || this.ids
|
const orderId = row.orderId || this.ids
|
||||||
getOrder(orderId).then(response => {
|
getOrder(orderId).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
|
this.form.giveServeDay = this.form.giveServeDay == 0 ? null : parseInt(this.form.giveServeDay+"");
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改销售订单";
|
this.title = "修改销售订单";
|
||||||
});
|
});
|
||||||
@ -868,6 +901,10 @@
|
|||||||
},
|
},
|
||||||
handleStatusClick(data) {
|
handleStatusClick(data) {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
|
},
|
||||||
|
orderPauseManage(order) {
|
||||||
|
console.log(order.orderId);
|
||||||
|
this.$router.push({ name: 'orderPause', params: { 'orderId': order.orderId }})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
366
stdiet-ui/src/views/custom/order/orderPause.vue
Normal file
366
stdiet-ui/src/views/custom/order/orderPause.vue
Normal file
@ -0,0 +1,366 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!--<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="订单id" prop="orderId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.orderId"
|
||||||
|
placeholder="请输入订单id"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间" prop="createDate" label-width="120px">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="queryParams.createDate"
|
||||||
|
type="daterange"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<!--<el-form-item label="服务暂停理由" prop="reason">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.reason"
|
||||||
|
placeholder="请输入服务暂停理由"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remarks">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.remarks"
|
||||||
|
placeholder="请输入备注"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>-->
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['orderPause:pause:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['orderPause:pause:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['orderPause:pause:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['orderPause:pause:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="pauseList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
|
||||||
|
<!--<el-table-column label="订单成交时间" align="center" prop="orderTime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.orderTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="客户姓名" align="center" prop="customer" />-->
|
||||||
|
<el-table-column label="暂停开始日期" align="center" prop="pauseStartDate" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.pauseStartDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="暂停结束日期" align="center" prop="pauseEndDate" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.pauseEndDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="暂停理由" align="center" prop="reason" />
|
||||||
|
<el-table-column label="备注" align="center" prop="remarks" />
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['orderPause:pause:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['orderPause:pause:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改订单服务暂停对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<!--<el-form-item label="订单id" prop="orderId">
|
||||||
|
<el-input v-model="form.orderId" placeholder="请输入订单id" />
|
||||||
|
</el-form-item>-->
|
||||||
|
<el-form-item label="暂停时间范围" prop="pauseStartDate" label-width="100px">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="dateScope"
|
||||||
|
type="daterange"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期">
|
||||||
|
</el-date-picker>
|
||||||
|
<!--<el-date-picker clearable size="small" style="width: 200px"
|
||||||
|
v-model="form.pauseStartDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="选择服务暂停开始时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="暂停结束时间" prop="pauseEndDate">
|
||||||
|
<el-date-picker clearable size="small" style="width: 200px"
|
||||||
|
v-model="form.pauseEndDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="选择服务暂停结束时间">
|
||||||
|
</el-date-picker>-->
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="暂停理由" prop="reason" label-width="100px">
|
||||||
|
<el-input type="textarea" placeholder="请输入暂停理由" v-model="form.reason" maxlength="200" show-word-limit rows="5"></el-input>
|
||||||
|
<!--<el-input v-model="form.reason" placeholder="请输入暂停理由" />-->
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remarks" label-width="100px">
|
||||||
|
<el-input type="textarea" placeholder="请输入备注" v-model="form.remarks" maxlength="200" show-word-limit rows="5"></el-input>
|
||||||
|
<!--<el-input v-model="form.remarks" placeholder="请输入备注" />-->
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listPause, getPause, delPause, addPause, updatePause, exportPause } from "@/api/custom/orderPause";
|
||||||
|
import dayjs from 'dayjs';
|
||||||
|
|
||||||
|
const beginTime = dayjs().startOf('month').format('YYYY-MM-DD');
|
||||||
|
const endTime = dayjs().format('YYYY-MM-DD');
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Pause",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 订单服务暂停表格数据
|
||||||
|
pauseList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
orderId: null,
|
||||||
|
createDate: null,
|
||||||
|
pauseEndDate: null
|
||||||
|
//reason: null,
|
||||||
|
//remarks: null,
|
||||||
|
},
|
||||||
|
orderId: null,
|
||||||
|
// 表单参数
|
||||||
|
form: {
|
||||||
|
|
||||||
|
},
|
||||||
|
dateScope:[beginTime, endTime],
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.orderId = this.$route.params.orderId;
|
||||||
|
this.queryParams.orderId = this.orderId;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询订单服务暂停列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listPause(this.queryParams).then(response => {
|
||||||
|
this.pauseList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
orderId: null,
|
||||||
|
pauseStartDate: null,
|
||||||
|
pauseEndDate: null,
|
||||||
|
reason: null,
|
||||||
|
remarks: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
console.log(this.queryParams.pauseStartDate);
|
||||||
|
//this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.dateScope = [];
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加暂停记录";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids;
|
||||||
|
getPause(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.dateScope = [];
|
||||||
|
this.dateScope[0] = this.form.pauseStartDate;
|
||||||
|
this.dateScope[1] = this.form.pauseEndDate;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改暂停记录";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.form.pauseStartDate = dayjs(this.dateScope[0]).format("YYYY-MM-DD");
|
||||||
|
this.form.pauseEndDate = dayjs(this.dateScope[1]).format("YYYY-MM-DD");
|
||||||
|
console.log(this.form.pauseStartDate + "-" + this.form.pauseEndDate);
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updatePause(this.form).then(response => {
|
||||||
|
if (response.code === 200) {
|
||||||
|
this.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.form.orderId = this.orderId;
|
||||||
|
addPause(this.form).then(response => {
|
||||||
|
if (response.code === 200) {
|
||||||
|
this.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$confirm('是否确认删除订单服务暂停编号为"' + ids + '"的数据项?', "警告", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(function() {
|
||||||
|
return delPause(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.msgSuccess("删除成功");
|
||||||
|
}).catch(function() {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
const queryParams = this.queryParams;
|
||||||
|
this.$confirm('是否确认导出所有订单服务暂停数据项?', "警告", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(function() {
|
||||||
|
return exportPause(queryParams);
|
||||||
|
}).then(response => {
|
||||||
|
this.download(response.msg);
|
||||||
|
}).catch(function() {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
Loading…
x
Reference in New Issue
Block a user