Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dev
王晓迪 2 months ago
parent
commit
5dde8dd6af
  1. 23
      ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpDevelopModifyorderController.java
  2. 71
      ruoyi-admin/src/main/java/com/ruoyi/erp/domain/ErpDevelopModifyorder.java
  3. 5
      ruoyi-admin/src/main/java/com/ruoyi/erp/mapper/ErpBomMapper.java
  4. 5
      ruoyi-admin/src/main/java/com/ruoyi/erp/mapper/ErpDevelopModifyorderMapper.java
  5. 5
      ruoyi-admin/src/main/java/com/ruoyi/erp/service/IErpDevelopModifyorderService.java
  6. 26
      ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpBomServiceImpl.java
  7. 9
      ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpDevelopModifyorderServiceImpl.java
  8. 3
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchasePlanServiceImpl.java
  9. 65
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysProductModelController.java
  10. 5
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysProductModelMapper.java
  11. 10
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysProductModelService.java
  12. 19
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysProductModelServiceImpl.java
  13. 5
      ruoyi-admin/src/main/resources/mapper/erp/ErpBomMapper.xml
  14. 10
      ruoyi-admin/src/main/resources/mapper/erp/ErpDevelopModifyorderMapper.xml
  15. 32
      ruoyi-admin/src/main/resources/mapper/system/SysProductModelMapper.xml
  16. 13
      ruoyi-admin/src/main/resources/templates/erp/bom/bom.html
  17. 58
      ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/developModifyOrder.html
  18. 12
      ruoyi-admin/src/main/resources/templates/system/model/add.html
  19. 188
      ruoyi-admin/src/main/resources/templates/system/model/detail.html
  20. 110
      ruoyi-admin/src/main/resources/templates/system/model/model.html

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

@ -113,19 +113,36 @@ public class ErpDevelopModifyorderController extends BaseController
}
/**
* 导出开发修改单列表
* 导出全部开发修改单列表
*/
@RequiresPermissions("erp:developModifyOrder:export")
@Log(title = "开发修改单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@PostMapping("/exportAll")
@ResponseBody
public AjaxResult export(ErpDevelopModifyorderVo erpDevelopModifyorderVo)
public AjaxResult exportAll(ErpDevelopModifyorderVo erpDevelopModifyorderVo)
{
List<ErpDevelopModifyorderVo> list = erpDevelopModifyorderService.selectErpDevelopModifyorderList(erpDevelopModifyorderVo);
ExcelUtil<ErpDevelopModifyorderVo> util = new ExcelUtil<ErpDevelopModifyorderVo>(ErpDevelopModifyorderVo.class);
return util.exportExcel(list, "开发修改单数据");
}
/**
* 导出选择的开发修改单列表
*/
@RequiresPermissions("erp:developModifyOrder:export")
@Log(title = "开发修改单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(@RequestBody String[] developOrderCodes)
{
List<ErpDevelopModifyorderVo> list = erpDevelopModifyorderService.selectErpDevelopModifyorderListByCodes(developOrderCodes);
ExcelUtil<ErpDevelopModifyorderVo> util = new ExcelUtil<ErpDevelopModifyorderVo>(ErpDevelopModifyorderVo.class);
return util.exportExcel(list, "开发修改单数据");
}
/**
* 新增开发修改单
*/

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

@ -35,33 +35,6 @@ public class ErpDevelopModifyorder extends BaseEntity
@Excel(name = "料号")
private String materialNo;
/** 采购入库状态(0待采购、1采购中、2待暂收、3部分暂收、4全部暂收、5已暂收、6待入库、7部分入库、8全部入库、9已入库) */
@Excel(name = "采购入库状态")
private String purchaseStorageStatus;
/** 品质状态 (0待品质、1部分品质、2全部品质)*/
@Excel(name = "品质状态")
private String qualityStatus;
/** 审核状态 (0待审核、1审核通过、2审核拒绝)*/
@Excel(name = "审核状态")
private String auditStatus;
/** 确认状态 (0待确认、1部分确认、2已确认)*/
@Excel(name = "确认状态")
private String completeStatus;
/** 完成状态 (0待完成、1已完成)*/
@Excel(name = "完成状态")
private String finshStatus;
/** 使用状态 (0否、1是、2已作废)*/
@Excel(name = "使用状态")
private String useStatus;
/** 订单类型(0客户订单、1研发订单、2其他订单)*/
private String orderType;
/** 物料名称 */
@Excel(name = "物料名称")
private String materialName;
@ -71,11 +44,9 @@ public class ErpDevelopModifyorder extends BaseEntity
private String materialType;
/** 图片 */
@Excel(name = "图片")
private String materialPhotoUrl;
/** 单位 */
@Excel(name = "单位")
private String materialUnit;
/** 品牌 */
@ -87,44 +58,70 @@ public class ErpDevelopModifyorder extends BaseEntity
private String materialDescribe;
/** 加工方式 */
@Excel(name = "加工方式")
@Excel(name = "加工方式",dictType = "processMethod")
private String materialProcessMethod;
/** 工程员 */
@Excel(name = "工程员")
private Long userId;
/** 工程员姓名 */
@Excel(name = "工程员姓名")
@Excel(name = "工程员")
private String userName;
/** 采购入库状态(0待采购、1采购中、2待暂收、3部分暂收、4全部暂收、5已暂收、6待入库、7部分入库、8全部入库、9已入库) */
@Excel(name = "采购入库状态",dictType = "eceiptStatus")
private String purchaseStorageStatus;
/** 品质状态 (0待品质、1部分品质、2全部品质)*/
@Excel(name = "品质状态",dictType = "qualityStatus")
private String qualityStatus;
/** 审核状态 (0待审核、1审核通过、2审核拒绝)*/
@Excel(name = "审核状态",dictType = "auditStatus")
private String auditStatus;
/** 确认状态 (0待确认、1部分确认、2已确认)*/
@Excel(name = "确认状态",dictType = "completeStatus")
private String completeStatus;
/** 完成状态 (0待完成、1已完成)*/
@Excel(name = "完成状态",dictType = "finshStatus")
private String finshStatus;
/** 使用状态 (0否、1是、2已作废)*/
@Excel(name = "使用状态",dictType = "useStatus")
private String useStatus;
/** 订单类型(0客户订单、1研发订单、2其他订单)*/
private String orderType;
/** 领料员 */
private String pickingUser;
/** 修改完成时间 */
@Excel(name = "修改完成时间", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date updateFinishTime;
/** 修改前说明 */
@Excel(name = "修改前说明")
private String beforeUpdateRemark;
@Excel(name = "修改后说明")
/** 修改后说明 */
private String afterUpdateRemark;
/** 流程实例ID */
@Excel(name = "流程实例ID")
private String instanceId;
/** 流程实例类型 */
@Excel(name = "流程实例类型")
private String instanceType;
/** 流程提交实例ID */
@Excel(name = "流程提交实例ID")
private String submitInstanceId;
/** 申请标题 */
@Excel(name = "申请标题")
private String applyTitle;
/** 申请时间 */
@ -137,11 +134,9 @@ public class ErpDevelopModifyorder extends BaseEntity
private String applyUser;
/** 流程作废实例ID */
@Excel(name = "流程作废实例ID")
private String cancelInstanceId;
/** 流程恢复实例ID */
@Excel(name = "流程恢复实例ID")
private String restoreInstanceId;

5
ruoyi-admin/src/main/java/com/ruoyi/erp/mapper/ErpBomMapper.java

@ -159,4 +159,9 @@ public interface ErpBomMapper
* 检查bom是否引用了物料
* */
int checkMaterialIsReferencedByBom(String materialNo);
/**
* 通过bom父节点id查询bom子节点
* */
List<ErpBom> selectSubBomsByParentId(Long id);
}

5
ruoyi-admin/src/main/java/com/ruoyi/erp/mapper/ErpDevelopModifyorderMapper.java

@ -86,4 +86,9 @@ public interface ErpDevelopModifyorderMapper
* 根据开发修改单号查询开发修改单
* */
ErpDevelopModifyorder selectErpDevelopModifyorderByCode(String relatedOrderCode);
/**
* 根据开发修改单号数组查询开发修改单集合
* */
List<ErpDevelopModifyorderVo> selectErpDevelopModifyorderListByCodes(String[] developOrderCodes);
}

5
ruoyi-admin/src/main/java/com/ruoyi/erp/service/IErpDevelopModifyorderService.java

@ -99,4 +99,9 @@ public interface IErpDevelopModifyorderService
* 修改保存开发修改单详情
* */
int detailErpDevelopModifyorder(ErpDevelopModifyorder erpDevelopModifyorder);
/**
* 根据开发修改单号数组查询开发修改单列表集合
* */
List<ErpDevelopModifyorderVo> selectErpDevelopModifyorderListByCodes(String[] developOrderCodes);
}

26
ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpBomServiceImpl.java

@ -6,6 +6,7 @@ import com.ruoyi.common.core.page.PageDomain;
import com.ruoyi.common.core.page.TableSupport;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.exception.BusinessException;
import com.ruoyi.common.service.ICommonService;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
@ -171,6 +172,9 @@ private ISysAttachService attachService;
@Override
public List<ErpBom> selectErpBomSubList(ErpBom erpBom) {
// erpBom.setAuditStatus("1");
// erpBom.setUseStatus("1");
return erpBomMapper.selectErpBomSubList(erpBom);
}
@ -371,16 +375,18 @@ private ISysAttachService attachService;
Long id = erpBom.getId();
insertErpBomSub(erpBom);
ErpMaterial erpMaterial = materialMapper.selectErpMaterialByMaterialNo(erpBom.getMaterialNo());
if (!Objects.isNull(erpMaterial)) {
ErpMaterial erpMaterial1 = new ErpMaterial();
erpMaterial1.setMaterialNo(erpBom.getMaterialNo());
erpMaterial1.setBomNo(erpBom.getBomNo());
materialMapper.updateMaterialBomNo(erpMaterial1);
}
// if (!Objects.isNull(erpMaterial)) {
// ErpMaterial erpMaterial1 = new ErpMaterial();
// erpMaterial1.setMaterialNo(erpBom.getMaterialNo());
// erpMaterial1.setBomNo(erpBom.getBomNo());
// materialMapper.updateMaterialBomNo(erpMaterial1);
// }
//添加物料关联的bom信息
return result;
}
/**
* 修改bom
*
@ -702,10 +708,15 @@ private ISysAttachService attachService;
erpBom1.setParentId(id);
erpBom1.setCreateBy(ShiroUtils.getLoginName());
erpBom1.setCreateTime(DateUtils.getNowDate());
// 新添加,理论上,刚添加的一阶物料默认审核通过,使用状态为是
// erpBom1.setAuditStatus("1");
// erpBom1.setUseStatus("1");
erpBomMapper.insertErpBom(erpBom1);
}
}
}
public List<ErpBom> selectErpBomList1(){
List<ErpBom> bomList = erpBomMapper.selectErpBomList1();
return bomList;
@ -872,6 +883,9 @@ private ISysAttachService attachService;
if(roleKeys.contains("gcwyRole")){
variables.put("authority",1);
}
// else if(roleKeys.contains("yfzjRole") || roleKeys.contains("admin")) {
// variables.put("authority",4);
// }
// else if(roleKeys.contains("gczgRole")){
// variables.put("authority",3);
// }else if(roleKeys.contains("gcjlRole")){

9
ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpDevelopModifyorderServiceImpl.java

@ -91,6 +91,15 @@ public class ErpDevelopModifyorderServiceImpl implements IErpDevelopModifyorderS
return erpDevelopModifyorderMapper.selectErpDevelopModifyorderById(developOrderId);
}
/**
* 根据开发修改单号数组查询开发修改单列表集合
* */
@Override
public List<ErpDevelopModifyorderVo> selectErpDevelopModifyorderListByCodes(String[] developOrderCodes) {
return erpDevelopModifyorderMapper.selectErpDevelopModifyorderListByCodes(developOrderCodes);
}
/**
* 查询开发修改单列表
*

3
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchasePlanServiceImpl.java

@ -301,6 +301,9 @@ public class PurchasePlanServiceImpl implements IPurchasePlanService
purchasePlan.setPurchasePlanCode(purchasePlanCode);
purchasePlan.setCreateTime(new Date());
purchasePlan.setCreateBy(loginName);
//申请人
purchasePlan.setApplyUser(erpDevelopModifyorderVo.getApplyUser());
// 标明来源是开发修改单
purchasePlan.setPurchasePlanType("3");
// 标明为待申请

65
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysProductModelController.java

@ -3,11 +3,13 @@ package com.ruoyi.system.controller;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.SysProductModel;
import com.ruoyi.system.service.ISysProductModelService;
import com.ruoyi.system.service.ISysUserService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -31,6 +33,10 @@ public class SysProductModelController extends BaseController
@Autowired
private ISysProductModelService sysProductModelService;
@Autowired
private ISysUserService sysUserService;
@RequiresPermissions("system:model:view")
@GetMapping()
public String model()
@ -56,15 +62,33 @@ public class SysProductModelController extends BaseController
*/
@RequiresPermissions("system:model:export")
@Log(title = "产品型号管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@PostMapping("/exportAll")
@ResponseBody
public AjaxResult export(SysProductModel sysProductModel)
public AjaxResult exportAll(SysProductModel sysProductModel)
{
List<SysProductModel> list = sysProductModelService.selectSysProductModelList(sysProductModel);
ExcelUtil<SysProductModel> util = new ExcelUtil<SysProductModel>(SysProductModel.class);
return util.exportExcel(list, "产品型号管理数据");
}
/**
* 导出产品型号管理列表
*/
@RequiresPermissions("system:model:export")
@Log(title = "产品型号管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(@RequestBody String[] pcodes)
{
List<SysProductModel> list = sysProductModelService.selectSysProductModelListByCodes(pcodes);
ExcelUtil<SysProductModel> util = new ExcelUtil<SysProductModel>(SysProductModel.class);
return util.exportExcel(list, "产品型号管理数据");
}
/**
* 新增产品型号管理
*/
@ -109,6 +133,30 @@ public class SysProductModelController extends BaseController
return toAjax(sysProductModelService.updateSysProductModel(sysProductModel));
}
/**
* 产品型号管理详情
*/
@GetMapping("/detail/{pid}")
public String detail(@PathVariable("pid") Long pid, ModelMap mmap)
{
SysProductModel sysProductModel = sysProductModelService.selectSysProductModelById(pid);
mmap.put("sysProductModel", sysProductModel);
return prefix + "/detail";
}
/**
* 产品型号管理详情
*/
@Log(title = "产品型号管理", businessType = BusinessType.UPDATE)
@PostMapping("/detail")
@ResponseBody
public AjaxResult detailSave(SysProductModel sysProductModel)
{
return toAjax(sysProductModelService.detailSysProductModel(sysProductModel));
}
/**
* 删除产品型号管理
*/
@ -145,4 +193,17 @@ public class SysProductModelController extends BaseController
}
/**
* 查询工程员列表
* */
@GetMapping ("/getEngineerList")
@ResponseBody
public TableDataInfo getEngineerList(){
startPage();
List<SysUser> list = sysUserService.selectRoleToUserList("gcwyRole,gcjlRole,gczgRole,yfzjRole,");
return getDataTable(list);
}
}

5
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysProductModelMapper.java

@ -75,4 +75,9 @@ public interface SysProductModelMapper
* @return 结果
*/
public int restoreSysProductModelById(Long pid);
/**
* 根据产品型号管理ID数组查询产品型号管理集合
*/
List<SysProductModel> selectSysProductModelListByCodes(String[] pcodes);
}

10
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysProductModelService.java

@ -73,4 +73,14 @@ public interface ISysProductModelService
* @return
*/
int restoreSysProductModelById(Long Pid);
/**
* 产品型号管理详情
* */
int detailSysProductModel(SysProductModel sysProductModel);
/**
* 根据产品型号id数组查询产品型号列表集合
* */
List<SysProductModel> selectSysProductModelListByCodes(String[] pcodes);
}

19
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysProductModelServiceImpl.java

@ -159,4 +159,23 @@ public class SysProductModelServiceImpl implements ISysProductModelService
{
return sysProductModelMapper.restoreSysProductModelById(pid);
}
/**
* 产品型号管理详情
* */
@Override
public int detailSysProductModel(SysProductModel sysProductModel) {
return 1;
}
/**
* 根据产品型号id数组查询产品型号列表集合
* */
@Override
public List<SysProductModel> selectSysProductModelListByCodes(String[] pcodes) {
return sysProductModelMapper.selectSysProductModelListByCodes(pcodes);
}
}

5
ruoyi-admin/src/main/resources/mapper/erp/ErpBomMapper.xml

@ -600,5 +600,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select count(1) from erp_bom where material_no = #{materialNo}
</select>
<select id="selectSubBomsByParentId" parameterType="Long" resultMap="ErpBomResult">
<include refid="selectErpBomVo"/>
where parent_id = #{parentId}
</select>
</mapper>

10
ruoyi-admin/src/main/resources/mapper/erp/ErpDevelopModifyorderMapper.xml

@ -79,6 +79,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where develop_order_code = #{developOrderCode}
</select>
<select id="selectErpDevelopModifyorderListByCodes" parameterType="String" resultMap="ErpDevelopModifyorderResult">
<include refid="selectErpDevelopModifyorderVo"/>
where develop_order_code in
<foreach collection="array" item="developOrderCode" open="(" separator="," close=")">
#{developOrderCode}
</foreach>
</select>
<insert id="insertErpDevelopModifyorder" parameterType="ErpDevelopModifyorderVo" useGeneratedKeys="true" keyProperty="developOrderId">
insert into erp_develop_modifyorder
<trim prefix="(" suffix=")" suffixOverrides=",">

32
ruoyi-admin/src/main/resources/mapper/system/SysProductModelMapper.xml

@ -43,19 +43,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)file
on s.pid = file.rel_id
<where>
<if test="pcode != null and pcode != ''"> and Pcode = #{pcode}</if>
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
<if test="equipModel != null and equipModel != ''"> and equipModel = #{equipModel}</if>
<if test="equipName != null and equipName != ''"> and equipName like concat('%', #{equipName}, '%')</if>
<if test="specification != null and specification != ''"> and specification = #{specification}</if>
<if test="differences != null and differences != ''"> and differences = #{differences}</if>
<if test="pcode != null and pcode != ''"> and s.pcode like concat('%', #{pcode}, '%')</if>
<if test="equipModel != null and equipModel != ''"> and s.equipModel like concat('%', #{equipModel}, '%')</if>
<if test="equipName != null and equipName != ''"> and s.equipName like concat('%', #{equipName}, '%')</if>
<if test="specification != null and specification != ''"> and s.specification like concat('%', #{specification}, '%') </if>
<if test="differences != null and differences != ''"> and s.differences like concat('%', #{differences}, '%')</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
and create_time between #{params.beginCreateTime} and #{params.endCreateTime}
and s.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
</if>
<if test="updateBy != null and updateBy != ''"> and update_by = #{updateBy}</if>
<if test="useStatus != null and useStatus != ''"> and use_status = #{useStatus}</if>
<if test="engineer !=null and engineer != ''">engineer = #{engineer}</if>
<if test="engineer !=null and engineer != ''">and s.engineer = #{engineer}</if>
</where>
order by s.create_time desc
</select>
<select id="selectSysProductModelById" parameterType="Long" resultMap="SysProductModelResult">
@ -66,12 +64,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
on s.pid = att.rel_id and att.source_type = 'sysProductModel' and att.source_sub_type = 'photo'
where s.pid = #{pid}
</select>
<select id="selectSysProductModelListByCodes" parameterType="String" resultMap="SysProductModelResult">
<include refid="selectSysProductModelVo"/>
where pcode in
<foreach collection="array" item="pcode" open="(" separator="," close=")">
#{pcode}
</foreach>
</select>
<insert id="insertSysProductModel" parameterType="SysProductModel" useGeneratedKeys="true" keyProperty="pid">
insert into sys_product_model
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="pcode != null">pcode,</if>
<if test="createBy != null">create_by,</if>
<if test="engineer != null">engineer,</if>
<if test="equipModel != null">equipModel,</if>
<if test="equipName != null">equipName,</if>
<if test="specification != null">specification,</if>
@ -81,11 +88,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="photoUrl != null">photoUrl,</if>
use_status
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="pcode != null">#{pcode},</if>
<if test="createBy != null">#{createBy},</if>
<if test="engineer != null">#{engineer},</if>
<if test="equipModel != null">#{equipModel},</if>
<if test="equipName != null">#{equipName},</if>
<if test="specification != null">#{specification},</if>
@ -95,7 +102,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="photoUrl != null">#{photoUrl},</if>
'1'
</trim>
</insert>

13
ruoyi-admin/src/main/resources/templates/erp/bom/bom.html

@ -39,6 +39,16 @@
</optgroup>
</select>
</li>
<li>
<label>加工类型:</label>
<select name="processMethod" th:with="type=${@dict.getType('processMethod')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>审核状态:</label>
<select name="auditStatus" th:with="type=${@dict.getType('auditStatus')}">
@ -158,7 +168,7 @@
{title: '描述',field: 'describe',width:80,
},
{ title: '品牌',field: 'brand', sortable: true,width: 70,},
{title: '半成品类型',field: 'processMethod',width: 120,
{title: '加工方式',field: 'processMethod',width: 120,
formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);;
}
},
@ -172,6 +182,7 @@
formatter: function(value, row, index) {return '<span style="color: red;">' + (value ? value : "-") + '</span>';}
},
{ title: '申请时间',field: 'applyTime',sortable: true,width: 100,},
{ title: '录入时间',field: 'createTime',sortable: true,width: 100,},
{title: '上次更新时间',field: 'updateTime',width: 120,},
{ title: '当前状态',field: 'taskName',align: 'center',width: 120,
formatter: function(value, row, index) {

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

@ -65,6 +65,9 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="erp:developModifyOrder:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-warning" onclick="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" style="white-space:nowrap"></table>
@ -297,6 +300,61 @@
$.modal.open("添加领料单",url);
}
//开发修改单导出
function exportExcel(formId) {
// $.table.set();
var developOrderCodeData = [];
var selections = $("#bootstrap-table").bootstrapTable("getSelections");
if(selections.length === 0){
$.modal.confirm("确定导出所有开发修改单吗?", function() {
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
var params = $("#bootstrap-table").bootstrapTable('getOptions');
var dataParam = $("#" + currentId).serializeArray();
dataParam.push({ "name": "orderByColumn", "value": params.sortName });
dataParam.push({ "name": "isAsc", "value": params.sortOrder });
$.modal.loading("正在导出数据,请稍后...");
$.post(prefix + '/exportAll', dataParam, function(result) {
if (result.code == web_status.SUCCESS) {
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
} else if (result.code == web_status.WARNING) {
$.modal.alertWarning(result.msg)
} else {
$.modal.alertError(result.msg);
}
$.modal.closeLoading();
});
});
}else {
$.modal.confirm("确定导出选中的所有开发修改单吗?", function () {
//·拼接单号
for(let i=0;i<selections.length;i++){
developOrderCodeData.push(selections[i].developOrderCode);
}
var developOrderCodes = JSON.stringify(developOrderCodeData);
// console.log(bomNos);
$.modal.loading("正在导出数据,请稍后...");
var config = {
url: prefix + '/export',
type: "post",
dataType: "json",
contentType: "application/json;charset=utf-8",
data: developOrderCodes,
success: function(result) {
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
$.modal.alertSuccess("导出成功!")
$.modal.closeLoading();
},
error: function (result){
$.modal.alertError(result.msg);
}
};
$.ajax(config)
});
}
};
//查询工程员
function engineer(){
$.ajax({

12
ruoyi-admin/src/main/resources/templates/system/model/add.html

@ -32,6 +32,12 @@
<input name="differences" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label is-required">工程员:</label>
<div class="col-sm-7">
<input name="engineer" id="engineer_add" class="form-control m-b" readonly required />
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">备注:</label>
<div class="col-sm-7">
@ -64,6 +70,9 @@
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
<script th:inline="javascript">
var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var userName = [[${@permission.getPrincipalProperty('userName')}]];
new Vue({
el: '#app',
data: function() {
@ -139,6 +148,9 @@
}
}
//添加工程员
$("#engineer_add").val(loginName);
</script>
</body>
</html>

188
ruoyi-admin/src/main/resources/templates/system/model/detail.html

@ -0,0 +1,188 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('产品型号管理详情')" />
<th:block th:include="include :: select2-css" />
<link th:href="@{/ajax/libs/element-ui/element-ui.css}" rel="stylesheet"/>
</head>
<body class="white-bg">
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-model-edit" th:object="${sysProductModel}">
<input name="pid" th:field="*{pid}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">设备型号:</label>
<div class="col-sm-8">
<input name="equipModel" th:field="*{equipModel}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">设备名称:</label>
<div class="col-sm-8">
<input name="equipName" th:field="*{equipName}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">规格说明:</label>
<div class="col-sm-8">
<input name="specification" th:field="*{specification}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">差异说明:</label>
<div class="col-sm-8">
<input name="differences" th:field="*{differences}" class="form-control" type="text" readonly>
</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" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">照片:</label>
<div class="col-sm-8">
<el-upload
:action="fileUploadUrl"
:on-success="uploadSuccess"
:on-remove="uploadRemove"
:file-list="fileList"
list-type="picture"
accept=".jpg,.png"
multiple>
<!-- <el-button size="small" type="primary">点击上传</el-button>-->
<!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,第一张图片为主图</div>-->
</el-upload>
</div>
<input id="photoAttachId" name = "photoAttachId" hidden th:field="*{photoAttachId}">
<input id="fileIdStr" type="text" name="fileIdStr" th:field="*{fileIdStr}" hidden>
<input id="removeFileIdStr" type="text" name="removeFileIdStr" hidden>
</div>
</form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>
<script th:src="@{/ajax/libs/vue/vue.js}"></script>
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
<script th:inline="javascript">
new Vue({
el: '#app',
data: function() {
return {
fileList: [],
fileUploadUrl: ctx + "common/uploadSingleFile",
fileDeleteUrl: ctx + "common/deleteFile",
getListByAttachIdUrl: ctx + "system/attach/file/getListByAttachId",
fileIdList:[],
removeFileIdList:[],
}
},
mounted() {
// 控制下拉框选中
// var materialType = $("#materialType").val();
// $("#selectMaterialType").val(materialType).trigger("change");
var that = this;
// 页面渲染完成,可以执行需要的操作
console.log('页面已渲染完成');
console.log($("#id").val());
console.log($("#photoAttachId").val());
var attachId = $("#photoAttachId").val();
if(attachId){
$.ajax({
type: "get",
url: that.getListByAttachIdUrl,
data: {attachId:attachId},
cache: false,
async: false, // 设置成同步
dataType: 'json',
success: function(result) {
if (result.code == web_status.SUCCESS) {
result.data.forEach((item) => {
that.fileIdList.push(item.id);
that.fileList.push({name: item.name, url: item.url, attachFileId: item.id,isBind:true});
});
} else {
$.modal.msgError(result.msg);
}
},
error: function(error) {
$.modal.msgError("获取附件失败。");
}
});
}
},
methods: {
uploadSuccess(response, file, fileList) {
console.log(response);
if(response.code == web_status.SUCCESS){
var attachFileId = response.data.id;
file.attachFileId = attachFileId;
file.isBind = false;
this.fileIdList.push(attachFileId);
$("#fileIdStr").val(this.fileIdList.join(";"));
$.modal.msgSuccess("上传成功");
}else{
$.modal.alertError(response.msg);
}
},
uploadRemove(file, fileList) {
console.log(file, fileList);
var attachFileId = file.attachFileId;
var isBind = file.isBind;
if(isBind==false){
$.ajax({
type: "get",
url: this.fileDeleteUrl,
data: {id:attachFileId},
cache: false,
async: false, // 设置成同步
dataType: 'json',
success: function(result) {
if (result.code == web_status.SUCCESS) {
var index = this.fileIdList.indexOf(attachFileId);
if(index!=-1){
this.fileIdList.splice(index,1);
$("#fileIdStr").val(this.fileIdList.join(";"));
}
$.modal.msgSuccess("删除附件成功。");
} else {
$.modal.alertError(result.msg);
}
},
error: function(error) {
$.modal.alertError("删除附件失败。");
}
});
}else{
var index = this.fileIdList.indexOf(attachFileId);
if(index!=-1){
this.fileIdList.splice(index,1);
$("#fileIdStr").val(this.fileIdList.join(";"));
// 保存的时候才删除
this.removeFileIdList.push(attachFileId);
$("#removeFileIdStr").val(this.removeFileIdList.join(";"));
}
}
},
}
})
var prefix = ctx + "system/model";
$("#form-model-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-model-edit').serialize());
}
}
</script>
</body>
</html>

110
ruoyi-admin/src/main/resources/templates/system/model/model.html

@ -30,16 +30,18 @@
<label>差异说明:</label>
<input type="text" name="differences"/>
</li>
<li>
<label>工程员:</label>
<select name="engineer">
<option value="">所有</option>
</select>
</li>
<li class="select-time">
<label>录入时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
</li>
<li>
<label>工程员:</label>
<input type="text" name="engineer"/>
</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>
@ -53,7 +55,7 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:model:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:model:export">
<a class="btn btn-warning" onclick="exportExcel()" shiro:hasPermission="system:model:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
@ -65,11 +67,14 @@
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:model:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:model:remove')}]];
var cancelFlag = [[${@permission.hasPermi('system:model:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('system:model:restore')}]];
var userName = [[${@permission.getPrincipalProperty('userName')}]];
var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var prefix = ctx + "system/model";
$(function() {
engineer();
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
@ -101,11 +106,7 @@
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.pid + '\')"><i class="fa fa-edit"></i>编辑</a> ');
if(row.useStatus == '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> ');
}
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="detail(\'' + row.pid + '\')"><i class="fa fa-edit"></i>详情</a> ');
return actions.join('');
}
}
@ -113,6 +114,89 @@
};
$.table.init(options);
});
//产品型号管理详情
function detail(pid){
var url = prefix + '/detail/' + pid;
$.modal.open("产品型号管理详情", url);
}
//导出
function exportExcel(formId) {
// $.table.set();
var pcodeData = [];
var selections = $("#bootstrap-table").bootstrapTable("getSelections");
if(selections.length === 0){
$.modal.confirm("确定导出所有产品型号管理吗?", function() {
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
var params = $("#bootstrap-table").bootstrapTable('getOptions');
var dataParam = $("#" + currentId).serializeArray();
dataParam.push({ "name": "orderByColumn", "value": params.sortName });
dataParam.push({ "name": "isAsc", "value": params.sortOrder });
$.modal.loading("正在导出数据,请稍后...");
$.post(prefix + '/exportAll', dataParam, function(result) {
if (result.code == web_status.SUCCESS) {
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
} else if (result.code == web_status.WARNING) {
$.modal.alertWarning(result.msg)
} else {
$.modal.alertError(result.msg);
}
$.modal.closeLoading();
});
});
}else {
$.modal.confirm("确定导出选中的所有产品型号管理吗?", function () {
//·拼接单号
for(let i=0;i<selections.length;i++){
pcodeData.push(selections[i].pcode);
}
var pcodes = JSON.stringify(pcodeData);
// console.log(bomNos);
$.modal.loading("正在导出数据,请稍后...");
var config = {
url: prefix + '/export',
type: "post",
dataType: "json",
contentType: "application/json;charset=utf-8",
data: pcodes,
success: function(result) {
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
$.modal.alertSuccess("导出成功!")
$.modal.closeLoading();
},
error: function (result){
$.modal.alertError(result.msg);
}
};
$.ajax(config)
});
}
};
//查询工程员
function engineer(){
$.ajax({
url: prefix + '/getEngineerList',
type: 'get',
success: function (res) {
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("select[name='engineer']").append(
"<option value='" + usertData[i].loginName + "'>" + usertData[i].userName + "</option>");
}
} else {
$.modal.msgError(res.msg);
}
}
});
}
</script>
</body>
</html>
Loading…
Cancel
Save