Browse Source

[add]采购管理:

新增采购入库通知单
完成数据填充,页面展示,条件查询操作
dev
liuxiaoxu 7 months ago
parent
commit
e8f49fae10
  1. 151
      ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseStorageController.java
  2. 342
      ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseStorage.java
  3. 77
      ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseStorageMapper.java
  4. 75
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseStorageService.java
  5. 126
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseStorageServiceImpl.java
  6. 2
      ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteMapper.xml
  7. 167
      ruoyi-admin/src/main/resources/mapper/purchase/PurchaseStorageMapper.xml
  8. 6
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/purchaseQuote.html
  9. 208
      ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/add.html
  10. 209
      ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/edit.html
  11. 246
      ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/purchaseStorage.html

151
ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseStorageController.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.PurchaseStorage;
import com.ruoyi.purchase.service.IPurchaseStorageService;
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 刘晓旭
* @date 2024-04-16
*/
@Controller
@RequestMapping("/purchase/purchaseStorage")
public class PurchaseStorageController extends BaseController
{
private String prefix = "purchase/purchaseStorage";
@Autowired
private IPurchaseStorageService purchaseStorageService;
@RequiresPermissions("purchase:purchaseStorage:view")
@GetMapping()
public String purchaseStorage()
{
return prefix + "/purchaseStorage";
}
/**
* 查询采购入库通知单列表
*/
@RequiresPermissions("purchase:purchaseStorage:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(PurchaseStorage purchaseStorage)
{
startPage();
List<PurchaseStorage> list = purchaseStorageService.selectPurchaseStorageList(purchaseStorage);
return getDataTable(list);
}
/**
* 导出采购入库通知单列表
*/
@RequiresPermissions("purchase:purchaseStorage:export")
@Log(title = "采购入库通知单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(PurchaseStorage purchaseStorage)
{
List<PurchaseStorage> list = purchaseStorageService.selectPurchaseStorageList(purchaseStorage);
ExcelUtil<PurchaseStorage> util = new ExcelUtil<PurchaseStorage>(PurchaseStorage.class);
return util.exportExcel(list, "采购入库通知单数据");
}
/**
* 新增采购入库通知单
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存采购入库通知单
*/
@RequiresPermissions("purchase:purchaseStorage:add")
@Log(title = "采购入库通知单", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(PurchaseStorage purchaseStorage)
{
return toAjax(purchaseStorageService.insertPurchaseStorage(purchaseStorage));
}
/**
* 修改采购入库通知单
*/
@GetMapping("/edit/{purchaseStorageId}")
public String edit(@PathVariable("purchaseStorageId") Long purchaseStorageId, ModelMap mmap)
{
PurchaseStorage purchaseStorage = purchaseStorageService.selectPurchaseStorageById(purchaseStorageId);
mmap.put("purchaseStorage", purchaseStorage);
return prefix + "/edit";
}
/**
* 修改保存采购入库通知单
*/
@RequiresPermissions("purchase:purchaseStorage:edit")
@Log(title = "采购入库通知单", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(PurchaseStorage purchaseStorage)
{
return toAjax(purchaseStorageService.updatePurchaseStorage(purchaseStorage));
}
/**
* 删除采购入库通知单
*/
@RequiresPermissions("purchase:purchaseStorage:remove")
@Log(title = "采购入库通知单", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(purchaseStorageService.deletePurchaseStorageByIds(ids));
}
/**
* 作废采购入库通知单
*/
@RequiresPermissions("purchase:purchaseStorage:cancel")
@Log(title = "采购入库通知单", businessType = BusinessType.CANCEL)
@GetMapping( "/cancel/{id}")
@ResponseBody
public AjaxResult cancel(@PathVariable("id") Long id){
return toAjax(purchaseStorageService.cancelPurchaseStorageById(id));
}
/**
* 恢复采购入库通知单
*/
@RequiresPermissions("purchase:purchaseStorage:restore")
@Log(title = "采购入库通知单", businessType = BusinessType.RESTORE)
@GetMapping( "/restore/{id}")
@ResponseBody
public AjaxResult restore(@PathVariable("id")Long id)
{
return toAjax(purchaseStorageService.restorePurchaseStorageById(id));
}
}

342
ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseStorage.java

@ -0,0 +1,342 @@
package com.ruoyi.purchase.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
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_storage
*
* @author 刘晓旭
* @date 2024-04-16
*/
public class PurchaseStorage extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 采购入库单id */
private Long purchaseStorageId;
/** 入库单号 */
@Excel(name = "入库单号")
private String purchaseStorageCode;
/** 关联订单号 */
@Excel(name = "关联订单号")
private String purchaseOrderCode;
/** 入库状态 */
@Excel(name = "入库状态")
private String storageStatus;
/** 品质状态 */
@Excel(name = "品质状态")
private String qualityStatus;
/** 入库类型 */
@Excel(name = "入库类型")
private String purchaseStorageType;
/** 订单类型 */
@Excel(name = "订单类型")
private String purchaseOrderType;
/** 入库部门 */
@Excel(name = "入库部门")
private String purchaseDeptType;
/** 通知已到货数量 */
@Excel(name = "通知已到货数量")
private Long notifyArrivedNum;
/** 实际已到货数量 */
@Excel(name = "实际已到货数量")
private Long actualArrivedNum;
/** 暂收合格数量 */
@Excel(name = "暂收合格数量")
private Long temporaryQualifiedNum;
/** 暂收不合格数量 */
@Excel(name = "暂收不合格数量")
private Long temporaryUnqualifiedNum;
/** 品质合格数量 */
@Excel(name = "品质合格数量")
private Long qualityQualifiedNum;
/** 入库数量 */
@Excel(name = "入库数量")
private Long storageNum;
/** 到货时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "到货时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date arrivedTime;
/** 暂收时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "暂收时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date temporaryTime;
/** 交付质检时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "交付质检时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date deliveryInspectionTime;
/** 品质时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "品质时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date qualityTime;
/** 入库时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "入库时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date storageTime;
/** 仓库员 */
@Excel(name = "仓库员")
private String storageEmployee;
/** 仓库ID */
@Excel(name = "仓库ID")
private Long stockId;
/** 仓库名称 */
@Excel(name = "仓库名称")
private String stockName;
public void setPurchaseStorageId(Long purchaseStorageId)
{
this.purchaseStorageId = purchaseStorageId;
}
public Long getPurchaseStorageId()
{
return purchaseStorageId;
}
public void setPurchaseStorageCode(String purchaseStorageCode)
{
this.purchaseStorageCode = purchaseStorageCode;
}
public String getPurchaseStorageCode()
{
return purchaseStorageCode;
}
public void setPurchaseOrderCode(String purchaseOrderCode)
{
this.purchaseOrderCode = purchaseOrderCode;
}
public String getPurchaseOrderCode()
{
return purchaseOrderCode;
}
public void setStorageStatus(String storageStatus)
{
this.storageStatus = storageStatus;
}
public String getStorageStatus()
{
return storageStatus;
}
public void setQualityStatus(String qualityStatus)
{
this.qualityStatus = qualityStatus;
}
public String getQualityStatus()
{
return qualityStatus;
}
public void setPurchaseStorageType(String purchaseStorageType)
{
this.purchaseStorageType = purchaseStorageType;
}
public String getPurchaseStorageType()
{
return purchaseStorageType;
}
public void setPurchaseOrderType(String purchaseOrderType)
{
this.purchaseOrderType = purchaseOrderType;
}
public String getPurchaseOrderType()
{
return purchaseOrderType;
}
public void setPurchaseDeptType(String purchaseDeptType)
{
this.purchaseDeptType = purchaseDeptType;
}
public String getPurchaseDeptType()
{
return purchaseDeptType;
}
public void setNotifyArrivedNum(Long notifyArrivedNum)
{
this.notifyArrivedNum = notifyArrivedNum;
}
public Long getNotifyArrivedNum()
{
return notifyArrivedNum;
}
public void setActualArrivedNum(Long actualArrivedNum)
{
this.actualArrivedNum = actualArrivedNum;
}
public Long getActualArrivedNum()
{
return actualArrivedNum;
}
public void setTemporaryQualifiedNum(Long temporaryQualifiedNum)
{
this.temporaryQualifiedNum = temporaryQualifiedNum;
}
public Long getTemporaryQualifiedNum()
{
return temporaryQualifiedNum;
}
public void setTemporaryUnqualifiedNum(Long temporaryUnqualifiedNum)
{
this.temporaryUnqualifiedNum = temporaryUnqualifiedNum;
}
public Long getTemporaryUnqualifiedNum()
{
return temporaryUnqualifiedNum;
}
public void setQualityQualifiedNum(Long qualityQualifiedNum)
{
this.qualityQualifiedNum = qualityQualifiedNum;
}
public Long getQualityQualifiedNum()
{
return qualityQualifiedNum;
}
public void setStorageNum(Long storageNum)
{
this.storageNum = storageNum;
}
public Long getStorageNum()
{
return storageNum;
}
public void setArrivedTime(Date arrivedTime)
{
this.arrivedTime = arrivedTime;
}
public Date getArrivedTime()
{
return arrivedTime;
}
public void setTemporaryTime(Date temporaryTime)
{
this.temporaryTime = temporaryTime;
}
public Date getTemporaryTime()
{
return temporaryTime;
}
public void setDeliveryInspectionTime(Date deliveryInspectionTime)
{
this.deliveryInspectionTime = deliveryInspectionTime;
}
public Date getDeliveryInspectionTime()
{
return deliveryInspectionTime;
}
public void setQualityTime(Date qualityTime)
{
this.qualityTime = qualityTime;
}
public Date getQualityTime()
{
return qualityTime;
}
public void setStorageTime(Date storageTime)
{
this.storageTime = storageTime;
}
public Date getStorageTime()
{
return storageTime;
}
public void setStorageEmployee(String storageEmployee)
{
this.storageEmployee = storageEmployee;
}
public String getStorageEmployee()
{
return storageEmployee;
}
public void setStockId(Long stockId)
{
this.stockId = stockId;
}
public Long getStockId()
{
return stockId;
}
public void setStockName(String stockName)
{
this.stockName = stockName;
}
public String getStockName()
{
return stockName;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("purchaseStorageId", getPurchaseStorageId())
.append("purchaseStorageCode", getPurchaseStorageCode())
.append("purchaseOrderCode", getPurchaseOrderCode())
.append("storageStatus", getStorageStatus())
.append("qualityStatus", getQualityStatus())
.append("purchaseStorageType", getPurchaseStorageType())
.append("purchaseOrderType", getPurchaseOrderType())
.append("purchaseDeptType", getPurchaseDeptType())
.append("notifyArrivedNum", getNotifyArrivedNum())
.append("actualArrivedNum", getActualArrivedNum())
.append("temporaryQualifiedNum", getTemporaryQualifiedNum())
.append("temporaryUnqualifiedNum", getTemporaryUnqualifiedNum())
.append("qualityQualifiedNum", getQualityQualifiedNum())
.append("storageNum", getStorageNum())
.append("arrivedTime", getArrivedTime())
.append("temporaryTime", getTemporaryTime())
.append("deliveryInspectionTime", getDeliveryInspectionTime())
.append("qualityTime", getQualityTime())
.append("storageTime", getStorageTime())
.append("storageEmployee", getStorageEmployee())
.append("stockId", getStockId())
.append("stockName", getStockName())
.append("createTime", getCreateTime())
.append("createBy", getCreateBy())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

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

@ -0,0 +1,77 @@
package com.ruoyi.purchase.mapper;
import java.util.List;
import com.ruoyi.purchase.domain.PurchaseStorage;
/**
* 采购入库通知单Mapper接口
*
* @author 刘晓旭
* @date 2024-04-16
*/
public interface PurchaseStorageMapper
{
/**
* 查询采购入库通知单
*
* @param purchaseStorageId 采购入库通知单ID
* @return 采购入库通知单
*/
public PurchaseStorage selectPurchaseStorageById(Long purchaseStorageId);
/**
* 查询采购入库通知单列表
*
* @param purchaseStorage 采购入库通知单
* @return 采购入库通知单集合
*/
public List<PurchaseStorage> selectPurchaseStorageList(PurchaseStorage purchaseStorage);
/**
* 新增采购入库通知单
*
* @param purchaseStorage 采购入库通知单
* @return 结果
*/
public int insertPurchaseStorage(PurchaseStorage purchaseStorage);
/**
* 修改采购入库通知单
*
* @param purchaseStorage 采购入库通知单
* @return 结果
*/
public int updatePurchaseStorage(PurchaseStorage purchaseStorage);
/**
* 删除采购入库通知单
*
* @param purchaseStorageId 采购入库通知单ID
* @return 结果
*/
public int deletePurchaseStorageById(Long purchaseStorageId);
/**
* 批量删除采购入库通知单
*
* @param purchaseStorageIds 需要删除的数据ID
* @return 结果
*/
public int deletePurchaseStorageByIds(String[] purchaseStorageIds);
/**
* 作废采购入库通知单
*
* @param purchaseStorageId 采购入库通知单ID
* @return 结果
*/
public int cancelPurchaseStorageById(Long purchaseStorageId);
/**
* 恢复采购入库通知单
*
* @param purchaseStorageId 采购入库通知单ID
* @return 结果
*/
public int restorePurchaseStorageById(Long purchaseStorageId);
}

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

@ -0,0 +1,75 @@
package com.ruoyi.purchase.service;
import java.util.List;
import com.ruoyi.purchase.domain.PurchaseStorage;
/**
* 采购入库通知单Service接口
*
* @author 刘晓旭
* @date 2024-04-16
*/
public interface IPurchaseStorageService
{
/**
* 查询采购入库通知单
*
* @param purchaseStorageId 采购入库通知单ID
* @return 采购入库通知单
*/
public PurchaseStorage selectPurchaseStorageById(Long purchaseStorageId);
/**
* 查询采购入库通知单列表
*
* @param purchaseStorage 采购入库通知单
* @return 采购入库通知单集合
*/
public List<PurchaseStorage> selectPurchaseStorageList(PurchaseStorage purchaseStorage);
/**
* 新增采购入库通知单
*
* @param purchaseStorage 采购入库通知单
* @return 结果
*/
public int insertPurchaseStorage(PurchaseStorage purchaseStorage);
/**
* 修改采购入库通知单
*
* @param purchaseStorage 采购入库通知单
* @return 结果
*/
public int updatePurchaseStorage(PurchaseStorage purchaseStorage);
/**
* 批量删除采购入库通知单
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deletePurchaseStorageByIds(String ids);
/**
* 删除采购入库通知单信息
*
* @param purchaseStorageId 采购入库通知单ID
* @return 结果
*/
public int deletePurchaseStorageById(Long purchaseStorageId);
/**
* 作废采购入库通知单
* @param purchaseStorageId 采购入库通知单ID
* @return
*/
int cancelPurchaseStorageById(Long purchaseStorageId);
/**
* 恢复采购入库通知单
* @param purchaseStorageId 采购入库通知单ID
* @return
*/
int restorePurchaseStorageById(Long purchaseStorageId);
}

126
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseStorageServiceImpl.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.PurchaseStorageMapper;
import com.ruoyi.purchase.domain.PurchaseStorage;
import com.ruoyi.purchase.service.IPurchaseStorageService;
import com.ruoyi.common.core.text.Convert;
/**
* 采购入库通知单Service业务层处理
*
* @author 刘晓旭
* @date 2024-04-16
*/
@Service
public class PurchaseStorageServiceImpl implements IPurchaseStorageService
{
@Autowired
private PurchaseStorageMapper purchaseStorageMapper;
/**
* 查询采购入库通知单
*
* @param purchaseStorageId 采购入库通知单ID
* @return 采购入库通知单
*/
@Override
public PurchaseStorage selectPurchaseStorageById(Long purchaseStorageId)
{
return purchaseStorageMapper.selectPurchaseStorageById(purchaseStorageId);
}
/**
* 查询采购入库通知单列表
*
* @param purchaseStorage 采购入库通知单
* @return 采购入库通知单
*/
@Override
public List<PurchaseStorage> selectPurchaseStorageList(PurchaseStorage purchaseStorage)
{
return purchaseStorageMapper.selectPurchaseStorageList(purchaseStorage);
}
/**
* 新增采购入库通知单
*
* @param purchaseStorage 采购入库通知单
* @return 结果
*/
@Override
public int insertPurchaseStorage(PurchaseStorage purchaseStorage)
{
purchaseStorage.setCreateTime(DateUtils.getNowDate());
String loginName = ShiroUtils.getLoginName();
purchaseStorage.setCreateBy(loginName);
return purchaseStorageMapper.insertPurchaseStorage(purchaseStorage);
}
/**
* 修改采购入库通知单
*
* @param purchaseStorage 采购入库通知单
* @return 结果
*/
@Override
public int updatePurchaseStorage(PurchaseStorage purchaseStorage)
{
String loginName = ShiroUtils.getLoginName();
purchaseStorage.setUpdateBy(loginName);
purchaseStorage.setUpdateTime(DateUtils.getNowDate());
return purchaseStorageMapper.updatePurchaseStorage(purchaseStorage);
}
/**
* 删除采购入库通知单对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deletePurchaseStorageByIds(String ids)
{
return purchaseStorageMapper.deletePurchaseStorageByIds(Convert.toStrArray(ids));
}
/**
* 删除采购入库通知单信息
*
* @param purchaseStorageId 采购入库通知单ID
* @return 结果
*/
@Override
public int deletePurchaseStorageById(Long purchaseStorageId)
{
return purchaseStorageMapper.deletePurchaseStorageById(purchaseStorageId);
}
/**
* 作废采购入库通知单
*
* @param purchaseStorageId 采购入库通知单ID
* @return 结果
*/
@Override
public int cancelPurchaseStorageById(Long purchaseStorageId)
{
return purchaseStorageMapper.cancelPurchaseStorageById(purchaseStorageId);
}
/**
* 恢复采购入库通知单信息
*
* @param purchaseStorageId 采购入库通知单ID
* @return 结果
*/
@Override
public int restorePurchaseStorageById(Long purchaseStorageId)
{
return purchaseStorageMapper.restorePurchaseStorageById(purchaseStorageId);
}
}

2
ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteMapper.xml

@ -43,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="params.beginFirstAddTime != null and params.beginFirstAddTime != '' and params.endFirstAddTime != null and params.endFirstAddTime != ''"> and first_add_time between #{params.beginFirstAddTime} and #{params.endFirstAddTime}</if>
<if test="updateInfoTime != null and updateInfoTime != ''"> and update_info_time = #{updateInfoTime}</if>
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if>
<if test="useStatus != null and useStatus != ''"> and use_status = #{useStatus}</if>
</where>

167
ruoyi-admin/src/main/resources/mapper/purchase/PurchaseStorageMapper.xml

@ -0,0 +1,167 @@
<?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.PurchaseStorageMapper">
<resultMap type="PurchaseStorage" id="PurchaseStorageResult">
<result property="purchaseStorageId" column="purchase_storage_id" />
<result property="purchaseStorageCode" column="purchase_storage_code" />
<result property="purchaseOrderCode" column="purchase_order_code" />
<result property="storageStatus" column="storage_status" />
<result property="qualityStatus" column="quality_status" />
<result property="purchaseStorageType" column="purchase_storage_type" />
<result property="purchaseOrderType" column="purchase_order_type" />
<result property="purchaseDeptType" column="purchase_dept_type" />
<result property="notifyArrivedNum" column="notify_arrived_num" />
<result property="actualArrivedNum" column="actual_arrived_num" />
<result property="temporaryQualifiedNum" column="temporary_qualified_num" />
<result property="temporaryUnqualifiedNum" column="temporary_unqualified_num" />
<result property="qualityQualifiedNum" column="quality_qualified_num" />
<result property="storageNum" column="storage_num" />
<result property="arrivedTime" column="arrived_time" />
<result property="temporaryTime" column="temporary_time" />
<result property="deliveryInspectionTime" column="delivery_inspection_time" />
<result property="qualityTime" column="quality_time" />
<result property="storageTime" column="storage_time" />
<result property="storageEmployee" column="storage_employee" />
<result property="stockId" column="stock_id" />
<result property="stockName" column="stock_name" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectPurchaseStorageVo">
select purchase_storage_id, purchase_storage_code, purchase_order_code, storage_status, quality_status, purchase_storage_type, purchase_order_type, purchase_dept_type, notify_arrived_num, actual_arrived_num, temporary_qualified_num, temporary_unqualified_num, quality_qualified_num, storage_num, arrived_time, temporary_time, delivery_inspection_time, quality_time, storage_time, storage_employee, stock_id, stock_name, create_time, create_by, update_by, update_time from purchase_storage
</sql>
<select id="selectPurchaseStorageList" parameterType="PurchaseStorage" resultMap="PurchaseStorageResult">
<include refid="selectPurchaseStorageVo"/>
<where>
<if test="purchaseStorageCode != null and purchaseStorageCode != ''"> and purchase_storage_code = #{purchaseStorageCode}</if>
<if test="purchaseOrderCode != null and purchaseOrderCode != ''"> and purchase_order_code = #{purchaseOrderCode}</if>
<if test="storageStatus != null and storageStatus != ''"> and storage_status = #{storageStatus}</if>
<if test="qualityStatus != null and qualityStatus != ''"> and quality_status = #{qualityStatus}</if>
<if test="purchaseDeptType != null and purchaseDeptType != ''"> and purchase_dept_type = #{purchaseDeptType}</if>
<if test="storageEmployee != null and storageEmployee != ''"> and storage_employee like concat('%', #{storageEmployee}, '%')</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
</where>
</select>
<select id="selectPurchaseStorageById" parameterType="Long" resultMap="PurchaseStorageResult">
<include refid="selectPurchaseStorageVo"/>
where purchase_storage_id = #{purchaseStorageId}
</select>
<insert id="insertPurchaseStorage" parameterType="PurchaseStorage" useGeneratedKeys="true" keyProperty="purchaseStorageId">
insert into purchase_storage
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="purchaseStorageCode != null">purchase_storage_code,</if>
<if test="purchaseOrderCode != null">purchase_order_code,</if>
<if test="storageStatus != null">storage_status,</if>
<if test="qualityStatus != null">quality_status,</if>
<if test="purchaseStorageType != null">purchase_storage_type,</if>
<if test="purchaseOrderType != null">purchase_order_type,</if>
<if test="purchaseDeptType != null">purchase_dept_type,</if>
<if test="notifyArrivedNum != null">notify_arrived_num,</if>
<if test="actualArrivedNum != null">actual_arrived_num,</if>
<if test="temporaryQualifiedNum != null">temporary_qualified_num,</if>
<if test="temporaryUnqualifiedNum != null">temporary_unqualified_num,</if>
<if test="qualityQualifiedNum != null">quality_qualified_num,</if>
<if test="storageNum != null">storage_num,</if>
<if test="arrivedTime != null">arrived_time,</if>
<if test="temporaryTime != null">temporary_time,</if>
<if test="deliveryInspectionTime != null">delivery_inspection_time,</if>
<if test="qualityTime != null">quality_time,</if>
<if test="storageTime != null">storage_time,</if>
<if test="storageEmployee != null">storage_employee,</if>
<if test="stockId != null">stock_id,</if>
<if test="stockName != null">stock_name,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="purchaseStorageCode != null">#{purchaseStorageCode},</if>
<if test="purchaseOrderCode != null">#{purchaseOrderCode},</if>
<if test="storageStatus != null">#{storageStatus},</if>
<if test="qualityStatus != null">#{qualityStatus},</if>
<if test="purchaseStorageType != null">#{purchaseStorageType},</if>
<if test="purchaseOrderType != null">#{purchaseOrderType},</if>
<if test="purchaseDeptType != null">#{purchaseDeptType},</if>
<if test="notifyArrivedNum != null">#{notifyArrivedNum},</if>
<if test="actualArrivedNum != null">#{actualArrivedNum},</if>
<if test="temporaryQualifiedNum != null">#{temporaryQualifiedNum},</if>
<if test="temporaryUnqualifiedNum != null">#{temporaryUnqualifiedNum},</if>
<if test="qualityQualifiedNum != null">#{qualityQualifiedNum},</if>
<if test="storageNum != null">#{storageNum},</if>
<if test="arrivedTime != null">#{arrivedTime},</if>
<if test="temporaryTime != null">#{temporaryTime},</if>
<if test="deliveryInspectionTime != null">#{deliveryInspectionTime},</if>
<if test="qualityTime != null">#{qualityTime},</if>
<if test="storageTime != null">#{storageTime},</if>
<if test="storageEmployee != null">#{storageEmployee},</if>
<if test="stockId != null">#{stockId},</if>
<if test="stockName != null">#{stockName},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updatePurchaseStorage" parameterType="PurchaseStorage">
update purchase_storage
<trim prefix="SET" suffixOverrides=",">
<if test="purchaseStorageCode != null">purchase_storage_code = #{purchaseStorageCode},</if>
<if test="purchaseOrderCode != null">purchase_order_code = #{purchaseOrderCode},</if>
<if test="storageStatus != null">storage_status = #{storageStatus},</if>
<if test="qualityStatus != null">quality_status = #{qualityStatus},</if>
<if test="purchaseStorageType != null">purchase_storage_type = #{purchaseStorageType},</if>
<if test="purchaseOrderType != null">purchase_order_type = #{purchaseOrderType},</if>
<if test="purchaseDeptType != null">purchase_dept_type = #{purchaseDeptType},</if>
<if test="notifyArrivedNum != null">notify_arrived_num = #{notifyArrivedNum},</if>
<if test="actualArrivedNum != null">actual_arrived_num = #{actualArrivedNum},</if>
<if test="temporaryQualifiedNum != null">temporary_qualified_num = #{temporaryQualifiedNum},</if>
<if test="temporaryUnqualifiedNum != null">temporary_unqualified_num = #{temporaryUnqualifiedNum},</if>
<if test="qualityQualifiedNum != null">quality_qualified_num = #{qualityQualifiedNum},</if>
<if test="storageNum != null">storage_num = #{storageNum},</if>
<if test="arrivedTime != null">arrived_time = #{arrivedTime},</if>
<if test="temporaryTime != null">temporary_time = #{temporaryTime},</if>
<if test="deliveryInspectionTime != null">delivery_inspection_time = #{deliveryInspectionTime},</if>
<if test="qualityTime != null">quality_time = #{qualityTime},</if>
<if test="storageTime != null">storage_time = #{storageTime},</if>
<if test="storageEmployee != null">storage_employee = #{storageEmployee},</if>
<if test="stockId != null">stock_id = #{stockId},</if>
<if test="stockName != null">stock_name = #{stockName},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where purchase_storage_id = #{purchaseStorageId}
</update>
<delete id="deletePurchaseStorageById" parameterType="Long">
delete from purchase_storage where purchase_storage_id = #{purchaseStorageId}
</delete>
<delete id="deletePurchaseStorageByIds" parameterType="String">
delete from purchase_storage where purchase_storage_id in
<foreach item="purchaseStorageId" collection="array" open="(" separator="," close=")">
#{purchaseStorageId}
</foreach>
</delete>
<update id="cancelPurchaseStorageById" parameterType="Long">
update purchase_storage set del_flag = '1' where purchase_storage_id = #{purchaseStorageId}
</update>
<update id="restorePurchaseStorageById" parameterType="Long">
update purchase_storage set del_flag = '0' where purchase_storage_id = #{purchaseStorageId}
</update>
</mapper>

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

@ -37,9 +37,11 @@
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<li class="select-time">
<label>录入时间:</label>
<input type="text" class="time-input" placeholder="请选择录入时间" name="createTime"/>
<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>

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

@ -0,0 +1,208 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增采购入库通知单')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-purchaseStorage-add">
<div class="form-group">
<label class="col-sm-3 control-label">入库单号:</label>
<div class="col-sm-8">
<input name="purchaseStorageCode" 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="purchaseOrderCode" 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="storageStatus" class="form-control m-b" th:with="type=${@dict.getType('eceiptStatus')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">品质状态:</label>
<div class="col-sm-8">
<select name="qualityStatus" class="form-control m-b" th:with="type=${@dict.getType('qualityStatus')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库类型:</label>
<div class="col-sm-8">
<select name="purchaseStorageType" class="form-control m-b" th:with="type=${@dict.getType('purchase_storage_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">订单类型:</label>
<div class="col-sm-8">
<select name="purchaseOrderType" class="form-control m-b" th:with="type=${@dict.getType('sys_order_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库部门:</label>
<div class="col-sm-8">
<select name="purchaseDeptType" class="form-control m-b" th:with="type=${@dict.getType('warehouseDept')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">通知已到货数量:</label>
<div class="col-sm-8">
<input name="notifyArrivedNum" 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="actualArrivedNum" 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="temporaryQualifiedNum" 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="temporaryUnqualifiedNum" 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="qualityQualifiedNum" 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="storageNum" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">到货时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="arrivedTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">暂收时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="temporaryTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">交付质检时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="deliveryInspectionTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">品质时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="qualityTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="storageTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库员:</label>
<div class="col-sm-8">
<input name="storageEmployee" 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="stockId" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库名称:</label>
<div class="col-sm-8">
<input name="stockName" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "purchase/purchaseStorage"
$("#form-purchaseStorage-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-purchaseStorage-add').serialize());
}
}
$("input[name='arrivedTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='temporaryTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='deliveryInspectionTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='qualityTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='storageTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

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

@ -0,0 +1,209 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改采购入库通知单')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-purchaseStorage-edit" th:object="${purchaseStorage}">
<input name="purchaseStorageId" th:field="*{purchaseStorageId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">入库单号:</label>
<div class="col-sm-8">
<input name="purchaseStorageCode" th:field="*{purchaseStorageCode}" 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="purchaseOrderCode" th:field="*{purchaseOrderCode}" 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="storageStatus" class="form-control m-b" th:with="type=${@dict.getType('eceiptStatus')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{storageStatus}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">品质状态:</label>
<div class="col-sm-8">
<select name="qualityStatus" class="form-control m-b" th:with="type=${@dict.getType('qualityStatus')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{qualityStatus}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库类型:</label>
<div class="col-sm-8">
<select name="purchaseStorageType" class="form-control m-b" th:with="type=${@dict.getType('purchase_storage_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{purchaseStorageType}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">订单类型:</label>
<div class="col-sm-8">
<select name="purchaseOrderType" class="form-control m-b" th:with="type=${@dict.getType('sys_order_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{purchaseOrderType}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库部门:</label>
<div class="col-sm-8">
<select name="purchaseDeptType" class="form-control m-b" th:with="type=${@dict.getType('warehouseDept')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{purchaseDeptType}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">通知已到货数量:</label>
<div class="col-sm-8">
<input name="notifyArrivedNum" th:field="*{notifyArrivedNum}" 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="actualArrivedNum" th:field="*{actualArrivedNum}" 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="temporaryQualifiedNum" th:field="*{temporaryQualifiedNum}" 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="temporaryUnqualifiedNum" th:field="*{temporaryUnqualifiedNum}" 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="qualityQualifiedNum" th:field="*{qualityQualifiedNum}" 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="storageNum" th:field="*{storageNum}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">到货时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="arrivedTime" th:value="${#dates.format(purchaseStorage.arrivedTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">暂收时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="temporaryTime" th:value="${#dates.format(purchaseStorage.temporaryTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">交付质检时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="deliveryInspectionTime" th:value="${#dates.format(purchaseStorage.deliveryInspectionTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">品质时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="qualityTime" th:value="${#dates.format(purchaseStorage.qualityTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="storageTime" th:value="${#dates.format(purchaseStorage.storageTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库员:</label>
<div class="col-sm-8">
<input name="storageEmployee" th:field="*{storageEmployee}" 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="stockId" th:field="*{stockId}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库名称:</label>
<div class="col-sm-8">
<input name="stockName" th:field="*{stockName}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "purchase/purchaseStorage";
$("#form-purchaseStorage-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-purchaseStorage-edit').serialize());
}
}
$("input[name='arrivedTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='temporaryTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='deliveryInspectionTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='qualityTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='storageTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

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

@ -0,0 +1,246 @@
<!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="purchaseStorageCode"/>
</li>
<li>
<label>关联订单号:</label>
<input type="text" name="purchaseOrderCode"/>
</li>
<li>
<label>仓库员:</label>
<input type="text" name="storageEmployee"/>
</li>
<li>
<label>入库状态:</label>
<select name="storageStatus" th:with="type=${@dict.getType('eceiptStatus')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>品质状态:</label>
<select name="qualityStatus" th:with="type=${@dict.getType('qualityStatus')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>入库部门:</label>
<select name="purchaseDeptType" th:with="type=${@dict.getType('warehouseDept')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li class="select-time">
<label>录入时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="purchase:purchaseStorage:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="purchase:purchaseStorage:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="purchase:purchaseStorage:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="purchase:purchaseStorage:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('purchase:purchaseStorage:edit')}]];
var removeFlag = [[${@permission.hasPermi('purchase:purchaseStorage:remove')}]];
var cancelFlag = [[${@permission.hasPermi('purchase:purchaseStorage:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('purchase:purchaseStorage:restore')}]];
var storageStatusDatas = [[${@dict.getType('eceiptStatus')}]];
var qualityStatusDatas = [[${@dict.getType('qualityStatus')}]];
var purchaseStorageTypeDatas = [[${@dict.getType('purchase_storage_type')}]];
var purchaseOrderTypeDatas = [[${@dict.getType('sys_order_type')}]];
var purchaseDeptTypeDatas = [[${@dict.getType('warehouseDept')}]];
var prefix = ctx + "purchase/purchaseStorage";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
cancelUrl: prefix + "/cancel/{id}",
restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export",
modalName: "采购入库通知单",
columns: [{
checkbox: true
},
{
title: '采购入库单id',
field: 'purchaseStorageId',
visible: false
},
{
title: '入库单号',
field: 'purchaseStorageCode',
},
{
title: '关联订单号',
field: 'purchaseOrderCode',
},
{
title: '入库状态',
field: 'storageStatus',
formatter: function(value, row, index) {
return $.table.selectDictLabel(storageStatusDatas, value);
}
},
{
title: '品质状态',
field: 'qualityStatus',
formatter: function(value, row, index) {
return $.table.selectDictLabel(qualityStatusDatas, value);
}
},
{
title: '入库类型',
field: 'purchaseStorageType',
formatter: function(value, row, index) {
return $.table.selectDictLabel(purchaseStorageTypeDatas, value);
}
},
{
title: '订单类型',
field: 'purchaseOrderType',
formatter: function(value, row, index) {
return $.table.selectDictLabel(purchaseOrderTypeDatas, value);
}
},
{
title: '入库部门',
field: 'purchaseDeptType',
formatter: function(value, row, index) {
return $.table.selectDictLabel(purchaseDeptTypeDatas, value);
}
},
{
title: '通知已到货数量',
field: 'notifyArrivedNum',
},
{
title: '实际已到货数量',
field: 'actualArrivedNum',
},
{
title: '暂收合格数量',
field: 'temporaryQualifiedNum',
},
{
title: '暂收不合格数量',
field: 'temporaryUnqualifiedNum',
},
{
title: '品质合格数量',
field: 'qualityQualifiedNum',
},
{
title: '入库数量',
field: 'storageNum',
},
{
title: '到货时间',
field: 'arrivedTime',
},
{
title: '暂收时间',
field: 'temporaryTime',
},
{
title: '交付质检时间',
field: 'deliveryInspectionTime',
},
{
title: '品质时间',
field: 'qualityTime',
},
{
title: '入库时间',
field: 'storageTime',
},
{
title: '仓库员',
field: 'storageEmployee',
},
{
title: '仓库ID',
field: 'stockId',
},
{
title: '仓库名称',
field: 'stockName',
},
{
title: '录入时间',
field: 'createTime',
},
{
title: '录入人',
field: 'createBy',
},
{
title: '更新人',
field: 'updateBy',
},
{
title: '上次更新时间',
field: 'updateTime',
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.purchaseStorageId + '\')"><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.purchaseStorageId + '\')"><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{
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i>恢复</a> ');
}
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>
Loading…
Cancel
Save