parent
8bd4a3a07a
commit
5d1972a92b
@ -0,0 +1,136 @@ |
||||
package com.cjy.reservationdata.controller; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import javax.servlet.http.HttpServletResponse; |
||||
|
||||
import com.alibaba.fastjson2.JSONArray; |
||||
import com.cjy.reservationdata.domain.vo.SynchronousWriteOffDataVO; |
||||
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.ruoyi.common.annotation.Log; |
||||
import com.ruoyi.common.core.controller.BaseController; |
||||
import com.ruoyi.common.core.domain.AjaxResult; |
||||
import com.ruoyi.common.enums.BusinessType; |
||||
import com.cjy.reservationdata.domain.AppointmentCenterData; |
||||
import com.cjy.reservationdata.service.IAppointmentCenterDataService; |
||||
import com.ruoyi.common.utils.poi.ExcelUtil; |
||||
import com.ruoyi.common.core.page.TableDataInfo; |
||||
|
||||
/** |
||||
* 预约记录Controller |
||||
* |
||||
* @author liangjiawei |
||||
* @date 2023-08-03 |
||||
*/ |
||||
@RestController |
||||
@RequestMapping("/reservationdata/appointmentrecord") |
||||
public class AppointmentCenterDataController extends BaseController |
||||
{ |
||||
@Autowired |
||||
private IAppointmentCenterDataService appointmentCenterDataService; |
||||
|
||||
/** |
||||
* 查询预约记录列表 |
||||
*/ |
||||
@PreAuthorize("@ss.hasPermi('reservationdata:appointmentrecord:list')") |
||||
@GetMapping("/list") |
||||
public TableDataInfo list(AppointmentCenterData appointmentCenterData) |
||||
{ |
||||
startPage(); |
||||
appointmentCenterData.setOrganCode(getUserOrganCode()); |
||||
List<AppointmentCenterData> list = appointmentCenterDataService.selectAppointmentCenterDataList(appointmentCenterData); |
||||
return getDataTable(list); |
||||
} |
||||
|
||||
/** |
||||
* 导出预约记录列表 |
||||
*/ |
||||
@PreAuthorize("@ss.hasPermi('reservationdata:appointmentrecord:export')") |
||||
@Log(title = "预约记录", businessType = BusinessType.EXPORT) |
||||
@PostMapping("/export") |
||||
public void export(HttpServletResponse response, AppointmentCenterData appointmentCenterData) |
||||
{ |
||||
List<AppointmentCenterData> list = appointmentCenterDataService.selectAppointmentCenterDataList(appointmentCenterData); |
||||
ExcelUtil<AppointmentCenterData> util = new ExcelUtil<AppointmentCenterData>(AppointmentCenterData.class); |
||||
util.exportExcel(response, list, "预约记录数据"); |
||||
} |
||||
|
||||
/** |
||||
* 获取预约记录详细信息 |
||||
*/ |
||||
@PreAuthorize("@ss.hasPermi('reservationdata:appointmentrecord:query')") |
||||
@GetMapping(value = "/{id}") |
||||
public AjaxResult getInfo(@PathVariable("id") Long id) |
||||
{ |
||||
return success(appointmentCenterDataService.selectAppointmentCenterDataById(id)); |
||||
} |
||||
|
||||
/** |
||||
* 新增预约记录 |
||||
*/ |
||||
@PreAuthorize("@ss.hasPermi('reservationdata:appointmentrecord:add')") |
||||
@Log(title = "预约记录", businessType = BusinessType.INSERT) |
||||
@PostMapping |
||||
public AjaxResult add(@RequestBody AppointmentCenterData appointmentCenterData) |
||||
{ |
||||
appointmentCenterData.setOrganCode(getUserOrganCode()); |
||||
appointmentCenterData.setCreateBy(getUserId().toString()); |
||||
appointmentCenterData.setDataSources("1"); |
||||
return toAjax(appointmentCenterDataService.insertAppointmentCenterData(appointmentCenterData)); |
||||
} |
||||
|
||||
/** |
||||
* 修改预约记录 |
||||
*/ |
||||
@PreAuthorize("@ss.hasPermi('reservationdata:appointmentrecord:edit')") |
||||
@Log(title = "预约记录", businessType = BusinessType.UPDATE) |
||||
@PutMapping |
||||
public AjaxResult edit(@RequestBody AppointmentCenterData appointmentCenterData) |
||||
{ |
||||
appointmentCenterData.setUpdateBy(getUserId().toString()); |
||||
appointmentCenterData.setDelFlag("1"); |
||||
return toAjax(appointmentCenterDataService.updateAppointmentCenterData(appointmentCenterData)); |
||||
} |
||||
|
||||
/** |
||||
* 删除预约记录 |
||||
*/ |
||||
@PreAuthorize("@ss.hasPermi('reservationdata:appointmentrecord:remove')") |
||||
@Log(title = "预约记录", businessType = BusinessType.DELETE) |
||||
@DeleteMapping("/{ids}") |
||||
public AjaxResult remove(@PathVariable Long[] ids) |
||||
{ |
||||
return toAjax(appointmentCenterDataService.deleteAppointmentCenterDataByIds(ids)); |
||||
} |
||||
|
||||
|
||||
@RequestMapping("/synchronousData") |
||||
public AjaxResult synchronousData(@RequestBody List<AppointmentCenterData> list) { |
||||
try { |
||||
appointmentCenterDataService.synchronousData(list); |
||||
return AjaxResult.success("接收成功"); |
||||
}catch (Exception e){ |
||||
return AjaxResult.error("接收数据异常"); |
||||
} |
||||
} |
||||
|
||||
@RequestMapping("/synchronousWriteOffData") |
||||
public AjaxResult synchronousWriteOffData( @RequestBody SynchronousWriteOffDataVO synchronousWriteOffDataVO) { |
||||
try { |
||||
//通过id去修改数据
|
||||
appointmentCenterDataService.synchronousWriteOffData(synchronousWriteOffDataVO); |
||||
return AjaxResult.success("接收成功"); |
||||
}catch (Exception e){ |
||||
return AjaxResult.error("接收数据异常"); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,254 @@ |
||||
package com.cjy.reservationdata.domain; |
||||
|
||||
import java.util.Date; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
||||
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; |
||||
|
||||
/** |
||||
* 预约记录对象 appointment_center_data |
||||
* |
||||
* @author liangjiawei |
||||
* @date 2023-08-03 |
||||
*/ |
||||
public class AppointmentCenterData extends BaseEntity |
||||
{ |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** 自增id */ |
||||
private Long id; |
||||
|
||||
/** 预约单号 */ |
||||
@Excel(name = "预约单号") |
||||
private String appointmentNumber; |
||||
|
||||
/** 景区名称 */ |
||||
@Excel(name = "景区名称") |
||||
private String scenicName; |
||||
|
||||
/** 预约日期 */ |
||||
@JsonFormat(pattern = "yyyy-MM-dd") |
||||
@Excel(name = "预约日期", width = 30, dateFormat = "yyyy-MM-dd") |
||||
private Date appointmentDate; |
||||
|
||||
/** 预约时段 */ |
||||
@Excel(name = "预约时段") |
||||
private String appointmentSlot; |
||||
|
||||
/** 预约人姓名 */ |
||||
@Excel(name = "预约人姓名") |
||||
private String appointmentPeopleName; |
||||
|
||||
/** 预约人手机号 */ |
||||
@Excel(name = "预约人手机号") |
||||
private String appointmentPeoplePhone; |
||||
|
||||
/** 证件类型 */ |
||||
@Excel(name = "证件类型") |
||||
private String certificateType; |
||||
|
||||
/** 证件号码 */ |
||||
@Excel(name = "证件号码") |
||||
private String documentsNumber; |
||||
|
||||
/** 核销码 */ |
||||
@Excel(name = "核销码") |
||||
private String verificationCode; |
||||
|
||||
/** 状态 */ |
||||
@Excel(name = "状态") |
||||
private String state; |
||||
|
||||
/** 核销日期 */ |
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@Excel(name = "核销日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
||||
private Date writeOffTime; |
||||
|
||||
/** 数据来源 */ |
||||
@Excel(name = "数据来源") |
||||
private String dataSources; |
||||
|
||||
/** 数据状态 新增:0 修改:1删除:2 */ |
||||
private String delFlag; |
||||
|
||||
/** 机构编码 */ |
||||
@Excel(name = "机构编码") |
||||
private Long organCode; |
||||
/** |
||||
* 预约人id |
||||
*/ |
||||
private Long appointmentPeopleId; |
||||
|
||||
public Long getAppointmentPeopleId() { |
||||
return appointmentPeopleId; |
||||
} |
||||
@JsonSerialize(using = ToStringSerializer.class) |
||||
public void setAppointmentPeopleId(Long appointmentPeopleId) { |
||||
this.appointmentPeopleId = appointmentPeopleId; |
||||
} |
||||
|
||||
public void setId(Long id) |
||||
{ |
||||
this.id = id; |
||||
} |
||||
|
||||
public Long getId() |
||||
{ |
||||
return id; |
||||
} |
||||
public void setAppointmentNumber(String appointmentNumber) |
||||
{ |
||||
this.appointmentNumber = appointmentNumber; |
||||
} |
||||
|
||||
public String getAppointmentNumber() |
||||
{ |
||||
return appointmentNumber; |
||||
} |
||||
public void setScenicName(String scenicName) |
||||
{ |
||||
this.scenicName = scenicName; |
||||
} |
||||
|
||||
public String getScenicName() |
||||
{ |
||||
return scenicName; |
||||
} |
||||
public void setAppointmentDate(Date appointmentDate) |
||||
{ |
||||
this.appointmentDate = appointmentDate; |
||||
} |
||||
|
||||
public Date getAppointmentDate() |
||||
{ |
||||
return appointmentDate; |
||||
} |
||||
public void setAppointmentSlot(String appointmentSlot) |
||||
{ |
||||
this.appointmentSlot = appointmentSlot; |
||||
} |
||||
|
||||
public String getAppointmentSlot() |
||||
{ |
||||
return appointmentSlot; |
||||
} |
||||
public void setAppointmentPeopleName(String appointmentPeopleName) |
||||
{ |
||||
this.appointmentPeopleName = appointmentPeopleName; |
||||
} |
||||
|
||||
public String getAppointmentPeopleName() |
||||
{ |
||||
return appointmentPeopleName; |
||||
} |
||||
public void setAppointmentPeoplePhone(String appointmentPeoplePhone) |
||||
{ |
||||
this.appointmentPeoplePhone = appointmentPeoplePhone; |
||||
} |
||||
|
||||
public String getAppointmentPeoplePhone() |
||||
{ |
||||
return appointmentPeoplePhone; |
||||
} |
||||
public void setCertificateType(String certificateType) |
||||
{ |
||||
this.certificateType = certificateType; |
||||
} |
||||
|
||||
public String getCertificateType() |
||||
{ |
||||
return certificateType; |
||||
} |
||||
public void setDocumentsNumber(String documentsNumber) |
||||
{ |
||||
this.documentsNumber = documentsNumber; |
||||
} |
||||
|
||||
public String getDocumentsNumber() |
||||
{ |
||||
return documentsNumber; |
||||
} |
||||
public void setVerificationCode(String verificationCode) |
||||
{ |
||||
this.verificationCode = verificationCode; |
||||
} |
||||
|
||||
public String getVerificationCode() |
||||
{ |
||||
return verificationCode; |
||||
} |
||||
public void setState(String state) |
||||
{ |
||||
this.state = state; |
||||
} |
||||
|
||||
public String getState() |
||||
{ |
||||
return state; |
||||
} |
||||
public void setWriteOffTime(Date writeOffTime) |
||||
{ |
||||
this.writeOffTime = writeOffTime; |
||||
} |
||||
|
||||
public Date getWriteOffTime() |
||||
{ |
||||
return writeOffTime; |
||||
} |
||||
public void setDataSources(String dataSources) |
||||
{ |
||||
this.dataSources = dataSources; |
||||
} |
||||
|
||||
public String getDataSources() |
||||
{ |
||||
return dataSources; |
||||
} |
||||
public void setDelFlag(String delFlag) |
||||
{ |
||||
this.delFlag = delFlag; |
||||
} |
||||
|
||||
public String getDelFlag() |
||||
{ |
||||
return delFlag; |
||||
} |
||||
public void setOrganCode(Long organCode) |
||||
{ |
||||
this.organCode = organCode; |
||||
} |
||||
|
||||
public Long getOrganCode() |
||||
{ |
||||
return organCode; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
||||
.append("id", getId()) |
||||
.append("appointmentNumber", getAppointmentNumber()) |
||||
.append("scenicName", getScenicName()) |
||||
.append("appointmentDate", getAppointmentDate()) |
||||
.append("appointmentSlot", getAppointmentSlot()) |
||||
.append("appointmentPeopleName", getAppointmentPeopleName()) |
||||
.append("appointmentPeoplePhone", getAppointmentPeoplePhone()) |
||||
.append("certificateType", getCertificateType()) |
||||
.append("documentsNumber", getDocumentsNumber()) |
||||
.append("verificationCode", getVerificationCode()) |
||||
.append("state", getState()) |
||||
.append("writeOffTime", getWriteOffTime()) |
||||
.append("dataSources", getDataSources()) |
||||
.append("delFlag", getDelFlag()) |
||||
.append("createBy", getCreateBy()) |
||||
.append("createTime", getCreateTime()) |
||||
.append("updateBy", getUpdateBy()) |
||||
.append("updateTime", getUpdateTime()) |
||||
.append("organCode", getOrganCode()) |
||||
.toString(); |
||||
} |
||||
} |
@ -0,0 +1,26 @@ |
||||
package com.cjy.reservationdata.domain.vo; |
||||
|
||||
/** |
||||
* @author liangjiawei |
||||
* @createDate 2023/8/3 |
||||
*/ |
||||
public class SynchronousWriteOffDataVO { |
||||
private Long id; |
||||
private String date; |
||||
|
||||
public Long getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Long id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public String getDate() { |
||||
return date; |
||||
} |
||||
|
||||
public void setDate(String date) { |
||||
this.date = date; |
||||
} |
||||
} |
@ -0,0 +1,72 @@ |
||||
package com.cjy.reservationdata.mapper; |
||||
|
||||
import java.util.List; |
||||
import com.cjy.reservationdata.domain.AppointmentCenterData; |
||||
import com.cjy.reservationdata.domain.vo.SynchronousWriteOffDataVO; |
||||
import org.apache.ibatis.annotations.Param; |
||||
|
||||
/** |
||||
* 预约记录Mapper接口 |
||||
* |
||||
* @author liangjiawei |
||||
* @date 2023-08-03 |
||||
*/ |
||||
public interface AppointmentCenterDataMapper |
||||
{ |
||||
/** |
||||
* 查询预约记录 |
||||
* |
||||
* @param id 预约记录主键 |
||||
* @return 预约记录 |
||||
*/ |
||||
public AppointmentCenterData selectAppointmentCenterDataById(Long id); |
||||
|
||||
/** |
||||
* 查询预约记录列表 |
||||
* |
||||
* @param appointmentCenterData 预约记录 |
||||
* @return 预约记录集合 |
||||
*/ |
||||
public List<AppointmentCenterData> selectAppointmentCenterDataList(AppointmentCenterData appointmentCenterData); |
||||
|
||||
/** |
||||
* 新增预约记录 |
||||
* |
||||
* @param appointmentCenterData 预约记录 |
||||
* @return 结果 |
||||
*/ |
||||
public int insertAppointmentCenterData(AppointmentCenterData appointmentCenterData); |
||||
|
||||
/** |
||||
* 修改预约记录 |
||||
* |
||||
* @param appointmentCenterData 预约记录 |
||||
* @return 结果 |
||||
*/ |
||||
public int updateAppointmentCenterData(AppointmentCenterData appointmentCenterData); |
||||
|
||||
/** |
||||
* 删除预约记录 |
||||
* |
||||
* @param id 预约记录主键 |
||||
* @return 结果 |
||||
*/ |
||||
public int deleteAppointmentCenterDataById(Long id); |
||||
|
||||
/** |
||||
* 批量删除预约记录 |
||||
* |
||||
* @param ids 需要删除的数据主键集合 |
||||
* @return 结果 |
||||
*/ |
||||
public int deleteAppointmentCenterDataByIds(Long[] ids); |
||||
|
||||
/** |
||||
* 同步数据批量插入 |
||||
* @param list |
||||
* @return |
||||
*/ |
||||
int synchronousData(@Param("list") List<AppointmentCenterData> list); |
||||
|
||||
int synchronousWriteOffData(SynchronousWriteOffDataVO synchronousWriteOffDataVO); |
||||
} |
@ -0,0 +1,67 @@ |
||||
package com.cjy.reservationdata.service; |
||||
|
||||
import java.util.List; |
||||
import com.cjy.reservationdata.domain.AppointmentCenterData; |
||||
import com.cjy.reservationdata.domain.vo.SynchronousWriteOffDataVO; |
||||
|
||||
/** |
||||
* 预约记录Service接口 |
||||
* |
||||
* @author liangjiawei |
||||
* @date 2023-08-03 |
||||
*/ |
||||
public interface IAppointmentCenterDataService |
||||
{ |
||||
/** |
||||
* 查询预约记录 |
||||
* |
||||
* @param id 预约记录主键 |
||||
* @return 预约记录 |
||||
*/ |
||||
public AppointmentCenterData selectAppointmentCenterDataById(Long id); |
||||
|
||||
/** |
||||
* 查询预约记录列表 |
||||
* |
||||
* @param appointmentCenterData 预约记录 |
||||
* @return 预约记录集合 |
||||
*/ |
||||
public List<AppointmentCenterData> selectAppointmentCenterDataList(AppointmentCenterData appointmentCenterData); |
||||
|
||||
/** |
||||
* 新增预约记录 |
||||
* |
||||
* @param appointmentCenterData 预约记录 |
||||
* @return 结果 |
||||
*/ |
||||
public int insertAppointmentCenterData(AppointmentCenterData appointmentCenterData); |
||||
|
||||
/** |
||||
* 修改预约记录 |
||||
* |
||||
* @param appointmentCenterData 预约记录 |
||||
* @return 结果 |
||||
*/ |
||||
public int updateAppointmentCenterData(AppointmentCenterData appointmentCenterData); |
||||
|
||||
/** |
||||
* 批量删除预约记录 |
||||
* |
||||
* @param ids 需要删除的预约记录主键集合 |
||||
* @return 结果 |
||||
*/ |
||||
public int deleteAppointmentCenterDataByIds(Long[] ids); |
||||
|
||||
/** |
||||
* 删除预约记录信息 |
||||
* |
||||
* @param id 预约记录主键 |
||||
* @return 结果 |
||||
*/ |
||||
public int deleteAppointmentCenterDataById(Long id); |
||||
|
||||
|
||||
int synchronousData(List<AppointmentCenterData> list); |
||||
|
||||
int synchronousWriteOffData(SynchronousWriteOffDataVO synchronousWriteOffDataVO); |
||||
} |
@ -0,0 +1,108 @@ |
||||
package com.cjy.reservationdata.service.impl; |
||||
|
||||
import java.util.List; |
||||
|
||||
import com.cjy.reservationdata.domain.vo.SynchronousWriteOffDataVO; |
||||
import com.ruoyi.common.utils.DateUtils; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
import com.cjy.reservationdata.mapper.AppointmentCenterDataMapper; |
||||
import com.cjy.reservationdata.domain.AppointmentCenterData; |
||||
import com.cjy.reservationdata.service.IAppointmentCenterDataService; |
||||
|
||||
/** |
||||
* 预约记录Service业务层处理 |
||||
* |
||||
* @author liangjiawei |
||||
* @date 2023-08-03 |
||||
*/ |
||||
@Service |
||||
public class AppointmentCenterDataServiceImpl implements IAppointmentCenterDataService |
||||
{ |
||||
@Autowired |
||||
private AppointmentCenterDataMapper appointmentCenterDataMapper; |
||||
|
||||
/** |
||||
* 查询预约记录 |
||||
* |
||||
* @param id 预约记录主键 |
||||
* @return 预约记录 |
||||
*/ |
||||
@Override |
||||
public AppointmentCenterData selectAppointmentCenterDataById(Long id) |
||||
{ |
||||
return appointmentCenterDataMapper.selectAppointmentCenterDataById(id); |
||||
} |
||||
|
||||
/** |
||||
* 查询预约记录列表 |
||||
* |
||||
* @param appointmentCenterData 预约记录 |
||||
* @return 预约记录 |
||||
*/ |
||||
@Override |
||||
public List<AppointmentCenterData> selectAppointmentCenterDataList(AppointmentCenterData appointmentCenterData) |
||||
{ |
||||
return appointmentCenterDataMapper.selectAppointmentCenterDataList(appointmentCenterData); |
||||
} |
||||
|
||||
/** |
||||
* 新增预约记录 |
||||
* |
||||
* @param appointmentCenterData 预约记录 |
||||
* @return 结果 |
||||
*/ |
||||
@Override |
||||
public int insertAppointmentCenterData(AppointmentCenterData appointmentCenterData) |
||||
{ |
||||
appointmentCenterData.setCreateTime(DateUtils.getNowDate()); |
||||
return appointmentCenterDataMapper.insertAppointmentCenterData(appointmentCenterData); |
||||
} |
||||
|
||||
/** |
||||
* 修改预约记录 |
||||
* |
||||
* @param appointmentCenterData 预约记录 |
||||
* @return 结果 |
||||
*/ |
||||
@Override |
||||
public int updateAppointmentCenterData(AppointmentCenterData appointmentCenterData) |
||||
{ |
||||
appointmentCenterData.setUpdateTime(DateUtils.getNowDate()); |
||||
return appointmentCenterDataMapper.updateAppointmentCenterData(appointmentCenterData); |
||||
} |
||||
|
||||
/** |
||||
* 批量删除预约记录 |
||||
* |
||||
* @param ids 需要删除的预约记录主键 |
||||
* @return 结果 |
||||
*/ |
||||
@Override |
||||
public int deleteAppointmentCenterDataByIds(Long[] ids) |
||||
{ |
||||
return appointmentCenterDataMapper.deleteAppointmentCenterDataByIds(ids); |
||||
} |
||||
|
||||
/** |
||||
* 删除预约记录信息 |
||||
* |
||||
* @param id 预约记录主键 |
||||
* @return 结果 |
||||
*/ |
||||
@Override |
||||
public int deleteAppointmentCenterDataById(Long id) |
||||
{ |
||||
return appointmentCenterDataMapper.deleteAppointmentCenterDataById(id); |
||||
} |
||||
|
||||
@Override |
||||
public int synchronousData(List<AppointmentCenterData> list) { |
||||
return appointmentCenterDataMapper.synchronousData(list); |
||||
} |
||||
|
||||
@Override |
||||
public int synchronousWriteOffData(SynchronousWriteOffDataVO synchronousWriteOffDataVO) { |
||||
return appointmentCenterDataMapper.synchronousWriteOffData(synchronousWriteOffDataVO); |
||||
} |
||||
} |
@ -0,0 +1,160 @@ |
||||
<?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.cjy.reservationdata.mapper.AppointmentCenterDataMapper"> |
||||
|
||||
<resultMap type="AppointmentCenterData" id="AppointmentCenterDataResult"> |
||||
<result property="id" column="id" /> |
||||
<result property="appointmentNumber" column="appointment_number" /> |
||||
<result property="scenicName" column="scenic_name" /> |
||||
<result property="appointmentDate" column="appointment_date" /> |
||||
<result property="appointmentSlot" column="appointment_slot" /> |
||||
<result property="appointmentPeopleName" column="appointment_people_name" /> |
||||
<result property="appointmentPeoplePhone" column="appointment_people_phone" /> |
||||
<result property="certificateType" column="certificate_type" /> |
||||
<result property="documentsNumber" column="documents_number" /> |
||||
<result property="verificationCode" column="verification_code" /> |
||||
<result property="state" column="state" /> |
||||
<result property="writeOffTime" column="write_off_time" /> |
||||
<result property="dataSources" column="data_sources" /> |
||||
<result property="delFlag" column="del_flag" /> |
||||
<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="organCode" column="organ_code" /> |
||||
</resultMap> |
||||
|
||||
<sql id="selectAppointmentCenterDataVo"> |
||||
select id, appointment_number, scenic_name, appointment_date, appointment_slot, appointment_people_name, appointment_people_phone, certificate_type, documents_number, verification_code, state, write_off_time, data_sources, del_flag, create_by, create_time, update_by, update_time, organ_code from appointment_center_data |
||||
</sql> |
||||
|
||||
<select id="selectAppointmentCenterDataList" parameterType="AppointmentCenterData" resultMap="AppointmentCenterDataResult"> |
||||
<include refid="selectAppointmentCenterDataVo"/> |
||||
<where> |
||||
<if test="appointmentNumber != null and appointmentNumber != ''"> and appointment_number like concat('%', #{appointmentNumber}, '%')</if> |
||||
<if test="scenicName != null and scenicName != ''"> and scenic_name like concat('%', #{scenicName}, '%')</if> |
||||
<if test="appointmentDate != null "> and appointment_date = #{appointmentDate}</if> |
||||
<if test="appointmentSlot != null and appointmentSlot != ''"> and appointment_slot = #{appointmentSlot}</if> |
||||
<if test="appointmentPeopleName != null and appointmentPeopleName != ''"> and appointment_people_name like concat('%', #{appointmentPeopleName}, '%')</if> |
||||
<if test="appointmentPeoplePhone != null and appointmentPeoplePhone != ''"> and appointment_people_phone like concat('%', #{appointmentPeoplePhone}, '%')</if> |
||||
<if test="certificateType != null and certificateType != ''"> and certificate_type = #{certificateType}</if> |
||||
<if test="documentsNumber != null and documentsNumber != ''"> and documents_number like concat('%', #{documentsNumber}, '%')</if> |
||||
<if test="verificationCode != null and verificationCode != ''"> and verification_code = #{verificationCode}</if> |
||||
<if test="state != null and state != ''"> and state = #{state}</if> |
||||
<if test="writeOffTime != null "> and write_off_time = #{writeOffTime}</if> |
||||
<if test="dataSources != null and dataSources != ''"> and data_sources = #{dataSources}</if> |
||||
<if test="organCode != null "> and organ_code = #{organCode}</if> |
||||
and del_flag != '2' |
||||
</where> |
||||
order by create_time desc |
||||
</select> |
||||
|
||||
<select id="selectAppointmentCenterDataById" parameterType="Long" resultMap="AppointmentCenterDataResult"> |
||||
<include refid="selectAppointmentCenterDataVo"/> |
||||
where id = #{id} |
||||
</select> |
||||
|
||||
<insert id="insertAppointmentCenterData" parameterType="AppointmentCenterData"> |
||||
insert into appointment_center_data |
||||
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
<if test="id != null">id,</if> |
||||
<if test="appointmentNumber != null">appointment_number,</if> |
||||
<if test="scenicName != null">scenic_name,</if> |
||||
<if test="appointmentDate != null">appointment_date,</if> |
||||
<if test="appointmentSlot != null">appointment_slot,</if> |
||||
<if test="appointmentPeopleName != null">appointment_people_name,</if> |
||||
<if test="appointmentPeoplePhone != null">appointment_people_phone,</if> |
||||
<if test="certificateType != null">certificate_type,</if> |
||||
<if test="documentsNumber != null">documents_number,</if> |
||||
<if test="verificationCode != null">verification_code,</if> |
||||
<if test="state != null">state,</if> |
||||
<if test="writeOffTime != null">write_off_time,</if> |
||||
<if test="dataSources != null">data_sources,</if> |
||||
<if test="delFlag != null">del_flag,</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="organCode != null">organ_code,</if> |
||||
</trim> |
||||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
<if test="id != null">#{id},</if> |
||||
<if test="appointmentNumber != null">#{appointmentNumber},</if> |
||||
<if test="scenicName != null">#{scenicName},</if> |
||||
<if test="appointmentDate != null">#{appointmentDate},</if> |
||||
<if test="appointmentSlot != null">#{appointmentSlot},</if> |
||||
<if test="appointmentPeopleName != null">#{appointmentPeopleName},</if> |
||||
<if test="appointmentPeoplePhone != null">#{appointmentPeoplePhone},</if> |
||||
<if test="certificateType != null">#{certificateType},</if> |
||||
<if test="documentsNumber != null">#{documentsNumber},</if> |
||||
<if test="verificationCode != null">#{verificationCode},</if> |
||||
<if test="state != null">#{state},</if> |
||||
<if test="writeOffTime != null">#{writeOffTime},</if> |
||||
<if test="dataSources != null">#{dataSources},</if> |
||||
<if test="delFlag != null">#{delFlag},</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="organCode != null">#{organCode},</if> |
||||
</trim> |
||||
</insert> |
||||
<insert id="synchronousData"> |
||||
INSERT INTO appointment_center_data ( appointment_number, scenic_name, |
||||
appointment_date, appointment_slot, |
||||
appointment_people_name, appointment_people_phone, |
||||
certificate_type, documents_number, |
||||
verification_code, state, write_off_time, |
||||
data_sources, |
||||
organ_code,appointment_people_id) |
||||
VALUES |
||||
<foreach item="item" collection="list" separator=","> |
||||
(#{item.appointmentNumber}, #{item.scenicName}, #{item.appointmentDate}, #{item.appointmentSlot}, |
||||
#{item.appointmentPeopleName}, #{item.appointmentPeoplePhone}, #{item.certificateType}, #{item.documentsNumber}, #{item.verificationCode}, #{item.state}, #{item.writeOffTime}, #{item.dataSources}, |
||||
#{item.organCode},#{item.appointmentPeopleId}) |
||||
</foreach> |
||||
|
||||
</insert> |
||||
|
||||
<update id="updateAppointmentCenterData" parameterType="AppointmentCenterData"> |
||||
update appointment_center_data |
||||
<trim prefix="SET" suffixOverrides=","> |
||||
<if test="appointmentNumber != null">appointment_number = #{appointmentNumber},</if> |
||||
<if test="scenicName != null">scenic_name = #{scenicName},</if> |
||||
<if test="appointmentDate != null">appointment_date = #{appointmentDate},</if> |
||||
<if test="appointmentSlot != null">appointment_slot = #{appointmentSlot},</if> |
||||
<if test="appointmentPeopleName != null">appointment_people_name = #{appointmentPeopleName},</if> |
||||
<if test="appointmentPeoplePhone != null">appointment_people_phone = #{appointmentPeoplePhone},</if> |
||||
<if test="certificateType != null">certificate_type = #{certificateType},</if> |
||||
<if test="documentsNumber != null">documents_number = #{documentsNumber},</if> |
||||
<if test="verificationCode != null">verification_code = #{verificationCode},</if> |
||||
<if test="state != null">state = #{state},</if> |
||||
<if test="writeOffTime != null">write_off_time = #{writeOffTime},</if> |
||||
<if test="dataSources != null">data_sources = #{dataSources},</if> |
||||
<if test="delFlag != null">del_flag = #{delFlag},</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="organCode != null">organ_code = #{organCode},</if> |
||||
</trim> |
||||
where id = #{id} |
||||
</update> |
||||
|
||||
|
||||
<update id="deleteAppointmentCenterDataById" parameterType="Long"> |
||||
update appointment_center_data set del_flag='2' where id = #{id} |
||||
</update> |
||||
|
||||
<update id="deleteAppointmentCenterDataByIds" parameterType="String"> |
||||
update appointment_center_data set del_flag='2' where id in |
||||
<foreach item="id" collection="array" open="(" separator="," close=")"> |
||||
#{id} |
||||
</foreach> |
||||
</update> |
||||
<update id="synchronousWriteOffData"> |
||||
update appointment_center_data set state=1,write_off_time=#{date} where appointment_people_id=#{id} |
||||
</update> |
||||
</mapper> |
@ -0,0 +1,44 @@ |
||||
import request from '@/utils/request' |
||||
|
||||
// 查询预约记录列表
|
||||
export function listAppointmentrecord(query) { |
||||
return request({ |
||||
url: '/reservationdata/appointmentrecord/list', |
||||
method: 'get', |
||||
params: query |
||||
}) |
||||
} |
||||
|
||||
// 查询预约记录详细
|
||||
export function getAppointmentrecord(id) { |
||||
return request({ |
||||
url: '/reservationdata/appointmentrecord/' + id, |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 新增预约记录
|
||||
export function addAppointmentrecord(data) { |
||||
return request({ |
||||
url: '/reservationdata/appointmentrecord', |
||||
method: 'post', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 修改预约记录
|
||||
export function updateAppointmentrecord(data) { |
||||
return request({ |
||||
url: '/reservationdata/appointmentrecord', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 删除预约记录
|
||||
export function delAppointmentrecord(id) { |
||||
return request({ |
||||
url: '/reservationdata/appointmentrecord/' + id, |
||||
method: 'delete' |
||||
}) |
||||
} |
@ -0,0 +1,440 @@ |
||||
<template> |
||||
<div class="app-container"> |
||||
<el-form :model="queryParams" @submit.native.prevent @submit.native.prevent ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="120px"> |
||||
|
||||
<el-form-item label="景区名称" prop="scenicName"> |
||||
<el-input |
||||
v-model="queryParams.scenicName" |
||||
placeholder="请输入景区名称" |
||||
clearable |
||||
@keyup.enter.native="handleQuery" |
||||
/> |
||||
</el-form-item> |
||||
<el-form-item label="预约人姓名" prop="appointmentPeopleName"> |
||||
<el-input |
||||
v-model="queryParams.appointmentPeopleName" |
||||
placeholder="请输入预约人姓名" |
||||
clearable |
||||
@keyup.enter.native="handleQuery" |
||||
/> |
||||
</el-form-item> |
||||
<el-form-item label="预约人手机号" prop="appointmentPeoplePhone"> |
||||
<el-input |
||||
v-model="queryParams.appointmentPeoplePhone" |
||||
placeholder="请输入预约人手机号" |
||||
clearable |
||||
@keyup.enter.native="handleQuery" |
||||
/> |
||||
</el-form-item> |
||||
<el-form-item label="证件类型" prop="certificateType"> |
||||
<el-select v-model="queryParams.certificateType" placeholder="请选择证件类型" clearable> |
||||
<el-option |
||||
v-for="dict in dict.type.certificate_type" |
||||
:key="dict.value" |
||||
:label="dict.label" |
||||
:value="dict.value" |
||||
/> |
||||
</el-select> |
||||
</el-form-item> |
||||
<el-form-item label="证件号码" prop="documentsNumber"> |
||||
<el-input |
||||
v-model="queryParams.documentsNumber" |
||||
placeholder="请输入证件号码" |
||||
clearable |
||||
@keyup.enter.native="handleQuery" |
||||
/> |
||||
</el-form-item> |
||||
<el-form-item label="预约日期" prop="appointmentDate"> |
||||
<el-date-picker clearable |
||||
v-model="queryParams.appointmentDate" |
||||
type="date" |
||||
value-format="yyyy-MM-dd" |
||||
placeholder="请选择预约日期"> |
||||
</el-date-picker> |
||||
</el-form-item> |
||||
<el-form-item label="预约时段" prop="appointmentSlot"> |
||||
<el-input |
||||
v-model="queryParams.appointmentSlot" |
||||
placeholder="请输入预约时段" |
||||
clearable |
||||
@keyup.enter.native="handleQuery" |
||||
/> |
||||
</el-form-item> |
||||
<el-form-item label="状态" prop="state"> |
||||
|
||||
<el-select v-model="queryParams.state" placeholder="状态" clearable> |
||||
<el-option |
||||
v-for="dict in dict.type.write_off_status" |
||||
:key="dict.value" |
||||
:label="dict.label" |
||||
:value="dict.value" |
||||
/> |
||||
</el-select> |
||||
</el-form-item> |
||||
<el-form-item label="数据来源" prop="dataSources"> |
||||
<el-select v-model="queryParams.dataSources" placeholder="数据来源" clearable style="width: 240px" @change="$forceUpdate()"> |
||||
<el-option v-for="dict in dict.type.data_sources" :key="dict.value" :label="dict.label" |
||||
:value="dict.value" /> |
||||
</el-select> |
||||
</el-form-item> |
||||
<el-form-item> |
||||
<el-button type="primary" 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" |
||||
plain |
||||
icon="el-icon-plus" |
||||
size="mini" |
||||
@click="handleAdd" |
||||
v-hasPermi="['reservationdata:appointmentrecord:add']" |
||||
>新增</el-button> |
||||
</el-col> |
||||
<el-col :span="1.5"> |
||||
<el-button |
||||
type="success" |
||||
plain |
||||
icon="el-icon-edit" |
||||
size="mini" |
||||
:disabled="single" |
||||
@click="handleUpdate" |
||||
v-hasPermi="['reservationdata:appointmentrecord:edit']" |
||||
>修改</el-button> |
||||
</el-col> |
||||
<el-col :span="1.5"> |
||||
<el-button |
||||
type="danger" |
||||
plain |
||||
icon="el-icon-delete" |
||||
size="mini" |
||||
:disabled="multiple" |
||||
@click="handleDelete" |
||||
v-hasPermi="['reservationdata:appointmentrecord:remove']" |
||||
>删除</el-button> |
||||
</el-col> |
||||
<!-- <el-col :span="1.5">--> |
||||
<!-- <el-button--> |
||||
<!-- type="warning"--> |
||||
<!-- plain--> |
||||
<!-- icon="el-icon-download"--> |
||||
<!-- size="mini"--> |
||||
<!-- @click="handleExport"--> |
||||
<!-- v-hasPermi="['reservationdata:appointmentrecord:export']"--> |
||||
<!-- >导出</el-button>--> |
||||
<!-- </el-col>--> |
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
||||
</el-row> |
||||
|
||||
<el-table v-loading="loading" :data="appointmentrecordList" @selection-change="handleSelectionChange"> |
||||
<el-table-column type="selection" width="55" align="center" /> |
||||
<el-table-column label="预约单号" align="center" prop="appointmentNumber" /> |
||||
<el-table-column label="景区名称" align="center" prop="scenicName" /> |
||||
<el-table-column label="预约日期" align="center" prop="appointmentDate" width="180"> |
||||
<template slot-scope="scope"> |
||||
<span>{{ parseTime(scope.row.appointmentDate, '{y}-{m}-{d}') }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="预约时段" align="center" prop="appointmentSlot" /> |
||||
<el-table-column label="预约人姓名" align="center" prop="appointmentPeopleName" /> |
||||
<el-table-column label="预约人手机号" align="center" prop="appointmentPeoplePhone" /> |
||||
<el-table-column label="证件类型" align="center" prop="certificateType"> |
||||
<template slot-scope="scope"> |
||||
<dict-tag :options="dict.type.certificate_type" :value="scope.row.certificateType"/> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="证件号码" align="center" prop="documentsNumber" /> |
||||
<el-table-column label="预约码" align="center" prop="verificationCode" /> |
||||
<el-table-column label="状态" align="center" prop="state"> |
||||
<template slot-scope="scope"> |
||||
<dict-tag :options="dict.type.write_off_status" :value="scope.row.state"/> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="核销日期" align="center" prop="writeOffTime" width="180"> |
||||
<template slot-scope="scope"> |
||||
<span>{{ parseTime(scope.row.writeOffTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="数据来源" align="center" prop="dataSources" > |
||||
<template slot-scope="scope"> |
||||
<dict-tag :options="dict.type.data_sources" :value="scope.row.dataSources"/> |
||||
</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="['reservationdata:appointmentrecord:edit']" |
||||
>修改</el-button> |
||||
<el-button |
||||
size="mini" |
||||
type="text" |
||||
icon="el-icon-delete" |
||||
@click="handleDelete(scope.row)" |
||||
v-hasPermi="['reservationdata:appointmentrecord: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" append-to-body> |
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> |
||||
<el-form-item label="预约单号" prop="appointmentNumber"> |
||||
<el-input v-model="form.appointmentNumber" placeholder="请输入预约单号" /> |
||||
</el-form-item> |
||||
<el-form-item label="景区名称" prop="scenicName"> |
||||
<el-input v-model="form.scenicName" placeholder="请输入景区名称" /> |
||||
</el-form-item> |
||||
<el-form-item label="预约日期" prop="appointmentDate"> |
||||
<el-date-picker clearable |
||||
v-model="form.appointmentDate" |
||||
type="date" |
||||
value-format="yyyy-MM-dd" |
||||
placeholder="请选择预约日期"> |
||||
</el-date-picker> |
||||
</el-form-item> |
||||
<el-form-item label="预约时段" prop="appointmentSlot"> |
||||
<el-input v-model="form.appointmentSlot" placeholder="请输入预约时段" /> |
||||
</el-form-item> |
||||
<el-form-item label="预约人姓名" prop="appointmentPeopleName"> |
||||
<el-input v-model="form.appointmentPeopleName" placeholder="请输入预约人姓名" /> |
||||
</el-form-item> |
||||
<el-form-item label="预约人手机号" prop="appointmentPeoplePhone"> |
||||
<el-input v-model="form.appointmentPeoplePhone" placeholder="请输入预约人手机号" /> |
||||
</el-form-item> |
||||
<el-form-item label="证件类型" prop="certificateType"> |
||||
<el-select v-model="form.certificateType" placeholder="请选择证件类型"> |
||||
<el-option |
||||
v-for="dict in dict.type.certificate_type" |
||||
:key="dict.value" |
||||
:label="dict.label" |
||||
:value="dict.value" |
||||
></el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
<el-form-item label="证件号码" prop="documentsNumber"> |
||||
<el-input v-model="form.documentsNumber" placeholder="请输入证件号码" /> |
||||
</el-form-item> |
||||
<el-form-item label="预约码" prop="verificationCode"> |
||||
<el-input v-model="form.verificationCode" placeholder="请输入核销码" /> |
||||
</el-form-item> |
||||
<el-form-item label="状态" prop="state"> |
||||
<el-select v-model="form.state" placeholder="状态" clearable> |
||||
<el-option |
||||
v-for="dict in dict.type.write_off_status" |
||||
:key="dict.value" |
||||
:label="dict.label" |
||||
:value="dict.value" |
||||
/> |
||||
</el-select> |
||||
</el-form-item> |
||||
<el-form-item label="核销日期" prop="writeOffTime"> |
||||
<el-date-picker clearable |
||||
v-model="form.writeOffTime" |
||||
type="datetime" |
||||
value-format="yyyy-MM-dd HH:mm:ss" |
||||
placeholder="请选择核销日期"> |
||||
</el-date-picker> |
||||
</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 { listAppointmentrecord, getAppointmentrecord, delAppointmentrecord, addAppointmentrecord, updateAppointmentrecord } from "@/api/reservationdata/appointmentrecord"; |
||||
|
||||
export default { |
||||
name: "Appointmentrecord", |
||||
dicts: ['certificate_type','write_off_status','data_sources'], |
||||
data() { |
||||
return {change:false, |
||||
// 遮罩层 |
||||
loading: true, |
||||
// 选中数组 |
||||
ids: [], |
||||
// 非单个禁用 |
||||
single: true, |
||||
// 非多个禁用 |
||||
multiple: true, |
||||
// 显示搜索条件 |
||||
showSearch: true, |
||||
// 总条数 |
||||
total: 0, |
||||
// 预约记录表格数据 |
||||
appointmentrecordList: [], |
||||
// 弹出层标题 |
||||
title: "", |
||||
// 是否显示弹出层 |
||||
open: false, |
||||
// 查询参数 |
||||
queryParams: { |
||||
pageNum: 1, |
||||
pageSize: 10, |
||||
appointmentNumber: null, |
||||
scenicName: null, |
||||
appointmentDate: null, |
||||
appointmentSlot: null, |
||||
appointmentPeopleName: null, |
||||
appointmentPeoplePhone: null, |
||||
certificateType: null, |
||||
documentsNumber: null, |
||||
verificationCode: null, |
||||
state: null, |
||||
writeOffTime: null, |
||||
dataSources: null, |
||||
organCode: null |
||||
}, |
||||
// 表单参数 |
||||
form: {}, |
||||
// 表单校验 |
||||
rules: { |
||||
} |
||||
}; |
||||
}, |
||||
watch:{ |
||||
'open':{ |
||||
deep:true, |
||||
immediate:true, |
||||
handler(val){ |
||||
if (val == false){ |
||||
this.change = false |
||||
}else { |
||||
this.change = true |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
created() { |
||||
this.getList(); |
||||
}, |
||||
methods: { |
||||
/** 查询预约记录列表 */ |
||||
getList() { |
||||
this.loading = true; |
||||
listAppointmentrecord(this.queryParams).then(response => { |
||||
this.appointmentrecordList = response.rows; |
||||
this.total = response.total; |
||||
this.loading = false; |
||||
}); |
||||
}, |
||||
// 取消按钮 |
||||
cancel() { |
||||
this.open = false; |
||||
this.reset(); |
||||
}, |
||||
// 表单重置 |
||||
reset() { |
||||
this.form = { |
||||
id: null, |
||||
appointmentNumber: null, |
||||
scenicName: null, |
||||
appointmentDate: null, |
||||
appointmentSlot: null, |
||||
appointmentPeopleName: null, |
||||
appointmentPeoplePhone: null, |
||||
certificateType: null, |
||||
documentsNumber: null, |
||||
verificationCode: null, |
||||
state: null, |
||||
writeOffTime: null, |
||||
dataSources: null, |
||||
delFlag: null, |
||||
createBy: null, |
||||
createTime: null, |
||||
updateBy: null, |
||||
updateTime: null, |
||||
organCode: null |
||||
}; |
||||
this.resetForm("form"); |
||||
}, |
||||
/** 搜索按钮操作 */ |
||||
handleQuery() { |
||||
this.queryParams.pageNum = 1; |
||||
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.open = true; |
||||
this.title = "添加预约记录"; |
||||
}, |
||||
/** 修改按钮操作 */ |
||||
handleUpdate(row) { |
||||
this.reset(); |
||||
const id = row.id || this.ids |
||||
getAppointmentrecord(id).then(response => { |
||||
this.form = response.data; |
||||
this.open = true; |
||||
this.title = "修改预约记录"; |
||||
}); |
||||
}, |
||||
/** 提交按钮 */ |
||||
submitForm() { |
||||
this.$refs["form"].validate(valid => { |
||||
if (valid) { |
||||
if (this.form.id != null) { |
||||
updateAppointmentrecord(this.form).then(response => { |
||||
this.$modal.msgSuccess("修改成功"); |
||||
this.open = false; |
||||
this.getList(); |
||||
}); |
||||
} else { |
||||
addAppointmentrecord(this.form).then(response => { |
||||
this.$modal.msgSuccess("新增成功"); |
||||
this.open = false; |
||||
this.getList(); |
||||
}); |
||||
} |
||||
} |
||||
}); |
||||
}, |
||||
/** 删除按钮操作 */ |
||||
handleDelete(row) { |
||||
const ids = row.id || this.ids; |
||||
this.$modal.confirm('是否确认删除预约记录编号为"' + ids + '"的数据项?').then(function() { |
||||
return delAppointmentrecord(ids); |
||||
}).then(() => { |
||||
this.getList(); |
||||
this.$modal.msgSuccess("删除成功"); |
||||
}).catch(() => {}); |
||||
}, |
||||
/** 导出按钮操作 */ |
||||
handleExport() { |
||||
this.download('reservationdata/appointmentrecord/export', { |
||||
...this.queryParams |
||||
}, `appointmentrecord_${new Date().getTime()}.xlsx`) |
||||
} |
||||
} |
||||
}; |
||||
</script> |
Loading…
Reference in new issue