zhangsiqi
5 months ago
16 changed files with 2633 additions and 357 deletions
@ -0,0 +1,151 @@ |
|||
package com.ruoyi.erp.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.erp.domain.DevelopReviseorderChild; |
|||
import com.ruoyi.erp.service.IDevelopReviseorderChildService; |
|||
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-06-06 |
|||
*/ |
|||
@Controller |
|||
@RequestMapping("/erp/developModifyChild") |
|||
public class DevelopReviseorderChildController extends BaseController |
|||
{ |
|||
private String prefix = "erp/developModifyChild"; |
|||
|
|||
@Autowired |
|||
private IDevelopReviseorderChildService developReviseorderChildService; |
|||
|
|||
// @RequiresPermissions("erp:developModifyChild:view")
|
|||
@GetMapping() |
|||
public String developModifyChild() |
|||
{ |
|||
return prefix + "/developModifyChild"; |
|||
} |
|||
|
|||
/** |
|||
* 查询开发修改单子详情列表 |
|||
*/ |
|||
// @RequiresPermissions("erp:developModifyChild:list")
|
|||
@PostMapping("/list") |
|||
@ResponseBody |
|||
public TableDataInfo list(DevelopReviseorderChild developReviseorderChild) |
|||
{ |
|||
startPage(); |
|||
List<DevelopReviseorderChild> list = developReviseorderChildService.selectDevelopReviseorderChildList(developReviseorderChild); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
/** |
|||
* 导出开发修改单子详情列表 |
|||
*/ |
|||
// @RequiresPermissions("erp:developModifyChild:export")
|
|||
@Log(title = "开发修改单子详情", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
@ResponseBody |
|||
public AjaxResult export(DevelopReviseorderChild developReviseorderChild) |
|||
{ |
|||
List<DevelopReviseorderChild> list = developReviseorderChildService.selectDevelopReviseorderChildList(developReviseorderChild); |
|||
ExcelUtil<DevelopReviseorderChild> util = new ExcelUtil<DevelopReviseorderChild>(DevelopReviseorderChild.class); |
|||
return util.exportExcel(list, "开发修改单子详情数据"); |
|||
} |
|||
|
|||
/** |
|||
* 新增开发修改单子详情 |
|||
*/ |
|||
@GetMapping("/add") |
|||
public String add() |
|||
{ |
|||
return prefix + "/add"; |
|||
} |
|||
|
|||
/** |
|||
* 新增保存开发修改单子详情 |
|||
*/ |
|||
// @RequiresPermissions("erp:developModifyChild:add")
|
|||
@Log(title = "开发修改单子详情", businessType = BusinessType.INSERT) |
|||
@PostMapping("/add") |
|||
@ResponseBody |
|||
public AjaxResult addSave(DevelopReviseorderChild developReviseorderChild) |
|||
{ |
|||
return toAjax(developReviseorderChildService.insertDevelopReviseorderChild(developReviseorderChild)); |
|||
} |
|||
|
|||
/** |
|||
* 修改开发修改单子详情 |
|||
*/ |
|||
@GetMapping("/edit/{childId}") |
|||
public String edit(@PathVariable("childId") Long childId, ModelMap mmap) |
|||
{ |
|||
DevelopReviseorderChild developReviseorderChild = developReviseorderChildService.selectDevelopReviseorderChildById(childId); |
|||
mmap.put("developReviseorderChild", developReviseorderChild); |
|||
return prefix + "/edit"; |
|||
} |
|||
|
|||
/** |
|||
* 修改保存开发修改单子详情 |
|||
*/ |
|||
// @RequiresPermissions("erp:developModifyChild:edit")
|
|||
@Log(title = "开发修改单子详情", businessType = BusinessType.UPDATE) |
|||
@PostMapping("/edit") |
|||
@ResponseBody |
|||
public AjaxResult editSave(DevelopReviseorderChild developReviseorderChild) |
|||
{ |
|||
return toAjax(developReviseorderChildService.updateDevelopReviseorderChild(developReviseorderChild)); |
|||
} |
|||
|
|||
/** |
|||
* 删除开发修改单子详情 |
|||
*/ |
|||
// @RequiresPermissions("erp:developModifyChild:remove")
|
|||
@Log(title = "开发修改单子详情", businessType = BusinessType.DELETE) |
|||
@PostMapping( "/remove") |
|||
@ResponseBody |
|||
public AjaxResult remove(String ids) |
|||
{ |
|||
return toAjax(developReviseorderChildService.deleteDevelopReviseorderChildByIds(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 作废开发修改单子详情 |
|||
*/ |
|||
// @RequiresPermissions("erp:developModifyChild:cancel")
|
|||
@Log(title = "开发修改单子详情", businessType = BusinessType.CANCEL) |
|||
@GetMapping( "/cancel/{id}") |
|||
@ResponseBody |
|||
public AjaxResult cancel(@PathVariable("id") Long id){ |
|||
return toAjax(developReviseorderChildService.cancelDevelopReviseorderChildById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 恢复开发修改单子详情 |
|||
*/ |
|||
// @RequiresPermissions("erp:developModifyChild:restore")
|
|||
@Log(title = "开发修改单子详情", businessType = BusinessType.RESTORE) |
|||
@GetMapping( "/restore/{id}") |
|||
@ResponseBody |
|||
public AjaxResult restore(@PathVariable("id")Long id) |
|||
{ |
|||
return toAjax(developReviseorderChildService.restoreDevelopReviseorderChildById(id)); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,238 @@ |
|||
package com.ruoyi.erp.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; |
|||
|
|||
/** |
|||
* 开发修改单子详情对象 develop_reviseorder_child |
|||
* |
|||
* @author zhang |
|||
* @date 2024-06-06 |
|||
*/ |
|||
public class DevelopReviseorderChild extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 开发修改单子表编号 */ |
|||
private Long childId; |
|||
|
|||
/** 开发修改单单号 */ |
|||
@Excel(name = "开发修改单单号") |
|||
private String developOderCode; |
|||
|
|||
/** 关联生产单号 */ |
|||
@Excel(name = "关联生产单号") |
|||
private String makeoderCode; |
|||
|
|||
/** 料号 */ |
|||
@Excel(name = "料号") |
|||
private String materialNo; |
|||
|
|||
/** 使用状态 */ |
|||
@Excel(name = "使用状态") |
|||
private String useStatus; |
|||
|
|||
/** 物料名称 */ |
|||
@Excel(name = "物料名称") |
|||
private String materialName; |
|||
|
|||
/** 物料类型 */ |
|||
@Excel(name = "物料类型") |
|||
private String materialType; |
|||
|
|||
/** 图片地址 */ |
|||
@Excel(name = "图片地址") |
|||
private String photoUrl; |
|||
|
|||
/** 品牌 */ |
|||
@Excel(name = "品牌") |
|||
private String brand; |
|||
|
|||
/** 描述 */ |
|||
@Excel(name = "描述") |
|||
private String describe; |
|||
|
|||
/** 单位 */ |
|||
@Excel(name = "单位") |
|||
private String unit; |
|||
|
|||
/** 修改前说明 */ |
|||
@Excel(name = "修改前说明") |
|||
private String updateBeforeRemark; |
|||
|
|||
/** 修改前上传文件 */ |
|||
@Excel(name = "修改前上传文件") |
|||
private String updateBeforeFile; |
|||
|
|||
/** 修改前说明 */ |
|||
@Excel(name = "修改前说明") |
|||
private String updateAfterRemark; |
|||
|
|||
/** 修改前上传文件 */ |
|||
@Excel(name = "修改前上传文件") |
|||
private String updateAfterFile; |
|||
|
|||
public void setChildId(Long childId) |
|||
{ |
|||
this.childId = childId; |
|||
} |
|||
|
|||
public Long getChildId() |
|||
{ |
|||
return childId; |
|||
} |
|||
public void setDevelopOderCode(String developOderCode) |
|||
{ |
|||
this.developOderCode = developOderCode; |
|||
} |
|||
|
|||
public String getDevelopOderCode() |
|||
{ |
|||
return developOderCode; |
|||
} |
|||
public void setMakeoderCode(String makeoderCode) |
|||
{ |
|||
this.makeoderCode = makeoderCode; |
|||
} |
|||
|
|||
public String getMakeoderCode() |
|||
{ |
|||
return makeoderCode; |
|||
} |
|||
public void setMaterialNo(String materialNo) |
|||
{ |
|||
this.materialNo = materialNo; |
|||
} |
|||
|
|||
public String getMaterialNo() |
|||
{ |
|||
return materialNo; |
|||
} |
|||
public void setUseStatus(String useStatus) |
|||
{ |
|||
this.useStatus = useStatus; |
|||
} |
|||
|
|||
public String getUseStatus() |
|||
{ |
|||
return useStatus; |
|||
} |
|||
public void setMaterialName(String materialName) |
|||
{ |
|||
this.materialName = materialName; |
|||
} |
|||
|
|||
public String getMaterialName() |
|||
{ |
|||
return materialName; |
|||
} |
|||
public void setMaterialType(String materialType) |
|||
{ |
|||
this.materialType = materialType; |
|||
} |
|||
|
|||
public String getMaterialType() |
|||
{ |
|||
return materialType; |
|||
} |
|||
public void setPhotoUrl(String photoUrl) |
|||
{ |
|||
this.photoUrl = photoUrl; |
|||
} |
|||
|
|||
public String getPhotoUrl() |
|||
{ |
|||
return photoUrl; |
|||
} |
|||
public void setBrand(String brand) |
|||
{ |
|||
this.brand = brand; |
|||
} |
|||
|
|||
public String getBrand() |
|||
{ |
|||
return brand; |
|||
} |
|||
public void setDescribe(String describe) |
|||
{ |
|||
this.describe = describe; |
|||
} |
|||
|
|||
public String getDescribe() |
|||
{ |
|||
return describe; |
|||
} |
|||
public void setUnit(String unit) |
|||
{ |
|||
this.unit = unit; |
|||
} |
|||
|
|||
public String getUnit() |
|||
{ |
|||
return unit; |
|||
} |
|||
public void setUpdateBeforeRemark(String updateBeforeRemark) |
|||
{ |
|||
this.updateBeforeRemark = updateBeforeRemark; |
|||
} |
|||
|
|||
public String getUpdateBeforeRemark() |
|||
{ |
|||
return updateBeforeRemark; |
|||
} |
|||
public void setUpdateBeforeFile(String updateBeforeFile) |
|||
{ |
|||
this.updateBeforeFile = updateBeforeFile; |
|||
} |
|||
|
|||
public String getUpdateBeforeFile() |
|||
{ |
|||
return updateBeforeFile; |
|||
} |
|||
public void setUpdateAfterRemark(String updateAfterRemark) |
|||
{ |
|||
this.updateAfterRemark = updateAfterRemark; |
|||
} |
|||
|
|||
public String getUpdateAfterRemark() |
|||
{ |
|||
return updateAfterRemark; |
|||
} |
|||
public void setUpdateAfterFile(String updateAfterFile) |
|||
{ |
|||
this.updateAfterFile = updateAfterFile; |
|||
} |
|||
|
|||
public String getUpdateAfterFile() |
|||
{ |
|||
return updateAfterFile; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|||
.append("childId", getChildId()) |
|||
.append("developOderCode", getDevelopOderCode()) |
|||
.append("makeoderCode", getMakeoderCode()) |
|||
.append("materialNo", getMaterialNo()) |
|||
.append("useStatus", getUseStatus()) |
|||
.append("materialName", getMaterialName()) |
|||
.append("materialType", getMaterialType()) |
|||
.append("photoUrl", getPhotoUrl()) |
|||
.append("brand", getBrand()) |
|||
.append("describe", getDescribe()) |
|||
.append("unit", getUnit()) |
|||
.append("updateBeforeRemark", getUpdateBeforeRemark()) |
|||
.append("updateBeforeFile", getUpdateBeforeFile()) |
|||
.append("updateAfterRemark", getUpdateAfterRemark()) |
|||
.append("updateAfterFile", getUpdateAfterFile()) |
|||
.append("createBy", getCreateBy()) |
|||
.append("createTime", getCreateTime()) |
|||
.append("updateBy", getUpdateBy()) |
|||
.append("updateTime", getUpdateTime()) |
|||
.append("remark", getRemark()) |
|||
.toString(); |
|||
} |
|||
} |
@ -0,0 +1,77 @@ |
|||
package com.ruoyi.erp.mapper; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.erp.domain.DevelopReviseorderChild; |
|||
|
|||
/** |
|||
* 开发修改单子详情Mapper接口 |
|||
* |
|||
* @author zhang |
|||
* @date 2024-06-06 |
|||
*/ |
|||
public interface DevelopReviseorderChildMapper |
|||
{ |
|||
/** |
|||
* 查询开发修改单子详情 |
|||
* |
|||
* @param childId 开发修改单子详情ID |
|||
* @return 开发修改单子详情 |
|||
*/ |
|||
public DevelopReviseorderChild selectDevelopReviseorderChildById(Long childId); |
|||
|
|||
/** |
|||
* 查询开发修改单子详情列表 |
|||
* |
|||
* @param developReviseorderChild 开发修改单子详情 |
|||
* @return 开发修改单子详情集合 |
|||
*/ |
|||
public List<DevelopReviseorderChild> selectDevelopReviseorderChildList(DevelopReviseorderChild developReviseorderChild); |
|||
|
|||
/** |
|||
* 新增开发修改单子详情 |
|||
* |
|||
* @param developReviseorderChild 开发修改单子详情 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertDevelopReviseorderChild(DevelopReviseorderChild developReviseorderChild); |
|||
|
|||
/** |
|||
* 修改开发修改单子详情 |
|||
* |
|||
* @param developReviseorderChild 开发修改单子详情 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateDevelopReviseorderChild(DevelopReviseorderChild developReviseorderChild); |
|||
|
|||
/** |
|||
* 删除开发修改单子详情 |
|||
* |
|||
* @param childId 开发修改单子详情ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteDevelopReviseorderChildById(Long childId); |
|||
|
|||
/** |
|||
* 批量删除开发修改单子详情 |
|||
* |
|||
* @param childIds 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteDevelopReviseorderChildByIds(String[] childIds); |
|||
|
|||
/** |
|||
* 作废开发修改单子详情 |
|||
* |
|||
* @param childId 开发修改单子详情ID |
|||
* @return 结果 |
|||
*/ |
|||
public int cancelDevelopReviseorderChildById(Long childId); |
|||
|
|||
/** |
|||
* 恢复开发修改单子详情 |
|||
* |
|||
* @param childId 开发修改单子详情ID |
|||
* @return 结果 |
|||
*/ |
|||
public int restoreDevelopReviseorderChildById(Long childId); |
|||
} |
@ -0,0 +1,75 @@ |
|||
package com.ruoyi.erp.service; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.erp.domain.DevelopReviseorderChild; |
|||
|
|||
/** |
|||
* 开发修改单子详情Service接口 |
|||
* |
|||
* @author zhang |
|||
* @date 2024-06-06 |
|||
*/ |
|||
public interface IDevelopReviseorderChildService |
|||
{ |
|||
/** |
|||
* 查询开发修改单子详情 |
|||
* |
|||
* @param childId 开发修改单子详情ID |
|||
* @return 开发修改单子详情 |
|||
*/ |
|||
public DevelopReviseorderChild selectDevelopReviseorderChildById(Long childId); |
|||
|
|||
/** |
|||
* 查询开发修改单子详情列表 |
|||
* |
|||
* @param developReviseorderChild 开发修改单子详情 |
|||
* @return 开发修改单子详情集合 |
|||
*/ |
|||
public List<DevelopReviseorderChild> selectDevelopReviseorderChildList(DevelopReviseorderChild developReviseorderChild); |
|||
|
|||
/** |
|||
* 新增开发修改单子详情 |
|||
* |
|||
* @param developReviseorderChild 开发修改单子详情 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertDevelopReviseorderChild(DevelopReviseorderChild developReviseorderChild); |
|||
|
|||
/** |
|||
* 修改开发修改单子详情 |
|||
* |
|||
* @param developReviseorderChild 开发修改单子详情 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateDevelopReviseorderChild(DevelopReviseorderChild developReviseorderChild); |
|||
|
|||
/** |
|||
* 批量删除开发修改单子详情 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteDevelopReviseorderChildByIds(String ids); |
|||
|
|||
/** |
|||
* 删除开发修改单子详情信息 |
|||
* |
|||
* @param childId 开发修改单子详情ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteDevelopReviseorderChildById(Long childId); |
|||
|
|||
/** |
|||
* 作废开发修改单子详情 |
|||
* @param childId 开发修改单子详情ID |
|||
* @return |
|||
*/ |
|||
int cancelDevelopReviseorderChildById(Long childId); |
|||
|
|||
/** |
|||
* 恢复开发修改单子详情 |
|||
* @param childId 开发修改单子详情ID |
|||
* @return |
|||
*/ |
|||
int restoreDevelopReviseorderChildById(Long childId); |
|||
} |
@ -0,0 +1,126 @@ |
|||
package com.ruoyi.erp.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.erp.mapper.DevelopReviseorderChildMapper; |
|||
import com.ruoyi.erp.domain.DevelopReviseorderChild; |
|||
import com.ruoyi.erp.service.IDevelopReviseorderChildService; |
|||
import com.ruoyi.common.core.text.Convert; |
|||
|
|||
/** |
|||
* 开发修改单子详情Service业务层处理 |
|||
* |
|||
* @author zhang |
|||
* @date 2024-06-06 |
|||
*/ |
|||
@Service |
|||
public class DevelopReviseorderChildServiceImpl implements IDevelopReviseorderChildService |
|||
{ |
|||
@Autowired |
|||
private DevelopReviseorderChildMapper developReviseorderChildMapper; |
|||
|
|||
/** |
|||
* 查询开发修改单子详情 |
|||
* |
|||
* @param childId 开发修改单子详情ID |
|||
* @return 开发修改单子详情 |
|||
*/ |
|||
@Override |
|||
public DevelopReviseorderChild selectDevelopReviseorderChildById(Long childId) |
|||
{ |
|||
return developReviseorderChildMapper.selectDevelopReviseorderChildById(childId); |
|||
} |
|||
|
|||
/** |
|||
* 查询开发修改单子详情列表 |
|||
* |
|||
* @param developReviseorderChild 开发修改单子详情 |
|||
* @return 开发修改单子详情 |
|||
*/ |
|||
@Override |
|||
public List<DevelopReviseorderChild> selectDevelopReviseorderChildList(DevelopReviseorderChild developReviseorderChild) |
|||
{ |
|||
return developReviseorderChildMapper.selectDevelopReviseorderChildList(developReviseorderChild); |
|||
} |
|||
|
|||
/** |
|||
* 新增开发修改单子详情 |
|||
* |
|||
* @param developReviseorderChild 开发修改单子详情 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int insertDevelopReviseorderChild(DevelopReviseorderChild developReviseorderChild) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
developReviseorderChild.setCreateBy(loginName); |
|||
developReviseorderChild.setCreateTime(DateUtils.getNowDate()); |
|||
return developReviseorderChildMapper.insertDevelopReviseorderChild(developReviseorderChild); |
|||
} |
|||
|
|||
/** |
|||
* 修改开发修改单子详情 |
|||
* |
|||
* @param developReviseorderChild 开发修改单子详情 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int updateDevelopReviseorderChild(DevelopReviseorderChild developReviseorderChild) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
developReviseorderChild.setUpdateBy(loginName); |
|||
developReviseorderChild.setUpdateTime(DateUtils.getNowDate()); |
|||
return developReviseorderChildMapper.updateDevelopReviseorderChild(developReviseorderChild); |
|||
} |
|||
|
|||
/** |
|||
* 删除开发修改单子详情对象 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteDevelopReviseorderChildByIds(String ids) |
|||
{ |
|||
return developReviseorderChildMapper.deleteDevelopReviseorderChildByIds(Convert.toStrArray(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 删除开发修改单子详情信息 |
|||
* |
|||
* @param childId 开发修改单子详情ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteDevelopReviseorderChildById(Long childId) |
|||
{ |
|||
return developReviseorderChildMapper.deleteDevelopReviseorderChildById(childId); |
|||
} |
|||
|
|||
/** |
|||
* 作废开发修改单子详情 |
|||
* |
|||
* @param childId 开发修改单子详情ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int cancelDevelopReviseorderChildById(Long childId) |
|||
{ |
|||
return developReviseorderChildMapper.cancelDevelopReviseorderChildById(childId); |
|||
} |
|||
|
|||
/** |
|||
* 恢复开发修改单子详情信息 |
|||
* |
|||
* @param childId 开发修改单子详情ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int restoreDevelopReviseorderChildById(Long childId) |
|||
{ |
|||
return developReviseorderChildMapper.restoreDevelopReviseorderChildById(childId); |
|||
} |
|||
} |
@ -0,0 +1,149 @@ |
|||
<?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.erp.mapper.DevelopReviseorderChildMapper"> |
|||
|
|||
<resultMap type="DevelopReviseorderChild" id="DevelopReviseorderChildResult"> |
|||
<result property="childId" column="child_id" /> |
|||
<result property="developOderCode" column="develop_oder_code" /> |
|||
<result property="makeoderCode" column="makeoder_code" /> |
|||
<result property="materialNo" column="materialNo" /> |
|||
<result property="useStatus" column="use_status" /> |
|||
<result property="materialName" column="materialName" /> |
|||
<result property="materialType" column="materialType" /> |
|||
<result property="photoUrl" column="photoUrl" /> |
|||
<result property="brand" column="brand" /> |
|||
<result property="describe" column="describe" /> |
|||
<result property="unit" column="unit" /> |
|||
<result property="updateBeforeRemark" column="update_before_remark" /> |
|||
<result property="updateBeforeFile" column="update_before_file" /> |
|||
<result property="updateAfterRemark" column="update_after_remark" /> |
|||
<result property="updateAfterFile" column="update_after_file" /> |
|||
<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="selectDevelopReviseorderChildVo"> |
|||
select child_id, develop_oder_code, makeoder_code, materialNo, use_status, materialName, materialType, photoUrl, brand, describe, unit, update_before_remark, update_before_file, update_after_remark, update_after_file, create_by, create_time, update_by, update_time, remark from develop_reviseorder_child |
|||
</sql> |
|||
|
|||
<select id="selectDevelopReviseorderChildList" parameterType="DevelopReviseorderChild" resultMap="DevelopReviseorderChildResult"> |
|||
<include refid="selectDevelopReviseorderChildVo"/> |
|||
<where> |
|||
<if test="developOderCode != null and developOderCode != ''"> and develop_oder_code = #{developOderCode}</if> |
|||
<if test="makeoderCode != null and makeoderCode != ''"> and makeoder_code = #{makeoderCode}</if> |
|||
<if test="materialNo != null and materialNo != ''"> and materialNo = #{materialNo}</if> |
|||
<if test="useStatus != null and useStatus != ''"> and use_status = #{useStatus}</if> |
|||
<if test="materialName != null and materialName != ''"> and materialName like concat('%', #{materialName}, '%')</if> |
|||
<if test="materialType != null and materialType != ''"> and materialType = #{materialType}</if> |
|||
<if test="brand != null and brand != ''"> and brand = #{brand}</if> |
|||
<if test="describe != null and describe != ''"> and describe = #{describe}</if> |
|||
<if test="unit != null and unit != ''"> and unit = #{unit}</if> |
|||
<if test="updateBeforeRemark != null and updateBeforeRemark != ''"> and update_before_remark = #{updateBeforeRemark}</if> |
|||
<if test="updateBeforeFile != null and updateBeforeFile != ''"> and update_before_file = #{updateBeforeFile}</if> |
|||
<if test="updateAfterRemark != null and updateAfterRemark != ''"> and update_after_remark = #{updateAfterRemark}</if> |
|||
<if test="updateAfterFile != null and updateAfterFile != ''"> and update_after_file = #{updateAfterFile}</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectDevelopReviseorderChildById" parameterType="Long" resultMap="DevelopReviseorderChildResult"> |
|||
<include refid="selectDevelopReviseorderChildVo"/> |
|||
where child_id = #{childId} |
|||
</select> |
|||
|
|||
<insert id="insertDevelopReviseorderChild" parameterType="DevelopReviseorderChild" useGeneratedKeys="true" keyProperty="childId"> |
|||
insert into develop_reviseorder_child |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="developOderCode != null">develop_oder_code,</if> |
|||
<if test="makeoderCode != null">makeoder_code,</if> |
|||
<if test="materialNo != null">materialNo,</if> |
|||
<if test="useStatus != null">use_status,</if> |
|||
<if test="materialName != null">materialName,</if> |
|||
<if test="materialType != null">materialType,</if> |
|||
<if test="photoUrl != null">photoUrl,</if> |
|||
<if test="brand != null">brand,</if> |
|||
<if test="describe != null">describe,</if> |
|||
<if test="unit != null">unit,</if> |
|||
<if test="updateBeforeRemark != null">update_before_remark,</if> |
|||
<if test="updateBeforeFile != null">update_before_file,</if> |
|||
<if test="updateAfterRemark != null">update_after_remark,</if> |
|||
<if test="updateAfterFile != null">update_after_file,</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="developOderCode != null">#{developOderCode},</if> |
|||
<if test="makeoderCode != null">#{makeoderCode},</if> |
|||
<if test="materialNo != null">#{materialNo},</if> |
|||
<if test="useStatus != null">#{useStatus},</if> |
|||
<if test="materialName != null">#{materialName},</if> |
|||
<if test="materialType != null">#{materialType},</if> |
|||
<if test="photoUrl != null">#{photoUrl},</if> |
|||
<if test="brand != null">#{brand},</if> |
|||
<if test="describe != null">#{describe},</if> |
|||
<if test="unit != null">#{unit},</if> |
|||
<if test="updateBeforeRemark != null">#{updateBeforeRemark},</if> |
|||
<if test="updateBeforeFile != null">#{updateBeforeFile},</if> |
|||
<if test="updateAfterRemark != null">#{updateAfterRemark},</if> |
|||
<if test="updateAfterFile != null">#{updateAfterFile},</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="updateDevelopReviseorderChild" parameterType="DevelopReviseorderChild"> |
|||
update develop_reviseorder_child |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="developOderCode != null">develop_oder_code = #{developOderCode},</if> |
|||
<if test="makeoderCode != null">makeoder_code = #{makeoderCode},</if> |
|||
<if test="materialNo != null">materialNo = #{materialNo},</if> |
|||
<if test="useStatus != null">use_status = #{useStatus},</if> |
|||
<if test="materialName != null">materialName = #{materialName},</if> |
|||
<if test="materialType != null">materialType = #{materialType},</if> |
|||
<if test="photoUrl != null">photoUrl = #{photoUrl},</if> |
|||
<if test="brand != null">brand = #{brand},</if> |
|||
<if test="describe != null">describe = #{describe},</if> |
|||
<if test="unit != null">unit = #{unit},</if> |
|||
<if test="updateBeforeRemark != null">update_before_remark = #{updateBeforeRemark},</if> |
|||
<if test="updateBeforeFile != null">update_before_file = #{updateBeforeFile},</if> |
|||
<if test="updateAfterRemark != null">update_after_remark = #{updateAfterRemark},</if> |
|||
<if test="updateAfterFile != null">update_after_file = #{updateAfterFile},</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 child_id = #{childId} |
|||
</update> |
|||
|
|||
<delete id="deleteDevelopReviseorderChildById" parameterType="Long"> |
|||
delete from develop_reviseorder_child where child_id = #{childId} |
|||
</delete> |
|||
|
|||
<delete id="deleteDevelopReviseorderChildByIds" parameterType="String"> |
|||
delete from develop_reviseorder_child where child_id in |
|||
<foreach item="childId" collection="array" open="(" separator="," close=")"> |
|||
#{childId} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<update id="cancelDevelopReviseorderChildById" parameterType="Long"> |
|||
update develop_reviseorder_child set del_flag = '1' where child_id = #{childId} |
|||
</update> |
|||
|
|||
<update id="restoreDevelopReviseorderChildById" parameterType="Long"> |
|||
update develop_reviseorder_child set del_flag = '0' where child_id = #{childId} |
|||
</update> |
|||
|
|||
</mapper> |
@ -0,0 +1,138 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('新增开发修改单子详情')" /> |
|||
<th:block th:include="include :: bootstrap-fileinput-css"/> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-developModifyChild-add"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">开发修改单单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="developOderCode" 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="makeoderCode" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">料号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="materialNo" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">使用状态:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="useStatus" class="form-control m-b" th:with="type=${@dict.getType('useStatus')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">物料名称:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="materialName" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">物料类型:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="materialType" class="form-control m-b"> |
|||
<option value="">所有</option> |
|||
</select> |
|||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">图片地址:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="photoUrl" 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="brand" 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="describe" 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="unit" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">修改前说明:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="updateBeforeRemark" class="form-control"></textarea> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">修改前上传文件:</label> |
|||
<div class="col-sm-8"> |
|||
<input type="hidden" name="updateBeforeFile"> |
|||
<div class="file-loading"> |
|||
<input class="form-control file-upload" id="updateBeforeFile" name="file" type="file"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">修改前说明:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="updateAfterRemark" class="form-control"></textarea> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">修改前上传文件:</label> |
|||
<div class="col-sm-8"> |
|||
<input type="hidden" name="updateAfterFile"> |
|||
<div class="file-loading"> |
|||
<input class="form-control file-upload" id="updateAfterFile" name="file" type="file"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">备注信息:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="remark" class="form-control"></textarea> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: bootstrap-fileinput-js"/> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "erp/developModifyChild" |
|||
$("#form-developModifyChild-add").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/add", $('#form-developModifyChild-add').serialize()); |
|||
} |
|||
} |
|||
|
|||
$(".file-upload").fileinput({ |
|||
uploadUrl: ctx + 'common/upload', |
|||
maxFileCount: 1, |
|||
autoReplace: true |
|||
}).on('fileuploaded', function (event, data, previewId, index) { |
|||
$("input[name='" + event.currentTarget.id + "']").val(data.response.url) |
|||
}).on('fileremoved', function (event, id, index) { |
|||
$("input[name='" + event.currentTarget.id + "']").val('') |
|||
}) |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,207 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
|||
<head> |
|||
<th:block th:include="include :: header('开发修改单子详情列表')" /> |
|||
</head> |
|||
<body class="gray-bg"> |
|||
<div class="container-div"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 search-collapse"> |
|||
<form id="formId"> |
|||
<div class="select-list"> |
|||
<ul> |
|||
<li> |
|||
<label>开发修改单单号:</label> |
|||
<input type="text" name="developOderCode"/> |
|||
</li> |
|||
<li> |
|||
<label>关联生产单号:</label> |
|||
<input type="text" name="makeoderCode"/> |
|||
</li> |
|||
<li> |
|||
<label>料号:</label> |
|||
<input type="text" name="materialNo"/> |
|||
</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="materialName"/> |
|||
</li> |
|||
<li> |
|||
<label>物料类型:</label> |
|||
<select name="materialType"> |
|||
<option value="">所有</option> |
|||
<option value="-1">代码生成请选择字典属性</option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<label>品牌:</label> |
|||
<input type="text" name="brand"/> |
|||
</li> |
|||
<li> |
|||
<label>描述:</label> |
|||
<input type="text" name="describe"/> |
|||
</li> |
|||
<li> |
|||
<label>单位:</label> |
|||
<input type="text" name="unit"/> |
|||
</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="erp:developModifyChild:add"> |
|||
<i class="fa fa-plus"></i> 添加 |
|||
</a> |
|||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="erp:developModifyChild:edit"> |
|||
<i class="fa fa-edit"></i> 修改 |
|||
</a> |
|||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="erp:developModifyChild:remove"> |
|||
<i class="fa fa-remove"></i> 删除 |
|||
</a> |
|||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="erp:developModifyChild:export"> |
|||
<i class="fa fa-download"></i> 导出 |
|||
</a> |
|||
</div> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var editFlag = [[${@permission.hasPermi('erp:developModifyChild:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('erp:developModifyChild:remove')}]]; |
|||
var cancelFlag = [[${@permission.hasPermi('erp:developModifyChild:cancel')}]]; |
|||
var restoreFlag = [[${@permission.hasPermi('erp:developModifyChild:restore')}]]; |
|||
var useStatusDatas = [[${@dict.getType('useStatus')}]]; |
|||
var prefix = ctx + "erp/developModifyChild"; |
|||
|
|||
$(function() { |
|||
var options = { |
|||
url: prefix + "/list", |
|||
createUrl: prefix + "/add", |
|||
updateUrl: prefix + "/edit/{id}", |
|||
removeUrl: prefix + "/remove", |
|||
cancelUrl: prefix + "/cancel/{id}", |
|||
restoreUrl: prefix + "/restore/{id}", |
|||
exportUrl: prefix + "/export", |
|||
modalName: "开发修改单子详情", |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
title: '开发修改单子表编号', |
|||
field: 'childId', |
|||
visible: false |
|||
}, |
|||
{ |
|||
title: '开发修改单单号', |
|||
field: 'developOderCode', |
|||
sort: true |
|||
}, |
|||
{ |
|||
title: '关联生产单号', |
|||
field: 'makeoderCode', |
|||
sort: true |
|||
}, |
|||
{ |
|||
title: '料号', |
|||
field: 'materialNo', |
|||
sort: true |
|||
}, |
|||
{ |
|||
title: '使用状态', |
|||
field: 'useStatus', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(useStatusDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
title: '物料名称', |
|||
field: 'materialName', |
|||
sort: true |
|||
}, |
|||
{ |
|||
title: '物料类型', |
|||
field: 'materialType', |
|||
sort: true |
|||
}, |
|||
{ |
|||
title: '图片地址', |
|||
field: 'photoUrl', |
|||
sort: true |
|||
}, |
|||
{ |
|||
title: '品牌', |
|||
field: 'brand', |
|||
sort: true |
|||
}, |
|||
{ |
|||
title: '描述', |
|||
field: 'describe', |
|||
sort: true |
|||
}, |
|||
{ |
|||
title: '单位', |
|||
field: 'unit', |
|||
sort: true |
|||
}, |
|||
{ |
|||
title: '修改前说明', |
|||
field: 'updateBeforeRemark', |
|||
sort: true |
|||
}, |
|||
{ |
|||
title: '修改前上传文件', |
|||
field: 'updateBeforeFile', |
|||
sort: true |
|||
}, |
|||
{ |
|||
title: '修改前说明', |
|||
field: 'updateAfterRemark', |
|||
sort: true |
|||
}, |
|||
{ |
|||
title: '修改前上传文件', |
|||
field: 'updateAfterFile', |
|||
sort: true |
|||
}, |
|||
{ |
|||
title: '备注信息', |
|||
field: 'remark', |
|||
sort: true |
|||
}, |
|||
{ |
|||
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.childId + '\')"><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.childId + '\')"><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,145 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('修改开发修改单子详情')" /> |
|||
<th:block th:include="include :: bootstrap-fileinput-css"/> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-developModifyChild-edit" th:object="${developReviseorderChild}"> |
|||
<input name="childId" th:field="*{childId}" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">开发修改单单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="developOderCode" th:field="*{developOderCode}" 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="makeoderCode" th:field="*{makeoderCode}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">料号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="materialNo" th:field="*{materialNo}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">使用状态:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="useStatus" class="form-control m-b" th:with="type=${@dict.getType('useStatus')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{useStatus}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">物料名称:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="materialName" th:field="*{materialName}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">物料类型:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="materialType" class="form-control m-b"> |
|||
<option value="">所有</option> |
|||
</select> |
|||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">图片地址:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="photoUrl" th:field="*{photoUrl}" 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="brand" th:field="*{brand}" 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="describe" th:field="*{describe}" 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="unit" th:field="*{unit}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">修改前说明:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="updateBeforeRemark" class="form-control">[[*{updateBeforeRemark}]]</textarea> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">修改前上传文件:</label> |
|||
<div class="col-sm-8"> |
|||
<input type="hidden" name="updateBeforeFile" th:field="*{updateBeforeFile}"> |
|||
<div class="file-loading"> |
|||
<input class="form-control file-upload" id="updateBeforeFile" name="file" type="file"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">修改前说明:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="updateAfterRemark" class="form-control">[[*{updateAfterRemark}]]</textarea> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">修改前上传文件:</label> |
|||
<div class="col-sm-8"> |
|||
<input type="hidden" name="updateAfterFile" th:field="*{updateAfterFile}"> |
|||
<div class="file-loading"> |
|||
<input class="form-control file-upload" id="updateAfterFile" name="file" type="file"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">备注信息:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="remark" class="form-control">[[*{remark}]]</textarea> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: bootstrap-fileinput-js"/> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "erp/developModifyChild"; |
|||
$("#form-developModifyChild-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/edit", $('#form-developModifyChild-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
$(".file-upload").each(function (i) { |
|||
var val = $("input[name='" + this.id + "']").val() |
|||
$(this).fileinput({ |
|||
'uploadUrl': ctx + 'common/upload', |
|||
initialPreviewAsData: true, |
|||
initialPreview: [val], |
|||
maxFileCount: 1, |
|||
autoReplace: true |
|||
}).on('fileuploaded', function (event, data, previewId, index) { |
|||
$("input[name='" + event.currentTarget.id + "']").val(data.response.url) |
|||
}).on('fileremoved', function (event, id, index) { |
|||
$("input[name='" + event.currentTarget.id + "']").val('') |
|||
}) |
|||
$(this).fileinput('_initFileActions'); |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,267 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('开发修改单领料')" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-picking-add"> |
|||
<!-- <div class="form-row">--> |
|||
<!-- <label class="col-sm-3 control-label">领料单号:</label>--> |
|||
<!-- <div class="col-sm-8">--> |
|||
<!-- <input name="pickNo" class="form-control" type="text">--> |
|||
<!-- </div>--> |
|||
<!-- </div>--> |
|||
<br/> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">开发修改单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="developOrder" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">关联生产订单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="makeNo" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">业务员:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="userName" 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="types" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
<div class="container"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-sub-table-material"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "system/picking" |
|||
$("#form-picking-add").validate({focusCleanup: true}); |
|||
$(function () { |
|||
var option1 = { |
|||
id: "bootstrap-sub-table-material", |
|||
url: prefix + "/list", |
|||
modalName: "bom", |
|||
detailView: true, |
|||
height: $(window).height() - 100, |
|||
//指定父id列 |
|||
onExpandRow : function(index, row, $detail) { |
|||
$detail.html('<table class="table-container" id="all_level_table_'+row.id+'"></table>').find('table'); |
|||
// 多阶 |
|||
initAllLevelTable(index,row,$detail); |
|||
// $.table.bootstrapTable('resetView'); |
|||
}, |
|||
columns: [ |
|||
{checkbox: false}, |
|||
{title: 'bom号',field: 'bomNo', }, |
|||
{title: '关联料号',field: 'materialNo', }, |
|||
{field: 'photoUrl',title: '图片',formatter: function(value, row, index) {return $.table.imageView(value);}}, |
|||
{title: '物料名称',field: 'materialName', }, |
|||
{field: 'materialType',title: '物料类型',formatter: function(value, row, index) { return $.table.selectCategoryLabel(materialTypeDatas, value);}}, |
|||
{field: 'processMethod', title: '半成品类型',formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);}}, |
|||
{field: 'unit',title: '单位',}, |
|||
{ title: '品牌',field: 'brand', }, |
|||
{title: '描述',field: 'describe'}, |
|||
{field: 'num',title: '订单数量',}, |
|||
{field: 'parentId',title: '父级id',visible:false}, |
|||
{title: '操作',align: 'center', |
|||
formatter: function(value, row, index) { |
|||
var actions = []; |
|||
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="remove(\'' + row.id + '\')"><i class="fa fa-eye"></i> 删除</a> '); |
|||
return actions.join(''); |
|||
} |
|||
}] |
|||
}; |
|||
$.table.init(option1); |
|||
|
|||
}); |
|||
initAllLevelTable = function(index, row, $detail) { |
|||
$("#"+"all_level_table_"+row.id).bootstrapTable({ |
|||
url: prefix + "/allLevelList", |
|||
method: 'post', |
|||
sidePagination: "server", |
|||
contentType: "application/x-www-form-urlencoded", |
|||
queryParams : { |
|||
parentId: row.id |
|||
}, |
|||
columns: [{ |
|||
field: 'id', |
|||
title: '主键id' |
|||
}, |
|||
{ |
|||
field: 'level', |
|||
title: '层级', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(levelDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'bomNo', |
|||
title: 'bom号', |
|||
formatter:function (value,row,index){ |
|||
if (value == null || value == ''){ |
|||
return '/'; |
|||
}else{ |
|||
return value |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'photoUrl', |
|||
title: '图片', |
|||
formatter: function(value, row, index) { |
|||
return $.table.imageView(value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'materialNo', |
|||
title: '料号', |
|||
formatter: function (value,row,index){ |
|||
if (value == null || value == ''){ |
|||
return '/'; |
|||
}else{ |
|||
return value |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'materialName', |
|||
title: '物料名称', |
|||
formatter: function (value,row,index){ |
|||
if (value == null || value == ''){ |
|||
return '/'; |
|||
}else{ |
|||
return value |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'materialType', |
|||
title: '物料类型', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectCategoryLabel(materialTypeDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'describe', |
|||
title: '描述', |
|||
formatter: function (value,row,index){ |
|||
if (value == null || value == ''){ |
|||
return '/'; |
|||
}else{ |
|||
return value |
|||
} |
|||
} |
|||
}, |
|||
|
|||
{ |
|||
field: 'brand', |
|||
title: '品牌', |
|||
formatter: function (value,row,index){ |
|||
if (value == null || value == ''){ |
|||
return '/'; |
|||
}else{ |
|||
return value |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'unit', |
|||
title: '单位', |
|||
formatter: function (value,row,index){ |
|||
if (value == null || value == ''){ |
|||
return '/'; |
|||
}else{ |
|||
return value |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'useNum', |
|||
title: '用量', |
|||
formatter: function (value,row,index){ |
|||
if (value == null || value == ''){ |
|||
return '/'; |
|||
}else{ |
|||
return value |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'lossRate', |
|||
title: '损耗率', |
|||
formatter: function (value,row,index){ |
|||
if (value == null || value == ''){ |
|||
return "/"; |
|||
} |
|||
return value + "%"; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'processMethod', |
|||
title: '半成品类型', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(processMethodDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'parentId', |
|||
title: '父级id', |
|||
visible: false, |
|||
}, |
|||
{ |
|||
field: 'sortNo', |
|||
title: '排序', |
|||
visible: false |
|||
}] |
|||
}); |
|||
}; |
|||
initChildSonTable = function(index, row, $detail) { |
|||
var childSonTable = $detail.html('<table style="table-layout:fixed"></table>').find('table'); |
|||
$(childSonTable).bootstrapTable({ |
|||
url: prefix + "/subList", |
|||
method: 'post', |
|||
detailView: true, |
|||
sidePagination: "server", |
|||
contentType: "application/x-www-form-urlencoded", |
|||
queryParams : {parentId: row.id}, |
|||
onExpandRow : function(index, row, $detail) {initChildSonTable(index, row, $detail);}, |
|||
columns: [ |
|||
{field: 'id',title: '主键id'}, |
|||
{field: 'level',title: '层级',formatter: function(value, row, index) {return $.table.selectDictLabel(levelDatas, value);}}, |
|||
{field: 'bomNo',title: 'bom号',formatter:function (value,row,index){if (value == null || value == ''){return '/'; }else{ return value;}}}, |
|||
{field: 'photoUrl',title: '图片',formatter:function (value,row,index){if (value == null || value == ''){ return '/';}else{return $.table.imageView(value);}}}, |
|||
{field: 'materialNo',title: '料号',}, |
|||
{field: 'materialName',title: '物料名称',}, |
|||
{field: 'materialType',title: '物料类型',formatter: function(value, row, index) {return $.table.selectCategoryLabel(materialTypeDatas, value);}}, |
|||
{field: 'describe',title: '描述',}, |
|||
{field: 'brand',title: '品牌',}, |
|||
{field: 'unit',title: '单位',}, |
|||
{field: 'lossRate',title: '损耗率(%)',formatter:function (value,row,index){return value + '%';}}, |
|||
{field: 'processMethod',title: '半成品类型',formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);}}, |
|||
{field: 'useNum',title: '订单用量',}, |
|||
{field: 'parentId',title: '父级id',visible: false,}, |
|||
] |
|||
}); |
|||
} |
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/add", $('#form-picking-add').serialize()); |
|||
} |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue