Browse Source

[feat]工程管理:添加开发修改单,领料按钮,领料页面,相关人员确认页面,详情页面修改,修改添加生产下拉框,根据下拉中的生产单号查询生产单号物料信息,添加开发修改单子表对象,重新构建开发修改单列表。

dev
zhangsiqi 5 months ago
parent
commit
97134b6f64
  1. 151
      ruoyi-admin/src/main/java/com/ruoyi/erp/controller/DevelopReviseorderChildController.java
  2. 18
      ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpDevelopModifyorderController.java
  3. 238
      ruoyi-admin/src/main/java/com/ruoyi/erp/domain/DevelopReviseorderChild.java
  4. 11
      ruoyi-admin/src/main/java/com/ruoyi/erp/domain/ErpDevelopModifyorder.java
  5. 77
      ruoyi-admin/src/main/java/com/ruoyi/erp/mapper/DevelopReviseorderChildMapper.java
  6. 75
      ruoyi-admin/src/main/java/com/ruoyi/erp/service/IDevelopReviseorderChildService.java
  7. 126
      ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/DevelopReviseorderChildServiceImpl.java
  8. 149
      ruoyi-admin/src/main/resources/mapper/erp/DevelopReviseorderChildMapper.xml
  9. 138
      ruoyi-admin/src/main/resources/templates/erp/developModifyChild/add.html
  10. 207
      ruoyi-admin/src/main/resources/templates/erp/developModifyChild/developModifyChild.html
  11. 145
      ruoyi-admin/src/main/resources/templates/erp/developModifyChild/edit.html
  12. 76
      ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/add.html
  13. 519
      ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/detail.html
  14. 142
      ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/developModifyOrder.html
  15. 521
      ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/edit.html
  16. 267
      ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/pickAdd.html

151
ruoyi-admin/src/main/java/com/ruoyi/erp/controller/DevelopReviseorderChildController.java

@ -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));
}
}

18
ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpDevelopModifyorderController.java

@ -116,7 +116,22 @@ public class ErpDevelopModifyorderController extends BaseController
mmap.put("erpDevelopModifyorder", erpDevelopModifyorder);
return prefix + "/edit";
}
/**相关人员确认*/
@GetMapping("/confirm/{developOrderId}")
public String confrimDetail(@PathVariable("developOrderId") Long developOrderId, ModelMap mmap)
{
ErpDevelopModifyorder erpDevelopModifyorder = erpDevelopModifyorderService.selectErpDevelopModifyorderById(developOrderId);
mmap.put("erpDevelopModifyorder", erpDevelopModifyorder);
return prefix + "/confirm";
}
/**领料确认*/
@GetMapping("/pickingOrder/{developOrderId}")
public String pickingOrder(@PathVariable("developOrderId") Long developOrderId, ModelMap mmap)
{
ErpDevelopModifyorder erpDevelopModifyorder = erpDevelopModifyorderService.selectErpDevelopModifyorderById(developOrderId);
mmap.put("erpDevelopModifyorder", erpDevelopModifyorder);
return prefix + "/pickAdd";
}
/**
* 修改保存开发修改单
*/
@ -175,5 +190,4 @@ public class ErpDevelopModifyorderController extends BaseController
return toAjax(erpDevelopModifyorderService.restoreErpDevelopModifyorderById(id));
}
}

238
ruoyi-admin/src/main/java/com/ruoyi/erp/domain/DevelopReviseorderChild.java

@ -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();
}
}

11
ruoyi-admin/src/main/java/com/ruoyi/erp/domain/ErpDevelopModifyorder.java

@ -86,6 +86,17 @@ public class ErpDevelopModifyorder extends BaseEntity
@Excel(name = "工程员姓名")
private String userName;
@Excel(name = "加工单号")
private String makeNo;
public String getMakeNo() {
return makeNo;
}
public void setMakeNo(String makeNo) {
this.makeNo = makeNo;
}
public void setDevelopOrderId(Long developOrderId)
{
this.developOrderId = developOrderId;

77
ruoyi-admin/src/main/java/com/ruoyi/erp/mapper/DevelopReviseorderChildMapper.java

@ -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);
}

75
ruoyi-admin/src/main/java/com/ruoyi/erp/service/IDevelopReviseorderChildService.java

@ -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);
}

126
ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/DevelopReviseorderChildServiceImpl.java

@ -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);
}
}

149
ruoyi-admin/src/main/resources/mapper/erp/DevelopReviseorderChildMapper.xml

@ -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>

138
ruoyi-admin/src/main/resources/templates/erp/developModifyChild/add.html

@ -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>

207
ruoyi-admin/src/main/resources/templates/erp/developModifyChild/developModifyChild.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>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</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>

145
ruoyi-admin/src/main/resources/templates/erp/developModifyChild/edit.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>

76
ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/add.html

@ -24,7 +24,7 @@
<div class="form-group">
<label class="col-sm-3 control-label is-required">生产单号:</label>
<div class="col-sm-8">
<select id="add_developOderCode" name="developOderCode" class="form-control" type="text" required>
<select id="makeNo" name="makeNo" class="form-control" type="text" required>
<option value="">请选择</option>
</select>
</div>
@ -90,24 +90,43 @@
<th:block th:include="include :: bootstrap-table-editable-js" />
<th:block th:include="include :: select2-js" />
<script th:inline="javascript">
var prefix = ctx + "erp/developModifyOrder"
var prefix = ctx + "erp/developModifyOrder";
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var bomLevelSelectDatas = [[${@dict.getTypeSelect('bomLevel')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var userName = [[${@permission.getPrincipalProperty('userName')}]];
$("#form-developModifyOrder-add").validate({ focusCleanup: true});
$("#add_developOderCode").select2({
$(function () {
$("#makeNo").select2({
theme: "bootstrap",
allowClear: true,
placeholder: "请选择生产单号",
ajax: {
url: ctx + "system/makeorder" + "/selectAllMakeNos",
url: ctx + "/system/makeorder/getAllMakeNos",
dataType: 'json',
type: "POST",
delay: 250,
processResults: function (data, params) {
params.page = params.page || 1;
return {
results: data.data,
processResults: function (res, params) {
var options = [];
if(res.code==0){
var resultList = res.data;
console.log(resultList);
for(var i= 0, len=resultList.length;i<len;i++){
var option = resultList[i];
option.id = resultList[i]["makeNo"];
option.text = resultList[i]["makeNo"];
options.push(option);
}
}
return {
results: options
};
}
}
});
$(function () {
var options = {
id: "bootstrap-sub-table-developModify",
url: prefix + "/getDevelopModifyOrderList",
@ -179,6 +198,7 @@
$.table.init(options);
var option1 = {
id: "bootstrap-sub-table-material",
url: prefix + "/list",
modalName: "bom",
detailView: true,
@ -389,6 +409,7 @@
var options = {
title: '选择生产物料',
url: url,
data:{makeNo:$("#makeNo").val()},
callBack: doSubmit
};
$.modal.openOptions(options);
@ -467,7 +488,42 @@
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-developModifyOrder-add').serialize());
var from = $("#form-developModifyOrder-add").serializeArray();
var developModify = $("#bootstrap-sub-table-developModify").bootstrapTable('getData');
var material = $("#bootstrap-sub-table-material").bootstrapTable('getData');
for (var i = 0; i < developModify.length; i++) {
from.push({"name": "developModify[" + i + "].id", "value": developModify[i].id});
from.push({"name": "developModify[" + i + "].bomNo", "value": developModify[i].bomNo});
from.push({"name": "developModify[" + i + "].materialNo", "value": developModify[i].materialNo});
from.push({"name": "developModify[" + i + "].materialName", "value": developModify[i].materialName});
from.push({"name": "developModify[" + i + "].materialType", "value": developModify[i].materialType});
from.push({"name": "developModify[" + i + "].describe", "value": developModify[i].describe});
from.push({"name": "developModify[" + i + "].processMethod", "value": developModify[i].processMethod});
from.push({"name": "developModify[" + i + "].unit", "value": developModify[i].unit});
from.push({"name": "developModify[" + i + "].brand", "value": developModify[i].brand});
from.push({"name": "developModify[" + i + "].level", "value": developModify[i].level});
from.push({"name": "developModify[" + i + "].lossRate", "value": developModify[i].lossRate});
from.push({"name": "developModify[" + i + "].useNum", "value": developModify[i].useNum});
}
for (var i = 0; i < material.length; i++) {
from.push({"name": "material[" + i + "].id", "value": material[i].id});
from.push({"name": "material[" + i + "].bomNo", "value": material[i].bomNo});
from.push({"name": "material[" + i + "].materialNo", "value": material[i].materialNo});
from.push({"name": "material[" + i + "].materialName", "value": material[i].materialName});
from.push({"name": "material[" + i + "].materialType", "value": material[i].materialType});
from.push({"name": "material[" + i + "].describe", "value": material[i].describe});
from.push({"name": "material[" + i + "].processMethod", "value": material[i].processMethod});
from.push({"name": "material[" + i + "].unit", "value": material[i].unit});
from.push({"name": "material[" + i + "].brand", "value": material[i].brand});
from.push({"name": "material[" + i + "].level", "value": material[i].level});
from.push({"name": "material[" + i + "].lossRate", "value": material[i].lossRate});
from.push({"name": "material[" + i + "].useNum", "value": material[i].useNum});
}
$("#developModify").val(JSON.stringify(developModify));
$("#material").val(JSON.stringify(material));
$("#developModifyOrder").val(JSON.stringify(from));
$("#material").val(JSON.stringify(material));
}
}
</script>

519
ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/detail.html

@ -13,120 +13,80 @@
<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="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="purchaseStorageStatus" class="form-control m-b" th:with="type=${@dict.getType('eceiptStatus')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{purchaseStorageStatus}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">品质状态:</label>
<div class="col-sm-8">
<select name="qualityStatus" class="form-control m-b" th:with="type=${@dict.getType('qualityStatus')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{qualityStatus}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">审核状态:</label>
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">开发修改单号:</label>
<div class="col-sm-8">
<select name="auditStatus" class="form-control m-b" th:with="type=${@dict.getType('auditStatus')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{auditStatus}"></option>
</select>
<input name="makeNo" th:field="*{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">
<select name="completeStatus" class="form-control m-b" th:with="type=${@dict.getType('completeStatus')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{completeStatus}"></option>
</select>
<div class="container">
<div class="header">
<div class="btn-group-sm" role="group">
<header>修改开发修改单:</header>
</div>
</div>
<div class="row">
<div class="form-group">
<label class="col-sm-3 control-label">完成状态</label>
<label class="col-sm-3 control-label is-required">生产单号:</label>
<div class="col-sm-8">
<select name="finshStatus" class="form-control m-b" th:with="type=${@dict.getType('finshStatus')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{finshStatus}"></option>
<select id="add_developOderCode" name="developOderCode" class="form-control" type="text" required>
<option value="">请选择</option>
</select>
</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>
<label class="col-sm-3 control-label">修改完成时间:</label>
<div class="input-group date">
<input name="updateInfoTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料名称:</label>
<div class="col-sm-8">
<input name="materialName" th:field="*{materialName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料类型:</label>
<div class="col-sm-8">
<input name="materialType" th:field="*{materialType}" class="form-control" type="text">
<div class="container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span>选择开发修改单物料</span>
<a class="btn btn-success" onclick="insertRow()">
<i class="fa fa-plus"></i> 添加修改物料
</a>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">图片:</label>
<div class="col-sm-8">
<input name="materialPhotoUrl" th:field="*{materialPhotoUrl}" class="form-control" type="text">
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-developModify"></table>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">单位:</label>
<div class="col-sm-8">
<input name="materialUnit" th:field="*{materialUnit}" class="form-control" type="text">
</div>
<div class="container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar1" role="group">
<span>选择采购物料</span>
<a class="btn btn-success" onclick="insertRow2()">
<i class="fa fa-plus"></i> 添加修改物料
</a>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">品牌:</label>
<div class="col-sm-8">
<input name="materialBrand" th:field="*{materialBrand}" class="form-control" type="text">
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-material"></table>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">描述:</label>
<div class="col-sm-8">
<input name="materialDescribe" th:field="*{materialDescribe}" 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="materialProcessMode" th:field="*{materialProcessMode}" class="form-control" type="text">
</div>
<div class="container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar2" role="group">
<span>选择通知人</span>
<a class="btn btn-success" onclick="insertRow3()">
<i class="fa fa-plus"></i> 添加通知人
</a>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">工程员:</label>
<div class="col-sm-8">
<select name="userId" class="form-control m-b">
<option value="">所有</option>
</select>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-biztoitem"></table>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">工程员姓名:</label>
<div class="col-sm-8">
<input name="userName" th:field="*{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="remark" th:field="*{remark}" class="form-control" type="text">
</div>
</div>
</form>
@ -137,7 +97,394 @@
$("#form-developModifyOrder-detail").validate({
focusCleanup: true
});
$("#makeNo").select2({
theme: "bootstrap",
allowClear: true,
placeholder: "请选择生产单号",
ajax: {
url: ctx + "/system/makeorder/getAllMakeNos",
dataType: 'json',
type: "POST",
delay: 250,
processResults: function (res, params) {
var options = [];
if(res.code==0){
var resultList = res.data;
console.log(resultList);
for(var i= 0, len=resultList.length;i<len;i++){
var option = resultList[i];
option.id = resultList[i]["makeNo"];
option.text = resultList[i]["makeNo"];
options.push(option);
}
}
return {
results: options
};
}
}
});
$(function () {
var options = {
id: "bootstrap-sub-table-developModify",
// url: prefix + "/getDevelopModifyOrderList",
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
columns: [
{checkbox: true},
{field: 'index',align: 'center', title: "序号",
formatter: function (value, row, index) {
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
return columnIndex + $.table.serialNumber(index);
}
},
{title: '物料索引id',field: 'materialId',align: 'center',visible: false},
{title: '料号',field: 'materialCode',align: 'center'},
{title: '物料名称',field: 'materialName',align: 'center'},
{title: '图片',field: 'photoUrl',
formatter: function(value, row, index) {
if(value == null || value == ""){
value = "";
return "<img src='' herf='' />";
}
return $.table.imageView(value);
}
},
{title: '物料类型',field: 'materialType',align: 'center',
formatter: function(value, row, index) {
return $.table.selectCategoryLabel(materialTypeDatas, value);
}
},
{ title: '描述',field: 'describe',align: 'center'},
{title: '品牌',field: 'brand',align: 'center'},
{ title: '单位',field: 'unit',align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(sysUnitClassDatas, value);
}
},
{title: '半成品类型',field: 'processMethod',align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{ title: '对外售价',field: 'materialSole',},
{title: '国内税率',field: 'countTax',align: 'center',},
{ title: '美元汇率',field: 'usdTax', align: 'center',},
{field: 'materialNum',align: 'center',title: '物料的数量',},
{ title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',},
{title: '物料的不含税单价(美元)',field: 'materialNoUsd',align: 'center',},
{title: '修改详情',align: 'center',
formatter:function formatterForm(value, row, index) {
// 这里的代码会为每行生成一个表单
var form = $('<form></form>').append(
$('<input/>', { type: 'text', value: row.name, name: 'name', placeholder: 'Name' }),
$('<input/>', { type: 'email', value: row.email, name: 'email', placeholder: 'Email' }),
$('<button/>', { type: 'submit' }).text('Submit')
);
form.on('submit', function(e) {
e.preventDefault(); // 阻止表单默认提交行为
var formData = form.serializeArray(); // 序列化表单数据为数组
console.log(formData); // 在控制台输出表单数据
// 这里可以添加代码处理表单提交,例如发送到服务器等
});
return form; // 返回生成的表单HTML
}},
]
};
$.table.init(options);
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 insertRow() {
var url = ctx + "system/makeorder/selectMakeorder";
var options = {
title: '选择生产物料',
url: url,
data: {
"materialType": $("#makeNo").val()
},
callBack: doSubmit
};
$.modal.openOptions(options);
}
function insertRow2() {
var url = ctx + "erp/material/select";
var options = {
title: '选择料号',
url: url,
callBack: doSubmit2
};
$.modal.openOptions(options);
}
function doSubmit(index, layero,uniqueId){
console.log(uniqueId);
var iframeWin = window[layero.find('iframe')[0]['name']];
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0];
var totalNum = $("#bootstrap-sub-table-developModify").bootstrapTable('getData').length;
console.log("rowData: "+rowData);
$("#bootstrap-sub-table-developModify").bootstrapTable('insertRow',{
index: 1,
row: {
id:rowData.id,
bomNo:rowData.bomNo,
materialNo: rowData.materialNo,
materialName: rowData.materialName,
materialType: rowData.materialType,
describe: rowData.describe,
processMethod: rowData.processMethod,
unit: rowData.unit,
brand: rowData.brand,
level: "1",
lossRate:'',
useNum:''
}
})
layer.close(index);
}
function doSubmit2(index, layero,uniqueId){
console.log(uniqueId);
var iframeWin = window[layero.find('iframe')[0]['name']];
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0];
var totalNum = $("#bootstrap-sub-table-material").bootstrapTable('getData').length;
console.log("rowData: "+rowData);
$("#bootstrap-sub-table-material").bootstrapTable('insertRow',{
index: 1,
row: {
id:rowData.id,
bomNo:rowData.bomNo,
materialNo: rowData.materialNo,
materialName: rowData.materialName,
materialType: rowData.materialType,
describe: rowData.describe,
processMethod: rowData.processMethod,
unit: rowData.unit,
brand: rowData.brand,
level: "1",
lossRate:'',
useNum:''
}
})
layer.close(index);
}
function remove(id){
$("#bootstrap-sub-table-developModify").bootstrapTable('remove', {
field: 'id',
values: id
})
}
function removeRow(id){
$("#bootstrap-sub-table-material").bootstrapTable('remove', {
field: 'id',
values: id
})
}
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/detail", $('#form-developModifyOrder-detail').serialize());

142
ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/developModifyOrder.html

@ -60,15 +60,6 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="erp:developModifyOrder:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="erp:developModifyOrder:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="erp:developModifyOrder:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="erp:developModifyOrder:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
@ -89,7 +80,6 @@
var finshStatusDatas = [[${@dict.getType('finshStatus')}]];
var useStatusDatas = [[${@dict.getType('useStatus')}]];
var prefix = ctx + "erp/developModifyOrder";
$(function() {
var options = {
url: prefix + "/list",
@ -102,129 +92,83 @@
exportUrl: prefix + "/export",
pageSize: 10,
modalName: "开发修改单",
columns: [{
checkbox: true
},
{
title: '开发修改单ID',
field: 'developOrderId',
visible: false
},
{
title: '审核状态',
field: 'auditStatus',
columns: [
{checkbox: true},
{title: '开发修改单ID',field: 'developOrderId',visible: false},
{title: '审核状态',field: 'auditStatus',
formatter: function (value, row, index) {
return $.table.selectDictLabel(auditStatusDatas, value);
}
},
{
title: '完成状态',
field: 'finshStatus',
{title: '完成状态',field: 'finshStatus',
formatter: function (value, row, index) {
return $.table.selectDictLabel(finshStatusDatas, value);
}
},
{
title: '确认状态',
field: 'completeStatus',
{title: '确认状态',field: 'completeStatus',
formatter: function (value, row, index) {
return $.table.selectDictLabel(completeStatusDatas, value);
}
},
{
title: '开发修改单号',
field: 'developOderCode',
},
{
title: '采购入库状态',
field: 'purchaseStorageStatus',
{title: '开发修改单号',field: 'developOderCode',},
{title: '采购入库状态',field: 'purchaseStorageStatus',
formatter: function (value, row, index) {
return $.table.selectDictLabel(purchaseStorageStatusDatas, value);
}
},
{
title: '品质状态',
field: 'qualityStatus',
{title: '品质状态',field: 'qualityStatus',
formatter: function (value, row, index) {
return $.table.selectDictLabel(qualityStatusDatas, value);
}
},
{
title: '工程员',
field: 'userName',
},
{
title: '料号',
field: 'materialNo',
},
{
title: '图片',
field: 'materialPhotoUrl',
},
{
title: '物料名称',
field: 'materialName',
},
{
title: '物料类型',
field: 'materialType',
},
{
title: '单位',
field: 'materialUnit',
},
{
title: '品牌',
field: 'materialBrand',
},
{
title: '描述',
field: 'materialDescribe',
},
{
title: '半成品类型',
field: 'materialProcessMode',
},
{
title: '录入时间',
field: 'createTime',
},
{
title: '更新人',
field: 'updateBy',
},
{
title: '上次更新时间',
field: 'updateTime',
},
// {
// title: '使用状态',
// field: 'useStatus',
// formatter: function(value, row, index) {
// return $.table.selectDictLabel(useStatusDatas, value);
// }
// },
{
title: '操作',
align: 'center',
{title: '工程员',field: 'userName',},
{title: '料号',field: 'materialNo',},
{title: '图片',field: 'materialPhotoUrl',},
{title: '物料名称',field: 'materialName',},
{title: '物料类型',field: 'materialType',},
{title: '单位',field: 'materialUnit',},
{title: '品牌',field: 'materialBrand',},
{title: '描述',field: 'materialDescribe',},
{title: '半成品类型',field: 'materialProcessMode',},
{title: '录入时间',field: 'createTime',},
{title: '更新人',field: 'updateBy',},
{title: '上次更新时间',field: 'updateTime',},
{title: '操作',align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.developOrderId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-success btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.developOrderId + '\')"><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.developOrderId + '\')"><i class="fa fa-remove"></i>删除</a> ');
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="readConfirm(\'' + row.developOrderId + '\')"><i class="fa fa-window-restore"></i>确认</a> ');
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="pickingOrder(\'' + row.developOrderId + '\')"><i class="fa fa-window-restore"></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> ');
}
if(row.auditStatus == '2' && row.purchaseStorageStatus == '3' ||row.purchaseStorageStatus == '4'){
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="readConfirm(\'' + row.developOrderId + '\')"><i class="fa fa-window-restore"></i>确认</a> ');
}
return actions.join('');
}
}]
}
]
};
$.table.init(options);
});
function readConfirm(developOrderId){
var options = {
title: '相关人员确认',
url: prefix + '/confirm/' + developOrderId,
};
$.modal.openOptions(options);
}
function pickingOrder(developOrderId){
var options = {
title: '开发修改单领料',
url: prefix + '/pickingOrder/' + developOrderId,
};
$.modal.openOptions(options);
}
</script>
</body>
</html>

521
ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/edit.html

@ -13,114 +13,80 @@
<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="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="purchaseStorageStatus" class="form-control m-b" th:with="type=${@dict.getType('eceiptStatus')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{purchaseStorageStatus}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">品质状态:</label>
<div class="col-sm-8">
<select name="qualityStatus" class="form-control m-b" th:with="type=${@dict.getType('qualityStatus')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{qualityStatus}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">审核状态:</label>
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">开发修改单号:</label>
<div class="col-sm-8">
<select name="auditStatus" class="form-control m-b" th:with="type=${@dict.getType('auditStatus')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{auditStatus}"></option>
</select>
<input name="makeNo" th:field="*{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">
<select name="completeStatus" class="form-control m-b" th:with="type=${@dict.getType('completeStatus')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{completeStatus}"></option>
</select>
<div class="container">
<div class="header">
<div class="btn-group-sm" role="group">
<header>修改开发修改单:</header>
</div>
</div>
<div class="row">
<div class="form-group">
<label class="col-sm-3 control-label">完成状态</label>
<label class="col-sm-3 control-label is-required">生产单号:</label>
<div class="col-sm-8">
<select name="finshStatus" class="form-control m-b" th:with="type=${@dict.getType('finshStatus')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{finshStatus}"></option>
<select id="add_developOderCode" name="developOderCode" class="form-control" type="text" required>
<option value="">请选择</option>
</select>
</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>
<label class="col-sm-3 control-label">修改完成时间:</label>
<div class="input-group date">
<input name="updateInfoTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料名称:</label>
<div class="col-sm-8">
<input name="materialName" th:field="*{materialName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料类型:</label>
<div class="col-sm-8">
<input name="materialType" th:field="*{materialType}" class="form-control" type="text">
</div>
<div class="container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span>选择开发修改单物料</span>
<a class="btn btn-success" onclick="insertRow()">
<i class="fa fa-plus"></i> 添加修改物料
</a>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">图片:</label>
<div class="col-sm-8">
<input name="materialPhotoUrl" th:field="*{materialPhotoUrl}" class="form-control" type="text">
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-developModify"></table>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">单位:</label>
<div class="col-sm-8">
<input name="materialUnit" th:field="*{materialUnit}" 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="materialBrand" th:field="*{materialBrand}" class="form-control" type="text">
<div class="container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar1" role="group">
<span>选择采购物料</span>
<a class="btn btn-success" onclick="insertRow2()">
<i class="fa fa-plus"></i> 添加修改物料
</a>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">描述:</label>
<div class="col-sm-8">
<input name="materialDescribe" th:field="*{materialDescribe}" class="form-control" type="text">
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-material"></table>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">半成品类型:</label>
<div class="col-sm-8">
<input name="materialProcessMode" th:field="*{materialProcessMode}" class="form-control" type="text">
</div>
<div class="container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar2" role="group">
<span>选择通知人</span>
<a class="btn btn-success" onclick="insertRow3()">
<i class="fa fa-plus"></i> 添加通知人
</a>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">工程员:</label>
<div class="col-sm-8">
<select id="userId_add" name="userId" th:field="*{userId}" class="form-control m-b">
<option th:each="user : ${userData}" th:value="${user.userId}" th:text="${user.userName}"></option>
</select>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-biztoitem"></table>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注信息:</label>
<div class="col-sm-8">
<input name="remark" th:field="*{remark}" class="form-control" type="text">
</div>
</div>
</form>
@ -131,29 +97,394 @@
$("#form-developModifyOrder-edit").validate({
focusCleanup: true
});
$("#makeNo").select2({
theme: "bootstrap",
allowClear: true,
placeholder: "请选择生产单号",
ajax: {
url: ctx + "/system/makeorder/getAllMakeNos",
dataType: 'json',
type: "POST",
delay: 250,
processResults: function (res, params) {
var options = [];
if(res.code==0){
var resultList = res.data;
console.log(resultList);
for(var i= 0, len=resultList.length;i<len;i++){
var option = resultList[i];
option.id = resultList[i]["makeNo"];
option.text = resultList[i]["makeNo"];
options.push(option);
}
}
return {
results: options
};
}
}
});
$(function () {
$.ajax({
url: ctx + 'erp/developModifyOrder/getEngineerList',
type: 'post',
data: { roleKey: 'gcwyRole' },
success: function (res) {
if (res.data.length > 0) {
var userData = res.data;
for (let i in userData) {
$("#userId_add").append(
"<option value='" + userData[i].userId + "'>" + userData[i].userName + "</option>" // 显示用户姓名
);
var options = {
id: "bootstrap-sub-table-developModify",
url: prefix + "/getDevelopModifyOrderList",
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
columns: [
{checkbox: true},
{field: 'index',align: 'center', title: "序号",
formatter: function (value, row, index) {
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
return columnIndex + $.table.serialNumber(index);
}
},
{title: '物料索引id',field: 'materialId',align: 'center',visible: false},
{title: '料号',field: 'materialCode',align: 'center'},
{title: '物料名称',field: 'materialName',align: 'center'},
{title: '图片',field: 'photoUrl',
formatter: function(value, row, index) {
if(value == null || value == ""){
value = "";
return "<img src='' herf='' />";
}
return $.table.imageView(value);
}
$("userId_add").val(userData[i].userId).trigger("change");
} else {
$.modal.msgError(res.msg);
},
{title: '物料类型',field: 'materialType',align: 'center',
formatter: function(value, row, index) {
return $.table.selectCategoryLabel(materialTypeDatas, value);
}
},
{ title: '描述',field: 'describe',align: 'center'},
{title: '品牌',field: 'brand',align: 'center'},
{ title: '单位',field: 'unit',align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(sysUnitClassDatas, value);
}
},
{title: '半成品类型',field: 'processMethod',align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{ title: '对外售价',field: 'materialSole',},
{title: '国内税率',field: 'countTax',align: 'center',},
{ title: '美元汇率',field: 'usdTax', align: 'center',},
{field: 'materialNum',align: 'center',title: '物料的数量',},
{ title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',},
{title: '物料的不含税单价(美元)',field: 'materialNoUsd',align: 'center',},
{title: '修改详情',align: 'center',
formatter:function formatterForm(value, row, index) {
// 这里的代码会为每行生成一个表单
var form = $('<form></form>').append(
$('<input/>', { type: 'text', value: row.name, name: 'name', placeholder: 'Name' }),
$('<input/>', { type: 'email', value: row.email, name: 'email', placeholder: 'Email' }),
$('<button/>', { type: 'submit' }).text('Submit')
);
form.on('submit', function(e) {
e.preventDefault(); // 阻止表单默认提交行为
var formData = form.serializeArray(); // 序列化表单数据为数组
console.log(formData); // 在控制台输出表单数据
// 这里可以添加代码处理表单提交,例如发送到服务器等
});
return form; // 返回生成的表单HTML
}},
]
};
$.table.init(options);
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 insertRow() {
var url = ctx + "system/makeorder/selectMakeorder";
var options = {
title: '选择生产物料',
url: url,
data: {
"materialType": $("#makeNo").val()
},
callBack: doSubmit
};
$.modal.openOptions(options);
}
function insertRow2() {
var url = ctx + "erp/material/select";
var options = {
title: '选择料号',
url: url,
callBack: doSubmit2
};
$.modal.openOptions(options);
}
function doSubmit(index, layero,uniqueId){
console.log(uniqueId);
var iframeWin = window[layero.find('iframe')[0]['name']];
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0];
var totalNum = $("#bootstrap-sub-table-developModify").bootstrapTable('getData').length;
console.log("rowData: "+rowData);
$("#bootstrap-sub-table-developModify").bootstrapTable('insertRow',{
index: 1,
row: {
id:rowData.id,
bomNo:rowData.bomNo,
materialNo: rowData.materialNo,
materialName: rowData.materialName,
materialType: rowData.materialType,
describe: rowData.describe,
processMethod: rowData.processMethod,
unit: rowData.unit,
brand: rowData.brand,
level: "1",
lossRate:'',
useNum:''
}
})
layer.close(index);
}
function doSubmit2(index, layero,uniqueId){
console.log(uniqueId);
var iframeWin = window[layero.find('iframe')[0]['name']];
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0];
var totalNum = $("#bootstrap-sub-table-material").bootstrapTable('getData').length;
console.log("rowData: "+rowData);
$("#bootstrap-sub-table-material").bootstrapTable('insertRow',{
index: 1,
row: {
id:rowData.id,
bomNo:rowData.bomNo,
materialNo: rowData.materialNo,
materialName: rowData.materialName,
materialType: rowData.materialType,
describe: rowData.describe,
processMethod: rowData.processMethod,
unit: rowData.unit,
brand: rowData.brand,
level: "1",
lossRate:'',
useNum:''
}
})
layer.close(index);
}
function remove(id){
$("#bootstrap-sub-table-developModify").bootstrapTable('remove', {
field: 'id',
values: id
})
}
function removeRow(id){
$("#bootstrap-sub-table-material").bootstrapTable('remove', {
field: 'id',
values: id
})
}
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-developModifyOrder-edit').serialize());

267
ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/pickAdd.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…
Cancel
Save