Browse Source

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

dev
王晓迪 4 days ago
parent
commit
8df6ee6da4
  1. 12
      ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseOrderController.java
  2. 47
      ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseStorageController.java
  3. 18
      ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseOrder.java
  4. 10
      ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseStorageChildMapper.java
  5. 5
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseOrderService.java
  6. 2
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteService.java
  7. 5
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseStorageChildService.java
  8. 6
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseStorageService.java
  9. 255
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseOrderServiceImpl.java
  10. 11
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java
  11. 11
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseStorageChildServiceImpl.java
  12. 12
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseStorageServiceImpl.java
  13. 84
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSupplierController.java
  14. 21
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSupplier.java
  15. 14
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/Vo/SysSupplierVo.java
  16. 7
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSupplierMapper.java
  17. 5
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSupplierService.java
  18. 29
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSupplierServiceImpl.java
  19. 23
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseStorageOrder.java
  20. 14
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseStorageOrderDetail.java
  21. 5
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseStorageOrderDetailMapper.java
  22. 7
      ruoyi-admin/src/main/resources/mapper/purchase/PurchaseOrderMapper.xml
  23. 91
      ruoyi-admin/src/main/resources/mapper/purchase/PurchaseStorageChildMapper.xml
  24. 25
      ruoyi-admin/src/main/resources/mapper/system/SysSupplierMapper.xml
  25. 133
      ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseStorageOrderDetailMapper.xml
  26. 134
      ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/addPurchaseStorage.html
  27. 13
      ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/purchaseOrder.html
  28. 25
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/purchaseQuote.html
  29. 12
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/taskFzjlVerify.html
  30. 302
      ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/detail.html
  31. 450
      ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/purchaseStorage.html
  32. 78
      ruoyi-admin/src/main/resources/templates/system/supplier/supplier.html
  33. 10
      ruoyi-admin/src/main/resources/templates/system/supplier/taskFzjlVerify.html

12
ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseOrderController.java

@ -214,15 +214,13 @@ public class PurchaseOrderController extends BaseController
/** /**
* 新增采购入库通知单 * 新增采购入库通知单
*/ */
@RequiresPermissions("purchase:purchaseOrder:addPurchaseOrderStorage") @RequiresPermissions("purchase:purchaseOrder:addPurchaseStorage")
@Log(title = "采购订单", businessType = BusinessType.INSERT) @Log(title = "采购订单", businessType = BusinessType.INSERT)
@PostMapping("/addPurchaseOrderStorageSave") @PostMapping("/addPurchaseStorage")
@ResponseBody @ResponseBody
public AjaxResult addPurchaseOrderStorageSave(@RequestBody WarehouseStorageOrder warehouseStorageOrder) { public AjaxResult addPurchaseStorageSave(@RequestBody PurchaseOrder purchaseOrder) {
// 数据校验,确保前端传入数据格式正确
// 生成采购订单编号 return toAjax(purchaseOrderService.addPurchaseStorageSave(purchaseOrder));
// 执行主表插入操作
return toAjax(purchaseOrderService.addPurchaseOrderStorage(warehouseStorageOrder)); // 假设toAjax方法处理成功逻辑
} }

47
ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseStorageController.java

@ -1,6 +1,9 @@
package com.ruoyi.purchase.controller; package com.ruoyi.purchase.controller;
import java.util.List; import java.util.List;
import com.ruoyi.purchase.domain.PurchaseStorageChild;
import com.ruoyi.purchase.service.IPurchaseStorageChildService;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -34,6 +37,10 @@ public class PurchaseStorageController extends BaseController
@Autowired @Autowired
private IPurchaseStorageService purchaseStorageService; private IPurchaseStorageService purchaseStorageService;
@Autowired
private IPurchaseStorageChildService purchaseStorageChildService;
@RequiresPermissions("purchase:purchaseStorage:view") @RequiresPermissions("purchase:purchaseStorage:view")
@GetMapping() @GetMapping()
public String purchaseStorage() public String purchaseStorage()
@ -112,6 +119,46 @@ public class PurchaseStorageController extends BaseController
return toAjax(purchaseStorageService.updatePurchaseStorage(purchaseStorage)); return toAjax(purchaseStorageService.updatePurchaseStorage(purchaseStorage));
} }
/**
* 采购入库单详情
*
* */
@GetMapping("/detail/{purchaseStorageId}")
public String detail(@PathVariable("purchaseStorageId") Long purchaseStorageId, ModelMap mmap)
{
PurchaseStorage purchaseStorage = purchaseStorageService.selectPurchaseStorageById(purchaseStorageId);
mmap.put("purchaseStorage", purchaseStorage);
return prefix + "/detail";
}
/**
* 修改保存采购入库单详情
*/
@Log(title = "采购入库单", businessType = BusinessType.UPDATE)
@PostMapping("/detail")
@ResponseBody
public AjaxResult detailSave(PurchaseStorage purchaseStorage)
{
return toAjax(purchaseStorageService.detailPurchaseStorage(purchaseStorage));
}
/**
* 查询采购入库单详情物料信息
*/
@PostMapping("/selectStorageChildMaterialList")
@ResponseBody
public TableDataInfo selectStorageChildMaterialList(PurchaseStorage purchaseStorage)
{
startPage();
String warehouseStorageCode = purchaseStorage.getWarehouseStorageCode();
List<PurchaseStorageChild> list = purchaseStorageChildService.selectPurchaseStorageChildListByCode(warehouseStorageCode);
return getDataTable(list);
}
/** /**
* 删除采购入库单 * 删除采购入库单
*/ */

18
ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseOrder.java

@ -31,8 +31,8 @@ public class PurchaseOrder extends BaseEntity
@Excel(name = "采购计划单号") @Excel(name = "采购计划单号")
private String purchasePlanCode; private String purchasePlanCode;
/** 采购入库状态(0待采购、1采购中、2待暂收、3部分暂收、4全部暂收、5已暂收、6待入库、7部分入库、8全部入库、9已入库) */ /** 入库状态(0待暂收、1已暂收、2待入库、3部分入库、4全部入库) */
@Excel(name = "采购入库状态",dictType = "eceiptStatus") @Excel(name = "采购入库状态",dictType = "warehouse_storage_status")
private String warehouseStorageStatus; private String warehouseStorageStatus;
/** 打款结案状态(0待打款、1部分打款、2全部打款、3部分结案、4已结案) */ /** 打款结案状态(0待打款、1部分打款、2全部打款、3部分结案、4已结案) */
@ -67,6 +67,11 @@ public class PurchaseOrder extends BaseEntity
@Excel(name = "入库数") @Excel(name = "入库数")
private Integer storageSum; private Integer storageSum;
/** 通知已到货总数 */
@Excel(name = "通知已到货总数")
private Integer notifyHasArrivedSum;
/** 不含税总价(RMB) */ /** 不含税总价(RMB) */
@Excel(name = "不含税总价(RMB)") @Excel(name = "不含税总价(RMB)")
private BigDecimal noRmbSum; private BigDecimal noRmbSum;
@ -249,6 +254,14 @@ public class PurchaseOrder extends BaseEntity
return noRmbSum; return noRmbSum;
} }
public Integer getNotifyHasArrivedSum() {
return notifyHasArrivedSum;
}
public void setNotifyHasArrivedSum(Integer notifyHasArrivedSum) {
this.notifyHasArrivedSum = notifyHasArrivedSum;
}
public void setNoRmbSum(BigDecimal noRmbSum) { public void setNoRmbSum(BigDecimal noRmbSum) {
this.noRmbSum = noRmbSum; this.noRmbSum = noRmbSum;
} }
@ -457,6 +470,7 @@ public class PurchaseOrder extends BaseEntity
.append("sharedInventoryOccupancySum", getSharedInventoryOccupancySum()) .append("sharedInventoryOccupancySum", getSharedInventoryOccupancySum())
.append("refundsExchangesSum", getRefundsExchangesSum()) .append("refundsExchangesSum", getRefundsExchangesSum())
.append("storageSum", getStorageSum()) .append("storageSum", getStorageSum())
.append("notifyHasArrivedSum", getNotifyHasArrivedSum())
.append("noRmbSum", getNoRmbSum()) .append("noRmbSum", getNoRmbSum())
.append("rmbSum", getRmbSum()) .append("rmbSum", getRmbSum())
.append("eceiptType", getEceiptType()) .append("eceiptType", getEceiptType())

10
ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseStorageChildMapper.java

@ -74,4 +74,14 @@ public interface PurchaseStorageChildMapper
* @return 结果 * @return 结果
*/ */
public int restorePurchaseStorageChildById(Long purchaseStorageChildId); public int restorePurchaseStorageChildById(Long purchaseStorageChildId);
/**
* 批量新增采购入库单子表
* */
int insertBatchPurchaseStorageChild(List<PurchaseStorageChild> purchaseStorageChildren);
/**
* 根据采购入库单号查询采购入库单子表
* */
List<PurchaseStorageChild> selectPurchaseStorageChildListByCode(String warehouseStorageCode);
} }

5
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseOrderService.java

@ -122,4 +122,9 @@ public interface IPurchaseOrderService
AjaxResult uploadSingleFile(MultipartFile file,String purchaseOrderCode); AjaxResult uploadSingleFile(MultipartFile file,String purchaseOrderCode);
/**
* 创建采购入库单
* */
int addPurchaseStorageSave(PurchaseOrder purchaseOrder);
} }

2
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteService.java

@ -76,7 +76,7 @@ public interface IPurchaseQuoteService
*/ */
ProcessInstance cancelPurchaseQuoteById(Long purchaseQuoteId); ProcessInstance cancelPurchaseQuoteById(Long purchaseQuoteId);
@Transactional(rollbackFor = Exception.class)
ProcessInstance submitApply(PurchaseQuote purchaseQuote); ProcessInstance submitApply(PurchaseQuote purchaseQuote);
/** /**

5
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseStorageChildService.java

@ -72,4 +72,9 @@ public interface IPurchaseStorageChildService
* @return * @return
*/ */
int restorePurchaseStorageChildById(Long purchaseStorageChildId); int restorePurchaseStorageChildById(Long purchaseStorageChildId);
/**
* 通过采购入库单号查询采购入库单子表
* */
List<PurchaseStorageChild> selectPurchaseStorageChildListByCode(String warehouseStorageCode);
} }

6
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseStorageService.java

@ -72,4 +72,10 @@ public interface IPurchaseStorageService
* @return * @return
*/ */
int restorePurchaseStorageById(Long purchaseStorageId); int restorePurchaseStorageById(Long purchaseStorageId);
/**
* 保存采购入库单详情
*
* */
int detailPurchaseStorage(PurchaseStorage purchaseStorage);
} }

255
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseOrderServiceImpl.java

@ -31,10 +31,7 @@ import com.ruoyi.process.general.service.IProcessService;
import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper; import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper;
import com.ruoyi.purchase.domain.*; import com.ruoyi.purchase.domain.*;
import com.ruoyi.purchase.domain.Vo.*; import com.ruoyi.purchase.domain.Vo.*;
import com.ruoyi.purchase.mapper.PurchaseOrderChildMapper; import com.ruoyi.purchase.mapper.*;
import com.ruoyi.purchase.mapper.PurchaseOrderMapper;
import com.ruoyi.purchase.mapper.PurchasePlanChildMapper;
import com.ruoyi.purchase.mapper.PurchasePlanMapper;
import com.ruoyi.purchase.service.IPurchaseOrderService; import com.ruoyi.purchase.service.IPurchaseOrderService;
import com.ruoyi.system.domain.SysAttachFile; import com.ruoyi.system.domain.SysAttachFile;
import com.ruoyi.system.domain.SysCompanyInformation; import com.ruoyi.system.domain.SysCompanyInformation;
@ -97,12 +94,23 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService
@Autowired @Autowired
private PurchasePlanMapper purchasePlanMapper; private PurchasePlanMapper purchasePlanMapper;
@Autowired
private PurchaseStorageMapper purchaseStorageMapper;
@Autowired
private PurchaseStorageChildMapper purchaseStorageChildMapper;
@Autowired @Autowired
private RedisCache redisCache; private RedisCache redisCache;
@Autowired @Autowired
private WarehouseStorageOrderMapper warehouseStorageOrderMapper; private WarehouseStorageOrderMapper warehouseStorageOrderMapper;
@Autowired
private WarehouseStorageOrderDetailMapper warehouseStorageOrderDetailMapper;
@Autowired @Autowired
private WarehouseStorageOrderDetailMapper storageOrderDetailMapper; private WarehouseStorageOrderDetailMapper storageOrderDetailMapper;
@ -1156,6 +1164,245 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService
} }
/**
* 创建采购入库单
* */
@Transactional(rollbackFor = Exception.class)
@Override
public int addPurchaseStorageSave(PurchaseOrder purchaseOrder) {
Long purchaseOrderId = purchaseOrder.getPurchaseOrderId();
List<PurchaseOrderChild> purchaseOrderChildList = purchaseOrder.getPurchaseOrderChildList();
//过滤掉通知已到货数为空的数据
purchaseOrderChildList = purchaseOrderChildList.stream().filter(item -> item.getNotifyArriveNum() != null).collect(Collectors.toList());
boolean allNotifyArriveNum = purchaseOrderChildList.stream().allMatch(item -> item.getNotifyArriveNum() == 0);
if (allNotifyArriveNum){
throw new BusinessException("通知到货数不能都为0");
}
//过滤掉通知到货数为0的数据
List<PurchaseOrderChild> filterPurchaseOrderChildList = purchaseOrderChildList.stream().filter(item -> item.getNotifyArriveNum() != 0).collect(Collectors.toList());
purchaseOrder = purchaseOrderMapper.selectPurchaseOrderById(purchaseOrderId);
String warehouseStorageCode = redisCache.generateBillNo("RK");
//生成采购入库单子表
buildPurchaseStorageChild(purchaseOrder, warehouseStorageCode,filterPurchaseOrderChildList);
//生成采购入库单主表
buildPurchaseStorage(purchaseOrder, filterPurchaseOrderChildList, warehouseStorageCode);
//生成仓库入库单
buildWarehouseStorage(purchaseOrder, warehouseStorageCode,filterPurchaseOrderChildList);
//生成仓库入库单子表
buildWarehouseChild(purchaseOrder, warehouseStorageCode,filterPurchaseOrderChildList);
int allNotifyArrivedNum = filterPurchaseOrderChildList.stream().mapToInt(PurchaseOrderChild::getNotifyArriveNum).sum();
int allNotifyHasArrivedNum = filterPurchaseOrderChildList.stream().mapToInt(PurchaseOrderChild::getNotifyHasArrivedNum).sum();
if (purchaseOrder.getNotifyHasArrivedSum() == null || purchaseOrder.getNotifyHasArrivedSum() == 0 ){
purchaseOrder.setNotifyHasArrivedSum(allNotifyArrivedNum);
}else {
purchaseOrder.setNotifyHasArrivedSum(allNotifyArrivedNum + purchaseOrder.getNotifyHasArrivedSum());
}
//更新采购订单子表
updatePurchaseOrderChildData(purchaseOrder, filterPurchaseOrderChildList);
if (purchaseOrder.getNotifyHasArrivedSum().equals(purchaseOrder.getActualPurchaseSum())){
purchaseOrder.setWarehouseStorageStatus("4");
}if (purchaseOrder.getNotifyHasArrivedSum() < purchaseOrder.getActualPurchaseSum()){
purchaseOrder.setWarehouseStorageStatus("3");
}
return purchaseOrderMapper.updatePurchaseOrder(purchaseOrder);
}
//采购入库更新采购订单子表的数据
private void updatePurchaseOrderChildData(PurchaseOrder purchaseOrder, List<PurchaseOrderChild> filterPurchaseOrderChildList) {
for (PurchaseOrderChild purchaseOrderChild : filterPurchaseOrderChildList) {
if (purchaseOrderChild.getNotifyHasArrivedNum() == null || purchaseOrderChild.getNotifyHasArrivedNum() == 0){
purchaseOrderChild.setNotifyHasArrivedNum(purchaseOrderChild.getNotifyArriveNum());
}else {
purchaseOrderChild.setNotifyHasArrivedNum(purchaseOrderChild.getNotifyHasArrivedNum() + purchaseOrderChild.getNotifyArriveNum());
}
int updatePurchaseOrderChild = purchaseOrderChildMapper.updatePurchaseOrderChild(purchaseOrderChild);
if (updatePurchaseOrderChild <= 0){
throw new BusinessException("更新采购订单子表数据失败");
}
}
}
//采购入库生成采购入库单主表
private void buildPurchaseStorage(PurchaseOrder purchaseOrder, List<PurchaseOrderChild> filterPurchaseOrderChildList, String warehouseStorageCode) {
PurchaseStorage purchaseStorage = new PurchaseStorage();
PurchaseOrderChild purchaseOrderChild = filterPurchaseOrderChildList.get(0);
purchaseStorage.setWarehouseStorageStatus("0");
purchaseStorage.setWarehouseStorageType("5");
purchaseStorage.setWarehouseDeptType(purchaseOrderChild.getWarehouseDept());
purchaseStorage.setWarehouseQualityStatus("0");
purchaseStorage.setWarehouseOrderType("0");
purchaseStorage.setArrivedTime(purchaseOrder.getArrivedTime());
purchaseStorage.setRelatedOrderCode(purchaseOrder.getPurchaseOrderCode());
purchaseStorage.setSupplierCode(purchaseOrder.getSupplierCode());
purchaseStorage.setSupplierName(purchaseOrder.getSupplierName());
purchaseStorage.setWarehouseStorageCode(warehouseStorageCode);
int allNotifyArrivedNum = filterPurchaseOrderChildList.stream().mapToInt(PurchaseOrderChild::getNotifyArriveNum).sum();
int allNotifyHasArrivedNum = filterPurchaseOrderChildList.stream().mapToInt(PurchaseOrderChild::getNotifyHasArrivedNum).sum();
if (allNotifyHasArrivedNum == 0){
purchaseStorage.setNotifyArrivedSum(allNotifyArrivedNum);
}else {
purchaseStorage.setNotifyArrivedSum(allNotifyHasArrivedNum + allNotifyArrivedNum);
}
int insertResult = purchaseStorageMapper.insertPurchaseStorage(purchaseStorage);
if (insertResult <= 0){
throw new BusinessException("生成采购入库单数据失败");
}
}
//采购入库生成仓库入库主表数据
private void buildWarehouseStorage(PurchaseOrder purchaseOrder, String warehouseStorageCode, List<PurchaseOrderChild> filterPurchaseOrderChildList) {
PurchaseOrderChild purchaseOrderChild = filterPurchaseOrderChildList.get(0);
WarehouseStorageOrder warehouseStorageOrder = new WarehouseStorageOrder();
warehouseStorageOrder.setWarehouseStorageCode(warehouseStorageCode);
warehouseStorageOrder.setWarehouseStorageStatus("0");
warehouseStorageOrder.setWarehouseStorageType("5");
warehouseStorageOrder.setWarehouseDeptType(purchaseOrderChild.getWarehouseDept());
warehouseStorageOrder.setWarehouseQualityStatus("0");
warehouseStorageOrder.setWarehouseOrderType("0");
warehouseStorageOrder.setArrivedTime(purchaseOrder.getArrivedTime());
int allNotifyArrivedNum = filterPurchaseOrderChildList.stream().mapToInt(PurchaseOrderChild::getNotifyArriveNum).sum();
int allNotifyHasArrivedNum = filterPurchaseOrderChildList.stream().mapToInt(PurchaseOrderChild::getNotifyHasArrivedNum).sum();
if (allNotifyHasArrivedNum == 0){
warehouseStorageOrder.setNotifyArrivedNum(allNotifyArrivedNum);
}else {
warehouseStorageOrder.setNotifyArrivedNum(allNotifyHasArrivedNum + allNotifyArrivedNum);
}
warehouseStorageOrder.setArrivedTime(purchaseOrder.getArrivedTime());
warehouseStorageOrder.setRelatedOrderCode(purchaseOrder.getPurchaseOrderCode());
warehouseStorageOrder.setCreateTime(new Date());
warehouseStorageOrder.setCreateBy(ShiroUtils.getLoginName());
int insertResult = warehouseStorageOrderMapper.insertWarehouseStorageOrder(warehouseStorageOrder);
if (insertResult <= 0){
throw new BusinessException("生成仓库入库单数据失败");
}
}
//采购入库生成仓库入库子表数据
private void buildWarehouseChild(PurchaseOrder purchaseOrder, String warehouseStorageCode, List<PurchaseOrderChild> filterPurchaseOrderChildList) {
String purchaseOrderCode = purchaseOrder.getPurchaseOrderCode();
List<WarehouseStorageOrderDetail> warehouseStorageOrderDetailChildren = new ArrayList<>();
for (PurchaseOrderChild purchaseOrderChild : filterPurchaseOrderChildList) {
WarehouseStorageOrderDetail warehouseStorageOrderDetail = new WarehouseStorageOrderDetail();
warehouseStorageOrderDetail.setWarehouseStorageCode(warehouseStorageCode);
warehouseStorageOrderDetail.setRelatedOrderCode(purchaseOrderCode);
warehouseStorageOrderDetail.setMaterialNo(purchaseOrderChild.getMaterialNo());
warehouseStorageOrderDetail.setMaterialName(purchaseOrderChild.getMaterialName());
warehouseStorageOrderDetail.setMaterialPhotourl(purchaseOrderChild.getMaterialPhotourl());
warehouseStorageOrderDetail.setMaterialBrand(purchaseOrderChild.getMaterialBrand());
warehouseStorageOrderDetail.setMaterialDescribe(purchaseOrderChild.getMaterialDescribe());
warehouseStorageOrderDetail.setMaterialModel(purchaseOrderChild.getMaterialModel());
warehouseStorageOrderDetail.setMaterialProcessMethod(purchaseOrderChild.getMaterialProcessMethod());
warehouseStorageOrderDetail.setMaterialUnit(purchaseOrderChild.getMaterialUnit());
warehouseStorageOrderDetail.setMaterialPhotourl(purchaseOrderChild.getMaterialPhotourl());
warehouseStorageOrderDetail.setMaterialType(purchaseOrderChild.getMaterialType());
warehouseStorageOrderDetail.setMaterialDeptType(purchaseOrderChild.getWarehouseDept());
warehouseStorageOrderDetail.setArrivedTime(purchaseOrderChild.getPlanDeliveryTime());
warehouseStorageOrderDetail.setSupplierCode(purchaseOrder.getSupplierCode());
warehouseStorageOrderDetail.setSupplierName(purchaseOrder.getSupplierName());
warehouseStorageOrderDetail.setCreateTime(new Date());
warehouseStorageOrderDetail.setCreateBy(ShiroUtils.getLoginName());
Integer notifyArriveNum = purchaseOrderChild.getNotifyArriveNum();
Integer notifyHasArrivedNum = purchaseOrderChild.getNotifyHasArrivedNum();
//通知到货数<= 实际采购数
if (notifyArriveNum > purchaseOrderChild.getActualPurchaseNum()){
throw new BusinessException("通知到货数不能大于实际采购数");
}
if (notifyHasArrivedNum == null){
warehouseStorageOrderDetail.setNotifyHasArrivedNum(notifyArriveNum);
}else {
warehouseStorageOrderDetail.setNotifyHasArrivedNum(notifyHasArrivedNum + notifyArriveNum);
}
warehouseStorageOrderDetailChildren.add(warehouseStorageOrderDetail);
}
int result = warehouseStorageOrderDetailMapper.insertBatchWarehouseStorageOrderDetail(warehouseStorageOrderDetailChildren);
if (result <= 0){
throw new RuntimeException("生成仓库入库子表数据失败");
}
}
//采购入库生成采购入库子表数据
private void buildPurchaseStorageChild(PurchaseOrder purchaseOrder, String warehouseStorageCode, List<PurchaseOrderChild> purchaseOrderChildList) {
String purchaseOrderCode = purchaseOrder.getPurchaseOrderCode();
List<PurchaseStorageChild> purchaseStorageChildren = new ArrayList<>();
for (PurchaseOrderChild purchaseOrderChild : purchaseOrderChildList) {
PurchaseStorageChild purchaseStorageChild = new PurchaseStorageChild();
purchaseStorageChild.setWarehouseStorageCode(warehouseStorageCode);
purchaseStorageChild.setRelatedOrderCode(purchaseOrderCode);
purchaseStorageChild.setMaterialNo(purchaseOrderChild.getMaterialNo());
purchaseStorageChild.setMaterialName(purchaseOrderChild.getMaterialName());
purchaseStorageChild.setMaterialBrand(purchaseOrderChild.getMaterialBrand());
purchaseStorageChild.setMaterialDescribe(purchaseOrderChild.getMaterialDescribe());
purchaseStorageChild.setMaterialPhotourl(purchaseOrderChild.getMaterialPhotourl());
purchaseStorageChild.setMaterialModel(purchaseOrderChild.getMaterialModel());
purchaseStorageChild.setMaterialProcessMethod(purchaseOrderChild.getMaterialProcessMethod());
purchaseStorageChild.setMaterialUnit(purchaseOrderChild.getMaterialUnit());
purchaseStorageChild.setMaterialPhotourl(purchaseOrderChild.getMaterialPhotourl());
purchaseStorageChild.setMaterialType(purchaseOrderChild.getMaterialType());
purchaseStorageChild.setMaterialDeptType(purchaseOrderChild.getWarehouseDept());
purchaseStorageChild.setArrivedTime(purchaseOrderChild.getPlanDeliveryTime());
purchaseStorageChild.setSupplierCode(purchaseOrder.getSupplierCode());
purchaseStorageChild.setSupplierName(purchaseOrder.getSupplierName());
purchaseStorageChild.setCreateTime(new Date());
purchaseStorageChild.setCreateBy(ShiroUtils.getLoginName());
Integer notifyArriveNum = purchaseOrderChild.getNotifyArriveNum();
Integer notifyHasArrivedNum = purchaseOrderChild.getNotifyHasArrivedNum();
//通知到货数<= 实际采购数
if (notifyArriveNum > purchaseOrderChild.getActualPurchaseNum()){
throw new BusinessException("通知到货数不能大于实际采购数");
}
if (notifyHasArrivedNum == null){
purchaseStorageChild.setNotifyHasArrivedNum(notifyArriveNum);
}else {
purchaseStorageChild.setNotifyHasArrivedNum(notifyHasArrivedNum + notifyArriveNum);
}
purchaseStorageChildren.add(purchaseStorageChild);
}
int result = purchaseStorageChildMapper.insertBatchPurchaseStorageChild(purchaseStorageChildren);
if (result <= 0){
throw new RuntimeException("生成采购入库子表数据失败");
}
}
/** /**
* 启动流程实例 * 启动流程实例
* */ * */

11
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java

@ -420,15 +420,16 @@ public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService
private void buildAuthority(SysUser user, Map<String, Object> variables) { private void buildAuthority(SysUser user, Map<String, Object> variables) {
Set<String> roleKeys = roleService.selectRoleKeys(user.getUserId()); Set<String> roleKeys = roleService.selectRoleKeys(user.getUserId());
variables.put("cgjlExist",false);
// 角色不同审核人不同
if(roleKeys.contains("cgyRole")){ if(roleKeys.contains("cgyRole")){
variables.put("authority",1); variables.put("authority",1);
}else if(roleKeys.contains("cgjlRole")){ }else if(roleKeys.contains("cgjlRole")){
variables.put("authority",2); variables.put("cgjlExist",true);
}else if(roleKeys.contains("cgzgRole")){ }else if(roleKeys.contains("admin")){
variables.put("authority",3); variables.put("authority",3);
} }else if(roleKeys.contains("fzjlRole")){
// 角色不同审核人不同
if(roleKeys.contains("admin")){
variables.put("authority",4); variables.put("authority",4);
} }
} }

11
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseStorageChildServiceImpl.java

@ -46,6 +46,17 @@ public class PurchaseStorageChildServiceImpl implements IPurchaseStorageChildSer
return purchaseStorageChildMapper.selectPurchaseStorageChildList(purchaseStorageChild); return purchaseStorageChildMapper.selectPurchaseStorageChildList(purchaseStorageChild);
} }
/**
* 根据采购入库单号查询采购入库单子表列表
*
* @param warehouseStorageCode 采购入库单号
* @return 采购入库单子表
*/
@Override
public List<PurchaseStorageChild> selectPurchaseStorageChildListByCode(String warehouseStorageCode) {
return purchaseStorageChildMapper.selectPurchaseStorageChildListByCode(warehouseStorageCode);
}
/** /**
* 新增采购入库单子表 * 新增采购入库单子表
* *

12
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseStorageServiceImpl.java

@ -76,6 +76,18 @@ public class PurchaseStorageServiceImpl implements IPurchaseStorageService
return purchaseStorageMapper.updatePurchaseStorage(purchaseStorage); return purchaseStorageMapper.updatePurchaseStorage(purchaseStorage);
} }
/**
* 详情采购入库单
*
* @param purchaseStorage 采购入库单
* @return 结果
*/
@Override
public int detailPurchaseStorage(PurchaseStorage purchaseStorage) {
return 1;
}
/** /**
* 删除采购入库单对象 * 删除采购入库单对象
* *

84
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSupplierController.java

@ -16,6 +16,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.process.general.service.IProcessService; import com.ruoyi.process.general.service.IProcessService;
import com.ruoyi.system.domain.*; import com.ruoyi.system.domain.*;
import com.ruoyi.system.domain.Vo.SysSupplierVo; import com.ruoyi.system.domain.Vo.SysSupplierVo;
@ -95,35 +96,10 @@ public class SysSupplierController extends BaseController
@ResponseBody @ResponseBody
public TableDataInfo list(SysSupplier sysSupplier) public TableDataInfo list(SysSupplier sysSupplier)
{ {
try {
startPage(); startPage();
List<SysSupplierVo> list = sysSupplierService.selectSysSupplierList(sysSupplier); List<SysSupplierVo> list = sysSupplierService.selectSysSupplierList(sysSupplier);
SysUser curUser = ShiroUtils.getSysUser();
String loginName = ShiroUtils.getLoginName();
Long userId = curUser.getUserId();
Set<String> roleKeys = roleService.selectRoleKeys(userId);
// List<SysUser> sysUserlist = sysUserService.selectRoleToUserList("cgyRole");
// sysUserlist.add(curUser);
//如果主管审批,查看当前自己部门的审核
//如果经理审计需要查询自己部门下所有业务员的提交的订单,以及自身的提交的订单
// if (roleKeys.contains("cgjlRole")) {
// List<SysUser> findUser = sysUserlist.stream().filter(item -> (item.getDeptId().equals(curUser.getDeptId()))).collect(Collectors.toList());
// Set<String> user = findUser.stream().map(SysUser::getLoginName).collect(Collectors.toSet());
// startPage();
// List<SysSupplier> list2 = list.stream().filter(item -> user.contains(item.getCreateBy())).collect(Collectors.toList());
// return getDataTable(list2);
// }
// 业务员角色只能看到自己创建的数据
if (roleKeys.contains("cgyRole")) {
sysSupplier.setCreateBy(curUser.getLoginName());
startPage();
List<SysSupplierVo> list2 = sysSupplierService.selectSysSupplierList(sysSupplier);
return getDataTable(list2);
}
return getDataTable(list); return getDataTable(list);
}catch(NullPointerException e){
throw new NullPointerException("当前用户没有申请客户资料");
}
} }
/** /**
@ -220,53 +196,25 @@ public class SysSupplierController extends BaseController
} }
//导出 /**
* 导出供应商资料列表
*/
@RequiresPermissions("system:supplier:export") @RequiresPermissions("system:supplier:export")
@Log(title = "供应商资料", businessType = BusinessType.EXPORT) @Log(title = "供应商资料", businessType = BusinessType.EXPORT)
@RequestMapping("/exportSupplierInfo") @PostMapping("/export")
@ResponseBody @ResponseBody
public void exportSupplierInfo(@RequestBody String selectData, HttpServletResponse response) throws IOException { public AjaxResult export(SysSupplier sysSupplier)
{
//数据处理 List<SysSupplier> list = sysSupplierService.exportSelectSupplierList(sysSupplier);
JSONObject jsonObject = (JSONObject) JSONObject.parse(selectData); ExcelUtil<SysSupplier> util = new ExcelUtil<SysSupplier>(SysSupplier.class);
JSONArray jsonArray = jsonObject.getJSONArray("selectData");
List<SysSupplierDto> selectDataList = JSONObject.parseArray(String.valueOf(jsonArray), SysSupplierDto.class);
//获取发票基础信息
SysSupplier sysSupplier = sysSupplierService.selectSysSupplierById(selectDataList.get(0).getSupplierId());
SysSupplierDto sysSupplierDto = new SysSupplierDto();
BeanUtils.copyProperties(sysSupplier,sysSupplierDto);
//填充表格
response.setCharacterEncoding("utf-8");
String fileName = URLEncoder.encode("国税发票", "UTF-8").replaceAll("\\+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
String templateFileName = "C:\\exportTemplates\\exportSupplierInfo.xlsx";
try (ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).withTemplate(templateFileName).build()) {
WriteSheet writeSheet = EasyExcel.writerSheet().build();
Map<String, Object> map = MapUtils.newHashMap();
// map.put("date", DateTimeFormatter.ofPattern("yyyy/MM/dd").format(LocalDateTime.now()));
map.put("enterpriseName", sysSupplierDto.getEnterpriseName());
map.put("customerAddress", sysSupplierDto.getCustomerAddress());
map.put("postalCode", sysSupplierDto.getPostalCode());
map.put("contactNumber", sysSupplierDto.getContactNumber());
map.put("customerFax", sysSupplierDto.getCustomerFax());
map.put("customerContact", sysSupplierDto.getCustomerContact());
map.put("paymentTerms", sysSupplierDto.getPaymentTerms());
map.put("taxRate", sysSupplierDto.getTaxRate());
List<SysDictData> exportSalesData = sysDictTypeService.selectDictDataByType("sys_export_sales");
for (int i = 0;i<exportSalesData.size();i++) {
if (sysSupplierDto.getExportSales().equals(exportSalesData.get(i).getDictValue())) {
map.put("exportSales", exportSalesData.get(i).getDictLabel());
}
}
// System.out.println(exportSalesData); return util.exportExcel(list, "供应商资料");
excelWriter.fill(map, writeSheet);
}
} }
@PostMapping("/getId") @PostMapping("/getId")
@ResponseBody @ResponseBody
public Result getId() throws Exception { public Result getId() throws Exception {

21
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSupplier.java

@ -24,11 +24,6 @@ public class SysSupplier extends BaseEntity
/*使用状态*/ /*使用状态*/
private String useStatus; private String useStatus;
/** 供应商类型 (0采购供应商、1委外供应商)*/
private String supplierType;
/** 供应商资质(1合格、2不合格、3特殊供应商)*/
private String supplierQualification;
/*采购员*/ /*采购员*/
private String purchaseBuyer; private String purchaseBuyer;
/** 供应商编号 */ /** 供应商编号 */
@ -39,8 +34,18 @@ public class SysSupplier extends BaseEntity
@Excel(name = "供应商名称") @Excel(name = "供应商名称")
private String supplierName; private String supplierName;
/** 供应商类型 (0采购供应商、1委外供应商)*/
@Excel( name = "供应商类型",dictType = "sys_supplier_type")
private String supplierType;
/** 供应商资质(1合格、2不合格、3特殊供应商)*/
@Excel( name = "供应商资质",dictType = "sys_supplier_qualification")
private String supplierQualification;
/** 内外销 */ /** 内外销 */
@Excel(name = "内外销") @Excel(name = "内外销",dictType = "sys_export_sales")
private String exportSales; private String exportSales;
/** 企业名称 */ /** 企业名称 */
@ -48,7 +53,7 @@ public class SysSupplier extends BaseEntity
private String enterpriseName; private String enterpriseName;
/** 企业性质 */ /** 企业性质 */
@Excel(name = "企业性质") @Excel(name = "企业性质",dictType = "sys_enterprise_nature")
private String enterpriseNature; private String enterpriseNature;
/** 企业地址 */ /** 企业地址 */
@ -154,7 +159,7 @@ public class SysSupplier extends BaseEntity
private String financialContact; private String financialContact;
/** 是否含税 */ /** 是否含税 */
@Excel(name = "是否含税") @Excel(name = "是否含税", dictType = "sys_confirm_tax")
private String confirmTax; private String confirmTax;
/** 税率 */ /** 税率 */

14
ruoyi-admin/src/main/java/com/ruoyi/system/domain/Vo/SysSupplierVo.java

@ -18,6 +18,11 @@ public class SysSupplierVo extends SysSupplier {
private String taskId; private String taskId;
/** 任务名称 */ /** 任务名称 */
private String taskName; private String taskName;
// 当前状态
private String taskStatus;
/** 办理时间 */ /** 办理时间 */
private Date doneTime; private Date doneTime;
/** 创建人 */ /** 创建人 */
@ -95,12 +100,21 @@ public class SysSupplierVo extends SysSupplier {
} }
public String getTaskStatus() {
return taskStatus;
}
public void setTaskStatus(String taskStatus) {
this.taskStatus = taskStatus;
}
@Override @Override
public String toString() { public String toString() {
return "SysSupplierVo{" + return "SysSupplierVo{" +
"applyUserName='" + applyUserName + '\'' + "applyUserName='" + applyUserName + '\'' +
", taskId='" + taskId + '\'' + ", taskId='" + taskId + '\'' +
", taskName='" + taskName + '\'' + ", taskName='" + taskName + '\'' +
", taskStatus='" + taskStatus + '\'' +
", doneTime=" + doneTime + ", doneTime=" + doneTime +
", createUserName='" + createUserName + '\'' + ", createUserName='" + createUserName + '\'' +
", suspendState='" + suspendState + '\'' + ", suspendState='" + suspendState + '\'' +

7
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSupplierMapper.java

@ -61,6 +61,13 @@ public interface SysSupplierMapper
*/ */
public int deleteSysSupplierByIds(String[] supplierIds); public int deleteSysSupplierByIds(String[] supplierIds);
/**
* 可以筛选资质和类型导出全部
*/
public List<SysSupplier> exportSelectSupplierList(SysSupplier sysSupplier);
public List<SysSupplier> selectSysSupplierBycode(); public List<SysSupplier> selectSysSupplierBycode();
/** /**

5
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSupplierService.java

@ -67,6 +67,11 @@ public interface ISysSupplierService
public List selectSysSupplierBycode(); public List selectSysSupplierBycode();
/**
* 可以筛选资质和类型导出全部
*/
public List<SysSupplier> exportSelectSupplierList(SysSupplier sysSupplier);
/** /**
* 新增物料信息的时候查关联应商信息 * 新增物料信息的时候查关联应商信息
*/ */

29
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSupplierServiceImpl.java

@ -146,6 +146,14 @@ public class SysSupplierServiceImpl implements ISysSupplierService{
} else { } else {
sysSupplierVo.setTaskName("未启动"); sysSupplierVo.setTaskName("未启动");
} }
sysSupplierVo.setTaskStatus(sysSupplierVo.getTaskName());
if(sysSupplierVo.getAuditStatus()!=null && sysSupplierVo.getAuditStatus().equals("1")){
sysSupplierVo.setTaskStatus("审核通过");
}else if(sysSupplierVo.getAuditStatus()!=null && sysSupplierVo.getAuditStatus().equals("2")){
sysSupplierVo.setTaskStatus("审核拒绝");
}
returnList.add(sysSupplierVo); returnList.add(sysSupplierVo);
} }
returnList.setTotal(CollectionUtils.isEmpty(list) ? 0 : list.getTotal()); returnList.setTotal(CollectionUtils.isEmpty(list) ? 0 : list.getTotal());
@ -259,6 +267,16 @@ public class SysSupplierServiceImpl implements ISysSupplierService{
return sysSupplierMapper.selectSysSupplierBycode(); return sysSupplierMapper.selectSysSupplierBycode();
} }
/**
* 可以筛选资质和类型导出全部
*/
@Override
public List<SysSupplier> exportSelectSupplierList(SysSupplier sysSupplier) {
return sysSupplierMapper.exportSelectSupplierList(sysSupplier);
}
/** /**
* 新增物料信息的时候查关联应商信息 * 新增物料信息的时候查关联应商信息
*/ */
@ -433,15 +451,16 @@ public class SysSupplierServiceImpl implements ISysSupplierService{
private void buildAuthority(SysUser user, Map<String, Object> variables) { private void buildAuthority(SysUser user, Map<String, Object> variables) {
Set<String> roleKeys = roleService.selectRoleKeys(user.getUserId()); Set<String> roleKeys = roleService.selectRoleKeys(user.getUserId());
variables.put("cgjlExist",false);
// 角色不同审核人不同
if(roleKeys.contains("cgyRole")){ if(roleKeys.contains("cgyRole")){
variables.put("authority",1); variables.put("authority",1);
}else if(roleKeys.contains("cgjlRole")){ }else if(roleKeys.contains("cgjlRole")){
variables.put("authority",2); variables.put("cgjlExist",true);
}else if(roleKeys.contains("cgzgRole")){ }else if(roleKeys.contains("admin")){
variables.put("authority",3); variables.put("authority",3);
} }else if(roleKeys.contains("fzjlRole")){
// 角色不同审核人不同
if(roleKeys.contains("admin")){
variables.put("authority",4); variables.put("authority",4);
} }
} }

23
ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseStorageOrder.java

@ -28,27 +28,28 @@ public class WarehouseStorageOrder extends BaseEntity
private String warehouseStorageCode; private String warehouseStorageCode;
/** 关联订单号(多种订单类型) */ /** 关联订单号(多种订单类型) */
@Excel(name = "关联订单号", readConverterExp = "多=种订单类型") @Excel(name = "关联订单号")
private String relatedOrderCode; private String relatedOrderCode;
/** 仓库入库状态 */ /** 仓库入库状态(0待暂收、1已暂收、2待入库、3部分入库、4全部入库) */
@Excel(name = "仓库入库状态") @Excel(name = "仓库入库状态",dictType = "warehouse_storage_status")
private String warehouseStorageStatus; private String warehouseStorageStatus;
/** 仓库品质状态 */ /** 品质状态(0待品质、1部分品质、2全部品质) */
@Excel(name = "仓库品质状态") @Excel(name = "品质状态",dictType = "warehouse_quality_status")
private String warehouseQualityStatus; private String warehouseQualityStatus;
/** 仓库入库类型 */
@Excel(name = "仓库入库类型") /** 入库类型(0采购入库、1供应商补货、2委内入库、3公司退货、4委外入库、5生产入库) */
@Excel(name = "入库类型",dictType ="warehouse_storage_type" )
private String warehouseStorageType; private String warehouseStorageType;
/** 仓库订单类型 */ /** 订单类型(0采购订单、1生产订单、2退换货订单、3委外订单) */
@Excel(name = "仓库订单类型") @Excel(name = "订单类型",dictType = "storage_order_type")
private String warehouseOrderType; private String warehouseOrderType;
/** 仓库入库部门类型 */ /** 入库部门类型(0仓库,1采购 ) */
@Excel(name = "仓库入库部门类型") @Excel(name = "入库部门类型",dictType = "warehouse_dept_type")
private String warehouseDeptType; private String warehouseDeptType;
/** 通知已到货数量 */ /** 通知已到货数量 */

14
ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseStorageOrderDetail.java

@ -105,6 +105,10 @@ public class WarehouseStorageOrderDetail extends BaseEntity
@Excel(name = "物料图片地址") @Excel(name = "物料图片地址")
private String materialPhotourl; private String materialPhotourl;
/** 物料型号*/
@Excel(name = "物料型号")
private String materialModel;
/** 物料品牌 */ /** 物料品牌 */
@Excel(name = "物料品牌") @Excel(name = "物料品牌")
private String materialBrand; private String materialBrand;
@ -445,6 +449,15 @@ public class WarehouseStorageOrderDetail extends BaseEntity
{ {
return materialBrand; return materialBrand;
} }
public String getMaterialModel() {
return materialModel;
}
public void setMaterialModel(String materialModel) {
this.materialModel = materialModel;
}
public void setMaterialUnit(String materialUnit) public void setMaterialUnit(String materialUnit)
{ {
this.materialUnit = materialUnit; this.materialUnit = materialUnit;
@ -745,6 +758,7 @@ public class WarehouseStorageOrderDetail extends BaseEntity
.append("materialType", getMaterialType()) .append("materialType", getMaterialType())
.append("materialPhotourl", getMaterialPhotourl()) .append("materialPhotourl", getMaterialPhotourl())
.append("materialBrand", getMaterialBrand()) .append("materialBrand", getMaterialBrand())
.append("materialModel", getMaterialModel())
.append("materialUnit", getMaterialUnit()) .append("materialUnit", getMaterialUnit())
.append("materialDescribe", getMaterialDescribe()) .append("materialDescribe", getMaterialDescribe())
.append("materialProcessMethod", getMaterialProcessMethod()) .append("materialProcessMethod", getMaterialProcessMethod())

5
ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseStorageOrderDetailMapper.java

@ -114,4 +114,9 @@ public interface WarehouseStorageOrderDetailMapper
* */ * */
int updateWarehouseStorageOrderDetailByCode(WarehouseStorageOrderDetail storageOrderDetail); int updateWarehouseStorageOrderDetailByCode(WarehouseStorageOrderDetail storageOrderDetail);
/**
* 批量插入仓库入库详情数据
* */
int insertBatchWarehouseStorageOrderDetail(List<WarehouseStorageOrderDetail> warehouseStorageOrderDetailChildren);
} }

7
ruoyi-admin/src/main/resources/mapper/purchase/PurchaseOrderMapper.xml

@ -17,6 +17,7 @@
<result property="sharedInventoryOccupancySum" column="shared_inventory_occupancy_sum" /> <result property="sharedInventoryOccupancySum" column="shared_inventory_occupancy_sum" />
<result property="refundsExchangesSum" column="refunds_exchanges_sum" /> <result property="refundsExchangesSum" column="refunds_exchanges_sum" />
<result property="storageSum" column="storage_sum" /> <result property="storageSum" column="storage_sum" />
<result property="notifyHasArrivedSum" column="notify_has_arrived_sum" />
<result property="noRmbSum" column="noRmb_sum" /> <result property="noRmbSum" column="noRmb_sum" />
<result property="rmbSum" column="rmb_sum" /> <result property="rmbSum" column="rmb_sum" />
<result property="eceiptType" column="eceipt_type" /> <result property="eceiptType" column="eceipt_type" />
@ -45,7 +46,7 @@
</resultMap> </resultMap>
<sql id="selectPurchaseOrderVo"> <sql id="selectPurchaseOrderVo">
select purchase_order_id, purchase_order_code, purchase_plan_code, warehouse_storage_status, payment_status, supplier_code, supplier_name, material_sum, actual_purchase_sum, shared_inventory_occupancy_sum, refunds_exchanges_sum, storage_sum, noRmb_sum, rmb_sum, eceipt_type, arrived_time, stock_no, stock_name, receive_person, receive_person_phone, receive_address, purchase_buyer, use_status, audit_status, create_by, create_time, update_by, update_time, del_flag, instance_id, instance_type, submit_instance_id, cancel_instance_id, restore_instance_id, apply_title, apply_user, apply_time from purchase_order select purchase_order_id, purchase_order_code, purchase_plan_code, warehouse_storage_status, payment_status, supplier_code, supplier_name, material_sum, actual_purchase_sum, shared_inventory_occupancy_sum, refunds_exchanges_sum, storage_sum, notify_has_arrived_sum,noRmb_sum, rmb_sum, eceipt_type, arrived_time, stock_no, stock_name, receive_person, receive_person_phone, receive_address, purchase_buyer, use_status, audit_status, create_by, create_time, update_by, update_time, del_flag, instance_id, instance_type, submit_instance_id, cancel_instance_id, restore_instance_id, apply_title, apply_user, apply_time from purchase_order
</sql> </sql>
<select id="selectPurchaseOrderList" parameterType="PurchaseOrder" resultMap="PurchaseOrderResult"> <select id="selectPurchaseOrderList" parameterType="PurchaseOrder" resultMap="PurchaseOrderResult">
@ -95,6 +96,7 @@
<if test="sharedInventoryOccupancySum != null">shared_inventory_occupancy_sum,</if> <if test="sharedInventoryOccupancySum != null">shared_inventory_occupancy_sum,</if>
<if test="refundsExchangesSum != null">refunds_exchanges_sum,</if> <if test="refundsExchangesSum != null">refunds_exchanges_sum,</if>
<if test="storageSum != null">storage_sum,</if> <if test="storageSum != null">storage_sum,</if>
<if test="notifyHasArrivedSum != null">notify_has_arrived_sum,</if>
<if test="noRmbSum != null">noRmb_sum,</if> <if test="noRmbSum != null">noRmb_sum,</if>
<if test="rmbSum != null">rmb_sum,</if> <if test="rmbSum != null">rmb_sum,</if>
<if test="eceiptType != null">eceipt_type,</if> <if test="eceiptType != null">eceipt_type,</if>
@ -133,6 +135,7 @@
<if test="sharedInventoryOccupancySum != null">#{sharedInventoryOccupancySum},</if> <if test="sharedInventoryOccupancySum != null">#{sharedInventoryOccupancySum},</if>
<if test="refundsExchangesSum != null">#{refundsExchangesSum},</if> <if test="refundsExchangesSum != null">#{refundsExchangesSum},</if>
<if test="storageSum != null">#{storageSum},</if> <if test="storageSum != null">#{storageSum},</if>
<if test="notifyHasArrivedSum != null">#{notifyHasArrivedSum},</if>
<if test="noRmbSum != null">#{noRmbSum},</if> <if test="noRmbSum != null">#{noRmbSum},</if>
<if test="rmbSum != null">#{rmbSum},</if> <if test="rmbSum != null">#{rmbSum},</if>
<if test="eceiptType != null">#{eceiptType},</if> <if test="eceiptType != null">#{eceiptType},</if>
@ -175,6 +178,7 @@
<if test="sharedInventoryOccupancySum != null">shared_inventory_occupancy_sum = #{sharedInventoryOccupancySum},</if> <if test="sharedInventoryOccupancySum != null">shared_inventory_occupancy_sum = #{sharedInventoryOccupancySum},</if>
<if test="refundsExchangesSum != null">refunds_exchanges_sum = #{refundsExchangesSum},</if> <if test="refundsExchangesSum != null">refunds_exchanges_sum = #{refundsExchangesSum},</if>
<if test="storageSum != null">storage_sum = #{storageSum},</if> <if test="storageSum != null">storage_sum = #{storageSum},</if>
<if test="notifyHasArrivedSum != null">notify_has_arrived_sum = #{notifyHasArrivedSum},</if>
<if test="noRmbSum != null">noRmb_sum = #{noRmbSum},</if> <if test="noRmbSum != null">noRmb_sum = #{noRmbSum},</if>
<if test="rmbSum != null">rmb_sum = #{rmbSum},</if> <if test="rmbSum != null">rmb_sum = #{rmbSum},</if>
<if test="eceiptType != null">eceipt_type = #{eceiptType},</if> <if test="eceiptType != null">eceipt_type = #{eceiptType},</if>
@ -219,6 +223,7 @@
<if test="sharedInventoryOccupancySum != null">shared_inventory_occupancy_sum = #{sharedInventoryOccupancySum},</if> <if test="sharedInventoryOccupancySum != null">shared_inventory_occupancy_sum = #{sharedInventoryOccupancySum},</if>
<if test="refundsExchangesSum != null">refunds_exchanges_sum = #{refundsExchangesSum},</if> <if test="refundsExchangesSum != null">refunds_exchanges_sum = #{refundsExchangesSum},</if>
<if test="storageSum != null">storage_sum = #{storageSum},</if> <if test="storageSum != null">storage_sum = #{storageSum},</if>
<if test="notifyHasArrivedSum != null">notify_has_arrived_sum = #{notifyHasArrivedSum},</if>
<if test="noRmbSum != null">noRmb_sum = #{noRmbSum},</if> <if test="noRmbSum != null">noRmb_sum = #{noRmbSum},</if>
<if test="rmbSum != null">rmb_sum = #{rmbSum},</if> <if test="rmbSum != null">rmb_sum = #{rmbSum},</if>
<if test="eceiptType != null">eceipt_type = #{eceiptType},</if> <if test="eceiptType != null">eceipt_type = #{eceiptType},</if>

91
ruoyi-admin/src/main/resources/mapper/purchase/PurchaseStorageChildMapper.xml

@ -60,6 +60,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where purchase_storage_child_id = #{purchaseStorageChildId} where purchase_storage_child_id = #{purchaseStorageChildId}
</select> </select>
<select id="selectPurchaseStorageChildListByCode" parameterType="String" resultMap="PurchaseStorageChildResult">
<include refid="selectPurchaseStorageChildVo"/>
where warehouse_storage_code = #{warehouseStorageCode}
</select>
<insert id="insertPurchaseStorageChild" parameterType="PurchaseStorageChild" useGeneratedKeys="true" keyProperty="purchaseStorageChildId"> <insert id="insertPurchaseStorageChild" parameterType="PurchaseStorageChild" useGeneratedKeys="true" keyProperty="purchaseStorageChildId">
insert into purchase_storage_child insert into purchase_storage_child
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
@ -142,6 +147,92 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim> </trim>
</insert> </insert>
<insert id="insertBatchPurchaseStorageChild" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="purchaseStorageChildId">
insert into purchase_storage_child (
warehouse_storage_code,
related_order_code,
supplier_code,
supplier_name,
material_no,
material_name,
material_type,
material_photoUrl,
material_model,
material_brand,
material_unit,
material_describe,
material_process_method,
material_dept_type,
make_total,
notify_has_arrived_num,
notify_arrive_num,
actual_has_arrived_num,
actual_arrive_num,
temporary_has_qualified_num,
temporary_qualified_num,
has_storage_num,
storage_num,
make_storage_num,
quality_has_qualified_num,
quality_qualified_num,
refunds_exchanges_num,
make_in_unit_price,
arrived_time,
temporary_time,
delivery_inspection_time,
quality_time,
storage_time,
create_time,
create_by
) values
<foreach collection="list" item="item" index="index" separator="),(">
(
#{item.warehouseStorageCode},
#{item.relatedOrderCode},
#{item.supplierCode},
#{item.supplierName},
#{item.materialNo},
#{item.materialName},
#{item.materialType},
#{item.materialPhotourl},
#{item.materialModel},
#{item.materialBrand},
#{item.materialUnit},
#{item.materialDescribe},
#{item.materialProcessMethod},
#{item.materialDeptType},
#{item.makeTotal},
#{item.notifyHasArrivedNum},
#{item.notifyArriveNum},
#{item.actualHasArrivedNum},
#{item.actualArriveNum},
#{item.temporaryHasQualifiedNum},
#{item.temporaryQualifiedNum},
#{item.hasStorageNum},
#{item.storageNum},
#{item.makeStorageNum},
#{item.qualityHasQualifiedNum},
#{item.qualityQualifiedNum},
#{item.refundsExchangesNum},
#{item.makeInUnitPrice},
#{item.arrivedTime},
#{item.temporaryTime},
#{item.deliveryInspectionTime},
#{item.qualityTime},
#{item.storageTime},
#{item.createTime},
#{item.createBy}
)
</foreach>
</insert>
<update id="updatePurchaseStorageChild" parameterType="PurchaseStorageChild"> <update id="updatePurchaseStorageChild" parameterType="PurchaseStorageChild">
update purchase_storage_child update purchase_storage_child
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">

25
ruoyi-admin/src/main/resources/mapper/system/SysSupplierMapper.xml

@ -114,6 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="supplierCode != null and supplierCode != ''"> and sup.supplier_code like concat('%', #{supplierCode}, '%')</if> <if test="supplierCode != null and supplierCode != ''"> and sup.supplier_code like concat('%', #{supplierCode}, '%')</if>
<if test="supplierName != null and supplierName != ''"> and sup.supplier_name like concat('%', #{supplierName}, '%')</if> <if test="supplierName != null and supplierName != ''"> and sup.supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="supplierType != null and supplierType != ''"> and sup.supplier_type = #{supplierType}</if> <if test="supplierType != null and supplierType != ''"> and sup.supplier_type = #{supplierType}</if>
<if test="supplierQualification != null and supplierQualification != ''"> and sup.supplier_qualification = #{supplierQualification}</if>
<if test="useStatus != null and useStatus != ''"> and sup.use_status = #{useStatus}</if> <if test="useStatus != null and useStatus != ''"> and sup.use_status = #{useStatus}</if>
<if test="auditStatus != null and auditStatus != ''"> and sup.audit_status = #{auditStatus}</if> <if test="auditStatus != null and auditStatus != ''"> and sup.audit_status = #{auditStatus}</if>
<if test="purchaseBuyer != null and purchaseBuyer != ''"> and sup.purchase_buyer = #{purchaseBuyer}</if> <if test="purchaseBuyer != null and purchaseBuyer != ''"> and sup.purchase_buyer = #{purchaseBuyer}</if>
@ -129,18 +130,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="receiveAddress != null and receiveAddress != ''"> or sup.receive_address like concat('%',#{receiveAddress},'%')</if> <if test="receiveAddress != null and receiveAddress != ''"> or sup.receive_address like concat('%',#{receiveAddress},'%')</if>
<if test="invoiceCompanyName != null and invoiceCompanyName != ''"> and sup.invoice_company_name like concat('%', #{invoiceCompanyName}, '%')</if> <if test="invoiceCompanyName != null and invoiceCompanyName != ''"> and sup.invoice_company_name like concat('%', #{invoiceCompanyName}, '%')</if>
<if test="companyTaxNumber != null and companyTaxNumber != ''"> and sup.company_tax_number like concat('%', #{companyTaxNumber}, '%')</if> <if test="companyTaxNumber != null and companyTaxNumber != ''"> and sup.company_tax_number like concat('%', #{companyTaxNumber}, '%')</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
<if test="instanceId != null and instanceId != ''"> and sup.instance_id = #{instanceId}</if>
<if test="instanceType != null and instanceType != ''"> and sup.instance_type = #{instanceType}</if>
<if test="submitInstanceId != null and submitInstanceId != ''"> and sup.submit_instance_id = #{submitInstanceId}</if>
<if test="cancelInstanceId != null and cancelInstanceId != ''"> and sup.cancel_instance_id = #{cancelInstanceId}</if>
<if test="restoreInstanceId != null and restoreInstanceId != ''"> and sup.restore_instance_id = #{restoreInstanceId}</if>
<if test="applyTitle != null and applyTitle != ''"> and sup.apply_title = #{applyTitle}</if>
<if test="applyUser != null and applyUser != ''"> and sup.apply_user = #{applyUser}</if>
<if test="applyTime != null "> and sup.apply_time = #{applyTime}</if>
and sup.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
</if>
<if test="keyword != null and keyword != ''"> and ((sup.supplierCode like concat('%',#{keyword},'%') or sup.suppplierName like concat('%',#{keyword},'%'))</if>
</where> </where>
order by sup.apply_time asc, sup.create_time desc order by sup.apply_time asc, sup.create_time desc
</select> </select>
@ -176,6 +165,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
on sup.supplier_id = file.rel_id on sup.supplier_id = file.rel_id
where sup.supplier_id = #{supplierId} where sup.supplier_id = #{supplierId}
</select> </select>
<select id="exportSelectSupplierList" parameterType="SysSupplier" resultMap="SysSupplierResult">
<include refid="selectSysSupplierVo"/>
<where>
<if test="supplierType != null and supplierType != ''"> and supplier_type = #{supplierType}</if>
<if test="supplierQualification != null and supplierQualification != ''"> and supplier_qualification = #{supplierQualification}</if>
</where>
</select>
<select id="selectSysSupplierBycode" resultMap="SysSupplierResult"> <select id="selectSysSupplierBycode" resultMap="SysSupplierResult">
<include refid="selectSysSupplierVo"/> <include refid="selectSysSupplierVo"/>
where audit_status = 1 and use_status = 1 where audit_status = 1 and use_status = 1

133
ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseStorageOrderDetailMapper.xml

@ -28,6 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="materialType" column="material_type" /> <result property="materialType" column="material_type" />
<result property="materialPhotourl" column="material_photoUrl" /> <result property="materialPhotourl" column="material_photoUrl" />
<result property="materialBrand" column="material_brand" /> <result property="materialBrand" column="material_brand" />
<result property="materialModel" column="material_model" />
<result property="materialUnit" column="material_unit" /> <result property="materialUnit" column="material_unit" />
<result property="materialDescribe" column="material_describe" /> <result property="materialDescribe" column="material_describe" />
<result property="materialProcessMethod" column="material_process_method" /> <result property="materialProcessMethod" column="material_process_method" />
@ -94,6 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
material_type, material_type,
material_photoUrl, material_photoUrl,
material_brand, material_brand,
material_model,
material_unit, material_unit,
material_describe, material_describe,
material_process_method, material_process_method,
@ -188,6 +190,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialType != null">material_type,</if> <if test="materialType != null">material_type,</if>
<if test="materialPhotourl != null">material_photoUrl,</if> <if test="materialPhotourl != null">material_photoUrl,</if>
<if test="materialBrand != null">material_brand,</if> <if test="materialBrand != null">material_brand,</if>
<if test="materialModel != null">material_model,</if>
<if test="materialUnit != null">material_unit,</if> <if test="materialUnit != null">material_unit,</if>
<if test="materialDescribe != null">material_describe,</if> <if test="materialDescribe != null">material_describe,</if>
<if test="materialProcessMethod != null">material_process_method,</if> <if test="materialProcessMethod != null">material_process_method,</if>
@ -247,6 +250,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialType != null">#{materialType},</if> <if test="materialType != null">#{materialType},</if>
<if test="materialPhotourl != null">#{materialPhotourl},</if> <if test="materialPhotourl != null">#{materialPhotourl},</if>
<if test="materialBrand != null">#{materialBrand},</if> <if test="materialBrand != null">#{materialBrand},</if>
<if test="materialModel != null">#{materialModel},</if>
<if test="materialUnit != null">#{materialUnit},</if> <if test="materialUnit != null">#{materialUnit},</if>
<if test="materialDescribe != null">#{materialDescribe},</if> <if test="materialDescribe != null">#{materialDescribe},</if>
<if test="materialProcessMethod != null">#{materialProcessMethod},</if> <if test="materialProcessMethod != null">#{materialProcessMethod},</if>
@ -280,6 +284,133 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim> </trim>
</insert> </insert>
<insert id="insertBatchWarehouseStorageOrderDetail" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="warehouseStorageDetailId">
insert into warehouse_storage_order_detail (
warehouse_storage_code,
related_order_code,
warehouse_storage_status,
warehouse_quality_status,
warehouse_storage_type,
warehouse_storage_class,
warehouse_order_type,
warehouse_dept_type,
warehouse_employee,
warehouse_code,
warehouse_name,
warehouse_detail_address,
supplier_code,
supplier_name,
customer_contact,
contact_number,
supplier_address,
customer_id,
customer_name,
customer_contact_people,
customer_contact_number,
customer_company_address,
material_no,
material_name,
material_type,
material_photoUrl,
material_brand,
material_model,
material_unit,
material_describe,
material_process_method,
material_dept_type,
make_total,
notify_has_arrived_num,
notify_arrive_num,
actual_has_arrived_num,
actual_arrive_num,
temporary_has_qualified_num,
temporary_qualified_num,
has_storage_num,
storage_num,
make_in_unit_price,
make_storage_num,
quality_has_qualified_num,
quality_qualified_num,
refunds_exchanges_num,
arrived_time,
temporary_time,
delivery_inspection_time,
quality_time,
storage_time,
temporary_remark,
temporary_report_url,
storage_location,
create_time,
create_by
) values
<foreach collection="list" item="item" separator=",">
(
#{item.warehouseStorageCode},
#{item.relatedOrderCode},
#{item.warehouseStorageStatus},
#{item.warehouseQualityStatus},
#{item.warehouseStorageType},
#{item.warehouseStorageClass},
#{item.warehouseOrderType},
#{item.warehouseDeptType},
#{item.warehouseEmployee},
#{item.warehouseCode},
#{item.warehouseName},
#{item.warehouseDetailAddress},
#{item.supplierCode},
#{item.supplierName},
#{item.customerContact},
#{item.contactNumber},
#{item.supplierAddress},
#{item.customerId},
#{item.customerName},
#{item.customerContactPeople},
#{item.customerContactNumber},
#{item.customerCompanyAddress},
#{item.materialNo},
#{item.materialName},
#{item.materialType},
#{item.materialPhotourl},
#{item.materialBrand},
#{item.materialModel},
#{item.materialUnit},
#{item.materialDescribe},
#{item.materialProcessMethod},
#{item.materialDeptType},
#{item.makeTotal},
#{item.notifyHasArrivedNum},
#{item.notifyArriveNum},
#{item.actualHasArrivedNum},
#{item.actualArriveNum},
#{item.temporaryHasQualifiedNum},
#{item.temporaryQualifiedNum},
#{item.hasStorageNum},
#{item.storageNum},
#{item.makeInUnitPrice},
#{item.makeStorageNum},
#{item.qualityHasQualifiedNum},
#{item.qualityQualifiedNum},
#{item.refundsExchangesNum},
#{item.arrivedTime},
#{item.temporaryTime},
#{item.deliveryInspectionTime},
#{item.qualityTime},
#{item.storageTime},
#{item.temporaryRemark},
#{item.temporaryReportUrl},
#{item.storageLocation},
#{item.createTime},
#{item.createBy}
)
</foreach>
</insert>
<update id="updateWarehouseStorageOrderDetail" parameterType="WarehouseStorageOrderDetail"> <update id="updateWarehouseStorageOrderDetail" parameterType="WarehouseStorageOrderDetail">
update warehouse_storage_order_detail update warehouse_storage_order_detail
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
@ -310,6 +441,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialType != null">material_type = #{materialType},</if> <if test="materialType != null">material_type = #{materialType},</if>
<if test="materialPhotourl != null">material_photoUrl = #{materialPhotourl},</if> <if test="materialPhotourl != null">material_photoUrl = #{materialPhotourl},</if>
<if test="materialBrand != null">material_brand = #{materialBrand},</if> <if test="materialBrand != null">material_brand = #{materialBrand},</if>
<if test="materialModel != null">material_model = #{materialModel},</if>
<if test="materialUnit != null">material_unit = #{materialUnit},</if> <if test="materialUnit != null">material_unit = #{materialUnit},</if>
<if test="materialDescribe != null">material_describe = #{materialDescribe},</if> <if test="materialDescribe != null">material_describe = #{materialDescribe},</if>
<if test="materialProcessMethod != null">material_process_method = #{materialProcessMethod},</if> <if test="materialProcessMethod != null">material_process_method = #{materialProcessMethod},</if>
@ -376,6 +508,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialType != null">material_type = #{materialType},</if> <if test="materialType != null">material_type = #{materialType},</if>
<if test="materialPhotourl != null">material_photoUrl = #{materialPhotourl},</if> <if test="materialPhotourl != null">material_photoUrl = #{materialPhotourl},</if>
<if test="materialBrand != null">material_brand = #{materialBrand},</if> <if test="materialBrand != null">material_brand = #{materialBrand},</if>
<if test="materialModel != null">material_model = #{materialModel},</if>
<if test="materialUnit != null">material_unit = #{materialUnit},</if> <if test="materialUnit != null">material_unit = #{materialUnit},</if>
<if test="materialDescribe != null">material_describe = #{materialDescribe},</if> <if test="materialDescribe != null">material_describe = #{materialDescribe},</if>
<if test="materialProcessMethod != null">material_process_method = #{materialProcessMethod},</if> <if test="materialProcessMethod != null">material_process_method = #{materialProcessMethod},</if>

134
ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/addPurchaseStorage.html

@ -3,11 +3,12 @@
<head> <head>
<th:block th:include="include :: header('采购入库通知')" /> <th:block th:include="include :: header('采购入库通知')" />
<th:block th:include="include :: datetimepicker-css" /> <th:block th:include="include :: datetimepicker-css" />
<th:block th:include="include :: bootstrap-editable-css"/>
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-addPurchaseStorage-edit" th:object="${purchaseOrder}"> <form class="form-horizontal m" id="form-addPurchaseStorage-edit" th:object="${purchaseOrder}">
<input type="hidden" name="warehouseCode" th:field="*{stockNo}"/> <input type="hidden" name="purchaseOrderId" th:field="*{purchaseOrderId}"/>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">采购单号:</label> <label class="col-sm-3 control-label">采购单号:</label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -69,6 +70,76 @@
$("#form-addPurchaseStorage-edit").validate({ focusCleanup: true}); $("#form-addPurchaseStorage-edit").validate({ focusCleanup: true});
function submitHandler() {
// 获取表单数据
const purchaseStorageData = $("#form-addPurchaseStorage-edit").serializeArray().reduce((obj, item) => {
obj[item.name] = item.value;
return obj;
}, {});
var table = $('#bootstrap-table').bootstrapTable("getSelections");
if (table.length === 0){
$.modal.alertWarning("请至少选择一条要入库的物料");
return;
}
// 检查是否有同时存在 warehouseDept 为 1 和 0 的记录
var hasWarehouseDept1 = false;
var hasWarehouseDept0 = false;
for (var i = 0; i < table.length; i++) {
var warehouseDept = table[i].warehouseDept;
if (warehouseDept === "1") {
hasWarehouseDept1 = true;
} else if (warehouseDept === "0") {
hasWarehouseDept0 = true;
}
}
if (hasWarehouseDept1 && hasWarehouseDept0) {
$.modal.alertWarning("入库物料中同时包含仓库入库和采购入库,需要分开入库");
return;
}
var materialDataList = table.map(function(item) {
// 根据实际字段名调整
return {
"purchaseOrderChildId":item.purchaseOrderChildId,
"materialNo": item.materialNo,
"materialName": item.materialName,
"materialPhotourl" : item.materialPhotourl,
"materialType": item.materialType,
"materialDescribe": item.materialDescribe,
"materialBrand": item.materialBrand,
"materialUnit": item.materialUnit,
"materialProcessMethod": item.materialProcessMethod,
"warehouseDept": item.warehouseDept,
"planPurchaseNum": item.planPurchaseNum,
"actualPurchaseNum": item.actualPurchaseNum,
"planDeliveryTime": item.planDeliveryTime,
"notifyHasArrivedNum": item.notifyHasArrivedNum,
"temporaryNum": item.temporaryNum,
"hasStorageNum": item.hasStorageNum,
"notifyArriveNum": item.notifyArriveNum,
};
});
const combinedData = Object.assign({}, purchaseStorageData, {
purchaseOrderChildList: materialDataList,
});
// 合并表单数据和表格数据
console.log(combinedData)
// 使用 JSON.stringify() 序列化数据
const jsonData = JSON.stringify(combinedData);
// 发送 AJAX 请求到后端接口
$.operate.saveJson(prefix + "/addPurchaseStorage", jsonData);
}
//物料信息展示列表 //物料信息展示列表
$(function() { $(function() {
var options = { var options = {
@ -83,7 +154,11 @@
columns: [{ columns: [{
checkbox: true checkbox: true
}, },
{
field: 'purchaseOrderChildId',
title: '主键',
visible: false
},
{ {
title: '料号', title: '料号',
field: 'materialNo', field: 'materialNo',
@ -92,11 +167,16 @@
title: '物料名称', title: '物料名称',
field: 'materialName', field: 'materialName',
}, },
{
title: '图片',
field: 'materialPhotourl',
visible: false
},
{ {
title: '物料类型', title: '物料类型',
field: 'materialType', field: 'materialType',
formatter: function (value,row, index) { formatter: function (value,row, index) {
$.table.selectCategoryLabel(materialTypeDatas, value) return $.table.selectCategoryLabel(materialTypeDatas, value)
} }
}, },
{ {
@ -127,7 +207,7 @@
}, },
{ {
title: '物料入库部门', title: '物料入库部门',
field: 'materialDeptType', field: 'warehouseDept',
formatter:function (value) { formatter:function (value) {
return $.table.selectDictLabel(warehouseDeptDatas, value); return $.table.selectDictLabel(warehouseDeptDatas, value);
} }
@ -141,7 +221,51 @@
{title: '已入库数',field: 'hasStorageNum', {title: '已入库数',field: 'hasStorageNum',
}, },
{title: '通知到货数',field: 'notifyArriveNum' {title: '通知到货数',field: 'notifyArriveNum',
editable: {
//动态禁用行内编辑
noEditFormatter: function(value, row, index){
if (row.temporaryNum === row.actualPurchaseNum || row.actualPurchaseNum === row.notifyHasArrivedNum){
return "不可入库";
}else {
return false;
}
},
validate: function(value) {
if ($.trim(value) === '') {
return '通知到货数不能为空';
}
if (isNaN(value)) {
return '请输入有效的数字';
}
if (value < 0) {
return '通知到货数不能小于0';
}
//不能为小数
if (value % 1 !== 0) {
return '本次验收数不能为小数';
}
},
},
formatter: function (value, row) {
// 检查 row 是否存在
if (!row) {
return "";
}
// 检查 notifyArriveNum 是否存在
if (row.notifyArriveNum === undefined || row.notifyArriveNum === null) {
return "";
}
// 根据 notifyArriveNum 的值决定返回值
if (row.notifyArriveNum) {
return row.notifyArriveNum;
} else {
return value;
}
}
} }
] ]
}; };

13
ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/purchaseOrder.html

@ -20,7 +20,7 @@
</li> </li>
<li> <li>
<label>采购入库状态:</label> <label>采购入库状态:</label>
<select name="warehouseStorageStatus" th:with="type=${@dict.getType('eceiptStatus')}"> <select name="warehouseStorageStatus" th:with="type=${@dict.getType('warehouse_storage_status')}">
<option value="">所有</option> <option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select> </select>
@ -75,7 +75,7 @@
var addPurchaseStorageFlag = [[${@permission.hasPermi('purchase:purchaseOrder:addPurchaseStorage')}]]; var addPurchaseStorageFlag = [[${@permission.hasPermi('purchase:purchaseOrder:addPurchaseStorage')}]];
var warehouseStorageStatusDatas = [[${@dict.getType('eceiptStatus')}]]; var warehouseStorageStatusDatas = [[${@dict.getType('warehouse_storage_status')}]];
var paymentStatusDatas = [[${@dict.getType('sys_pay_close')}]]; var paymentStatusDatas = [[${@dict.getType('sys_pay_close')}]];
var useStatusDatas = [[${@dict.getType('useStatus')}]]; var useStatusDatas = [[${@dict.getType('useStatus')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
@ -239,8 +239,12 @@
if(row.auditStatus=="1" && row.useStatus=="1" && !row.cancelInstanceId) { if(row.auditStatus=="1" && row.useStatus=="1" && !row.cancelInstanceId) {
// 作废 // 作废
actions.push('<a class=" ' + cancelFlag + ' " href="javascript:void(0)" onclick="cancel(\'' + row.purchaseOrderId + '\')"><i class="fa fa-remove"></i> 作废</a>'); actions.push('<a class=" ' + cancelFlag + ' " href="javascript:void(0)" onclick="cancel(\'' + row.purchaseOrderId + '\')"><i class="fa fa-remove"></i> 作废</a>');
//入库通知
actions.push('<a class=" ' + addPurchaseStorageFlag + ' " href="javascript:void(0)" onclick="addPurchaseStorage(\'' + row.purchaseOrderId + '\')"><i class="fa fa-edit"></i> 入库通知</a>'); //入库状态(0待暂收、1已暂收、2待入库、3部分入库、4全部入库)
if(row.warehouseStorageStatus=="2" || row.warehouseStorageStatus=="3"){
//入库通知
actions.push('<a class=" ' + addPurchaseStorageFlag + ' " href="javascript:void(0)" onclick="addPurchaseStorage(\'' + row.purchaseOrderId + '\')"><i class="fa fa-edit"></i> 入库通知</a>');
}
// 已作废 // 已作废
} }
@ -344,6 +348,7 @@
//入库通知 //入库通知
function addPurchaseStorage(purchaseOrderId) { function addPurchaseStorage(purchaseOrderId) {
//入库状态(0待暂收、1已暂收、2待入库、3部分入库、4全部入库)
var url = prefix + "/addPurchaseStorage/" + purchaseOrderId; var url = prefix + "/addPurchaseStorage/" + purchaseOrderId;
$.modal.open("入库通知", url); $.modal.open("入库通知", url);
} }

25
ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/purchaseQuote.html

@ -66,12 +66,16 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="purchase:purchaseQuote:add"> <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="purchase:purchaseQuote:add">
<i class="fa fa-plus"></i> 添加 <i class="fa fa-plus"></i> 添加
</a> </a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="purchase:purchaseQuote:export"> <a class="btn btn-success" onclick="$.table.exportExcel()" shiro:hasPermission="purchase:purchaseQuote:export">
<i class="fa fa-download"></i> 导出 <i class="fa fa-download"></i> 导出
</a> </a>
<a class="btn btn-success" onclick="$.table.importExcel()" shiro:hasPermission="purchase:purchaseQuote:import">
<i class="fa fa-upload"></i> 导入
</a>
</div> </div>
<div class="col-sm-12 select-table table-striped"> <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> </div>
</div> </div>
@ -147,14 +151,14 @@
// 审核状态-审核通过 使用状态-是 未发起作废流程 // 审核状态-审核通过 使用状态-是 未发起作废流程
if (row.auditStatus == "1" && row.useStatus == "1") { if (row.auditStatus == "1" && row.useStatus == "1") {
// 作废 // 作废
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.purchaseQuoteId + '\')"><i class="fa fa-remove"></i> 作废</a>'); actions.push('<a href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.purchaseQuoteId + '\')"><i class="fa fa-remove"></i> 作废</a>');
// 编辑 // 编辑
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.purchaseQuoteId + '\')"><i class="fa fa-edit"></i> 编辑</a> '); actions.push('<a href="javascript:void(0)" onclick="$.operate.edit(\'' + row.purchaseQuoteId + '\')"><i class="fa fa-edit"></i> 编辑</a> ');
} }
// 已作废 // 已作废
if (row.useStatus == "2") { if (row.useStatus == "2") {
// 恢复 // 恢复
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.purchaseQuoteId + '\')"><i class="fa fa-window-restore"></i> 恢复</a> '); actions.push('<a href="javascript:void(0)" onclick="$.operate.restore(\'' + row.purchaseQuoteId + '\')"><i class="fa fa-window-restore"></i> 恢复</a> ');
} }
// 有流程实例id // 有流程实例id
if (row.instanceId) { if (row.instanceId) {
@ -163,17 +167,18 @@
var todoUserIdList = row.todoUserId.split(","); var todoUserIdList = row.todoUserId.split(",");
if (todoUserIdList.includes(loginName)) { if (todoUserIdList.includes(loginName)) {
var nodeName = row.taskName == '驳回调整' ? ' 调整申请' : ' 审批'; 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.purchaseQuoteId + '\')"><i class="fa fa-eye"></i> 详情</a> '); actions.push('<a href="javascript:void(0)" onclick="$.operate.detail(\'' + row.purchaseQuoteId + '\')"><i class="fa fa-eye"></i> 详情</a> ');
return actions.join(''); var actionLinks = actions.join('');
return $.table.dropdownToggle(actionLinks);
} }
} }
], ],

12
ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/taskCgzgVerify.html → ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/taskFzjlVerify.html

@ -9,7 +9,7 @@
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content"> <div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-purchaseQuote-cgzg-audit" th:object="${formData}"> <form class="form-horizontal m" id="form-purchaseQuote-fzjl-audit" th:object="${formData}">
<input name="purchaseQuoteId" th:field="*{purchaseQuoteId}" type="hidden"> <input name="purchaseQuoteId" th:field="*{purchaseQuoteId}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden"> <input name="taskId" th:field="*{taskId}" type="hidden">
<input name="taskName" th:field="*{taskName}" type="hidden"> <input name="taskName" th:field="*{taskName}" type="hidden">
@ -100,9 +100,9 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label" for="cgzgVerifyApproved"><span style="color: red; ">*</span>审批意见:</label> <label class="col-sm-3 control-label" for="fzjlVerifyApproved"><span style="color: red; ">*</span>审批意见:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select name="p_B_cgzgVerifyApproved" id="cgzgVerifyApproved" class="form-control m-b" required> <select name="p_B_fzjlVerifyApproved" id="fzjlVerifyApproved" class="form-control m-b" required>
<option value=""></option> <option value=""></option>
<option value="true">同意</option> <option value="true">同意</option>
<option value="false">拒绝</option> <option value="false">拒绝</option>
@ -115,7 +115,7 @@
<textarea name="comment" class="form-control"></textarea> <textarea name="comment" class="form-control"></textarea>
</div> </div>
</div> </div>
<input id="purchaseQuoteChildList_cgzg" type="hidden" name="purchaseQuoteChildLists" class="form-control m-b" /> <input id="purchaseQuoteChildList_fzjl" type="hidden" name="purchaseQuoteChildLists" class="form-control m-b" />
</form> </form>
<div class="container"> <div class="container">
<div class="form-row"> <div class="form-row">
@ -204,7 +204,7 @@
} }
}); });
$("#form-purchaseQuote-cgzg-audit").validate({focusCleanup: true}); $("#form-purchaseQuote-fzjl-audit").validate({focusCleanup: true});
$(function() { $(function() {
var options = { var options = {
id:'bootstrap-sub-table-purchaseQuoteChild', id:'bootstrap-sub-table-purchaseQuoteChild',
@ -319,7 +319,7 @@
} else { } else {
// 将子表数据添加到FormData中 // 将子表数据添加到FormData中
$('input[name="purchaseQuoteChildLists"]').val(JSON.stringify(tableData)); $('input[name="purchaseQuoteChildLists"]').val(JSON.stringify(tableData));
var formData = $("#form-purchaseQuote-cgzg-audit").serialize(); var formData = $("#form-purchaseQuote-fzjl-audit").serialize();
// 发送请求 // 发送请求
$.operate.save(prefix + "/complete/" + taskId, formData) $.operate.save(prefix + "/complete/" + taskId, formData)
} }

302
ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/detail.html

@ -3,194 +3,115 @@
<head> <head>
<th:block th:include="include :: header('采购入库单详情')" /> <th:block th:include="include :: header('采购入库单详情')" />
<th:block th:include="include :: datetimepicker-css" /> <th:block th:include="include :: datetimepicker-css" />
<style>
.supplier-value span {
margin-right: 10px;
}
</style>
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-purchaseStorage-detail" th:object="${warehouseStorageOrder}"> <form class="form-horizontal m" id="form-purchaseStorage-detail" th:object="${purchaseStorage}">
<input name="warehouseStorageId" th:field="*{warehouseStorageId}" type="hidden"> <input type="hidden" name="purchaseStorageId" th:field="*{purchaseStorageId}"/>
<div class="form-group">
<label class="col-sm-3 control-label">入库单号:</label>
<div class="col-sm-8">
<input name="warehouseStorageCode" th:field="*{warehouseStorageCode}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">采购单号:</label> <label class="col-sm-3 control-label ">供应商ID</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="relatedOrderCode" th:field="*{relatedOrderCode}" class="form-control" type="text" readonly> <input name="supplierCode" th:field="*{supplierCode}" class="form-control" type="text" readonly>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">入库类型</label> <label class="col-sm-3 control-label is-required">供应商名称</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select name="warehouseStorageType" class="form-control m-b" th:with="type=${@dict.getType('warehouse_storage_type')}" disabled> <input name="supplierName" th:field="*{supplierName}" class="form-control" type="text" required readonly>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{warehouseStorageType}"></option>
</select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">到货时间:</label> <label class="col-sm-3 control-label">到货时间:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group date"> <div class="input-group date">
<input name="arrivedTime" th:value="${#dates.format(warehouseStorageOrder.arrivedTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" readonly disabled> <input name="arrivedTime" class="form-control" placeholder="yyyy-MM-dd" type="text" readonly>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
</div> </div>
<div class="container">
<!--供应商物料相关--> </form>
<div class="row">
<div class="col-sm-12" id="tablesContainer">
<!-- 表格将在这里动态生成 --> <!--物料信息-->
</div> <div class="container">
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div> </div>
</div> </div>
</form> </div>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" /> <th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: bootstrap-table-editable-js" />
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "purchase/purchaseStorage";
var warehouseStorageCode = [[${warehouseStorageOrder.warehouseStorageCode}]];
var warehouseCode = [[${warehouseStorageOrder.warehouseCode}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]]; var processMethodDatas = [[${@dict.getType('processMethod')}]];
var materialUnitDatas = [[${@dict.getType('sys_unit_class')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var warehouseDeptDatas = [[${@dict.getType('warehouseDept')}]]; var warehouseDeptDatas = [[${@dict.getType('warehouseDept')}]];
var prefix = ctx + "purchase/purchaseStorage"; var purchaseStorage = [[${purchaseStorage}]];
$("#form-purchaseStorage-detail").validate({ $("#form-purchaseStorage-detail").validate({ focusCleanup: true});
focusCleanup: true
});
//生成的不同table的id集合
var tableDatas = [];
function submitHandler() { function submitHandler() {
const storageOrderData = $("#form-purchaseStorage-detail").serializeArray().reduce((obj, item) => { if ($.validate.form()) {
obj[item.name] = item.value; $.operate.save(prefix + "/detail", $('#form-purchaseStorage-detail').serialize());
return obj;
}, {});
// 初始化一个数组用于存放所有表格的数据
let allMaterialDataList = [];
for(let i in tableDatas){
$('#' + tableDatas[i]).each(function() {
const tableData = $(this).bootstrapTable('getData');
console.log(JSON.stringify(tableData));
// 将表数据转换成与qualityReportData格式一致的数组
var materialDataList = tableData.map(function (item) {
// 根据实际字段名调整
return {
"supplierCode": item.supplierCode,
"materialNo": item.materialNo,
"materialName": item.materialName,
"materialType": item.materialType,
"materialPhotourl": item.materialPhotourl,
"materialDescribe": item.materialDescribe,
"materialBrand": item.materialBrand,
"materialUnit": item.materialUnit,
"materialProcessMethod": item.materialProcessMethod,
"notifyHasArrivedNum": item.notifyHasArrivedNum,
"actualHasArrivedNum": item.actualHasArrivedNum,
"temporaryHasQualifiedNum": item.temporaryHasQualifiedNum,
"hasStorageNum": item.hasStorageNum,
"notifyArriveNum": item.notifyArriveNum,
"actualArriveNum": item.actualArriveNum,
"temporaryQualifiedNum": item.temporaryQualifiedNum,
"temporaryRemark": item.temporaryRemark,
"temporaryReportUrl": item.temporaryReportUrl,
"storageNum": item.storageNum,
"storageLocation": item.storageLocation,
// ...其他字段
};
});
allMaterialDataList = allMaterialDataList.concat(materialDataList);
});
} }
const combinedData = Object.assign({}, storageOrderData, {
warehouseStorageOrderDetailList: allMaterialDataList
});
// 合并表单数据和表格数据
// const combinedData = Object.assign({}, ...complaintNoticeData.array(item => ({ [item.name]: item.value })), ...materialData);
console.log(combinedData)
// 使用 JSON.stringify() 序列化数据
const jsonData = JSON.stringify(combinedData);
// 发送 AJAX 请求到后端接口
$.operate.saveJson(prefix + "/detail", jsonData);
} }
$("input[name='arrivedTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='deliveryInspectionTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
//物料信息展示列表
$(function() { $(function() {
// 假设qualityOrderCode已经定义或者可以通过某种方式获取到 var options = {
var warehouseStorageCode = [[${warehouseStorageOrder.warehouseStorageCode}]]; // 这里需要实际赋值,比如从前端某个地方读取 modalName: "选择物料",
url: prefix + "/selectStorageChildMaterialList",
$.getJSON(prefix + "/storagePurchaseDetailList?warehouseStorageCode=" + warehouseStorageCode, function(data) { queryParams: queryParams,
for (var supplierCode in data) { showSearch: false,
if (data.hasOwnProperty(supplierCode)) { showRefresh: false,
var supplierData = data[supplierCode]; showToggle: false,
createTableForSupplier(supplierCode, supplierData); showColumns: false,
} pagination: false, // 设置不分页
}
});
});
function createTableForSupplier(supplierCode, supplierData) {
var tableId = 'bootstrap-table-' + supplierCode.replace(/[^a-z0-9]/gi, '_').toLowerCase();
tableDatas.push(tableId);
var $tableWrapper = $('<div class="table-responsive mt-3"></div>');
// 确保supplierData至少有一条记录,并从中提取供应商详细信息
var supplierInfo = supplierData.length > 0 ? supplierData[0] : {}; // 默认为空对象,以防数据不存在
// 构建含有额外供应商信息的标题字符串
var headerTitle ='供应商'+'</br>'+supplierCode + ' - ' + (supplierInfo.supplierName || 'N/A');
var $header = $('<h4>' + headerTitle + '</h4>');
var $table = $('<table id="' + tableId + '" class="table table-striped table-bordered"></table>');
$table.bootstrapTable({
data: supplierData,
columns: [{ columns: [{
checkbox: true checkbox: true
}, },
{ {
title: '供应商ID', title: '采购入库单子表id',
field: 'supplierCode', field: 'purchaseStorageChildId',
visible: false visible: false
}, },
{ {
title: '料号', title: '料号',
field: 'materialNo' field: 'materialNo',
}, {
title: '物料名称',
field: 'materialName'
}, },
{ {
title: '物料类型', title: '物料名称',
field: 'materialType', field: 'materialName',
formatter: function (value, row, index) {
return $.table.selectDictLabel(materialTypeDatas, value);
}
}, },
{ {
title: '物料图片地址', title: '物料图片地址',
field: 'materialPhotourl', field: 'materialPhotourl',
}, },
{ {
title: '物料描述', title: '物料型号',
field: 'materialDescribe', field: 'materialModel',
},
{
title: '物料类型',
field: 'materialType',
formatter: function(value, row, index) {
return $.table.selectCategoryLabel(materialTypeDatas, value);
}
}, },
{ {
title: '物料品牌', title: '物料品牌',
@ -199,100 +120,55 @@
{ {
title: '物料单位', title: '物料单位',
field: 'materialUnit', field: 'materialUnit',
formatter:function (value) {
return $.table.selectDictLabel(materialUnitDatas, value);
}
},
{
title: '物料描述',
field: 'materialDescribe',
}, },
{ {
title: '物料加工方式', title: '物料加工方式',
field: 'materialProcessMethod', field: 'materialProcessMethod',
formatter: function (value, row, index) { formatter:function (value) {
return $.table.selectDictLabel(processMethodDatas, value); return $.table.selectDictLabel(processMethodDatas, value);
} }
}, },
{ {
title: '通知已到货数', title: '物料入库部门',
field: 'notifyHasArrivedNum', field: 'materialDeptType',
formatter:function (value) {
return $.table.selectDictLabel(warehouseDeptDatas, value);
}
}, },
{ {
title: '已入库数', title: '通知已到货数量',
field: 'hasStorageNum', field: 'notifyHasArrivedNum',
}, },
{ {
title: '通知到货数', title: '实际到货数量',
field: 'notifyArriveNum', field: 'actualArriveNum',
}, },
] ]
}); };
$.table.init(options);
$tableWrapper.append($header).append($table); })
$('#tablesContainer').append($tableWrapper);
function queryParams(params) {
var curParams = {
// 传递参数查询参数
warehouseStorageCode: purchaseStorage.warehouseStorageCode
};
return curParams;
} }
$("input[name='arrivedTime']").datetimepicker({
//根据仓库ID查询仓库名称 format: "yyyy-mm-dd",
$(document).ready(function() { minView: "month",
// 初始化时默认加载仓库ID列表 autoclose: true,
loadWarehouseCodes(); }).datetimepicker("update", new Date());;
// 监听仓库ID下拉框的变化
$('#warehouseCode').on('change', function() {
var selectedWarehouseCode = $(this).val(); // 获取选中的仓库ID
if (selectedWarehouseCode) {
// 发起Ajax请求获取仓库名称
$.ajax({
type: 'GET',
url: ctx +'stock/stockInfo/getStockNameByWarehouseCode/' + selectedWarehouseCode,
dataType: 'json', // 假设返回的数据格式是JSON
success: function(data) {
console.log(data);
// 将获取到的仓库名称填充到输入框
if(data.data == null){
// 如果返回的数据有问题,可以给出提示或处理
$.modal.alertWarning('未能获取到仓库名称!');
}
$('input[name="warehouseName"]').val(data.data.stockname);
},
error: function(jqXHR, textStatus, errorThrown) {
console.error('Error:', textStatus, errorThrown);
$.modal.alertWarning('查询仓库名称时发生错误!');
}
});
} else {
// 如果没有选择仓库ID,清空仓库名称输入框
$('input[name="warehouseName"]').val('');
}
});
});
// 加载仓库Id列表函数
function loadWarehouseCodes() {
var url = ctx + 'stock/stockInfo/getAllWarehouseCode';
$.ajax({
type: 'GET', // 请求类型
url: url, // 后端接口URL
dataType: 'json', // 预期服务器返回的数据类型
success: function(data) {
if (data && Array.isArray(data)) {
var selectElement = $('#warehouseCode'); // 获取仓库编号下拉框元素
// 清空下拉框现有选项
selectElement.empty();
// 添加默认选项(如果需要)编辑时不需要添加默认选项
// selectElement.append('<option value="">所有</option>');
// 遍历返回的数据,添加为下拉框的选项
$.each(data, function(index, item) {
// 仓库ID
selectElement.append('<option value="' + item.stockNO + '">' + item.stockNO + '</option>');
});
// $('#warehouseCode').val(stockNO);
} else {
$.modal.errMsg("数据为空");
}
}
});
}
</script> </script>
</body> </body>

450
ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/purchaseStorage.html

@ -1,196 +1,282 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head> <head>
<th:block th:include="include :: header('采购入库通知单列表')" /> <th:block th:include="include :: header('采购入库单列表')" />
</head> </head>
<body class="gray-bg"> <body class="gray-bg">
<div class="container-div"> <div class="container-div">
<div class="row"> <div class="row">
<div class="col-sm-12 search-collapse"> <div class="col-sm-12 search-collapse">
<form id="formId"> <form id="formId">
<div class="select-list"> <div class="select-list">
<ul> <ul>
<li> <li>
<label>入库单号:</label> <label>入库单号:</label>
<input type="text" name="warehouseStorageCode"/> <input type="text" name="warehouseStorageCode"/>
</li> </li>
<li> <li>
<label>入库状态:</label> <label>关联订单号:</label>
<select name="warehouseStorageStatus" th:with="type=${@dict.getType('warehouse_storage_status')}"> <input type="text" name="relatedOrderCode"/>
<option value="">所有</option> </li>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <li>
</select> <label>入库状态:</label>
</li> <select name="warehouseStorageStatus" th:with="type=${@dict.getType('warehouse_storage_status')}">
<li> <option value="">所有</option>
<label>品质状态:</label> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
<select name="warehouseQualityStatus" th:with="type=${@dict.getType('warehouse_quality_status')}"> </select>
<option value="">所有</option> </li>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <li>
</select> <label>品质状态:</label>
</li> <select name="warehouseQualityStatus" th:with="type=${@dict.getType('warehouse_quality_status')}">
<li> <option value="">所有</option>
<label>关联订单号:</label> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
<input type="text" name="relatedOrderCode"/> </select>
</li> </li>
<li>
<li> <label>入库类型:</label>
<label>仓库员:</label> <select name="warehouseStorageType" th:with="type=${@dict.getType('warehouse_storage_type')}">
<input type="text" name="warehouseEmployee"/> <option value="">所有</option>
</li> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
<li> </select>
<label>入库部门:</label> </li>
<select name="warehouseDeptType" th:with="type=${@dict.getType('warehouse_dept_type')}"> <li>
<option value="">所有</option> <label>订单类型:</label>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <select name="warehouseOrderType" th:with="type=${@dict.getType('storage_order_type')}">
</select> <option value="">所有</option>
</li> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
<li class="select-time"> </select>
<label>录入时间:</label> </li>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/> <li>
<span>-</span> <label>入库部门类型:</label>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/> <select name="warehouseDeptType" th:with="type=${@dict.getType('warehouse_dept_type')}">
</li> <option value="">所有</option>
<li> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> </select>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a> </li>
</li> <li>
</ul> <label>供应商ID:</label>
</div> <input type="text" name="supplierCode"/>
</form> </li>
</div> <li>
<label>供应商名称:</label>
<input type="text" name="supplierName"/>
</li>
<li class="select-time">
<label>录入时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
</li>
<li>
<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"> <div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="purchase:purchaseStorage:export"> <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="purchase:purchaseStorage:add">
<i class="fa fa-download"></i> 导出 <i class="fa fa-plus"></i> 添加
</a> </a>
</div> <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="purchase:purchaseStorage:edit">
<div class="col-sm-12 select-table table-striped"> <i class="fa fa-edit"></i> 修改
<table id="bootstrap-table"></table> </a>
</div> <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="purchase:purchaseStorage:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="purchase:purchaseStorage: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> </div>
<th:block th:include="include :: footer" /> </div>
<script th:inline="javascript"> <th:block th:include="include :: footer" />
var editFlag = [[${@permission.hasPermi('purchase:purchaseStorage:edit')}]]; <script th:inline="javascript">
var detailFlag = [[${@permission.hasPermi('purchase:purchaseStorage:detail')}]]; var editFlag = [[${@permission.hasPermi('purchase:purchaseStorage:edit')}]];
var removeFlag = [[${@permission.hasPermi('purchase:purchaseStorage:remove')}]];
var cancelFlag = [[${@permission.hasPermi('purchase:purchaseStorage:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('purchase:purchaseStorage:restore')}]];
var warehouseStorageStatusDatas = [[${@dict.getType('warehouse_storage_status')}]];
var warehouseQualityStatusDatas = [[${@dict.getType('warehouse_quality_status')}]];
var warehouseStorageTypeDatas = [[${@dict.getType('warehouse_storage_type')}]];
var warehouseOrderTypeDatas = [[${@dict.getType('storage_order_type')}]];
var warehouseDeptTypeDatas = [[${@dict.getType('warehouse_dept_type')}]];
var prefix = ctx + "purchase/purchaseStorage";
$(function() {
// var storageStatusDatas = [[${@dict.getType('eceiptStatus')}]]; var options = {
// var qualityStatusDatas = [[${@dict.getType('qualityStatus')}]]; url: prefix + "/list",
// var purchaseStorageTypeDatas = [[${@dict.getType('purchase_storage_type')}]]; createUrl: prefix + "/add",
// var purchaseOrderTypeDatas = [[${@dict.getType('sys_order_type')}]]; updateUrl: prefix + "/edit/{id}",
// var purchaseDeptTypeDatas = [[${@dict.getType('warehouseDept')}]]; removeUrl: prefix + "/remove",
var warehouseStorageStatusDatas = [[${@dict.getType('warehouse_storage_status')}]]; cancelUrl: prefix + "/cancel/{id}",
var warehouseQualityStatusDatas = [[${@dict.getType('warehouse_quality_status')}]]; restoreUrl: prefix + "/restore/{id}",
var warehouseStorageTypeDatas = [[${@dict.getType('warehouse_storage_type')}]]; exportUrl: prefix + "/export",
var warehouseOrderTypeDatas = [[${@dict.getType('storage_order_type')}]]; modalName: "采购入库单",
var warehouseDeptTypeDatas = [[${@dict.getType('warehouse_dept_type')}]]; fixedColumns: true, // 启用冻结列
var prefix = ctx + "purchase/purchaseStorage"; fixedRightNumber: 1, // 冻结右列个数
$(function() { sortable: true, // 是否启用排序
var options = { sortStable: true,
url: prefix + "/list", columns: [{
createUrl: prefix + "/add", checkbox: true
updateUrl: prefix + "/edit/{id}", },
removeUrl: prefix + "/remove", {
cancelUrl: prefix + "/cancel/{id}", title: '采购入库单id',
restoreUrl: prefix + "/restore/{id}", field: 'purchaseStorageId',
exportUrl: prefix + "/export", visible: false
modalName: "采购入库通知单", },
fixedColumns: true, // 启用冻结列 {
fixedRightNumber: 1, // 冻结右列个数 title: '入库单号',
columns: [ field: 'warehouseStorageCode',
{checkbox: true}, },
{title: '入库单id',field: 'warehouseStorageId',visible: false}, {
{title: '入库单号',field: 'warehouseStorageCode',}, title: '关联订单号',
{title: '关联订单号',field: 'relatedOrderCode',}, field: 'relatedOrderCode',
{ },
title: '入库状态', {
field: 'warehouseStorageStatus', title: '入库状态',
formatter: function(value, row, index) { field: 'warehouseStorageStatus',
return $.table.selectDictLabel(warehouseStorageStatusDatas, value); formatter: function(value, row, index) {
} return $.table.selectDictLabel(warehouseStorageStatusDatas, value);
},
{
title: '品质状态',
field: 'warehouseQualityStatus',
formatter: function(value, row, index) {
return $.table.selectDictLabel(warehouseQualityStatusDatas, value);
}
},
{
title: '入库类型',
field: 'warehouseStorageType',
formatter: function(value, row, index) {
return $.table.selectDictLabel(warehouseStorageTypeDatas, value);
}
},
{
title: '订单类型',
field: 'warehouseOrderType',
formatter: function(value, row, index) {
return $.table.selectDictLabel(warehouseOrderTypeDatas, value);
}
},
{
title: '入库部门',
field: 'warehouseDeptType',
formatter: function(value, row, index) {
return $.table.selectDictLabel(warehouseDeptTypeDatas, value);
}
},
{
title: '通知已到货数',
field: 'notifyHasArrivedNum',
},
{
title: '通知到货数',
field: 'notifyArriveNum',
},
{title: '实际已到货数量',field: 'actualArrivedNum',},
{title: '暂收合格数量',field: 'temporaryQualifiedNum',},
{title: '暂收不合格数量',field: 'temporaryUnqualifiedNum',},
{title: '品质合格数量',field: 'qualityQualifiedNum',},
{title: '入库数量',field: 'storageNum',},
{title: '到货时间',field: 'arrivedTime',},
{title: '暂收时间',field: 'temporaryTime',},
{title: '交检时间',field: 'deliveryInspectionTime',},
{title: '品质时间',field: 'qualityTime',},
{title: '入库时间',field: 'storageTime',},
{
title: '仓库员',
field: 'warehouseEmployee',
},
{
title: '仓库ID',
field: 'warehouseCode',
},
{
title: '仓库名称',
field: 'warehouseName',
},
{title: '录入时间',field: 'createTime',},
{title: '录入人',field: 'createBy',},
{title: '更新人',field: 'updateBy', },
{title: '上次更新时间',field: 'updateTime', },
{title: '操作',align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="detail(\'' + row.warehouseStorageId + '\')"><i class="fa fa-edit"></i>详情</a> ');
return actions.join('');
}
} }
] },
}; {
$.table.init(options); title: '品质状态',
}); field: 'warehouseQualityStatus',
formatter: function(value, row, index) {
/*详情*/ return $.table.selectDictLabel(warehouseQualityStatusDatas, value);
function detail(warehouseStorageId){ }
var url = ctx + 'purchase/purchaseStorage/detail/' + warehouseStorageId; },
$.modal.open("详情",url); {
title: '入库类型',
field: 'warehouseStorageType',
formatter: function(value, row, index) {
return $.table.selectDictLabel(warehouseStorageTypeDatas, value);
}
},
{
title: '订单类型',
field: 'warehouseOrderType',
formatter: function(value, row, index) {
return $.table.selectDictLabel(warehouseOrderTypeDatas, value);
}
},
{
title: '入库部门类型',
field: 'warehouseDeptType',
formatter: function(value, row, index) {
return $.table.selectDictLabel(warehouseDeptTypeDatas, value);
}
},
{
title: '供应商ID',
field: 'supplierCode',
},
{
title: '供应商名称',
field: 'supplierName',
},
{
title: '通知已到货数量',
field: 'notifyArrivedSum',
},
{
title: '实际已到货数量',
field: 'actualArrivedSum',
},
{
title: '暂收合格数量',
field: 'temporaryQualifiedSum',
},
{
title: '暂收不合格数量',
field: 'temporaryUnqualifiedSum',
},
{
title: '品质合格数量',
field: 'qualityQualifiedSum',
},
{
title: '退换货数',
field: 'refundsExchangesSum',
},
{
title: '入库数量',
field: 'storageSum',
},
{
title: '到货时间',
field: 'arrivedTime',
},
{
title: '暂收时间',
field: 'temporaryTime',
},
{
title: '交付质检时间',
field: 'deliveryInspectionTime',
},
{
title: '品质时间',
field: 'qualityTime',
},
{
title: '入库时间',
field: 'storageTime',
},
{
title: '仓库员工',
field: 'warehouseEmployee',
},
{
title: '仓库ID',
field: 'warehouseCode',
},
{
title: '仓库名称',
field: 'warehouseName',
},
{
title: '录入时间',
field: 'createTime',
sortable: true
},
{
title: '录入人',
field: 'createBy',
},
{
title: '更新人',
field: 'updateBy',
},
{
title: '上次更新时间',
field: 'updateTime',
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a href="javascript:void(0)" onclick="detail(\'' + row.purchaseStorageId + '\')"><i class="fa fa-edit"></i>详情</a> ');
var actionLinks = actions.join('');
return $.table.dropdownToggle(actionLinks);
}
}]
}; };
$.table.init(options);
});
</script> //详情
function detail(purchaseStorageId) {
var url = prefix + "/detail/" + purchaseStorageId;
$.modal.open("详情", url);
}
</script>
</body> </body>
</html> </html>

78
ruoyi-admin/src/main/resources/templates/system/supplier/supplier.html

@ -28,21 +28,24 @@
</li> </li>
<li> <li>
<label>供应商类型:</label> <label>供应商类型:</label>
<select name="supplierType" th:with="type=${@dict.getType('supplier_status')}"> <select name="supplierType" th:with="type=${@dict.getType('sys_supplier_type')}">
<option value="">所有</option> <option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select> </select>
</li> </li>
<li> <li>
<label>使用状态</label> <label>供应商资质</label>
<select name="useStatus" th:with="type=${@dict.getType('useStatus')}"> <select name="supplierQualification" th:with="type=${@dict.getType('sys_supplier_qualification')}">
<option value="">所有</option> <option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select> </select>
</li> </li>
<li> <li>
<label>采购员:</label> <label>使用状态:</label>
<select name="purchaseBuyer" ></select> <select name="useStatus" th:with="type=${@dict.getType('useStatus')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li> </li>
<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-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
@ -57,6 +60,9 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:supplier:add"> <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:supplier:add">
<i class="fa fa-plus"></i> 添加 <i class="fa fa-plus"></i> 添加
</a> </a>
<a class="btn btn-success" onclick="$.table.exportExcel()" shiro:hasPermission="system:supplier:export">
<i class="fa fa-download"></i> 导出
</a>
</div> </div>
<div class="col-sm-12 select-table table-striped"> <div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" style="white-space:nowrap"></table> <table id="bootstrap-table" style="white-space:nowrap"></table>
@ -92,50 +98,48 @@
removeUrl: prefix + "/remove", removeUrl: prefix + "/remove",
exportUrl: prefix + "/export", exportUrl: prefix + "/export",
detailUrl: prefix + "/detail/{id}", detailUrl: prefix + "/detail/{id}",
search: false,
showExport: true,
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
showExport: false,
showExport: true,
showColumns: true,
showToggle: true,
clickToSelect: true,
modalName: "供应商资料", modalName: "供应商资料",
fixedColumns:true, fixedColumns:true,
fixedRightNumber:1, fixedRightNumber:1,
columns: [{checkbox: true}, columns: [{checkbox: true},
{title: '供应商id',field: 'supplierId',visible: false}, {title: '供应商id',field: 'supplierId',visible: false},
{title: '审核状态',field: 'auditStatus',formatter: function(value, row, index) {
return $.table.selectDictLabel(auditStatusDatas, value);
}},
{title: '使用状态',field: 'useStatus',formatter: function(value, row, index) {
return $.table.selectDictLabel(useStatusDatas, value);
}},
{title: '流程实例ID',field: 'instanceId',visible: false}, {title: '流程实例ID',field: 'instanceId',visible: false},
{ title: '流程提交实例ID',field: 'submitInstanceId',visible: false}, { title: '流程提交实例ID',field: 'submitInstanceId',visible: false},
{ title:'流程作废实例ID',field: 'cancelInstanceId',visible: false}, { title:'流程作废实例ID',field: 'cancelInstanceId',visible: false},
{title: '流程恢复实例ID',field: 'restoreInstanceId', visible: false}, {title: '流程恢复实例ID',field: 'restoreInstanceId', visible: false},
{ title: '流程实例类型', field: 'instanceTypeName',visible: false}, { title: '流程实例类型', field: 'instanceTypeName',visible: false},
{title: '申请人ID',field: 'applyUser', visible: false}, {title: '申请人ID',field: 'applyUser', visible: false},
{title: '审核状态',field: 'auditStatus',visible: false,formatter: function(value, row, index) {
return $.table.selectDictLabel(auditStatusDatas, value);
}},
{ {
field: 'applyUserName', field: 'applyUserName',
title: '<span style="color: red;">申请人</span>', title: '<span style="color: red;">申请人</span>',
visible: false,
formatter: function(value, row, index) { formatter: function(value, row, index) {
return '<span style="color: red;">' + (value ? value : "-") + '</span>'; return '<span style="color: red;">' + (value ? value : "-") + '</span>';
} }
}, },
{field: 'applyTime',title: '申请时间'},
{title: '当前任务ID',field: 'taskId',visible: false}, {title: '当前任务ID',field: 'taskId',visible: false},
{ title: '待办用户ID',field: 'todoUserId', visible: false}, { title: '待办用户ID',field: 'todoUserId', visible: false},
{ title: '当前任务名称',field: 'taskName', { title: '当前任务名称',field: 'taskName', visible: false,
align: 'center', align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
return '<span class="badge badge-primary">' + value + '</span>'; return '<span class="badge badge-primary">' + value + '</span>';
} }
}, },
{title: '当前状态',field: 'taskStatus', align: 'center',
formatter: function(value, row, index) {
if(row.auditStatus!="1"&&value != "未启动"){
return '<span class="badge badge-danger">' + value + '</span>';
}
if(value === "未启动"){
return '<span class="badge badge-primary">' + value + '</span>';
}
return '<span class="badge badge-primary">' + value + '</span>';}
},
{ title: '供应商编号',field: 'supplierCode'}, { title: '供应商编号',field: 'supplierCode'},
{title: '供应商名称',field: 'supplierName'}, {title: '供应商名称',field: 'supplierName'},
{title: '供应商类型',field: 'supplierType',formatter: function(value, row, index) { {title: '供应商类型',field: 'supplierType',formatter: function(value, row, index) {
@ -197,6 +201,13 @@
} }
} }
}, },
{field: 'applyTime',title: '申请时间'},
{title: '使用状态',field: 'useStatus',formatter: function(value, row, index) {
return $.table.selectDictLabel(useStatusDatas, value);
}},
{ {
field: 'updateInfoTime', field: 'updateInfoTime',
title: '上次修改时间', title: '上次修改时间',
@ -216,17 +227,17 @@
var actions = []; var actions = [];
if(row.auditStatus=="1" && row.useStatus=="1" && !row.cancelInstanceId) { 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.supplierId + '\')"><i class="fa fa-remove"></i> 作废</a>'); actions.push('<a href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.supplierId + '\')"><i class="fa fa-remove"></i> 作废</a>');
// 编辑 // 编辑
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.supplierId + '\')"><i class="fa fa-edit"></i> 编辑</a> '); actions.push('<a href="javascript:void(0)" onclick="$.operate.edit(\'' + row.supplierId + '\')"><i class="fa fa-edit"></i> 编辑</a> ');
// 已作废 // 已作废
}else{ }else{
actions.push('<a class="btn btn-default btn-xs" href="javascript:void(0)" disabled><i class="fa fa-edit"></i> 编辑</a> '); actions.push('<a href="javascript:void(0)" disabled><i class="fa fa-edit"></i> 编辑</a> ');
} }
// 有流程实例id // 有流程实例id
if(row.useStatus=="2" && !row.restoreInstanceId){ if(row.useStatus=="2" && !row.restoreInstanceId){
// 恢复 // 恢复
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.supplierId + '\')"><i class="fa fa-window-restore"></i> 恢复</a> '); actions.push('<a href="javascript:void(0)" onclick="$.operate.restore(\'' + row.supplierId + '\')"><i class="fa fa-window-restore"></i> 恢复</a> ');
} }
// 有流程实例id // 有流程实例id
if (row.instanceId) { if (row.instanceId) {
@ -235,17 +246,18 @@
var todoUserIdList = row.todoUserId.split(","); var todoUserIdList = row.todoUserId.split(",");
if(todoUserIdList.includes(loginName)){ if(todoUserIdList.includes(loginName)){
var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批'; 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.supplierId + '\')"><i class="fa fa-eye"></i> 详情</a> '); actions.push('<a href="javascript:void(0)" onclick="$.operate.detail(\'' + row.supplierId + '\')"><i class="fa fa-eye"></i> 详情</a> ');
return actions.join(''); var actionLinks = actions.join('');
return $.table.dropdownToggle(actionLinks);
} }
} }
], ],

10
ruoyi-admin/src/main/resources/templates/system/supplier/taskCgzgVerify.html → ruoyi-admin/src/main/resources/templates/system/supplier/taskFzjlVerify.html

@ -8,7 +8,7 @@
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-supplier-cgzg-audit" th:object="${formData}"> <form class="form-horizontal m" id="form-supplier-fzjl-audit" th:object="${formData}">
<input name="supplierId" th:field="*{supplierId}" type="hidden"> <input name="supplierId" th:field="*{supplierId}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden"> <input name="taskId" th:field="*{taskId}" type="hidden">
<input name="taskName" th:field="*{taskName}" type="hidden"> <input name="taskName" th:field="*{taskName}" type="hidden">
@ -328,9 +328,9 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label" for="cgzgVerifyApproved"><span style="color: red; ">*</span>审批意见:</label> <label class="col-sm-3 control-label" for="fzjlVerifyApproved"><span style="color: red; ">*</span>审批意见:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select name="p_B_cgzgVerifyApproved" id="cgzgVerifyApproved" class="form-control m-b" required> <select name="p_B_fzjlVerifyApproved" id="fzjlVerifyApproved" class="form-control m-b" required>
<option value=""></option> <option value=""></option>
<option value="true">同意</option> <option value="true">同意</option>
<option value="false">拒绝</option> <option value="false">拒绝</option>
@ -354,14 +354,14 @@
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script> <script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "system/supplier"; var prefix = ctx + "system/supplier";
$("#form-supplier-cgzg-audit").validate({focusCleanup: true}); $("#form-supplier-fzjl-audit").validate({focusCleanup: true});
function submitHandler() { function submitHandler() {
var taskId = [[${taskId}]]; var taskId = [[${taskId}]];
if ($.validate.form()) { if ($.validate.form()) {
if ($('textarea[name="comment"]').val()) { if ($('textarea[name="comment"]').val()) {
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val()); $('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
} }
var formData = $("#form-supplier-cgzg-audit").serialize(); var formData = $("#form-supplier-fzjl-audit").serialize();
$.operate.save(prefix + "/complete/" + taskId,formData); $.operate.save(prefix + "/complete/" + taskId,formData);
} }
} }
Loading…
Cancel
Save