Browse Source

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

dev
王晓迪 1 month ago
parent
commit
b05f48186a
  1. 31
      ruoyi-admin/src/main/java/com/ruoyi/stock/domain/StockInfo.java
  2. 52
      ruoyi-admin/src/main/java/com/ruoyi/stock/service/impl/StockInfoServiceImpl.java
  3. 129
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysUnitConvertController.java
  4. 93
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysUnitConvert.java
  5. 10
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysDiffLogMapper.java
  6. 61
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysUnitConvertMapper.java
  7. 9
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysDiffLogService.java
  8. 61
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysUnitConvertService.java
  9. 21
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysDiffLogServiceImpl.java
  10. 103
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysUnitConvertServiceImpl.java
  11. 23
      ruoyi-admin/src/main/resources/mapper/stock/StockInfoMapper.xml
  12. 5
      ruoyi-admin/src/main/resources/mapper/system/SysDiffLogMapper.xml
  13. 184
      ruoyi-admin/src/main/resources/templates/quality/qualitySupplierDeduction/add.html
  14. 184
      ruoyi-admin/src/main/resources/templates/quality/qualitySupplierDeduction/edit.html
  15. 217
      ruoyi-admin/src/main/resources/templates/quality/qualitySupplierDeduction/qualitySupplierDeduction.html
  16. 1085
      ruoyi-admin/src/main/resources/templates/quality/returnGoodsOrder/add.html
  17. 1065
      ruoyi-admin/src/main/resources/templates/quality/returnGoodsOrder/edit.html
  18. 955
      ruoyi-admin/src/main/resources/templates/quality/returnGoodsOrder/returnGoodsOrder.html
  19. 90
      ruoyi-admin/src/main/resources/templates/stock/stockInfo/stockInfo.html
  20. 455
      ruoyi-admin/src/main/resources/templates/storehouse/warehousingInRawMaterial/add.html
  21. 416
      ruoyi-admin/src/main/resources/templates/storehouse/warehousingInRawMaterial/edit.html
  22. 270
      ruoyi-admin/src/main/resources/templates/storehouse/warehousingInRawMaterial/warehousingInRawMaterial.html
  23. 447
      ruoyi-admin/src/main/resources/templates/storehouse/warehousingInSubsidiary/add.html
  24. 415
      ruoyi-admin/src/main/resources/templates/storehouse/warehousingInSubsidiary/edit.html
  25. 260
      ruoyi-admin/src/main/resources/templates/storehouse/warehousingInSubsidiary/warehousingInSubsidiary.html
  26. 12
      ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/baseEvectionForm.html
  27. 68
      ruoyi-admin/src/main/resources/templates/system/baseExpense/add.html
  28. 23
      ruoyi-admin/src/main/resources/templates/system/baseExpense/baseExpense.html
  29. 36
      ruoyi-admin/src/main/resources/templates/system/companyInformation/companyInformation.html
  30. 1
      ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/add.html
  31. 49
      ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/empRequisiteOrder.html
  32. 1
      ruoyi-admin/src/main/resources/templates/system/requisitioning/add.html
  33. 72
      ruoyi-admin/src/main/resources/templates/system/requisitioning/requisitioning.html
  34. 53
      ruoyi-admin/src/main/resources/templates/unitConvert/unitConvert/add.html
  35. 54
      ruoyi-admin/src/main/resources/templates/unitConvert/unitConvert/edit.html
  36. 130
      ruoyi-admin/src/main/resources/templates/unitConvert/unitConvert/unitConvert.html
  37. 3
      ruoyi-common/src/main/java/com/ruoyi/common/constant/BusinessKeysConstants.java
  38. 24
      ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java

31
ruoyi-admin/src/main/java/com/ruoyi/stock/domain/StockInfo.java

@ -1,6 +1,7 @@
package com.ruoyi.stock.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.FieldCompare;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
@ -22,30 +23,31 @@ public class StockInfo extends BaseEntity
private Long stockId;
/** 仓库编号 */
@FieldCompare(chineseName = "仓库编号")
@Excel(name = "仓库编号")
private String stockNO;
/** 仓库名 */
@FieldCompare(chineseName = "仓库名")
@Excel(name = "仓库名")
private String stockName;
/** 仓库地址 */
@FieldCompare(chineseName = "仓库地址")
@Excel(name = "仓库地址")
private String stockAddr;
/** 仓库管理人 */
@FieldCompare(chineseName = "仓库管理人")
@Excel(name = "仓库管理人")
private String stockManager;
@Excel(name = "仓库管理人电话")
private String stockManagerPhone;
/** 仓库备注 */
@FieldCompare(chineseName = "仓库备注")
@Excel(name = "仓库备注")
private String stockMemo;
/** */
private String defaltItemclass;
/** 录入时间 */
@Excel(name = "录入时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
@ -105,16 +107,6 @@ public class StockInfo extends BaseEntity
this.stockMemo = stockMemo;
}
public void setDefaltItemclass(String defaltItemclass)
{
this.defaltItemclass = defaltItemclass;
}
public String getDefaltItemclass()
{
return defaltItemclass;
}
public Date getFirstAddTime() {
return firstAddTime;
}
@ -131,13 +123,6 @@ public class StockInfo extends BaseEntity
this.updateInfoTime = updateInfoTime;
}
public String getStockManagerPhone() {
return stockManagerPhone;
}
public void setStockManagerPhone(String stockManagerPhone) {
this.stockManagerPhone = stockManagerPhone;
}
@Override
public String toString() {
@ -146,10 +131,8 @@ public class StockInfo extends BaseEntity
.append("stockNO", getStockNO())
.append("stockName", getStockName())
.append("stockAddr", getStockAddr())
.append("stockmanager", getStockManager())
.append("stockManagerPhone", getStockManagerPhone())
.append("stockManager", getStockManager())
.append("stockmemo", getStockMemo())
.append("defaltItemclass", getDefaltItemclass())
.append("firstAddTime", getFirstAddTime())
.append("updateInfoTime", getUpdateInfoTime())
.toString();

52
ruoyi-admin/src/main/java/com/ruoyi/stock/service/impl/StockInfoServiceImpl.java

@ -1,13 +1,23 @@
package com.ruoyi.stock.service.impl;
import com.ruoyi.common.constant.BusinessKeysConstants;
import com.ruoyi.common.core.domain.entity.SysFieldDifferent;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.exception.BusinessException;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.FieldCompareUtil;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.stock.domain.StockInfo;
import com.ruoyi.stock.mapper.StockInfoMapper;
import com.ruoyi.stock.service.IStockInfoService;
import com.ruoyi.system.domain.SysDiffLog;
import com.ruoyi.system.service.ISysDiffLogService;
import lombok.SneakyThrows;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.List;
@ -23,6 +33,9 @@ public class StockInfoServiceImpl implements IStockInfoService
@Autowired
private StockInfoMapper stockInfoMapper;
@Autowired
private ISysDiffLogService diffLogService;
@Autowired
private RedisCache redisCache;
@ -56,11 +69,22 @@ public class StockInfoServiceImpl implements IStockInfoService
* @param stockInfo 仓库信息
* @return 结果
*/
@Transactional(rollbackFor = Exception.class)
@Override
public int insertStockInfo(StockInfo stockInfo)
{
SysDiffLog sysDiffLog = new SysDiffLog();
stockInfo.setFirstAddTime(DateUtils.getNowDate());
return stockInfoMapper.insertStockInfo(stockInfo);
int insertStockInfo = stockInfoMapper.insertStockInfo(stockInfo);
Long stockId = stockInfo.getStockId();
sysDiffLog.setBusinessId(stockId);
sysDiffLog.setBusinessKey(BusinessKeysConstants.STOCK_INFO);
int insertSysDiffLog = diffLogService.insertSysDiffLog(sysDiffLog);
if (insertSysDiffLog <= 0){
throw new BusinessException("新增仓库信息数据修改记录失败");
}
return insertStockInfo;
}
/**
@ -69,10 +93,24 @@ public class StockInfoServiceImpl implements IStockInfoService
* @param stockInfo 仓库信息
* @return 结果
*/
@SneakyThrows
@Transactional(rollbackFor = Exception.class)
@Override
public int updateStockInfo(StockInfo stockInfo)
{
stockInfo.setUpdateInfoTime(DateUtils.getNowDate());
Long stockId = stockInfo.getStockId();
StockInfo oldStockInfo = stockInfoMapper.selectStockInfoById(stockId);
if (oldStockInfo == null){
throw new RuntimeException("仓库信息数据不存在");
}
List<SysFieldDifferent> compare = FieldCompareUtil.compare(StockInfo.class, stockInfo, oldStockInfo);
if (!CollectionUtils.isEmpty(compare)){
int updateSysDiffLog = diffLogService.updateSysDiffLogByBusiness(stockId,BusinessKeysConstants.STOCK_INFO,compare);
if (updateSysDiffLog <= 0){
throw new RuntimeException("修改仓库信息数据修改记录失败");
}
}
return stockInfoMapper.updateStockInfo(stockInfo);
}
@ -82,10 +120,20 @@ public class StockInfoServiceImpl implements IStockInfoService
* @param ids 需要删除的数据ID
* @return 结果
*/
@Transactional(rollbackFor = Exception.class)
@Override
public int deleteStockInfoByIds(String ids)
{
return stockInfoMapper.deleteStockInfoByIds(Convert.toStrArray(ids));
SysDiffLog sysDiffLog = new SysDiffLog();
sysDiffLog.setBusinessId(Long.valueOf(ids));
sysDiffLog.setBusinessKey(BusinessKeysConstants.STOCK_INFO);
int deleteSysDiffLogByBusiness = diffLogService.deleteSysDiffLogByBusiness(sysDiffLog);
if (deleteSysDiffLogByBusiness <= 0){
throw new RuntimeException("删除仓库信息数据修改记录失败");
}
int result = stockInfoMapper.deleteStockInfoByIds(Convert.toStrArray(ids));
return result;
}
/**

129
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysUnitConvertController.java

@ -1,129 +0,0 @@
package com.ruoyi.system.controller;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.SysUnitConvert;
import com.ruoyi.system.service.ISysUnitConvertService;
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;
/**
* 单位换算Controller
*
* @author sunzhenhu
* @date 2021-06-16
*/
@Controller
@RequestMapping("/unitConvert/unitConvert")
public class SysUnitConvertController extends BaseController
{
private String prefix = "unitConvert/unitConvert";
@Autowired
private ISysUnitConvertService sysUnitConvertService;
@RequiresPermissions("unitConvert:unitConvert:view")
@GetMapping()
public String unitConvert()
{
return prefix + "/unitConvert";
}
/**
* 查询单位换算列表
*/
@RequiresPermissions("unitConvert:unitConvert:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(SysUnitConvert sysUnitConvert)
{
startPage();
List<SysUnitConvert> list = sysUnitConvertService.selectSysUnitConvertList(sysUnitConvert);
return getDataTable(list);
}
/**
* 导出单位换算列表
*/
@RequiresPermissions("unitConvert:unitConvert:export")
@Log(title = "单位换算", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysUnitConvert sysUnitConvert)
{
List<SysUnitConvert> list = sysUnitConvertService.selectSysUnitConvertList(sysUnitConvert);
ExcelUtil<SysUnitConvert> util = new ExcelUtil<SysUnitConvert>(SysUnitConvert.class);
return util.exportExcel(list, "单位换算数据");
}
/**
* 新增单位换算
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存单位换算
*/
@RequiresPermissions("unitConvert:unitConvert:add")
@Log(title = "单位换算", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(SysUnitConvert sysUnitConvert)
{
int i=sysUnitConvertService.insertSysUnitConvert(sysUnitConvert);
if (i<0){
AjaxResult result=AjaxResult.error("数据重复", null);
return result;
}
return toAjax(i);
}
/**
* 修改单位换算
*/
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Integer id, ModelMap mmap)
{
SysUnitConvert sysUnitConvert = sysUnitConvertService.selectSysUnitConvertById(id);
mmap.put("sysUnitConvert", sysUnitConvert);
return prefix + "/edit";
}
/**
* 修改保存单位换算
*/
@RequiresPermissions("unitConvert:unitConvert:edit")
@Log(title = "单位换算", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysUnitConvert sysUnitConvert)
{
return toAjax(sysUnitConvertService.updateSysUnitConvert(sysUnitConvert));
}
/**
* 删除单位换算
*/
@RequiresPermissions("unitConvert:unitConvert:remove")
@Log(title = "单位换算", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(sysUnitConvertService.deleteSysUnitConvertByIds(ids));
}
}

93
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysUnitConvert.java

@ -1,93 +0,0 @@
package com.ruoyi.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 单位换算对象 sys_unit_convert
*
* @author sunzhenhu
* @date 2021-06-16
*/
public class SysUnitConvert extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** */
private Integer id;
/** 换算起始值 */
@Excel(name = "换算起始值")
private String convertStartValue;
/** 换算起始单位 */
@Excel(name = "换算起始单位")
private String convertStartUnit;
/** 换算结尾值 */
@Excel(name = "换算结尾值")
private String convertEndValue;
/** 换算结尾单位 */
@Excel(name = "换算结尾单位")
private String convertEndUnit;
public void setId(Integer id)
{
this.id = id;
}
public Integer getId()
{
return id;
}
public void setConvertStartValue(String convertStartValue)
{
this.convertStartValue = convertStartValue;
}
public String getConvertStartValue()
{
return convertStartValue;
}
public void setConvertStartUnit(String convertStartUnit)
{
this.convertStartUnit = convertStartUnit;
}
public String getConvertStartUnit()
{
return convertStartUnit;
}
public void setConvertEndValue(String convertEndValue)
{
this.convertEndValue = convertEndValue;
}
public String getConvertEndValue()
{
return convertEndValue;
}
public void setConvertEndUnit(String convertEndUnit)
{
this.convertEndUnit = convertEndUnit;
}
public String getConvertEndUnit()
{
return convertEndUnit;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("convertStartValue", getConvertStartValue())
.append("convertStartUnit", getConvertStartUnit())
.append("convertEndValue", getConvertEndValue())
.append("convertEndUnit", getConvertEndUnit())
.toString();
}
}

10
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysDiffLogMapper.java

@ -67,6 +67,16 @@ public interface SysDiffLogMapper
*/
public int deleteSysDiffLogByIds(String[] diffIds);
/**
* 删除数据修改记录日志通过业务信息
*
* @param sysDiffLog 数据修改记录日志
* @return 结果
*/
public int deleteSysDiffLogByBusiness(SysDiffLog sysDiffLog);
/**
* 作废数据修改记录日志
*

61
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysUnitConvertMapper.java

@ -1,61 +0,0 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.SysUnitConvert;
/**
* 单位换算Mapper接口
*
* @author sunzhenhu
* @date 2021-06-16
*/
public interface SysUnitConvertMapper
{
/**
* 查询单位换算
*
* @param id 单位换算ID
* @return 单位换算
*/
public SysUnitConvert selectSysUnitConvertById(Integer id);
/**
* 查询单位换算列表
*
* @param sysUnitConvert 单位换算
* @return 单位换算集合
*/
public List<SysUnitConvert> selectSysUnitConvertList(SysUnitConvert sysUnitConvert);
/**
* 新增单位换算
*
* @param sysUnitConvert 单位换算
* @return 结果
*/
public int insertSysUnitConvert(SysUnitConvert sysUnitConvert);
/**
* 修改单位换算
*
* @param sysUnitConvert 单位换算
* @return 结果
*/
public int updateSysUnitConvert(SysUnitConvert sysUnitConvert);
/**
* 删除单位换算
*
* @param id 单位换算ID
* @return 结果
*/
public int deleteSysUnitConvertById(Integer id);
/**
* 批量删除单位换算
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteSysUnitConvertByIds(String[] ids);
}

9
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysDiffLogService.java

@ -78,6 +78,15 @@ public interface ISysDiffLogService
*/
public int deleteSysDiffLogById(Long diffId);
/**
* 删除数据修改记录日志通过业务信息
*
* @param sysDiffLog 数据修改记录日志
* @return 结果
*/
public int deleteSysDiffLogByBusiness(SysDiffLog sysDiffLog);
/**
* 作废数据修改记录日志
* @param diffId 数据修改记录日志ID

61
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysUnitConvertService.java

@ -1,61 +0,0 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.SysUnitConvert;
/**
* 单位换算Service接口
*
* @author sunzhenhu
* @date 2021-06-16
*/
public interface ISysUnitConvertService
{
/**
* 查询单位换算
*
* @param id 单位换算ID
* @return 单位换算
*/
public SysUnitConvert selectSysUnitConvertById(Integer id);
/**
* 查询单位换算列表
*
* @param sysUnitConvert 单位换算
* @return 单位换算集合
*/
public List<SysUnitConvert> selectSysUnitConvertList(SysUnitConvert sysUnitConvert);
/**
* 新增单位换算
*
* @param sysUnitConvert 单位换算
* @return 结果
*/
public int insertSysUnitConvert(SysUnitConvert sysUnitConvert);
/**
* 修改单位换算
*
* @param sysUnitConvert 单位换算
* @return 结果
*/
public int updateSysUnitConvert(SysUnitConvert sysUnitConvert);
/**
* 批量删除单位换算
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteSysUnitConvertByIds(String ids);
/**
* 删除单位换算信息
*
* @param id 单位换算ID
* @return 结果
*/
public int deleteSysUnitConvertById(Integer id);
}

21
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysDiffLogServiceImpl.java

@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.ruoyi.common.constant.BusinessKeysConstants;
import com.ruoyi.common.core.domain.entity.SysFieldDifferent;
import com.ruoyi.common.exception.BusinessException;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.Vo.SysDiffLogVo;
@ -81,6 +82,14 @@ public class SysDiffLogServiceImpl implements ISysDiffLogService
String loginName = ShiroUtils.getLoginName();
sysDiffLog.setCreateBy(loginName);
sysDiffLog.setCreateTime(DateUtils.getNowDate());
Long businessId = sysDiffLog.getBusinessId();
String businessKey = sysDiffLog.getBusinessKey();
if (businessId == null) {
throw new BusinessException("业务ID不能为空");
}
if (businessKey == null) {
throw new BusinessException("业务Key不能为空");
}
return sysDiffLogMapper.insertSysDiffLog(sysDiffLog);
}
@ -161,6 +170,18 @@ public class SysDiffLogServiceImpl implements ISysDiffLogService
return sysDiffLogMapper.deleteSysDiffLogById(diffId);
}
/**
* 删除数据修改记录日志通过业务信息
*
* @param sysDiffLog 数据修改记录日志
* @return 结果
*/
@Override
public int deleteSysDiffLogByBusiness(SysDiffLog sysDiffLog) {
return sysDiffLogMapper.deleteSysDiffLogByBusiness(sysDiffLog);
}
/**
* 作废数据修改记录日志
*

103
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysUnitConvertServiceImpl.java

@ -1,103 +0,0 @@
package com.ruoyi.system.service.impl;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.SysUnitConvert;
import com.ruoyi.system.mapper.SysUnitConvertMapper;
import com.ruoyi.system.service.ISysUnitConvertService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* 单位换算Service业务层处理
*
* @author sunzhenhu
* @date 2021-06-16
*/
@Service
public class SysUnitConvertServiceImpl implements ISysUnitConvertService
{
@Autowired
private SysUnitConvertMapper sysUnitConvertMapper;
/**
* 查询单位换算
*
* @param id 单位换算ID
* @return 单位换算
*/
@Override
public SysUnitConvert selectSysUnitConvertById(Integer id)
{
return sysUnitConvertMapper.selectSysUnitConvertById(id);
}
/**
* 查询单位换算列表
*
* @param sysUnitConvert 单位换算
* @return 单位换算
*/
@Override
public List<SysUnitConvert> selectSysUnitConvertList(SysUnitConvert sysUnitConvert)
{
return sysUnitConvertMapper.selectSysUnitConvertList(sysUnitConvert);
}
/**
* 新增单位换算
*
* @param sysUnitConvert 单位换算
* @return 结果
*/
@Override
public int insertSysUnitConvert(SysUnitConvert sysUnitConvert)
{
SysUnitConvert temp=new SysUnitConvert();
temp.setConvertStartUnit(sysUnitConvert.getConvertStartUnit());
temp.setConvertEndUnit(sysUnitConvert.getConvertEndUnit());
List<SysUnitConvert> sysUnitConverts = new ArrayList<>(sysUnitConvertMapper.selectSysUnitConvertList(temp));
if (sysUnitConverts.size()>0){
return -1;
}
return sysUnitConvertMapper.insertSysUnitConvert(sysUnitConvert);
}
/**
* 修改单位换算
*
* @param sysUnitConvert 单位换算
* @return 结果
*/
@Override
public int updateSysUnitConvert(SysUnitConvert sysUnitConvert)
{
return sysUnitConvertMapper.updateSysUnitConvert(sysUnitConvert);
}
/**
* 删除单位换算对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteSysUnitConvertByIds(String ids)
{
return sysUnitConvertMapper.deleteSysUnitConvertByIds(Convert.toStrArray(ids));
}
/**
* 删除单位换算信息
*
* @param id 单位换算ID
* @return 结果
*/
@Override
public int deleteSysUnitConvertById(Integer id)
{
return sysUnitConvertMapper.deleteSysUnitConvertById(id);
}
}

23
ruoyi-admin/src/main/resources/mapper/stock/StockInfoMapper.xml

@ -11,15 +11,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="stockAddr" column="stockAddr" />
<result property="stockManager" column="stockmanager" />
<result property="stockMemo" column="stockmemo" />
<result property="stockManagerPhone" column="stock_manager_phone" />
<result property="defaltItemclass" column="defalt_itemclass" />
<result property="firstAddTime" column="first_add_time" />
<result property="updateInfoTime" column="update_info_time" />
</resultMap>
<sql id="selectStockInfoVo">
select stock_id,StockNo, Stockname, stockAddr, stockmanager,stock_manager_phone, stockmemo,
defalt_itemclass, first_add_time, update_info_time from stock_info
select stock_id,
StockNo,
Stockname,
stockAddr,
stockmanager,
stockmemo,
first_add_time,
update_info_time
from stock_info
</sql>
<select id="selectStockInfoList" parameterType="StockInfo" resultMap="StockInfoResult">
@ -48,26 +53,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<insert id="insertStockInfo" parameterType="StockInfo">
<insert id="insertStockInfo" parameterType="StockInfo" useGeneratedKeys="true" keyProperty="stockId">
insert into stock_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="stockNO != null and stockNO != ''">StockNO,</if>
<if test="stockName != null and stockName != ''">Stockname,</if>
<if test="stockAddr != null and stockAddr != ''">stockAddr,</if>
<if test="stockManager != null">stockmanager,</if>
<if test="stockManagerPhone != null">stock_manager_phone,</if>
<if test="stockMemo != null">stockmemo,</if>
<if test="defaltItemclass != null">defalt_itemclass,</if>
<if test="firstAddTime != null">first_add_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="stockNO != null and stockNO != ''">#{stockNO},</if>
<if test="stockName != null and stockName != ''">#{stockName},</if>
<if test="stockAddr != null and stockAddr != ''">#{stockAddr},</if>
<if test="stockManager != null">#{stockmanager},</if>
<if test="stockManagerPhone != null">#{stockManagerPhone},</if>
<if test="stockManager != null">#{stockManager},</if>
<if test="stockMemo != null">#{stockMemo},</if>
<if test="defaltItemclass != null">#{defaltItemclass},</if>
<if test="firstAddTime != null">#{firstAddTime},</if>
</trim>
</insert>
@ -79,9 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="stockName != null and stockName != ''">Stockname = #{stockName},</if>
<if test="stockAddr != null and stockAddr != ''">StockAddr = #{stockAddr},</if>
<if test="stockManager != null">stockmanager = #{stockManager},</if>
<if test="stockManagerPhone != null">stock_manager_phone = #{stockManagerPhone},</if>
<if test="stockMemo != null">stockmemo = #{stockMemo},</if>
<if test="defaltItemclass != null">defalt_itemclass = #{defaltItemclass},</if>
<if test="updateInfoTime != null">update_info_time = #{updateInfoTime},</if>
</trim>
where stock_id = #{stockId}

5
ruoyi-admin/src/main/resources/mapper/system/SysDiffLogMapper.xml

@ -89,6 +89,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
<delete id="deleteSysDiffLogByBusiness" parameterType="SysDiffLog">
delete from sys_diff_log where business_id = #{businessId}
and business_key = #{businessKey}
</delete>
<update id="cancelSysDiffLogById" parameterType="Long">
update sys_diff_log set del_flag = '1' where diff_id = #{diffId}
</update>

184
ruoyi-admin/src/main/resources/templates/quality/qualitySupplierDeduction/add.html

@ -1,184 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增qualitySupplierDeduction')" />
<th:block th:include="include :: datetimepicker-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-qualitySupplierDeduction-add">
<div class="form-group">
<label class="col-sm-3 control-label">供应商代码:</label>
<div class="col-sm-8">
<select name="supplierCode" 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="modeOfService" 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="acceptanceDepartment" 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="acceptancePerson" 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="contactNumber" 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="reworkLaborCost" 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="customerDeduction" 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="punitiveDamage" 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="materialScrapCost" 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="transportationExpenses" 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="otherName" 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="othersCost" 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="totalAmount" 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="proposePerson" 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="reviewedPerson" 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="approvalPerson" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">索赔扣款详细原因:</label>
<div class="col-sm-8">
<textarea name="reason" class="form-control"></textarea>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<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:inline="javascript">
var prefix = ctx + "quality/qualitySupplierDeduction"
var prefixSupplier = ctx + "system/supplier"
$("#form-qualitySupplierDeduction-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-qualitySupplierDeduction-add').serialize());
}
}
//获取供应商代码
$.ajax({
url: prefixSupplier + "/list",
type: "post",
dateType: "json",
success: function (res) {
console.log(res)
if (res.rows.length > 0) {
var orderData = res.rows;
for (let i in orderData) {
$("#form-qualitySupplierDeduction-add select[name='supplierCode']").append("<option value='" + orderData[i].supplierCode + "'>" + orderData[i].supplierCode + "</option>");
}
} else {
$.modal.msgError(res.msg);
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
});
</script>
</body>
</html>

184
ruoyi-admin/src/main/resources/templates/quality/qualitySupplierDeduction/edit.html

@ -1,184 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改qualitySupplierDeduction')" />
<th:block th:include="include :: datetimepicker-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-qualitySupplierDeduction-edit" th:object="${qualitySupplierDeduction}">
<input name="supplierDeductionId" th:field="*{supplierDeductionId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">供应商代码:</label>
<div class="col-sm-8">
<select name="supplierCode" class="form-control m-b" th:field="*{supplierCode}">
<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="modeOfService" th:field="*{modeOfService}" 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="acceptanceDepartment" th:field="*{acceptanceDepartment}" 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="acceptancePerson" th:field="*{acceptancePerson}" 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="contactNumber" th:field="*{contactNumber}" 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="reworkLaborCost" th:field="*{reworkLaborCost}" 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="customerDeduction" th:field="*{customerDeduction}" 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="punitiveDamage" th:field="*{punitiveDamage}" 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="materialScrapCost" th:field="*{materialScrapCost}" 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="transportationExpenses" th:field="*{transportationExpenses}" 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="otherName" th:field="*{otherName}" 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="othersCost" th:field="*{othersCost}" 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="totalAmount" th:field="*{totalAmount}" 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="proposePerson" th:field="*{proposePerson}" 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="reviewedPerson" th:field="*{reviewedPerson}" 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="approvalPerson" th:field="*{approvalPerson}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">索赔扣款详细原因:</label>
<div class="col-sm-8">
<textarea name="reason" class="form-control">[[*{reason}]]</textarea>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<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:inline="javascript">
var prefix = ctx + "quality/qualitySupplierDeduction";
var prefixSupplier = ctx + "system/supplier"
$("#form-qualitySupplierDeduction-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-qualitySupplierDeduction-edit').serialize());
}
}
//获取供应商代码
$.ajax({
url: prefixSupplier + "/list",
type: "post",
dateType: "json",
success: function (res) {
if (res.rows.length > 0) {
var orderData = res.rows;
for(let i in orderData){
$("#form-qualitySupplierDeduction-edit select[name='supplierCode']").append("<option value='" + orderData[i].supplierCode + "'>" + orderData[i].supplierCode + "</option>");
}
$("#form-qualitySupplierDeduction-edit select[name='supplierCode']").val(getData.supplierCode).trigger("supplierCode")
} else {
$.modal.msgError(res.msg);
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
});
</script>
</body>
</html>

217
ruoyi-admin/src/main/resources/templates/quality/qualitySupplierDeduction/qualitySupplierDeduction.html

@ -1,217 +0,0 @@
<!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('qualitySupplierDeduction列表')" />
<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>
<select name="supplierCode">
<option value="">所有</option>
</select>
</li>
<li>
<label>受理部门:</label>
<input type="text" name="acceptanceDepartment"/>
</li>
<li>
<label>受理人:</label>
<input type="text" name="acceptancePerson"/>
</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="quality:qualitySupplierDeduction:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="quality:qualitySupplierDeduction:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="quality:qualitySupplierDeduction:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="exportSelectedRaw()" shiro:hasPermission="quality:qualitySupplierDeduction:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" style="white-space: nowrap"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('quality:qualitySupplierDeduction:edit')}]];
var removeFlag = [[${@permission.hasPermi('quality:qualitySupplierDeduction:remove')}]];
var prefix = ctx + "quality/qualitySupplierDeduction";
var prefixSupplier = ctx + "system/supplier"
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "qualitySupplierDeduction",
columns: [{
checkbox: true
},
{
field: 'supplierDeductionId',
title: '',
visible: false
},
{
field: 'supplierCode',
title: '供应商代码'
},
{
field: 'modeOfService',
title: '送达方式'
},
{
field: 'acceptanceDepartment',
title: '受理部门'
},
{
field: 'acceptancePerson',
title: '受理人'
},
{
field: 'contactNumber',
title: '联络方式'
},
{
field: 'reason',
title: '索赔扣款详细原因'
},
{
field: 'reworkLaborCost',
title: '返工工时费'
},
{
field: 'customerDeduction',
title: '客户扣款'
},
{
field: 'punitiveDamage',
title: '惩罚性罚款'
},
{
field: 'materialScrapCost',
title: '物料报废费用'
},
{
field: 'transportationExpenses',
title: '交通/运输费'
},
{
field: 'otherName',
title: '其他名字'
},
{
field: 'othersCost',
title: '其他金额'
},
{
field: 'totalAmount',
title: '合计金额'
},
{
field: 'proposePerson',
title: '提出人'
},
{
field: 'reviewedPerson',
title: '审核人'
},
{
field: 'approvalPerson',
title: '复核人'
},
{
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.supplierDeductionId + '\')"><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.supplierDeductionId + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
//获取供应商代码
$.ajax({
url: prefixSupplier + "/list",
type: "post",
dateType: "json",
success: function (res) {
console.log(res)
if (res.rows.length > 0) {
var orderData = res.rows;
for (let i in orderData) {
$("#formId select[name='supplierCode']").append("<option value='" + orderData[i].supplierCode + "'>" + orderData[i].supplierCode + "</option>");
}
} else {
$.modal.msgError(res.msg);
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
});
//导出
function exportSelectedRaw() {
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 {
$.modal.confirm("是否确认要导出本条供应商索赔扣款单?", function (){
axios({
url: prefix + '/export/'+data[0].supplierDeductionId,
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)//释放内存
})
});
}
}
</script>
</body>
</html>

1085
ruoyi-admin/src/main/resources/templates/quality/returnGoodsOrder/add.html

File diff suppressed because it is too large

1065
ruoyi-admin/src/main/resources/templates/quality/returnGoodsOrder/edit.html

File diff suppressed because it is too large

955
ruoyi-admin/src/main/resources/templates/quality/returnGoodsOrder/returnGoodsOrder.html

@ -1,955 +0,0 @@
<!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>
<style>
.table-striped{
border: 0px!important;
white-space:nowrap;
}
.base-returnGoods-order {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.base-returnGoods-order .form-group {
width: 30%;
}
.details-title {
width: 100%;
position: fixed;
font-size: 20px;
padding: 10px 0;
text-align: center;
background-color: #a7b1c2;
color: #FFFFFF;
z-index: 9999;
}
.details-body {
padding-top: 80px;
overflow-y: auto;
max-height: 750px;
}
</style>
</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="returnGoodsNumber"/>
</li>
<li>
<label>订单号:</label>
<input type="text" name="orderNumber"/>
</li>
<li>
<label>客户代码:</label>
<select name="enterpriseCode">
<option value="">所有</option>
</select>
</li>
<li>
<label>客户名称:</label>
<select name="enterpriseName">
<option value="">所有</option>
</select>
</li>
<!-- <li>-->
<!-- <label>接单方式:</label>-->
<!-- <input type="text" name="orderTakenWay"/>-->
<!-- </li>-->
<li>
<label>内外销:</label>
<select name="exportSales" th:with="type=${@dict.getType('sys_export_sales')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>确认否:</label>
<select name="confirmOrNot" th:with="type=${@dict.getType('sys_whether')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>结案否:</label>
<select name="closeCaseOrNot" th:with="type=${@dict.getType('sys_whether')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</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="quality:returnGoodsOrder:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="quality:returnGoodsOrder:edit">
<i class="fa fa-edit"></i> 修改
</a>
<!--<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="returnGoods:returnGoodsOrder:remove">
<i class="fa fa-remove"></i> 删除
</a>-->
<a class="btn btn-danger multiple disabled" onclick="removeSelected()" shiro:hasPermission="quality:returnGoodsOrder:remove">
<i class="fa fa-remove"></i> 删除
</a>
<!--<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="returnGoods:returnGoodsOrder:export">
<i class="fa fa-download"></i> 导出
</a>-->
<!-- <a class="btn btn-info single disabled" onclick="showOrderDetailModal()">-->
<!-- <i class="fa fa-file-text"></i> 订单详情-->
<!-- </a>-->
<!-- <a class="btn btn-warning" onclick="exportOrderDetail()" shiro:hasPermission="returnGoods:returnGoodsOrder:export">-->
<!-- <i class="fa fa-download"></i> 导出订单详情-->
<!-- </a>-->
<a class="btn btn-primary" onclick="confirmOrder()" shiro:hasPermission="quality:returnGoodsOrder:confirm">
<i class="fa fa-hand-grab-o"></i> 确认
</a>
<a class="btn btn-primary" onclick="closeCaseOrder()" shiro:hasPermission="quality:returnGoodsOrder:close">
<i class="fa fa-hand-grab-o"></i> 结案
</a>
</div>
<div class="col-sm-12 select-table table-striped" style="white-space: nowrap">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<!--详情信息模态框-->
<div class="modal inmodal" id="orderDetailsModal" tabindex="-1"
role="dilog" aria-hidden="true">
<div class="modal-dialog" style="width: 1400px;max-height: 800px; background-color: #FFFFFF">
<div class="modal-content" style="background-color: #FFFFFF">
<div class="details-title">订单详情</div>
<div class="modal-body details-body">
<div class="row">
<div class="base-returnGoods-order">
<div class="form-group">
<label class="col-sm-3 control-label is-required">退货单号:</label>
<div class="col-sm-8">
<input id="returnGoodsNumber" name="returnGoodsNumber" 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">
<input id="orderNumber" 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">
<input id="enterpriseCode" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">客户名称:</label>
<div class="col-sm-8">
<input id="enterpriseName" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">开单日期时间:</label>
<div class="col-sm-8">
<input id="billingDate" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系人:</label>
<div class="col-sm-8">
<input id="customerContact" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系电话:</label>
<div class="col-sm-8">
<input id="contactNumber" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">传真号码:</label>
<div class="col-sm-8">
<input id="customerFax" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">交货地点:</label>
<div class="col-sm-8">
<input id="deliveryAddress" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">付款条件:</label>
<div class="col-sm-8">
<input id="paymentCondition" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">交货条件:</label>
<div class="col-sm-8">
<input id="deliveryCondition" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">交货方式:</label>
<div class="col-sm-8">
<input id="deliveryWay" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">接单日期:</label>
<div class="col-sm-8">
<input id="orderTakenDate" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">修改日期:</label>
<div class="col-sm-8">
<input id="reviseDate" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">确认日期:</label>
<div class="col-sm-8">
<input id="confirmDate" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">接单方式:</label>
<div class="col-sm-8">
<input id="orderTakenWay" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">业务负责人:</label>
<div class="col-sm-8">
<input id="businessDirector" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注内容:</label>
<div class="col-sm-8">
<input id="returnGoodsRemark" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">内外销:</label>
<div class="col-sm-8">
<input id="exportSales" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">确认否:</label>
<div class="col-sm-8">
<input id="confirmOrNot" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">结案否:</label>
<div class="col-sm-8">
<input id="closeCaseOrNot" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">类别:</label>
<div class="col-sm-8">
<input id="returnGoodsCategory" class="form-control" type="text" readonly>
</div>
</div>
</div>
<hr>
<div class="returnGoodsList" style="margin-top: 20px;">
<div class="returnGoodsProductList">
<div class="col-sm-12 table-striped" style="margin-top: 20px;">
<div class="details" style="font-size: 18px">产品信息</div>
<table id="returnGoodsProductTable"></table>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer" style=" border-top: none;background-color: #a7b1c2">
<!-- <button type="button" class="btn btn-success" onclick="btnAudit()">审核确认</button>-->
<button type="button" class="btn btn-default" data-dismiss="modal" onclick="closeOrderDetailModal()">关闭</button>
</div>
</div>
</div>
</div>
<!--结案-->
<div class="modal fade" id="closeCaseModal">
<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-closeCase-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="returnGoodsId1" name="returnGoodsId" 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="closeCaseOrNot1" name="closeCaseOrNot" 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="closeCaseTime" name="closeCaseTime" 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="closeCaseName" name="closeCaseName" 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="closeCaseSubmit()" class="btn btn-success" data-dismiss="modal">确定</button>
</div>
</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="returnGoodsId2" name="returnGoodsId" 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="confirmOrNot2" name="confirmOrNot" 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="confirmName" name="confirmName" 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('returnGoods:returnGoodsOrder:edit')}]];
var removeFlag = [[${@permission.hasPermi('returnGoods:returnGoodsOrder:remove')}]];
var exportSalesDatas = [[${@dict.getType('sys_export_sales')}]];
var confirmOrNotDatas = [[${@dict.getType('sys_whether')}]];
var closeCaseOrNotDatas = [[${@dict.getType('sys_whether')}]];
var returnGoodsCategoryDatas = [[${@dict.getType('return_goods_category')}]];
var inventoryUnitDatas = [[${@dict.getType('sys_unit_class')}]];
var commonCurrencyDatas = [[${@dict.getType('sys_common_currency')}]];
var currentQuoteDatas = [[${@dict.getType('sys_whether')}]];
var approveNoDatas = [[${@dict.getType('sys_whether')}]];
var whetherDatas = [[${@dict.getType('sys_whether')}]];
var prefix = ctx + "quality/returnGoodsOrder";
var prefixReturnGoodsProduct = ctx + "quality/returnGoodsProduct";
$(function() {
/*显示退货列表数据*/
selectDataToTable();
/*获取客户信息*/
getCustomerList();
});
/*显示退货列表数据*/
function selectDataToTable() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "退换货订单",
clickToSelect: true,
columns: [{
checkbox: true
},
{
field: 'returnGoodsId',
title: '退货单号id',
visible: false
},
{
field: 'closeCaseOrNot',
title: '结案否',
formatter: function(value, row, index) {
//return $.table.selectDictLabel(confirmOrNotDatas, value);
// console.log($.table.selectDictLabel(confirmOrNotDatas, value))
var actions = [];
if ($.table.selectDictLabel(closeCaseOrNotDatas, 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: 'confirmOrNot',
title: '确认否',
formatter: function(value, row, index) {
//return $.table.selectDictLabel(confirmOrNotDatas, value);
// console.log($.table.selectDictLabel(confirmOrNotDatas, value))
var actions = [];
if ($.table.selectDictLabel(confirmOrNotDatas, 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: 'returnGoodsNumber',
title: '退货单号'
},
{
field: 'orderNumber',
title: '订单号'
},
{
field: 'enterpriseCode',
title: '客户代码'
},
{
field: 'enterpriseName',
title: '客户名称'
},
{
field: 'billingDate',
title: '开单日期时间'
},
{
field: 'customerContact',
title: '联系人'
},
{
field: 'contactNumber',
title: '联系电话'
},
{
field: 'customerFax',
title: '传真号码'
},
{
field: 'deliveryAddress',
title: '交货地点'
},
{
field: 'paymentCondition',
title: '付款条件'
},
{
field: 'deliveryCondition',
title: '交货条件'
},
{
field: 'deliveryWay',
title: '交货方式'
},
{
field: 'orderTakenDate',
title: '接单日期'
},
// {
// field: 'reviseDate',
// title: '修改日期'
// },
// {
// field: 'confirmDate',
// title: '订单确认日期'
// },
{
field: 'orderTakenWay',
title: '接单方式'
},
{
field: 'businessDirector',
title: '业务负责人'
},
{
field: 'returnGoodsRemark',
title: '备注内容'
},
{
field: 'exportSales',
title: '内外销',
formatter: function(value, row, index) {
return $.table.selectDictLabel(exportSalesDatas, value);
}
},
{
field: 'returnGoodsCategory',
title: '类别',
formatter: function(value, row, index) {
return $.table.selectDictLabel(returnGoodsCategoryDatas, value);
}
},
{
field: 'closeCaseName',
title: '结案人'
},
{
field: 'closeCaseTime',
title: '结案时间'
},
{
field: 'confirmName',
title: '确认人'
},
{
field: 'confirmTime',
title: '确认日期'
},
{
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];
}
}
}
// ,
// {
// 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.returnGoodsId + '\')"><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.returnGoodsId + '\')"><i class="fa fa-remove"></i>删除</a>');
// return actions.join('');
// }
// }
]
};
$.table.init(options);
}
/*获取客户信息*/
function getCustomerList() {
$.ajax({
url: prefix + "/getCustomerList",
type: "POST",
success: function (res) {
//console.log(res)
if (res.length > 0) {
customerListData = res;
//alert(JSON.stringify(data));
for (let i in customerListData) {
$("select[name='enterpriseCode']").append("<option value='" + customerListData[i].enterpriseCode + "'>" + customerListData[i].enterpriseCode + "</option>");
$("select[name='enterpriseName']").append("<option value='" + customerListData[i].enterpriseName + "'>" + customerListData[i].enterpriseName + "</option>");
}
} else {
$.modal.msgError(res.msg);
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
})
}
/*导出订单信息*/
function exportOrderDetail() {
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].orderNumber,
method: 'POST',
responseType: 'blob'
}).then(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)//释放内存
})
});
}
}
/*显示订单详情页面*/
function showOrderDetailModal() {
let data = $("#bootstrap-table").bootstrapTable("getSelections");
// console.log(data.length)
if (data.length ===1) {
$("#returnGoodsNumber").val(data[0].returnGoodsNumber)
$("#orderNumber").val(data[0].orderNumber)
$("#enterpriseCode").val(data[0].enterpriseCode)
$("#enterpriseName").val(data[0].enterpriseName)
$("#billingDate").val(data[0].billingDate)
$("#customerContact").val(data[0].customerContact)
$("#contactNumber").val(data[0].contactNumber)
$("#customerFax").val(data[0].customerFax)
$("#deliveryAddress").val(data[0].deliveryAddress)
$("#paymentCondition").val(data[0].paymentCondition)
$("#deliveryCondition").val(data[0].deliveryCondition)
$("#deliveryWay").val(data[0].deliveryWay)
$("#orderTakenDate").val(data[0].orderTakenDate)
$("#reviseDate").val(data[0].reviseDate)
$("#confirmDate").val(data[0].confirmDate)
$("#orderTakenWay").val(data[0].orderTakenWay)
$("#businessDirector").val(data[0].businessDirector)
$("#returnGoodsRemark").val(data[0].returnGoodsRemark)
$("#returnGoodsCategory").val(data[0].returnGoodsCategory)
// $("#exportSales").val(data[0].exportSales)
// $("#confirmOrNot").val(data[0].confirmOrNot)
if (data[0].exportSales == 1) {
$("#exportSales").val("外销")
} else if (data[0].exportSales == 2) {
$("#exportSales").val("内销")
} else {
$("#exportSales").val("")
}
if (data[0].confirmOrNot == 0) {
$("#confirmOrNot").val("否")
} else if (data[0].confirmOrNot == 1) {
$("#confirmOrNot").val("是")
} else {
$("#confirmOrNot").val("")
}
if (data[0].closeCaseOrNot == 0) {
$("#closeCaseOrNot").val("否")
} else if (data[0].closeCaseOrNot == 1) {
$("#closeCaseOrNot").val("是")
} else {
$("#closeCaseOrNot").val("")
}
//退货成品信息
$('#returnGoodsProductTable').bootstrapTable('destroy');
$('#returnGoodsProductTable').bootstrapTable({
url: prefixReturnGoodsProduct + '/getReturnGoodsProductByOrderNumber',
pagination: false,
// pageNumber: 1,
// pageSize: 10,
// pageList: [10, 25, 50, 100],
showRefresh: false,
method: "post",
contentType: "application/x-www-form-urlencoded",
striped: true, // 是否显示行间隔色
cache: false, // 是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
sidePagination: "server", // 分页方式:client客户端分页,server服务端分页(*)
clickToSelect: true, // 是否启用点击选中行
showToggle: false, // 是否显示详细视图和列表视图的切换按钮
cardView: false, // 是否显示详细视图
detailView: false, // 是否显示父子表
smartDisplay: false, // 加了这个才显示每页显示的行数
showExport: false, // 是否显示导出按钮
singleSelect: true,
paginationDetailHAlign: ' hiddenDetailInfo',
height: 150,
queryParams: function (params) {
//console.log("123");
var curParams = {
// 传递参数查询参数
// pageSize: params.limit,
// pageNum: params.offset / params.limit + 1,
orderNumber: data[0].orderNumber
};
// console.log($("input[name='orderNumber']").val());
return curParams
},
columns: [
// {
// checkbox: true
// },
{
field: 'finishProductCode',
title: '成品代码'
},
{
field: 'finishProductName',
title: '成品名称'
},
{
field: 'specificationModel',
title: '规格型号'
},
{
field: 'typeMachine',
title: '机种'
},
{
field: 'inventoryUnit',
title: '单位',
formatter: function (value, row, index) {
return $.table.selectDictLabel(inventoryUnitDatas, value);
}
},
{
field: 'commonCurrency',
title: '币别',
formatter: function (value, row, index) {
return $.table.selectDictLabel(commonCurrencyDatas, value);
}
},
{
field: 'processPrice',
title: '单价'
},
{
field: 'quantity',
title: '数量'
},
{
field: 'amountOfMoney',
title: '金额'
},
{
field: 'deliveryDate',
title: '交期'
},
{
field: 'batchNumber',
title: '批号'
},
{
field: 'description',
title: '说明'
},
{
field: 'completedQuantity',
title: '完成数量'
},
{
field: 'incompletedQuantity',
title: '欠单数量'
},
{
field: 'closeCaseOrNot',
title: '结案否',
formatter: function (value, row, index) {
return $.table.selectDictLabel(whetherDatas, value);
}
}]
})
$("#orderDetailsModal").modal("show");
} else {
$.modal.alertWarning("请选择一条数据");
}
}
/*关闭订单详情页面*/
function closeOrderDetailModal() {
$("#orderDetailsModal").modal("hide");
}
//删除
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 closeCaseOrder() {
var data = $("#bootstrap-table").bootstrapTable("getSelections");
let userName = [[${@permission.getPrincipalProperty('userName')}]];
if (data.length === 1) {
$("#returnGoodsId1").val(data[0].returnGoodsId)
$("#closeCaseOrNot1").val(data[0].closeCaseOrNot).trigger("change")
$("#closeCaseName").val(userName)
$("#closeCaseTime").datetimepicker("setDate", new Date());
$("#closeCaseModal").modal("show");
} else {
$.modal.alert("请选择一条数据");
}
}
/*结案*/
function closeCaseSubmit() {
$.ajax({
url: prefix + "/edit",
type: "post",
resultType: "json",
data: $('#form-closeCase-edit').serialize(),
success: function (resp) {
$("#bootstrap-table").bootstrapTable('refresh');
$.modal.msgSuccess("操作成功!")
},
error: function () {
$.modal.msgError("出错了!");
}
});
}
/*确认订单*/
function confirmOrder() {
var data = $("#bootstrap-table").bootstrapTable("getSelections");
let userName = [[${@permission.getPrincipalProperty('userName')}]];
if (data.length === 1) {
$("#returnGoodsId2").val(data[0].returnGoodsId)
$("#confirmOrNot2").val(data[0].confirmOrNot).trigger("change")
$("#confirmName").val(userName)
$("#confirmTime").datetimepicker("setDate", new Date());
$("#confirmModel").modal("show");
} else {
$.modal.alert("请选择一条数据");
}
}
/*确认提交*/
function confirmSubmit(){
var data = $("#bootstrap-table").bootstrapTable("getSelections");
$.ajax({
url: prefix + "/edit",
type: "post",
resultType: "json",
data: $('#form-confirm-edit').serialize(),
success: function (resp) {
$("#bootstrap-table").bootstrapTable('refresh');
$.modal.msgSuccess("操作成功!")
},
error: function () {
$.modal.msgError("出错了!");
}
});
}
</script>
</body>
</html>

90
ruoyi-admin/src/main/resources/templates/stock/stockInfo/stockInfo.html

@ -39,13 +39,13 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="stock:stockInfo:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="stock:stockInfo:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="stock:stockInfo:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="exportExcel()" shiro:hasPermission="stock:stockInfo:export">
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="stock:stockInfo:edit">-->
<!-- <i class="fa fa-edit"></i> 修改-->
<!-- </a>-->
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="stock:stockInfo:remove">-->
<!-- <i class="fa fa-remove"></i> 删除-->
<!-- </a>-->
<a class="btn btn-success" onclick="exportExcel()" shiro:hasPermission="stock:stockInfo:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
@ -69,41 +69,59 @@
exportUrl: prefix + "/export",
clickToSelect: true,
modalName: "仓库信息",
onDblClickCell: function (field, value, row, $element) {
var businessId = row.stockId;
var businessKey = "2";
if (field == "updateInfoTime"){
var url = ctx + "system/diffLog/getDiffDataList/" + businessId + "/" + businessKey;
$.modal.open("数据修改记录", url);
}
},
columns: [
{checkbox: true},
{title: '仓库id',field: 'stockId',visible: false},
{title: '仓库编号',field: 'stockNO',},
{title: '仓库名',field: 'stockName',},
{title: '仓库地址',field: 'stockAddr',},
{title: '仓库管理人',field: 'stockManager',},
{title: '仓库管理人电话',field: 'stockManagerPhone',},
{title: '仓库备注',field: 'stockMemo',},
{title: '录入时间',field: 'firstAddTime',
{title: '仓库编号',field: 'stockNO', align: 'center',},
{title: '仓库名',field: 'stockName',align: 'center',},
{title: '仓库地址',field: 'stockAddr',align: 'center',
formatter: function (value, row, index) {
return $.table.tooltip(value,5,"open");
}
},
{title: '仓库管理人',field: 'stockManager',align: 'center',},
// {title: '仓库管理人电话',field: 'stockManagerPhone',align: 'center',},
{title: '仓库备注',field: 'stockMemo',align: 'center',
formatter: function (value, row, index){
return $.table.tooltip(value,5,"open")
}
},
{title: '录入时间',field: 'firstAddTime',align: 'center',
// formatter: function (value, row, index) {
// // console.log(row)
// if (value == null) {return " ";}
// else {return value;}
// }
},
{title: '上次修改时间',field: 'updateInfoTime',align: 'center',
formatter: function (value, row, index) {
// console.log(row)
if (value == null) {return " ";}
else {return value;}
}
if (value){
return '<span style="color:#337ab7; cursor: pointer;">' + value + '</span>';
} else {
return value;
}
}
},
{title: '上次修改时间',field: 'updateInfoTime',
formatter: function (value, row, index) {
if (value == null) {return " ";}
else {
var vArr = value.split(',')
return vArr[0];
}
}
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.stockId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.stockId + '\')"><i class="fa fa-remove"></i>删除</a>');
var actionLinks = actions.join('');
return $.table.dropdownToggle(actionLinks);
}
}
// {
// 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.stockNO + '\')"><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.stockNO + '\')"><i class="fa fa-remove"></i>删除</a>');
// return actions.join('');
// }
// }
]
};
$.table.init(options);

455
ruoyi-admin/src/main/resources/templates/storehouse/warehousingInRawMaterial/add.html

@ -1,455 +0,0 @@
<!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" />
<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-warehousingInInfo-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">入库单号:</label>
<div class="col-sm-8">
<input name="warehousingNumber" 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">
<!-- <input name="inNoticeNumber" class="form-control" type="text">-->
<select name="inNoticeNumber" 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">
<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">
<input name="purchaseOrderNumber" 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="contacts" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库日期:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="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">
<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="documentPreparationPersonnel" 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="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="stockName" 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">
<input name="remarks" 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="deliveryMan" class="form-control" type="text">
</div>
</div>
<div class="form-group" hidden>
<label class="col-sm-3 control-label">入库方式:</label>
<div class="col-sm-8">
<input name="warehousingInWay" class="form-control" type="text">
</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 :: select2-js"/>
<th:block th:include="include :: bootstrap-table-editable-js"/>
<script th:inline="javascript">
var prefix = ctx + "storehouse/warehousingInInfo"
var prefixDetail = ctx + "storehouse/warehousingInDetail"
var prefixInspectionNotice = ctx + "storehouse/warehousingInspectionNotice";
var prefixInspectionDetail = ctx + "storehouse/warehousingInspectionDetail";
var materialTypeDatas = [[${@dict.getType('ck_meterialt_type')}]];
var inventoryUnitDatas = [[${@dict.getType('sys_unit_class')}]];
$("#form-warehousingInInfo-add").validate({
focusCleanup: true
});
function submitHandler() {
let getData=$('#addDetailTable').bootstrapTable('getData', true)
if(getData.length > 0) {
//确认添加选中的物料数据
if ($.validate.form()) {
confirmDetailMaterial();
$.operate.save(prefix + "/add", $('#form-warehousingInInfo-add').serialize());
}
} else {
$.modal.alertWarning("未选择物料,请添加!")
}
}
$("input[name='warehousingDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true,
todayBtn: true
});
$("input[name='warehousingDate']").datetimepicker('setDate', new Date())
$("input[name='warehousingInWay']").val('原料入库')
//获取单号
$.ajax({
url: prefix + "/getRawId",
type: "post",
dateType: "json",
success: function (resp) {
if (resp.code === 0) {
$("input[name='warehousingNumber']").val(resp.data);
} else {
$.modal.msgError("失败啦");
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
});
//获取暂收单号
$.ajax({
url: prefixInspectionNotice + "/list",
type: "post",
dateType: "json",
success: function (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-warehousingInInfo-add select[name='inNoticeNumber']").append("<option value='" + orderData[i].inNoticeNumber + "'>" + orderData[i].inNoticeNumber + "</option>");
}
$("#form-warehousingInInfo-add select[name='inNoticeNumber']").change(function () {
var inNoticeNumber = $(this).val();
for (let i=0;i<orderData.length;i++) {
if (orderData[i].inNoticeNumber == inNoticeNumber) {
$("#form-warehousingInInfo-add input[name='purchaseOrderNumber']").val(orderData[i].purchaseOrderNumber);
$("#form-warehousingInInfo-add input[name='supplierCode']").val(orderData[i].supplierCode);
$("#form-warehousingInInfo-add input[name='supplierName']").val(orderData[i].supplierName);
$("#form-warehousingInInfo-add input[name='contacts']").val(orderData[i].customerContact);
$("#form-warehousingInInfo-add input[name='stockNumber']").val(orderData[i].stockNumber);
$("#form-warehousingInInfo-add input[name='stockName']").val(orderData[i].stockName);
$("#form-warehousingInInfo-add input[name='stockManager']").val(orderData[i].stockManager);
$("#form-warehousingInInfo-add input[name='exportSales']").val(orderData[i].exportSales);
$("#form-warehousingInInfo-add select[name='warehousingCategory']").val(orderData[i].warehousingCategory).trigger('change');
showDetailMaterial();
}
}
})
} else {
$.modal.msgError(res.msg);
}
},
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,
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="removeMaterialData(\'' + row.materialCode + '\')" ><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
},
{
field: 'warehousingDetailId',
title: '入库物料id',
visible: false
},
{
field: 'warehousingNumber',
title: '入库单号',
visible: false
},
{
field: 'materialCode',
title: '物料代码'
},
{
field: 'materialName',
title: '物料名称'
},
{
field: 'materialType',
title: '物料类别',
formatter: function(value, row, index) {
return $.table.selectDictLabel(materialTypeDatas, value);
}
},
{
field: 'specificationModel',
title: '规格型号'
},
{
field: 'inventoryUnit',
title: '单位',
formatter: function(value, row, index) {
return $.table.selectDictLabel(inventoryUnitDatas, value);
}
},
{
field: 'warehousingQuantity',
title: '合格数量',
editable: {
type: 'text',
title: '合格数量',
emptytext: '合格数量',
validate: function (v) {
}
}
},
{
field: 'description',
title: '说明',
editable: {
type: 'text',
title: '说明',
emptytext: '说明',
validate: function (v) {
}
}
},
{
field: 'batchNumber',
title: '进货批号',
editable: {
type: 'text',
title: '进货批号',
emptytext: '进货批号',
validate: function (v) {
}
}
},
{
field: 'manufacturerBatchNumber',
title: '厂商批号',
editable: {
type: 'text',
title: '厂商批号',
emptytext: '厂商批号',
validate: function (v) {
}
}
},
{
field: 'storageLocation',
title: '存放地址',
editable: {
type: 'text',
title: '存放地址',
emptytext: '存放地址',
validate: function (v) {
}
}
}]
})
//选择暂收单号显示表内订单信息
function showDetailMaterial() {
$('#addDetailTable').bootstrapTable("removeAll")
var inNoticeNumber = $("select[name='inNoticeNumber']").val();
$.ajax({
url: prefixInspectionDetail + '/list',
type: 'post',
data: {
inNoticeNumber: inNoticeNumber
},
success: function (res) {
console.log(res)
var count = res.rows.length;
var data = res.rows;
var warehousingNumber = $("input[name='warehousingNumber']").val();
for (i = 0; i < res.rows.length; i++) {
$("#addDetailTable").bootstrapTable('insertRow', {
index: count + i,
row: {
warehousingNumber: warehousingNumber,
materialCode: data[i].materialCode,
materialName: data[i].materialName,
specificationModel: data[i].specificationModel,
materialType: data[i].materialType,
inventoryUnit: data[i].purchasingUnit,
warehousingQuantity: data[i].qualifiedQuantity,
description: data[i].purchaseExplain,
batchNumber: data[i].receiptBatchNumber,
manufacturerBatchNumber: data[i].manufacturerBatchNumber,
storageLocation: ''
}
});
}
}
})
}
//确认添加选中的物料数据
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)
},
})
}
//添加表格内删除物料信息
function removeMaterialData(materialCode){
var ids = [];
ids.push(materialCode);
$('#addDetailTable').bootstrapTable("remove",{
field:'materialCode',
values:ids
})
$("#addDetailTable").bootstrapTable('refresh');
}
</script>
</body>
</html>

416
ruoyi-admin/src/main/resources/templates/storehouse/warehousingInRawMaterial/edit.html

@ -1,416 +0,0 @@
<!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" />
<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-warehousingInInfo-edit" th:object="${warehousingInInfo}">
<input name="warehousingInfoId" th:field="*{warehousingInfoId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">入库单号:</label>
<div class="col-sm-8">
<input name="warehousingNumber" th:field="*{warehousingNumber}" 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">
<!-- <input name="inNoticeNumber" th:field="*{inNoticeNumber}" class="form-control" type="text">-->
<select name="inNoticeNumber" class="form-control m-b" required disabled>
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库类型:</label>
<div class="col-sm-8">
<select name="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">
<input name="purchaseOrderNumber" th:field="*{purchaseOrderNumber}" 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="contacts" th:field="*{contacts}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库日期:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="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">
<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="documentPreparationPersonnel" th:field="*{documentPreparationPersonnel}" 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="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="stockName" th:field="*{stockName}" 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">
<input name="remarks" th:field="*{remarks}" 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="deliveryMan" th:field="*{deliveryMan}" class="form-control" type="text">
</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 :: select2-js"/>
<th:block th:include="include :: bootstrap-table-editable-js"/>
<script th:inline="javascript">
var getData = [[${warehousingInInfo}]]
var prefix = ctx + "storehouse/warehousingInInfo"
var prefixDetail = ctx + "storehouse/warehousingInDetail"
var prefixInspectionNotice = ctx + "storehouse/warehousingInspectionNotice";
var prefixInspectionDetail = ctx + "storehouse/warehousingInspectionDetail";
var materialTypeDatas = [[${@dict.getType('ck_meterialt_type')}]];
var inventoryUnitDatas = [[${@dict.getType('sys_unit_class')}]];
$("#form-warehousingInInfo-edit").validate({
focusCleanup: true
});
function submitHandler() {
let getData=$('#addDetailTable').bootstrapTable('getData', true)
if(getData.length > 0) {
//确认添加选中的物料数据
if ($.validate.form()) {
confirmDetailMaterial();
$.operate.save(prefix + "/edit", $('#form-warehousingInInfo-edit').serialize());
}
} else {
$.modal.alertWarning("未选择物料,请添加!")
}
}
$("input[name='warehousingDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true,
todayBtn: true
});
//获取暂收单号
$.ajax({
url: prefixInspectionNotice + "/list",
type: "post",
dateType: "json",
success: function (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-warehousingInInfo-edit select[name='inNoticeNumber']").append("<option value='" + orderData[i].inNoticeNumber + "'>" + orderData[i].inNoticeNumber + "</option>");
}
$("#form-warehousingInInfo-edit select[name='inNoticeNumber']").val(getData.inNoticeNumber).trigger("change")
$("#form-warehousingInInfo-edit select[name='warehousingCategory']").val(getData.warehousingCategory).trigger("change")
$("#form-warehousingInInfo-edit select[name='inNoticeNumber']").change(function () {
var inNoticeNumber = $(this).val();
for (let i=0;i<orderData.length;i++) {
if (orderData[i].inNoticeNumber == inNoticeNumber) {
$("#form-warehousingInInfo-edit input[name='purchaseOrderNumber']").val(orderData[i].purchaseOrderNumber);
$("#form-warehousingInInfo-edit input[name='supplierCode']").val(orderData[i].supplierCode);
$("#form-warehousingInInfo-edit input[name='supplierName']").val(orderData[i].supplierName);
$("#form-warehousingInInfo-edit input[name='contacts']").val(orderData[i].customerContact);
$("#form-warehousingInInfo-edit input[name='stockNumber']").val(orderData[i].stockNumber);
$("#form-warehousingInInfo-edit input[name='stockName']").val(orderData[i].stockName);
$("#form-warehousingInInfo-edit input[name='stockManager']").val(orderData[i].stockManager);
$("#form-warehousingInInfo-edit input[name='exportSales']").val(orderData[i].exportSales);
$("#form-warehousingInInfo-edit select[name='warehousingCategory']").val(orderData[i].warehousingCategory).trigger('change');
showDetailMaterial();
}
}
})
} else {
$.modal.msgError(res.msg);
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
});
//初始化添加材料表
$('#addDetailTable').bootstrapTable({
url: prefixDetail + '/list',
method: "post",
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,
queryParams: function (params) {
//console.log("123");
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
warehousingNumber: getData.warehousingNumber
// enterpriseCode: data[0].enterpriseCode
};
// console.log(data[0].enterpriseCode)
return curParams
},
columns: [
{
field: 'warehousingDetailId',
title: '入库物料id',
visible: false
},
{
field: 'warehousingNumber',
title: '入库单号',
visible: false
},
{
field: 'materialCode',
title: '物料代码'
},
{
field: 'materialName',
title: '物料名称'
},
{
field: 'materialType',
title: '物料类别',
formatter: function(value, row, index) {
return $.table.selectDictLabel(materialTypeDatas, value);
}
},
{
field: 'specificationModel',
title: '规格型号'
},
{
field: 'inventoryUnit',
title: '单位',
formatter: function(value, row, index) {
return $.table.selectDictLabel(inventoryUnitDatas, value);
}
},
{
field: 'warehousingQuantity',
title: '合格数量',
editable: {
type: 'text',
title: '合格数量',
emptytext: '合格数量',
validate: function (v) {
}
}
},
{
field: 'description',
title: '说明',
editable: {
type: 'text',
title: '说明',
emptytext: '说明',
validate: function (v) {
}
}
},
{
field: 'batchNumber',
title: '进货批号',
editable: {
type: 'text',
title: '进货批号',
emptytext: '进货批号',
validate: function (v) {
}
}
},
{
field: 'manufacturerBatchNumber',
title: '厂商批号',
editable: {
type: 'text',
title: '厂商批号',
emptytext: '厂商批号',
validate: function (v) {
}
}
},
{
field: 'storageLocation',
title: '存放地址',
editable: {
type: 'text',
title: '存放地址',
emptytext: '存放地址',
validate: function (v) {
}
}
}]
})
//选择暂收单号显示表内订单信息
function showDetailMaterial() {
$('#addDetailTable').bootstrapTable("removeAll")
var inNoticeNumber = $("select[name='inNoticeNumber']").val();
$.ajax({
url: prefixInspectionDetail + '/list',
type: 'post',
data: {
inNoticeNumber: inNoticeNumber
},
success: function (res) {
console.log(res)
var count = res.rows.length;
var data = res.rows;
var warehousingNumber = $("input[name='warehousingNumber']").val();
for (i = 0; i < res.rows.length; i++) {
$("#addDetailTable").bootstrapTable('insertRow', {
index: count + i,
row: {
warehousingNumber: warehousingNumber,
materialCode: data[i].materialCode,
materialName: data[i].materialName,
specificationModel: data[i].specificationModel,
materialType: data[i].materialType,
inventoryUnit: data[i].purchasingUnit,
warehousingQuantity: data[i].qualifiedQuantity,
description: data[i].purchaseExplain,
batchNumber: data[i].receiptBatchNumber,
manufacturerBatchNumber: '',
storageLocation: ''
}
});
}
}
})
}
//确认添加选中的物料数据
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>

270
ruoyi-admin/src/main/resources/templates/storehouse/warehousingInRawMaterial/warehousingInRawMaterial.html

@ -1,270 +0,0 @@
<!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('入库列表')" />
<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="warehousingNumber"/>
</li>
<li>
<label>暂收单号:</label>
<input type="text" name="inNoticeNumber"/>
</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>
<label>采购订单号:</label>
<input type="text" name="purchaseOrderNumber"/>
</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>
<label>仓库名称:</label>
<input type="text" name="stockName"/>
</li>
<li>
<label>内外销:</label>
<select name="exportSales" th:with="type=${@dict.getType('sys_export_sales')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</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:warehousingInInfo:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="storehouse:warehousingInInfo:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="removeSelected()" shiro:hasPermission="storehouse:warehousingInInfo:remove">
<i class="fa fa-remove"></i> 删除
</a>
<!-- <a class="btn btn-warning" onclick="exportSelectedRaw()" shiro:hasPermission="storehouse:warehousingInInfo:export">-->
<!-- <i class="fa fa-download"></i> 导出-->
<!-- </a>-->
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" style="white-space: nowrap"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('storehouse:warehousingInInfo:edit')}]];
var removeFlag = [[${@permission.hasPermi('storehouse:warehousingInInfo:remove')}]];
var warehousingCategoryDatas = [[${@dict.getType('warehousing_category')}]];
var exportSalesDatas = [[${@dict.getType('sys_export_sales')}]];
var prefix = ctx + "storehouse/warehousingInInfo";
$(function() {
var options = {
url: prefix + "/listRaw",
createUrl: prefix + "/addRaw",
updateUrl: prefix + "/editRaw/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
clickToSelect: true,
modalName: "入库",
columns: [{
checkbox: true
},
{
field: 'warehousingInfoId',
title: '入库id',
visible: false
},
{
field: 'warehousingNumber',
title: '入库单号'
},
{
field: 'inNoticeNumber',
title: '暂收单号'
},
{
field: 'warehousingCategory',
title: '入库类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(warehousingCategoryDatas, value);
}
},
{
field: 'purchaseOrderNumber',
title: '采购订单号'
},
{
field: 'contacts',
title: '联系人'
},
{
field: 'warehousingDate',
title: '入库日期'
},
{
field: 'supplierCode',
title: '供应商代码'
},
{
field: 'supplierName',
title: '供应商名称'
},
{
field: 'documentPreparationPersonnel',
title: '制单人员'
},
{
field: 'stockNumber',
title: '仓库号'
},
{
field: 'stockName',
title: '仓库名称'
},
{
field: 'stockManager',
title: '仓库管理员'
},
{
field: 'exportSales',
title: '内外销',
formatter: function(value, row, index) {
return $.table.selectDictLabel(exportSalesDatas, value);
}
},
{
field: 'remarks',
title: '备注'
},
{
field: 'deliveryMan',
title: '送货人'
},
{
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];
}
}
}]
// {
// 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.warehousingInfoId + '\')"><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.warehousingInfoId + '\')"><i class="fa fa-remove"></i>删除</a>');
// return actions.join('');
// }
// }
};
$.table.init(options);
});
//删除
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 exportSelectedRaw() {
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 {
$.modal.confirm("是否确认要导出本条订单?", function (){
axios({
url: prefix + '/exportSelectedRaw/'+data[0].warehousingInfoId,
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)//释放内存
})
});
}
}
</script>
</body>
</html>

447
ruoyi-admin/src/main/resources/templates/storehouse/warehousingInSubsidiary/add.html

@ -1,447 +0,0 @@
<!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" />
<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-warehousingInInfo-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">入库单号:</label>
<div class="col-sm-8">
<input name="warehousingNumber" 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">
<!-- <input name="inNoticeNumber" class="form-control" type="text">-->
<select name="inNoticeNumber" 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">
<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">
<input name="purchaseOrderNumber" 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="contacts" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库日期:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="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">
<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="documentPreparationPersonnel" 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="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="stockName" 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">
<input name="remarks" 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="deliveryMan" class="form-control" type="text">
</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 :: select2-js"/>
<th:block th:include="include :: bootstrap-table-editable-js"/>
<script th:inline="javascript">
var prefix = ctx + "storehouse/warehousingInInfo"
var prefixDetail = ctx + "storehouse/warehousingInDetail"
var prefixInspectionNotice = ctx + "storehouse/warehousingInspectionNotice";
var prefixInspectionDetail = ctx + "storehouse/warehousingInspectionDetail";
var materialTypeDatas = [[${@dict.getType('ck_meterialt_type')}]];
var inventoryUnitDatas = [[${@dict.getType('sys_unit_class')}]];
$("#form-warehousingInInfo-add").validate({
focusCleanup: true
});
function submitHandler() {
let getData=$('#addDetailTable').bootstrapTable('getData', true)
if(getData.length > 0) {
//确认添加选中的物料数据
if ($.validate.form()) {
confirmDetailMaterial();
$.operate.save(prefix + "/add", $('#form-warehousingInInfo-add').serialize());
}
} else {
$.modal.alertWarning("未选择物料,请添加!")
}
}
$("input[name='warehousingDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true,
todayBtn: true
});
$("input[name='warehousingDate']").datetimepicker('setDate', new Date())
//获取单号
$.ajax({
url: prefix + "/getSubsidiaryId",
type: "post",
dateType: "json",
success: function (resp) {
if (resp.code === 0) {
$("input[name='warehousingNumber']").val(resp.data);
} else {
$.modal.msgError("失败啦");
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
});
//获取暂收单号
$.ajax({
url: prefixInspectionNotice + "/list",
type: "post",
dateType: "json",
success: function (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-warehousingInInfo-add select[name='inNoticeNumber']").append("<option value='" + orderData[i].inNoticeNumber + "'>" + orderData[i].inNoticeNumber + "</option>");
}
$("#form-warehousingInInfo-add select[name='inNoticeNumber']").change(function () {
var inNoticeNumber = $(this).val();
for (let i=0;i<orderData.length;i++) {
if (orderData[i].inNoticeNumber == inNoticeNumber) {
$("#form-warehousingInInfo-add input[name='purchaseOrderNumber']").val(orderData[i].purchaseOrderNumber);
$("#form-warehousingInInfo-add input[name='supplierCode']").val(orderData[i].supplierCode);
$("#form-warehousingInInfo-add input[name='supplierName']").val(orderData[i].supplierName);
$("#form-warehousingInInfo-add input[name='contacts']").val(orderData[i].customerContact);
$("#form-warehousingInInfo-add input[name='stockNumber']").val(orderData[i].stockNumber);
$("#form-warehousingInInfo-add input[name='stockName']").val(orderData[i].stockName);
$("#form-warehousingInInfo-add input[name='stockManager']").val(orderData[i].stockManager);
$("#form-warehousingInInfo-add input[name='exportSales']").val(orderData[i].exportSales);
$("#form-warehousingInInfo-add select[name='warehousingCategory']").val(orderData[i].warehousingCategory).trigger('change');
showDetailMaterial();
}
}
})
} else {
$.modal.msgError(res.msg);
}
},
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,
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="removeMaterialData(\'' + row.materialCode + '\')" ><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
},
{
field: 'warehousingDetailId',
title: '入库物料id',
visible: false
},
{
field: 'warehousingNumber',
title: '入库单号',
visible: false
},
{
field: 'materialCode',
title: '物料代码'
},
{
field: 'materialName',
title: '物料名称'
},
{
field: 'materialType',
title: '物料类别',
formatter: function(value, row, index) {
return $.table.selectDictLabel(materialTypeDatas, value);
}
},
{
field: 'specificationModel',
title: '规格型号'
},
{
field: 'inventoryUnit',
title: '单位',
formatter: function(value, row, index) {
return $.table.selectDictLabel(inventoryUnitDatas, value);
}
},
{
field: 'warehousingQuantity',
title: '合格数量',
editable: {
type: 'text',
title: '合格数量',
emptytext: '合格数量',
validate: function (v) {
}
}
},
{
field: 'description',
title: '说明',
editable: {
type: 'text',
title: '说明',
emptytext: '说明',
validate: function (v) {
}
}
},
{
field: 'batchNumber',
title: '进货批号',
editable: {
type: 'text',
title: '进货批号',
emptytext: '进货批号',
validate: function (v) {
}
}
},
{
field: 'manufacturerBatchNumber',
title: '厂商批号',
editable: {
type: 'text',
title: '厂商批号',
emptytext: '厂商批号',
validate: function (v) {
}
}
},
{
field: 'storageLocation',
title: '存放地址',
editable: {
type: 'text',
title: '存放地址',
emptytext: '存放地址',
validate: function (v) {
}
}
}]
})
//选择暂收单号显示表内订单信息
function showDetailMaterial() {
$('#addDetailTable').bootstrapTable("removeAll")
var inNoticeNumber = $("select[name='inNoticeNumber']").val();
$.ajax({
url: prefixInspectionDetail + '/list',
type: 'post',
data: {
inNoticeNumber: inNoticeNumber
},
success: function (res) {
console.log(res)
var count = res.rows.length;
var data = res.rows;
var warehousingNumber = $("input[name='warehousingNumber']").val();
for (i = 0; i < res.rows.length; i++) {
$("#addDetailTable").bootstrapTable('insertRow', {
index: count + i,
row: {
warehousingNumber: warehousingNumber,
materialCode: data[i].materialCode,
materialName: data[i].materialName,
specificationModel: data[i].specificationModel,
materialType: data[i].materialType,
inventoryUnit: data[i].purchasingUnit,
warehousingQuantity: data[i].qualifiedQuantity,
description: data[i].purchaseExplain,
batchNumber: data[i].receiptBatchNumber,
manufacturerBatchNumber: data[i].manufacturerBatchNumber,
storageLocation: ''
}
});
}
}
})
}
//确认添加选中的物料数据
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)
},
})
}
//添加表格内删除物料信息
function removeMaterialData(materialCode){
var ids = [];
ids.push(materialCode);
$('#addDetailTable').bootstrapTable("remove",{
field:'materialCode',
values:ids
})
$("#addDetailTable").bootstrapTable('refresh');
}
</script>
</body>
</html>

415
ruoyi-admin/src/main/resources/templates/storehouse/warehousingInSubsidiary/edit.html

@ -1,415 +0,0 @@
<!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" />
<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-warehousingInInfo-edit" th:object="${warehousingInInfo}">
<input name="warehousingInfoId" th:field="*{warehousingInfoId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">入库单号:</label>
<div class="col-sm-8">
<input name="warehousingNumber" th:field="*{warehousingNumber}" 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">
<!-- <input name="inNoticeNumber" th:field="*{inNoticeNumber}" class="form-control" type="text">-->
<select name="inNoticeNumber" class="form-control m-b" required disabled>
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库类型:</label>
<div class="col-sm-8">
<select name="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">
<input name="purchaseOrderNumber" th:field="*{purchaseOrderNumber}" 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="contacts" th:field="*{contacts}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库日期:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="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">
<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="documentPreparationPersonnel" th:field="*{documentPreparationPersonnel}" 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="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="stockName" th:field="*{stockName}" 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">
<input name="remarks" th:field="*{remarks}" 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="deliveryMan" th:field="*{deliveryMan}" class="form-control" type="text">
</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 :: select2-js"/>
<th:block th:include="include :: bootstrap-table-editable-js"/>
<script th:inline="javascript">
var getData = [[${warehousingInInfo}]]
var prefix = ctx + "storehouse/warehousingInInfo";
var prefixDetail = ctx + "storehouse/warehousingInDetail"
var prefixInspectionNotice = ctx + "storehouse/warehousingInspectionNotice";
var prefixInspectionDetail = ctx + "storehouse/warehousingInspectionDetail";
var materialTypeDatas = [[${@dict.getType('ck_meterialt_type')}]];
var inventoryUnitDatas = [[${@dict.getType('sys_unit_class')}]];
$("#form-warehousingInInfo-edit").validate({
focusCleanup: true
});
function submitHandler() {
let getData=$('#addDetailTable').bootstrapTable('getData', true)
if(getData.length > 0) {
//确认添加选中的物料数据
if ($.validate.form()) {
confirmDetailMaterial();
$.operate.save(prefix + "/edit", $('#form-warehousingInInfo-edit').serialize());
}
} else {
$.modal.alertWarning("未选择物料,请添加!")
}
}
$("input[name='warehousingDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true,
todayBtn: true
});
//获取暂收单号
$.ajax({
url: prefixInspectionNotice + "/list",
type: "post",
dateType: "json",
success: function (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-warehousingInInfo-edit select[name='inNoticeNumber']").append("<option value='" + orderData[i].inNoticeNumber + "'>" + orderData[i].inNoticeNumber + "</option>");
}
$("#form-warehousingInInfo-edit select[name='inNoticeNumber']").val(getData.inNoticeNumber).trigger("change")
$("#form-warehousingInInfo-edit select[name='warehousingCategory']").val(getData.warehousingCategory).trigger("change")
$("#form-warehousingInInfo-edit select[name='inNoticeNumber']").change(function () {
var inNoticeNumber = $(this).val();
for (let i=0;i<orderData.length;i++) {
if (orderData[i].inNoticeNumber == inNoticeNumber) {
$("#form-warehousingInInfo-edit input[name='purchaseOrderNumber']").val(orderData[i].purchaseOrderNumber);
$("#form-warehousingInInfo-edit input[name='supplierCode']").val(orderData[i].supplierCode);
$("#form-warehousingInInfo-edit input[name='supplierName']").val(orderData[i].supplierName);
$("#form-warehousingInInfo-edit input[name='contacts']").val(orderData[i].customerContact);
$("#form-warehousingInInfo-edit input[name='stockNumber']").val(orderData[i].stockNumber);
$("#form-warehousingInInfo-edit input[name='stockName']").val(orderData[i].stockName);
$("#form-warehousingInInfo-edit input[name='stockManager']").val(orderData[i].stockManager);
$("#form-warehousingInInfo-edit input[name='exportSales']").val(orderData[i].exportSales);
$("#form-warehousingInInfo-edit select[name='warehousingCategory']").val(orderData[i].warehousingCategory).trigger('change');
showDetailMaterial();
}
}
})
} else {
$.modal.msgError(res.msg);
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
});
//初始化添加材料表
$('#addDetailTable').bootstrapTable({
url: prefixDetail + '/list',
method: "post",
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,
queryParams: function (params) {
//console.log("123");
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
warehousingNumber: getData.warehousingNumber
// enterpriseCode: data[0].enterpriseCode
};
// console.log(data[0].enterpriseCode)
return curParams
},
columns: [
{
field: 'warehousingDetailId',
title: '入库物料id',
visible: false
},
{
field: 'warehousingNumber',
title: '入库单号',
visible: false
},
{
field: 'materialCode',
title: '物料代码'
},
{
field: 'materialName',
title: '物料名称'
},
{
field: 'materialType',
title: '物料类别',
formatter: function(value, row, index) {
return $.table.selectDictLabel(materialTypeDatas, value);
}
},
{
field: 'specificationModel',
title: '规格型号'
},
{
field: 'inventoryUnit',
title: '单位',
formatter: function(value, row, index) {
return $.table.selectDictLabel(inventoryUnitDatas, value);
}
},
{
field: 'warehousingQuantity',
title: '合格数量',
editable: {
type: 'text',
title: '合格数量',
emptytext: '合格数量',
validate: function (v) {
}
}
},
{
field: 'description',
title: '说明',
editable: {
type: 'text',
title: '说明',
emptytext: '说明',
validate: function (v) {
}
}
},
{
field: 'batchNumber',
title: '进货批号',
editable: {
type: 'text',
title: '进货批号',
emptytext: '进货批号',
validate: function (v) {
}
}
},
{
field: 'manufacturerBatchNumber',
title: '厂商批号',
editable: {
type: 'text',
title: '厂商批号',
emptytext: '厂商批号',
validate: function (v) {
}
}
},
{
field: 'storageLocation',
title: '存放地址',
editable: {
type: 'text',
title: '存放地址',
emptytext: '存放地址',
validate: function (v) {
}
}
}]
})
//选择暂收单号显示表内订单信息
function showDetailMaterial() {
$('#addDetailTable').bootstrapTable("removeAll")
var inNoticeNumber = $("select[name='inNoticeNumber']").val();
$.ajax({
url: prefixInspectionDetail + '/list',
type: 'post',
data: {
inNoticeNumber: inNoticeNumber
},
success: function (res) {
console.log(res)
var count = res.rows.length;
var data = res.rows;
var warehousingNumber = $("input[name='warehousingNumber']").val();
for (i = 0; i < res.rows.length; i++) {
$("#addDetailTable").bootstrapTable('insertRow', {
index: count + i,
row: {
warehousingNumber: warehousingNumber,
materialCode: data[i].materialCode,
materialName: data[i].materialName,
specificationModel: data[i].specificationModel,
materialType: data[i].materialType,
inventoryUnit: data[i].purchasingUnit,
warehousingQuantity: data[i].qualifiedQuantity,
description: data[i].purchaseExplain,
batchNumber: data[i].receiptBatchNumber,
manufacturerBatchNumber: '',
storageLocation: ''
}
});
}
}
})
}
//确认添加选中的物料数据
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>

260
ruoyi-admin/src/main/resources/templates/storehouse/warehousingInSubsidiary/warehousingInSubsidiary.html

@ -1,260 +0,0 @@
<!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('入库列表')" />
<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="warehousingNumber"/>
</li>
<li>
<label>暂收单号:</label>
<input type="text" name="inNoticeNumber"/>
</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>
<label>采购订单号:</label>
<input type="text" name="purchaseOrderNumber"/>
</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>
<label>仓库名称:</label>
<input type="text" name="stockName"/>
</li>
<li>
<label>内外销:</label>
<select name="exportSales" th:with="type=${@dict.getType('sys_export_sales')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</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:warehousingInInfo:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="storehouse:warehousingInInfo:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="removeSelected()" shiro:hasPermission="storehouse:warehousingInInfo:remove">
<i class="fa fa-remove"></i> 删除
</a>
<!-- <a class="btn btn-warning" onclick="exportSelectedSubsidiary()" shiro:hasPermission="storehouse:warehousingInInfo:export">-->
<!-- <i class="fa fa-download"></i> 导出-->
<!-- </a>-->
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" style="white-space: nowrap"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('storehouse:warehousingInInfo:edit')}]];
var removeFlag = [[${@permission.hasPermi('storehouse:warehousingInInfo:remove')}]];
var warehousingCategoryDatas = [[${@dict.getType('warehousing_category')}]];
var exportSalesDatas = [[${@dict.getType('sys_export_sales')}]];
var prefix = ctx + "storehouse/warehousingInInfo";
$(function() {
var options = {
url: prefix + "/listSubsidiary",
createUrl: prefix + "/addSubsidiary",
updateUrl: prefix + "/editSubsidiary/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
clickToSelect: true,
modalName: "入库",
columns: [{
checkbox: true
},
{
field: 'warehousingInfoId',
title: '入库id',
visible: false
},
{
field: 'warehousingNumber',
title: '入库单号'
},
{
field: 'inNoticeNumber',
title: '暂收单号'
},
{
field: 'warehousingCategory',
title: '入库类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(warehousingCategoryDatas, value);
}
},
{
field: 'purchaseOrderNumber',
title: '采购订单号'
},
{
field: 'contacts',
title: '联系人'
},
{
field: 'warehousingDate',
title: '入库日期'
},
{
field: 'supplierCode',
title: '供应商代码'
},
{
field: 'supplierName',
title: '供应商名称'
},
{
field: 'documentPreparationPersonnel',
title: '制单人员'
},
{
field: 'stockNumber',
title: '仓库号'
},
{
field: 'stockName',
title: '仓库名称'
},
{
field: 'stockManager',
title: '仓库管理员'
},
{
field: 'exportSales',
title: '内外销',
formatter: function(value, row, index) {
return $.table.selectDictLabel(exportSalesDatas, value);
}
},
{
field: 'remarks',
title: '备注'
},
{
field: 'deliveryMan',
title: '送货人'
},
{
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 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 exportSelectedSubsidiary() {
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 {
$.modal.confirm("是否确认要导出本条订单?", function (){
axios({
url: prefix + '/exportSelectedSubsidiary/'+data[0].warehousingInfoId,
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)//释放内存
})
});
}
}
</script>
</body>
</html>

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

@ -146,8 +146,16 @@
{title: '出差人',field: 'evectionBy',align: 'center',visible: false,},
{title: '同行人',field: 'partnerBy',align: 'center',},
{title: '出差地',field: 'evectionAddr',align: 'center',},
{title: '出差详细地址',field: 'evectionDetailAddr',align: 'center',},
{title: '出差事由',field: 'evectionCauses',align: 'center',},
{title: '出差详细地址',field: 'evectionDetailAddr',align: 'center',
formatter: function(value, row, index) {
return $.table.tooltip(value,5,"open");
}
},
{title: '出差事由',field: 'evectionCauses',align: 'center',
formatter: function(value, row, index) {
return $.table.tooltip(value,5,"open");
}
},
{title: '出差起始时间',field: 'evectionBeginTime',align: 'center',visible: false,},
{title: '出差结束时间',field: 'evectionEndTime',align: 'center',visible: false,},
{title: '出差时间',field: 'evectionTime',align: 'center',

68
ruoyi-admin/src/main/resources/templates/system/baseExpense/add.html

@ -9,36 +9,44 @@
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-baseExpense-add">
<div class="col-xs-12">
<div class="col-xs-3" style="margin-left: 80px;">
<label class="col-sm-4 control-label is-required">部门:</label>
<div class="col-sm-8">
<input name="deptName" class="form-control" type="text" readonly required>
</div>
<div class="form-group">
<label class="col-sm-4 control-label is-required">部门:</label>
<div class="col-sm-8">
<input name="deptName" class="form-control" type="text" readonly required>
</div>
<div class="col-xs-3">
<label class="col-sm-4 control-label">岗位:</label>
<div class="col-sm-8">
<input name="postName" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">岗位:</label>
<div class="col-sm-8">
<input name="postName" class="form-control" type="text" readonly>
</div>
<div class="col-xs-3">
<label class="col-sm-4 control-label is-required">姓名:</label>
<div class="col-sm-8">
<input name="fullName" class="form-control" type="text" readonly required>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label is-required">姓名:</label>
<div class="col-sm-8">
<input name="fullName" class="form-control" type="text" readonly required>
</div>
</div>
<div class="col-xs-10" style="padding-left: 96px;padding-top: 20px;">
<div class="form-group">
<label class="col-sm-3 control-label is-required">报销方式:</label>
<div class="col-sm-6">
<select id="add_expenseMethod" name="expenseMethod" onchange="handleExpenseMethod(this)" class="form-control" th:with="dictList=${@dict.getType('sys_base_expense_method')}" required>
<option th:each="dict : ${dictList}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="remark" class="form-control"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label is-required">报销方式:</label>
<div class="col-sm-8">
<select id="add_expenseMethod" name="expenseMethod" onchange="handleExpenseMethod(this)" class="form-control" th:with="dictList=${@dict.getType('sys_base_expense_method')}" required>
<option th:each="dict : ${dictList}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div id="add_expenseMethodModal" class="container" style="display: none;margin-left: 150px;border: 1px dashed #ddd;padding-top: 10px;padding-bottom: 10px;">
<div class="col-xs-6">
<label class="col-sm-4 control-label is-required" style="text-align: left;padding-left: 0px;padding-right: 0px;">是否是委外/采购报销:</label>
@ -75,14 +83,6 @@
</div>
</div>
<input type="hidden" name="expenseDetailList" id="expenseDetailList">
<div class="col-xs-6" style="margin-left: 100px;padding-top: 10px;">
<div class="form-group">
<label class="col-sm-4 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="remark" class="form-control"></textarea>
</div>
</div>
</div>
</form>
<div class="container" style="margin-top: 5px;">
<div class="form-row">
@ -116,9 +116,7 @@
getSelections();
var options = {
id:'bootstrap-sub-table-expense',
pagination: false,
showToggle: false,
showColumns: false,
showSearch: false,
showFooter: true,
model: "报销单数据",
columns: [

23
ruoyi-admin/src/main/resources/templates/system/baseExpense/baseExpense.html

@ -128,8 +128,6 @@
exportUrl: prefix + "/export",
detailUrl: prefix + "/detail/{id}",
modalName: "报销单",
height: 800,
// pageSize: 10,
sortable: true, // 是否启用排序
sortStable: true, // 设置为 true 将获得稳定的排序
fixedColumns: true, // 启用冻结列
@ -198,13 +196,13 @@
formatter: function (value, row, index) {
var actions = [];
if(row.auditStatus=="1" && row.useStatus=="1") {
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.expenseId + '\')"><i class="fa fa-remove"></i> 作废</a>');
actions.push('<a href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.expenseId + '\')"><i class="fa fa-remove"></i> 作废</a>');
}if(row.attrs == "2"){
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.expenseId + '\')"><i class="fa fa-edit"></i> 编辑</a> ');
actions.push('<a href="javascript:void(0)" onclick="$.operate.edit(\'' + row.expenseId + '\')"><i class="fa fa-edit"></i> 编辑</a> ');
}
// 有流程实例id
if(row.useStatus=="2" ){
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.expenseId + '\')"><i class="fa fa-window-restore"></i> 恢复</a> ');
actions.push('<a href="javascript:void(0)" onclick="$.operate.restore(\'' + row.expenseId + '\')"><i class="fa fa-window-restore"></i> 恢复</a> ');
}
// 有流程实例id
if (row.instanceId) {
@ -213,21 +211,22 @@
var todoUserIdList = row.todoUserId.split(",");
if(todoUserIdList.includes(loginName)){
var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批';
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="showVerifyDialog(\'' + prefix + '\',\'' + row.taskId + '\', \'' + row.taskName+"-"+ row.instanceTypeName +"申请" + '\')"><i class="fa fa-edit"></i> '+nodeName+'</a> ');
actions.push('<a href="javascript:void(0)" onclick="showVerifyDialog(\'' + prefix + '\',\'' + row.taskId + '\', \'' + row.taskName+"-"+ row.instanceTypeName +"申请" + '\')"><i class="fa fa-edit"></i> '+nodeName+'</a> ');
}
}
actions.push('<a class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="showHistoryDialog(\'' + row.instanceId + '\')"><i class="fa fa-list"></i> 审批历史</a> ');
actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="showProcessImgDialog(\'' + row.instanceId + '\')"><i class="fa fa-image"></i> 进度查看</a> ');
actions.push('<a href="javascript:void(0)" onclick="showHistoryDialog(\'' + row.instanceId + '\')"><i class="fa fa-list"></i> 审批历史</a> ');
actions.push('<a href="javascript:void(0)" onclick="showProcessImgDialog(\'' + row.instanceId + '\')"><i class="fa fa-image"></i> 进度查看</a> ');
}
if(row.auditStatus=="1" && row.managerAuditStatus=="1") {
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="exportExpense(\'' + row.expenseId + '\', \'' + row.expenseCode + '\')"><i class="fa fa-print"></i> 导出</a> ');
actions.push('<a href="javascript:void(0)" onclick="exportExpense(\'' + row.expenseId + '\', \'' + row.expenseCode + '\')"><i class="fa fa-print"></i> 导出</a> ');
}
if(row.auditStatus=="1" && row.financeAuditStatus=="3" && row.managerAuditStatus=="1") {
actions.push('<a class="btn btn-success btn-xs ' + comfrimExpenseFlag + '" href="javascript:void(0)" onclick="financialExpenseAmount(\'' + row.expenseId + '\')"><i class="fa fa-print"></i> 确认打款</a>');
actions.push('<a class="' + comfrimExpenseFlag + '" href="javascript:void(0)" onclick="financialExpenseAmount(\'' + row.expenseId + '\')"><i class="fa fa-print"></i> 确认打款</a>');
}
// 详情
actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.expenseId + '\')"><i class="fa fa-eye"></i> 详情</a> ');
return actions.join('');
actions.push('<a href="javascript:void(0)" onclick="$.operate.detail(\'' + row.expenseId + '\')"><i class="fa fa-eye"></i> 详情</a> ');
var actionLinks = actions.join('');
return $.table.dropdownToggle(actionLinks);
}
}
],

36
ruoyi-admin/src/main/resources/templates/system/companyInformation/companyInformation.html

@ -23,13 +23,13 @@
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<!-- <div class="btn-group-sm" id="toolbar" role="group">-->
<!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:companyInformation:add">-->
<!-- <i class="fa fa-plus"></i> 添加-->
<!-- </a>-->
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:companyInformation:edit">
<i class="fa fa-edit"></i> 修改
</a>
<!-- <a class="btn btn-success single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:companyInformation:edit">-->
<!-- <i class="fa fa-edit"></i> 修改-->
<!-- </a>-->
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:companyInformation:remove">-->
<!-- <i class="fa fa-remove"></i> 删除-->
<!-- </a>-->
@ -39,9 +39,9 @@
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:companyInformation:export">-->
<!-- <i class="fa fa-download"></i> 导出-->
<!-- </a>-->
</div>
<!-- </div>-->
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" style="white-space:nowrap"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@ -66,6 +66,8 @@
importUrl: prefix + "/importData",
importTemplateUrl: prefix + "/importTemplate",
clickToSelect: true,
fixedColumns:true,
fixedRightNumber:1,
modalName: "公司信息",
columns: [{
checkbox: true
@ -216,18 +218,18 @@
return vArr[0];
}
}
}
},
// {
// 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.companyId + '\')"><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.companyId + '\')"><i class="fa fa-remove"></i>删除</a>');
// return actions.join('');
// }
// }
{
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.companyId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
var actionLinks = actions.join('');
return $.table.dropdownToggle(actionLinks);
}
}
]
};
$.table.init(options);

1
ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/add.html

@ -81,6 +81,7 @@
id:'bootstrap-sub-table-empRequisitionChild',
pagination: false,
sidePagination: "client",
showSearch:false,
model: "物料信息",
columns: [
{checkbox: true},

49
ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/empRequisiteOrder.html

@ -11,11 +11,11 @@
<div class="select-list">
<ul>
<li>
<label>领料单号:</label>
<label>领料单号:</label>
<input type="text" name="requisitieCode"/>
</li>
<li>
<label>关联单号:</label>
<label>关联单号:</label>
<input type="text" name="correlationCode"/>
</li>
<li>
@ -41,7 +41,7 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:empRequisiteOrder:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-warning" onclick="exportExcel()" shiro:hasPermission="system:empRequisiteOrder:export">
<a class="btn btn-success" onclick="exportExcel()" shiro:hasPermission="system:empRequisiteOrder:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
@ -110,6 +110,16 @@
title: '流程实例类型',
visible: false
},
{
field: 'taskId',
title: '当前任务ID',
visible: false
},
{
field: 'todoUserId',
title: '待办用户ID',
visible: false
},
{
field: 'applyUser',
title: '申请人ID',
@ -120,6 +130,9 @@
title: '当前任务名称',
visible: false
},
{title: '审核状态',field: 'auditStatus',visible: false,
formatter: function(value, row, index) {return $.table.selectDictLabel(auditStatusDatas, value);}
},
{
field: 'taskStatus',
title: '当前状态',
@ -167,19 +180,6 @@
title: '申请时间',
align: 'center',
},
{
field: 'taskId',
title: '当前任务ID',
visible: false
},
{
field: 'todoUserId',
title: '待办用户ID',
visible: false
},
{title: '审核状态',field: 'auditStatus',visible: false,
formatter: function(value, row, index) {return $.table.selectDictLabel(auditStatusDatas, value);}
},
{title: '领料员',field: 'createBy',align: 'center',},
{title: '不含税总价(RMB)',field: 'noRmbSum',visible: false},
{title: '含税总价(RMB)',field: 'rmbSum',visible: false},
@ -203,19 +203,20 @@
var todoUserIdList = row.todoUserId.split(",");
if(todoUserIdList.includes(loginName) || loginName == 'admin'){
var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批';
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="showVerifyDialog(\'' + prefix + '\',\'' + row.taskId + '\', \'' + row.taskName+"-"+"申请" + '\')"><i class="fa fa-edit"></i> '+nodeName+'</a> ');
actions.push('<a href="javascript:void(0)" onclick="showVerifyDialog(\'' + prefix + '\',\'' + row.taskId + '\', \'' + row.taskName+"-"+"申请" + '\')"><i class="fa fa-edit"></i> '+nodeName+'</a> ');
}
}
// 审批历史
actions.push('<a class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="showHistoryDialog(\'' + row.instanceId + '\')"><i class="fa fa-list"></i> 审批历史</a> ');
actions.push('<a href="javascript:void(0)" onclick="showHistoryDialog(\'' + row.instanceId + '\')"><i class="fa fa-list"></i> 审批历史</a> ');
// 进度查看
actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="showProcessImgDialog(\'' + row.instanceId + '\')"><i class="fa fa-image"></i> 进度查看</a> ');
}
else if(row.auditStatus === "2"){
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.requisiteId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a href="javascript:void(0)" onclick="showProcessImgDialog(\'' + row.instanceId + '\')"><i class="fa fa-image"></i> 进度查看</a> ');
}
actions.push('<a class="btn btn-primary btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.requisiteId + '\')"><i class="fa fa-search"></i>详情</a> ');
return actions.join('');
// else if(row.auditStatus === "2"){
// actions.push('<a class="' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.requisiteId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// }
actions.push('<a href="javascript:void(0)" onclick="$.operate.detail(\'' + row.requisiteId + '\')"><i class="fa fa-search"></i>详情</a> ');
var actionLinks = actions.join('');
return $.table.dropdownToggle(actionLinks);
}
}
],

1
ruoyi-admin/src/main/resources/templates/system/requisitioning/add.html

@ -68,6 +68,7 @@
pagination: false,
sidePagination: "client",
showColumns: false,
showSearch: false,
model: "请购物料信息",
columns: [
{checkbox: true},

72
ruoyi-admin/src/main/resources/templates/system/requisitioning/requisitioning.html

@ -67,7 +67,7 @@
<i class="fa fa-plus"></i> 添加
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<div class="col-sm-12 select-table table-striped ">
<table id="bootstrap-table"></table>
</div>
</div>
@ -77,8 +77,6 @@
<th:block th:include="include :: bootstrap-table-editable-js" />
<th:block th:include="include :: datetimepicker-js" />
<script th:src="@{/js/activiti.js}"></script>
<script th:src="@{/ajax/libs/vue/vue.js}"></script>
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:requisitioning:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:requisitioning:remove')}]];
@ -115,13 +113,10 @@
exportUrl: prefix + "/export",
detailUrl: prefix + "/detail/{id}",
modalName: "请购单",
// pageList: [5, 10, 25, 50],
// pageSize: 10,
sortable: true, // 是否启用排序
sortStable: true, // 设置为 true 将获得稳定的排序
detailView: false,
fixedColumns: true, // 启用冻结列
rightFixedColumns:1,
fixedRightNumber: 1, // 冻结右列个数
showFooter: true,
columns: [
@ -133,6 +128,15 @@
{title: '流程恢复实例ID',field: 'restoreInstanceId', visible: false},
{ title: '流程实例类型', field: 'instanceTypeName',visible: false},
{title: '申请人ID',field: 'applyUser', visible: false},
{title: '当前任务ID',field: 'taskId',visible: false},
{ title: '待办用户ID',field: 'todoUserId', visible: false},
{ title: '当前任务名称',field: 'taskName', visible: false},
{title: '请购人',field: 'createBy',visible: false},
{title: '审核状态',field: 'auditStatus',visible: false,
formatter: function(value, row, index) {
return $.table.selectDictLabel(auditStatusDatas, value);
}
},
{title: '请购单编号',field: 'requisitioningCode',align: 'center'},
{title: '关联单号',field: 'correlationCode',align: 'center'},
{
@ -141,9 +145,6 @@
align: 'center',
},
{title: '请购部门',field: 'deptName',align: 'center',},
{title: '当前任务ID',field: 'taskId',visible: false},
{ title: '待办用户ID',field: 'todoUserId', visible: false},
{ title: '当前任务名称',field: 'taskName', visible: false},
{ title: '当前状态',field: 'taskStatus',
align: 'center',
formatter: function(value, row, index) {
@ -156,8 +157,25 @@
return '<span class="badge badge-primary">' + value + '</span>';
}
},
{title: '物料合计',field: 'materialAmount',align: 'center',},
{title: '数量总计',field: 'materialSum',align: 'center',},
{title: '物料合计',field: 'materialAmount',align: 'center',
formatter: function(value) {
var sum = 0;
for (var i in value) {
sum += parseFloat(value[i].materialAmount) || 0;
}
return "总物料合计: " + sum.toFixed(2);
}
},
{title: '数量总计',field: 'materialSum',align: 'center',
formatter: function(value){
var sum = 0;
for (var i in value) {
sum += parseFloat(value[i].materialSum) || 0;
}
return "总数量合计: " + sum.toFixed(2);
}
},
// {title: '预估单价合计(RMB)',field: 'noRmbSum',},
{title: '预估单价合计(RMB)',field: 'estimatePrice',align: 'center',
footerFormatter: function (value) {
@ -178,37 +196,32 @@
}
},
{field: 'applyTime',title: '申请时间',align: 'center',},
{title: '审核状态',field: 'auditStatus',visible: false,
formatter: function(value, row, index) {
return $.table.selectDictLabel(auditStatusDatas, value);
}
},
{title: '请购状态',field: 'requisitioningStatus',align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(requisitioningStatusDatas, value);
}
},
{title: '请购人',field: 'createBy',visible: false},
{title: '备注',field: 'remark',align: 'center',},
{title: '上次更新时间',field: 'updateTime',align: 'center',},
{title: '操作',align: 'center',
formatter: function (value, row, index) {
var actions = [];
if(row.auditStatus=="1" && row.useStatus=="1" && !row.cancelInstanceId) {
// 作废
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.requisitioningId + '\')"><i class="fa fa-remove"></i> 作废</a>');
actions.push('<a href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.requisitioningId + '\')"><i class="fa fa-remove"></i> 作废</a>');
// 已作废
}
else{
actions.push('<a class="btn btn-default btn-xs" href="javascript:void(0)" disabled><i class="fa fa-edit"></i> 编辑</a> ');
}
if(row.auditStatus == "2" && row.useStatus == "1"){
// 编辑
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.requisitioningId + '\')"><i class="fa fa-edit"></i> 编辑</a> ');
actions.push('<a href="javascript:void(0)" disabled><i class="fa fa-edit"></i> 编辑</a> ');
}
// if(row.auditStatus == "2" && row.useStatus == "1"){
// // 编辑
// actions.push('<a href="javascript:void(0)" onclick="$.operate.edit(\'' + row.requisitioningId + '\')"><i class="fa fa-edit"></i> 编辑</a> ');
// }
// 有流程实例id
if(row.useStatus=="2" && !row.restoreInstanceId){
// 恢复
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.requisitioningId + '\')"><i class="fa fa-window-restore"></i> 恢复</a> ');
actions.push('<a href="javascript:void(0)" onclick="$.operate.restore(\'' + row.requisitioningId + '\')"><i class="fa fa-window-restore"></i> 恢复</a> ');
}
// 有流程实例id
if (row.instanceId) {
@ -217,17 +230,18 @@
var todoUserIdList = row.todoUserId.split(",");
if(todoUserIdList.includes(loginName)){
var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批';
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="showVerifyDialog(\'' + prefix + '\',\'' + row.taskId + '\', \'' + row.taskName+"-"+ row.instanceTypeName +"申请" + '\')"><i class="fa fa-edit"></i> '+nodeName+'</a> ');
actions.push('<a href="javascript:void(0)" onclick="showVerifyDialog(\'' + prefix + '\',\'' + row.taskId + '\', \'' + row.taskName+"-"+ row.instanceTypeName +"申请" + '\')"><i class="fa fa-edit"></i> '+nodeName+'</a> ');
}
}
// 审批历史
actions.push('<a class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="showHistoryDialog(\'' + row.instanceId + '\')"><i class="fa fa-list"></i> 审批历史</a> ');
actions.push('<a href="javascript:void(0)" onclick="showHistoryDialog(\'' + row.instanceId + '\')"><i class="fa fa-list"></i> 审批历史</a> ');
// 进度查看
actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="showProcessImgDialog(\'' + row.instanceId + '\')"><i class="fa fa-image"></i> 进度查看</a> ');
actions.push('<a href="javascript:void(0)" onclick="showProcessImgDialog(\'' + row.instanceId + '\')"><i class="fa fa-image"></i> 进度查看</a> ');
}
// 详情
actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.requisitioningId + '\')"><i class="fa fa-eye"></i> 详情</a> ');
return actions.join('');
actions.push('<a href="javascript:void(0)" onclick="$.operate.detail(\'' + row.requisitioningId + '\')"><i class="fa fa-eye"></i> 详情</a> ');
var actionLinks = actions.join('');
return $.table.dropdownToggle(actionLinks);
}
}
],

53
ruoyi-admin/src/main/resources/templates/unitConvert/unitConvert/add.html

@ -1,53 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增单位换算')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-unitConvert-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">换算起始值:</label>
<div class="col-sm-8">
<input name="convertStartValue" class="form-control" type="text" oninput="value=value.replace(/[^\d]/g,'')" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">换算起始单位:</label>
<div class="col-sm-8">
<select name="convertStartUnit" class="form-control m-b" th:with="type=${@dict.getType('unit_convert')}" required>
<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 is-required" >换算结尾值:</label>
<div class="col-sm-8">
<input name="convertEndValue" class="form-control" oninput="value=value.replace(/[^\d]/g,'')" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">换算结尾单位:</label>
<div class="col-sm-8">
<select name="convertEndUnit" class="form-control m-b" th:with="type=${@dict.getType('unit_convert')}" required>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "unitConvert/unitConvert"
$("#form-unitConvert-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-unitConvert-add').serialize());
}
}
</script>
</body>
</html>

54
ruoyi-admin/src/main/resources/templates/unitConvert/unitConvert/edit.html

@ -1,54 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改单位换算')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-unitConvert-edit" th:object="${sysUnitConvert}">
<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">
<input name="convertStartValue" th:field="*{convertStartValue}" class="form-control" oninput="value=value.replace(/[^\d]/g,'')" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">换算起始单位:</label>
<div class="col-sm-8">
<select name="convertStartUnit" class="form-control m-b" th:with="type=${@dict.getType('unit_convert')}" required>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{convertStartUnit}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">换算结尾值:</label>
<div class="col-sm-8">
<input name="convertEndValue" th:field="*{convertEndValue}" class="form-control" oninput="value=value.replace(/[^\d]/g,'')" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">换算结尾单位:</label>
<div class="col-sm-8">
<select name="convertEndUnit" class="form-control m-b" th:with="type=${@dict.getType('unit_convert')}" required>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{convertEndUnit}"></option>
</select>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "unitConvert/unitConvert";
$("#form-unitConvert-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-unitConvert-edit').serialize());
}
}
</script>
</body>
</html>

130
ruoyi-admin/src/main/resources/templates/unitConvert/unitConvert/unitConvert.html

@ -1,130 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('单位换算列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>换算起始值:</label>
<input type="text" name="convertStartValue"/>
</li>
<li>
<label>换算起始单位:</label>
<select name="convertStartUnit" th:with="type=${@dict.getType('unit_convert')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>换算结尾值:</label>
<input type="text" name="convertEndValue"/>
</li>
<li>
<label>换算结尾单位:</label>
<select name="convertEndUnit" th:with="type=${@dict.getType('unit_convert')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</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="unitConvert:unitConvert:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="unitConvert:unitConvert:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="unitConvert:unitConvert:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="unitConvert:unitConvert: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('unitConvert:unitConvert:edit')}]];
var removeFlag = [[${@permission.hasPermi('unitConvert:unitConvert:remove')}]];
var convertStartUnitDatas = [[${@dict.getType('unit_convert')}]];
var convertEndUnitDatas = [[${@dict.getType('unit_convert')}]];
var prefix = ctx + "unitConvert/unitConvert";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "单位换算",
columns: [{
checkbox: true
},
{
field: 'id',
title: '',
visible: false
},
{
field: 'convertStartValue',
title: '换算起始值'
},
{
field: 'convertStartUnit',
title: '换算起始单位',
formatter: function(value, row, index) {
return $.table.selectDictLabel(convertStartUnitDatas, value);
}
},
{
title: '',
formatter: function(value, row, index) {
return "=";
}
},
{
field: 'convertEndValue',
title: '换算结尾值'
},
{
field: 'convertEndUnit',
title: '换算结尾单位',
formatter: function(value, row, index) {
return $.table.selectDictLabel(convertEndUnitDatas, value);
}
},
{
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('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

3
ruoyi-common/src/main/java/com/ruoyi/common/constant/BusinessKeysConstants.java

@ -13,4 +13,7 @@ public class BusinessKeysConstants {
/** 测试产品型号管理 */
public static final String PRODUCT_MODEL = "1";
/** 仓库信息 */
public static final String STOCK_INFO = "2";
}

24
ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java

@ -17,6 +17,8 @@ import com.ruoyi.common.exception.DemoModeException;
import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.common.utils.security.PermissionUtils;
import java.sql.SQLException;
/**
* 全局异常处理器
*
@ -127,4 +129,26 @@ public class GlobalExceptionHandler
log.error(e.getMessage(), e);
return AjaxResult.error("请正确使用审批流程上的角色进行操作");
}
/**
* SQL不能为空异常
* */
@ExceptionHandler(SQLException.class)
public AjaxResult sqlException(SQLException e)
{
//记录异常信息
log.error("SQL 发生异常:",e);
//提取错误信息
String errorMessage = e.getMessage();
int startIndex = errorMessage.indexOf("doesn't have a default value");
if (startIndex != -1){
String fieldName = errorMessage.substring(0,startIndex).trim();
return AjaxResult.error("字段:"+fieldName+"不能为空,请确保提供了改字段的值。");
}else {
return AjaxResult.error("数据库操作失败:"+errorMessage);
}
}
}

Loading…
Cancel
Save