Browse Source

230629:入库检验通知单拆分、rf页面显示

erp、
ling li 1 year ago
parent
commit
c689508149
  1. 135
      ruoyi-admin/src/main/java/com/ruoyi/rfMsg/controller/VnaRawDataController.java
  2. 133
      ruoyi-admin/src/main/java/com/ruoyi/rfMsg/domain/VnaRawData.java
  3. 36
      ruoyi-admin/src/main/java/com/ruoyi/rfMsg/domain/VnaRawDataKeyValue.java
  4. 62
      ruoyi-admin/src/main/java/com/ruoyi/rfMsg/mapper/VnaRawDataMapper.java
  5. 61
      ruoyi-admin/src/main/java/com/ruoyi/rfMsg/service/IVnaRawDataService.java
  6. 94
      ruoyi-admin/src/main/java/com/ruoyi/rfMsg/service/impl/VnaRawDataServiceImpl.java
  7. 132
      ruoyi-admin/src/main/java/com/ruoyi/storehouse/controller/WarehousingInspectionNoticeController.java
  8. 14
      ruoyi-admin/src/main/java/com/ruoyi/storehouse/mapper/WarehousingInspectionNoticeMapper.java
  9. 19
      ruoyi-admin/src/main/java/com/ruoyi/storehouse/service/IWarehousingInspectionNoticeService.java
  10. 29
      ruoyi-admin/src/main/java/com/ruoyi/storehouse/service/impl/WarehousingInspectionNoticeServiceImpl.java
  11. 2
      ruoyi-admin/src/main/resources/application.yml
  12. 85
      ruoyi-admin/src/main/resources/mapper/rfMsg/VnaRawDataMapper.xml
  13. 20
      ruoyi-admin/src/main/resources/mapper/storehouse/WarehousingInspectionNoticeMapper.xml
  14. 2
      ruoyi-admin/src/main/resources/templates/outsource/materialRequisitionOutsource/add.html
  15. 2
      ruoyi-admin/src/main/resources/templates/outsource/materialRequisitionOutsource/edit.html
  16. 6
      ruoyi-admin/src/main/resources/templates/outsource/materialRequisitionOutsource/materialRequisitionOutsource.html
  17. 179
      ruoyi-admin/src/main/resources/templates/outsource/outsourceInspectionNotice/add.html
  18. 205
      ruoyi-admin/src/main/resources/templates/outsource/outsourceInspectionNotice/edit.html
  19. 36
      ruoyi-admin/src/main/resources/templates/outsource/outsourceOrderInfo/add.html
  20. 40
      ruoyi-admin/src/main/resources/templates/outsource/outsourceOrderInfo/edit.html
  21. 69
      ruoyi-admin/src/main/resources/templates/rfMsg/vnaRawData/add.html
  22. 70
      ruoyi-admin/src/main/resources/templates/rfMsg/vnaRawData/edit.html
  23. 171
      ruoyi-admin/src/main/resources/templates/rfMsg/vnaRawData/vnaRawData.html
  24. 2
      ruoyi-admin/src/main/resources/templates/storehouse/warehousingInspectionNotice/add.html
  25. 548
      ruoyi-admin/src/main/resources/templates/storehouse/warehousingInspectionNoticeFL/add.html
  26. 535
      ruoyi-admin/src/main/resources/templates/storehouse/warehousingInspectionNoticeFL/edit.html
  27. 394
      ruoyi-admin/src/main/resources/templates/storehouse/warehousingInspectionNoticeFL/warehousingInspectionNoticeFL.html
  28. 547
      ruoyi-admin/src/main/resources/templates/storehouse/warehousingInspectionNoticeYL/add.html
  29. 534
      ruoyi-admin/src/main/resources/templates/storehouse/warehousingInspectionNoticeYL/edit.html
  30. 394
      ruoyi-admin/src/main/resources/templates/storehouse/warehousingInspectionNoticeYL/warehousingInspectionNoticeYL.html
  31. 81
      ruoyi-admin/src/main/resources/templates/system/bom/add.html
  32. 86
      ruoyi-admin/src/main/resources/templates/system/bom/edit.html
  33. 51
      ruoyi-admin/src/main/resources/templates/system/procedure/edit.html
  34. 2
      ruoyi-admin/target/classes/application.yml
  35. BIN
      ruoyi-admin/target/classes/com/ruoyi/storehouse/controller/WarehousingInspectionNoticeController.class
  36. BIN
      ruoyi-admin/target/classes/com/ruoyi/storehouse/mapper/WarehousingInspectionNoticeMapper.class
  37. BIN
      ruoyi-admin/target/classes/com/ruoyi/storehouse/service/IWarehousingInspectionNoticeService.class
  38. BIN
      ruoyi-admin/target/classes/com/ruoyi/storehouse/service/impl/WarehousingInspectionNoticeServiceImpl.class
  39. 20
      ruoyi-admin/target/classes/mapper/storehouse/WarehousingInspectionNoticeMapper.xml
  40. 2
      ruoyi-admin/target/classes/templates/storehouse/warehousingInspectionNotice/add.html
  41. 81
      ruoyi-admin/target/classes/templates/system/bom/add.html
  42. 86
      ruoyi-admin/target/classes/templates/system/bom/edit.html
  43. 51
      ruoyi-admin/target/classes/templates/system/procedure/edit.html

135
ruoyi-admin/src/main/java/com/ruoyi/rfMsg/controller/VnaRawDataController.java

@ -0,0 +1,135 @@
package com.ruoyi.rfMsg.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.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.rfMsg.domain.VnaRawData;
import com.ruoyi.rfMsg.service.IVnaRawDataService;
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.*;
import java.util.List;
/**
* rf测试历史结果Controller
*
* @author ruoyi
* @date 2023-06-28
*/
@Controller
@RequestMapping("/rfMsg/vnaRawData")
public class VnaRawDataController extends BaseController
{
private String prefix = "rfMsg/vnaRawData";
@Autowired
private IVnaRawDataService vnaRawDataService;
@RequiresPermissions("rfMsg:vnaRawData:view")
@GetMapping()
public String vnaRawData()
{
return prefix + "/vnaRawData";
}
/**
* 查询rf测试历史结果列表
*/
@RequiresPermissions("rfMsg:vnaRawData:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(VnaRawData vnaRawData)
{
startPage();
List<VnaRawData> list = vnaRawDataService.selectVnaRawDataList(vnaRawData);
return getDataTable(list);
}
@PostMapping("/getDataById/{id}")
@ResponseBody
public String getDataById(@PathVariable("id") Long id)
{
startPage();
VnaRawData vnaRawData = vnaRawDataService.selectVnaRawDataById(id);
String frequency = vnaRawData.getFrequency();
// JSONObject jsonObject = (JSONObject) JSONValue.parse(frequency.toJs());
System.out.println(frequency);
return frequency;
}
/**
* 导出rf测试历史结果列表
*/
@RequiresPermissions("rfMsg:vnaRawData:export")
@Log(title = "rf测试历史结果", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(VnaRawData vnaRawData)
{
List<VnaRawData> list = vnaRawDataService.selectVnaRawDataList(vnaRawData);
ExcelUtil<VnaRawData> util = new ExcelUtil<VnaRawData>(VnaRawData.class);
return util.exportExcel(list, "rf测试历史结果数据");
}
/**
* 新增rf测试历史结果
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存rf测试历史结果
*/
@RequiresPermissions("rfMsg:vnaRawData:add")
@Log(title = "rf测试历史结果", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(VnaRawData vnaRawData)
{
return toAjax(vnaRawDataService.insertVnaRawData(vnaRawData));
}
/**
* 修改rf测试历史结果
*/
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Long id, ModelMap mmap)
{
VnaRawData vnaRawData = vnaRawDataService.selectVnaRawDataById(id);
mmap.put("vnaRawData", vnaRawData);
return prefix + "/edit";
}
/**
* 修改保存rf测试历史结果
*/
@RequiresPermissions("rfMsg:vnaRawData:edit")
@Log(title = "rf测试历史结果", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(VnaRawData vnaRawData)
{
return toAjax(vnaRawDataService.updateVnaRawData(vnaRawData));
}
/**
* 删除rf测试历史结果
*/
@RequiresPermissions("rfMsg:vnaRawData:remove")
@Log(title = "rf测试历史结果", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(vnaRawDataService.deleteVnaRawDataByIds(ids));
}
}

133
ruoyi-admin/src/main/java/com/ruoyi/rfMsg/domain/VnaRawData.java

@ -0,0 +1,133 @@
package com.ruoyi.rfMsg.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;
/**
* rf测试历史结果对象 vna_raw_data
*
* @author ruoyi
* @date 2023-06-28
*/
public class VnaRawData extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** id */
private Long id;
/** 时间 */
@Excel(name = "时间")
private String date;
/** 序列号(设备) */
@Excel(name = "序列号", readConverterExp = "设=备")
private String serialNumber;
/** 操作人 */
@Excel(name = "操作人")
private String operator;
/** 是否通过,0为NG,1为PASS */
@Excel(name = "是否通过,0为NG,1为PASS")
private Integer status;
/** 端口号,例:PORT1 */
@Excel(name = "端口号,例:PORT1")
private String port;
/** 频率 */
private String frequency;
/** 数值,必须对应频率 */
private String value;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setDate(String date)
{
this.date = date;
}
public String getDate()
{
return date;
}
public void setSerialNumber(String serialNumber)
{
this.serialNumber = serialNumber;
}
public String getSerialNumber()
{
return serialNumber;
}
public void setOperator(String operator)
{
this.operator = operator;
}
public String getOperator()
{
return operator;
}
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
public void setPort(String port)
{
this.port = port;
}
public String getPort()
{
return port;
}
public void setFrequency(String frequency)
{
this.frequency = frequency;
}
public String getFrequency()
{
return frequency;
}
public void setValue(String value)
{
this.value = value;
}
public String getValue()
{
return value;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("date", getDate())
.append("serialNumber", getSerialNumber())
.append("operator", getOperator())
.append("status", getStatus())
.append("port", getPort())
.append("frequency", getFrequency())
.append("value", getValue())
.toString();
}
}

36
ruoyi-admin/src/main/java/com/ruoyi/rfMsg/domain/VnaRawDataKeyValue.java

@ -0,0 +1,36 @@
package com.ruoyi.rfMsg.domain;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
public class VnaRawDataKeyValue extends BaseEntity {
private static final long serialVersionUID = 1L;
private String key;
private String value;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
@Override
public String toString() {
return new ToStringBuilder(this)
.append("key", key)
.append("value", value)
.toString();
}
}

62
ruoyi-admin/src/main/java/com/ruoyi/rfMsg/mapper/VnaRawDataMapper.java

@ -0,0 +1,62 @@
package com.ruoyi.rfMsg.mapper;
import com.ruoyi.rfMsg.domain.VnaRawData;
import java.util.List;
/**
* rf测试历史结果Mapper接口
*
* @author ruoyi
* @date 2023-06-28
*/
public interface VnaRawDataMapper
{
/**
* 查询rf测试历史结果
*
* @param id rf测试历史结果ID
* @return rf测试历史结果
*/
public VnaRawData selectVnaRawDataById(Long id);
/**
* 查询rf测试历史结果列表
*
* @param vnaRawData rf测试历史结果
* @return rf测试历史结果集合
*/
public List<VnaRawData> selectVnaRawDataList(VnaRawData vnaRawData);
/**
* 新增rf测试历史结果
*
* @param vnaRawData rf测试历史结果
* @return 结果
*/
public int insertVnaRawData(VnaRawData vnaRawData);
/**
* 修改rf测试历史结果
*
* @param vnaRawData rf测试历史结果
* @return 结果
*/
public int updateVnaRawData(VnaRawData vnaRawData);
/**
* 删除rf测试历史结果
*
* @param id rf测试历史结果ID
* @return 结果
*/
public int deleteVnaRawDataById(Long id);
/**
* 批量删除rf测试历史结果
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteVnaRawDataByIds(String[] ids);
}

61
ruoyi-admin/src/main/java/com/ruoyi/rfMsg/service/IVnaRawDataService.java

@ -0,0 +1,61 @@
package com.ruoyi.rfMsg.service;
import java.util.List;
import com.ruoyi.rfMsg.domain.VnaRawData;
/**
* rf测试历史结果Service接口
*
* @author ruoyi
* @date 2023-06-28
*/
public interface IVnaRawDataService
{
/**
* 查询rf测试历史结果
*
* @param id rf测试历史结果ID
* @return rf测试历史结果
*/
public VnaRawData selectVnaRawDataById(Long id);
/**
* 查询rf测试历史结果列表
*
* @param vnaRawData rf测试历史结果
* @return rf测试历史结果集合
*/
public List<VnaRawData> selectVnaRawDataList(VnaRawData vnaRawData);
/**
* 新增rf测试历史结果
*
* @param vnaRawData rf测试历史结果
* @return 结果
*/
public int insertVnaRawData(VnaRawData vnaRawData);
/**
* 修改rf测试历史结果
*
* @param vnaRawData rf测试历史结果
* @return 结果
*/
public int updateVnaRawData(VnaRawData vnaRawData);
/**
* 批量删除rf测试历史结果
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteVnaRawDataByIds(String ids);
/**
* 删除rf测试历史结果信息
*
* @param id rf测试历史结果ID
* @return 结果
*/
public int deleteVnaRawDataById(Long id);
}

94
ruoyi-admin/src/main/java/com/ruoyi/rfMsg/service/impl/VnaRawDataServiceImpl.java

@ -0,0 +1,94 @@
package com.ruoyi.rfMsg.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.rfMsg.mapper.VnaRawDataMapper;
import com.ruoyi.rfMsg.domain.VnaRawData;
import com.ruoyi.rfMsg.service.IVnaRawDataService;
import com.ruoyi.common.core.text.Convert;
/**
* rf测试历史结果Service业务层处理
*
* @author ruoyi
* @date 2023-06-28
*/
@Service
public class VnaRawDataServiceImpl implements IVnaRawDataService
{
@Autowired
private VnaRawDataMapper vnaRawDataMapper;
/**
* 查询rf测试历史结果
*
* @param id rf测试历史结果ID
* @return rf测试历史结果
*/
@Override
public VnaRawData selectVnaRawDataById(Long id)
{
return vnaRawDataMapper.selectVnaRawDataById(id);
}
/**
* 查询rf测试历史结果列表
*
* @param vnaRawData rf测试历史结果
* @return rf测试历史结果
*/
@Override
public List<VnaRawData> selectVnaRawDataList(VnaRawData vnaRawData)
{
return vnaRawDataMapper.selectVnaRawDataList(vnaRawData);
}
/**
* 新增rf测试历史结果
*
* @param vnaRawData rf测试历史结果
* @return 结果
*/
@Override
public int insertVnaRawData(VnaRawData vnaRawData)
{
return vnaRawDataMapper.insertVnaRawData(vnaRawData);
}
/**
* 修改rf测试历史结果
*
* @param vnaRawData rf测试历史结果
* @return 结果
*/
@Override
public int updateVnaRawData(VnaRawData vnaRawData)
{
return vnaRawDataMapper.updateVnaRawData(vnaRawData);
}
/**
* 删除rf测试历史结果对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteVnaRawDataByIds(String ids)
{
return vnaRawDataMapper.deleteVnaRawDataByIds(Convert.toStrArray(ids));
}
/**
* 删除rf测试历史结果信息
*
* @param id rf测试历史结果ID
* @return 结果
*/
@Override
public int deleteVnaRawDataById(Long id)
{
return vnaRawDataMapper.deleteVnaRawDataById(id);
}
}

132
ruoyi-admin/src/main/java/com/ruoyi/storehouse/controller/WarehousingInspectionNoticeController.java

@ -60,18 +60,40 @@ import static com.ruoyi.common.config.datasource.DynamicDataSourceContextHolder.
@RequestMapping("/storehouse/warehousingInspectionNotice")
public class WarehousingInspectionNoticeController extends BaseController
{
private String prefix = "storehouse/warehousingInspectionNotice";
private String prefixYL = "storehouse/warehousingInspectionNoticeYL";
private String prefixFL = "storehouse/warehousingInspectionNoticeFL";
@Autowired
private IWarehousingInspectionNoticeService warehousingInspectionNoticeService;
@Autowired
private IWarehousingInspectionDetailService warehousingInspectionDetailService;
@RequiresPermissions("storehouse:warehousingInspectionNotice:view")
@GetMapping()
public String warehousingInspectionNotice()
// @RequiresPermissions("storehouse:warehousingInspectionNotice:view")
// @GetMapping()
// public String warehousingInspectionNotice()
// {
// return prefix + "/warehousingInspectionNotice";
// }
/**
* 入库检验通知单--原料
* @return
*/
@RequiresPermissions("storehouse:warehousingInspectionNotice:viewYL")
@GetMapping("/viewYL")
public String warehousingInspectionNoticeYL()
{
return prefixYL + "/warehousingInspectionNoticeYL";
}
/**
* 入库检验通知单--辅料
* @return
*/
@RequiresPermissions("storehouse:warehousingInspectionNotice:viewFL")
@GetMapping("/viewFL")
public String warehousingInspectionNoticeFL()
{
return prefix + "/warehousingInspectionNotice";
return prefixFL + "/warehousingInspectionNoticeFL";
}
/**
@ -86,6 +108,30 @@ public class WarehousingInspectionNoticeController extends BaseController
List<WarehousingInspectionNotice> list = warehousingInspectionNoticeService.selectWarehousingInspectionNoticeList(warehousingInspectionNotice);
return getDataTable(list);
}
/**
* 查询入库检验通知列表--原料
*/
@RequiresPermissions("storehouse:warehousingInspectionNotice:listYL")
@PostMapping("/listYL")
@ResponseBody
public TableDataInfo listYL(WarehousingInspectionNotice warehousingInspectionNotice)
{
startPage();
List<WarehousingInspectionNotice> list = warehousingInspectionNoticeService.selectWarehousingInspectionNoticeYLList(warehousingInspectionNotice);
return getDataTable(list);
}
/**
* 查询入库检验通知列表--辅料
*/
@RequiresPermissions("storehouse:warehousingInspectionNotice:listFL")
@PostMapping("/listFL")
@ResponseBody
public TableDataInfo listFL(WarehousingInspectionNotice warehousingInspectionNotice)
{
startPage();
List<WarehousingInspectionNotice> list = warehousingInspectionNoticeService.selectWarehousingInspectionNoticeFLList(warehousingInspectionNotice);
return getDataTable(list);
}
/**
* 导出入库检验通知列表
@ -102,12 +148,21 @@ public class WarehousingInspectionNoticeController extends BaseController
}
/**
* 新增入库检验通知
* 新增入库检验通知--原料
*/
@GetMapping("/add")
public String add()
@GetMapping("/addYL")
public String addYL()
{
return prefix + "/add";
return prefixYL + "/add";
}
/**
* 新增入库检验通知--辅料
*/
@GetMapping("/addFL")
public String addFL()
{
return prefixFL + "/add";
}
/**
@ -123,14 +178,24 @@ public class WarehousingInspectionNoticeController extends BaseController
}
/**
* 修改入库检验通知
* 修改入库检验通知--原料
*/
@GetMapping("/edit/{warehousingInspectionNoticeId}")
public String edit(@PathVariable("warehousingInspectionNoticeId") Long warehousingInspectionNoticeId, ModelMap mmap)
@GetMapping("/editYL/{warehousingInspectionNoticeId}")
public String editYL(@PathVariable("warehousingInspectionNoticeId") Long warehousingInspectionNoticeId, ModelMap mmap)
{
WarehousingInspectionNotice warehousingInspectionNotice = warehousingInspectionNoticeService.selectWarehousingInspectionNoticeById(warehousingInspectionNoticeId);
mmap.put("warehousingInspectionNotice", warehousingInspectionNotice);
return prefix + "/edit";
return prefixYL + "/edit";
}
/**
* 修改入库检验通知--辅料
*/
@GetMapping("/editFL/{warehousingInspectionNoticeId}")
public String editFL(@PathVariable("warehousingInspectionNoticeId") Long warehousingInspectionNoticeId, ModelMap mmap)
{
WarehousingInspectionNotice warehousingInspectionNotice = warehousingInspectionNoticeService.selectWarehousingInspectionNoticeById(warehousingInspectionNoticeId);
mmap.put("warehousingInspectionNotice", warehousingInspectionNotice);
return prefixFL + "/edit";
}
/**
@ -157,13 +222,44 @@ public class WarehousingInspectionNoticeController extends BaseController
return toAjax(warehousingInspectionNoticeService.deleteWarehousingInspectionNoticeByIds(ids));
}
@RequiresPermissions("storehouse:warehousingInspectionNotice:remove")
@Log(title = "入库检验通知", businessType = BusinessType.DELETE)
@RequestMapping( "/removeSelected")
@ResponseBody
public String removeSelected(@RequestParam(value = "ids") String ids) {
System.out.println(ids);
String[] idsStr = ids.split(",");
for (int i = 0; i< idsStr.length; i++) {
WarehousingInspectionNotice warehousingInspectionNotice = warehousingInspectionNoticeService.selectWarehousingInspectionNoticeById(Long.valueOf(idsStr[i]));
WarehousingInspectionDetail warehousingInspectionDetail = new WarehousingInspectionDetail();
warehousingInspectionDetail.setInNoticeNumber(warehousingInspectionNotice.getInNoticeNumber());
List<WarehousingInspectionDetail> list = warehousingInspectionDetailService.selectWarehousingInspectionDetailList(warehousingInspectionDetail);
if (list.size()>0) {
for (int j=0;j<list.size();j++) {
warehousingInspectionDetailService.deleteWarehousingInspectionDetailById(list.get(j).getWarehousingInspectionDetailId());
}
}
}
warehousingInspectionNoticeService.deleteWarehousingInspectionNoticeByIds(ids);
return "操作成功!";
}
/**
* 获取订单id--原料
*/
@PostMapping("/getIdYL")
@ResponseBody
public Result getIdYL() throws Exception {
return Result.getSuccessResult(warehousingInspectionNoticeService.getIdYL());
}
/**
* 获取订单id
* 获取订单id--辅料
*/
@PostMapping("/getId")
@PostMapping("/getIdFL")
@ResponseBody
public Result getId() throws Exception {
return Result.getSuccessResult(warehousingInspectionNoticeService.getId());
public Result getIdFL() throws Exception {
return Result.getSuccessResult(warehousingInspectionNoticeService.getIdFL());
}
@PostMapping("/upload")
@ -174,7 +270,7 @@ public class WarehousingInspectionNoticeController extends BaseController
{
// 上传文件路径
String filePath = RuoYiConfig.getUploadPath();
String modalName = prefix.substring(prefix.lastIndexOf("/")+1);
String modalName = prefixYL.substring(prefixYL.lastIndexOf("/")+1);
String filePathNow = filePath + "/" + modalName;
// 上传并返回新文件名称
String fileName = FileUploadUtils.upload(filePathNow, file);

14
ruoyi-admin/src/main/java/com/ruoyi/storehouse/mapper/WarehousingInspectionNoticeMapper.java

@ -27,6 +27,20 @@ public interface WarehousingInspectionNoticeMapper
* @return 入库检验通知集合
*/
public List<WarehousingInspectionNotice> selectWarehousingInspectionNoticeList(WarehousingInspectionNotice warehousingInspectionNotice);
/**
* 查询入库检验通知列表
*
* @param warehousingInspectionNotice 入库检验通知--原料
* @return 入库检验通知集合
*/
public List<WarehousingInspectionNotice> selectWarehousingInspectionNoticeYLList(WarehousingInspectionNotice warehousingInspectionNotice);
/**
* 查询入库检验通知列表
*
* @param warehousingInspectionNotice 入库检验通知--辅料
* @return 入库检验通知集合
*/
public List<WarehousingInspectionNotice> selectWarehousingInspectionNoticeFLList(WarehousingInspectionNotice warehousingInspectionNotice);
/**
* 新增入库检验通知

19
ruoyi-admin/src/main/java/com/ruoyi/storehouse/service/IWarehousingInspectionNoticeService.java

@ -28,6 +28,22 @@ public interface IWarehousingInspectionNoticeService
*/
public List<WarehousingInspectionNotice> selectWarehousingInspectionNoticeList(WarehousingInspectionNotice warehousingInspectionNotice);
/**
* 查询入库检验通知列表
*
* @param warehousingInspectionNotice 入库检验通知--原料
* @return 入库检验通知集合
*/
public List<WarehousingInspectionNotice> selectWarehousingInspectionNoticeYLList(WarehousingInspectionNotice warehousingInspectionNotice);
/**
* 查询入库检验通知列表
*
* @param warehousingInspectionNotice 入库检验通知--辅料
* @return 入库检验通知集合
*/
public List<WarehousingInspectionNotice> selectWarehousingInspectionNoticeFLList(WarehousingInspectionNotice warehousingInspectionNotice);
/**
* 新增入库检验通知
*
@ -60,5 +76,6 @@ public interface IWarehousingInspectionNoticeService
*/
public int deleteWarehousingInspectionNoticeById(Long warehousingInspectionNoticeId);
public String getId();
public String getIdYL();
public String getIdFL();
}

29
ruoyi-admin/src/main/java/com/ruoyi/storehouse/service/impl/WarehousingInspectionNoticeServiceImpl.java

@ -45,6 +45,28 @@ public class WarehousingInspectionNoticeServiceImpl implements IWarehousingInspe
{
return warehousingInspectionNoticeMapper.selectWarehousingInspectionNoticeList(warehousingInspectionNotice);
}
/**
* 查询入库检验通知列表
*
* @param warehousingInspectionNotice 入库检验通知--原料
* @return 入库检验通知
*/
@Override
public List<WarehousingInspectionNotice> selectWarehousingInspectionNoticeYLList(WarehousingInspectionNotice warehousingInspectionNotice)
{
return warehousingInspectionNoticeMapper.selectWarehousingInspectionNoticeYLList(warehousingInspectionNotice);
}
/**
* 查询入库检验通知列表
*
* @param warehousingInspectionNotice 入库检验通知--辅料
* @return 入库检验通知
*/
@Override
public List<WarehousingInspectionNotice> selectWarehousingInspectionNoticeFLList(WarehousingInspectionNotice warehousingInspectionNotice)
{
return warehousingInspectionNoticeMapper.selectWarehousingInspectionNoticeFLList(warehousingInspectionNotice);
}
/**
* 新增入库检验通知
@ -95,7 +117,12 @@ public class WarehousingInspectionNoticeServiceImpl implements IWarehousingInspe
}
@Override
public String getId() {
public String getIdYL() {
String time = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(System.currentTimeMillis());
return "IQC" + time;
}
@Override
public String getIdFL() {
String time = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(System.currentTimeMillis());
return "PQCFL" + time;
}

2
ruoyi-admin/src/main/resources/application.yml

@ -9,7 +9,7 @@ ruoyi:
# 实例演示开关
demoEnabled: false
# 文件路径 示例( Windows配置c:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
profile: D:/ruoyi/uploadPath
profile: C:/ruoyi/uploadPath
# 获取ip地址开关
addressEnabled: false

85
ruoyi-admin/src/main/resources/mapper/rfMsg/VnaRawDataMapper.xml

@ -0,0 +1,85 @@
<?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.rfMsg.mapper.VnaRawDataMapper">
<resultMap type="VnaRawData" id="VnaRawDataResult">
<result property="id" column="id" />
<result property="date" column="Date" />
<result property="serialNumber" column="Serial_Number" />
<result property="operator" column="Operator" />
<result property="status" column="Status" />
<result property="port" column="Port" />
<result property="frequency" column="Frequency" />
<result property="value" column="Value" />
</resultMap>
<sql id="selectVnaRawDataVo">
select id, Date, Serial_Number, Operator, Status, Port, Frequency, Value from vna_raw_data
</sql>
<select id="selectVnaRawDataList" parameterType="VnaRawData" resultMap="VnaRawDataResult">
<include refid="selectVnaRawDataVo"/>
<where>
<if test="params.beginDate != null and params.beginDate != '' and params.endDate != null and params.endDate != ''"> and Date between #{params.beginDate} and #{params.endDate}</if>
<if test="serialNumber != null and serialNumber != ''"> and Serial_Number like concat('%', #{serialNumber}, '%')</if>
<if test="operator != null and operator != ''"> and Operator like concat('%', #{operator}, '%')</if>
<if test="status != null "> and Status = #{status}</if>
<if test="port != null and port != ''"> and Port = #{port}</if>
</where>
</select>
<select id="selectVnaRawDataById" parameterType="Long" resultMap="VnaRawDataResult">
<include refid="selectVnaRawDataVo"/>
where id = #{id}
</select>
<insert id="insertVnaRawData" parameterType="VnaRawData" useGeneratedKeys="true" keyProperty="id">
insert into vna_raw_data
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="date != null and date != ''">Date,</if>
<if test="serialNumber != null and serialNumber != ''">Serial_Number,</if>
<if test="operator != null">Operator,</if>
<if test="status != null">Status,</if>
<if test="port != null and port != ''">Port,</if>
<if test="frequency != null">Frequency,</if>
<if test="value != null">Value,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="date != null and date != ''">#{date},</if>
<if test="serialNumber != null and serialNumber != ''">#{serialNumber},</if>
<if test="operator != null">#{operator},</if>
<if test="status != null">#{status},</if>
<if test="port != null and port != ''">#{port},</if>
<if test="frequency != null">#{frequency},</if>
<if test="value != null">#{value},</if>
</trim>
</insert>
<update id="updateVnaRawData" parameterType="VnaRawData">
update vna_raw_data
<trim prefix="SET" suffixOverrides=",">
<if test="date != null and date != ''">Date = #{date},</if>
<if test="serialNumber != null and serialNumber != ''">Serial_Number = #{serialNumber},</if>
<if test="operator != null">Operator = #{operator},</if>
<if test="status != null">Status = #{status},</if>
<if test="port != null and port != ''">Port = #{port},</if>
<if test="frequency != null">Frequency = #{frequency},</if>
<if test="value != null">Value = #{value},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteVnaRawDataById" parameterType="Long">
delete from vna_raw_data where id = #{id}
</delete>
<delete id="deleteVnaRawDataByIds" parameterType="String">
delete from vna_raw_data where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

20
ruoyi-admin/src/main/resources/mapper/storehouse/WarehousingInspectionNoticeMapper.xml

@ -44,6 +44,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="params.beginWarehousingDate != null and params.beginWarehousingDate != '' and params.endWarehousingDate != null and params.endWarehousingDate != ''"> and warehousing_date between #{params.beginWarehousingDate} and #{params.endWarehousingDate}</if>
</where>
</select>
<select id="selectWarehousingInspectionNoticeYLList" parameterType="WarehousingInspectionNotice" resultMap="WarehousingInspectionNoticeResult">
<include refid="selectWarehousingInspectionNoticeVo"/>
where in_notice_number like '%IQC%'
<if test="inNoticeNumber != null and inNoticeNumber != ''"> and in_notice_number like concat('%', #{inNoticeNumber}, '%')</if>
<if test="purchaseOrderNumber != null and purchaseOrderNumber != ''"> and purchase_order_number like concat('%', #{purchaseOrderNumber}, '%')</if>
<if test="supplierCode != null and supplierCode != ''"> and supplier_code like concat('%', #{supplierCode}, '%')</if>
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="warehousingCategory != null and warehousingCategory != ''"> and warehousing_category = #{warehousingCategory}</if>
<if test="params.beginWarehousingDate != null and params.beginWarehousingDate != '' and params.endWarehousingDate != null and params.endWarehousingDate != ''"> and warehousing_date between #{params.beginWarehousingDate} and #{params.endWarehousingDate}</if>
</select>
<select id="selectWarehousingInspectionNoticeFLList" parameterType="WarehousingInspectionNotice" resultMap="WarehousingInspectionNoticeResult">
<include refid="selectWarehousingInspectionNoticeVo"/>
where in_notice_number like '%PQCFL%'
<if test="inNoticeNumber != null and inNoticeNumber != ''"> and in_notice_number like concat('%', #{inNoticeNumber}, '%')</if>
<if test="purchaseOrderNumber != null and purchaseOrderNumber != ''"> and purchase_order_number like concat('%', #{purchaseOrderNumber}, '%')</if>
<if test="supplierCode != null and supplierCode != ''"> and supplier_code like concat('%', #{supplierCode}, '%')</if>
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="warehousingCategory != null and warehousingCategory != ''"> and warehousing_category = #{warehousingCategory}</if>
<if test="params.beginWarehousingDate != null and params.beginWarehousingDate != '' and params.endWarehousingDate != null and params.endWarehousingDate != ''"> and warehousing_date between #{params.beginWarehousingDate} and #{params.endWarehousingDate}</if>
</select>
<select id="selectWarehousingInspectionNoticeById" parameterType="Long" resultMap="WarehousingInspectionNoticeResult">
<include refid="selectWarehousingInspectionNoticeVo"/>

2
ruoyi-admin/src/main/resources/templates/outsource/materialRequisitionOutsource/add.html

@ -115,7 +115,7 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出库日期</label>
<label class="col-sm-3 control-label">出库时间</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="outputDate" class="form-control" placeholder="yyyy-MM-dd" type="text">

2
ruoyi-admin/src/main/resources/templates/outsource/materialRequisitionOutsource/edit.html

@ -113,7 +113,7 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出库日期</label>
<label class="col-sm-3 control-label">出库时间</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="outputDate" th:field="*{outputDate}" class="form-control" placeholder="yyyy-MM-dd" type="text">

6
ruoyi-admin/src/main/resources/templates/outsource/materialRequisitionOutsource/materialRequisitionOutsource.html

@ -44,9 +44,9 @@
</li>
<li class="select-time">
<label>出库日期:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginOutputDate]"/>
<input type="text" class="time-input" id="startTime" placeholder="开始日期" name="params[beginOutputDate]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endOutputDate]"/>
<input type="text" class="time-input" id="endTime" placeholder="结束日期" name="params[endOutputDate]"/>
</li>
<li>
<label>领料否:</label>
@ -158,7 +158,7 @@
},
{
field: 'outputDate',
title: '出库日期'
title: '出库时间'
},
{
field: 'remarkContent',

179
ruoyi-admin/src/main/resources/templates/outsource/outsourceInspectionNotice/add.html

@ -64,13 +64,19 @@
<div class="form-group">
<label class="col-sm-3 control-label">仓库编号:</label>
<div class="col-sm-8">
<input name="stockNumber" class="form-control" type="text">
<!-- <input name="stockNumber" class="form-control" type="text">-->
<select name="stockNumber" class="form-control m-b">
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库名称:</label>
<div class="col-sm-8">
<input name="stockName" class="form-control" type="text">
<!-- <input name="stockName" class="form-control" type="text">-->
<select name="stockName" class="form-control m-b">
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
@ -94,13 +100,19 @@
<div class="form-group">
<label class="col-sm-3 control-label">加工工序编号:</label>
<div class="col-sm-8">
<input name="procedureCode" class="form-control" type="text">
<!-- <input name="procedureCode" class="form-control" type="text">-->
<select name="procedureCode" class="form-control m-b">
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">加工工序名称:</label>
<div class="col-sm-8">
<input name="procedureName" class="form-control" type="text">
<!-- <input name="procedureName" class="form-control" type="text">-->
<select name="procedureName" class="form-control m-b">
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
@ -121,7 +133,10 @@
<div class="form-group">
<label class="col-sm-3 control-label">加工类型:</label>
<div class="col-sm-8">
<input name="processingType" class="form-control" type="text">
<!-- <input name="processingType" class="form-control" type="text">-->
<select name="processingType" class="form-control m-b" th:with="type=${@dict.getType('processing_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
@ -154,6 +169,7 @@
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: bootstrap-table-editable-js"/>
<script th:src="@{/ajax/libs/select2/select2.js}"></script>
<script th:inline="javascript">
var prefix = ctx + "outsource/outsourceInspectionNotice"
@ -199,6 +215,16 @@
});
$("input[name='warehousingDate']").datetimepicker('setDate', new Date())
$(document).ready(function(){
$("#form-outsourceInspectionNotice-add select[name='processingType']").select2({
tags: true,
insertTag: function (data, tag) {
// Insert the tag at the end of the results
data.push(tag);
}
});
});
//获取单号
$.ajax({
url: prefix + "/getId",
@ -235,11 +261,26 @@
if (orderData[i].outsourceOrderNumber == outsourceOrderNumber) {
$("#form-outsourceInspectionNotice-add input[name='supplierCode']").val(orderData[i].supplierCode);
$("#form-outsourceInspectionNotice-add input[name='supplierName']").val(orderData[i].supplierName);
$("#form-outsourceInspectionNotice-add input[name='stockNumber']").val(orderData[i].deliveryStockNumber);
$("#form-outsourceInspectionNotice-add input[name='stockName']").val(orderData[i].deliveryStockName);
$("#form-outsourceInspectionNotice-add input[name='procedureCode']").val(orderData[i].procedureCode);
$("#form-outsourceInspectionNotice-add input[name='procedureName']").val(orderData[i].procedureName);
$("#form-outsourceInspectionNotice-add input[name='processingType']").val(orderData[i].procedureName);
$("#form-outsourceInspectionNotice-add select[name='stockNumber']").val(orderData[i].deliveryStockNumber).trigger("change");
$("#form-outsourceInspectionNotice-add select[name='stockName']").val(orderData[i].deliveryStockName).trigger("change");
$("#form-outsourceInspectionNotice-add select[name='procedureCode']").val(orderData[i].procedureCode).trigger("change");
$("#form-outsourceInspectionNotice-add select[name='procedureName']").val(orderData[i].procedureName).trigger("change");
// $("#form-outsourceInspectionNotice-add select[name='processingType']").val(orderData[i].procedureName).trigger("change");
var processingTypeData = {
id: orderData[i].procedureName,
text: orderData[i].procedureName
};
if ($("#form-outsourceInspectionNotice-add select[name='processingType']").find("option[value='" + processingTypeData.id + "']").length) {
$("#form-outsourceInspectionNotice-add select[name='processingType']").val(processingTypeData.id).trigger('change');
} else {
// Create a DOM Option and pre-select by default
var newOption = new Option(processingTypeData.text, processingTypeData.id, true, true);
// Append it to the select
$("#form-outsourceInspectionNotice-add select[name='processingType']").append(newOption).trigger('change');
}
$("#form-outsourceInspectionNotice-add select[name='processingType']").select2({
tags: true
});
showDetailMaterial();
}
}
@ -254,6 +295,124 @@
}
});
var changeStoreId = 0
//仓库信息
$.ajax({
url: ctx + 'stock/stockInfo/list',
type: 'post',
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
var stockData = res.rows;
//alert(JSON.stringify(data));
for (let i in stockData) {
$("#form-outsourceInspectionNotice-add select[name='stockNumber']").append("<option value='" + stockData[i].stockNO + "'>" + stockData[i].stockNO + "</option>");
$("#form-outsourceInspectionNotice-add select[name='stockName']").append("<option value='" + stockData[i].stockname + "'>" + stockData[i].stockname + "</option>");
}
$("#form-outsourceInspectionNotice-add select[name='stockNumber']").change(function () {
var stockNumber = $(this).val();
for (let i=0;i<stockData.length;i++) {
if (stockData[i].stockNO == stockNumber) {
changeStoreId++;
if (changeStoreId<2) {
$("#form-outsourceInspectionNotice-add select[name='stockName']").val(stockData[i].stockname).trigger("change")
changeStoreId = 0
}
}
}
})
$("#form-outsourceInspectionNotice-add select[name='stockName']").change(function () {
var stockName = $(this).val();
for (let i=0;i<stockData.length;i++) {
if (stockData[i].stockname == stockName) {
changeStoreId++;
if (changeStoreId<2) {
$("#form-outsourceInspectionNotice-add select[name='stockNumber']").val(stockData[i].stockNO).trigger("change")
changeStoreId = 0
}
}
}
})
}
}
})
var changeProcedureId = 0
//工序信息
$.ajax({
url: ctx + 'system/procedure/list',
type: 'post',
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
var procedureData = res.rows;
let procedureCode1 = $("#form-outsourceInspectionNotice-add select[name='procedureCode']");
let procedureName1 = $("#form-outsourceInspectionNotice-add select[name='procedureName']");
//alert(JSON.stringify(data));
for (let i in procedureData) {
procedureCode1.append("<option value='" + procedureData[i].procedureCode + "'>" + procedureData[i].procedureCode + "</option>");
procedureName1.append("<option value='" + procedureData[i].procedureName + "'>" + procedureData[i].procedureName + "</option>");
}
procedureCode1.change(function () {
var procedureCode = procedureCode1.val();
for (let i=0;i<procedureData.length;i++) {
if (procedureData[i].procedureCode == procedureCode) {
changeProcedureId++;
if (changeProcedureId<2) {
procedureName1.val(procedureData[i].procedureName).trigger("change")
var processingTypeData = {
id: procedureData[i].procedureName,
text: procedureData[i].procedureName
};
if ($("#form-outsourceInspectionNotice-add select[name='processingType']").find("option[value='" + processingTypeData.id + "']").length) {
$("#form-outsourceInspectionNotice-add select[name='processingType']").val(processingTypeData.id).trigger('change');
} else {
// Create a DOM Option and pre-select by default
var newOption = new Option(processingTypeData.text, processingTypeData.id, true, true);
// Append it to the select
$("#form-outsourceInspectionNotice-add select[name='processingType']").append(newOption).trigger('change');
}
$("#form-outsourceInspectionNotice-add select[name='processingType']").select2({
tags: true
});
$("#form-outsourceInspectionNotice-add select[name='processingType']").val(null).trigger('change');
changeProcedureId = 0;
}
}
}
})
procedureName1.change(function () {
var procedureName = procedureName1.val();
for (let i=0;i<procedureData.length;i++) {
if (procedureData[i].procedureName == procedureName) {
changeProcedureId++;
if (changeProcedureId<2) {
procedureCode1.val(procedureData[i].procedureCode).trigger("change")
var processingTypeData = {
id: procedureName,
text: procedureName
};
if ($("#form-outsourceInspectionNotice-add select[name='processingType']").find("option[value='" + processingTypeData.id + "']").length) {
$("#form-outsourceInspectionNotice-add select[name='processingType']").val(processingTypeData.id).trigger('change');
} else {
// Create a DOM Option and pre-select by default
var newOption = new Option(processingTypeData.text, processingTypeData.id, true, true);
// Append it to the select
$("#form-outsourceInspectionNotice-add select[name='processingType']").append(newOption).trigger('change');
}
$("#form-outsourceInspectionNotice-add select[name='processingType']").select2({
tags: true
});
$("#form-outsourceInspectionNotice-add select[name='processingType']").val(null).trigger('change');
changeProcedureId = 0;
}
}
}
})
}
}
})
//获取接收人员
$.ajax({
url: prefixUser + "/list",

205
ruoyi-admin/src/main/resources/templates/outsource/outsourceInspectionNotice/edit.html

@ -65,13 +65,19 @@
<div class="form-group">
<label class="col-sm-3 control-label">仓库编号:</label>
<div class="col-sm-8">
<input name="stockNumber" th:field="*{stockNumber}" class="form-control" type="text">
<!-- <input name="stockNumber" th:field="*{stockNumber}" class="form-control" type="text">-->
<select name="stockNumber" class="form-control m-b">
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库名称:</label>
<div class="col-sm-8">
<input name="stockName" th:field="*{stockName}" class="form-control" type="text">
<!-- <input name="stockName" th:field="*{stockName}" class="form-control" type="text">-->
<select name="stockName" class="form-control m-b">
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
@ -95,13 +101,20 @@
<div class="form-group">
<label class="col-sm-3 control-label">加工工序编号:</label>
<div class="col-sm-8">
<input name="procedureCode" th:field="*{procedureCode}" class="form-control" type="text">
<!-- <input name="procedureCode" th:field="*{procedureCode}" class="form-control" type="text">-->
<select name="procedureCode" class="form-control m-b">
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">加工工序名称:</label>
<div class="col-sm-8">
<input name="procedureName" th:field="*{procedureName}" class="form-control" type="text">
<!-- <input name="procedureName" th:field="*{procedureName}" class="form-control" type="text">-->
<select name="procedureName" class="form-control m-b">
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
@ -122,7 +135,10 @@
<div class="form-group">
<label class="col-sm-3 control-label">加工类型:</label>
<div class="col-sm-8">
<input name="processingType" th:field="*{processingType}" class="form-control" type="text">
<!-- <input name="processingType" th:field="*{processingType}" class="form-control" type="text">-->
<select name="processingType" class="form-control m-b" th:with="type=${@dict.getType('processing_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{processingType}"></option>
</select>
</div>
</div>
<div class="form-group">
@ -146,6 +162,7 @@
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: bootstrap-table-editable-js"/>
<script th:src="@{/ajax/libs/select2/select2.js}"></script>
<script th:inline="javascript">
var getData = [[${outsourceInspectionNotice}]]
var prefix = ctx + "outsource/outsourceInspectionNotice"
@ -202,21 +219,37 @@
$("#form-outsourceInspectionNotice-edit select[name='outsourceOrderNumber']").append("<option value='" + orderData[i].outsourceOrderNumber + "'>" + orderData[i].outsourceOrderNumber + "</option>");
}
$("#form-outsourceInspectionNotice-edit select[name='outsourceOrderNumber']").val(getData.outsourceOrderNumber).trigger("change")
$("#form-outsourceInspectionNotice-edit select[name='outsourceOrderNumber']").change(function () {
var outsourceOrderNumber = $(this).val();
for (let i=0;i<orderData.length;i++) {
if (orderData[i].outsourceOrderNumber == outsourceOrderNumber) {
$("#form-outsourceInspectionNotice-edit input[name='supplierCode']").val(orderData[i].supplierCode);
$("#form-outsourceInspectionNotice-edit input[name='supplierName']").val(orderData[i].supplierName);
$("#form-outsourceInspectionNotice-edit input[name='stockNumber']").val(orderData[i].deliveryStockNumber);
$("#form-outsourceInspectionNotice-edit input[name='stockName']").val(orderData[i].deliveryStockName);
$("#form-outsourceInspectionNotice-edit input[name='procedureCode']").val(orderData[i].procedureCode);
$("#form-outsourceInspectionNotice-edit input[name='procedureName']").val(orderData[i].procedureName);
$("#form-outsourceInspectionNotice-edit input[name='processingType']").val(orderData[i].procedureName);
showDetailMaterial();
}
}
})
let processingTypeData = {
id: getData.processingType,
text: getData.processingType
};
if ($("#form-outsourceInspectionNotice-edit select[name='processingType']").find("option[value='" + processingTypeData.id + "']").length) {
$("#form-outsourceInspectionNotice-edit select[name='processingType']").val(processingTypeData.id).trigger('change');
} else {
// Create a DOM Option and pre-select by default
var newOption = new Option(processingTypeData.text, processingTypeData.id, true, true);
// Append it to the select
$("#form-outsourceInspectionNotice-edit select[name='processingType']").append(newOption).trigger('change');
}
$("#form-outsourceInspectionNotice-edit select[name='processingType']").select2({
tags: true
});
// console.log(getData.procedureCode)
// $("#form-outsourceInspectionNotice-edit select[name='outsourceOrderNumber']").change(function () {
// var outsourceOrderNumber = $(this).val();
// for (let i=0;i<orderData.length;i++) {
// if (orderData[i].outsourceOrderNumber == outsourceOrderNumber) {
// $("#form-outsourceInspectionNotice-edit input[name='supplierCode']").val(orderData[i].supplierCode);
// $("#form-outsourceInspectionNotice-edit input[name='supplierName']").val(orderData[i].supplierName);
// $("#form-outsourceInspectionNotice-edit select[name='stockNumber']").val(orderData[i].deliveryStockNumber).trigger("change");
// $("#form-outsourceInspectionNotice-edit select[name='stockName']").val(orderData[i].deliveryStockName).trigger("change");
// $("#form-outsourceInspectionNotice-edit select[name='procedureCode']").val(orderData[i].procedureCode).trigger("change");
// $("#form-outsourceInspectionNotice-edit select[name='procedureName']").val(orderData[i].procedureName).trigger("change");
// $("#form-outsourceInspectionNotice-edit input[name='processingType']").val(orderData[i].procedureName);
// showDetailMaterial();
// }
// }
// })
} else {
$.modal.msgError(res.msg);
@ -227,6 +260,138 @@
}
});
$(document).ready(function(){
$("#form-outsourceInspectionNotice-edit select[name='processingType']").select2({
tags: true,
insertTag: function (data, tag) {
// Insert the tag at the end of the results
data.push(tag);
}
});
});
var changeStoreId = 0
//仓库信息
$.ajax({
url: ctx + 'stock/stockInfo/list',
type: 'post',
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
var stockData = res.rows;
//alert(JSON.stringify(data));
for (let i in stockData) {
$("#form-outsourceInspectionNotice-edit select[name='stockNumber']").append("<option value='" + stockData[i].stockNO + "'>" + stockData[i].stockNO + "</option>");
$("#form-outsourceInspectionNotice-edit select[name='stockName']").append("<option value='" + stockData[i].stockname + "'>" + stockData[i].stockname + "</option>");
}
$("#form-outsourceInspectionNotice-edit select[name='stockNumber']").val(getData.stockNumber).trigger("change")
$("#form-outsourceInspectionNotice-edit select[name='stockName']").val(getData.stockName).trigger("change")
$("#form-outsourceInspectionNotice-edit select[name='stockNumber']").change(function () {
var stockNumber = $(this).val();
for (let i=0;i<stockData.length;i++) {
if (stockData[i].stockNO == stockNumber) {
changeStoreId++;
if (changeStoreId<2) {
$("#form-outsourceInspectionNotice-edit select[name='stockName']").val(stockData[i].stockname).trigger("change")
changeStoreId = 0
}
}
}
})
$("#form-outsourceInspectionNotice-edit select[name='stockName']").change(function () {
var stockName = $(this).val();
for (let i=0;i<stockData.length;i++) {
if (stockData[i].stockname == stockName) {
changeStoreId++;
if (changeStoreId<2) {
$("#form-outsourceInspectionNotice-edit select[name='stockNumber']").val(stockData[i].stockNO).trigger("change")
changeStoreId = 0
}
}
}
})
}
}
})
var changeProcedureId = 0
//工序信息
$.ajax({
url: ctx + 'system/procedure/list',
type: 'post',
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
var procedureData = res.rows;
let procedureCode1 = $("#form-outsourceInspectionNotice-edit select[name='procedureCode']");
let procedureName1 = $("#form-outsourceInspectionNotice-edit select[name='procedureName']");
//alert(JSON.stringify(data));
for (let i in procedureData) {
procedureCode1.append("<option value='" + procedureData[i].procedureCode + "'>" + procedureData[i].procedureCode + "</option>");
procedureName1.append("<option value='" + procedureData[i].procedureName + "'>" + procedureData[i].procedureName + "</option>");
}
$("#form-outsourceInspectionNotice-edit select[name='procedureCode']").val(getData.procedureCode).trigger("change")
$("#form-outsourceInspectionNotice-edit select[name='procedureName']").val(getData.procedureName).trigger("change")
procedureCode1.change(function () {
var procedureCode = procedureCode1.val();
for (let i=0;i<procedureData.length;i++) {
if (procedureData[i].procedureCode == procedureCode) {
changeProcedureId++;
if (changeProcedureId<2) {
procedureName1.val(procedureData[i].procedureName).trigger("change")
let processingTypeData = {
id: procedureData[i].procedureName,
text: procedureData[i].procedureName
};
if ($("#form-outsourceInspectionNotice-edit select[name='processingType']").find("option[value='" + processingTypeData.id + "']").length) {
$("#form-outsourceInspectionNotice-edit select[name='processingType']").val(processingTypeData.id).trigger('change');
} else {
// Create a DOM Option and pre-select by default
var newOption = new Option(processingTypeData.text, processingTypeData.id, true, true);
// Append it to the select
$("#form-outsourceInspectionNotice-edit select[name='processingType']").append(newOption).trigger('change');
}
$("#form-outsourceInspectionNotice-edit select[name='processingType']").select2({
tags: true
});
$("#form-outsourceInspectionNotice-edit select[name='processingType']").val(null).trigger('change');
changeProcedureId = 0;
}
}
}
})
procedureName1.change(function () {
var procedureName = procedureName1.val();
for (let i=0;i<procedureData.length;i++) {
if (procedureData[i].procedureName == procedureName) {
changeProcedureId++;
if (changeProcedureId<2) {
procedureCode1.val(procedureData[i].procedureCode).trigger("change")
let processingTypeData = {
id: procedureName,
text: procedureName
};
if ($("#form-outsourceInspectionNotice-edit select[name='processingType']").find("option[value='" + processingTypeData.id + "']").length) {
$("#form-outsourceInspectionNotice-edit select[name='processingType']").val(processingTypeData.id).trigger('change');
} else {
// Create a DOM Option and pre-select by default
var newOption = new Option(processingTypeData.text, processingTypeData.id, true, true);
// Append it to the select
$("#form-outsourceInspectionNotice-edit select[name='processingType']").append(newOption).trigger('change');
}
$("#form-outsourceInspectionNotice-edit select[name='processingType']").select2({
tags: true
});
$("#form-outsourceInspectionNotice-edit select[name='processingType']").val(null).trigger('change');
changeProcedureId = 0;
}
}
}
})
}
}
})
//获取接收人员
$.ajax({
url: prefixUser + "/list",

36
ruoyi-admin/src/main/resources/templates/outsource/outsourceOrderInfo/add.html

@ -114,10 +114,10 @@
<div class="form-group">
<label class="col-sm-3 control-label">加工工序名称:</label>
<div class="col-sm-8">
<!-- <select name="procedureName" class="form-control m-b">-->
<!-- <option value="">所有</option>-->
<!-- </select>-->
<input name="procedureName" class="form-control" type="text">
<select name="procedureName" class="form-control m-b">
<option value="">所有</option>
</select>
<!-- <input name="procedureName" class="form-control" type="text">-->
</div>
</div>
<div class="form-group">
@ -373,6 +373,7 @@
}
})
var changeProcedureId = 0
//工序信息
$.ajax({
url: ctx + 'system/procedure/list',
@ -381,15 +382,34 @@
// console.log(res)
if (res.rows.length > 0) {
var procedureData = res.rows;
let procedureCode1 = $("#form-outsourceOrderInfo-add select[name='procedureCode']");
let procedureName1 = $("#form-outsourceOrderInfo-add select[name='procedureName']");
//alert(JSON.stringify(data));
for (let i in procedureData) {
$("#form-outsourceOrderInfo-add select[name='procedureCode']").append("<option value='" + procedureData[i].procedureCode + "'>" + procedureData[i].procedureCode + "</option>");
procedureCode1.append("<option value='" + procedureData[i].procedureCode + "'>" + procedureData[i].procedureCode + "</option>");
procedureName1.append("<option value='" + procedureData[i].procedureName + "'>" + procedureData[i].procedureName + "</option>");
}
$("#form-outsourceOrderInfo-add select[name='procedureCode']").change(function () {
var procedureCode = $(this).val();
procedureCode1.change(function () {
var procedureCode = procedureCode1.val();
for (let i=0;i<procedureData.length;i++) {
if (procedureData[i].procedureCode == procedureCode) {
$("#form-outsourceOrderInfo-add input[name='procedureName']").val(procedureData[i].procedureName)
changeProcedureId++;
if (changeProcedureId<2) {
procedureName1.val(procedureData[i].procedureName).trigger("change")
changeProcedureId = 0;
}
}
}
})
procedureName1.change(function () {
var procedureName = procedureName1.val();
for (let i=0;i<procedureData.length;i++) {
if (procedureData[i].procedureName == procedureName) {
changeProcedureId++;
if (changeProcedureId<2) {
procedureCode1.val(procedureData[i].procedureCode).trigger("change")
changeProcedureId = 0;
}
}
}
})

40
ruoyi-admin/src/main/resources/templates/outsource/outsourceOrderInfo/edit.html

@ -115,10 +115,10 @@
<div class="form-group">
<label class="col-sm-3 control-label">加工工序名称:</label>
<div class="col-sm-8">
<!-- <select name="procedureName" class="form-control m-b">-->
<!-- <option value="">所有</option>-->
<!-- </select>-->
<input name="procedureName" th:field="*{procedureName}" class="form-control" type="text">
<select name="procedureName" class="form-control m-b">
<option value="">所有</option>
</select>
<!-- <input name="procedureName" th:field="*{procedureName}" class="form-control" type="text">-->
</div>
</div>
<div class="form-group">
@ -328,6 +328,8 @@
}
})
var changeProcedureId = 0
//工序信息
$.ajax({
url: ctx + 'system/procedure/list',
@ -336,16 +338,36 @@
// console.log(res)
if (res.rows.length > 0) {
var procedureData = res.rows;
let procedureCode1 = $("#form-outsourceOrderInfo-edit select[name='procedureCode']");
let procedureName1 = $("#form-outsourceOrderInfo-edit select[name='procedureName']");
//alert(JSON.stringify(data));
for (let i in procedureData) {
$("#form-outsourceOrderInfo-edit select[name='procedureCode']").append("<option value='" + procedureData[i].procedureCode + "'>" + procedureData[i].procedureCode + "</option>");
procedureCode1.append("<option value='" + procedureData[i].procedureCode + "'>" + procedureData[i].procedureCode + "</option>");
procedureName1.append("<option value='" + procedureData[i].procedureName + "'>" + procedureData[i].procedureName + "</option>");
}
$("#form-outsourceOrderInfo-edit select[name='procedureCode']").val(getData.procedureCode).trigger("change")
$("#form-outsourceOrderInfo-edit select[name='procedureCode']").change(function () {
var procedureCode = $(this).val();
procedureCode1.val(getData.procedureCode).trigger("change")
procedureName1.val(getData.procedureName).trigger("change")
procedureCode1.change(function () {
var procedureCode = procedureCode1.val();
for (let i=0;i<procedureData.length;i++) {
if (procedureData[i].procedureCode == procedureCode) {
$("#form-outsourceOrderInfo-edit input[name='procedureName']").val(procedureData[i].procedureName)
changeProcedureId++;
if (changeProcedureId<2) {
procedureName1.val(procedureData[i].procedureName).trigger("change")
changeProcedureId = 0;
}
}
}
})
procedureName1.change(function () {
var procedureName = procedureName1.val();
for (let i=0;i<procedureData.length;i++) {
if (procedureData[i].procedureName == procedureName) {
changeProcedureId++;
if (changeProcedureId<2) {
procedureCode1.val(procedureData[i].procedureCode).trigger("change")
changeProcedureId = 0;
}
}
}
})

69
ruoyi-admin/src/main/resources/templates/rfMsg/vnaRawData/add.html

@ -0,0 +1,69 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增rf测试历史结果')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-vnaRawData-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="date" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">序列号:</label>
<div class="col-sm-8">
<input name="serialNumber" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">操作人:</label>
<div class="col-sm-8">
<input name="operator" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否通过,0为NG,1为PASS:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('vna_raw_data_status')}">
<input type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">端口号,例:PORT1:</label>
<div class="col-sm-8">
<input name="port" class="form-control" type="text" required>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "rfMsg/vnaRawData"
$("#form-vnaRawData-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-vnaRawData-add').serialize());
}
}
$("input[name='date']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

70
ruoyi-admin/src/main/resources/templates/rfMsg/vnaRawData/edit.html

@ -0,0 +1,70 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改rf测试历史结果')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-vnaRawData-edit" th:object="${vnaRawData}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="date" th:value="${#dates.format(vnaRawData.date, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">序列号:</label>
<div class="col-sm-8">
<input name="serialNumber" th:field="*{serialNumber}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">操作人:</label>
<div class="col-sm-8">
<input name="operator" th:field="*{operator}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否通过,0为NG,1为PASS:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('vna_raw_data_status')}">
<input type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}" required>
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">端口号,例:PORT1:</label>
<div class="col-sm-8">
<input name="port" th:field="*{port}" class="form-control" type="text" required>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "rfMsg/vnaRawData";
$("#form-vnaRawData-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-vnaRawData-edit').serialize());
}
}
$("input[name='date']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

171
ruoyi-admin/src/main/resources/templates/rfMsg/vnaRawData/vnaRawData.html

@ -0,0 +1,171 @@
<!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('rf测试历史结果列表')" />
</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 class="select-time">
<label>时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginDate]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endDate]"/>
</li>
<li>
<label>序列号:</label>
<input type="text" name="serialNumber"/>
</li>
<li>
<label>操作人:</label>
<input type="text" name="operator"/>
</li>
<li>
<label>是否通过,0为NG,1为PASS:</label>
<select name="status" th:with="type=${@dict.getType('vna_raw_data_status')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>端口号,例:PORT1:</label>
<input type="text" name="port"/>
</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="rfMsg:vnaRawData:add">-->
<!-- <i class="fa fa-plus"></i> 添加-->
<!-- </a>-->
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="rfMsg:vnaRawData:edit">-->
<!-- <i class="fa fa-edit"></i> 修改-->
<!-- </a>-->
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="rfMsg:vnaRawData:remove">-->
<!-- <i class="fa fa-remove"></i> 删除-->
<!-- </a>-->
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="rfMsg:vnaRawData: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('rfMsg:vnaRawData:edit')}]];
var removeFlag = [[${@permission.hasPermi('rfMsg:vnaRawData:remove')}]];
var statusDatas = [[${@dict.getType('vna_raw_data_status')}]];
var prefix = ctx + "rfMsg/vnaRawData";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "rf测试历史结果",
detailView: true,
columns: [
// {
// checkbox: true
// },
{
field: 'id',
title: 'id',
visible: false
},
{
field: 'date',
title: '时间'
},
{
field: 'serialNumber',
title: '序列号'
},
{
field: 'operator',
title: '操作人'
},
{
field: 'status',
title: '是否通过,0为NG,1为PASS',
formatter: function(value, row, index) {
return $.table.selectDictLabel(statusDatas, value);
}
},
{
field: 'port',
title: '端口号,例:PORT1'
}],
// {
// 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.id + '\')"><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.id + '\')"><i class="fa fa-remove"></i>删除</a>');
// return actions.join('');
// }
// }
onExpandRow: function (index, row, $detail) {
initSubTable(index, row, $detail);
},
};
$.table.init(options);
});
function initSubTable(index, row, $detail) {
var parentid = row.id;
var cur_table = $detail.html('<table id="table_' + parentid + '"></table>').find('table');
getData(parentid)
// confirm_income_list_sun: 子表的数据
var timu = 'nihao'
var timu2 = 'zg'
$(cur_table).bootstrapTable({
// data: confirm_income_list_sun,
pageSize: 10,
detailView: false, //是否显示父子表
singleSelect: true,
contentType: "application/x-www-form-urlencoded",
columns: [
{
title: timu,
field: "detailData",
formatter: function (value, row, index) {
console.log(row.detailData)
row.detailData = timu2
return timu2
}
}
]
});
}
function getData(id) {
$.ajax({
url: prefix + '/getDataById/'+id,
type: 'post',
success: function (res) {
console.log(id)
console.log(res)
}
})
}
</script>
</body>
</html>

2
ruoyi-admin/src/main/resources/templates/storehouse/warehousingInspectionNotice/add.html

@ -215,7 +215,7 @@
//获取单号
$.ajax({
url: prefix + "/getId",
url: prefix + "/getIdFL",
type: "post",
dateType: "json",
success: function (resp) {

548
ruoyi-admin/src/main/resources/templates/storehouse/warehousingInspectionNoticeFL/add.html

@ -0,0 +1,548 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增入库检验通知')" />
<th:block th:include="include :: datetimepicker-css" />
<th:block th:include="include :: bootstrap-fileinput-css"/>
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet">
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet">
<th:block th:include="include :: bootstrap-editable-css"/>
<style>
.other-container {
width: 90%;
height: 200px;
margin: auto;
}
.other {
margin-top: 20px;
}
h4 {
display: inline-block;
margin-right: 20px;
}
.modal-body{
height: 550px;
}
iframe{
width: 100%;
height: 500px;
frameborder: 0;
border: 0;
display: inline-block;
}
</style>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-warehousingInspectionNotice-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">入通知单号:</label>
<div class="col-sm-8">
<input name="inNoticeNumber" class="form-control" type="text" required readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">订购单号:</label>
<div class="col-sm-8">
<select name="purchaseOrderNumber" class="form-control m-b" required>
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">供应商代码:</label>
<div class="col-sm-8">
<input name="supplierCode" 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="supplierName" 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="customerContact" 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="stockName" class="form-control m-b">
<option value="">请选择仓库名称</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库编号:</label>
<div class="col-sm-8">
<input name="stockNumber" 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="stockManager" 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="exportSales" class="form-control m-b" th:with="type=${@dict.getType('sys_export_sales')}">
<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">
<select name="warehousingCategory" class="form-control m-b" th:with="type=${@dict.getType('warehousing_category')}">
<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">
<div class="input-group date">
<input name="inspectionDate" class="form-control" placeholder="yyyy-MM-dd hh:ii:ss" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<!-- <div class="form-group"> -->
<!-- <label class="col-sm-3 control-label">入库日期:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <div class="input-group date">-->
<!-- <input name="warehousingDate" class="form-control" placeholder="yyyy-MM-dd" type="text">-->
<!-- <span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="remarks" 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="inspectionReport">-->
<!-- <div class="file-loading">-->
<!-- <input class="form-control file-upload" id="inspectionReport" name="file" type="file">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group hidden">
<label class="col-sm-3 control-label">确认否:</label>
<div class="col-sm-8">
<select name="confirmFlag" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
</form>
</div>
<div class="other-container">
<div class="other">
<br><hr>
<h4>订单材料信息</h4>
<div class="col-sm-12 select-table table-striped">
<table id="addDetailTable" style="white-space:nowrap"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: bootstrap-fileinput-js"/>
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: bootstrap-table-editable-js"/>
<script th:inline="javascript">
var prefix = ctx + "storehouse/warehousingInspectionNotice"
var prefixDetail = ctx + "storehouse/warehousingInspectionDetail"
var prefixPurchaseOrder = ctx + "purchase/purchaseOrder"
var prefixPurchaseMaterial = ctx + "purchase/purchaseMaterial"
var purchasingUnitDatas = [[${@dict.getType('sys_unit_class')}]];
var judgmentResultsDatas = [[${@dict.getType('judgment_results')}]];
var materialTypeDatas = [[${@dict.getType('ck_meterialt_type')}]];
$("#form-warehousingInspectionNotice-add").validate({
focusCleanup: true
});
function submitHandler() {
let getData=$('#addDetailTable').bootstrapTable('getData', true)
if(getData.length > 0){
//确认添加选中的物料数据
confirmDetailMaterial();
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-warehousingInspectionNotice-add').serialize());
}
} else {
$.modal.alertWarning("未选择物料,请添加!")
}
}
$("input[name='inspectionDate']").datetimepicker({
format: "yyyy-mm-dd hh:ii:ss",
minView: "month",
autoclose: true,
todayBtn: true
});
$("input[name='inspectionDate']").datetimepicker("setDate", new Date());
$("input[name='warehousingDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true,
todayBtn: true
});
$("input[name='warehousingDate']").datetimepicker("setDate", new Date());
$(".file-upload").fileinput({
uploadUrl: prefix + '/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('')
})
//获取单号
$.ajax({
url: prefix + "/getIdFL",
type: "post",
dateType: "json",
success: function (resp) {
if (resp.code === 0) {
$("input[name='inNoticeNumber']").val(resp.data);
} else {
$.modal.msgError("失败啦");
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
});
//初始化添加材料表
$('#addDetailTable').bootstrapTable({
pagination: true,
pageNumber: 1,
pageSize: 10,
showToggle: false, // 是否显示详细视图和列表视图的切换按钮
cardView: false, // 是否显示详细视图
detailView: false, // 是否显示父子表
smartDisplay: false, // 加了这个才显示每页显示的行数
showExport: false, // 是否显示导出按钮
clickToSelect: true,//点击行选中
contentType: "application/x-www-form-urlencoded",
paginationDetailHAlign: ' hiddenDetailInfo',
height: 250,
uniqueId: 'materialCode',
queryParams: function (params) {
//console.log("123");
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
// enterpriseCode: data[0].enterpriseCode
};
// console.log(data[0].enterpriseCode)
return curParams
},
columns: [
// {
// title: '操作',
// align: 'center',
// formatter: function (value, row, index) {
// var actions = [];
// actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeProductData(\'' + row.rawSubsidiaryCode + '\')" ><i class="fa fa-remove"></i>删除</a>');
// return actions.join('');
// }
// },
{
field: 'warehousingInspectionDetailId',
title: '入库检验通知物料id',
visible: false
},
{
field: 'inNoticeNumber',
title: '入通知单号',
visible: false
},
{
field: 'materialCode',
title: '物料代码'
},
{
field: 'materialName',
title: '物料名称'
},
{
field: 'specificationModel',
title: '规格型号'
},
{
field: 'materialType',
title: '物料类别',
formatter: function(value, row, index) {
return $.table.selectDictLabel(materialTypeDatas, value);
}
},
{
field: 'purchasingUnit',
title: '单位',
formatter: function(value, row, index) {
return $.table.selectDictLabel(purchasingUnitDatas, value);
}
},
{
field: 'materialQuantity',
title: '送货数量',
editable: {
type: 'text',
title: '送货数量',
emptytext: '送货数量',
validate: function (v) {
// if (isNaN(v)) return '数量必须是数字';
// var ex = /^[1-9]\d*$/;
// if (!ex.test(v)) return '数量必须是正整数';
}
}
},
{
field: 'qualifiedQuantity',
title: '合格数量',
editable: {
type: 'text',
title: '合格数量',
emptytext: '合格数量',
validate: function (v) {
// if (isNaN(v)) return '数量必须是数字';
// var ex = /^[1-9]\d*$/;
// if (!ex.test(v)) return '数量必须是正整数';
}
}
},
{
field: 'unqualifiedQuantity',
title: '不合格数量',
editable: {
type: 'text',
title: '不合格数量',
emptytext: '不合格数量',
validate: function (v) {
if (isNaN(v)) return '数量必须是数字';
var ex = /^[1-9]\d*$/;
if (!ex.test(v)) return '数量必须是正整数';
}
},
formatter:function(value, row, index) {
let unqualifiedQuantity = row.materialQuantity - row.qualifiedQuantity;
row.unqualifiedQuantity = row.materialQuantity - row.qualifiedQuantity;
return unqualifiedQuantity.toFixed(0);
}
},
{
field: 'qualificationRate',
title: '合格率',
editable: {
type: 'text',
title: '合格率',
emptytext: '合格率',
validate: function (v) {
}
},
formatter:function(value, row, index) {
let total = row.qualifiedQuantity / row.materialQuantity;
row.qualificationRate = row.qualifiedQuantity / row.materialQuantity;
return (total*100).toFixed(2) + '%';
}
},
{
field: 'purchaseExplain',
title: '说明',
editable: {
type: 'text',
title: '说明',
emptytext: '说明',
validate: function (v) {
}
}
},
{
field: 'judgmentResults',
title: '判定结果',
editable: {
type: 'select',
title: '判定结果',
emptytext: '判定结果',
source: function() {
let result = [];
for (let i = 0;i<judgmentResultsDatas.length;i++) {
result.push({value: judgmentResultsDatas[i].dictValue,text: judgmentResultsDatas[i].dictLabel})
}
return result;
},
validate: function (value) {
}
}
}
// {
// field: 'receiptBatchNumber',
// title: '收货批号',
// editable: {
// type: 'text',
// title: '收货批号',
// emptytext: '收货批号',
// validate: function (v) {
//
// }
// }
// },
// {
// field: 'manufacturerBatchNumber',
// title: '厂商批号',
// editable: {
// type: 'text',
// title: '厂商批号',
// emptytext: '厂商批号',
// validate: function (v) {
//
// }
// }
// }
]
})
//获取订单号
$.ajax({
url: prefixPurchaseOrder + '/list',
type: "post",
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
var orderData = res.rows;
//alert(JSON.stringify(data));
for (let i in orderData) {
// console.log(finishProductData[i].finishProductCode)
$("#form-warehousingInspectionNotice-add select[name='purchaseOrderNumber']").append("<option value='" + orderData[i].purchaseOrderNumber + "'>" + orderData[i].purchaseOrderNumber + "</option>");
}
$("#form-warehousingInspectionNotice-add select[name='purchaseOrderNumber']").change(function () {
var purchaseOrderNumber = $(this).val();
for (let i=0;i<orderData.length;i++) {
if (orderData[i].purchaseOrderNumber == purchaseOrderNumber) {
$("#form-warehousingInspectionNotice-add input[name='supplierCode']").val(orderData[i].supplierCode);
$("#form-warehousingInspectionNotice-add input[name='supplierName']").val(orderData[i].supplierName);
$("#form-warehousingInspectionNotice-add input[name='customerContact']").val(orderData[i].customerContact);
//选择订单号显示表内订单信息
showDetailMaterial();
}
}
})
} else {
$.modal.msgError(res.msg);
}
}
})
//获取仓库信息
$.ajax({
url: ctx + "stock/stockInfo/list",
type: "post",
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
let stockData = res.rows;
for (let i in stockData) {
// console.log(finishProductData[i].finishProductCode)
$("#form-warehousingInspectionNotice-add select[name='stockName']").append("<option value='" + stockData[i].stockname + "'>" + stockData[i].stockname + "</option>");
}
$("#form-warehousingInspectionNotice-add select[name='stockName']").change(function () {
var stockName = $(this).val();
for (let i=0;i<stockData.length;i++) {
if (stockData[i].stockname == stockName) {
$("#form-warehousingInspectionNotice-add input[name='stockNumber']").val(stockData[i].stockNO);
$("#form-warehousingInspectionNotice-add input[name='stockManager']").val(stockData[i].stockmanager);
}
}
})
}
}
})
//选择订单号显示表内订单信息
function showDetailMaterial() {
$('#addDetailTable').bootstrapTable("removeAll")
var purchaseOrderNumber = $("select[name='purchaseOrderNumber']").val();
$.ajax({
url: prefixPurchaseMaterial + '/list',
type: 'post',
data: {
purchaseOrderNumber: purchaseOrderNumber
},
success: function (res) {
console.log(res)
var count = res.rows.length;
var data = res.rows;
var inNoticeNumber = $("input[name='inNoticeNumber']").val();
for (i = 0; i < res.rows.length; i++) {
$("#addDetailTable").bootstrapTable('insertRow', {
index: count + i,
row: {
inNoticeNumber: inNoticeNumber,
materialCode: data[i].rawSubsidiaryCode,
materialName: data[i].rawSubsidiaryName,
specificationModel: data[i].specificationModel,
materialType: data[i].materialType,
purchasingUnit: data[i].purchasingUnit,
materialQuantity: data[i].materialQuantity,
qualifiedQuantity: '',
unqualifiedQuantity: '',
qualificationRate: '',
purchaseExplain: data[i].purchaseExplain,
judgmentResults: ''
// receiptBatchNumber: '',
// manufacturerBatchNumber: '',
}
});
}
}
})
}
//确认添加选中的物料数据
function confirmDetailMaterial() {
$("#addDetailTable").bootstrapTable('refresh');
let data = $('#addDetailTable').bootstrapTable('getData', true);
// let getData=$('#addProductTable').bootstrapTable('getData', true)
// console.log(data)
$.ajax({
url: prefixDetail + '/addEditSave',
type: "POST",
data: {
data: JSON.stringify(data)
},
dataType: "json",
success: function (resp) {
// console.log(data)
console.log(resp)
},
})
}
</script>
</body>
</html>

535
ruoyi-admin/src/main/resources/templates/storehouse/warehousingInspectionNoticeFL/edit.html

@ -0,0 +1,535 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改入库检验通知')" />
<th:block th:include="include :: datetimepicker-css" />
<th:block th:include="include :: bootstrap-fileinput-css"/>
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet">
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet">
<th:block th:include="include :: bootstrap-editable-css"/>
<style>
.other-container {
width: 90%;
height: 200px;
margin: auto;
}
.other {
margin-top: 20px;
}
h4 {
display: inline-block;
margin-right: 20px;
}
.modal-body{
height: 550px;
}
iframe{
width: 100%;
height: 500px;
frameborder: 0;
border: 0;
display: inline-block;
}
</style>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-warehousingInspectionNotice-edit" th:object="${warehousingInspectionNotice}">
<input name="warehousingInspectionNoticeId" th:field="*{warehousingInspectionNoticeId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">入通知单号:</label>
<div class="col-sm-8">
<input name="inNoticeNumber" th:field="*{inNoticeNumber}" class="form-control" type="text" required readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">订购单号:</label>
<div class="col-sm-8">
<select name="purchaseOrderNumber" class="form-control m-b" th:field="*{purchaseOrderNumber}" readonly>
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">供应商代码:</label>
<div class="col-sm-8">
<input name="supplierCode" th:field="*{supplierCode}" 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="supplierName" th:field="*{supplierName}" 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="customerContact" th:field="*{customerContact}" 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="stockName" class="form-control m-b" th:field="*{stockName}">
<option value="">请选择仓库名称</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库编号:</label>
<div class="col-sm-8">
<input name="stockNumber" th:field="*{stockNumber}" 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="stockManager" th:field="*{stockManager}" 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="exportSales" class="form-control m-b" th:with="type=${@dict.getType('sys_export_sales')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{exportSales}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库类别:</label>
<div class="col-sm-8">
<select name="warehousingCategory" class="form-control m-b" th:with="type=${@dict.getType('warehousing_category')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{warehousingCategory}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">交检时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="inspectionDate" th:field="*{inspectionDate}" class="form-control" placeholder="yyyy-MM-dd hh:ii:ss" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<!-- <div class="form-group"> -->
<!-- <label class="col-sm-3 control-label">入库日期:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <div class="input-group date">-->
<!-- <input name="warehousingDate" th:field="*{warehousingDate}" class="form-control" placeholder="yyyy-MM-dd" type="text">-->
<!-- <span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="remarks" class="form-control">[[*{remarks}]]</textarea>
</div>
</div>
<!-- <div class="form-group"> -->
<!-- <label class="col-sm-3 control-label">检验报告:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <input type="hidden" name="inspectionReport" th:field="*{inspectionReport}">-->
<!-- <div class="file-loading">-->
<!-- <input class="form-control file-upload" id="inspectionReport" name="file" type="file">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</form>
</div>
<div class="other-container">
<div class="other">
<br><hr>
<h4>订单材料信息</h4>
<div class="col-sm-12 select-table table-striped">
<table id="addDetailTable" style="white-space:nowrap"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: bootstrap-fileinput-js"/>
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: bootstrap-table-editable-js"/>
<script th:inline="javascript">
var getData = [[${warehousingInspectionNotice}]];
var prefix = ctx + "storehouse/warehousingInspectionNotice";
var prefixDetail = ctx + "storehouse/warehousingInspectionDetail";
var prefixPurchaseOrder = ctx + "purchase/purchaseOrder"
var prefixPurchaseMaterial = ctx + "purchase/purchaseMaterial"
var purchasingUnitDatas = [[${@dict.getType('sys_unit_class')}]];
var judgmentResultsDatas = [[${@dict.getType('judgment_results')}]];
var materialTypeDatas = [[${@dict.getType('ck_meterialt_type')}]];
$("#form-warehousingInspectionNotice-edit").validate({
focusCleanup: true
});
function submitHandler() {
let getData=$('#addDetailTable').bootstrapTable('getData', true)
if(getData.length > 0){
//确认添加选中的物料数据
confirmDetailMaterial();
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-warehousingInspectionNotice-edit').serialize());
}
} else {
$.modal.alertWarning("未选择物料,请添加!")
}
}
$("input[name='inspectionDate']").datetimepicker({
format: "yyyy-mm-dd hh:ii:ss",
minView: "month",
autoclose: true
});
$("input[name='warehousingDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$(".file-upload").each(function (i) {
var val = $("input[name='" + this.id + "']").val()
$(this).fileinput({
'uploadUrl': prefix + '/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');
});
//初始化添加材料表
$('#addDetailTable').bootstrapTable({
url: prefixDetail + '/list',
pagination: true,
pageNumber: 1,
pageSize: 10,
method: "post",
contentType: "application/x-www-form-urlencoded",
striped: true, // 是否显示行间隔色
cache: false, // 是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
showToggle: false, // 是否显示详细视图和列表视图的切换按钮
cardView: false, // 是否显示详细视图
detailView: false, // 是否显示父子表
smartDisplay: false, // 加了这个才显示每页显示的行数
showExport: false, // 是否显示导出按钮
clickToSelect: true,
paginationDetailHAlign: ' hiddenDetailInfo',
height: 250,
uniqueId: 'materialCode',
queryParams: function (params) {
//console.log("123");
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
inNoticeNumber: getData.inNoticeNumber
// enterpriseCode: data[0].enterpriseCode
};
// console.log(data[0].enterpriseCode)
return curParams
},
columns: [
// {
// title: '操作',
// align: 'center',
// formatter: function (value, row, index) {
// var actions = [];
// actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeProductData(\'' + row.rawSubsidiaryCode + '\')" ><i class="fa fa-remove"></i>删除</a>');
// return actions.join('');
// }
// },
{
field: 'warehousingInspectionDetailId',
title: '入库检验通知物料id',
visible: false
},
{
field: 'inNoticeNumber',
title: '入通知单号',
visible: false
},
{
field: 'materialCode',
title: '物料代码'
},
{
field: 'materialName',
title: '物料名称'
},
{
field: 'specificationModel',
title: '规格型号'
},
{
field: 'materialType',
title: '物料类别',
formatter: function(value, row, index) {
return $.table.selectDictLabel(materialTypeDatas, value);
}
},
{
field: 'purchasingUnit',
title: '单位',
formatter: function(value, row, index) {
return $.table.selectDictLabel(purchasingUnitDatas, value);
}
},
{
field: 'materialQuantity',
title: '送货数量',
editable: {
type: 'text',
title: '送货数量',
emptytext: '送货数量',
validate: function (v) {
// if (isNaN(v)) return '数量必须是数字';
// var ex = /^[1-9]\d*$/;
// if (!ex.test(v)) return '数量必须是正整数';
}
}
},
{
field: 'qualifiedQuantity',
title: '合格数量',
editable: {
type: 'text',
title: '合格数量',
emptytext: '合格数量',
validate: function (v) {
// if (isNaN(v)) return '数量必须是数字';
// var ex = /^[1-9]\d*$/;
// if (!ex.test(v)) return '数量必须是正整数';
}
}
},
{
field: 'unqualifiedQuantity',
title: '不合格数量',
editable: {
type: 'text',
title: '不合格数量',
emptytext: '不合格数量',
validate: function (v) {
if (isNaN(v)) return '数量必须是数字';
var ex = /^[1-9]\d*$/;
if (!ex.test(v)) return '数量必须是正整数';
}
},
formatter:function(value, row, index) {
let unqualifiedQuantity = row.materialQuantity - row.qualifiedQuantity;
row.unqualifiedQuantity = row.materialQuantity - row.qualifiedQuantity;
return unqualifiedQuantity.toFixed(0);
}
},
{
field: 'qualificationRate',
title: '合格率',
editable: {
type: 'text',
title: '合格率',
emptytext: '合格率',
validate: function (v) {
}
},
formatter:function(value, row, index) {
let total = row.qualifiedQuantity / row.materialQuantity;
row.qualificationRate = row.qualifiedQuantity / row.materialQuantity;
return (total*100).toFixed(2) + '%';
}
},
{
field: 'purchaseExplain',
title: '说明',
editable: {
type: 'text',
title: '说明',
emptytext: '说明',
validate: function (v) {
}
}
},
{
field: 'judgmentResults',
title: '判定结果',
editable: {
type: 'select',
title: '判定结果',
emptytext: '判定结果',
source: function() {
let result = [];
for (let i = 0;i<judgmentResultsDatas.length;i++) {
result.push({value: judgmentResultsDatas[i].dictValue,text: judgmentResultsDatas[i].dictLabel})
}
return result;
},
validate: function (value) {
}
}
}
// {
// field: 'receiptBatchNumber',
// title: '收货批号',
// editable: {
// type: 'text',
// title: '收货批号',
// emptytext: '收货批号',
// validate: function (v) {
//
// }
// }
// },
// {
// field: 'manufacturerBatchNumber',
// title: '厂商批号',
// editable: {
// type: 'text',
// title: '厂商批号',
// emptytext: '厂商批号',
// validate: function (v) {
//
// }
// }
// }
]
})
//获取订单号
$.ajax({
url: prefixPurchaseOrder + '/list',
type: "post",
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
var orderData = res.rows;
//alert(JSON.stringify(data));
for (let i in orderData) {
// console.log(finishProductData[i].finishProductCode)
$("#form-warehousingInspectionNotice-edit select[name='purchaseOrderNumber']").append("<option value='" + orderData[i].purchaseOrderNumber + "'>" + orderData[i].purchaseOrderNumber + "</option>");
}
$("#form-warehousingInspectionNotice-edit select[name='purchaseOrderNumber']").val(getData.purchaseOrderNumber).trigger("change");
$("#form-warehousingInspectionNotice-edit select[name='purchaseOrderNumber']").change(function () {
var purchaseOrderNumber = $(this).val();
for (let i=0;i<orderData.length;i++) {
if (orderData[i].purchaseOrderNumber == purchaseOrderNumber) {
$("#form-warehousingInspectionNotice-edit input[name='supplierCode']").val(orderData[i].supplierCode);
$("#form-warehousingInspectionNotice-edit input[name='supplierName']").val(orderData[i].supplierName);
$("#form-warehousingInspectionNotice-edit input[name='customerContact']").val(orderData[i].customerContact);
//选择订单号显示表内订单信息
showDetailMaterial();
}
}
})
} else {
$.modal.msgError(res.msg);
}
}
})
//获取仓库信息
$.ajax({
url: ctx + "stock/stockInfo/list",
type: "post",
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
let stockData = res.rows;
for (let i in stockData) {
// console.log(finishProductData[i].finishProductCode)
$("#form-warehousingInspectionNotice-edit select[name='stockName']").append("<option value='" + stockData[i].stockname + "'>" + stockData[i].stockname + "</option>");
}
$("#form-warehousingInspectionNotice-edit select[name='stockName']").val(getData.stockName).trigger("change");
$("#form-warehousingInspectionNotice-edit select[name='stockName']").change(function () {
var stockName = $(this).val();
for (let i=0;i<stockData.length;i++) {
if (stockData[i].stockname == stockName) {
$("#form-warehousingInspectionNotice-edit input[name='stockNumber']").val(stockData[i].stockNO);
$("#form-warehousingInspectionNotice-edit input[name='stockManager']").val(stockData[i].stockmanager);
}
}
})
}
}
})
//选择订单号显示表内订单信息
function showDetailMaterial() {
$('#addDetailTable').bootstrapTable("removeAll")
var purchaseOrderNumber = $("select[name='purchaseOrderNumber']").val();
$.ajax({
url: prefixPurchaseMaterial + '/list',
type: 'post',
data: {
purchaseOrderNumber: purchaseOrderNumber
},
success: function (res) {
console.log(res)
var count = res.rows.length;
var data = res.rows;
var inNoticeNumber = $("input[name='inNoticeNumber']").val();
for (i = 0; i < res.rows.length; i++) {
$("#addDetailTable").bootstrapTable('insertRow', {
index: count + i,
row: {
inNoticeNumber: inNoticeNumber,
materialCode: data[i].rawSubsidiaryCode,
materialName: data[i].rawSubsidiaryName,
specificationModel: data[i].specificationModel,
materialType: data[i].materialType,
purchasingUnit: data[i].purchasingUnit,
materialQuantity: data[i].materialQuantity,
qualifiedQuantity: '',
unqualifiedQuantity: '',
qualificationRate: '',
purchaseExplain: data[i].purchaseExplain,
judgmentResults: ''
// receiptBatchNumber: '',
// manufacturerBatchNumber: '',
}
});
}
}
})
}
//确认添加选中的物料数据
function confirmDetailMaterial() {
$("#addDetailTable").bootstrapTable('refresh');
let data = $('#addDetailTable').bootstrapTable('getData', true);
// let getData=$('#addProductTable').bootstrapTable('getData', true)
// console.log(data)
$.ajax({
url: prefixDetail + '/addEditSave',
type: "POST",
data: {
data: JSON.stringify(data)
},
dataType: "json",
success: function (resp) {
// console.log(data)
console.log(resp)
},
})
}
</script>
</body>
</html>

394
ruoyi-admin/src/main/resources/templates/storehouse/warehousingInspectionNoticeFL/warehousingInspectionNoticeFL.html

@ -0,0 +1,394 @@
<!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('入库检验通知列表')" />
<th:block th:include="include :: datetimepicker-css"/>
<script type="text/javascript" th:src="@{/js/axios.min.js}"></script>
</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="inNoticeNumber"/>
</li>
<li>
<label>订购单号:</label>
<input type="text" name="purchaseOrderNumber"/>
</li>
<li>
<label>供应商代码:</label>
<input type="text" name="supplierCode"/>
</li>
<li>
<label>供应商名称:</label>
<input type="text" name="supplierName"/>
</li>
<li>
<label>入库类别:</label>
<select name="warehousingCategory" th:with="type=${@dict.getType('warehousing_category')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<!-- <li class="select-time">-->
<!-- <label>入库日期:</label>-->
<!-- <input type="text" class="time-input" id="startTime" placeholder="开始日期" name="params[beginWarehousingDate]"/>-->
<!-- <span>-</span>-->
<!-- <input type="text" class="time-input" id="endTime" placeholder="结束日期" name="params[endWarehousingDate]"/>-->
<!-- </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="storehouse:warehousingInspectionNotice:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="storehouse:warehousingInspectionNotice:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="removeSelected()" shiro:hasPermission="storehouse:warehousingInspectionNotice:remove">
<i class="fa fa-remove"></i> 删除
</a>
<!-- <a class="btn btn-warning" onclick="exportSelected()" shiro:hasPermission="storehouse:warehousingInspectionNotice:export">-->
<!-- <i class="fa fa-download"></i> 导出-->
<!-- </a>-->
<a class="btn btn-primary" onclick="reviewConfirm()" shiro:hasPermission="storehouse:warehousingInspectionNotice:confirm">
<i class="fa fa-hand-grab-o"></i> 确认
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" style="white-space: nowrap"></table>
</div>
</div>
</div>
<!--订单确认-->
<div class="modal fade" id="confirmModel">
<div class="modal-dialog">
<div class="modal-content message_align">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">×</span></button>
<h4 class="modal-title">确认信息</h4>
</div>
<div class="modal-body" style="height: 180px">
<form id="form-confirm-edit">
<div class="form-group" style="display: none">
<label class="col-sm-3 control-label is-required">入库检验通知id:</label>
<div class="col-sm-8">
<input id="warehousingInspectionNoticeId" name="warehousingInspectionNoticeId" class="form-control" type="text" required
readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">确认否:</label>
<div class="col-sm-8">
<select id="confirmFlag" name="confirmFlag" class="form-control" th:with="type=${@dict.getType('sys_whether')}">
<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">
<div class="input-group date">
<input id="confirmTime" name="confirmTime" class="form-control" placeholder="yyyy-mm-dd hh:ii:ss" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">确认人:</label>
<div class="col-sm-8">
<input id="confirmPerson" name="confirmPerson" class="form-control" type="text">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button type="button" onclick="confirmSubmit()" class="btn btn-success" data-dismiss="modal">确定</button>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('storehouse:warehousingInspectionNotice:edit')}]];
var removeFlag = [[${@permission.hasPermi('storehouse:warehousingInspectionNotice:remove')}]];
var exportSalesDatas = [[${@dict.getType('sys_export_sales')}]];
var warehousingCategoryDatas = [[${@dict.getType('warehousing_category')}]];
var confirmNoDatas = [[${@dict.getType('sys_whether')}]];
var prefix = ctx + "storehouse/warehousingInspectionNotice";
var prefixDetail = ctx + "storehouse/warehousingInspectionDetail"
$(function() {
var options = {
url: prefix + "/listFL",
createUrl: prefix + "/addFL",
updateUrl: prefix + "/editFL/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
clickToSelect: true,
modalName: "入库检验通知",
columns: [{
checkbox: true
},
{
field: 'warehousingInspectionNoticeId',
title: '入库检验通知id',
visible: false
},
{
field: 'confirmFlag',
title: '确认否',
formatter: function(value, row, index) {
// return $.table.selectDictLabel(confirmNoDatas, value);
var actions = [];
if ($.table.selectDictLabel(confirmNoDatas, value) == "<span class=''></span>") {
actions.push('<a class="btn btn-primary btn-xs disabled">已确认</a> ');
} else {
actions.push('<a class="btn btn-danger btn-xs disabled">未确认</a> ');
}
return actions.join('');
}
},
{
field: 'inNoticeNumber',
title: '入通知单号'
},
{
field: 'purchaseOrderNumber',
title: '订购单号'
},
{
field: 'supplierCode',
title: '供应商代码'
},
{
field: 'supplierName',
title: '供应商名称'
},
{
field: 'customerContact',
title: '联系人'
},
{
field: 'stockNumber',
title: '仓库编号'
},
{
field: 'stockName',
title: '仓库名称'
},
{
field: 'stockManager',
title: '仓库管理员'
},
{
field: 'exportSales',
title: '内外销',
formatter: function(value, row, index) {
return $.table.selectDictLabel(exportSalesDatas, value);
}
},
{
field: 'warehousingCategory',
title: '入库类别',
formatter: function(value, row, index) {
return $.table.selectDictLabel(warehousingCategoryDatas, value);
}
},
{
field: 'inspectionDate',
title: '交检时间'
},
// {
// field: 'warehousingDate',
// title: '入库日期'
// },
{
field: 'remarks',
title: '备注'
},
// {
// field: 'inspectionReport',
// title: '检验报告',
// formatter: function(value, row, index) {
// console.log(value)
// if (value !== null) {
// var filepath = value.substring(value.lastIndexOf("/")+1)
// var actions = [];
// actions.push('<a href="javascript:void(0)" onclick="downloadFile(\'' + value + '\')">'+filepath+'</a> ');
// return actions.join('');
// } else {
// return value
// }
//
// }
// },
{
field: 'confirmPerson',
title: '确认人',
visible: false
},
{
field: 'confirmTime',
title: '确认时间',
visible: false
},
{
field: 'firstAddTime',
title: '录入时间',
formatter: function (value, row, index) {
if (value == null) {
return " ";
} else {
return value;
}
}
},
{
field: 'updateInfoTime',
title: '上次修改时间',
formatter: function (value, row, index) {
if (value == null) {
return " ";
} else {
var vArr = value.split(',')
return vArr[0];
}
}
}]
};
$.table.init(options);
});
/*下载*/
function downloadFile(filepath) {
window.location.href =prefix + "/downloadFile?filepath="+ filepath;
}
//删除
function removeSelected() {
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
console.log(rows)
if (rows.length > 0) {
$.modal.confirm("是否删除选中的"+ rows.length +"条辅料入库检验通知单?", function () {
$.ajax({
url: prefix + '/removeSelected',
type: 'post',
data: {
ids : rows.join()
},
success: function (res) {
// console.log(res)
$("#bootstrap-table").bootstrapTable("refresh");
$.modal.msgSuccess("删除成功!")
},
error: function (res) {
$.modal.msgError(res.error())
}
})
})
} else {
$.modal.msgWarning("请选择一条数据")
}
}
//导出
function exportSelected() {
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
var data = $("#bootstrap-table").bootstrapTable("getSelections")
if (rows.length !== 1) {
$.modal.alert("请选择一条记录");
return;
} else {
// rows为选中行的id
// console.log(rows);
// console.log(data);
// console.log(data[0].orderNumber)
$.modal.confirm("是否确认要导出本条订单?", function (){
axios({
url: prefix + '/exportSelected/'+data[0].warehousingInspectionNoticeId,
method: 'POST',
responseType: 'blob'
}).then(response => {
// console.log(response)
const URL = window.URL.createObjectURL(response.data)
// 创建隐藏<a>标签进行下载
const tempLink = document.createElement('a')
tempLink.style.display = 'none'
tempLink.href = URL
let time = new Date().toLocaleString()
tempLink.setAttribute('download', time + "物料检验通知单.xlsx")
if (typeof tempLink.download === 'undefined') {
tempLink.setAttribute('target', '_blank')
}
document.body.appendChild(tempLink)
tempLink.click()
document.body.removeChild(tempLink)// 移除dom元素
window.URL.revokeObjectURL(URL)//释放内存
})
});
}
}
$("input[name='confirmTime']").datetimepicker({
format: "yyyy-mm-dd hh:ii:ss",
minView: "month",
autoclose: true
});
// 订单确认
function reviewConfirm(){
let data = $("#bootstrap-table").bootstrapTable("getSelections");
let userName = [[${@permission.getPrincipalProperty('userName')}]];
if (data.length ===1) {
$("#warehousingInspectionNoticeId").val(data[0].warehousingInspectionNoticeId)
$("#confirmFlag").val(data[0].confirmFlag).trigger("change")
$("#confirmPerson").val(userName)
$("#confirmTime").datetimepicker("setDate", new Date());
$("#confirmModel").modal("show");
}else {
$.modal.alert("请选择一条数据");
}
}
// 订单确认
function confirmSubmit(){
$.ajax({
url: prefix + "/edit",
type: "post",
resultType: "json",
data: $('#form-confirm-edit').serialize(),
success: function (resp) {
// console.log(resp)
$("#confirmModel").modal("hide");
$("#bootstrap-table").bootstrapTable('refresh');
$.modal.msgSuccess("操作成功!")
},
error: function () {
$.modal.msgError("出错了!");
}
});
}
</script>
</body>
</html>

547
ruoyi-admin/src/main/resources/templates/storehouse/warehousingInspectionNoticeYL/add.html

@ -0,0 +1,547 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增入库检验通知')" />
<th:block th:include="include :: datetimepicker-css" />
<th:block th:include="include :: bootstrap-fileinput-css"/>
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet">
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet">
<th:block th:include="include :: bootstrap-editable-css"/>
<style>
.other-container {
width: 90%;
height: 200px;
margin: auto;
}
.other {
margin-top: 20px;
}
h4 {
display: inline-block;
margin-right: 20px;
}
.modal-body{
height: 550px;
}
iframe{
width: 100%;
height: 500px;
frameborder: 0;
border: 0;
display: inline-block;
}
</style>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-warehousingInspectionNotice-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">入通知单号:</label>
<div class="col-sm-8">
<input name="inNoticeNumber" class="form-control" type="text" required readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">订购单号:</label>
<div class="col-sm-8">
<select name="purchaseOrderNumber" class="form-control m-b" required>
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">供应商代码:</label>
<div class="col-sm-8">
<input name="supplierCode" 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="supplierName" 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="customerContact" 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="stockName" class="form-control m-b">
<option value="">请选择仓库名称</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库编号:</label>
<div class="col-sm-8">
<input name="stockNumber" 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="stockManager" 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="exportSales" class="form-control m-b" th:with="type=${@dict.getType('sys_export_sales')}">
<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">
<select name="warehousingCategory" class="form-control m-b" th:with="type=${@dict.getType('warehousing_category')}">
<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">
<div class="input-group date">
<input name="inspectionDate" class="form-control" placeholder="yyyy-MM-dd hh:ii:ss" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<!-- <div class="form-group"> -->
<!-- <label class="col-sm-3 control-label">入库日期:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <div class="input-group date">-->
<!-- <input name="warehousingDate" class="form-control" placeholder="yyyy-MM-dd" type="text">-->
<!-- <span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="remarks" 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="inspectionReport">
<div class="file-loading">
<input class="form-control file-upload" id="inspectionReport" name="file" type="file">
</div>
</div>
</div>
<div class="form-group hidden">
<label class="col-sm-3 control-label">确认否:</label>
<div class="col-sm-8">
<select name="confirmFlag" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
</form>
</div>
<div class="other-container">
<div class="other">
<br><hr>
<h4>订单材料信息</h4>
<div class="col-sm-12 select-table table-striped">
<table id="addDetailTable" style="white-space:nowrap"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: bootstrap-fileinput-js"/>
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: bootstrap-table-editable-js"/>
<script th:inline="javascript">
var prefix = ctx + "storehouse/warehousingInspectionNotice"
var prefixDetail = ctx + "storehouse/warehousingInspectionDetail"
var prefixPurchaseOrder = ctx + "purchase/purchaseOrder"
var prefixPurchaseMaterial = ctx + "purchase/purchaseMaterial"
var purchasingUnitDatas = [[${@dict.getType('sys_unit_class')}]];
var judgmentResultsDatas = [[${@dict.getType('judgment_results')}]];
var materialTypeDatas = [[${@dict.getType('ck_meterialt_type')}]];
$("#form-warehousingInspectionNotice-add").validate({
focusCleanup: true
});
function submitHandler() {
let getData=$('#addDetailTable').bootstrapTable('getData', true)
if(getData.length > 0){
//确认添加选中的物料数据
confirmDetailMaterial();
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-warehousingInspectionNotice-add').serialize());
}
} else {
$.modal.alertWarning("未选择物料,请添加!")
}
}
$("input[name='inspectionDate']").datetimepicker({
format: "yyyy-mm-dd hh:ii:ss",
minView: "month",
autoclose: true,
todayBtn: true
});
$("input[name='inspectionDate']").datetimepicker("setDate", new Date());
$("input[name='warehousingDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true,
todayBtn: true
});
$("input[name='warehousingDate']").datetimepicker("setDate", new Date());
$(".file-upload").fileinput({
uploadUrl: prefix + '/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('')
})
//获取单号
$.ajax({
url: prefix + "/getIdYL",
type: "post",
dateType: "json",
success: function (resp) {
if (resp.code === 0) {
$("input[name='inNoticeNumber']").val(resp.data);
} else {
$.modal.msgError("失败啦");
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
});
//初始化添加材料表
$('#addDetailTable').bootstrapTable({
pagination: true,
pageNumber: 1,
pageSize: 10,
showToggle: false, // 是否显示详细视图和列表视图的切换按钮
cardView: false, // 是否显示详细视图
detailView: false, // 是否显示父子表
smartDisplay: false, // 加了这个才显示每页显示的行数
showExport: false, // 是否显示导出按钮
clickToSelect: true,//点击行选中
contentType: "application/x-www-form-urlencoded",
paginationDetailHAlign: ' hiddenDetailInfo',
height: 250,
uniqueId: 'materialCode',
queryParams: function (params) {
//console.log("123");
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
// enterpriseCode: data[0].enterpriseCode
};
// console.log(data[0].enterpriseCode)
return curParams
},
columns: [
// {
// title: '操作',
// align: 'center',
// formatter: function (value, row, index) {
// var actions = [];
// actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeProductData(\'' + row.rawSubsidiaryCode + '\')" ><i class="fa fa-remove"></i>删除</a>');
// return actions.join('');
// }
// },
{
field: 'warehousingInspectionDetailId',
title: '入库检验通知物料id',
visible: false
},
{
field: 'inNoticeNumber',
title: '入通知单号',
visible: false
},
{
field: 'materialCode',
title: '物料代码'
},
{
field: 'materialName',
title: '物料名称'
},
{
field: 'specificationModel',
title: '规格型号'
},
{
field: 'materialType',
title: '物料类别',
formatter: function(value, row, index) {
return $.table.selectDictLabel(materialTypeDatas, value);
}
},
{
field: 'purchasingUnit',
title: '单位',
formatter: function(value, row, index) {
return $.table.selectDictLabel(purchasingUnitDatas, value);
}
},
{
field: 'materialQuantity',
title: '送货数量',
editable: {
type: 'text',
title: '送货数量',
emptytext: '送货数量',
validate: function (v) {
// if (isNaN(v)) return '数量必须是数字';
// var ex = /^[1-9]\d*$/;
// if (!ex.test(v)) return '数量必须是正整数';
}
}
},
// {
// field: 'qualifiedQuantity',
// title: '合格数量',
// editable: {
// type: 'text',
// title: '合格数量',
// emptytext: '合格数量',
// validate: function (v) {
// // if (isNaN(v)) return '数量必须是数字';
// // var ex = /^[1-9]\d*$/;
// // if (!ex.test(v)) return '数量必须是正整数';
// }
// }
// },
// {
// field: 'unqualifiedQuantity',
// title: '不合格数量',
// editable: {
// type: 'text',
// title: '不合格数量',
// emptytext: '不合格数量',
// validate: function (v) {
// if (isNaN(v)) return '数量必须是数字';
// var ex = /^[1-9]\d*$/;
// if (!ex.test(v)) return '数量必须是正整数';
// }
// },
// formatter:function(value, row, index) {
// let unqualifiedQuantity = row.materialQuantity - row.qualifiedQuantity;
// row.unqualifiedQuantity = row.materialQuantity - row.qualifiedQuantity;
// return unqualifiedQuantity.toFixed(0);
// }
// },
// {
// field: 'qualificationRate',
// title: '合格率',
// editable: {
// type: 'text',
// title: '合格率',
// emptytext: '合格率',
// validate: function (v) {
//
// }
// },
// formatter:function(value, row, index) {
// let total = row.qualifiedQuantity / row.materialQuantity;
// row.qualificationRate = row.qualifiedQuantity / row.materialQuantity;
// return (total*100).toFixed(2) + '%';
// }
// },
{
field: 'purchaseExplain',
title: '说明',
editable: {
type: 'text',
title: '说明',
emptytext: '说明',
validate: function (v) {
}
}
},
{
field: 'judgmentResults',
title: '判定结果',
editable: {
type: 'select',
title: '判定结果',
emptytext: '判定结果',
source: function() {
let result = [];
for (let i = 0;i<judgmentResultsDatas.length;i++) {
result.push({value: judgmentResultsDatas[i].dictValue,text: judgmentResultsDatas[i].dictLabel})
}
return result;
},
validate: function (value) {
}
}
},
{
field: 'receiptBatchNumber',
title: '收货批号',
editable: {
type: 'text',
title: '收货批号',
emptytext: '收货批号',
validate: function (v) {
}
}
},
{
field: 'manufacturerBatchNumber',
title: '厂商批号',
editable: {
type: 'text',
title: '厂商批号',
emptytext: '厂商批号',
validate: function (v) {
}
}
}]
})
//获取订单号
$.ajax({
url: prefixPurchaseOrder + '/list',
type: "post",
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
var orderData = res.rows;
//alert(JSON.stringify(data));
for (let i in orderData) {
// console.log(finishProductData[i].finishProductCode)
$("#form-warehousingInspectionNotice-add select[name='purchaseOrderNumber']").append("<option value='" + orderData[i].purchaseOrderNumber + "'>" + orderData[i].purchaseOrderNumber + "</option>");
}
$("#form-warehousingInspectionNotice-add select[name='purchaseOrderNumber']").change(function () {
var purchaseOrderNumber = $(this).val();
for (let i=0;i<orderData.length;i++) {
if (orderData[i].purchaseOrderNumber == purchaseOrderNumber) {
$("#form-warehousingInspectionNotice-add input[name='supplierCode']").val(orderData[i].supplierCode);
$("#form-warehousingInspectionNotice-add input[name='supplierName']").val(orderData[i].supplierName);
$("#form-warehousingInspectionNotice-add input[name='customerContact']").val(orderData[i].customerContact);
//选择订单号显示表内订单信息
showDetailMaterial();
}
}
})
} else {
$.modal.msgError(res.msg);
}
}
})
//获取仓库信息
$.ajax({
url: ctx + "stock/stockInfo/list",
type: "post",
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
let stockData = res.rows;
for (let i in stockData) {
// console.log(finishProductData[i].finishProductCode)
$("#form-warehousingInspectionNotice-add select[name='stockName']").append("<option value='" + stockData[i].stockname + "'>" + stockData[i].stockname + "</option>");
}
$("#form-warehousingInspectionNotice-add select[name='stockName']").change(function () {
var stockName = $(this).val();
for (let i=0;i<stockData.length;i++) {
if (stockData[i].stockname == stockName) {
$("#form-warehousingInspectionNotice-add input[name='stockNumber']").val(stockData[i].stockNO);
$("#form-warehousingInspectionNotice-add input[name='stockManager']").val(stockData[i].stockmanager);
}
}
})
}
}
})
//选择订单号显示表内订单信息
function showDetailMaterial() {
$('#addDetailTable').bootstrapTable("removeAll")
var purchaseOrderNumber = $("select[name='purchaseOrderNumber']").val();
$.ajax({
url: prefixPurchaseMaterial + '/list',
type: 'post',
data: {
purchaseOrderNumber: purchaseOrderNumber
},
success: function (res) {
console.log(res)
var count = res.rows.length;
var data = res.rows;
var inNoticeNumber = $("input[name='inNoticeNumber']").val();
for (i = 0; i < res.rows.length; i++) {
$("#addDetailTable").bootstrapTable('insertRow', {
index: count + i,
row: {
inNoticeNumber: inNoticeNumber,
materialCode: data[i].rawSubsidiaryCode,
materialName: data[i].rawSubsidiaryName,
specificationModel: data[i].specificationModel,
materialType: data[i].materialType,
purchasingUnit: data[i].purchasingUnit,
materialQuantity: data[i].materialQuantity,
// qualifiedQuantity: '',
// unqualifiedQuantity: '',
// qualificationRate: '',
purchaseExplain: data[i].purchaseExplain,
judgmentResults: '',
receiptBatchNumber: '',
manufacturerBatchNumber: '',
}
});
}
}
})
}
//确认添加选中的物料数据
function confirmDetailMaterial() {
$("#addDetailTable").bootstrapTable('refresh');
let data = $('#addDetailTable').bootstrapTable('getData', true);
// let getData=$('#addProductTable').bootstrapTable('getData', true)
// console.log(data)
$.ajax({
url: prefixDetail + '/addEditSave',
type: "POST",
data: {
data: JSON.stringify(data)
},
dataType: "json",
success: function (resp) {
// console.log(data)
console.log(resp)
},
})
}
</script>
</body>
</html>

534
ruoyi-admin/src/main/resources/templates/storehouse/warehousingInspectionNoticeYL/edit.html

@ -0,0 +1,534 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改入库检验通知')" />
<th:block th:include="include :: datetimepicker-css" />
<th:block th:include="include :: bootstrap-fileinput-css"/>
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet">
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet">
<th:block th:include="include :: bootstrap-editable-css"/>
<style>
.other-container {
width: 90%;
height: 200px;
margin: auto;
}
.other {
margin-top: 20px;
}
h4 {
display: inline-block;
margin-right: 20px;
}
.modal-body{
height: 550px;
}
iframe{
width: 100%;
height: 500px;
frameborder: 0;
border: 0;
display: inline-block;
}
</style>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-warehousingInspectionNotice-edit" th:object="${warehousingInspectionNotice}">
<input name="warehousingInspectionNoticeId" th:field="*{warehousingInspectionNoticeId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">入通知单号:</label>
<div class="col-sm-8">
<input name="inNoticeNumber" th:field="*{inNoticeNumber}" class="form-control" type="text" required readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">订购单号:</label>
<div class="col-sm-8">
<select name="purchaseOrderNumber" class="form-control m-b" th:field="*{purchaseOrderNumber}" disabled>
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">供应商代码:</label>
<div class="col-sm-8">
<input name="supplierCode" th:field="*{supplierCode}" 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="supplierName" th:field="*{supplierName}" 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="customerContact" th:field="*{customerContact}" 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="stockName" class="form-control m-b" th:field="*{stockName}">
<option value="">请选择仓库名称</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库编号:</label>
<div class="col-sm-8">
<input name="stockNumber" th:field="*{stockNumber}" 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="stockManager" th:field="*{stockManager}" 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="exportSales" class="form-control m-b" th:with="type=${@dict.getType('sys_export_sales')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{exportSales}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库类别:</label>
<div class="col-sm-8">
<select name="warehousingCategory" class="form-control m-b" th:with="type=${@dict.getType('warehousing_category')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{warehousingCategory}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">交检时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="inspectionDate" th:field="*{inspectionDate}" class="form-control" placeholder="yyyy-MM-dd hh:ii:ss" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<!-- <div class="form-group"> -->
<!-- <label class="col-sm-3 control-label">入库日期:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <div class="input-group date">-->
<!-- <input name="warehousingDate" th:field="*{warehousingDate}" class="form-control" placeholder="yyyy-MM-dd" type="text">-->
<!-- <span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="remarks" class="form-control">[[*{remarks}]]</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">检验报告:</label>
<div class="col-sm-8">
<input type="hidden" name="inspectionReport" th:field="*{inspectionReport}">
<div class="file-loading">
<input class="form-control file-upload" id="inspectionReport" name="file" type="file">
</div>
</div>
</div>
</form>
</div>
<div class="other-container">
<div class="other">
<br><hr>
<h4>订单材料信息</h4>
<div class="col-sm-12 select-table table-striped">
<table id="addDetailTable" style="white-space:nowrap"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: bootstrap-fileinput-js"/>
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: bootstrap-table-editable-js"/>
<script th:inline="javascript">
var getData = [[${warehousingInspectionNotice}]];
var prefix = ctx + "storehouse/warehousingInspectionNotice";
var prefixDetail = ctx + "storehouse/warehousingInspectionDetail";
var prefixPurchaseOrder = ctx + "purchase/purchaseOrder"
var prefixPurchaseMaterial = ctx + "purchase/purchaseMaterial"
var purchasingUnitDatas = [[${@dict.getType('sys_unit_class')}]];
var judgmentResultsDatas = [[${@dict.getType('judgment_results')}]];
var materialTypeDatas = [[${@dict.getType('ck_meterialt_type')}]];
$("#form-warehousingInspectionNotice-edit").validate({
focusCleanup: true
});
function submitHandler() {
let getData=$('#addDetailTable').bootstrapTable('getData', true)
if(getData.length > 0){
//确认添加选中的物料数据
confirmDetailMaterial();
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-warehousingInspectionNotice-edit').serialize());
}
} else {
$.modal.alertWarning("未选择物料,请添加!")
}
}
$("input[name='inspectionDate']").datetimepicker({
format: "yyyy-mm-dd hh:ii:ss",
minView: "month",
autoclose: true
});
$("input[name='warehousingDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$(".file-upload").each(function (i) {
var val = $("input[name='" + this.id + "']").val()
$(this).fileinput({
'uploadUrl': prefix + '/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');
});
//初始化添加材料表
$('#addDetailTable').bootstrapTable({
url: prefixDetail + '/list',
pagination: true,
pageNumber: 1,
pageSize: 10,
method: "post",
contentType: "application/x-www-form-urlencoded",
striped: true, // 是否显示行间隔色
cache: false, // 是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
showToggle: false, // 是否显示详细视图和列表视图的切换按钮
cardView: false, // 是否显示详细视图
detailView: false, // 是否显示父子表
smartDisplay: false, // 加了这个才显示每页显示的行数
showExport: false, // 是否显示导出按钮
clickToSelect: true,
paginationDetailHAlign: ' hiddenDetailInfo',
height: 250,
uniqueId: 'materialCode',
queryParams: function (params) {
//console.log("123");
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
inNoticeNumber: getData.inNoticeNumber
// enterpriseCode: data[0].enterpriseCode
};
// console.log(data[0].enterpriseCode)
return curParams
},
columns: [
// {
// title: '操作',
// align: 'center',
// formatter: function (value, row, index) {
// var actions = [];
// actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeProductData(\'' + row.rawSubsidiaryCode + '\')" ><i class="fa fa-remove"></i>删除</a>');
// return actions.join('');
// }
// },
{
field: 'warehousingInspectionDetailId',
title: '入库检验通知物料id',
visible: false
},
{
field: 'inNoticeNumber',
title: '入通知单号',
visible: false
},
{
field: 'materialCode',
title: '物料代码'
},
{
field: 'materialName',
title: '物料名称'
},
{
field: 'specificationModel',
title: '规格型号'
},
{
field: 'materialType',
title: '物料类别',
formatter: function(value, row, index) {
return $.table.selectDictLabel(materialTypeDatas, value);
}
},
{
field: 'purchasingUnit',
title: '单位',
formatter: function(value, row, index) {
return $.table.selectDictLabel(purchasingUnitDatas, value);
}
},
{
field: 'materialQuantity',
title: '送货数量',
editable: {
type: 'text',
title: '送货数量',
emptytext: '送货数量',
validate: function (v) {
// if (isNaN(v)) return '数量必须是数字';
// var ex = /^[1-9]\d*$/;
// if (!ex.test(v)) return '数量必须是正整数';
}
}
},
// {
// field: 'qualifiedQuantity',
// title: '合格数量',
// editable: {
// type: 'text',
// title: '合格数量',
// emptytext: '合格数量',
// validate: function (v) {
// // if (isNaN(v)) return '数量必须是数字';
// // var ex = /^[1-9]\d*$/;
// // if (!ex.test(v)) return '数量必须是正整数';
// }
// }
// },
// {
// field: 'unqualifiedQuantity',
// title: '不合格数量',
// editable: {
// type: 'text',
// title: '不合格数量',
// emptytext: '不合格数量',
// validate: function (v) {
// if (isNaN(v)) return '数量必须是数字';
// var ex = /^[1-9]\d*$/;
// if (!ex.test(v)) return '数量必须是正整数';
// }
// },
// formatter:function(value, row, index) {
// let unqualifiedQuantity = row.materialQuantity - row.qualifiedQuantity;
// row.unqualifiedQuantity = row.materialQuantity - row.qualifiedQuantity;
// return unqualifiedQuantity.toFixed(0);
// }
// },
// {
// field: 'qualificationRate',
// title: '合格率',
// editable: {
// type: 'text',
// title: '合格率',
// emptytext: '合格率',
// validate: function (v) {
//
// }
// },
// formatter:function(value, row, index) {
// let total = row.qualifiedQuantity / row.materialQuantity;
// row.qualificationRate = row.qualifiedQuantity / row.materialQuantity;
// return (total*100).toFixed(2) + '%';
// }
// },
{
field: 'purchaseExplain',
title: '说明',
editable: {
type: 'text',
title: '说明',
emptytext: '说明',
validate: function (v) {
}
}
},
{
field: 'judgmentResults',
title: '判定结果',
editable: {
type: 'select',
title: '判定结果',
emptytext: '判定结果',
source: function() {
let result = [];
for (let i = 0;i<judgmentResultsDatas.length;i++) {
result.push({value: judgmentResultsDatas[i].dictValue,text: judgmentResultsDatas[i].dictLabel})
}
return result;
},
validate: function (value) {
}
}
},
{
field: 'receiptBatchNumber',
title: '收货批号',
editable: {
type: 'text',
title: '收货批号',
emptytext: '收货批号',
validate: function (v) {
}
}
},
{
field: 'manufacturerBatchNumber',
title: '厂商批号',
editable: {
type: 'text',
title: '厂商批号',
emptytext: '厂商批号',
validate: function (v) {
}
}
}]
})
//获取订单号
$.ajax({
url: prefixPurchaseOrder + '/list',
type: "post",
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
var orderData = res.rows;
//alert(JSON.stringify(data));
for (let i in orderData) {
// console.log(finishProductData[i].finishProductCode)
$("#form-warehousingInspectionNotice-edit select[name='purchaseOrderNumber']").append("<option value='" + orderData[i].purchaseOrderNumber + "'>" + orderData[i].purchaseOrderNumber + "</option>");
}
$("#form-warehousingInspectionNotice-edit select[name='purchaseOrderNumber']").val(getData.purchaseOrderNumber).trigger("change");
$("#form-warehousingInspectionNotice-edit select[name='purchaseOrderNumber']").change(function () {
var purchaseOrderNumber = $(this).val();
for (let i=0;i<orderData.length;i++) {
if (orderData[i].purchaseOrderNumber == purchaseOrderNumber) {
$("#form-warehousingInspectionNotice-edit input[name='supplierCode']").val(orderData[i].supplierCode);
$("#form-warehousingInspectionNotice-edit input[name='supplierName']").val(orderData[i].supplierName);
$("#form-warehousingInspectionNotice-edit input[name='customerContact']").val(orderData[i].customerContact);
//选择订单号显示表内订单信息
showDetailMaterial();
}
}
})
} else {
$.modal.msgError(res.msg);
}
}
})
//获取仓库信息
$.ajax({
url: ctx + "stock/stockInfo/list",
type: "post",
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
let stockData = res.rows;
for (let i in stockData) {
// console.log(finishProductData[i].finishProductCode)
$("#form-warehousingInspectionNotice-edit select[name='stockName']").append("<option value='" + stockData[i].stockname + "'>" + stockData[i].stockname + "</option>");
}
$("#form-warehousingInspectionNotice-edit select[name='stockName']").val(getData.stockName).trigger("change");
$("#form-warehousingInspectionNotice-edit select[name='stockName']").change(function () {
var stockName = $(this).val();
for (let i=0;i<stockData.length;i++) {
if (stockData[i].stockname == stockName) {
$("#form-warehousingInspectionNotice-edit input[name='stockNumber']").val(stockData[i].stockNO);
$("#form-warehousingInspectionNotice-edit input[name='stockManager']").val(stockData[i].stockmanager);
}
}
})
}
}
})
//选择订单号显示表内订单信息
function showDetailMaterial() {
$('#addDetailTable').bootstrapTable("removeAll")
var purchaseOrderNumber = $("select[name='purchaseOrderNumber']").val();
$.ajax({
url: prefixPurchaseMaterial + '/list',
type: 'post',
data: {
purchaseOrderNumber: purchaseOrderNumber
},
success: function (res) {
console.log(res)
var count = res.rows.length;
var data = res.rows;
var inNoticeNumber = $("input[name='inNoticeNumber']").val();
for (i = 0; i < res.rows.length; i++) {
$("#addDetailTable").bootstrapTable('insertRow', {
index: count + i,
row: {
inNoticeNumber: inNoticeNumber,
materialCode: data[i].rawSubsidiaryCode,
materialName: data[i].rawSubsidiaryName,
specificationModel: data[i].specificationModel,
materialType: data[i].materialType,
purchasingUnit: data[i].purchasingUnit,
materialQuantity: data[i].materialQuantity,
qualifiedQuantity: '',
unqualifiedQuantity: '',
qualificationRate: '',
purchaseExplain: data[i].purchaseExplain,
judgmentResults: '',
receiptBatchNumber: '',
manufacturerBatchNumber: '',
}
});
}
}
})
}
//确认添加选中的物料数据
function confirmDetailMaterial() {
$("#addDetailTable").bootstrapTable('refresh');
let data = $('#addDetailTable').bootstrapTable('getData', true);
// let getData=$('#addProductTable').bootstrapTable('getData', true)
// console.log(data)
$.ajax({
url: prefixDetail + '/addEditSave',
type: "POST",
data: {
data: JSON.stringify(data)
},
dataType: "json",
success: function (resp) {
// console.log(data)
console.log(resp)
},
})
}
</script>
</body>
</html>

394
ruoyi-admin/src/main/resources/templates/storehouse/warehousingInspectionNoticeYL/warehousingInspectionNoticeYL.html

@ -0,0 +1,394 @@
<!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('入库检验通知列表')" />
<th:block th:include="include :: datetimepicker-css"/>
<script type="text/javascript" th:src="@{/js/axios.min.js}"></script>
</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="inNoticeNumber"/>
</li>
<li>
<label>订购单号:</label>
<input type="text" name="purchaseOrderNumber"/>
</li>
<li>
<label>供应商代码:</label>
<input type="text" name="supplierCode"/>
</li>
<li>
<label>供应商名称:</label>
<input type="text" name="supplierName"/>
</li>
<li>
<label>入库类别:</label>
<select name="warehousingCategory" th:with="type=${@dict.getType('warehousing_category')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<!-- <li class="select-time">-->
<!-- <label>入库日期:</label>-->
<!-- <input type="text" class="time-input" id="startTime" placeholder="开始日期" name="params[beginWarehousingDate]"/>-->
<!-- <span>-</span>-->
<!-- <input type="text" class="time-input" id="endTime" placeholder="结束日期" name="params[endWarehousingDate]"/>-->
<!-- </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="storehouse:warehousingInspectionNotice:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="storehouse:warehousingInspectionNotice:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="removeSelected()" shiro:hasPermission="storehouse:warehousingInspectionNotice:remove">
<i class="fa fa-remove"></i> 删除
</a>
<!-- <a class="btn btn-warning" onclick="exportSelected()" shiro:hasPermission="storehouse:warehousingInspectionNotice:export">-->
<!-- <i class="fa fa-download"></i> 导出-->
<!-- </a>-->
<a class="btn btn-primary" onclick="reviewConfirm()" shiro:hasPermission="storehouse:warehousingInspectionNotice:confirm">
<i class="fa fa-hand-grab-o"></i> 确认
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" style="white-space: nowrap"></table>
</div>
</div>
</div>
<!--订单确认-->
<div class="modal fade" id="confirmModel">
<div class="modal-dialog">
<div class="modal-content message_align">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">×</span></button>
<h4 class="modal-title">确认信息</h4>
</div>
<div class="modal-body" style="height: 180px">
<form id="form-confirm-edit">
<div class="form-group" style="display: none">
<label class="col-sm-3 control-label is-required">入库检验通知id:</label>
<div class="col-sm-8">
<input id="warehousingInspectionNoticeId" name="warehousingInspectionNoticeId" class="form-control" type="text" required
readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">确认否:</label>
<div class="col-sm-8">
<select id="confirmFlag" name="confirmFlag" class="form-control" th:with="type=${@dict.getType('sys_whether')}">
<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">
<div class="input-group date">
<input id="confirmTime" name="confirmTime" class="form-control" placeholder="yyyy-mm-dd hh:ii:ss" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">确认人:</label>
<div class="col-sm-8">
<input id="confirmPerson" name="confirmPerson" class="form-control" type="text">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button type="button" onclick="confirmSubmit()" class="btn btn-success" data-dismiss="modal">确定</button>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('storehouse:warehousingInspectionNotice:edit')}]];
var removeFlag = [[${@permission.hasPermi('storehouse:warehousingInspectionNotice:remove')}]];
var exportSalesDatas = [[${@dict.getType('sys_export_sales')}]];
var warehousingCategoryDatas = [[${@dict.getType('warehousing_category')}]];
var confirmNoDatas = [[${@dict.getType('sys_whether')}]];
var prefix = ctx + "storehouse/warehousingInspectionNotice";
var prefixDetail = ctx + "storehouse/warehousingInspectionDetail"
$(function() {
var options = {
url: prefix + "/listYL",
createUrl: prefix + "/addYL",
updateUrl: prefix + "/editYL/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
clickToSelect: true,
modalName: "入库检验通知",
columns: [{
checkbox: true
},
{
field: 'warehousingInspectionNoticeId',
title: '入库检验通知id',
visible: false
},
{
field: 'confirmFlag',
title: '确认否',
formatter: function(value, row, index) {
// return $.table.selectDictLabel(confirmNoDatas, value);
var actions = [];
if ($.table.selectDictLabel(confirmNoDatas, value) == "<span class=''></span>") {
actions.push('<a class="btn btn-primary btn-xs disabled">已确认</a> ');
} else {
actions.push('<a class="btn btn-danger btn-xs disabled">未确认</a> ');
}
return actions.join('');
}
},
{
field: 'inNoticeNumber',
title: '入通知单号'
},
{
field: 'purchaseOrderNumber',
title: '订购单号'
},
{
field: 'supplierCode',
title: '供应商代码'
},
{
field: 'supplierName',
title: '供应商名称'
},
{
field: 'customerContact',
title: '联系人'
},
{
field: 'stockNumber',
title: '仓库编号'
},
{
field: 'stockName',
title: '仓库名称'
},
{
field: 'stockManager',
title: '仓库管理员'
},
{
field: 'exportSales',
title: '内外销',
formatter: function(value, row, index) {
return $.table.selectDictLabel(exportSalesDatas, value);
}
},
{
field: 'warehousingCategory',
title: '入库类别',
formatter: function(value, row, index) {
return $.table.selectDictLabel(warehousingCategoryDatas, value);
}
},
{
field: 'inspectionDate',
title: '交检时间'
},
// {
// field: 'warehousingDate',
// title: '入库日期'
// },
{
field: 'remarks',
title: '备注'
},
{
field: 'inspectionReport',
title: '检验报告',
formatter: function(value, row, index) {
console.log(value)
if (value !== null) {
var filepath = value.substring(value.lastIndexOf("/")+1)
var actions = [];
actions.push('<a href="javascript:void(0)" onclick="downloadFile(\'' + value + '\')">'+filepath+'</a> ');
return actions.join('');
} else {
return value
}
}
},
{
field: 'confirmPerson',
title: '确认人',
visible: false
},
{
field: 'confirmTime',
title: '确认时间',
visible: false
},
{
field: 'firstAddTime',
title: '录入时间',
formatter: function (value, row, index) {
if (value == null) {
return " ";
} else {
return value;
}
}
},
{
field: 'updateInfoTime',
title: '上次修改时间',
formatter: function (value, row, index) {
if (value == null) {
return " ";
} else {
var vArr = value.split(',')
return vArr[0];
}
}
}]
};
$.table.init(options);
});
/*下载*/
function downloadFile(filepath) {
window.location.href =prefix + "/downloadFile?filepath="+ filepath;
}
//删除
function removeSelected() {
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
console.log(rows)
if (rows.length > 0) {
$.modal.confirm("是否删除选中的"+ rows.length +"条原料入库检验通知单?", function () {
$.ajax({
url: prefix + '/removeSelected',
type: 'post',
data: {
ids : rows.join()
},
success: function (res) {
// console.log(res)
$("#bootstrap-table").bootstrapTable("refresh");
$.modal.msgSuccess("删除成功!")
},
error: function (res) {
$.modal.msgError(res.error())
}
})
})
} else {
$.modal.msgWarning("请选择一条数据")
}
}
//导出
function exportSelected() {
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
var data = $("#bootstrap-table").bootstrapTable("getSelections")
if (rows.length !== 1) {
$.modal.alert("请选择一条记录");
return;
} else {
// rows为选中行的id
// console.log(rows);
// console.log(data);
// console.log(data[0].orderNumber)
$.modal.confirm("是否确认要导出本条订单?", function (){
axios({
url: prefix + '/exportSelected/'+data[0].warehousingInspectionNoticeId,
method: 'POST',
responseType: 'blob'
}).then(response => {
// console.log(response)
const URL = window.URL.createObjectURL(response.data)
// 创建隐藏<a>标签进行下载
const tempLink = document.createElement('a')
tempLink.style.display = 'none'
tempLink.href = URL
let time = new Date().toLocaleString()
tempLink.setAttribute('download', time + "物料检验通知单.xlsx")
if (typeof tempLink.download === 'undefined') {
tempLink.setAttribute('target', '_blank')
}
document.body.appendChild(tempLink)
tempLink.click()
document.body.removeChild(tempLink)// 移除dom元素
window.URL.revokeObjectURL(URL)//释放内存
})
});
}
}
$("input[name='confirmTime']").datetimepicker({
format: "yyyy-mm-dd hh:ii:ss",
minView: "month",
autoclose: true
});
// 订单确认
function reviewConfirm(){
let data = $("#bootstrap-table").bootstrapTable("getSelections");
let userName = [[${@permission.getPrincipalProperty('userName')}]];
if (data.length ===1) {
$("#warehousingInspectionNoticeId").val(data[0].warehousingInspectionNoticeId)
$("#confirmFlag").val(data[0].confirmFlag).trigger("change")
$("#confirmPerson").val(userName)
$("#confirmTime").datetimepicker("setDate", new Date());
$("#confirmModel").modal("show");
}else {
$.modal.alert("请选择一条数据");
}
}
// 订单确认
function confirmSubmit(){
$.ajax({
url: prefix + "/edit",
type: "post",
resultType: "json",
data: $('#form-confirm-edit').serialize(),
success: function (resp) {
// console.log(resp)
$("#confirmModel").modal("hide");
$("#bootstrap-table").bootstrapTable('refresh');
$.modal.msgSuccess("操作成功!")
},
error: function () {
$.modal.msgError("出错了!");
}
});
}
</script>
</body>
</html>

81
ruoyi-admin/src/main/resources/templates/system/bom/add.html

@ -1177,12 +1177,31 @@
title: '损耗%',
emptytext: '损耗%',
validate: function (value) {
if (isNaN(value)) return '使用量必须是数字';
var price = parseFloat(value);
if (price <= 0) return '使用量必须大于0';
// console.log(value.length)
if (value.slice(value.length-1, value.length) == '%') {
// console.log(value)
var number = value.slice(0, value.length-1)
if(isNaN(number)) {
return '使用量必须是数字';
}
if (parseFloat(number) <= 0) {
return '使用量必须大于0';
}
} else {
return '请在末尾添加%'
}
// if (isNaN(value)) return '使用量必须是数字';
// var price = parseFloat(value);
// if (price <= 0) return '使用量必须大于0';
}
},
formatter: (value, row, index) => {
if (value == null || value =='') {
var loss = '0%'
row.rawMaterialLoss = loss
return loss
}
}
},
{
field: 'supplierNumber',
@ -1716,12 +1735,31 @@
title: '损耗%',
emptytext: '损耗%',
validate: function (value) {
if (isNaN(value)) return '使用量必须是数字';
var price = parseFloat(value);
if (price <= 0) return '使用量必须大于0';
// console.log(value.length)
if (value.slice(value.length-1, value.length) == '%') {
// console.log(value)
var number = value.slice(0, value.length-1)
if(isNaN(number)) {
return '使用量必须是数字';
}
if (parseFloat(number) <= 0) {
return '使用量必须大于0';
}
} else {
return '请在末尾添加%'
}
// if (isNaN(value)) return '使用量必须是数字';
// var price = parseFloat(value);
// if (price <= 0) return '使用量必须大于0';
}
},
formatter: (value, row, index) => {
if (value == null || value =='') {
var loss = '0%'
row.subsidiaryMaterialLoss = loss
return loss
}
}
},
{
field: 'supplierNumber',
@ -2189,12 +2227,31 @@
title: '损耗%',
emptytext: '损耗%',
validate: function (value) {
if (isNaN(value)) return '使用量必须是数字';
var price = parseFloat(value);
if (price <= 0) return '使用量必须大于0';
// console.log(value.length)
if (value.slice(value.length-1, value.length) == '%') {
// console.log(value)
var number = value.slice(0, value.length-1)
if(isNaN(number)) {
return '使用量必须是数字';
}
if (parseFloat(number) <= 0) {
return '使用量必须大于0';
}
} else {
return '请在末尾添加%'
}
// if (isNaN(value)) return '使用量必须是数字';
// var price = parseFloat(value);
// if (price <= 0) return '使用量必须大于0';
}
},
formatter: (value, row, index) => {
if (value == null || value =='') {
var loss = '0%'
row.bcpMaterialLoss = loss
return loss
}
}
},
{
field: 'customerNumber',

86
ruoyi-admin/src/main/resources/templates/system/bom/edit.html

@ -456,6 +456,7 @@
var getData = [[${sysBom}]];
var finishProductCode = '';
var finishProductCode = getData.finishProductCode
var versionNumber = getData.versionNumber
var prefix = ctx + "system/bom";
var prefixfinishproduct = ctx + "system/finishproduct"
@ -787,7 +788,7 @@
// 原料表格数据
$('#addrowbomTable').bootstrapTable({
url: "/system/bomrawmaterial/getFinishCode",
url: "/system/bomrawmaterial/list",
pagination: true,
pageNumber: 1,
pageSize: 10,
@ -814,7 +815,8 @@
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
finishProductCode: finishProductCode
finishProductCode: finishProductCode,
versionNumber: versionNumber
};
console.log($("input[name='finishProductCode']").val())
@ -863,12 +865,34 @@
title: '损耗%',
emptytext: '损耗%',
validate: function (value) {
// console.log(value.length)
if (value.slice(value.length-1, value.length) == '%') {
// console.log(value)
var number = value.slice(0, value.length-1)
if(isNaN(number)) {
return '使用量必须是数字';
}
if (parseFloat(number) <= 0) {
return '使用量必须大于0';
}
} else {
return '请在末尾添加%'
}
// if (isNaN(value)) return '使用量必须是数字';
// var price = parseFloat(value);
// if (price <= 0) return '使用量必须大于0';
}
},
formatter: (value, row, index) => {
if (value == null || value =='') {
var loss = '0%'
row.rawMaterialLoss = loss
return loss
} else {
row.rawMaterialLoss = value
return value
}
}
},
{
field: 'supplierNumber',
@ -927,7 +951,7 @@
// 辅料
$('#addsubsidiarybomTable').bootstrapTable({
url: "/system/bomsubsidiarymaterial/getFinishCode",
url: "/system/bomsubsidiarymaterial/list",
pagination: true,
pageNumber: 1,
pageSize: 10,
@ -954,7 +978,8 @@
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
finishProductCode: finishProductCode
finishProductCode: finishProductCode,
versionNumber: versionNumber
};
console.log($("input[name='finishProductCode']").val())
@ -1002,12 +1027,34 @@
title: '损耗%',
emptytext: '损耗%',
validate: function (value) {
// console.log(value.length)
if (value.slice(value.length-1, value.length) == '%') {
// console.log(value)
var number = value.slice(0, value.length-1)
if(isNaN(number)) {
return '使用量必须是数字';
}
if (parseFloat(number) <= 0) {
return '使用量必须大于0';
}
} else {
return '请在末尾添加%'
}
// if (isNaN(value)) return '使用量必须是数字';
// var price = parseFloat(value);
// if (price <= 0) return '使用量必须大于0';
}
},
formatter: (value, row, index) => {
if (value == null || value =='') {
var loss = '0%'
row.subsidiaryMaterialLoss = loss
return loss
} else {
row.subsidiaryMaterialLoss = value
return value
}
}
},
{
field: 'supplierNumber',
@ -2077,7 +2124,7 @@
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
finishProductCode: finishProductCode,
versionNumber: getData.versionNumber
versionNumber: versionNumber
};
// console.log(data[0].enterpriseCode)
@ -2146,12 +2193,35 @@
title: '损耗%',
emptytext: '损耗%',
validate: function (value) {
// console.log(value.length)
if (value.slice(value.length-1, value.length) == '%') {
// console.log(value)
var number = value.slice(0, value.length-1)
if(isNaN(number)) {
return '使用量必须是数字';
}
if (parseFloat(number) <= 0) {
return '使用量必须大于0';
}
} else {
return '请在末尾添加%'
}
// if (isNaN(value)) return '使用量必须是数字';
// var price = parseFloat(value);
// if (price <= 0) return '使用量必须大于0';
}
},
formatter: (value, row, index) => {
if (value == null || value =='') {
var loss = '0%'
row.bcpMaterialLoss = loss
return loss
} else {
row.bcpMaterialLoss = value
return value
}
// console.log(value)
}
},
{
field: 'customerNumber',

51
ruoyi-admin/src/main/resources/templates/system/procedure/edit.html

@ -71,6 +71,8 @@
<script th:src="@{/ajax/libs/select2/select2.js}"></script>
<script th:inline="javascript">
var prefix = ctx + "system/procedure";
var getData = [[${sysProcedure}]]
$("#form-procedure-edit").validate({
focusCleanup: true
});
@ -81,15 +83,48 @@
}
}
$(document).ready(function(){
$('.js-example-tags').select2({
tags: true,
insertTag: function (data, tag) {
// Insert the tag at the end of the results
data.push(tag);
}
// $(document).ready(function(){
// $('.js-example-tags').select2({
// tags: true,
// insertTag: function (data, tag) {
// // Insert the tag at the end of the results
// data.push(tag);
// }
// });
// });
$(function () {
var workshopNameData = {
id: getData.workshopName,
text: getData.workshopName
};
if ($("#form-procedure-edit select[name='workshopName']").find("option[value='" + workshopNameData.id + "']").length) {
$("#form-procedure-edit select[name='workshopName']").val(workshopNameData.id).trigger('change');
} else {
// Create a DOM Option and pre-select by default
var newOption = new Option(workshopNameData.text, workshopNameData.id, true, true);
// Append it to the select
$("#form-procedure-edit select[name='workshopName']").append(newOption).trigger('change');
}
$("#form-procedure-edit select[name='workshopName']").select2({
tags: true
});
});
var associatedItemData = {
id: getData.associatedItem,
text: getData.associatedItem
};
if ($("#form-procedure-edit select[name='associatedItem']").find("option[value='" + associatedItemData.id + "']").length) {
$("#form-procedure-edit select[name='associatedItem']").val(associatedItemData.id).trigger('change');
} else {
// Create a DOM Option and pre-select by default
var newOption = new Option(associatedItemData.text, associatedItemData.id, true, true);
// Append it to the select
$("#form-procedure-edit select[name='associatedItem']").append(newOption).trigger('change');
}
$("#form-procedure-edit select[name='associatedItem']").select2({
tags: true
});
})

2
ruoyi-admin/target/classes/application.yml

@ -9,7 +9,7 @@ ruoyi:
# 实例演示开关
demoEnabled: false
# 文件路径 示例( Windows配置c:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
profile: D:/ruoyi/uploadPath
profile: C:/ruoyi/uploadPath
# 获取ip地址开关
addressEnabled: false

BIN
ruoyi-admin/target/classes/com/ruoyi/storehouse/controller/WarehousingInspectionNoticeController.class

Binary file not shown.

BIN
ruoyi-admin/target/classes/com/ruoyi/storehouse/mapper/WarehousingInspectionNoticeMapper.class

Binary file not shown.

BIN
ruoyi-admin/target/classes/com/ruoyi/storehouse/service/IWarehousingInspectionNoticeService.class

Binary file not shown.

BIN
ruoyi-admin/target/classes/com/ruoyi/storehouse/service/impl/WarehousingInspectionNoticeServiceImpl.class

Binary file not shown.

20
ruoyi-admin/target/classes/mapper/storehouse/WarehousingInspectionNoticeMapper.xml

@ -44,6 +44,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="params.beginWarehousingDate != null and params.beginWarehousingDate != '' and params.endWarehousingDate != null and params.endWarehousingDate != ''"> and warehousing_date between #{params.beginWarehousingDate} and #{params.endWarehousingDate}</if>
</where>
</select>
<select id="selectWarehousingInspectionNoticeYLList" parameterType="WarehousingInspectionNotice" resultMap="WarehousingInspectionNoticeResult">
<include refid="selectWarehousingInspectionNoticeVo"/>
where in_notice_number like '%IQC%'
<if test="inNoticeNumber != null and inNoticeNumber != ''"> and in_notice_number like concat('%', #{inNoticeNumber}, '%')</if>
<if test="purchaseOrderNumber != null and purchaseOrderNumber != ''"> and purchase_order_number like concat('%', #{purchaseOrderNumber}, '%')</if>
<if test="supplierCode != null and supplierCode != ''"> and supplier_code like concat('%', #{supplierCode}, '%')</if>
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="warehousingCategory != null and warehousingCategory != ''"> and warehousing_category = #{warehousingCategory}</if>
<if test="params.beginWarehousingDate != null and params.beginWarehousingDate != '' and params.endWarehousingDate != null and params.endWarehousingDate != ''"> and warehousing_date between #{params.beginWarehousingDate} and #{params.endWarehousingDate}</if>
</select>
<select id="selectWarehousingInspectionNoticeFLList" parameterType="WarehousingInspectionNotice" resultMap="WarehousingInspectionNoticeResult">
<include refid="selectWarehousingInspectionNoticeVo"/>
where in_notice_number like '%PQCFL%'
<if test="inNoticeNumber != null and inNoticeNumber != ''"> and in_notice_number like concat('%', #{inNoticeNumber}, '%')</if>
<if test="purchaseOrderNumber != null and purchaseOrderNumber != ''"> and purchase_order_number like concat('%', #{purchaseOrderNumber}, '%')</if>
<if test="supplierCode != null and supplierCode != ''"> and supplier_code like concat('%', #{supplierCode}, '%')</if>
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="warehousingCategory != null and warehousingCategory != ''"> and warehousing_category = #{warehousingCategory}</if>
<if test="params.beginWarehousingDate != null and params.beginWarehousingDate != '' and params.endWarehousingDate != null and params.endWarehousingDate != ''"> and warehousing_date between #{params.beginWarehousingDate} and #{params.endWarehousingDate}</if>
</select>
<select id="selectWarehousingInspectionNoticeById" parameterType="Long" resultMap="WarehousingInspectionNoticeResult">
<include refid="selectWarehousingInspectionNoticeVo"/>

2
ruoyi-admin/target/classes/templates/storehouse/warehousingInspectionNotice/add.html

@ -215,7 +215,7 @@
//获取单号
$.ajax({
url: prefix + "/getId",
url: prefix + "/getIdFL",
type: "post",
dateType: "json",
success: function (resp) {

81
ruoyi-admin/target/classes/templates/system/bom/add.html

@ -1177,12 +1177,31 @@
title: '损耗%',
emptytext: '损耗%',
validate: function (value) {
if (isNaN(value)) return '使用量必须是数字';
var price = parseFloat(value);
if (price <= 0) return '使用量必须大于0';
// console.log(value.length)
if (value.slice(value.length-1, value.length) == '%') {
// console.log(value)
var number = value.slice(0, value.length-1)
if(isNaN(number)) {
return '使用量必须是数字';
}
if (parseFloat(number) <= 0) {
return '使用量必须大于0';
}
} else {
return '请在末尾添加%'
}
// if (isNaN(value)) return '使用量必须是数字';
// var price = parseFloat(value);
// if (price <= 0) return '使用量必须大于0';
}
},
formatter: (value, row, index) => {
if (value == null || value =='') {
var loss = '0%'
row.rawMaterialLoss = loss
return loss
}
}
},
{
field: 'supplierNumber',
@ -1716,12 +1735,31 @@
title: '损耗%',
emptytext: '损耗%',
validate: function (value) {
if (isNaN(value)) return '使用量必须是数字';
var price = parseFloat(value);
if (price <= 0) return '使用量必须大于0';
// console.log(value.length)
if (value.slice(value.length-1, value.length) == '%') {
// console.log(value)
var number = value.slice(0, value.length-1)
if(isNaN(number)) {
return '使用量必须是数字';
}
if (parseFloat(number) <= 0) {
return '使用量必须大于0';
}
} else {
return '请在末尾添加%'
}
// if (isNaN(value)) return '使用量必须是数字';
// var price = parseFloat(value);
// if (price <= 0) return '使用量必须大于0';
}
},
formatter: (value, row, index) => {
if (value == null || value =='') {
var loss = '0%'
row.subsidiaryMaterialLoss = loss
return loss
}
}
},
{
field: 'supplierNumber',
@ -2189,12 +2227,31 @@
title: '损耗%',
emptytext: '损耗%',
validate: function (value) {
if (isNaN(value)) return '使用量必须是数字';
var price = parseFloat(value);
if (price <= 0) return '使用量必须大于0';
// console.log(value.length)
if (value.slice(value.length-1, value.length) == '%') {
// console.log(value)
var number = value.slice(0, value.length-1)
if(isNaN(number)) {
return '使用量必须是数字';
}
if (parseFloat(number) <= 0) {
return '使用量必须大于0';
}
} else {
return '请在末尾添加%'
}
// if (isNaN(value)) return '使用量必须是数字';
// var price = parseFloat(value);
// if (price <= 0) return '使用量必须大于0';
}
},
formatter: (value, row, index) => {
if (value == null || value =='') {
var loss = '0%'
row.bcpMaterialLoss = loss
return loss
}
}
},
{
field: 'customerNumber',

86
ruoyi-admin/target/classes/templates/system/bom/edit.html

@ -456,6 +456,7 @@
var getData = [[${sysBom}]];
var finishProductCode = '';
var finishProductCode = getData.finishProductCode
var versionNumber = getData.versionNumber
var prefix = ctx + "system/bom";
var prefixfinishproduct = ctx + "system/finishproduct"
@ -787,7 +788,7 @@
// 原料表格数据
$('#addrowbomTable').bootstrapTable({
url: "/system/bomrawmaterial/getFinishCode",
url: "/system/bomrawmaterial/list",
pagination: true,
pageNumber: 1,
pageSize: 10,
@ -814,7 +815,8 @@
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
finishProductCode: finishProductCode
finishProductCode: finishProductCode,
versionNumber: versionNumber
};
console.log($("input[name='finishProductCode']").val())
@ -863,12 +865,34 @@
title: '损耗%',
emptytext: '损耗%',
validate: function (value) {
// console.log(value.length)
if (value.slice(value.length-1, value.length) == '%') {
// console.log(value)
var number = value.slice(0, value.length-1)
if(isNaN(number)) {
return '使用量必须是数字';
}
if (parseFloat(number) <= 0) {
return '使用量必须大于0';
}
} else {
return '请在末尾添加%'
}
// if (isNaN(value)) return '使用量必须是数字';
// var price = parseFloat(value);
// if (price <= 0) return '使用量必须大于0';
}
},
formatter: (value, row, index) => {
if (value == null || value =='') {
var loss = '0%'
row.rawMaterialLoss = loss
return loss
} else {
row.rawMaterialLoss = value
return value
}
}
},
{
field: 'supplierNumber',
@ -927,7 +951,7 @@
// 辅料
$('#addsubsidiarybomTable').bootstrapTable({
url: "/system/bomsubsidiarymaterial/getFinishCode",
url: "/system/bomsubsidiarymaterial/list",
pagination: true,
pageNumber: 1,
pageSize: 10,
@ -954,7 +978,8 @@
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
finishProductCode: finishProductCode
finishProductCode: finishProductCode,
versionNumber: versionNumber
};
console.log($("input[name='finishProductCode']").val())
@ -1002,12 +1027,34 @@
title: '损耗%',
emptytext: '损耗%',
validate: function (value) {
// console.log(value.length)
if (value.slice(value.length-1, value.length) == '%') {
// console.log(value)
var number = value.slice(0, value.length-1)
if(isNaN(number)) {
return '使用量必须是数字';
}
if (parseFloat(number) <= 0) {
return '使用量必须大于0';
}
} else {
return '请在末尾添加%'
}
// if (isNaN(value)) return '使用量必须是数字';
// var price = parseFloat(value);
// if (price <= 0) return '使用量必须大于0';
}
},
formatter: (value, row, index) => {
if (value == null || value =='') {
var loss = '0%'
row.subsidiaryMaterialLoss = loss
return loss
} else {
row.subsidiaryMaterialLoss = value
return value
}
}
},
{
field: 'supplierNumber',
@ -2077,7 +2124,7 @@
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
finishProductCode: finishProductCode,
versionNumber: getData.versionNumber
versionNumber: versionNumber
};
// console.log(data[0].enterpriseCode)
@ -2146,12 +2193,35 @@
title: '损耗%',
emptytext: '损耗%',
validate: function (value) {
// console.log(value.length)
if (value.slice(value.length-1, value.length) == '%') {
// console.log(value)
var number = value.slice(0, value.length-1)
if(isNaN(number)) {
return '使用量必须是数字';
}
if (parseFloat(number) <= 0) {
return '使用量必须大于0';
}
} else {
return '请在末尾添加%'
}
// if (isNaN(value)) return '使用量必须是数字';
// var price = parseFloat(value);
// if (price <= 0) return '使用量必须大于0';
}
},
formatter: (value, row, index) => {
if (value == null || value =='') {
var loss = '0%'
row.bcpMaterialLoss = loss
return loss
} else {
row.bcpMaterialLoss = value
return value
}
// console.log(value)
}
},
{
field: 'customerNumber',

51
ruoyi-admin/target/classes/templates/system/procedure/edit.html

@ -71,6 +71,8 @@
<script th:src="@{/ajax/libs/select2/select2.js}"></script>
<script th:inline="javascript">
var prefix = ctx + "system/procedure";
var getData = [[${sysProcedure}]]
$("#form-procedure-edit").validate({
focusCleanup: true
});
@ -81,15 +83,48 @@
}
}
$(document).ready(function(){
$('.js-example-tags').select2({
tags: true,
insertTag: function (data, tag) {
// Insert the tag at the end of the results
data.push(tag);
}
// $(document).ready(function(){
// $('.js-example-tags').select2({
// tags: true,
// insertTag: function (data, tag) {
// // Insert the tag at the end of the results
// data.push(tag);
// }
// });
// });
$(function () {
var workshopNameData = {
id: getData.workshopName,
text: getData.workshopName
};
if ($("#form-procedure-edit select[name='workshopName']").find("option[value='" + workshopNameData.id + "']").length) {
$("#form-procedure-edit select[name='workshopName']").val(workshopNameData.id).trigger('change');
} else {
// Create a DOM Option and pre-select by default
var newOption = new Option(workshopNameData.text, workshopNameData.id, true, true);
// Append it to the select
$("#form-procedure-edit select[name='workshopName']").append(newOption).trigger('change');
}
$("#form-procedure-edit select[name='workshopName']").select2({
tags: true
});
});
var associatedItemData = {
id: getData.associatedItem,
text: getData.associatedItem
};
if ($("#form-procedure-edit select[name='associatedItem']").find("option[value='" + associatedItemData.id + "']").length) {
$("#form-procedure-edit select[name='associatedItem']").val(associatedItemData.id).trigger('change');
} else {
// Create a DOM Option and pre-select by default
var newOption = new Option(associatedItemData.text, associatedItemData.id, true, true);
// Append it to the select
$("#form-procedure-edit select[name='associatedItem']").append(newOption).trigger('change');
}
$("#form-procedure-edit select[name='associatedItem']").select2({
tags: true
});
})

Loading…
Cancel
Save