zhangsiqi
6 months ago
11 changed files with 1360 additions and 2 deletions
@ -0,0 +1,151 @@ |
|||
package com.ruoyi.system.controller; |
|||
|
|||
import java.util.List; |
|||
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.ui.ModelMap; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.ResponseBody; |
|||
import com.ruoyi.common.annotation.Log; |
|||
import com.ruoyi.common.enums.BusinessType; |
|||
import com.ruoyi.system.domain.BaseEvectionForm; |
|||
import com.ruoyi.system.service.IBaseEvectionFormService; |
|||
import com.ruoyi.common.core.controller.BaseController; |
|||
import com.ruoyi.common.core.domain.AjaxResult; |
|||
import com.ruoyi.common.utils.poi.ExcelUtil; |
|||
import com.ruoyi.common.core.page.TableDataInfo; |
|||
|
|||
/** |
|||
* 出差单Controller |
|||
* |
|||
* @author zhang |
|||
* @date 2024-05-21 |
|||
*/ |
|||
@Controller |
|||
@RequestMapping("/system/baseEvectionForm") |
|||
public class BaseEvectionFormController extends BaseController |
|||
{ |
|||
private String prefix = "system/baseEvectionForm"; |
|||
|
|||
@Autowired |
|||
private IBaseEvectionFormService baseEvectionFormService; |
|||
|
|||
@RequiresPermissions("system:baseEvectionForm:view") |
|||
@GetMapping() |
|||
public String baseEvectionForm() |
|||
{ |
|||
return prefix + "/baseEvectionForm"; |
|||
} |
|||
|
|||
/** |
|||
* 查询出差单列表 |
|||
*/ |
|||
@RequiresPermissions("system:baseEvectionForm:list") |
|||
@PostMapping("/list") |
|||
@ResponseBody |
|||
public TableDataInfo list(BaseEvectionForm baseEvectionForm) |
|||
{ |
|||
startPage(); |
|||
List<BaseEvectionForm> list = baseEvectionFormService.selectBaseEvectionFormList(baseEvectionForm); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
/** |
|||
* 导出出差单列表 |
|||
*/ |
|||
@RequiresPermissions("system:baseEvectionForm:export") |
|||
@Log(title = "出差单", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
@ResponseBody |
|||
public AjaxResult export(BaseEvectionForm baseEvectionForm) |
|||
{ |
|||
List<BaseEvectionForm> list = baseEvectionFormService.selectBaseEvectionFormList(baseEvectionForm); |
|||
ExcelUtil<BaseEvectionForm> util = new ExcelUtil<BaseEvectionForm>(BaseEvectionForm.class); |
|||
return util.exportExcel(list, "出差单数据"); |
|||
} |
|||
|
|||
/** |
|||
* 新增出差单 |
|||
*/ |
|||
@GetMapping("/add") |
|||
public String add() |
|||
{ |
|||
return prefix + "/add"; |
|||
} |
|||
|
|||
/** |
|||
* 新增保存出差单 |
|||
*/ |
|||
@RequiresPermissions("system:baseEvectionForm:add") |
|||
@Log(title = "出差单", businessType = BusinessType.INSERT) |
|||
@PostMapping("/add") |
|||
@ResponseBody |
|||
public AjaxResult addSave(BaseEvectionForm baseEvectionForm) |
|||
{ |
|||
return toAjax(baseEvectionFormService.insertBaseEvectionForm(baseEvectionForm)); |
|||
} |
|||
|
|||
/** |
|||
* 修改出差单 |
|||
*/ |
|||
@GetMapping("/edit/{evectionId}") |
|||
public String edit(@PathVariable("evectionId") Long evectionId, ModelMap mmap) |
|||
{ |
|||
BaseEvectionForm baseEvectionForm = baseEvectionFormService.selectBaseEvectionFormById(evectionId); |
|||
mmap.put("baseEvectionForm", baseEvectionForm); |
|||
return prefix + "/edit"; |
|||
} |
|||
|
|||
/** |
|||
* 修改保存出差单 |
|||
*/ |
|||
@RequiresPermissions("system:baseEvectionForm:edit") |
|||
@Log(title = "出差单", businessType = BusinessType.UPDATE) |
|||
@PostMapping("/edit") |
|||
@ResponseBody |
|||
public AjaxResult editSave(BaseEvectionForm baseEvectionForm) |
|||
{ |
|||
return toAjax(baseEvectionFormService.updateBaseEvectionForm(baseEvectionForm)); |
|||
} |
|||
|
|||
/** |
|||
* 删除出差单 |
|||
*/ |
|||
@RequiresPermissions("system:baseEvectionForm:remove") |
|||
@Log(title = "出差单", businessType = BusinessType.DELETE) |
|||
@PostMapping( "/remove") |
|||
@ResponseBody |
|||
public AjaxResult remove(String ids) |
|||
{ |
|||
return toAjax(baseEvectionFormService.deleteBaseEvectionFormByIds(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 作废出差单 |
|||
*/ |
|||
@RequiresPermissions("system:baseEvectionForm:cancel") |
|||
@Log(title = "出差单", businessType = BusinessType.CANCEL) |
|||
@GetMapping( "/cancel/{id}") |
|||
@ResponseBody |
|||
public AjaxResult cancel(@PathVariable("id") Long id){ |
|||
return toAjax(baseEvectionFormService.cancelBaseEvectionFormById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 恢复出差单 |
|||
*/ |
|||
@RequiresPermissions("system:baseEvectionForm:restore") |
|||
@Log(title = "出差单", businessType = BusinessType.RESTORE) |
|||
@GetMapping( "/restore/{id}") |
|||
@ResponseBody |
|||
public AjaxResult restore(@PathVariable("id")Long id) |
|||
{ |
|||
return toAjax(baseEvectionFormService.restoreBaseEvectionFormById(id)); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,336 @@ |
|||
package com.ruoyi.system.domain; |
|||
|
|||
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; |
|||
|
|||
/** |
|||
* 出差单对象 base_evection_form |
|||
* |
|||
* @author zhang |
|||
* @date 2024-05-21 |
|||
*/ |
|||
public class BaseEvectionForm extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 出差单索引id */ |
|||
private Long evectionId; |
|||
|
|||
/** 审核状态 */ |
|||
@Excel(name = "审核状态") |
|||
private String auditStatus; |
|||
|
|||
/** 使用状态 */ |
|||
@Excel(name = "使用状态") |
|||
private String useStatus; |
|||
|
|||
/** 人事行政 */ |
|||
@Excel(name = "人事行政") |
|||
private String personnelAdministration; |
|||
|
|||
/** 出差单编号 */ |
|||
@Excel(name = "出差单编号") |
|||
private String evectionCode; |
|||
|
|||
/** 部门 */ |
|||
@Excel(name = "部门") |
|||
private String deptName; |
|||
|
|||
/** 岗位 */ |
|||
@Excel(name = "岗位") |
|||
private String postName; |
|||
|
|||
/** 出差人 */ |
|||
@Excel(name = "出差人") |
|||
private String evectionBy; |
|||
|
|||
/** 同行人 */ |
|||
@Excel(name = "同行人") |
|||
private String partnerBy; |
|||
|
|||
/** 出差地 */ |
|||
@Excel(name = "出差地") |
|||
private String evectionAddr; |
|||
|
|||
/** 出差详细地址 */ |
|||
@Excel(name = "出差详细地址") |
|||
private String evectionDetailAddr; |
|||
|
|||
/** 出差事由 */ |
|||
@Excel(name = "出差事由") |
|||
private String evectionCauses; |
|||
|
|||
/** 出差时间 */ |
|||
@Excel(name = "出差时间") |
|||
private String evectionTime; |
|||
|
|||
/** 派工单号 */ |
|||
@Excel(name = "派工单号") |
|||
private String dispatchlistCode; |
|||
|
|||
/** 生产单号 */ |
|||
@Excel(name = "生产单号") |
|||
private String makeCode; |
|||
|
|||
/** 出行方式 */ |
|||
@Excel(name = "出行方式") |
|||
private String travelMode; |
|||
|
|||
/** 酒店 */ |
|||
@Excel(name = "酒店") |
|||
private String hotel; |
|||
|
|||
/** 交通预算费用 */ |
|||
@Excel(name = "交通预算费用") |
|||
private String transportationCostBudget; |
|||
|
|||
/** 住宿预算费用 */ |
|||
@Excel(name = "住宿预算费用") |
|||
private String accommodationBudget; |
|||
|
|||
/** 其他预算费用 */ |
|||
@Excel(name = "其他预算费用") |
|||
private String otherExpensesBudget; |
|||
|
|||
/** 实际出差时间 */ |
|||
@Excel(name = "实际出差时间") |
|||
private String realityEvenctionTime; |
|||
|
|||
/** 申请人 */ |
|||
@Excel(name = "申请人") |
|||
private String applyUser; |
|||
|
|||
public void setEvectionId(Long evectionId) |
|||
{ |
|||
this.evectionId = evectionId; |
|||
} |
|||
|
|||
public Long getEvectionId() |
|||
{ |
|||
return evectionId; |
|||
} |
|||
public void setAuditStatus(String auditStatus) |
|||
{ |
|||
this.auditStatus = auditStatus; |
|||
} |
|||
|
|||
public String getAuditStatus() |
|||
{ |
|||
return auditStatus; |
|||
} |
|||
public void setUseStatus(String useStatus) |
|||
{ |
|||
this.useStatus = useStatus; |
|||
} |
|||
|
|||
public String getUseStatus() |
|||
{ |
|||
return useStatus; |
|||
} |
|||
public void setPersonnelAdministration(String personnelAdministration) |
|||
{ |
|||
this.personnelAdministration = personnelAdministration; |
|||
} |
|||
|
|||
public String getPersonnelAdministration() |
|||
{ |
|||
return personnelAdministration; |
|||
} |
|||
public void setEvectionCode(String evectionCode) |
|||
{ |
|||
this.evectionCode = evectionCode; |
|||
} |
|||
|
|||
public String getEvectionCode() |
|||
{ |
|||
return evectionCode; |
|||
} |
|||
public void setDeptName(String deptName) |
|||
{ |
|||
this.deptName = deptName; |
|||
} |
|||
|
|||
public String getDeptName() |
|||
{ |
|||
return deptName; |
|||
} |
|||
public void setPostName(String postName) |
|||
{ |
|||
this.postName = postName; |
|||
} |
|||
|
|||
public String getPostName() |
|||
{ |
|||
return postName; |
|||
} |
|||
public void setEvectionBy(String evectionBy) |
|||
{ |
|||
this.evectionBy = evectionBy; |
|||
} |
|||
|
|||
public String getEvectionBy() |
|||
{ |
|||
return evectionBy; |
|||
} |
|||
public void setPartnerBy(String partnerBy) |
|||
{ |
|||
this.partnerBy = partnerBy; |
|||
} |
|||
|
|||
public String getPartnerBy() |
|||
{ |
|||
return partnerBy; |
|||
} |
|||
public void setEvectionAddr(String evectionAddr) |
|||
{ |
|||
this.evectionAddr = evectionAddr; |
|||
} |
|||
|
|||
public String getEvectionAddr() |
|||
{ |
|||
return evectionAddr; |
|||
} |
|||
public void setEvectionDetailAddr(String evectionDetailAddr) |
|||
{ |
|||
this.evectionDetailAddr = evectionDetailAddr; |
|||
} |
|||
|
|||
public String getEvectionDetailAddr() |
|||
{ |
|||
return evectionDetailAddr; |
|||
} |
|||
public void setEvectionCauses(String evectionCauses) |
|||
{ |
|||
this.evectionCauses = evectionCauses; |
|||
} |
|||
|
|||
public String getEvectionCauses() |
|||
{ |
|||
return evectionCauses; |
|||
} |
|||
public void setEvectionTime(String evectionTime) |
|||
{ |
|||
this.evectionTime = evectionTime; |
|||
} |
|||
|
|||
public String getEvectionTime() |
|||
{ |
|||
return evectionTime; |
|||
} |
|||
public void setDispatchlistCode(String dispatchlistCode) |
|||
{ |
|||
this.dispatchlistCode = dispatchlistCode; |
|||
} |
|||
|
|||
public String getDispatchlistCode() |
|||
{ |
|||
return dispatchlistCode; |
|||
} |
|||
public void setMakeCode(String makeCode) |
|||
{ |
|||
this.makeCode = makeCode; |
|||
} |
|||
|
|||
public String getMakeCode() |
|||
{ |
|||
return makeCode; |
|||
} |
|||
public void setTravelMode(String travelMode) |
|||
{ |
|||
this.travelMode = travelMode; |
|||
} |
|||
|
|||
public String getTravelMode() |
|||
{ |
|||
return travelMode; |
|||
} |
|||
public void setHotel(String hotel) |
|||
{ |
|||
this.hotel = hotel; |
|||
} |
|||
|
|||
public String getHotel() |
|||
{ |
|||
return hotel; |
|||
} |
|||
public void setTransportationCostBudget(String transportationCostBudget) |
|||
{ |
|||
this.transportationCostBudget = transportationCostBudget; |
|||
} |
|||
|
|||
public String getTransportationCostBudget() |
|||
{ |
|||
return transportationCostBudget; |
|||
} |
|||
public void setAccommodationBudget(String accommodationBudget) |
|||
{ |
|||
this.accommodationBudget = accommodationBudget; |
|||
} |
|||
|
|||
public String getAccommodationBudget() |
|||
{ |
|||
return accommodationBudget; |
|||
} |
|||
public void setOtherExpensesBudget(String otherExpensesBudget) |
|||
{ |
|||
this.otherExpensesBudget = otherExpensesBudget; |
|||
} |
|||
|
|||
public String getOtherExpensesBudget() |
|||
{ |
|||
return otherExpensesBudget; |
|||
} |
|||
public void setRealityEvenctionTime(String realityEvenctionTime) |
|||
{ |
|||
this.realityEvenctionTime = realityEvenctionTime; |
|||
} |
|||
|
|||
public String getRealityEvenctionTime() |
|||
{ |
|||
return realityEvenctionTime; |
|||
} |
|||
public void setApplyUser(String applyUser) |
|||
{ |
|||
this.applyUser = applyUser; |
|||
} |
|||
|
|||
public String getApplyUser() |
|||
{ |
|||
return applyUser; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|||
.append("evectionId", getEvectionId()) |
|||
.append("auditStatus", getAuditStatus()) |
|||
.append("useStatus", getUseStatus()) |
|||
.append("personnelAdministration", getPersonnelAdministration()) |
|||
.append("evectionCode", getEvectionCode()) |
|||
.append("deptName", getDeptName()) |
|||
.append("postName", getPostName()) |
|||
.append("evectionBy", getEvectionBy()) |
|||
.append("partnerBy", getPartnerBy()) |
|||
.append("evectionAddr", getEvectionAddr()) |
|||
.append("evectionDetailAddr", getEvectionDetailAddr()) |
|||
.append("evectionCauses", getEvectionCauses()) |
|||
.append("evectionTime", getEvectionTime()) |
|||
.append("dispatchlistCode", getDispatchlistCode()) |
|||
.append("makeCode", getMakeCode()) |
|||
.append("travelMode", getTravelMode()) |
|||
.append("hotel", getHotel()) |
|||
.append("transportationCostBudget", getTransportationCostBudget()) |
|||
.append("accommodation budget", getAccommodationBudget()) |
|||
.append("otherExpensesBudget", getOtherExpensesBudget()) |
|||
.append("realityEvenctionTime", getRealityEvenctionTime()) |
|||
.append("applyUser", getApplyUser()) |
|||
.append("createBy", getCreateBy()) |
|||
.append("createTime", getCreateTime()) |
|||
.append("updateBy", getUpdateBy()) |
|||
.append("updateTime", getUpdateTime()) |
|||
.append("remark", getRemark()) |
|||
.toString(); |
|||
} |
|||
} |
@ -0,0 +1,77 @@ |
|||
package com.ruoyi.system.mapper; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.system.domain.BaseEvectionForm; |
|||
|
|||
/** |
|||
* 出差单Mapper接口 |
|||
* |
|||
* @author zhang |
|||
* @date 2024-05-21 |
|||
*/ |
|||
public interface BaseEvectionFormMapper |
|||
{ |
|||
/** |
|||
* 查询出差单 |
|||
* |
|||
* @param evectionId 出差单ID |
|||
* @return 出差单 |
|||
*/ |
|||
public BaseEvectionForm selectBaseEvectionFormById(Long evectionId); |
|||
|
|||
/** |
|||
* 查询出差单列表 |
|||
* |
|||
* @param baseEvectionForm 出差单 |
|||
* @return 出差单集合 |
|||
*/ |
|||
public List<BaseEvectionForm> selectBaseEvectionFormList(BaseEvectionForm baseEvectionForm); |
|||
|
|||
/** |
|||
* 新增出差单 |
|||
* |
|||
* @param baseEvectionForm 出差单 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertBaseEvectionForm(BaseEvectionForm baseEvectionForm); |
|||
|
|||
/** |
|||
* 修改出差单 |
|||
* |
|||
* @param baseEvectionForm 出差单 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateBaseEvectionForm(BaseEvectionForm baseEvectionForm); |
|||
|
|||
/** |
|||
* 删除出差单 |
|||
* |
|||
* @param evectionId 出差单ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteBaseEvectionFormById(Long evectionId); |
|||
|
|||
/** |
|||
* 批量删除出差单 |
|||
* |
|||
* @param evectionIds 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteBaseEvectionFormByIds(String[] evectionIds); |
|||
|
|||
/** |
|||
* 作废出差单 |
|||
* |
|||
* @param evectionId 出差单ID |
|||
* @return 结果 |
|||
*/ |
|||
public int cancelBaseEvectionFormById(Long evectionId); |
|||
|
|||
/** |
|||
* 恢复出差单 |
|||
* |
|||
* @param evectionId 出差单ID |
|||
* @return 结果 |
|||
*/ |
|||
public int restoreBaseEvectionFormById(Long evectionId); |
|||
} |
@ -0,0 +1,75 @@ |
|||
package com.ruoyi.system.service; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.system.domain.BaseEvectionForm; |
|||
|
|||
/** |
|||
* 出差单Service接口 |
|||
* |
|||
* @author zhang |
|||
* @date 2024-05-21 |
|||
*/ |
|||
public interface IBaseEvectionFormService |
|||
{ |
|||
/** |
|||
* 查询出差单 |
|||
* |
|||
* @param evectionId 出差单ID |
|||
* @return 出差单 |
|||
*/ |
|||
public BaseEvectionForm selectBaseEvectionFormById(Long evectionId); |
|||
|
|||
/** |
|||
* 查询出差单列表 |
|||
* |
|||
* @param baseEvectionForm 出差单 |
|||
* @return 出差单集合 |
|||
*/ |
|||
public List<BaseEvectionForm> selectBaseEvectionFormList(BaseEvectionForm baseEvectionForm); |
|||
|
|||
/** |
|||
* 新增出差单 |
|||
* |
|||
* @param baseEvectionForm 出差单 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertBaseEvectionForm(BaseEvectionForm baseEvectionForm); |
|||
|
|||
/** |
|||
* 修改出差单 |
|||
* |
|||
* @param baseEvectionForm 出差单 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateBaseEvectionForm(BaseEvectionForm baseEvectionForm); |
|||
|
|||
/** |
|||
* 批量删除出差单 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteBaseEvectionFormByIds(String ids); |
|||
|
|||
/** |
|||
* 删除出差单信息 |
|||
* |
|||
* @param evectionId 出差单ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteBaseEvectionFormById(Long evectionId); |
|||
|
|||
/** |
|||
* 作废出差单 |
|||
* @param evectionId 出差单ID |
|||
* @return |
|||
*/ |
|||
int cancelBaseEvectionFormById(Long evectionId); |
|||
|
|||
/** |
|||
* 恢复出差单 |
|||
* @param evectionId 出差单ID |
|||
* @return |
|||
*/ |
|||
int restoreBaseEvectionFormById(Long evectionId); |
|||
} |
@ -0,0 +1,126 @@ |
|||
package com.ruoyi.system.service.impl; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.common.utils.DateUtils; |
|||
import com.ruoyi.common.utils.ShiroUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import com.ruoyi.system.mapper.BaseEvectionFormMapper; |
|||
import com.ruoyi.system.domain.BaseEvectionForm; |
|||
import com.ruoyi.system.service.IBaseEvectionFormService; |
|||
import com.ruoyi.common.core.text.Convert; |
|||
|
|||
/** |
|||
* 出差单Service业务层处理 |
|||
* |
|||
* @author zhang |
|||
* @date 2024-05-21 |
|||
*/ |
|||
@Service |
|||
public class BaseEvectionFormServiceImpl implements IBaseEvectionFormService |
|||
{ |
|||
@Autowired |
|||
private BaseEvectionFormMapper baseEvectionFormMapper; |
|||
|
|||
/** |
|||
* 查询出差单 |
|||
* |
|||
* @param evectionId 出差单ID |
|||
* @return 出差单 |
|||
*/ |
|||
@Override |
|||
public BaseEvectionForm selectBaseEvectionFormById(Long evectionId) |
|||
{ |
|||
return baseEvectionFormMapper.selectBaseEvectionFormById(evectionId); |
|||
} |
|||
|
|||
/** |
|||
* 查询出差单列表 |
|||
* |
|||
* @param baseEvectionForm 出差单 |
|||
* @return 出差单 |
|||
*/ |
|||
@Override |
|||
public List<BaseEvectionForm> selectBaseEvectionFormList(BaseEvectionForm baseEvectionForm) |
|||
{ |
|||
return baseEvectionFormMapper.selectBaseEvectionFormList(baseEvectionForm); |
|||
} |
|||
|
|||
/** |
|||
* 新增出差单 |
|||
* |
|||
* @param baseEvectionForm 出差单 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int insertBaseEvectionForm(BaseEvectionForm baseEvectionForm) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
baseEvectionForm.setCreateBy(loginName); |
|||
baseEvectionForm.setCreateTime(DateUtils.getNowDate()); |
|||
return baseEvectionFormMapper.insertBaseEvectionForm(baseEvectionForm); |
|||
} |
|||
|
|||
/** |
|||
* 修改出差单 |
|||
* |
|||
* @param baseEvectionForm 出差单 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int updateBaseEvectionForm(BaseEvectionForm baseEvectionForm) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
baseEvectionForm.setUpdateBy(loginName); |
|||
baseEvectionForm.setUpdateTime(DateUtils.getNowDate()); |
|||
return baseEvectionFormMapper.updateBaseEvectionForm(baseEvectionForm); |
|||
} |
|||
|
|||
/** |
|||
* 删除出差单对象 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteBaseEvectionFormByIds(String ids) |
|||
{ |
|||
return baseEvectionFormMapper.deleteBaseEvectionFormByIds(Convert.toStrArray(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 删除出差单信息 |
|||
* |
|||
* @param evectionId 出差单ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteBaseEvectionFormById(Long evectionId) |
|||
{ |
|||
return baseEvectionFormMapper.deleteBaseEvectionFormById(evectionId); |
|||
} |
|||
|
|||
/** |
|||
* 作废出差单 |
|||
* |
|||
* @param evectionId 出差单ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int cancelBaseEvectionFormById(Long evectionId) |
|||
{ |
|||
return baseEvectionFormMapper.cancelBaseEvectionFormById(evectionId); |
|||
} |
|||
|
|||
/** |
|||
* 恢复出差单信息 |
|||
* |
|||
* @param evectionId 出差单ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int restoreBaseEvectionFormById(Long evectionId) |
|||
{ |
|||
return baseEvectionFormMapper.restoreBaseEvectionFormById(evectionId); |
|||
} |
|||
} |
@ -0,0 +1,181 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper |
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ruoyi.system.mapper.BaseEvectionFormMapper"> |
|||
|
|||
<resultMap type="BaseEvectionForm" id="BaseEvectionFormResult"> |
|||
<result property="evectionId" column="evection_id" /> |
|||
<result property="auditStatus" column="audit_status" /> |
|||
<result property="useStatus" column="use_status" /> |
|||
<result property="personnelAdministration" column="personnel_administration" /> |
|||
<result property="evectionCode" column="evection_code" /> |
|||
<result property="deptName" column="deptName" /> |
|||
<result property="postName" column="postName" /> |
|||
<result property="evectionBy" column="evection_by" /> |
|||
<result property="partnerBy" column="partner_by" /> |
|||
<result property="evectionAddr" column="evection_addr" /> |
|||
<result property="evectionDetailAddr" column="evection_detail_addr" /> |
|||
<result property="evectionCauses" column="evection_causes" /> |
|||
<result property="evectionTime" column="evection_time" /> |
|||
<result property="dispatchlistCode" column="dispatchlist_code" /> |
|||
<result property="makeCode" column="make_code" /> |
|||
<result property="travelMode" column="travel_mode" /> |
|||
<result property="hotel" column="hotel" /> |
|||
<result property="transportationCostBudget" column="transportation_cost_budget" /> |
|||
<result property="accommodationBudget" column="accommodation_budget" /> |
|||
<result property="otherExpensesBudget" column="other_expenses_budget" /> |
|||
<result property="realityEvenctionTime" column="reality_evenction_time" /> |
|||
<result property="applyUser" column="apply_user" /> |
|||
<result property="createBy" column="create_by" /> |
|||
<result property="createTime" column="create_time" /> |
|||
<result property="updateBy" column="update_by" /> |
|||
<result property="updateTime" column="update_time" /> |
|||
<result property="remark" column="remark" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectBaseEvectionFormVo"> |
|||
select evection_id, audit_status, use_status, personnel_administration, |
|||
evection_code, deptName, postName, evection_by, partner_by, evection_addr, |
|||
evection_detail_addr, evection_causes, evection_time, dispatchlist_code, |
|||
make_code, travel_mode, hotel, transportation_cost_budget, accommodation_budget, |
|||
other_expenses_budget, reality_evenction_time, apply_user, create_by, create_time, |
|||
update_by, update_time, remark |
|||
from base_evection_form |
|||
</sql> |
|||
|
|||
<select id="selectBaseEvectionFormList" parameterType="BaseEvectionForm" resultMap="BaseEvectionFormResult"> |
|||
<include refid="selectBaseEvectionFormVo"/> |
|||
<where> |
|||
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if> |
|||
<if test="useStatus != null and useStatus != ''"> and use_status = #{useStatus}</if> |
|||
<if test="evectionCode != null and evectionCode != ''"> and evection_code = #{evectionCode}</if> |
|||
<if test="evectionAddr != null and evectionAddr != ''"> and evection_addr = #{evectionAddr}</if> |
|||
<if test="evectionDetailAddr != null and evectionDetailAddr != ''"> and evection_detail_addr = #{evectionDetailAddr}</if> |
|||
<if test="evectionCauses != null and evectionCauses != ''"> and evection_causes = #{evectionCauses}</if> |
|||
<if test="dispatchlistCode != null and dispatchlistCode != ''"> and dispatchlist_code = #{dispatchlistCode}</if> |
|||
<if test="makeCode != null and makeCode != ''"> and make_code = #{makeCode}</if> |
|||
<if test="travelMode != null and travelMode != ''"> and travel_mode = #{travelMode}</if> |
|||
<if test="applyUser != null and applyUser != ''"> and apply_user = #{applyUser}</if> |
|||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectBaseEvectionFormById" parameterType="Long" resultMap="BaseEvectionFormResult"> |
|||
<include refid="selectBaseEvectionFormVo"/> |
|||
where evection_id = #{evectionId} |
|||
</select> |
|||
|
|||
<insert id="insertBaseEvectionForm" parameterType="BaseEvectionForm" useGeneratedKeys="true" keyProperty="evectionId"> |
|||
insert into base_evection_form |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="auditStatus != null">audit_status,</if> |
|||
<if test="useStatus != null">use_status,</if> |
|||
<if test="personnelAdministration != null">personnel_administration,</if> |
|||
<if test="evectionCode != null">evection_code,</if> |
|||
<if test="deptName != null">deptName,</if> |
|||
<if test="postName != null">postName,</if> |
|||
<if test="evectionBy != null">evection_by,</if> |
|||
<if test="partnerBy != null">partner_by,</if> |
|||
<if test="evectionAddr != null">evection_addr,</if> |
|||
<if test="evectionDetailAddr != null">evection_detail_addr,</if> |
|||
<if test="evectionCauses != null">evection_causes,</if> |
|||
<if test="evectionTime != null">evection_time,</if> |
|||
<if test="dispatchlistCode != null">dispatchlist_code,</if> |
|||
<if test="makeCode != null">make_code,</if> |
|||
<if test="travelMode != null">travel_mode,</if> |
|||
<if test="hotel != null">hotel,</if> |
|||
<if test="transportationCostBudget != null">transportation_cost_budget,</if> |
|||
<if test="accommodationBudget != null">accommodation_budget,</if> |
|||
<if test="otherExpensesBudget != null">other_expenses_budget,</if> |
|||
<if test="realityEvenctionTime != null">reality_evenction_time,</if> |
|||
<if test="applyUser != null">apply_user,</if> |
|||
<if test="createBy != null">create_by,</if> |
|||
<if test="createTime != null">create_time,</if> |
|||
<if test="updateBy != null">update_by,</if> |
|||
<if test="updateTime != null">update_time,</if> |
|||
<if test="remark != null">remark,</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="auditStatus != null">#{auditStatus},</if> |
|||
<if test="useStatus != null">#{useStatus},</if> |
|||
<if test="personnelAdministration != null">#{personnelAdministration},</if> |
|||
<if test="evectionCode != null">#{evectionCode},</if> |
|||
<if test="deptName != null">#{deptName},</if> |
|||
<if test="postName != null">#{postName},</if> |
|||
<if test="evectionBy != null">#{evectionBy},</if> |
|||
<if test="partnerBy != null">#{partnerBy},</if> |
|||
<if test="evectionAddr != null">#{evectionAddr},</if> |
|||
<if test="evectionDetailAddr != null">#{evectionDetailAddr},</if> |
|||
<if test="evectionCauses != null">#{evectionCauses},</if> |
|||
<if test="evectionTime != null">#{evectionTime},</if> |
|||
<if test="dispatchlistCode != null">#{dispatchlistCode},</if> |
|||
<if test="makeCode != null">#{makeCode},</if> |
|||
<if test="travelMode != null">#{travelMode},</if> |
|||
<if test="hotel != null">#{hotel},</if> |
|||
<if test="transportationCostBudget != null">#{transportationCostBudget},</if> |
|||
<if test="accommodationBudget != null">#{accommodationBudget},</if> |
|||
<if test="otherExpensesBudget != null">#{otherExpensesBudget},</if> |
|||
<if test="realityEvenctionTime != null">#{realityEvenctionTime},</if> |
|||
<if test="applyUser != null">#{applyUser},</if> |
|||
<if test="createBy != null">#{createBy},</if> |
|||
<if test="createTime != null">#{createTime},</if> |
|||
<if test="updateBy != null">#{updateBy},</if> |
|||
<if test="updateTime != null">#{updateTime},</if> |
|||
<if test="remark != null">#{remark},</if> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateBaseEvectionForm" parameterType="BaseEvectionForm"> |
|||
update base_evection_form |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="auditStatus != null">audit_status = #{auditStatus},</if> |
|||
<if test="useStatus != null">use_status = #{useStatus},</if> |
|||
<if test="personnelAdministration != null">personnel_administration = #{personnelAdministration},</if> |
|||
<if test="evectionCode != null">evection_code = #{evectionCode},</if> |
|||
<if test="deptName != null">deptName = #{deptName},</if> |
|||
<if test="postName != null">postName = #{postName},</if> |
|||
<if test="evectionBy != null">evection_by = #{evectionBy},</if> |
|||
<if test="partnerBy != null">partner_by = #{partnerBy},</if> |
|||
<if test="evectionAddr != null">evection_addr = #{evectionAddr},</if> |
|||
<if test="evectionDetailAddr != null">evection_detail_addr = #{evectionDetailAddr},</if> |
|||
<if test="evectionCauses != null">evection_causes = #{evectionCauses},</if> |
|||
<if test="evectionTime != null">evection_time = #{evectionTime},</if> |
|||
<if test="dispatchlistCode != null">dispatchlist_code = #{dispatchlistCode},</if> |
|||
<if test="makeCode != null">make_code = #{makeCode},</if> |
|||
<if test="travelMode != null">travel_mode = #{travelMode},</if> |
|||
<if test="hotel != null">hotel = #{hotel},</if> |
|||
<if test="transportationCostBudget != null">transportation_cost_budget = #{transportationCostBudget},</if> |
|||
<if test="accommodationBudget != null">accommodation_budget = #{accommodationBudget},</if> |
|||
<if test="otherExpensesBudget != null">other_expenses_budget = #{otherExpensesBudget},</if> |
|||
<if test="realityEvenctionTime != null">reality_evenction_time = #{realityEvenctionTime},</if> |
|||
<if test="applyUser != null">apply_user = #{applyUser},</if> |
|||
<if test="createBy != null">create_by = #{createBy},</if> |
|||
<if test="createTime != null">create_time = #{createTime},</if> |
|||
<if test="updateBy != null">update_by = #{updateBy},</if> |
|||
<if test="updateTime != null">update_time = #{updateTime},</if> |
|||
<if test="remark != null">remark = #{remark},</if> |
|||
</trim> |
|||
where evection_id = #{evectionId} |
|||
</update> |
|||
|
|||
<delete id="deleteBaseEvectionFormById" parameterType="Long"> |
|||
delete from base_evection_form where evection_id = #{evectionId} |
|||
</delete> |
|||
|
|||
<delete id="deleteBaseEvectionFormByIds" parameterType="String"> |
|||
delete from base_evection_form where evection_id in |
|||
<foreach item="evectionId" collection="array" open="(" separator="," close=")"> |
|||
#{evectionId} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<update id="cancelBaseEvectionFormById" parameterType="Long"> |
|||
update base_evection_form set del_flag = '1' where evection_id = #{evectionId} |
|||
</update> |
|||
|
|||
<update id="restoreBaseEvectionFormById" parameterType="Long"> |
|||
update base_evection_form set del_flag = '0' where evection_id = #{evectionId} |
|||
</update> |
|||
|
|||
</mapper> |
@ -0,0 +1,168 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('新增出差单')" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-baseEvectionForm-add"> |
|||
<div class="form-group" hidden="hidden"> |
|||
<label class="col-sm-3 control-label">出差单编号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="evectionCode" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">部门:</label> |
|||
<div class="col-sm-8"> |
|||
<select id="deptName" name="deptName" class="form-control"></select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">岗位:</label> |
|||
<div class="col-sm-8"> |
|||
<select id="postName" name="postName" class="form-control"></select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">姓名:</label> |
|||
<div class="col-sm-8"> |
|||
<select id="evectionBy" name="evectionBy" class="form-control"></select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">同行人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="partnerBy" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">预计出差时间:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="evectionBeginTime" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
<span class="input-group-addon">-</span> |
|||
<input name="evectionEndTime" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">出差地:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="evectionAddr" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-row col-sm-12"> |
|||
<label class="col-sm-3 control-label">出差详细地址:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="evectionDetailAddr" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-row col-sm-12"> |
|||
<label class="col-sm-3 control-label">出差事由:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="evectionCauses" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">售后单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="dispatchlistCode" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">生产单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="makeCode" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
|
|||
<!-- <div class="form-group"> |
|||
<label class="col-sm-3 control-label">出行方式:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="travelMode" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">酒店:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="hotel" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">交通预算费用:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="transportationCostBudget" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">住宿预算费用:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="accommodationBudget" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">其他预算费用:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="otherExpensesBudget" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">实际出差时间:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="realityEvenctionTime" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">申请人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="applyUser" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">备注:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="remark" class="form-control" type="text"> |
|||
</div> |
|||
</div> --> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "system/baseEvectionForm" |
|||
$("#form-baseEvectionForm-add").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/add", $('#form-baseEvectionForm-add').serialize()); |
|||
} |
|||
} |
|||
|
|||
$("input[name='evectionBeginTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
$("input[name='evectionEndTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
$("input[name='realityEvenctionTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,128 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
|||
<head> |
|||
<th:block th:include="include :: header('出差单列表')" /> |
|||
</head> |
|||
<body class="gray-bg"> |
|||
<div class="container-div"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 search-collapse"> |
|||
<form id="formId"> |
|||
<div class="select-list"> |
|||
<ul> |
|||
<li> |
|||
<label>审核状态:</label> |
|||
<select name="auditStatus" th:with="type=${@dict.getType('auditStatus')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<label>使用状态:</label> |
|||
<select name="useStatus" th:with="type=${@dict.getType('useStatus')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<label>出差单编号:</label> |
|||
<input type="text" name="evectionCode"/> |
|||
</li> |
|||
<li> |
|||
<label>出差人:</label> |
|||
<input type="text" name="evectionBy"/> |
|||
</li> |
|||
<li class="select-time"> |
|||
<label>录入时间:</label> |
|||
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/> |
|||
<span>-</span> |
|||
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/> |
|||
</li> |
|||
<li> |
|||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
|||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
|
|||
<div class="btn-group-sm" id="toolbar" role="group"> |
|||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:baseEvectionForm:add"> |
|||
<i class="fa fa-plus"></i> 添加 |
|||
</a> |
|||
</div> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var editFlag = [[${@permission.hasPermi('system:baseEvectionForm:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('system:baseEvectionForm:remove')}]]; |
|||
var cancelFlag = [[${@permission.hasPermi('system:baseEvectionForm:cancel')}]]; |
|||
var restoreFlag = [[${@permission.hasPermi('system:baseEvectionForm:restore')}]]; |
|||
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; |
|||
var useStatusDatas = [[${@dict.getType('useStatus')}]]; |
|||
var prefix = ctx + "system/baseEvectionForm"; |
|||
|
|||
$(function() { |
|||
var options = { |
|||
url: prefix + "/list", |
|||
createUrl: prefix + "/add", |
|||
updateUrl: prefix + "/edit/{id}", |
|||
removeUrl: prefix + "/remove", |
|||
cancelUrl: prefix + "/cancel/{id}", |
|||
restoreUrl: prefix + "/restore/{id}", |
|||
exportUrl: prefix + "/export", |
|||
modalName: "出差单", |
|||
columns: [ |
|||
{checkbox: true}, |
|||
{title: '出差单索引id',field: 'evectionId',visible: false}, |
|||
{title: '审核状态',field: 'auditStatus', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(auditStatusDatas, value); |
|||
} |
|||
}, |
|||
{title: '使用状态',field: 'useStatus', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(useStatusDatas, value); |
|||
} |
|||
}, |
|||
{title: '人事行政',field: 'personnelAdministration',}, |
|||
{title: '出差单编号',field: 'evectionCode',}, |
|||
{title: '出差人',field: 'evectionBy',}, |
|||
{title: '同行人',field: 'partnerBy',}, |
|||
{title: '出差地',field: 'evectionAddr',}, |
|||
{title: '出差详细地址',field: 'evectionDetailAddr',}, |
|||
{title: '出差事由',field: 'evectionCauses',}, |
|||
{title: '出差时间',field: 'evectionTime',}, |
|||
{title: '派工单号',field: 'dispatchlistCode',}, |
|||
{title: '生产单号',field: 'makeCode',}, |
|||
{title: '出行方式',field: 'travelMode',visible: false}, |
|||
{title: '酒店',field: 'hotel',visible: false}, |
|||
{title: '申请人',field: 'applyUser',visible: false,}, |
|||
{title: '备注',field: 'remark',visible: false}, |
|||
{ |
|||
title: '操作', |
|||
align: 'center', |
|||
formatter: function(value, row, index) { |
|||
var actions = []; |
|||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.evectionId + '\')"><i class="fa fa-edit"></i>编辑</a> '); |
|||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.evectionId + '\')"><i class="fa fa-remove"></i>删除</a> '); |
|||
if(row.delFlag == '0'){ |
|||
actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a> '); |
|||
}else{ |
|||
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i>恢复</a> '); |
|||
} |
|||
return actions.join(''); |
|||
} |
|||
} |
|||
] |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,115 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('修改出差单')" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-baseEvectionForm-edit" th:object="${baseEvectionForm}"> |
|||
<input name="evectionId" th:field="*{evectionId}" type="hidden"> |
|||
<div class="form-group" hidden="hidden"> |
|||
<label class="col-sm-3 control-label">出差单编号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="evectionCode" th:field="*{evectionCode}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">部门:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="deptName" th:field="*{deptName}" class="form-control"></select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">岗位:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="postName" th:field="*{postName}" class="form-control"></select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">出差人:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="evectionBy" th:field="*{evectionBy}" class="form-control"></select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">同行人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="partnerBy" th:field="*{partnerBy}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">出差地:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="evectionAddr" th:field="*{evectionAddr}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">出差详细地址:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="evectionDetailAddr" th:field="*{evectionDetailAddr}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">出差事由:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="evectionCauses" th:field="*{evectionCauses}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">出差时间:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="evectionBeginTime" th:value="${#strings.split(evecionTime, '-')[0]}" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
<span class="input-group-addon">-</span> |
|||
<input name="evectionEndTime" th:value="${#strings.split(evecionTime, '-')[1]}" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">派工单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="dispatchlistCode" th:field="*{dispatchlistCode}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">生产单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="makeCode" th:field="*{makeCode}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "system/baseEvectionForm"; |
|||
$("#form-baseEvectionForm-edit").validate({focusCleanup: true}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/edit", $('#form-baseEvectionForm-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
$("input[name='evectionBeginTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
$("input[name='evectionEndTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
$("input[name='realityeEvenctionTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue