Browse Source

[feat]采购:新增采购计划物料清单表,修改采购计划单,采购报价

dev
zhangsiqi 6 months ago
parent
commit
453216006b
  1. 151
      ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchasePlanChildController.java
  2. 34
      ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchasePlanController.java
  3. 59
      ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteChildController.java
  4. 16
      ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteController.java
  5. 261
      ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchasePlanChild.java
  6. 8
      ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseQuote.java
  7. 6
      ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseQuoteChild.java
  8. 77
      ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchasePlanChildMapper.java
  9. 22
      ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseQuoteChildMapper.java
  10. 75
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchasePlanChildService.java
  11. 22
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteChildService.java
  12. 126
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchasePlanChildServiceImpl.java
  13. 126
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteChildServiceImpl.java
  14. 19
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java
  15. 126
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysPurchaseQuoteChildServiceImpl.java
  16. 154
      ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanChildMapper.xml
  17. 81
      ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteChildMapper.xml
  18. 4
      ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/add.html
  19. 119
      ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/detail.html
  20. 0
      ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/edit.html
  21. 165
      ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/purchasePlan.html
  22. 138
      ruoyi-admin/src/main/resources/templates/purchase/purchasePlanChild/add.html
  23. 133
      ruoyi-admin/src/main/resources/templates/purchase/purchasePlanChild/edit.html
  24. 142
      ruoyi-admin/src/main/resources/templates/purchase/purchasePlanChild/purchasePlanChild.html
  25. 42
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/add.html
  26. 150
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/edit.html
  27. 2
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuoteChild/add.html
  28. 2
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuoteChild/edit.html
  29. 2
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuoteChild/purchaseQuoteChild.html

151
ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchasePlanChildController.java

@ -0,0 +1,151 @@
package com.ruoyi.purchase.controller;
import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.purchase.domain.PurchasePlanChild;
import com.ruoyi.purchase.service.IPurchasePlanChildService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 采购计划单物料信息Controller
*
* @author zhang
* @date 2024-05-16
*/
@Controller
@RequestMapping("/purchase/purchasePlanChild")
public class PurchasePlanChildController extends BaseController
{
private String prefix = "purchase/purchasePlanChild";
@Autowired
private IPurchasePlanChildService purchasePlanChildService;
@RequiresPermissions("purchase:purchasePlanChild:view")
@GetMapping()
public String purchasePlanChild()
{
return prefix + "/purchasePlanChild";
}
/**
* 查询采购计划单物料信息列表
*/
@RequiresPermissions("purchase:purchasePlanChild:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(PurchasePlanChild purchasePlanChild)
{
startPage();
List<PurchasePlanChild> list = purchasePlanChildService.selectPurchasePlanChildList(purchasePlanChild);
return getDataTable(list);
}
/**
* 导出采购计划单物料信息列表
*/
@RequiresPermissions("purchase:purchasePlanChild:export")
@Log(title = "采购计划单物料信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(PurchasePlanChild purchasePlanChild)
{
List<PurchasePlanChild> list = purchasePlanChildService.selectPurchasePlanChildList(purchasePlanChild);
ExcelUtil<PurchasePlanChild> util = new ExcelUtil<PurchasePlanChild>(PurchasePlanChild.class);
return util.exportExcel(list, "采购计划单物料信息数据");
}
/**
* 新增采购计划单物料信息
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存采购计划单物料信息
*/
@RequiresPermissions("purchase:purchasePlanChild:add")
@Log(title = "采购计划单物料信息", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(PurchasePlanChild purchasePlanChild)
{
return toAjax(purchasePlanChildService.insertPurchasePlanChild(purchasePlanChild));
}
/**
* 修改采购计划单物料信息
*/
@GetMapping("/edit/{purchasePlanChildId}")
public String edit(@PathVariable("purchasePlanChildId") Long purchasePlanChildId, ModelMap mmap)
{
PurchasePlanChild purchasePlanChild = purchasePlanChildService.selectPurchasePlanChildById(purchasePlanChildId);
mmap.put("purchasePlanChild", purchasePlanChild);
return prefix + "/edit";
}
/**
* 修改保存采购计划单物料信息
*/
@RequiresPermissions("purchase:purchasePlanChild:edit")
@Log(title = "采购计划单物料信息", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(PurchasePlanChild purchasePlanChild)
{
return toAjax(purchasePlanChildService.updatePurchasePlanChild(purchasePlanChild));
}
/**
* 删除采购计划单物料信息
*/
@RequiresPermissions("purchase:purchasePlanChild:remove")
@Log(title = "采购计划单物料信息", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(purchasePlanChildService.deletePurchasePlanChildByIds(ids));
}
/**
* 作废采购计划单物料信息
*/
@RequiresPermissions("purchase:purchasePlanChild:cancel")
@Log(title = "采购计划单物料信息", businessType = BusinessType.CANCEL)
@GetMapping( "/cancel/{id}")
@ResponseBody
public AjaxResult cancel(@PathVariable("id") Long id){
return toAjax(purchasePlanChildService.cancelPurchasePlanChildById(id));
}
/**
* 恢复采购计划单物料信息
*/
@RequiresPermissions("purchase:purchasePlanChild:restore")
@Log(title = "采购计划单物料信息", businessType = BusinessType.RESTORE)
@GetMapping( "/restore/{id}")
@ResponseBody
public AjaxResult restore(@PathVariable("id")Long id)
{
return toAjax(purchasePlanChildService.restorePurchasePlanChildById(id));
}
}

34
ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchasePlanController.java

@ -27,25 +27,25 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @date 2024-04-15
*/
@Controller
@RequestMapping("/purchase/plan")
@RequestMapping("/purchase/purchasePlan")
public class PurchasePlanController extends BaseController
{
private String prefix = "purchase/plan";
private String prefix = "purchase/purchasePlan";
@Autowired
private IPurchasePlanService purchasePlanService;
@RequiresPermissions("purchase:plan:view")
@RequiresPermissions("purchase:purchasePlan:view")
@GetMapping()
public String plan()
public String purchasePlan()
{
return prefix + "/plan";
return prefix + "/purchasePlan";
}
/**
* 查询采购计划单列表
*/
@RequiresPermissions("purchase:plan:list")
@RequiresPermissions("purchase:purchasePlan:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(PurchasePlan purchasePlan)
@ -58,7 +58,7 @@ public class PurchasePlanController extends BaseController
/**
* 导出采购计划单列表
*/
@RequiresPermissions("purchase:plan:export")
@RequiresPermissions("purchase:purchasePlan:export")
@Log(title = "采购计划单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
@ -81,7 +81,7 @@ public class PurchasePlanController extends BaseController
/**
* 新增保存采购计划单
*/
@RequiresPermissions("purchase:plan:add")
@RequiresPermissions("purchase:purchasePlan:add")
@Log(title = "采购计划单", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
@ -100,11 +100,17 @@ public class PurchasePlanController extends BaseController
mmap.put("purchasePlan", purchasePlan);
return prefix + "/edit";
}
@GetMapping("/detail/{purchasePlanId}")
public String detail(@PathVariable("purchasePlanId") Long purchasePlanId, ModelMap mmap)
{
PurchasePlan purchasePlan = purchasePlanService.selectPurchasePlanById(purchasePlanId);
mmap.put("purchasePlan", purchasePlan);
return prefix + "/detail";
}
/**
* 修改保存采购计划单
*/
@RequiresPermissions("purchase:plan:edit")
@RequiresPermissions("purchase:purchasePlan:edit")
@Log(title = "采购计划单", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
@ -116,7 +122,7 @@ public class PurchasePlanController extends BaseController
/**
* 删除采购计划单
*/
@RequiresPermissions("purchase:plan:remove")
@RequiresPermissions("purchase:purchasePlan:remove")
@Log(title = "采购计划单", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
@ -128,7 +134,7 @@ public class PurchasePlanController extends BaseController
/**
* 作废采购计划单
*/
@RequiresPermissions("purchase:plan:cancel")
@RequiresPermissions("purchase:purchasePlan:cancel")
@Log(title = "采购计划单", businessType = BusinessType.CANCEL)
@GetMapping( "/cancel/{id}")
@ResponseBody
@ -139,7 +145,7 @@ public class PurchasePlanController extends BaseController
/**
* 恢复采购计划单
*/
@RequiresPermissions("purchase:plan:restore")
@RequiresPermissions("purchase:purchasePlan:restore")
@Log(title = "采购计划单", businessType = BusinessType.RESTORE)
@GetMapping( "/restore/{id}")
@ResponseBody
@ -147,6 +153,4 @@ public class PurchasePlanController extends BaseController
{
return toAjax(purchasePlanService.restorePurchasePlanById(id));
}
}

59
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysPurchaseQuoteChildController.java → ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteChildController.java

@ -1,6 +1,7 @@
package com.ruoyi.system.controller;
package com.ruoyi.purchase.controller;
import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -12,8 +13,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.SysPurchaseQuoteChild;
import com.ruoyi.system.service.ISysPurchaseQuoteChildService;
import com.ruoyi.purchase.domain.PurchaseQuoteChild;
import com.ruoyi.purchase.service.IPurchaseQuoteChildService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
@ -26,15 +27,15 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @date 2024-05-15
*/
@Controller
@RequestMapping("/system/purchaseQuoteChild")
public class SysPurchaseQuoteChildController extends BaseController
@RequestMapping("/purchase/purchaseQuoteChild")
public class PurchaseQuoteChildController extends BaseController
{
private String prefix = "system/purchaseQuoteChild";
private String prefix = "purchase/purchaseQuoteChild";
@Autowired
private ISysPurchaseQuoteChildService sysPurchaseQuoteChildService;
private IPurchaseQuoteChildService purchaseQuoteChildService;
@RequiresPermissions("system:purchaseQuoteChild:view")
@RequiresPermissions("purchase:purchaseQuoteChild:view")
@GetMapping()
public String purchaseQuoteChild()
{
@ -44,27 +45,27 @@ public class SysPurchaseQuoteChildController extends BaseController
/**
* 查询采购报价单物料信息列表
*/
@RequiresPermissions("system:purchaseQuoteChild:list")
@RequiresPermissions("purchase:purchaseQuoteChild:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(SysPurchaseQuoteChild sysPurchaseQuoteChild)
public TableDataInfo list(PurchaseQuoteChild purchaseQuoteChild)
{
startPage();
List<SysPurchaseQuoteChild> list = sysPurchaseQuoteChildService.selectSysPurchaseQuoteChildList(sysPurchaseQuoteChild);
List<PurchaseQuoteChild> list = purchaseQuoteChildService.selectPurchaseQuoteChildList(purchaseQuoteChild);
return getDataTable(list);
}
/**
* 导出采购报价单物料信息列表
*/
@RequiresPermissions("system:purchaseQuoteChild:export")
@RequiresPermissions("purchase:purchaseQuoteChild:export")
@Log(title = "采购报价单物料信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysPurchaseQuoteChild sysPurchaseQuoteChild)
public AjaxResult export(PurchaseQuoteChild purchaseQuoteChild)
{
List<SysPurchaseQuoteChild> list = sysPurchaseQuoteChildService.selectSysPurchaseQuoteChildList(sysPurchaseQuoteChild);
ExcelUtil<SysPurchaseQuoteChild> util = new ExcelUtil<SysPurchaseQuoteChild>(SysPurchaseQuoteChild.class);
List<PurchaseQuoteChild> list = purchaseQuoteChildService.selectPurchaseQuoteChildList(purchaseQuoteChild);
ExcelUtil<PurchaseQuoteChild> util = new ExcelUtil<PurchaseQuoteChild>(PurchaseQuoteChild.class);
return util.exportExcel(list, "采购报价单物料信息数据");
}
@ -80,13 +81,13 @@ public class SysPurchaseQuoteChildController extends BaseController
/**
* 新增保存采购报价单物料信息
*/
@RequiresPermissions("system:purchaseQuoteChild:add")
@RequiresPermissions("purchase:purchaseQuoteChild:add")
@Log(title = "采购报价单物料信息", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(SysPurchaseQuoteChild sysPurchaseQuoteChild)
public AjaxResult addSave(PurchaseQuoteChild purchaseQuoteChild)
{
return toAjax(sysPurchaseQuoteChildService.insertSysPurchaseQuoteChild(sysPurchaseQuoteChild));
return toAjax(purchaseQuoteChildService.insertPurchaseQuoteChild(purchaseQuoteChild));
}
/**
@ -95,56 +96,56 @@ public class SysPurchaseQuoteChildController extends BaseController
@GetMapping("/edit/{purchaseQuoteChildId}")
public String edit(@PathVariable("purchaseQuoteChildId") Long purchaseQuoteChildId, ModelMap mmap)
{
SysPurchaseQuoteChild sysPurchaseQuoteChild = sysPurchaseQuoteChildService.selectSysPurchaseQuoteChildById(purchaseQuoteChildId);
mmap.put("sysPurchaseQuoteChild", sysPurchaseQuoteChild);
PurchaseQuoteChild purchaseQuoteChild = purchaseQuoteChildService.selectPurchaseQuoteChildById(purchaseQuoteChildId);
mmap.put("purchaseQuoteChild", purchaseQuoteChild);
return prefix + "/edit";
}
/**
* 修改保存采购报价单物料信息
*/
@RequiresPermissions("system:purchaseQuoteChild:edit")
@RequiresPermissions("purchase:purchaseQuoteChild:edit")
@Log(title = "采购报价单物料信息", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysPurchaseQuoteChild sysPurchaseQuoteChild)
public AjaxResult editSave(PurchaseQuoteChild purchaseQuoteChild)
{
return toAjax(sysPurchaseQuoteChildService.updateSysPurchaseQuoteChild(sysPurchaseQuoteChild));
return toAjax(purchaseQuoteChildService.updatePurchaseQuoteChild(purchaseQuoteChild));
}
/**
* 删除采购报价单物料信息
*/
@RequiresPermissions("system:purchaseQuoteChild:remove")
@RequiresPermissions("purchase:purchaseQuoteChild:remove")
@Log(title = "采购报价单物料信息", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(sysPurchaseQuoteChildService.deleteSysPurchaseQuoteChildByIds(ids));
return toAjax(purchaseQuoteChildService.deletePurchaseQuoteChildByIds(ids));
}
/**
* 作废采购报价单物料信息
*/
@RequiresPermissions("system:purchaseQuoteChild:cancel")
@RequiresPermissions("purchase:purchaseQuoteChild:cancel")
@Log(title = "采购报价单物料信息", businessType = BusinessType.CANCEL)
@GetMapping( "/cancel/{id}")
@ResponseBody
public AjaxResult cancel(@PathVariable("id") Long id){
return toAjax(sysPurchaseQuoteChildService.cancelSysPurchaseQuoteChildById(id));
return toAjax(purchaseQuoteChildService.cancelPurchaseQuoteChildById(id));
}
/**
* 恢复采购报价单物料信息
*/
@RequiresPermissions("system:purchaseQuoteChild:restore")
@RequiresPermissions("purchase:purchaseQuoteChild:restore")
@Log(title = "采购报价单物料信息", businessType = BusinessType.RESTORE)
@GetMapping( "/restore/{id}")
@ResponseBody
public AjaxResult restore(@PathVariable("id")Long id)
{
return toAjax(sysPurchaseQuoteChildService.restoreSysPurchaseQuoteChildById(id));
return toAjax(purchaseQuoteChildService.restorePurchaseQuoteChildById(id));
}

16
ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteController.java

@ -5,11 +5,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.purchase.domain.PurchaseQuote;
@ -84,9 +80,10 @@ public class PurchaseQuoteController extends BaseController
@Log(title = "采购报价单", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(PurchaseQuote purchaseQuote)
public AjaxResult addSave(@RequestBody PurchaseQuote purchaseQuote)
{
return toAjax(purchaseQuoteService.insertPurchaseQuote(purchaseQuote));
purchaseQuoteService.insertPurchaseQuote(purchaseQuote);
return AjaxResult.success();
}
/**
@ -107,9 +104,10 @@ public class PurchaseQuoteController extends BaseController
@Log(title = "采购报价单", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(PurchaseQuote purchaseQuote)
public AjaxResult editSave(@RequestBody PurchaseQuote purchaseQuote)
{
return toAjax(purchaseQuoteService.updatePurchaseQuote(purchaseQuote));
purchaseQuoteService.updatePurchaseQuote(purchaseQuote);
return AjaxResult.success();
}
/**

261
ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchasePlanChild.java

@ -0,0 +1,261 @@
package com.ruoyi.purchase.domain;
import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 采购计划单物料信息对象 purchase_plan_child
*
* @author zhang
* @date 2024-05-16
*/
public class PurchasePlanChild extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 采购计划物料清单索引 */
private Long purchasePlanChildId;
/** 关联采购计划编号字段 */
@Excel(name = "关联采购计划编号字段")
private String purchasePlanCode;
/** 物料表中的id */
@Excel(name = "物料表中的id")
private Long materialId;
/** 物料表中的编号 */
@Excel(name = "物料表中的编号")
private String materialCode;
/** 物料的名称 */
@Excel(name = "物料的名称")
private String materialName;
/** 物料的类型 */
@Excel(name = "物料的类型")
private String materialType;
/** 物料的加工方式 */
@Excel(name = "物料的加工方式")
private String processMethod;
/** 物料的品牌 */
@Excel(name = "物料的品牌")
private String brand;
/** 物料的图片 */
@Excel(name = "物料的图片")
private String photoUrl;
/** 物料的描述 */
@Excel(name = "物料的描述")
private String describe;
/** 采购计划数 */
@Excel(name = "采购计划数")
private Long materialNum;
/** 物料的对外报价 */
private Long materialSole;
/** 物料的不含税单价(RMB) */
private BigDecimal materialRmb;
/** 物料的含税单价(RMB) */
private BigDecimal materialNormb;
/** 使用状态 */
private String useStatus;
/** 审核状态 */
private String auditStatus;
/** 删除标志 */
private String delFlag;
public void setPurchasePlanChildId(Long purchasePlanChildId)
{
this.purchasePlanChildId = purchasePlanChildId;
}
public Long getPurchasePlanChildId()
{
return purchasePlanChildId;
}
public void setPurchasePlanCode(String purchasePlanCode)
{
this.purchasePlanCode = purchasePlanCode;
}
public String getPurchasePlanCode()
{
return purchasePlanCode;
}
public void setMaterialId(Long materialId)
{
this.materialId = materialId;
}
public Long getMaterialId()
{
return materialId;
}
public void setMaterialCode(String materialCode)
{
this.materialCode = materialCode;
}
public String getMaterialCode()
{
return materialCode;
}
public void setMaterialName(String materialName)
{
this.materialName = materialName;
}
public String getMaterialName()
{
return materialName;
}
public void setMaterialType(String materialType)
{
this.materialType = materialType;
}
public String getMaterialType()
{
return materialType;
}
public void setProcessMethod(String processMethod)
{
this.processMethod = processMethod;
}
public String getProcessMethod()
{
return processMethod;
}
public void setBrand(String brand)
{
this.brand = brand;
}
public String getBrand()
{
return brand;
}
public void setPhotoUrl(String photoUrl)
{
this.photoUrl = photoUrl;
}
public String getPhotoUrl()
{
return photoUrl;
}
public void setDescribe(String describe)
{
this.describe = describe;
}
public String getDescribe()
{
return describe;
}
public void setMaterialNum(Long materialNum)
{
this.materialNum = materialNum;
}
public Long getMaterialNum()
{
return materialNum;
}
public void setMaterialSole(Long materialSole)
{
this.materialSole = materialSole;
}
public Long getMaterialSole()
{
return materialSole;
}
public void setMaterialRmb(BigDecimal materialRmb)
{
this.materialRmb = materialRmb;
}
public BigDecimal getMaterialRmb()
{
return materialRmb;
}
public void setMaterialNormb(BigDecimal materialNormb)
{
this.materialNormb = materialNormb;
}
public BigDecimal getMaterialNormb()
{
return materialNormb;
}
public void setUseStatus(String useStatus)
{
this.useStatus = useStatus;
}
public String getUseStatus()
{
return useStatus;
}
public void setAuditStatus(String auditStatus)
{
this.auditStatus = auditStatus;
}
public String getAuditStatus()
{
return auditStatus;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public String getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("purchasePlanChildId", getPurchasePlanChildId())
.append("purchasePlanCode", getPurchasePlanCode())
.append("materialId", getMaterialId())
.append("materialCode", getMaterialCode())
.append("materialName", getMaterialName())
.append("materialType", getMaterialType())
.append("processMethod", getProcessMethod())
.append("brand", getBrand())
.append("photoUrl", getPhotoUrl())
.append("describe", getDescribe())
.append("materialNum", getMaterialNum())
.append("materialSole", getMaterialSole())
.append("materialRmb", getMaterialRmb())
.append("materialNormb", getMaterialNormb())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("useStatus", getUseStatus())
.append("auditStatus", getAuditStatus())
.append("delFlag", getDelFlag())
.toString();
}
}

8
ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseQuote.java

@ -1,9 +1,7 @@
package com.ruoyi.purchase.domain;
import java.math.BigDecimal;
import java.util.List;
import com.ruoyi.system.domain.SysPurchaseQuoteChild;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
@ -83,14 +81,14 @@ public class PurchaseQuote extends BaseEntity
private String removeFileIdStr;
private List<SysPurchaseQuoteChild> purchaseQuoteChildList;
private List<PurchaseQuoteChild> purchaseQuoteChildList;
public List<SysPurchaseQuoteChild> getPurchaseQuoteChildList() {
public List<PurchaseQuoteChild> getPurchaseQuoteChildList() {
return purchaseQuoteChildList;
}
public void setPurchaseQuoteChildList(List<SysPurchaseQuoteChild> purchaseQuoteChildList) {
public void setPurchaseQuoteChildList(List<PurchaseQuoteChild> purchaseQuoteChildList) {
this.purchaseQuoteChildList = purchaseQuoteChildList;
}

6
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysPurchaseQuoteChild.java → ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseQuoteChild.java

@ -1,4 +1,4 @@
package com.ruoyi.system.domain;
package com.ruoyi.purchase.domain;
import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
@ -7,12 +7,12 @@ import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 采购报价单物料信息对象 sys_purchase_quote_child
* 采购报价单物料信息对象 purchase_quote_child
*
* @author zhang
* @date 2024-05-15
*/
public class SysPurchaseQuoteChild extends BaseEntity
public class PurchaseQuoteChild extends BaseEntity
{
private static final long serialVersionUID = 1L;

77
ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchasePlanChildMapper.java

@ -0,0 +1,77 @@
package com.ruoyi.purchase.mapper;
import java.util.List;
import com.ruoyi.purchase.domain.PurchasePlanChild;
/**
* 采购计划单物料信息Mapper接口
*
* @author zhang
* @date 2024-05-16
*/
public interface PurchasePlanChildMapper
{
/**
* 查询采购计划单物料信息
*
* @param purchasePlanChildId 采购计划单物料信息ID
* @return 采购计划单物料信息
*/
public PurchasePlanChild selectPurchasePlanChildById(Long purchasePlanChildId);
/**
* 查询采购计划单物料信息列表
*
* @param purchasePlanChild 采购计划单物料信息
* @return 采购计划单物料信息集合
*/
public List<PurchasePlanChild> selectPurchasePlanChildList(PurchasePlanChild purchasePlanChild);
/**
* 新增采购计划单物料信息
*
* @param purchasePlanChild 采购计划单物料信息
* @return 结果
*/
public int insertPurchasePlanChild(PurchasePlanChild purchasePlanChild);
/**
* 修改采购计划单物料信息
*
* @param purchasePlanChild 采购计划单物料信息
* @return 结果
*/
public int updatePurchasePlanChild(PurchasePlanChild purchasePlanChild);
/**
* 删除采购计划单物料信息
*
* @param purchasePlanChildId 采购计划单物料信息ID
* @return 结果
*/
public int deletePurchasePlanChildById(Long purchasePlanChildId);
/**
* 批量删除采购计划单物料信息
*
* @param purchasePlanChildIds 需要删除的数据ID
* @return 结果
*/
public int deletePurchasePlanChildByIds(String[] purchasePlanChildIds);
/**
* 作废采购计划单物料信息
*
* @param purchasePlanChildId 采购计划单物料信息ID
* @return 结果
*/
public int cancelPurchasePlanChildById(Long purchasePlanChildId);
/**
* 恢复采购计划单物料信息
*
* @param purchasePlanChildId 采购计划单物料信息ID
* @return 结果
*/
public int restorePurchasePlanChildById(Long purchasePlanChildId);
}

22
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysPurchaseQuoteChildMapper.java → ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseQuoteChildMapper.java

@ -1,7 +1,7 @@
package com.ruoyi.system.mapper;
package com.ruoyi.purchase.mapper;
import java.util.List;
import com.ruoyi.system.domain.SysPurchaseQuoteChild;
import com.ruoyi.purchase.domain.PurchaseQuoteChild;
/**
* 采购报价单物料信息Mapper接口
@ -9,7 +9,7 @@ import com.ruoyi.system.domain.SysPurchaseQuoteChild;
* @author zhang
* @date 2024-05-15
*/
public interface SysPurchaseQuoteChildMapper
public interface PurchaseQuoteChildMapper
{
/**
* 查询采购报价单物料信息
@ -17,7 +17,7 @@ public interface SysPurchaseQuoteChildMapper
* @param purchaseQuoteChildId 采购报价单物料信息ID
* @return 采购报价单物料信息
*/
public SysPurchaseQuoteChild selectSysPurchaseQuoteChildById(Long purchaseQuoteChildId);
public PurchaseQuoteChild selectPurchaseQuoteChildById(Long purchaseQuoteChildId);
/**
* 查询采购报价单物料信息列表
@ -25,7 +25,7 @@ public interface SysPurchaseQuoteChildMapper
* @param sysPurchaseQuoteChild 采购报价单物料信息
* @return 采购报价单物料信息集合
*/
public List<SysPurchaseQuoteChild> selectSysPurchaseQuoteChildList(SysPurchaseQuoteChild sysPurchaseQuoteChild);
public List<PurchaseQuoteChild> selectPurchaseQuoteChildList(PurchaseQuoteChild sysPurchaseQuoteChild);
/**
* 新增采购报价单物料信息
@ -33,7 +33,7 @@ public interface SysPurchaseQuoteChildMapper
* @param sysPurchaseQuoteChild 采购报价单物料信息
* @return 结果
*/
public int insertSysPurchaseQuoteChild(SysPurchaseQuoteChild sysPurchaseQuoteChild);
public int insertPurchaseQuoteChild(PurchaseQuoteChild sysPurchaseQuoteChild);
/**
* 修改采购报价单物料信息
@ -41,7 +41,7 @@ public interface SysPurchaseQuoteChildMapper
* @param sysPurchaseQuoteChild 采购报价单物料信息
* @return 结果
*/
public int updateSysPurchaseQuoteChild(SysPurchaseQuoteChild sysPurchaseQuoteChild);
public int updatePurchaseQuoteChild(PurchaseQuoteChild sysPurchaseQuoteChild);
/**
* 删除采购报价单物料信息
@ -49,7 +49,7 @@ public interface SysPurchaseQuoteChildMapper
* @param purchaseQuoteChildId 采购报价单物料信息ID
* @return 结果
*/
public int deleteSysPurchaseQuoteChildById(Long purchaseQuoteChildId);
public int deletePurchaseQuoteChildById(Long purchaseQuoteChildId);
/**
* 批量删除采购报价单物料信息
@ -57,7 +57,7 @@ public interface SysPurchaseQuoteChildMapper
* @param purchaseQuoteChildIds 需要删除的数据ID
* @return 结果
*/
public int deleteSysPurchaseQuoteChildByIds(String[] purchaseQuoteChildIds);
public int deletePurchaseQuoteChildByIds(String[] purchaseQuoteChildIds);
/**
* 作废采购报价单物料信息
@ -65,7 +65,7 @@ public interface SysPurchaseQuoteChildMapper
* @param purchaseQuoteChildId 采购报价单物料信息ID
* @return 结果
*/
public int cancelSysPurchaseQuoteChildById(Long purchaseQuoteChildId);
public int cancelPurchaseQuoteChildById(Long purchaseQuoteChildId);
/**
* 恢复采购报价单物料信息
@ -73,5 +73,5 @@ public interface SysPurchaseQuoteChildMapper
* @param purchaseQuoteChildId 采购报价单物料信息ID
* @return 结果
*/
public int restoreSysPurchaseQuoteChildById(Long purchaseQuoteChildId);
public int restorePurchaseQuoteChildById(Long purchaseQuoteChildId);
}

75
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchasePlanChildService.java

@ -0,0 +1,75 @@
package com.ruoyi.purchase.service;
import java.util.List;
import com.ruoyi.purchase.domain.PurchasePlanChild;
/**
* 采购计划单物料信息Service接口
*
* @author zhang
* @date 2024-05-16
*/
public interface IPurchasePlanChildService
{
/**
* 查询采购计划单物料信息
*
* @param purchasePlanChildId 采购计划单物料信息ID
* @return 采购计划单物料信息
*/
public PurchasePlanChild selectPurchasePlanChildById(Long purchasePlanChildId);
/**
* 查询采购计划单物料信息列表
*
* @param purchasePlanChild 采购计划单物料信息
* @return 采购计划单物料信息集合
*/
public List<PurchasePlanChild> selectPurchasePlanChildList(PurchasePlanChild purchasePlanChild);
/**
* 新增采购计划单物料信息
*
* @param purchasePlanChild 采购计划单物料信息
* @return 结果
*/
public int insertPurchasePlanChild(PurchasePlanChild purchasePlanChild);
/**
* 修改采购计划单物料信息
*
* @param purchasePlanChild 采购计划单物料信息
* @return 结果
*/
public int updatePurchasePlanChild(PurchasePlanChild purchasePlanChild);
/**
* 批量删除采购计划单物料信息
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deletePurchasePlanChildByIds(String ids);
/**
* 删除采购计划单物料信息信息
*
* @param purchasePlanChildId 采购计划单物料信息ID
* @return 结果
*/
public int deletePurchasePlanChildById(Long purchasePlanChildId);
/**
* 作废采购计划单物料信息
* @param purchasePlanChildId 采购计划单物料信息ID
* @return
*/
int cancelPurchasePlanChildById(Long purchasePlanChildId);
/**
* 恢复采购计划单物料信息
* @param purchasePlanChildId 采购计划单物料信息ID
* @return
*/
int restorePurchasePlanChildById(Long purchasePlanChildId);
}

22
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysPurchaseQuoteChildService.java → ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteChildService.java

@ -1,7 +1,7 @@
package com.ruoyi.system.service;
package com.ruoyi.purchase.service;
import java.util.List;
import com.ruoyi.system.domain.SysPurchaseQuoteChild;
import com.ruoyi.purchase.domain.PurchaseQuoteChild;
/**
* 采购报价单物料信息Service接口
@ -9,7 +9,7 @@ import com.ruoyi.system.domain.SysPurchaseQuoteChild;
* @author zhang
* @date 2024-05-15
*/
public interface ISysPurchaseQuoteChildService
public interface IPurchaseQuoteChildService
{
/**
* 查询采购报价单物料信息
@ -17,7 +17,7 @@ public interface ISysPurchaseQuoteChildService
* @param purchaseQuoteChildId 采购报价单物料信息ID
* @return 采购报价单物料信息
*/
public SysPurchaseQuoteChild selectSysPurchaseQuoteChildById(Long purchaseQuoteChildId);
public PurchaseQuoteChild selectPurchaseQuoteChildById(Long purchaseQuoteChildId);
/**
* 查询采购报价单物料信息列表
@ -25,7 +25,7 @@ public interface ISysPurchaseQuoteChildService
* @param sysPurchaseQuoteChild 采购报价单物料信息
* @return 采购报价单物料信息集合
*/
public List<SysPurchaseQuoteChild> selectSysPurchaseQuoteChildList(SysPurchaseQuoteChild sysPurchaseQuoteChild);
public List<PurchaseQuoteChild> selectPurchaseQuoteChildList(PurchaseQuoteChild sysPurchaseQuoteChild);
/**
* 新增采购报价单物料信息
@ -33,7 +33,7 @@ public interface ISysPurchaseQuoteChildService
* @param sysPurchaseQuoteChild 采购报价单物料信息
* @return 结果
*/
public int insertSysPurchaseQuoteChild(SysPurchaseQuoteChild sysPurchaseQuoteChild);
public int insertPurchaseQuoteChild(PurchaseQuoteChild sysPurchaseQuoteChild);
/**
* 修改采购报价单物料信息
@ -41,7 +41,7 @@ public interface ISysPurchaseQuoteChildService
* @param sysPurchaseQuoteChild 采购报价单物料信息
* @return 结果
*/
public int updateSysPurchaseQuoteChild(SysPurchaseQuoteChild sysPurchaseQuoteChild);
public int updatePurchaseQuoteChild(PurchaseQuoteChild sysPurchaseQuoteChild);
/**
* 批量删除采购报价单物料信息
@ -49,7 +49,7 @@ public interface ISysPurchaseQuoteChildService
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteSysPurchaseQuoteChildByIds(String ids);
public int deletePurchaseQuoteChildByIds(String ids);
/**
* 删除采购报价单物料信息信息
@ -57,19 +57,19 @@ public interface ISysPurchaseQuoteChildService
* @param purchaseQuoteChildId 采购报价单物料信息ID
* @return 结果
*/
public int deleteSysPurchaseQuoteChildById(Long purchaseQuoteChildId);
public int deletePurchaseQuoteChildById(Long purchaseQuoteChildId);
/**
* 作废采购报价单物料信息
* @param purchaseQuoteChildId 采购报价单物料信息ID
* @return
*/
int cancelSysPurchaseQuoteChildById(Long purchaseQuoteChildId);
int cancelPurchaseQuoteChildById(Long purchaseQuoteChildId);
/**
* 恢复采购报价单物料信息
* @param purchaseQuoteChildId 采购报价单物料信息ID
* @return
*/
int restoreSysPurchaseQuoteChildById(Long purchaseQuoteChildId);
int restorePurchaseQuoteChildById(Long purchaseQuoteChildId);
}

126
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchasePlanChildServiceImpl.java

@ -0,0 +1,126 @@
package com.ruoyi.purchase.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.purchase.mapper.PurchasePlanChildMapper;
import com.ruoyi.purchase.domain.PurchasePlanChild;
import com.ruoyi.purchase.service.IPurchasePlanChildService;
import com.ruoyi.common.core.text.Convert;
/**
* 采购计划单物料信息Service业务层处理
*
* @author zhang
* @date 2024-05-16
*/
@Service
public class PurchasePlanChildServiceImpl implements IPurchasePlanChildService
{
@Autowired
private PurchasePlanChildMapper purchasePlanChildMapper;
/**
* 查询采购计划单物料信息
*
* @param purchasePlanChildId 采购计划单物料信息ID
* @return 采购计划单物料信息
*/
@Override
public PurchasePlanChild selectPurchasePlanChildById(Long purchasePlanChildId)
{
return purchasePlanChildMapper.selectPurchasePlanChildById(purchasePlanChildId);
}
/**
* 查询采购计划单物料信息列表
*
* @param purchasePlanChild 采购计划单物料信息
* @return 采购计划单物料信息
*/
@Override
public List<PurchasePlanChild> selectPurchasePlanChildList(PurchasePlanChild purchasePlanChild)
{
return purchasePlanChildMapper.selectPurchasePlanChildList(purchasePlanChild);
}
/**
* 新增采购计划单物料信息
*
* @param purchasePlanChild 采购计划单物料信息
* @return 结果
*/
@Override
public int insertPurchasePlanChild(PurchasePlanChild purchasePlanChild)
{
String loginName = ShiroUtils.getLoginName();
purchasePlanChild.setCreateBy(loginName);
purchasePlanChild.setCreateTime(DateUtils.getNowDate());
return purchasePlanChildMapper.insertPurchasePlanChild(purchasePlanChild);
}
/**
* 修改采购计划单物料信息
*
* @param purchasePlanChild 采购计划单物料信息
* @return 结果
*/
@Override
public int updatePurchasePlanChild(PurchasePlanChild purchasePlanChild)
{
String loginName = ShiroUtils.getLoginName();
purchasePlanChild.setUpdateBy(loginName);
purchasePlanChild.setUpdateTime(DateUtils.getNowDate());
return purchasePlanChildMapper.updatePurchasePlanChild(purchasePlanChild);
}
/**
* 删除采购计划单物料信息对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deletePurchasePlanChildByIds(String ids)
{
return purchasePlanChildMapper.deletePurchasePlanChildByIds(Convert.toStrArray(ids));
}
/**
* 删除采购计划单物料信息信息
*
* @param purchasePlanChildId 采购计划单物料信息ID
* @return 结果
*/
@Override
public int deletePurchasePlanChildById(Long purchasePlanChildId)
{
return purchasePlanChildMapper.deletePurchasePlanChildById(purchasePlanChildId);
}
/**
* 作废采购计划单物料信息
*
* @param purchasePlanChildId 采购计划单物料信息ID
* @return 结果
*/
@Override
public int cancelPurchasePlanChildById(Long purchasePlanChildId)
{
return purchasePlanChildMapper.cancelPurchasePlanChildById(purchasePlanChildId);
}
/**
* 恢复采购计划单物料信息信息
*
* @param purchasePlanChildId 采购计划单物料信息ID
* @return 结果
*/
@Override
public int restorePurchasePlanChildById(Long purchasePlanChildId)
{
return purchasePlanChildMapper.restorePurchasePlanChildById(purchasePlanChildId);
}
}

126
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteChildServiceImpl.java

@ -0,0 +1,126 @@
package com.ruoyi.purchase.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.purchase.mapper.PurchaseQuoteChildMapper;
import com.ruoyi.purchase.domain.PurchaseQuoteChild;
import com.ruoyi.purchase.service.IPurchaseQuoteChildService;
import com.ruoyi.common.core.text.Convert;
/**
* 采购报价单物料信息Service业务层处理
*
* @author zhang
* @date 2024-05-15
*/
@Service
public class PurchaseQuoteChildServiceImpl implements IPurchaseQuoteChildService
{
@Autowired
private PurchaseQuoteChildMapper purchaseQuoteChildMapper;
/**
* 查询采购报价单物料信息
*
* @param purchaseQuoteChildId 采购报价单物料信息ID
* @return 采购报价单物料信息
*/
@Override
public PurchaseQuoteChild selectPurchaseQuoteChildById(Long purchaseQuoteChildId)
{
return purchaseQuoteChildMapper.selectPurchaseQuoteChildById(purchaseQuoteChildId);
}
/**
* 查询采购报价单物料信息列表
*
* @param purchaseQuoteChild 采购报价单物料信息
* @return 采购报价单物料信息
*/
@Override
public List<PurchaseQuoteChild> selectPurchaseQuoteChildList(PurchaseQuoteChild purchaseQuoteChild)
{
return purchaseQuoteChildMapper.selectPurchaseQuoteChildList(purchaseQuoteChild);
}
/**
* 新增采购报价单物料信息
*
* @param purchaseQuoteChild 采购报价单物料信息
* @return 结果
*/
@Override
public int insertPurchaseQuoteChild(PurchaseQuoteChild purchaseQuoteChild)
{
String loginName = ShiroUtils.getLoginName();
purchaseQuoteChild.setCreateBy(loginName);
purchaseQuoteChild.setCreateTime(DateUtils.getNowDate());
return purchaseQuoteChildMapper.insertPurchaseQuoteChild(purchaseQuoteChild);
}
/**
* 修改采购报价单物料信息
*
* @param purchaseQuoteChild 采购报价单物料信息
* @return 结果
*/
@Override
public int updatePurchaseQuoteChild(PurchaseQuoteChild purchaseQuoteChild)
{
String loginName = ShiroUtils.getLoginName();
purchaseQuoteChild.setUpdateBy(loginName);
purchaseQuoteChild.setUpdateTime(DateUtils.getNowDate());
return purchaseQuoteChildMapper.updatePurchaseQuoteChild(purchaseQuoteChild);
}
/**
* 删除采购报价单物料信息对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deletePurchaseQuoteChildByIds(String ids)
{
return purchaseQuoteChildMapper.deletePurchaseQuoteChildByIds(Convert.toStrArray(ids));
}
/**
* 删除采购报价单物料信息信息
*
* @param purchaseQuoteChildId 采购报价单物料信息ID
* @return 结果
*/
@Override
public int deletePurchaseQuoteChildById(Long purchaseQuoteChildId)
{
return purchaseQuoteChildMapper.deletePurchaseQuoteChildById(purchaseQuoteChildId);
}
/**
* 作废采购报价单物料信息
*
* @param purchaseQuoteChildId 采购报价单物料信息ID
* @return 结果
*/
@Override
public int cancelPurchaseQuoteChildById(Long purchaseQuoteChildId)
{
return purchaseQuoteChildMapper.cancelPurchaseQuoteChildById(purchaseQuoteChildId);
}
/**
* 恢复采购报价单物料信息信息
*
* @param purchaseQuoteChildId 采购报价单物料信息ID
* @return 结果
*/
@Override
public int restorePurchaseQuoteChildById(Long purchaseQuoteChildId)
{
return purchaseQuoteChildMapper.restorePurchaseQuoteChildById(purchaseQuoteChildId);
}
}

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

@ -1,7 +1,6 @@
package com.ruoyi.purchase.service.impl;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import com.ruoyi.common.service.ICommonService;
@ -11,11 +10,11 @@ import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.process.general.service.IProcessService;
import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper;
import com.ruoyi.system.domain.SysAttach;
import com.ruoyi.system.domain.SysPurchaseQuoteChild;
import com.ruoyi.purchase.domain.PurchaseQuoteChild;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.service.ISysAttachFileService;
import com.ruoyi.system.service.ISysAttachService;
import com.ruoyi.system.service.ISysPurchaseQuoteChildService;
import com.ruoyi.purchase.service.IPurchaseQuoteChildService;
import com.ruoyi.system.service.ISysRoleService;
import org.activiti.engine.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
@ -63,7 +62,7 @@ public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService
private ISysRoleService roleService;
@Autowired
private ISysPurchaseQuoteChildService purchaseQuoteChildService;
private IPurchaseQuoteChildService purchaseQuoteChildService;
/**
* 查询采购报价单
*
@ -118,15 +117,15 @@ public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService
List<String> fileIdList = Arrays.asList(fileIdStr.split(";"));
attachFileService.updateAttachIdByIdList(attachId,fileIdList);
}
List<SysPurchaseQuoteChild> childList = purchaseQuote.getPurchaseQuoteChildList();
List<PurchaseQuoteChild> childList = purchaseQuote.getPurchaseQuoteChildList();
int childResult = childList.size();
if(childResult >= 1){
for(SysPurchaseQuoteChild child : purchaseQuote.getPurchaseQuoteChildList()){
for(PurchaseQuoteChild child : purchaseQuote.getPurchaseQuoteChildList()){
child.setPurchaseQuoteCode(purchaseQuote.getPurchaseQuoteCode());
child.setCreateBy(loginName);
child.setCreateTime(DateUtils.getNowDate());
child.setTaxRate(purchaseQuote.getTaxRate());
purchaseQuoteChildService.insertSysPurchaseQuoteChild(child);
purchaseQuoteChildService.insertPurchaseQuoteChild(child);
}
}
return result;
@ -169,15 +168,15 @@ public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService
}
attachFileService.updateAttachIdByIdList(photoAttachId, fileIdList);
}
List<SysPurchaseQuoteChild> childList = purchaseQuote.getPurchaseQuoteChildList();
List<PurchaseQuoteChild> childList = purchaseQuote.getPurchaseQuoteChildList();
int childResult = childList.size();
if(childResult >= 1){
for(SysPurchaseQuoteChild child : purchaseQuote.getPurchaseQuoteChildList()){
for(PurchaseQuoteChild child : purchaseQuote.getPurchaseQuoteChildList()){
child.setPurchaseQuoteCode(purchaseQuote.getPurchaseQuoteCode());
child.setCreateBy(loginName);
child.setCreateTime(DateUtils.getNowDate());
child.setTaxRate(purchaseQuote.getTaxRate());
purchaseQuoteChildService.updateSysPurchaseQuoteChild(child);
purchaseQuoteChildService.updatePurchaseQuoteChild(child);
}
}
return purchaseQuoteMapper.updatePurchaseQuote(purchaseQuote);

126
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysPurchaseQuoteChildServiceImpl.java

@ -1,126 +0,0 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysPurchaseQuoteChildMapper;
import com.ruoyi.system.domain.SysPurchaseQuoteChild;
import com.ruoyi.system.service.ISysPurchaseQuoteChildService;
import com.ruoyi.common.core.text.Convert;
/**
* 采购报价单物料信息Service业务层处理
*
* @author zhang
* @date 2024-05-15
*/
@Service
public class SysPurchaseQuoteChildServiceImpl implements ISysPurchaseQuoteChildService
{
@Autowired
private SysPurchaseQuoteChildMapper sysPurchaseQuoteChildMapper;
/**
* 查询采购报价单物料信息
*
* @param purchaseQuoteChildId 采购报价单物料信息ID
* @return 采购报价单物料信息
*/
@Override
public SysPurchaseQuoteChild selectSysPurchaseQuoteChildById(Long purchaseQuoteChildId)
{
return sysPurchaseQuoteChildMapper.selectSysPurchaseQuoteChildById(purchaseQuoteChildId);
}
/**
* 查询采购报价单物料信息列表
*
* @param sysPurchaseQuoteChild 采购报价单物料信息
* @return 采购报价单物料信息
*/
@Override
public List<SysPurchaseQuoteChild> selectSysPurchaseQuoteChildList(SysPurchaseQuoteChild sysPurchaseQuoteChild)
{
return sysPurchaseQuoteChildMapper.selectSysPurchaseQuoteChildList(sysPurchaseQuoteChild);
}
/**
* 新增采购报价单物料信息
*
* @param sysPurchaseQuoteChild 采购报价单物料信息
* @return 结果
*/
@Override
public int insertSysPurchaseQuoteChild(SysPurchaseQuoteChild sysPurchaseQuoteChild)
{
String loginName = ShiroUtils.getLoginName();
sysPurchaseQuoteChild.setCreateBy(loginName);
sysPurchaseQuoteChild.setCreateTime(DateUtils.getNowDate());
return sysPurchaseQuoteChildMapper.insertSysPurchaseQuoteChild(sysPurchaseQuoteChild);
}
/**
* 修改采购报价单物料信息
*
* @param sysPurchaseQuoteChild 采购报价单物料信息
* @return 结果
*/
@Override
public int updateSysPurchaseQuoteChild(SysPurchaseQuoteChild sysPurchaseQuoteChild)
{
String loginName = ShiroUtils.getLoginName();
sysPurchaseQuoteChild.setUpdateBy(loginName);
sysPurchaseQuoteChild.setUpdateTime(DateUtils.getNowDate());
return sysPurchaseQuoteChildMapper.updateSysPurchaseQuoteChild(sysPurchaseQuoteChild);
}
/**
* 删除采购报价单物料信息对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteSysPurchaseQuoteChildByIds(String ids)
{
return sysPurchaseQuoteChildMapper.deleteSysPurchaseQuoteChildByIds(Convert.toStrArray(ids));
}
/**
* 删除采购报价单物料信息信息
*
* @param purchaseQuoteChildId 采购报价单物料信息ID
* @return 结果
*/
@Override
public int deleteSysPurchaseQuoteChildById(Long purchaseQuoteChildId)
{
return sysPurchaseQuoteChildMapper.deleteSysPurchaseQuoteChildById(purchaseQuoteChildId);
}
/**
* 作废采购报价单物料信息
*
* @param purchaseQuoteChildId 采购报价单物料信息ID
* @return 结果
*/
@Override
public int cancelSysPurchaseQuoteChildById(Long purchaseQuoteChildId)
{
return sysPurchaseQuoteChildMapper.cancelSysPurchaseQuoteChildById(purchaseQuoteChildId);
}
/**
* 恢复采购报价单物料信息信息
*
* @param purchaseQuoteChildId 采购报价单物料信息ID
* @return 结果
*/
@Override
public int restoreSysPurchaseQuoteChildById(Long purchaseQuoteChildId)
{
return sysPurchaseQuoteChildMapper.restoreSysPurchaseQuoteChildById(purchaseQuoteChildId);
}
}

154
ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanChildMapper.xml

@ -0,0 +1,154 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.purchase.mapper.PurchasePlanChildMapper">
<resultMap type="PurchasePlanChild" id="PurchasePlanChildResult">
<result property="purchasePlanChildId" column="purchase_plan_child_id" />
<result property="purchasePlanCode" column="purchase_plan_code" />
<result property="materialId" column="material_id" />
<result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" />
<result property="materialType" column="material_type" />
<result property="processMethod" column="process_method" />
<result property="brand" column="brand" />
<result property="photoUrl" column="photoUrl" />
<result property="describe" column="describe" />
<result property="materialNum" column="material_num" />
<result property="materialSole" column="material_sole" />
<result property="materialRmb" column="material_rmb" />
<result property="materialNormb" column="material_noRmb" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="useStatus" column="use_status" />
<result property="auditStatus" column="audit_status" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectPurchasePlanChildVo">
select purchase_plan_child_id, purchase_plan_code, material_id, material_code, material_name, material_type, process_method, brand, photoUrl, describe, material_num, material_sole, material_rmb, material_noRmb, create_by, create_time, update_by, update_time, remark, use_status, audit_status, del_flag from purchase_plan_child
</sql>
<select id="selectPurchasePlanChildList" parameterType="PurchasePlanChild" resultMap="PurchasePlanChildResult">
<include refid="selectPurchasePlanChildVo"/>
<where>
<if test="purchasePlanChildId != null "> and purchase_plan_child_id = #{purchasePlanChildId}</if>
<if test="purchasePlanCode != null and purchasePlanCode != ''"> and purchase_plan_code = #{purchasePlanCode}</if>
<if test="materialId != null "> and material_id = #{materialId}</if>
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
<if test="materialName != null and materialName != ''"> and material_name = #{materialName}</if>
<if test="materialType != null and materialType != ''"> and material_type = #{materialType}</if>
<if test="processMethod != null and processMethod != ''"> and process_method = #{processMethod}</if>
<if test="brand != null and brand != ''"> and brand = #{brand}</if>
<if test="useStatus != null and useStatus != ''"> and use_status = #{useStatus}</if>
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if>
</where>
</select>
<select id="selectPurchasePlanChildById" parameterType="Long" resultMap="PurchasePlanChildResult">
<include refid="selectPurchasePlanChildVo"/>
where purchase_plan_child_id = #{purchasePlanChildId}
</select>
<insert id="insertPurchasePlanChild" parameterType="PurchasePlanChild" useGeneratedKeys="true" keyProperty="purchasePlanChildId">
insert into purchase_plan_child
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="purchasePlanCode != null">purchase_plan_code,</if>
<if test="materialId != null">material_id,</if>
<if test="materialCode != null">material_code,</if>
<if test="materialName != null">material_name,</if>
<if test="materialType != null">material_type,</if>
<if test="processMethod != null">process_method,</if>
<if test="brand != null">brand,</if>
<if test="photoUrl != null">photoUrl,</if>
<if test="describe != null">describe,</if>
<if test="materialNum != null">material_num,</if>
<if test="materialSole != null">material_sole,</if>
<if test="materialRmb != null">material_rmb,</if>
<if test="materialNormb != null">material_noRmb,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
<if test="useStatus != null">use_status,</if>
<if test="auditStatus != null">audit_status,</if>
<if test="delFlag != null">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="purchasePlanCode != null">#{purchasePlanCode},</if>
<if test="materialId != null">#{materialId},</if>
<if test="materialCode != null">#{materialCode},</if>
<if test="materialName != null">#{materialName},</if>
<if test="materialType != null">#{materialType},</if>
<if test="processMethod != null">#{processMethod},</if>
<if test="brand != null">#{brand},</if>
<if test="photoUrl != null">#{photoUrl},</if>
<if test="describe != null">#{describe},</if>
<if test="materialNum != null">#{materialNum},</if>
<if test="materialSole != null">#{materialSole},</if>
<if test="materialRmb != null">#{materialRmb},</if>
<if test="materialNormb != null">#{materialNormb},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
<if test="useStatus != null">#{useStatus},</if>
<if test="auditStatus != null">#{auditStatus},</if>
<if test="delFlag != null">#{delFlag},</if>
</trim>
</insert>
<update id="updatePurchasePlanChild" parameterType="PurchasePlanChild">
update purchase_plan_child
<trim prefix="SET" suffixOverrides=",">
<if test="purchasePlanCode != null">purchase_plan_code = #{purchasePlanCode},</if>
<if test="materialId != null">material_id = #{materialId},</if>
<if test="materialCode != null">material_code = #{materialCode},</if>
<if test="materialName != null">material_name = #{materialName},</if>
<if test="materialType != null">material_type = #{materialType},</if>
<if test="processMethod != null">process_method = #{processMethod},</if>
<if test="brand != null">brand = #{brand},</if>
<if test="photoUrl != null">photoUrl = #{photoUrl},</if>
<if test="describe != null">describe = #{describe},</if>
<if test="materialNum != null">material_num = #{materialNum},</if>
<if test="materialSole != null">material_sole = #{materialSole},</if>
<if test="materialRmb != null">material_rmb = #{materialRmb},</if>
<if test="materialNormb != null">material_noRmb = #{materialNormb},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="useStatus != null">use_status = #{useStatus},</if>
<if test="auditStatus != null">audit_status = #{auditStatus},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where purchase_plan_child_id = #{purchasePlanChildId}
</update>
<delete id="deletePurchasePlanChildById" parameterType="Long">
delete from purchase_plan_child where purchase_plan_child_id = #{purchasePlanChildId}
</delete>
<delete id="deletePurchasePlanChildByIds" parameterType="String">
delete from purchase_plan_child where purchase_plan_child_id in
<foreach item="purchasePlanChildId" collection="array" open="(" separator="," close=")">
#{purchasePlanChildId}
</foreach>
</delete>
<update id="cancelPurchasePlanChildById" parameterType="Long">
update purchase_plan_child set del_flag = '1' where purchase_plan_child_id = #{purchasePlanChildId}
</update>
<update id="restorePurchasePlanChildById" parameterType="Long">
update purchase_plan_child set del_flag = '0' where purchase_plan_child_id = #{purchasePlanChildId}
</update>
</mapper>

81
ruoyi-admin/src/main/resources/mapper/system/SysPurchaseQuoteChildMapper.xml → ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteChildMapper.xml

@ -2,40 +2,43 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysPurchaseQuoteChildMapper">
<resultMap type="SysPurchaseQuoteChild" id="SysPurchaseQuoteChildResult">
<result property="purchaseQuoteChildId" column="purchase_quote_child_id" />
<result property="purchaseQuoteCode" column="purchase_quote_code" />
<result property="materialId" column="material_id" />
<result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" />
<result property="materialType" column="material_type" />
<result property="processMethod" column="processMethod" />
<result property="brand" column="brand" />
<result property="photoUrl" column="photoUrl" />
<result property="describe" column="describe" />
<result property="taxRate" column="tax_rate" />
<result property="usdRate" column="usd_rate" />
<result property="materialNum" column="material_num" />
<result property="materialSole" column="material_sole" />
<result property="materialRmb" column="material_rmb" />
<result property="materialNormb" column="material_noRmb" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="useStatus" column="use_status" />
<result property="auditStatus" column="audit_status" />
<result property="delFlag" column="del_flag" />
<mapper namespace="com.ruoyi.purchase.mapper.PurchaseQuoteChildMapper">
<resultMap type="PurchaseQuoteChild" id="PurchaseQuoteChildResult">
<result property="purchaseQuoteChildId" column="purchase_quote_child_id" />
<result property="purchaseQuoteCode" column="purchase_quote_code" />
<result property="materialId" column="material_id" />
<result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" />
<result property="materialType" column="material_type" />
<result property="processMethod" column="processMethod" />
<result property="brand" column="brand" />
<result property="photoUrl" column="photoUrl" />
<result property="describe" column="describe" />
<result property="taxRate" column="tax_rate" />
<result property="usdRate" column="usd_rate" />
<result property="materialNum" column="material_num" />
<result property="materialSole" column="material_sole" />
<result property="materialRmb" column="material_rmb" />
<result property="materialNormb" column="material_noRmb" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="useStatus" column="use_status" />
<result property="auditStatus" column="audit_status" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectSysPurchaseQuoteChildVo">
select purchase_quote_child_id, purchase_quote_code, material_id, material_code, material_name, material_type, processMethod, brand, photoUrl, describe, tax_rate, usd_rate, material_num, material_sole, material_rmb, material_noRmb, create_by, create_time, update_by, update_time, remark, use_status, audit_status, del_flag from sys_purchase_quote_child
select purchase_quote_child_id, purchase_quote_code, material_id, material_code,
material_name, material_type, processMethod, brand, photoUrl, `describe`, tax_rate, usd_rate,
material_num, material_sole, material_rmb, material_noRmb,
create_by, create_time, update_by, update_time, remark, use_status, audit_status,
del_flag from purchase_quote_child
</sql>
<select id="selectSysPurchaseQuoteChildList" parameterType="SysPurchaseQuoteChild" resultMap="SysPurchaseQuoteChildResult">
<select id="selectSysPurchaseQuoteChildList" parameterType="PurchaseQuoteChild" resultMap="PurchaseQuoteChildResult">
<include refid="selectSysPurchaseQuoteChildVo"/>
<where>
<if test="purchaseQuoteCode != null and purchaseQuoteCode != ''"> and purchase_quote_code = #{purchaseQuoteCode}</if>
@ -56,13 +59,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="selectSysPurchaseQuoteChildById" parameterType="Long" resultMap="SysPurchaseQuoteChildResult">
<select id="selectSysPurchaseQuoteChildById" parameterType="Long" resultMap="PurchaseQuoteChildResult">
<include refid="selectSysPurchaseQuoteChildVo"/>
where purchase_quote_child_id = #{purchaseQuoteChildId}
</select>
<insert id="insertSysPurchaseQuoteChild" parameterType="SysPurchaseQuoteChild" useGeneratedKeys="true" keyProperty="purchaseQuoteChildId">
insert into sys_purchase_quote_child
<insert id="insertSysPurchaseQuoteChild" parameterType="PurchaseQuoteChild" useGeneratedKeys="true" keyProperty="purchaseQuoteChildId">
insert into purchase_quote_child
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="purchaseQuoteCode != null">purchase_quote_code,</if>
<if test="materialId != null">material_id,</if>
@ -115,8 +118,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
</insert>
<update id="updateSysPurchaseQuoteChild" parameterType="SysPurchaseQuoteChild">
update sys_purchase_quote_child
<update id="updateSysPurchaseQuoteChild" parameterType="PurchaseQuoteChild">
update purchase_quote_child
<trim prefix="SET" suffixOverrides=",">
<if test="purchaseQuoteCode != null">purchase_quote_code = #{purchaseQuoteCode},</if>
<if test="materialId != null">material_id = #{materialId},</if>
@ -126,7 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="processMethod != null">processMethod = #{processMethod},</if>
<if test="brand != null">brand = #{brand},</if>
<if test="photoUrl != null">photoUrl = #{photoUrl},</if>
<if test="describe != null">describe = #{describe},</if>
<if test="describe != null">`describe` = #{describe},</if>
<if test="taxRate != null">tax_rate = #{taxRate},</if>
<if test="usdRate != null">usd_rate = #{usdRate},</if>
<if test="materialNum != null">material_num = #{materialNum},</if>
@ -146,22 +149,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteSysPurchaseQuoteChildById" parameterType="Long">
delete from sys_purchase_quote_child where purchase_quote_child_id = #{purchaseQuoteChildId}
delete from purchase_quote_child where purchase_quote_child_id = #{purchaseQuoteChildId}
</delete>
<delete id="deleteSysPurchaseQuoteChildByIds" parameterType="String">
delete from sys_purchase_quote_child where purchase_quote_child_id in
delete from purchase_quote_child where purchase_quote_child_id in
<foreach item="purchaseQuoteChildId" collection="array" open="(" separator="," close=")">
#{purchaseQuoteChildId}
</foreach>
</delete>
<update id="cancelSysPurchaseQuoteChildById" parameterType="Long">
update sys_purchase_quote_child set del_flag = '1' where purchase_quote_child_id = #{purchaseQuoteChildId}
update purchase_quote_child set del_flag = '1' where purchase_quote_child_id = #{purchaseQuoteChildId}
</update>
<update id="restoreSysPurchaseQuoteChildById" parameterType="Long">
update sys_purchase_quote_child set del_flag = '0' where purchase_quote_child_id = #{purchaseQuoteChildId}
update purchase_quote_child set del_flag = '0' where purchase_quote_child_id = #{purchaseQuoteChildId}
</update>
</mapper>

4
ruoyi-admin/src/main/resources/templates/purchase/plan/add.html → ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/add.html

@ -104,9 +104,7 @@
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "purchase/plan"
$("#form-plan-add").validate({
focusCleanup: true
});
$("#form-plan-add").validate({focusCleanup: true});
function submitHandler() {
if ($.validate.form()) {

119
ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/detail.html

@ -0,0 +1,119 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改采购计划单')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-plan-edit" th:object="${purchasePlan}">
<input name="purchasePlanId" th:field="*{purchasePlanId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">采购计划单号:</label>
<div class="col-sm-8">
<input name="purchasePlanCode" th:field="*{purchasePlanCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">采购计划状态:</label>
<div class="col-sm-8">
<select name="purchasePlanStatus" class="form-control m-b" th:with="type=${@dict.getType('purchase_plan_status')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{purchasePlanStatus}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">关联单号:</label>
<div class="col-sm-8">
<input name="correlationCode" th:field="*{correlationCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">采购来源:</label>
<div class="col-sm-8">
<select name="purchasePlanType" class="form-control m-b">
<option value="">所有</option>
</select>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料合计:</label>
<div class="col-sm-8">
<input name="materialAmount" th:field="*{materialAmount}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">数量总计:</label>
<div class="col-sm-8">
<input name="materialSum" th:field="*{materialSum}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">不含税总价(RMB):</label>
<div class="col-sm-8">
<input name="noRmbSum" th:field="*{noRmbSum}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">含税总价(RMB):</label>
<div class="col-sm-8">
<input name="rmbSum" th:field="*{rmbSum}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">申请人:</label>
<div class="col-sm-8">
<input name="applyUser" th:field="*{applyUser}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">录入时间:</label>
<div class="col-sm-8">
<input name="firstAddTime" th:field="*{firstAddTime}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">修改时间:</label>
<div class="col-sm-8">
<input name="updateInfoTime" th:field="*{updateInfoTime}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">审核状态:</label>
<div class="col-sm-8">
<select name="auditStatus" class="form-control m-b" th:with="type=${@dict.getType('auditStatus')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{auditStatus}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">使用状态:</label>
<div class="col-sm-8">
<select name="useStatus" class="form-control m-b" th:with="type=${@dict.getType('useStatus')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{useStatus}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<input name="remark" th:field="*{remark}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "purchase/purchasePlan";
$("#form-plan-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-plan-edit').serialize());
}
}
</script>
</body>
</html>

0
ruoyi-admin/src/main/resources/templates/purchase/plan/edit.html → ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/edit.html

165
ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/purchasePlan.html

@ -0,0 +1,165 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('采购计划单列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>采购计划单号:</label>
<input type="text" name="purchasePlanCode"/>
</li>
<li>
<label>采购计划状态:</label>
<select name="purchasePlanStatus" th:with="type=${@dict.getType('purchase_plan_status')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>关联单号:</label>
<input type="text" name="correlationCode"/>
</li>
<li>
<label>申请人:</label>
<input type="text" name="applyUser"/>
</li>
<li class="select-time">
<label>录入时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
</li>
<li>
<label>采购来源:</label>
<select name="purchasePlanType" th:with="type=${@dict.getType('purchase_plan_source')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="purchase:plan:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('purchase:plan:edit')}]];
var removeFlag = [[${@permission.hasPermi('purchase:plan:remove')}]];
var cancelFlag = [[${@permission.hasPermi('purchase:plan:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('purchase:plan:restore')}]];
var purchasePlanStatusDatas = [[${@dict.getType('purchase_plan_status')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var useStatusDatas = [[${@dict.getType('useStatus')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var sysUnitClassDatas = [[${@dict.getType('sysUnitClassDatas')}]];
var purchasePlanTypeDatas = [[${@dict.getType('purchase_plan_source')}]];
var prefix = ctx + "purchase/plan";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
cancelUrl: prefix + "/cancel/{id}",
detailUrl: prefix + "/detail/{id}",
restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export",
modalName: "采购计划单",
detailView: true,
fixedColumns: true, // 启用冻结列
rightFixedColumns:1,
fixedRightNumber: 1, // 冻结右列个数
onExpandRow:function(index,row,$detail){
$detail.html(
'<table class="table-container" id="purchase_plan_'+row.id+'"></table>'
).find('table');
// 一阶
initOneLevelTable(index,row,$detail);
},
columns: [
{checkbox: true},
{title: '采购计划索引id',field: 'purchasePlanId',visible: false},
{title: '采购计划单号',field: 'purchasePlanCode'},
{title: '采购计划状态',field: 'purchasePlanStatus',
formatter: function(value, row, index) {return $.table.selectDictLabel(purchasePlanStatusDatas, value);}
},
{title: '关联单号', field: 'correlationCode',},
{title: '采购来源',field: 'purchasePlanType',},
{title: '物料合计',field: 'materialAmount',},
{title: '数量总计', field: 'materialSum',},
{title: '不含税总价(RMB)',field: 'noRmbSum',},
{title: '含税总价(RMB)',field: 'rmbSum',},
{title: '申请人',field: 'applyUser',},
{title: '录入时间',field: 'createTime',},
{title: '更新人',field: 'updateBy',},
{title: '上次更新时间',field: 'updateTime',},
{title: '操作',align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' +
editFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.purchasePlanId + '\')"><i class="fa fa-edit"></i>详情</a> ');
return actions.join('');
}
}
]
};
$.table.init(options);
});
//采购计划物料清单
initOneLevelTable = function(index, row, $detail) {
$("#"+"purchase_plan_"+row.id).bootstrapTable({
url: prefix + "/oneLevelList",
method: 'post',
sidePagination: "server",
contentType: "application/x-www-form-urlencoded",
queryParams : {
parentId: row.id
},
columns: [
{field: 'purchasePlanId',title: '主键id',visible: false},
{field: 'materialNo',title: '料号',},
{field: 'photoUrl',title: '图片',
formatter: function(value, row, index) {return $.table.imageView(value);}
},
{field: 'materialName',title: '物料名称',},
{field: 'materialType',title: '物料类型',
formatter: function(value, row, index) {return $.table.selectCategoryLabel(materialTypeDatas, value);}
},
{field: 'describe',title: '描述',},
{field: 'brand',title: '品牌',},
{field: 'processMethod',title: '加工方式',
formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);}
},
{field: 'unit',title: '单位',
formatter: function(value, row, index) {return $.table.selectDictLabel(sysUnitClassDatas, value);}
},
{field: 'planNum',title: '计划采购数',
formatter: function(value, row, index) {return $.table.selectDictLabel(sysUnitClassDatas, value);}
},
]
});
};
</script>
</body>
</html>

138
ruoyi-admin/src/main/resources/templates/purchase/purchasePlanChild/add.html

@ -0,0 +1,138 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增采购计划单物料信息')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-purchasePlanChild-add">
<div class="form-group">
<label class="col-sm-3 control-label">关联采购计划编号字段:</label>
<div class="col-sm-8">
<input name="purchasePlanCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料表中的id:</label>
<div class="col-sm-8">
<input name="materialId" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料表中的编号:</label>
<div class="col-sm-8">
<input name="materialCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的名称:</label>
<div class="col-sm-8">
<input name="materialName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的类型:</label>
<div class="col-sm-8">
<select name="materialType" class="form-control m-b">
<option value="">所有</option>
</select>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的加工方式:</label>
<div class="col-sm-8">
<input name="processMethod" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的品牌:</label>
<div class="col-sm-8">
<input name="brand" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的图片:</label>
<div class="col-sm-8">
<input name="photoUrl" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的描述:</label>
<div class="col-sm-8">
<input name="describe" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">采购计划数:</label>
<div class="col-sm-8">
<input name="materialNum" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的对外报价:</label>
<div class="col-sm-8">
<input name="materialSole" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的不含税单价(RMB):</label>
<div class="col-sm-8">
<input name="materialRmb" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的含税单价(RMB):</label>
<div class="col-sm-8">
<input name="materialNormb" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="remark" class="form-control"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">使用状态:</label>
<div class="col-sm-8">
<div class="radio-box">
<input type="radio" name="useStatus" value="">
<label th:for="useStatus" th:text="未知"></label>
</div>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">审核状态:</label>
<div class="col-sm-8">
<div class="radio-box">
<input type="radio" name="auditStatus" value="">
<label th:for="auditStatus" th:text="未知"></label>
</div>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">删除标志:</label>
<div class="col-sm-8">
<input name="delFlag" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "purchase/purchasePlanChild"
$("#form-purchasePlanChild-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-purchasePlanChild-add').serialize());
}
}
</script>
</body>
</html>

133
ruoyi-admin/src/main/resources/templates/purchase/purchasePlanChild/edit.html

@ -0,0 +1,133 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改采购计划单物料信息')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-purchasePlanChild-edit" th:object="${purchasePlanChild}">
<input name="purchasePlanChildId" th:field="*{purchasePlanChildId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">关联采购计划编号字段:</label>
<div class="col-sm-8">
<input name="purchasePlanCode" th:field="*{purchasePlanCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料表中的id:</label>
<div class="col-sm-8">
<input name="materialId" th:field="*{materialId}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料表中的编号:</label>
<div class="col-sm-8">
<input name="materialCode" th:field="*{materialCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的名称:</label>
<div class="col-sm-8">
<input name="materialName" th:field="*{materialName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的类型:</label>
<div class="col-sm-8">
<select name="materialType" class="form-control m-b">
<option value="">所有</option>
</select>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的加工方式:</label>
<div class="col-sm-8">
<input name="processMethod" th:field="*{processMethod}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的品牌:</label>
<div class="col-sm-8">
<input name="brand" th:field="*{brand}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的图片:</label>
<div class="col-sm-8">
<input name="photoUrl" th:field="*{photoUrl}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的描述:</label>
<div class="col-sm-8">
<input name="describe" th:field="*{describe}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">采购计划数:</label>
<div class="col-sm-8">
<input name="materialNum" th:field="*{materialNum}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的对外报价:</label>
<div class="col-sm-8">
<input name="materialSole" th:field="*{materialSole}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的不含税单价(RMB):</label>
<div class="col-sm-8">
<input name="materialRmb" th:field="*{materialRmb}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的含税单价(RMB):</label>
<div class="col-sm-8">
<input name="materialNormb" th:field="*{materialNormb}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="remark" class="form-control">[[*{remark}]]</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">使用状态:</label>
<div class="col-sm-8">
<div class="radio-box">
<input type="radio" name="useStatus" value="">
<label th:for="useStatus" th:text="未知"></label>
</div>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">审核状态:</label>
<div class="col-sm-8">
<div class="radio-box">
<input type="radio" name="auditStatus" value="">
<label th:for="auditStatus" th:text="未知"></label>
</div>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "purchase/purchasePlanChild";
$("#form-purchasePlanChild-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-purchasePlanChild-edit').serialize());
}
}
</script>
</body>
</html>

142
ruoyi-admin/src/main/resources/templates/purchase/plan/plan.html → ruoyi-admin/src/main/resources/templates/purchase/purchasePlanChild/purchasePlanChild.html

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('采购计划单列表')" />
<th:block th:include="include :: header('采购计划单物料信息列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
@ -11,37 +11,53 @@
<div class="select-list">
<ul>
<li>
<label>采购计划单号:</label>
<label>采购计划物料清单索引:</label>
<input type="text" name="purchasePlanChildId"/>
</li>
<li>
<label>关联采购计划编号字段:</label>
<input type="text" name="purchasePlanCode"/>
</li>
<li>
<label>采购计划状态:</label>
<select name="purchasePlanStatus" th:with="type=${@dict.getType('purchase_plan_status')}">
<label>物料表中的id:</label>
<input type="text" name="materialId"/>
</li>
<li>
<label>物料表中的编号:</label>
<input type="text" name="materialCode"/>
</li>
<li>
<label>物料的名称:</label>
<input type="text" name="materialName"/>
</li>
<li>
<label>物料的类型:</label>
<select name="materialType">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
<option value="-1">代码生成请选择字典属性</option>
</select>
</li>
<li>
<label>关联单号:</label>
<input type="text" name="correlationCode"/>
<label>物料的加工方式</label>
<input type="text" name="processMethod"/>
</li>
<li>
<label>申请人:</label>
<input type="text" name="applyUser"/>
<label>物料的品牌</label>
<input type="text" name="brand"/>
</li>
<li>
<label>录入时间:</label>
<input type="text" name="firstAddTime"/>
<label>使用状态:</label>
<select name="useStatus">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</option>
</select>
</li>
<li>
<label>修改时间:</label>
<input type="text" name="updateInfoTime"/>
</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]"/>
<label>审核状态:</label>
<select name="auditStatus">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</option>
</select>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
@ -53,16 +69,16 @@
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="purchase:plan:add">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="purchase:purchasePlanChild:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="purchase:plan:edit">
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="purchase:purchasePlanChild:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="purchase:plan:remove">
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="purchase:purchasePlanChild:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="purchase:plan:export">
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="purchase:purchasePlanChild:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
@ -73,14 +89,11 @@
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('purchase:plan:edit')}]];
var removeFlag = [[${@permission.hasPermi('purchase:plan:remove')}]];
var cancelFlag = [[${@permission.hasPermi('purchase:plan:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('purchase:plan:restore')}]];
var purchasePlanStatusDatas = [[${@dict.getType('purchase_plan_status')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var useStatusDatas = [[${@dict.getType('useStatus')}]];
var prefix = ctx + "purchase/plan";
var editFlag = [[${@permission.hasPermi('purchase:purchasePlanChild:edit')}]];
var removeFlag = [[${@permission.hasPermi('purchase:purchasePlanChild:remove')}]];
var cancelFlag = [[${@permission.hasPermi('purchase:purchasePlanChild:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('purchase:purchasePlanChild:restore')}]];
var prefix = ctx + "purchase/purchasePlanChild";
$(function() {
var options = {
@ -91,81 +104,62 @@
cancelUrl: prefix + "/cancel/{id}",
restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export",
modalName: "采购计划单",
modalName: "采购计划单物料信息",
columns: [{
checkbox: true
},
{
title: '采购计划索引id',
field: 'purchasePlanId',
title: '采购计划物料清单索引',
field: 'purchasePlanChildId',
visible: false
},
{
title: '采购计划单号',
title: '关联采购计划编号字段',
field: 'purchasePlanCode',
},
{
title: '采购计划状态',
field: 'purchasePlanStatus',
formatter: function(value, row, index) {
return $.table.selectDictLabel(purchasePlanStatusDatas, value);
}
},
{
title: '关联单号',
field: 'correlationCode',
},
{
title: '采购来源',
field: 'purchasePlanType',
},
{
title: '物料合计',
field: 'materialAmount',
},
{
title: '数量总计',
field: 'materialSum',
title: '物料表中的id',
field: 'materialId',
},
{
title: '不含税总价(RMB)',
field: 'noRmbSum',
title: '物料表中的编号',
field: 'materialCode',
},
{
title: '含税总价(RMB)',
field: 'rmbSum',
title: '物料的名称',
field: 'materialName',
},
{
title: '申请人',
field: 'applyUser',
title: '物料的类型',
field: 'materialType',
},
{
title: '录入时间',
field: 'firstAddTime',
title: '物料的加工方式',
field: 'processMethod',
},
{
title: '修改时间',
field: 'updateInfoTime',
title: '物料的品牌',
field: 'brand',
},
{
title: '录入时间',
field: 'createTime',
title: '物料的图片',
field: 'photoUrl',
},
{
title: '更新人',
field: 'updateBy',
title: '物料的描述',
field: 'describe',
},
{
title: '上次更新时间',
field: 'updateTime',
title: '采购计划数',
field: 'materialNum',
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.purchasePlanId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.purchasePlanId + '\')"><i class="fa fa-remove"></i>删除</a> ');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.purchasePlanChildId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.purchasePlanChildId + '\')"><i class="fa fa-remove"></i>删除</a> ');
if(row.delFlag == '0'){
actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a> ');
}else{

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

@ -4,6 +4,7 @@
<th:block th:include="include :: header('新增采购报价单')" />
<th:block th:include="include :: select2-css" />
<th:block th:include="include :: datetimepicker-css" />
<th:block th:include="include :: bootstrap-editable-css" />
<link th:href="@{/ajax/libs/element-ui/element-ui.css}" rel="stylesheet"/>
</head>
<body class="white-bg">
@ -94,6 +95,7 @@
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<th:block th:include="include :: bootstrap-table-editable-js" />
<th:block th:include="include :: datetimepicker-js" />
<script th:src="@{/ajax/libs/vue/vue.js}"></script>
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
@ -206,7 +208,7 @@
}
},
{title: '最新报价',field: 'materialSole',align: 'center',},
{title: '物料的数量', field: 'materialNum',align: 'center',editable: true,},
{title: '物料的数量', field: 'materialNum',align: 'center',editable: true},
{title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',},
{title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center',},
{title: '录入人',field: 'createBy',align: 'center',visible: false},
@ -224,7 +226,6 @@
]
};
$.table.init(options);
selectSupplierCode();
selectSupplierName();
});
function doSubmit(index, layero,uniqueId){
@ -266,38 +267,27 @@
}
/* 删除指定表格行 */
function removeRow(id){
$("#bootstrap-sub-table-requisitionChild").bootstrapTable('remove', {
$("#bootstrap-sub-table-requisitionChild").bootstrapTable('RemoveByUniqueId', {
field: 'id',
values: id
})
}
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-purchaseQuote-add').serialize());
var formData = $("#form-purchaseQuote-add").serializeArray();
console.log("formData",formData);
var tableData = $("#bootstrap-sub-table-purchaseQuoteChild").bootstrapTable('getData');
var rows = tableData.length;
if(rows==0){
$.modal.msgError("子表数据不能为空!");
}else{
formData.push({"name": "purchaseQuoteChildList", "value": tableData});
var jsonData = $.common.formDataToJson(formData);
$.operate.saveJson(prefix + "/add", jsonData);
}
}
}
//获取供应商
function selectSupplierCode(){
$.ajax({
url: ctx + 'system/supplier/getSupplier',
type: "post",
dataType: "json",
success: function (res) {
if (res.rows.length > 0) {
var usertData = res.rows;
//alert(JSON.stringify(data));
for (let i in usertData) {
// console.log(finishProductData[i].finishProductCode)
$("#form-purchaseQuote-add select[name='supplierCode']").append(
"<option value='" + usertData[i].supplierCode + "'>" + usertData[i].supplierCode + "</option>");
}
} else {
$.modal.msgError(res.msg);
}
}
});
}
function selectSupplierName(){
$.ajax({
url: ctx + 'system/supplier/getSupplier',
@ -308,6 +298,8 @@
var usertData = res.rows;
//alert(JSON.stringify(data));
for (let i in usertData) {
$("#form-purchaseQuote-add select[name='supplierQuoteCode']").append(
"<option value='" + usertData[i].supplierCode + "'>" + usertData[i].supplierCode + "</option>");
// console.log(finishProductData[i].finishProductCode)
$("#form-purchaseQuote-add select[name='supplierName']").append(
"<option value='" + usertData[i].supplierName + "'>" + usertData[i].supplierName + "</option>");

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

@ -2,12 +2,16 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改采购报价单')" />
<th:block th:include="include :: select2-css" />
<th:block th:include="include :: datetimepicker-css" />
<th:block th:include="include :: bootstrap-editable-css" />
<link th:href="@{/ajax/libs/element-ui/element-ui.css}" rel="stylesheet"/>
</head>
<body class="white-bg">
<div 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-edit" th:object="${purchaseQuote}">
<input name="purchaseQuoteId" th:field="*{purchaseQuoteId}" type="hidden">
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">采购报价单号:</label>
<div class="col-sm-8">
<input name="purchaseQuoteCode" th:field="*{purchaseQuoteCode}" class="form-control" type="text">
@ -16,7 +20,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">供应商ID:</label>
<div class="col-sm-8">
<select id="supplierCode" name="supplierCode" th:field="*{supplierCode}" class="form-control"></select>
<select id="supplierCode" name="supplierQuoteCode" th:field="*{supplierQuoteCode}" class="form-control"></select>
</div>
</div>
<div class="form-group">
@ -25,11 +29,11 @@
<select name="supplierName" th:field="*{supplierName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">定价时间:</label>
<div class="col-sm-8">
<div class="form-group">
<label class="col-sm-3 control-label">定价日期:</label>
<div class="input-group date">
<input name="pricingDate" th:field="*{pricingDate}" class="form-control" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
<div class="form-group">
@ -39,7 +43,26 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" th:text="'附件'"></label>附件:</label>
<label class="col-sm-3 control-label">附件:</label>
<div class="col-sm-8">
<el-upload
:action="fileUploadUrl"
:on-success="uploadSuccess"
:on-preview="handlePictureCardPreview"
:on-remove="uploadRemove"
:file-list="fileList"
:limit="5"
list-type="picture"
accept=".jpg,.png"
multiple>
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,第一张图片为主图</div>
</el-upload>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
</div>
<input id="fileIdStr" type="text" name="fileIdStr" hidden>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">税率:</label>
@ -65,8 +88,78 @@
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<th:block th:include="include :: bootstrap-table-editable-js" />
<th:block th:include="include :: datetimepicker-js" />
<script th:src="@{/ajax/libs/vue/vue.js}"></script>
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
<script th:inline="javascript">
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var userName = [[${@permission.getPrincipalProperty('userName')}]];
var prefix = ctx + "purchase/purchaseQuote";
var purchaseQuote = [[${purchaseQuote}]];
new Vue({
el: '#app',
data: function() {
return {
fileList: [],
fileUploadUrl: ctx + "common/uploadSingleFile",
fileDeleteUrl: ctx + "common/deleteFile",
fileIdList:[],
dialogImageUrl: '',
dialogVisible: false
}
},
methods: {
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
},
uploadSuccess(response, file, fileList) {
console.log(response);
if(response.code == web_status.SUCCESS){
var attachFileId = response.data.id;
file.attachFileId = attachFileId;
this.fileIdList.push(attachFileId);
$("#fileIdStr").val(this.fileIdList.join(";"));
$.modal.msgSuccess("上传成功");
}else{
$.modal.alertError(response.msg);
}
},
uploadRemove(file, fileList) {
console.log(file, fileList);
var attachFileId = file.attachFileId;
$.ajax({
type: "get",
url: this.fileDeleteUrl,
data: {id:attachFileId},
cache: false,
async: false, // 设置成同步
dataType: 'json',
success: function(result) {
if (result.code == web_status.SUCCESS) {
var index = this.fileIdList.indexOf(attachFileId);
if(index!=-1){
this.fileIdList.splice(index,1);
$("#fileIdStr").val(this.fileIdList.join(";"));
}
$.modal.msgSuccess("删除附件成功。");
} else {
$.modal.alertError(result.msg);
}
},
error: function(error) {
$.modal.alertError("删除附件失败。");
}
});
},
}
});
$("#form-purchaseQuote-edit").validate({focusCleanup: true});
$(function() {
var options = {
@ -174,9 +267,48 @@
}
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-purchaseQuote-edit').serialize());
var formData = $("#form-purchaseQuote-edit").serializeArray();
console.log("formData",formData);
var tableData = $("#bootstrap-sub-table-purchaseQuoteChild").bootstrapTable('getData');
var rows = tableData.length;
if(rows==0){
$.modal.msgError("子表数据不能为空!");
}else{
formData.push({"name": "purchaseQuoteChildList", "value": tableData});
var jsonData = $.common.formDataToJson(formData);
$.operate.saveJson(prefix + "/edit", jsonData);
}
}
}
function selectSupplierName(){
$.ajax({
url: ctx + 'system/supplier/getSupplier',
type: "post",
dataType: "json",
success: function (res) {
if (res.rows.length > 0) {
var usertData = res.rows;
//alert(JSON.stringify(data));
for (let i in usertData) {
// console.log(finishProductData[i].finishProductCode)
$("#form-purchaseQuote-add select[name='supplierQuoteCode']").append(
"<option value='" + usertData[i].supplierCode + "'>" + usertData[i].supplierCode + "</option>");
$("#form-purchaseQuote-add select[name='supplierName']").append(
"<option value='" + usertData[i].supplierName + "'>" + usertData[i].supplierName + "</option>");
}
$("#form-purchaseQuote-add select[name='supplierQuoteCode']").val(purchaseQuote.supplierQuoteCode);
$("#form-purchaseQuote-add select[name='supplierName']").val(purchaseQuote.supplierName);
} else {
$.modal.msgError(res.msg);
}
}
});
}
$("input[name='pricingDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

2
ruoyi-admin/src/main/resources/templates/system/purchaseQuoteChild/add.html → ruoyi-admin/src/main/resources/templates/purchase/purchaseQuoteChild/add.html

@ -133,7 +133,7 @@
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/purchaseQuoteChild"
var prefix = ctx + "purchase/purchaseQuoteChild";
$("#form-purchaseQuoteChild-add").validate({
focusCleanup: true
});

2
ruoyi-admin/src/main/resources/templates/system/purchaseQuoteChild/edit.html → ruoyi-admin/src/main/resources/templates/purchase/purchaseQuoteChild/edit.html

@ -128,7 +128,7 @@
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/purchaseQuoteChild";
var prefix = ctx + "purchase/purchaseQuoteChild";
$("#form-purchaseQuoteChild-edit").validate({
focusCleanup: true
});

2
ruoyi-admin/src/main/resources/templates/system/purchaseQuoteChild/purchaseQuoteChild.html → ruoyi-admin/src/main/resources/templates/purchase/purchaseQuoteChild/purchaseQuoteChild.html

@ -115,7 +115,7 @@
var restoreFlag = [[${@permission.hasPermi('system:purchaseQuoteChild:restore')}]];
var useStatusDatas = [[${@dict.getType('useStatus')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var prefix = ctx + "system/purchaseQuoteChild";
var prefix = ctx + "purchase/purchaseQuoteChild";
$(function() {
var options = {
Loading…
Cancel
Save