Browse Source

[delete]

删除旧版无用的出库对象warehousing_out_head和系统中对应的前端所有代码和后端所有代码 和对应的系统菜单数据
dev
liuxiaoxu 1 month ago
parent
commit
9b0f413e38
  1. 181
      ruoyi-admin/src/main/java/com/ruoyi/stock/controller/WarehousingOutHeadController.java
  2. 319
      ruoyi-admin/src/main/java/com/ruoyi/stock/domain/WarehousingOutHead.java
  3. 64
      ruoyi-admin/src/main/java/com/ruoyi/stock/mapper/WarehousingOutHeadMapper.java
  4. 71
      ruoyi-admin/src/main/java/com/ruoyi/stock/service/IWarehousingOutHeadService.java
  5. 206
      ruoyi-admin/src/main/java/com/ruoyi/stock/service/impl/WarehousingOutHeadServiceImpl.java
  6. 154
      ruoyi-admin/src/main/resources/mapper/stock/WarehousingOutHeadMapper.xml
  7. 538
      ruoyi-admin/src/main/resources/templates/stock/warehousingOutHead/YLOut.html
  8. 180
      ruoyi-admin/src/main/resources/templates/stock/warehousingOutHead/add.html
  9. 181
      ruoyi-admin/src/main/resources/templates/stock/warehousingOutHead/edit.html
  10. 643
      ruoyi-admin/src/main/resources/templates/stock/warehousingOutHead/scrap.html
  11. 335
      ruoyi-admin/src/main/resources/templates/stock/warehousingOutHead/warehousingOutHead.html

181
ruoyi-admin/src/main/java/com/ruoyi/stock/controller/WarehousingOutHeadController.java

@ -1,181 +0,0 @@
package com.ruoyi.stock.controller;
import com.alibaba.druid.util.StringUtils;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.ck.utils.Result;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.stock.domain.WarehousingOutHead;
import com.ruoyi.stock.domain.WarehousingOutHeadWithList;
import com.ruoyi.stock.domain.WarehousingOutList;
import com.ruoyi.stock.service.IWarehousingOutHeadService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 出库Controller
*
* @author ruoyi
* @date 2021-12-16
*/
@Controller
@RequestMapping("/stock/warehousingOutHead")
public class WarehousingOutHeadController extends BaseController {
private String prefix = "stock/warehousingOutHead";
@Autowired
private IWarehousingOutHeadService warehousingOutHeadService;
@RequiresPermissions("stock:warehousingOutHead:view")
@GetMapping()
public String warehousingOutHead() {
return prefix + "/warehousingOutHead";
}
@GetMapping("/CP")
public String toCPOutHtml() {
return prefix + "/YLOut";
}
@GetMapping("/scrap")
public String toScrapOutHtml() {
return prefix + "/scrap";
}
/**
* 查询出库列表
*/
@RequiresPermissions("stock:warehousingOutHead:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(WarehousingOutHead warehousingOutHead) {
startPage();
List<WarehousingOutHead> list = warehousingOutHeadService.selectWarehousingOutHeadList(warehousingOutHead);
return getDataTable(list);
}
/**
* 导出出库列表
*/
@RequiresPermissions("stock:warehousingOutHead:export")
@Log(title = "出库", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(WarehousingOutHead warehousingOutHead) {
List<WarehousingOutHead> list = warehousingOutHeadService.selectWarehousingOutHeadList(warehousingOutHead);
ExcelUtil<WarehousingOutHead> util = new ExcelUtil<WarehousingOutHead>(WarehousingOutHead.class);
return util.exportExcel(list, "出库数据");
}
/**
* 新增出库
*/
@GetMapping("/add")
public String add() {
return prefix + "/add";
}
/**
* 新增保存出库
*/
@RequiresPermissions("stock:warehousingOutHead:add")
@Log(title = "出库", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(WarehousingOutHead warehousingOutHead) {
return toAjax(warehousingOutHeadService.insertWarehousingOutHead(warehousingOutHead));
}
/**
* 修改出库
*/
@GetMapping("/edit/{warehousingOutNo}")
public String edit(@PathVariable("warehousingOutNo") String warehousingOutNo, ModelMap mmap) {
WarehousingOutHead warehousingOutHead = warehousingOutHeadService.selectWarehousingOutHeadById(warehousingOutNo);
mmap.put("warehousingOutHead", warehousingOutHead);
return prefix + "/edit";
}
/**
* 修改保存出库
*/
@RequiresPermissions("stock:warehousingOutHead:edit")
@Log(title = "出库", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(WarehousingOutHead warehousingOutHead) {
return toAjax(warehousingOutHeadService.updateWarehousingOutHead(warehousingOutHead));
}
/**
* 删除出库
*/
@RequiresPermissions("stock:warehousingOutHead:remove")
@Log(title = "出库", businessType = BusinessType.DELETE)
@PostMapping("/remove")
@ResponseBody
public AjaxResult remove(String ids) {
return toAjax(warehousingOutHeadService.deleteWarehousingOutHeadByIds(ids));
}
//获取出库记录(连表查询)
@ResponseBody
@PostMapping("/record")
public TableDataInfo getWarehousingOutRecord(WarehousingOutHeadWithList warehousingOutHeadWithList) {
startPage();
List<WarehousingOutHeadWithList> list = warehousingOutHeadService.selectWarehousingOutHeadWithList(warehousingOutHeadWithList);
return getDataTable(list);
}
//获取出库单号
@ResponseBody
@PostMapping("/no")
public Result getWarehousingOutNo() throws Exception {
String warehousingOutNo = warehousingOutHeadService.getWarehousingOutNo();
return Result.getSuccessResult(warehousingOutNo);
}
//根据制工单领取物料
@ResponseBody
@PostMapping("/workOrder")
public Result addByWorkOrder(String jsonStr) throws Exception {
JSONObject jsonObject = JSONObject.parseObject(jsonStr);
WarehousingOutHead warehousingOutHead = jsonObject.toJavaObject(WarehousingOutHead.class);
if (StringUtils.isEmpty(warehousingOutHead.getWorkOrderNo())) {
return Result.getFailResult("请选择制工单号!", null);
}
List<WarehousingOutList> list = warehousingOutHead.getWarehousingOutLists();
for (WarehousingOutList each : list) {
if (each.getRealQty() <= 0) {
return Result.getFailResult("请输入数量!", null);
}
}
int i = warehousingOutHeadService.insertByWorkOrder(warehousingOutHead);
return Result.getSuccessResult(i);
}
@ResponseBody
@PostMapping("/scrapItem")
public Result addByScrapItem(String jsonStr) throws Exception {
JSONObject jsonObject = JSONObject.parseObject(jsonStr);
WarehousingOutHead warehousingOutHead = jsonObject.toJavaObject(WarehousingOutHead.class);
List<WarehousingOutList> list = warehousingOutHead.getWarehousingOutLists();
for (WarehousingOutList each : list) {
if (each.getRealQty() <= 0) {
return Result.getFailResult("请输入数量!", null);
}
}
int i = warehousingOutHeadService.insertByScrapItem(warehousingOutHead);
return Result.getSuccessResult(i);
}
}

319
ruoyi-admin/src/main/java/com/ruoyi/stock/domain/WarehousingOutHead.java

@ -1,319 +0,0 @@
package com.ruoyi.stock.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.util.Date;
import java.util.List;
/**
* 出库对象 warehousing_out_head
*
* @author ruoyi
* @date 2021-12-16
*/
public class WarehousingOutHead extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 出库单号 */
@Excel(name = "出库单号")
private String warehousingOutNo;
/** 制工单号 */
@Excel(name = "制工单号")
private String workOrderNo;
/** 出库日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "出库日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date warehousingOutDate;
/** 联系人 */
@Excel(name = "联系人")
private String linkman;
/** 仓库号 */
@Excel(name = "仓库号")
private String stockNo;
/** 仓库名称 */
@Excel(name = "仓库名称")
private String stockName;
/** 仓库管理员 */
@Excel(name = "仓库管理员")
private String warehouseKeeper;
/** 出货类别 */
@Excel(name = "出库类型")
private String outputClass;
/** 物料类别 */
@Excel(name = "物料类别")
private String itemClass;
/** 是否确认 */
@Excel(name = "是否确认")
private Long confirmFlag;
/** 确认人 */
@Excel(name = "确认人")
private String confirmMan;
/** 确认时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "确认时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date confirmDate;
/** 部门名称 */
@Excel(name = "部门名称")
private String deptName;
/** 领料单号 */
@Excel(name = "领料单号")
private String spare1;
/** 领料人 */
@Excel(name = "领料人")
private String spare2;
/** 备注 */
@Excel(name = "备注")
private String spare3;
/** */
@Excel(name = "")
private String spare4;
/** */
@Excel(name = "")
private String spare5;
/** */
@Excel(name = "")
private String spare6;
/** 部门编号 */
@Excel(name = "部门编号")
private String deptNo;
private List<WarehousingOutList> warehousingOutLists;
public List<WarehousingOutList> getWarehousingOutLists() {
return warehousingOutLists;
}
public void setWarehousingOutLists(List<WarehousingOutList> warehousingOutLists) {
this.warehousingOutLists = warehousingOutLists;
}
public void setWarehousingOutNo(String warehousingOutNo)
{
this.warehousingOutNo = warehousingOutNo;
}
public String getWarehousingOutNo()
{
return warehousingOutNo;
}
public void setWorkOrderNo(String workOrderNo)
{
this.workOrderNo = workOrderNo;
}
public String getWorkOrderNo()
{
return workOrderNo;
}
public void setWarehousingOutDate(Date warehousingOutDate)
{
this.warehousingOutDate = warehousingOutDate;
}
public Date getWarehousingOutDate()
{
return warehousingOutDate;
}
public void setLinkman(String linkman)
{
this.linkman = linkman;
}
public String getLinkman()
{
return linkman;
}
public void setStockNo(String stockNo)
{
this.stockNo = stockNo;
}
public String getStockNo()
{
return stockNo;
}
public void setStockName(String stockName)
{
this.stockName = stockName;
}
public String getStockName()
{
return stockName;
}
public void setWarehouseKeeper(String warehouseKeeper)
{
this.warehouseKeeper = warehouseKeeper;
}
public String getWarehouseKeeper()
{
return warehouseKeeper;
}
public void setOutputClass(String outputClass)
{
this.outputClass = outputClass;
}
public String getOutputClass()
{
return outputClass;
}
public void setItemClass(String itemClass)
{
this.itemClass = itemClass;
}
public String getItemClass()
{
return itemClass;
}
public void setConfirmFlag(Long confirmFlag)
{
this.confirmFlag = confirmFlag;
}
public Long getConfirmFlag()
{
return confirmFlag;
}
public void setConfirmMan(String confirmMan)
{
this.confirmMan = confirmMan;
}
public String getConfirmMan()
{
return confirmMan;
}
public void setConfirmDate(Date confirmDate)
{
this.confirmDate = confirmDate;
}
public Date getConfirmDate()
{
return confirmDate;
}
public void setDeptName(String deptName)
{
this.deptName = deptName;
}
public String getDeptName()
{
return deptName;
}
public void setSpare1(String spare1)
{
this.spare1 = spare1;
}
public String getSpare1()
{
return spare1;
}
public void setSpare2(String spare2)
{
this.spare2 = spare2;
}
public String getSpare2()
{
return spare2;
}
public void setSpare3(String spare3)
{
this.spare3 = spare3;
}
public String getSpare3()
{
return spare3;
}
public void setSpare4(String spare4)
{
this.spare4 = spare4;
}
public String getSpare4()
{
return spare4;
}
public void setSpare5(String spare5)
{
this.spare5 = spare5;
}
public String getSpare5()
{
return spare5;
}
public void setSpare6(String spare6)
{
this.spare6 = spare6;
}
public String getSpare6()
{
return spare6;
}
public void setDeptNo(String deptNo)
{
this.deptNo = deptNo;
}
public String getDeptNo()
{
return deptNo;
}
@Override
public String toString() {
return "WarehousingOutHead{" +
"warehousingOutNo='" + warehousingOutNo + '\'' +
", workOrderNo='" + workOrderNo + '\'' +
", warehousingOutDate=" + warehousingOutDate +
", linkman='" + linkman + '\'' +
", stockNo='" + stockNo + '\'' +
", stockName='" + stockName + '\'' +
", warehouseKeeper='" + warehouseKeeper + '\'' +
", outputClass='" + outputClass + '\'' +
", itemClass='" + itemClass + '\'' +
", confirmFlag=" + confirmFlag +
", confirmMan='" + confirmMan + '\'' +
", confirmDate=" + confirmDate +
", deptName='" + deptName + '\'' +
", spare1='" + spare1 + '\'' +
", spare2='" + spare2 + '\'' +
", spare3='" + spare3 + '\'' +
", spare4='" + spare4 + '\'' +
", spare5='" + spare5 + '\'' +
", spare6='" + spare6 + '\'' +
", deptNo='" + deptNo + '\'' +
", warehousingOutLists=" + warehousingOutLists +
'}';
}
}

64
ruoyi-admin/src/main/java/com/ruoyi/stock/mapper/WarehousingOutHeadMapper.java

@ -1,64 +0,0 @@
package com.ruoyi.stock.mapper;
import com.ruoyi.stock.domain.WarehousingOutHead;
import java.util.List;
/**
* 出库Mapper接口
*
* @author ruoyi
* @date 2021-12-16
*/
public interface WarehousingOutHeadMapper
{
/**
* 查询出库
*
* @param warehousingOutNo 出库ID
* @return 出库
*/
public WarehousingOutHead selectWarehousingOutHeadById(String warehousingOutNo);
/**
* 查询出库列表
*
* @param warehousingOutHead 出库
* @return 出库集合
*/
public List<WarehousingOutHead> selectWarehousingOutHeadList(WarehousingOutHead warehousingOutHead);
/**
* 新增出库
*
* @param warehousingOutHead 出库
* @return 结果
*/
public int insertWarehousingOutHead(WarehousingOutHead warehousingOutHead);
/**
* 修改出库
*
* @param warehousingOutHead 出库
* @return 结果
*/
public int updateWarehousingOutHead(WarehousingOutHead warehousingOutHead);
/**
* 删除出库
*
* @param warehousingOutNo 出库ID
* @return 结果
*/
public int deleteWarehousingOutHeadById(String warehousingOutNo);
/**
* 批量删除出库
*
* @param warehousingOutNos 需要删除的数据ID
* @return 结果
*/
public int deleteWarehousingOutHeadByIds(String[] warehousingOutNos);
public int selectCountByDay();
}

71
ruoyi-admin/src/main/java/com/ruoyi/stock/service/IWarehousingOutHeadService.java

@ -1,71 +0,0 @@
package com.ruoyi.stock.service;
import com.ruoyi.stock.domain.WarehousingOutHead;
import com.ruoyi.stock.domain.WarehousingOutHeadWithList;
import java.util.List;
/**
* 出库Service接口
*
* @author ruoyi
* @date 2021-12-16
*/
public interface IWarehousingOutHeadService
{
/**
* 查询出库
*
* @param warehousingOutNo 出库ID
* @return 出库
*/
public WarehousingOutHead selectWarehousingOutHeadById(String warehousingOutNo);
/**
* 查询出库列表
*
* @param warehousingOutHead 出库
* @return 出库集合
*/
public List<WarehousingOutHead> selectWarehousingOutHeadList(WarehousingOutHead warehousingOutHead);
/**
* 新增出库
*
* @param warehousingOutHead 出库
* @return 结果
*/
public int insertWarehousingOutHead(WarehousingOutHead warehousingOutHead);
/**
* 修改出库
*
* @param warehousingOutHead 出库
* @return 结果
*/
public int updateWarehousingOutHead(WarehousingOutHead warehousingOutHead);
/**
* 批量删除出库
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteWarehousingOutHeadByIds(String ids);
/**
* 删除出库信息
*
* @param warehousingOutNo 出库ID
* @return 结果
*/
public int deleteWarehousingOutHeadById(String warehousingOutNo);
public List<WarehousingOutHeadWithList> selectWarehousingOutHeadWithList(WarehousingOutHeadWithList warehousingOutHeadWithList);
public String getWarehousingOutNo();
public int insertByWorkOrder(WarehousingOutHead warehousingOutHead);
public int insertByScrapItem(WarehousingOutHead warehousingOutHead);
}

206
ruoyi-admin/src/main/java/com/ruoyi/stock/service/impl/WarehousingOutHeadServiceImpl.java

@ -1,206 +0,0 @@
package com.ruoyi.stock.service.impl;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.produce.domain.WorkorderList;
import com.ruoyi.produce.mapper.WorkorderListMapper;
import com.ruoyi.stock.domain.*;
import com.ruoyi.stock.mapper.*;
import com.ruoyi.stock.service.IWarehousingOutHeadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;
/**
* 出库Service业务层处理
*
* @author ruoyi
* @date 2021-12-16
*/
@Service
public class WarehousingOutHeadServiceImpl implements IWarehousingOutHeadService {
@Autowired
private WarehousingOutHeadMapper warehousingOutHeadMapper;
@Autowired
private WarehousingOutHeadWithListMapper warehousingOutHeadWithListMapper;
@Autowired
private WarehousingOutListMapper warehousingOutListMapper;
@Autowired
private StockInfoMapper stockInfoMapper;
@Autowired
private WarehouseMapper warehouseMapper;
@Autowired
private WorkorderListMapper workorderListMapper;
@Autowired
private WarehousingRecordMapper warehousingRecordMapper;
/**
* 查询出库
*
* @param warehousingOutNo 出库ID
* @return 出库
*/
@Override
public WarehousingOutHead selectWarehousingOutHeadById(String warehousingOutNo) {
return warehousingOutHeadMapper.selectWarehousingOutHeadById(warehousingOutNo);
}
/**
* 查询出库列表
*
* @param warehousingOutHead 出库
* @return 出库
*/
@Override
public List<WarehousingOutHead> selectWarehousingOutHeadList(WarehousingOutHead warehousingOutHead) {
return warehousingOutHeadMapper.selectWarehousingOutHeadList(warehousingOutHead);
}
/**
* 新增出库
*
* @param warehousingOutHead 出库
* @return 结果
*/
@Override
public int insertWarehousingOutHead(WarehousingOutHead warehousingOutHead) {
return warehousingOutHeadMapper.insertWarehousingOutHead(warehousingOutHead);
}
/**
* 修改出库
*
* @param warehousingOutHead 出库
* @return 结果
*/
@Override
public int updateWarehousingOutHead(WarehousingOutHead warehousingOutHead) {
return warehousingOutHeadMapper.updateWarehousingOutHead(warehousingOutHead);
}
/**
* 删除出库对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteWarehousingOutHeadByIds(String ids) {
return warehousingOutHeadMapper.deleteWarehousingOutHeadByIds(Convert.toStrArray(ids));
}
/**
* 删除出库信息
*
* @param warehousingOutNo 出库ID
* @return 结果
*/
@Override
public int deleteWarehousingOutHeadById(String warehousingOutNo) {
return warehousingOutHeadMapper.deleteWarehousingOutHeadById(warehousingOutNo);
}
@Override
public List<WarehousingOutHeadWithList> selectWarehousingOutHeadWithList(WarehousingOutHeadWithList warehousingOutHeadWithList) {
return warehousingOutHeadWithListMapper.selectWarehousingOutHeadWithList(warehousingOutHeadWithList);
}
@Override
public String getWarehousingOutNo() {
int todayNum = warehousingOutHeadMapper.selectCountByDay() + 1;
String warehousingOutNo = "OUT" + (LocalDate.now().toString().replaceAll("-", ""));
if (todayNum < 10) {
warehousingOutNo += "00" + todayNum;
} else if (todayNum < 100) {
warehousingOutNo += "0" + todayNum;
} else {
warehousingOutNo += todayNum;
}
return warehousingOutNo;
}
@Override
public int insertByWorkOrder(WarehousingOutHead warehousingOutHead) {
List<WarehousingOutList> list = warehousingOutHead.getWarehousingOutLists();
for (int i = 0; i < list.size(); i++) {
//循环赋值添加出库记录
WarehousingOutList warehousingOutList = list.get(i);
warehousingOutList.setWarehousingOutNo(warehousingOutHead.getWarehousingOutNo());
warehousingOutList.setItemNo(i + 1 + "");
warehousingOutListMapper.insertWarehousingOutList(warehousingOutList);
//从库存减去出库数量
Warehouse warehouse = new Warehouse();
warehouse.setWlCode(warehousingOutList.getItemCode());
warehouse.setQty(warehousingOutList.getRealQty());
warehouseMapper.minusQty(warehouse);
//修改制工单物料已领数量
WorkorderList workorderList = new WorkorderList();
workorderList.setPoId(warehousingOutHead.getWorkOrderNo());
workorderList.setWlCode(warehousingOutList.getItemCode());
workorderList.setOrderQty(new BigDecimal(warehousingOutList.getRealQty()));
workorderListMapper.updateWorkorderList(workorderList);
//修改入库数量(先减最早入库的,依次减直到0)
Long realQty = warehousingOutList.getRealQty();
while (realQty > 0) {
WarehousingRecord record = warehousingRecordMapper.selectRecentlyRecord(warehousingOutList.getItemCode());
int surplusQty = Integer.parseInt(record.getSurplusQty());
if (realQty >= surplusQty) {
record.setSurplusQty("0");
realQty -= surplusQty;
} else {
record.setSurplusQty(surplusQty - realQty + "");
realQty = 0L;
}
warehousingRecordMapper.updateWarehousingRecord(record);
}
}
StockInfo stockInfo = new StockInfo();
stockInfo.setStockName(warehousingOutHead.getStockName());
List<StockInfo> getStock = stockInfoMapper.selectStockInfoList(stockInfo);
warehousingOutHead.setStockNo(getStock.get(0).getStockNO());
return warehousingOutHeadMapper.insertWarehousingOutHead(warehousingOutHead);
}
@Override
public int insertByScrapItem(WarehousingOutHead warehousingOutHead) {
List<WarehousingOutList> list = warehousingOutHead.getWarehousingOutLists();
for (int i = 0; i < list.size(); i++) {
//循环赋值添加出库记录
WarehousingOutList warehousingOutList = list.get(i);
warehousingOutList.setWarehousingOutNo(warehousingOutHead.getWarehousingOutNo());
warehousingOutList.setItemNo(i + 1 + "");
warehousingOutListMapper.insertWarehousingOutList(warehousingOutList);
//从库存减去出库数量
Warehouse warehouse = new Warehouse();
warehouse.setWlCode(warehousingOutList.getItemCode());
warehouse.setQty(warehousingOutList.getRealQty());
warehouseMapper.minusQty(warehouse);
//修改入库数量
String spare1 = warehousingOutList.getSpare1();
WarehousingRecord warehousingRecord = new WarehousingRecord();
warehousingRecord.setWarehousingrecordNo(spare1);
warehousingRecord.setSurplusQty(warehousingOutList.getRealQty() + "");
warehousingRecordMapper.updateSurplusQty(warehousingRecord);
}
StockInfo stockInfo = new StockInfo();
stockInfo.setStockName(warehousingOutHead.getStockName());
List<StockInfo> getStock = stockInfoMapper.selectStockInfoList(stockInfo);
warehousingOutHead.setStockNo(getStock.get(0).getStockNO());
return warehousingOutHeadMapper.insertWarehousingOutHead(warehousingOutHead);
}
}

154
ruoyi-admin/src/main/resources/mapper/stock/WarehousingOutHeadMapper.xml

@ -1,154 +0,0 @@
<?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.stock.mapper.WarehousingOutHeadMapper">
<resultMap type="WarehousingOutHead" id="WarehousingOutHeadResult">
<result property="warehousingOutNo" column="warehousingOutNo" />
<result property="workOrderNo" column="workOrderNo" />
<result property="warehousingOutDate" column="warehousingOutDate" />
<result property="linkman" column="linkman" />
<result property="stockNo" column="stockNo" />
<result property="stockName" column="stockName" />
<result property="warehouseKeeper" column="warehouseKeeper" />
<result property="outputClass" column="outputClass" />
<result property="itemClass" column="itemClass" />
<result property="confirmFlag" column="confirmFlag" />
<result property="confirmMan" column="confirmMan" />
<result property="confirmDate" column="confirmDate" />
<result property="deptName" column="deptName" />
<result property="spare1" column="spare1" />
<result property="spare2" column="spare2" />
<result property="spare3" column="spare3" />
<result property="spare4" column="spare4" />
<result property="spare5" column="spare5" />
<result property="spare6" column="spare6" />
<result property="deptNo" column="deptNo" />
</resultMap>
<sql id="selectWarehousingOutHeadVo">
select warehousingOutNo, workOrderNo, warehousingOutDate, linkman, stockNo, stockName, warehouseKeeper, outputClass, itemClass, confirmFlag, confirmMan, confirmDate, deptName, spare1, spare2, spare3, spare4, spare5, spare6, deptNo from warehousing_out_head
</sql>
<select id="selectWarehousingOutHeadList" parameterType="WarehousingOutHead" resultMap="WarehousingOutHeadResult">
<include refid="selectWarehousingOutHeadVo"/>
<where>
<if test="warehousingOutNo != null and warehousingOutNo != ''"> and warehousingOutNo like concat('%', #{warehousingOutNo}, '%')</if>
<if test="workOrderNo != null and workOrderNo != ''"> and workOrderNo like concat('%', #{workOrderNo}, '%')</if>
<if test="params.beginWarehousingOutDate != null and params.beginWarehousingOutDate != '' and params.endWarehousingOutDate != null and params.endWarehousingOutDate != ''"> and warehousingOutDate between #{params.beginWarehousingOutDate} and #{params.endWarehousingOutDate}</if>
<if test="linkman != null and linkman != ''"> and linkman = #{linkman}</if>
<if test="stockNo != null and stockNo != ''"> and stockNo like concat('%', #{stockNo}, '%')</if>
<if test="stockName != null and stockName != ''"> and stockName like concat('%', #{stockName}, '%')</if>
<if test="warehouseKeeper != null and warehouseKeeper != ''"> and warehouseKeeper = #{warehouseKeeper}</if>
<if test="outputClass != null and outputClass != ''"> and outputClass = #{outputClass}</if>
<if test="itemClass != null and itemClass != ''"> and itemClass = #{itemClass}</if>
<if test="confirmFlag != null "> and confirmFlag = #{confirmFlag}</if>
<if test="confirmMan != null and confirmMan != ''"> and confirmMan = #{confirmMan}</if>
<if test="confirmDate != null "> and confirmDate = #{confirmDate}</if>
<if test="deptName != null and deptName != ''"> and deptName like concat('%', #{deptName}, '%')</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
<if test="spare6 != null and spare6 != ''"> and spare6 = #{spare6}</if>
<if test="deptNo != null and deptNo != ''"> and deptNo like concat('%', #{deptNo}, '%')</if>
</where>
</select>
<select id="selectWarehousingOutHeadById" parameterType="String" resultMap="WarehousingOutHeadResult">
<include refid="selectWarehousingOutHeadVo"/>
where warehousingOutNo = #{warehousingOutNo}
</select>
<insert id="insertWarehousingOutHead" parameterType="WarehousingOutHead">
insert into warehousing_out_head
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="warehousingOutNo != null">warehousingOutNo,</if>
<if test="workOrderNo != null">workOrderNo,</if>
<if test="warehousingOutDate != null">warehousingOutDate,</if>
<if test="linkman != null">linkman,</if>
<if test="stockNo != null">stockNo,</if>
<if test="stockName != null">stockName,</if>
<if test="warehouseKeeper != null">warehouseKeeper,</if>
<if test="outputClass != null">outputClass,</if>
<if test="itemClass != null">itemClass,</if>
<if test="confirmFlag != null">confirmFlag,</if>
<if test="confirmMan != null">confirmMan,</if>
<if test="confirmDate != null">confirmDate,</if>
<if test="deptName != null">deptName,</if>
<if test="spare1 != null">spare1,</if>
<if test="spare2 != null">spare2,</if>
<if test="spare3 != null">spare3,</if>
<if test="spare4 != null">spare4,</if>
<if test="spare5 != null">spare5,</if>
<if test="spare6 != null">spare6,</if>
<if test="deptNo != null">deptNo,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="warehousingOutNo != null">#{warehousingOutNo},</if>
<if test="workOrderNo != null">#{workOrderNo},</if>
<if test="warehousingOutDate != null">#{warehousingOutDate},</if>
<if test="linkman != null">#{linkman},</if>
<if test="stockNo != null">#{stockNo},</if>
<if test="stockName != null">#{stockName},</if>
<if test="warehouseKeeper != null">#{warehouseKeeper},</if>
<if test="outputClass != null">#{outputClass},</if>
<if test="itemClass != null">#{itemClass},</if>
<if test="confirmFlag != null">#{confirmFlag},</if>
<if test="confirmMan != null">#{confirmMan},</if>
<if test="confirmDate != null">#{confirmDate},</if>
<if test="deptName != null">#{deptName},</if>
<if test="spare1 != null">#{spare1},</if>
<if test="spare2 != null">#{spare2},</if>
<if test="spare3 != null">#{spare3},</if>
<if test="spare4 != null">#{spare4},</if>
<if test="spare5 != null">#{spare5},</if>
<if test="spare6 != null">#{spare6},</if>
<if test="deptNo != null">#{deptNo},</if>
</trim>
</insert>
<update id="updateWarehousingOutHead" parameterType="WarehousingOutHead">
update warehousing_out_head
<trim prefix="SET" suffixOverrides=",">
<if test="workOrderNo != null">workOrderNo = #{workOrderNo},</if>
<if test="warehousingOutDate != null">warehousingOutDate = #{warehousingOutDate},</if>
<if test="linkman != null">linkman = #{linkman},</if>
<if test="stockNo != null">stockNo = #{stockNo},</if>
<if test="stockName != null">stockName = #{stockName},</if>
<if test="warehouseKeeper != null">warehouseKeeper = #{warehouseKeeper},</if>
<if test="outputClass != null">outputClass = #{outputClass},</if>
<if test="itemClass != null">itemClass = #{itemClass},</if>
<if test="confirmFlag != null">confirmFlag = #{confirmFlag},</if>
<if test="confirmMan != null">confirmMan = #{confirmMan},</if>
<if test="confirmDate != null">confirmDate = #{confirmDate},</if>
<if test="deptName != null">deptName = #{deptName},</if>
<if test="spare1 != null">spare1 = #{spare1},</if>
<if test="spare2 != null">spare2 = #{spare2},</if>
<if test="spare3 != null">spare3 = #{spare3},</if>
<if test="spare4 != null">spare4 = #{spare4},</if>
<if test="spare5 != null">spare5 = #{spare5},</if>
<if test="spare6 != null">spare6 = #{spare6},</if>
<if test="deptNo != null">deptNo = #{deptNo},</if>
</trim>
where warehousingOutNo = #{warehousingOutNo}
</update>
<delete id="deleteWarehousingOutHeadById" parameterType="String">
delete from warehousing_out_head where warehousingOutNo = #{warehousingOutNo}
</delete>
<delete id="deleteWarehousingOutHeadByIds" parameterType="String">
delete from warehousing_out_head where warehousingOutNo in
<foreach item="warehousingOutNo" collection="array" open="(" separator="," close=")">
#{warehousingOutNo}
</foreach>
</delete>
<select id="selectCountByDay" resultType="int">
select count(*) from warehousing_out_head where to_days(warehousingOutDate) = to_days(now());
</select>
</mapper>

538
ruoyi-admin/src/main/resources/templates/stock/warehousingOutHead/YLOut.html

@ -1,538 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="include :: header('原料出库')"/>
<th:block th:include="include :: datetimepicker-css"/>
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet">
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet">
</head>
<body class="white-bg">
<!-- <div class="wrapper wrapper-content animated fadeInRight ibox-content">-->
<div class="container-div">
<div class="row">
<div class="col-sm-12">
</div>
<form class="form-horizontal m" id="form-poinvoicehead-add">
<div class="form-group">
<label class="col-sm-3 control-label">出库单号:</label>
<div class="col-sm-8">
<input name="warehousingOutNo" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">制工单号:</label>
<div class="col-sm-8">
<input name="workOrderNo" class="form-control" type="text" onclick="chooseWorkOrder()">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">领料单号:</label>
<div class="col-sm-8">
<input name="spare1" 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="spare2" 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="outputClass" class="form-control m-b" th:with="type=${@dict.getType('sys_out_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">-->
<!-- <input name="outputClass" class="form-control" type="text" readonly>-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group">
<label class="col-sm-3 control-label">成品代码:</label>
<div class="col-sm-8">
<input name="CPItemCode" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出库日期:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="warehousingOutDate" class="form-control time-input" 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="warehouseKeeper" class="form-control" type="text" readonly>
</div>
</div>
<!-- <div class="form-group">-->
<!-- <label class="col-sm-3 control-label">部门编号:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <select name="deptNo" class="form-control m-b" disabled>-->
<!-- </select>-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group">
<label class="col-sm-3 control-label">部门名称:</label>
<div class="col-sm-8">
<select name="deptName" class="form-control m-b">
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库号:</label>
<div class="col-sm-8">
<select name="stockNo" class="form-control m-b" disabled>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库名称:</label>
<div class="col-sm-8">
<select name="stockName" class="form-control m-b">
</select>
</div>
</div>
</form>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrapTableBody">
</table>
</div>
<div class="modal inmodal" id="workModal" tabindex="-1"
role="dilog" aria-hidden="true" style="padding-bottom: 100px;">
<div class="modal-dialog" style="width: 800px">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true"></button>
<h4 class="modal-title">选择制工单</h4>
</div>
<div class="modal-body" style="text-align: center;">
<div class="row">
<div class="col-md-5">
<form id="saleOrderForm" class="form-group">
<label class="control-label col-md-4">制工单号:</label>
<div class="col-md-8">
<input type="text" class="form-control" name="poId"
id="poId">
</div>
</form>
</div>
<div class="col-md-2">
<button type="button" class="btn btn-success" id="poIdSearch">搜索</button>
</div>
<div class="col-md-2">
<button type="button" class="btn btn-success" id="reset" onclick="reset()">重置</button>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="table-responsive">
<table id="workOrderTable"
class="table table-striped table-responsive" style="padding-bottom: 50px;">
</table>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary"
onClick="confirm();">确定
</button>
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<!-- <button type="button" class="btn btn-default" onclick="closeModal()">关闭</button>-->
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
</div>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<th:block th:include="include :: bootstrap-table-editable-js"/>
<script th:src="@{/ajax/libs/select2/select2.js}"></script>
<script th:inline="javascript">
let prefix = ctx + "stock/warehousingOutHead"
$("#form-poinvoicehead-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-poinvoicehead-add').serialize());
}
}
//鼠标移入,显示完整的数据
function paramsMatter(value, row, index) {
var span = document.createElement("span");
span.setAttribute("title", value);
span.innerHTML = value;
return span.outerHTML;
}
//提交
function submit() {
let bootstrapTable = $("#bootstrapTableBody").bootstrapTable("getData", true);
let formData = new FormData($("#form-poinvoicehead-add")[0]);
formData.append("warehousingOutLists", JSON.stringify(bootstrapTable));
let data = {};
formData.forEach((value, key) => data[key] = value);
//alert(JSON.stringify(data1));
$.ajax({
url: prefix + "/workOrder",
type: "post",
resultType: "json",
data: {"jsonStr": JSON.stringify(data)},
success: function (resp) {
if (resp.code === 0) {
alert("添加成功!");
var index = parent.layer.getFrameIndex(window.name);
var parent2 = window.parent;
parent2.$.table.refresh();
parent.layer.close(index);//关闭当前页
} else {
$.modal.msgError(resp.msg);
}
},
error: function () {
$.modal.msgError("出错了!");
}
});
}
//待提交表格
$('#bootstrapTableBody').bootstrapTable({
striped: true, // 是否显示行间隔色
cache: false, // 是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
// contentType :"application/x-www-form-urlencoded",
// pageNumber : 1, // 初始化加载第一页,默认第一页
// pageSize : 10, // 每页的记录行数(*)
// pageList : [ 5, 10,50], // 可供选择的每页的行数(*)
// clickToSelect : true, // 是否启用点击选中行
showToggle: false, // 是否显示详细视图和列表视图的切换按钮
cardView: false, // 是否显示详细视图
detailView: false, // 是否显示父子表
smartDisplay: false, // 加了这个才显示每页显示的行数
showExport: false, // 是否显示导出按钮
singleSelect: true,
height: 400,
columns: [{
checkbox: false
},
{
field: 'itemCode',
title: '物料代码'
},
{
field: 'itemName',
title: '物料名称'
},
{
field: 'itemSpecification',
title: '物料规格'
},
{
field: 'unit',
title: '单位'
},
{
field: 'planQty',
title: '计划数量'
},
{
field: 'realQty',
title: '实际数量',
editable: {
type: 'text',
title: '数量',
emptytext: "0",
validate: function (value) {
if (parseInt(value) < 0) {
return '数量不能小于0!';
}
if (isNaN(value)) {
return '数量必须是数字!';
}
let findQty = 0;
$.ajax({
url:ctx+"stock/warehouse/code",
type:"post",
dataType:"json",
success: function (resp) {
if (resp.code === 0) {
let data = resp.data;
findQty = data.qty;
} else {
$.modal.msgError(resp.msg);
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
})
//alert(findQty);
if (parseInt(value) > findQty) {
return '该料库存不足!';
}
}
}
},
{
field: 'returnQty',
title: '应退数量'
},
{
field: 'remark',
title: '备注'
},
{
field: 'itemClass',
title: '物料类别',
visible: false
}
]
});
//弹层制工单列表
$('#workOrderTable').bootstrapTable({
url: ctx + "produce/workorderhead/list",
method: 'post',
striped: true, // 是否显示行间隔色
cache: false, // 是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
pagination: true, // 是否显示分页(*)
contentType: "application/x-www-form-urlencoded",
queryParams: function (params) {
let curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1
// searchValue: params.search,
// orderByColumn: params.sort,
// isAsc: params.order
};
let poId = $("#poId").val();
//alert(wlCode);
let json = $.extend(curParams, {"poId": poId});
return json;
},
sidePagination: "server", // 分页方式:client客户端分页,server服务端分页(*)
pageNumber: 1, // 初始化加载第一页,默认第一页
pageSize: 5, // 每页的记录行数(*)
pageList: [5, 10, 50], // 可供选择的每页的行数(*)
clickToSelect: true, // 是否启用点击选中行
showToggle: false, // 是否显示详细视图和列表视图的切换按钮
cardView: false, // 是否显示详细视图
detailView: false, // 是否显示父子表
smartDisplay: false, // 加了这个才显示每页显示的行数
showExport: false, // 是否显示导出按钮
singleSelect: true,
height: 350,
columns: [
{
checkbox: true
},
{
field: 'workNo',
title: '制工单号',
},
{
field: 'cpCode',
title: '成品代码',
},
{
field: 'cpName',
title: '成品名称',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "80px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "100px",
"white-space": "nowrap"
}
}
}
}
]
});
function submitHandler() {
submit();
}
//点击选择制工单
function confirm() {
let row = $("#workOrderTable").bootstrapTable("getSelections");
//alert(JSON.stringify(row));
if (row.length !== 0) {
$("input[name='workOrderNo']").val(row[0].workNo);
$("input[name='CPItemCode']").val(row[0].cpCode);
$("select[name='outputClass']").val("1").select2();
$.ajax({
url:ctx+"produce/list/getList",
type:"post",
dataType:"json",
success: function (resp) {
if (resp.code === 0) {
let list = resp.data;
let count = $('#bootstrapTableBody').bootstrapTable('getData').length;
for (let i in list) {
$("#bootstrapTableBody").bootstrapTable('insertRow', {
index: count + i,
row: {
itemCode: list[i].wlCode,
itemName: list[i].itemname,
itemSpecification: list[i].itemstandard,
unit: list[i].stockDw,
planQty: list[i].qty,
realQty: list[i].orderQty,
returnQty: list[i].returnQty,
remark: list[i].MemoList,
}
});
}
} else {
$.modal.msgError(resp.msg);
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
})
reset();
}
$("#workModal").modal("hide");
}
//获取部门编号和名称
$.ajax({
url: ctx + "system/dept/list",
type: "post",
dataType: "json",
success: function (resp) {
//let list = resp.data;
//alert(JSON.stringify(resp));
for (let i in resp) {
$("select[name='deptName']").append("<option value='" + resp[i].deptName + "'>" + resp[i].deptName + "</option>");
$("select[name='deptNo']").append("<option value='" + resp[i].deptId + "'>" + resp[i].deptId + "</option>");
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
})
//获取仓库名
$.ajax({
url: ctx + "stock/stockInfo/all",
type: "post",
dataType: "json",
success: function (resp) {
if (resp.code === 0) {
let data = resp.data;
//alert(JSON.stringify(data));
for (let i in data) {
$("select[name='stockName']").append("<option value='" + data[i].stockname + "'>" + data[i].stockname + "</option>");
$("select[name='stockNo']").append("<option value='" + data[i].stockNO + "'>" + data[i].stockNO + "</option>");
}
} else {
$.modal.msgError(resp.msg);
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
})
//修改仓库名时 改变仓库号
$("select[name='stockName']").change(function () {
let stockName = $(this).val();
$.ajax({
url: ctx + "stock/stockInfo/all",
data: {"Stockname": stockName},
type: "post",
resultType: "json",
success: function (resp) {
if (resp.code === 0) {
let stockList = resp.data;
//alert(JSON.stringify(stockList));
$("select[name='stockNo']").val(stockList[0].stockNO).trigger("change");
} else {
$.modal.msgError(resp.msg);
}
},
error: function () {
$.modal.msgError("出错了!");
}
})
})
//获取今天日期
let today = new Date();
today.setTime(today.getTime());
let time = today.getFullYear() + "-" + (today.getMonth() + 1) + "-" + today.getDate();
$("input[name='warehousingOutDate']").val(time);
//获取登录人
let userName = [[${@permission.getPrincipalProperty('userName')}]];
$("input[name='warehouseKeeper']").val(userName);
//获取出库单号
$.ajax({
url: prefix + "/no",
type: "post",
dataType: "json",
success: function (resp) {
if (resp.code === 0) {
$("input[name='warehousingOutNo']").val(resp.data);
} else {
$.modal.msgError(resp.msg);
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
})
//点击选择工单号
function chooseWorkOrder(){
$("#workModal").modal("show");
}
//重置
function reset() {
$("#poId").val("");
$("#workOrderTable").bootstrapTable("refresh");
}
//搜索销售列表
$("#poIdSearch").on("click", function () {
$("#workOrderTable").bootstrapTable("refresh");
})
</script>
</body>
</html>

180
ruoyi-admin/src/main/resources/templates/stock/warehousingOutHead/add.html

@ -1,180 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增出库')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-warehousingOutHead-add">
<div class="form-group">
<label class="col-sm-3 control-label">制工单号:</label>
<div class="col-sm-8">
<input name="workOrderNo" 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="warehousingOutDate" 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="linkman" 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="stockNo" 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">
<select name="stockName" 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="warehouseKeeper" 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="outputClass" 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">
<select name="itemClass" 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">
<select name="confirmFlag" 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="confirmMan" 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="confirmDate" 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">
<select name="deptName" 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="spare1" 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="spare2" 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="spare3" 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="spare4" 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="spare5" 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="spare6" 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="deptNo" 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>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "stock/warehousingOutHead"
$("#form-warehousingOutHead-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-warehousingOutHead-add').serialize());
}
}
$("input[name='warehousingOutDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='confirmDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

181
ruoyi-admin/src/main/resources/templates/stock/warehousingOutHead/edit.html

@ -1,181 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改出库')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-warehousingOutHead-edit" th:object="${warehousingOutHead}">
<input name="warehousingOutNo" th:field="*{warehousingOutNo}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">制工单号:</label>
<div class="col-sm-8">
<input name="workOrderNo" th:field="*{workOrderNo}" 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="warehousingOutDate" th:value="${#dates.format(warehousingOutHead.warehousingOutDate, '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="linkman" th:field="*{linkman}" 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="stockNo" 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">
<select name="stockName" 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="warehouseKeeper" th:field="*{warehouseKeeper}" 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="outputClass" 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">
<select name="itemClass" 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">
<select name="confirmFlag" 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="confirmMan" th:field="*{confirmMan}" 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="confirmDate" th:value="${#dates.format(warehousingOutHead.confirmDate, '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">
<select name="deptName" 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="spare1" th:field="*{spare1}" 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="spare2" th:field="*{spare2}" 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="spare3" th:field="*{spare3}" 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="spare4" th:field="*{spare4}" 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="spare5" th:field="*{spare5}" 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="spare6" th:field="*{spare6}" 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="deptNo" 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>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "stock/warehousingOutHead";
$("#form-warehousingOutHead-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-warehousingOutHead-edit').serialize());
}
}
$("input[name='warehousingOutDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='confirmDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

643
ruoyi-admin/src/main/resources/templates/stock/warehousingOutHead/scrap.html

@ -1,643 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="include :: header('物料报废')"/>
<th:block th:include="include :: datetimepicker-css"/>
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet">
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet">
</head>
<body class="white-bg">
<!-- <div class="wrapper wrapper-content animated fadeInRight ibox-content">-->
<div class="container-div">
<div class="row">
<div class="col-sm-12">
</div>
<form class="form-horizontal m" id="form-poinvoicehead-add">
<div class="form-group">
<label class="col-sm-3 control-label">出库单号:</label>
<div class="col-sm-8">
<input name="warehousingOutNo" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出库类型:</label>
<div class="col-sm-8">
<select name="outputClass" class="form-control m-b" th:with="type=${@dict.getType('sys_out_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">
<div class="input-group date">
<input name="warehousingOutDate" class="form-control time-input" 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="warehouseKeeper" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">申请人员:</label>
<div class="col-sm-8">
<input name="spare2" 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="deptName" class="form-control m-b">
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库号:</label>
<div class="col-sm-8">
<select name="stockNo" class="form-control m-b" disabled>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库名称:</label>
<div class="col-sm-8">
<select name="stockName" class="form-control m-b">
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<input name="spare3" class="form-control" type="text">
</div>
</div>
</form>
<div class="col-sm-12">
<label>物料代码:</label>
<input type="text" id="itemNo" class="form-control" placeholder="请输入物料代码"
style="margin-bottom: 15px">
<button type="button" class="btn btn-success" id="bomTableSearch">搜索</button>
<button type="button" class="btn btn-success" onclick="bomTableReset()">重置</button>
<div class="col-sm-12 select-table table-striped" style="padding-bottom: 100px;">
<table id="bootstrap-table"></table>
</div>
</div>
<div class="col-sm-12" style="text-align: center">
<button type="button" class="btn btn-success" style="margin-top: 20px"
onclick="addBom()">确定
</button>
</div>
<div class="col-sm-12 select-table table-striped" style="padding-bottom: 100px;">
<table id="bootstrapTableBody"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<th:block th:include="include :: bootstrap-table-editable-js"/>
<script th:src="@{/ajax/libs/select2/select2.js}"></script>
<script th:inline="javascript">
let prefix = ctx + "stock/warehousingOutHead"
var warehousingTypeDatas = [[${@dict.getType('dock_warehousing_purchase_type')}]];
var domesticOrExportDatas = [[${@dict.getType('sys_NWX_class')}]];
$("#form-poinvoicehead-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-poinvoicehead-add').serialize());
}
}
//鼠标移入,显示完整的数据
function paramsMatter(value, row, index) {
var span = document.createElement("span");
span.setAttribute("title", value);
span.innerHTML = value;
return span.outerHTML;
}
//提交
function submit() {
let bootstrapTable = $("#bootstrapTableBody").bootstrapTable("getData", true);
let formData = new FormData($("#form-poinvoicehead-add")[0]);
formData.append("warehousingOutLists", JSON.stringify(bootstrapTable));
let data = {};
formData.forEach((value, key) => data[key] = value);
//alert(JSON.stringify(data1));
$.ajax({
url: prefix + "/scrapItem",
type: "post",
resultType: "json",
data: {"jsonStr": JSON.stringify(data)},
success: function (resp) {
if (resp.code === 0) {
alert("添加成功!");
var index = parent.layer.getFrameIndex(window.name);
var parent2 = window.parent;
parent2.$.table.refresh();
parent.layer.close(index);//关闭当前页
} else {
$.modal.msgError(resp.msg);
}
},
error: function () {
$.modal.msgError("出错了!");
}
});
}
//选择入库记录列表
$('#bootstrap-table').bootstrapTable({
url: ctx + "stock/record/list",
method: 'post',
striped: true, // 是否显示行间隔色
cache: false, // 是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
pagination: true, // 是否显示分页(*)
contentType: "application/x-www-form-urlencoded",
queryParams: function (params) {
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1
// searchValue: params.search,
// orderByColumn: params.sort,
// isAsc: params.order
};
var itemNo = $("#itemNo").val();
//alert(wlCode);
var json = $.extend(curParams, {"itemNo": itemNo});
return json;
},
sidePagination: "server", // 分页方式:client客户端分页,server服务端分页(*)
pageNumber: 1, // 初始化加载第一页,默认第一页
pageSize: 5, // 每页的记录行数(*)
pageList: [5, 10, 50], // 可供选择的每页的行数(*)
clickToSelect: true, // 是否启用点击选中行
showToggle: false, // 是否显示详细视图和列表视图的切换按钮
cardView: false, // 是否显示详细视图
detailView: false, // 是否显示父子表
smartDisplay: false, // 加了这个才显示每页显示的行数
showExport: false, // 是否显示导出按钮
// singleSelect : true,
uniqueId: 'warehousingrecordNo',
height: 350,
columns: [{
checkbox: true
},
{
field: 'warehousingrecordNo',
title: '入库记录单号'
},
{
field: 'customerId',
title: '客户号',
visible: false
},
{
field: 'customerName',
title: '客户名称',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "130px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "150px",
"white-space": "nowrap"
}
}
},
formatter: paramsMatter,
visible: false
},
{
field: 'warehousingType',
title: '入库类型',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "130px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "150px",
"white-space": "nowrap"
}
}
},
formatter: function (value, row, index) {
// return $.table.selectDictLabel(warehousingTypeDatas, value);
var s = $.table.selectDictLabel(warehousingTypeDatas, value);
var span = document.createElement("span");
span.setAttribute("title", s);
span.innerHTML = s;
return span.outerHTML;
}
},
{
field: 'warehousingrecordDate',
title: '入库日期',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "130px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "150px",
"white-space": "nowrap"
}
}
},
formatter: paramsMatter,
visible: false
},
{
field: 'purchaseorderNo',
title: '采购订单号',
visible: false
},
{
field: 'workorderNo',
title: '制工单号',
visible: false
},
{
field: 'domesticOrExport',
title: '内外销',
formatter: function (value, row, index) {
return $.table.selectDictLabel(domesticOrExportDatas, value);
}
},
{
field: 'warehouseNo',
title: '仓库号'
},
{
field: 'warehouseName',
title: '仓库名称',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "130px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "150px",
"white-space": "nowrap"
}
}
},
formatter: paramsMatter
},
{
field: 'warehousingAmt',
title: '入库数量'
},
{
field: 'itemNo',
title: '物料代码',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "130px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "150px",
"white-space": "nowrap"
}
}
},
formatter: paramsMatter
},
{
field: 'itemName',
title: '物料名称',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "130px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "150px",
"white-space": "nowrap"
}
}
},
formatter: paramsMatter
},
{
field: 'itemTimes',
title: '项次',
visible: false
},
{
field: 'specificationModel',
title: '规格型号',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "130px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "150px",
"white-space": "nowrap"
}
}
},
formatter: paramsMatter
},
{
field: 'machineType',
title: '机种',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "130px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "150px",
"white-space": "nowrap"
}
}
},
formatter: paramsMatter,
visible: false
},
{
field: 'unit',
title: '单位',
visible: false
},
{
field: 'spell1',
title: '是否对账',
visible: false
},
{
field: 'spell2',
title: '批次',
visible: false
},
{
field: 'spell3',
title: '是否撤销',
visible: false
},
{
field: 'surplusQty',
title: '剩余数量',
},
]
});
//待提交表格
$('#bootstrapTableBody').bootstrapTable({
striped: true, // 是否显示行间隔色
cache: false, // 是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
// contentType :"application/x-www-form-urlencoded",
// pageNumber : 1, // 初始化加载第一页,默认第一页
// pageSize : 10, // 每页的记录行数(*)
// pageList : [ 5, 10,50], // 可供选择的每页的行数(*)
// clickToSelect : true, // 是否启用点击选中行
showToggle: false, // 是否显示详细视图和列表视图的切换按钮
cardView: false, // 是否显示详细视图
detailView: false, // 是否显示父子表
smartDisplay: false, // 加了这个才显示每页显示的行数
showExport: false, // 是否显示导出按钮
singleSelect: true,
height: 400,
columns: [{
checkbox: false
},
{
field: 'itemCode',
title: '物料代码'
},
{
field: 'itemName',
title: '物料名称'
},
{
field: 'itemSpecification',
title: '物料规格'
},
{
field: 'unit',
title: '单位'
},
{
field: 'planQty',
title: '计划数量',
visible: false
},
{
field: 'realQty',
title: '实际数量',
editable: {
type: 'text',
title: '数量',
emptytext: "0",
validate: function (value) {
if (parseInt(value) < 0) {
return '数量不能小于0!';
}
if (isNaN(value)) {
return '数量必须是数字!';
}
let findQty = 0;
$.ajax({
url: ctx + "stock/warehouse/code",
type: "post",
dataType: "json",
success: function (resp) {
if (resp.code === 0) {
let data = resp.data;
findQty = data.qty;
} else {
$.modal.msgError(resp.msg);
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
})
//alert(findQty);
if (parseInt(value) > findQty) {
return '该料库存不足!';
}
}
}
},
{
field: 'returnQty',
title: '应退数量',
visible: false
},
{
field: 'remark',
title: '备注',
editable: {
type: 'text',
title: '说明',
emptytext: ""
}
},
{
field: 'itemClass',
title: '物料类别',
visible: false
},
{
field: 'spare1',
title: '入库单号'
}
]
});
function submitHandler() {
submit();
}
//获取部门编号和名称
$.ajax({
url: ctx + "system/dept/list",
type: "post",
dataType: "json",
success: function (resp) {
//let list = resp.data;
//alert(JSON.stringify(resp));
for (let i in resp) {
$("select[name='deptName']").append("<option value='" + resp[i].deptName + "'>" + resp[i].deptName + "</option>");
// $("select[name='deptNo']").append("<option value='" + resp[i].deptId + "'>" + resp[i].deptId + "</option>");
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
})
//获取仓库名
$.ajax({
url: ctx + "stock/stockInfo/all",
type: "post",
dataType: "json",
success: function (resp) {
if (resp.code === 0) {
let data = resp.data;
//alert(JSON.stringify(data));
for (let i in data) {
$("select[name='stockName']").append("<option value='" + data[i].stockname + "'>" + data[i].stockname + "</option>");
$("select[name='stockNo']").append("<option value='" + data[i].stockNO + "'>" + data[i].stockNO + "</option>");
}
} else {
$.modal.msgError(resp.msg);
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
})
//修改仓库名时 改变仓库号
$("select[name='stockName']").change(function () {
let stockName = $(this).val();
$.ajax({
url: ctx + "stock/stockInfo/all",
data: {"Stockname": stockName},
type: "post",
resultType: "json",
success: function (resp) {
if (resp.code === 0) {
let stockList = resp.data;
//alert(JSON.stringify(stockList));
$("select[name='stockNo']").val(stockList[0].stockNO).trigger("change");
} else {
$.modal.msgError(resp.msg);
}
},
error: function () {
$.modal.msgError("出错了!");
}
})
})
//获取今天日期
let today = new Date();
today.setTime(today.getTime());
let time = today.getFullYear() + "-" + (today.getMonth() + 1) + "-" + today.getDate();
$("input[name='warehousingOutDate']").val(time);
//获取登录人
let userName = [[${@permission.getPrincipalProperty('userName')}]];
$("input[name='warehouseKeeper']").val(userName);
$("input[name='spare2']").val(userName);
//获取出库单号
$.ajax({
url: prefix + "/no",
type: "post",
dataType: "json",
success: function (resp) {
if (resp.code === 0) {
$("input[name='warehousingOutNo']").val(resp.data);
} else {
$.modal.msgError(resp.msg);
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
})
//入库表格重置
function bomTableReset() {
$("#itemNo").val("");
$("#bootstrap-table").bootstrapTable("refresh");
}
//搜索销售列表
$("#bomTableSearch").on("click", function () {
$("#bootstrap-table").bootstrapTable("refresh");
})
//将选中的入库记录引入表格
function addBom() {
let row = $("#bootstrap-table").bootstrapTable("getSelections");
let count = $('#bootstrapTableBody').bootstrapTable('getData').length;
for (let i = 0; i < row.length; i++) {
let bootstrapTable = $("#bootstrapTableBody").bootstrapTable("getRowByUniqueId", row[i].zpGuige);
//alert(bootstrapTable);
if (bootstrapTable != null) {
alert("入库单号" + bootstrapTable.zpGuige + "已存在!");
continue;
}
$("#bootstrapTableBody").bootstrapTable('insertRow', {
index: count + i,
row: {
itemCode: row[i].itemNo,
itemName: row[i].itemName,
itemSpecification: row[i].specificationModel,
unit: row[i].unit,
realQty: 0,
spare1: row[i].warehousingrecordNo
}
});
}
bomTableReset();
}
</script>
</body>
</html>

335
ruoyi-admin/src/main/resources/templates/stock/warehousingOutHead/warehousingOutHead.html

@ -1,335 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('出库列表')"/>
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet">
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet">
</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="warehousingOutNo"/>
</li>
<li>
<label>制工单号:</label>
<input type="text" name="workOrderNo"/>
</li>
<li>
<label>订单号:</label>
<input type="text" name="buyOrderNo"/>
</li>
<li class="select-time">
<label>出库日期:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间"
name="params[beginWarehousingOutDate]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间"
name="params[endWarehousingOutDate]"/>
</li>
<!-- <li>-->
<!-- <label>联系人:</label>-->
<!-- <input type="text" name="linkman"/>-->
<!-- </li>-->
<!-- <li>-->
<!-- <label>仓库号:</label>-->
<!-- <select name="stockNo">-->
<!-- <option value="">所有</option>-->
<!-- <option value="-1">代码生成请选择字典属性</option>-->
<!-- </select>-->
<!-- </li>-->
<li>
<label>仓库名称:</label>
<select name="stockName" class="form-control m-b">
<option value="">所有</option>
</select>
</li>
<!-- <li>-->
<!-- <label>仓库管理员:</label>-->
<!-- <input type="text" name="warehouseKeeper"/>-->
<!-- </li>-->
<!-- <li>-->
<!-- <label>出库类型:</label>-->
<!-- <select name="outputClass" class="form-control m-b">-->
<!-- <option value="">所有</option>-->
<!-- </select>-->
<!-- </li>-->
<li>
<label>出库类型:</label>
<select name="outputClass"
th:with="type=${@dict.getType('sys_out_type')}" class="form-control m-b">
<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="itemCode"/>
</li>
<li>
<label>物料名称:</label>
<input type="text" name="itemName"/>
</li>
<!-- <li>-->
<!-- <label>物料类别:</label>-->
<!-- <select name="itemClass">-->
<!-- <option value="">所有</option>-->
<!-- <option value="-1">代码生成请选择字典属性</option>-->
<!-- </select>-->
<!-- </li>-->
<!-- <li>-->
<!-- <label>是否确认:</label>-->
<!-- <select name="confirmFlag">-->
<!-- <option value="">所有</option>-->
<!-- <option value="-1">代码生成请选择字典属性</option>-->
<!-- </select>-->
<!-- </li>-->
<!-- <li>-->
<!-- <label>确认人:</label>-->
<!-- <input type="text" name="confirmMan"/>-->
<!-- </li>-->
<!-- <li>-->
<!-- <label>确认时间:</label>-->
<!-- <input type="text" class="time-input" placeholder="请选择确认时间" name="confirmDate"/>-->
<!-- </li>-->
<!-- <li>-->
<!-- <label>部门名称:</label>-->
<!-- <select name="deptName" class="form-control m-b">-->
<!-- <option value="">所有</option>-->
<!-- </select>-->
<!-- </li>-->
<li>
<label>部门名称:</label>
<select name="deptName"
th:with="type=${@dict.getType('sys_dept_type')}" class="form-control m-b">
<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="spare1"/>-->
<!-- </li>-->
<!-- <li>-->
<!-- <label>:</label>-->
<!-- <input type="text" name="spare2"/>-->
<!-- </li>-->
<!-- <li>-->
<!-- <label>:</label>-->
<!-- <input type="text" name="spare3"/>-->
<!-- </li>-->
<!-- <li>-->
<!-- <label>:</label>-->
<!-- <input type="text" name="spare4"/>-->
<!-- </li>-->
<!-- <li>-->
<!-- <label>:</label>-->
<!-- <input type="text" name="spare5"/>-->
<!-- </li>-->
<!-- <li>-->
<!-- <label>:</label>-->
<!-- <input type="text" name="spare6"/>-->
<!-- </li>-->
<!-- <li>-->
<!-- <label>部门编号:</label>-->
<!-- <select name="deptNo">-->
<!-- <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>
<a class="btn btn-warning btn-rounded btn-sm" onclick="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="" shiro:hasPermission="stock:warehousingOutHead:add" disabled>
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="" shiro:hasPermission="stock:warehousingOutHead:edit"
disabled>
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="" shiro:hasPermission="stock:warehousingOutHead:remove"
disabled>
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()"
shiro:hasPermission="stock:warehousingOutHead:export">
<i class="fa fa-download"></i> 导出
</a>
<a class="btn btn-success" onclick="YLOut()" shiro:hasPermission="stock:warehousingOutHead:add">
<i class="fa fa-plus"></i> 领料出库
</a>
<a class="btn btn-success" onclick="itemScrap()" shiro:hasPermission="stock:warehousingOutHead:add">
<i class="fa fa-plus"></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:src="@{/ajax/libs/select2/select2.js}"></script>
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('stock:warehousingOutHead:edit')}]];
var removeFlag = [[${@permission.hasPermi('stock:warehousingOutHead:remove')}]];
var prefix = ctx + "stock/warehousingOutHead";
$(function () {
var options = {
url: prefix + "/record",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "出库",
columns: [{
checkbox: true
},
{
field: 'warehousingOutNo',
title: '出库单号',
},
{
field: 'workOrderNo',
title: '制工单号'
},
{
field: 'buyOrderNo',
title: '订单号'
},
{
field: 'warehousingOutDate',
title: '出库日期'
},
{
field: 'itemNo',
title: '项次'
},
{
field: 'itemCode',
title: '物料代码'
},
{
field: 'itemName',
title: '物料名称'
},
{
field: 'itemSpecification',
title: '物料规格'
},
{
field: 'unit',
title: '单位'
},
{
field: 'planQty',
title: '计划数量'
},
{
field: 'realQty',
title: '实际数量'
},
{
field: 'returnQty',
title: '应退数量'
},
{
field: 'remark',
title: '备注'
},
{
field: 'deptNo',
title: '部门编号'
},
{
field: 'deptName',
title: '部门名称'
},
{
field: 'stockName',
title: '仓库名称',
visible:false
},
{
field: 'outputClass',
title: '出库类别',
visible:false
},
{
field: 'itemClass',
title: '物料类别',
visible:false
},
{
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="" disabled><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="" disabled><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
//获取仓库名
$.ajax({
url: ctx + "stock/stockInfo/all",
type: "post",
dataType: "json",
success: function (resp) {
if (resp.code === 0) {
let data = resp.data;
//alert(data);
for (let i in data) {
$("select[name='stockName']").append("<option value='" + data[i].stockname + "'>" + data[i].stockname + "</option>");
}
} else {
$.modal.msgError(resp.msg);
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
})
//重置
function reset() {
$("select[name='stockName']").val("").select2();
$("select[name='deptName']").val("").select2();
$("select[name='outputClass']").val("").select2();
$.form.reset();
}
//打开原料出库页面
function YLOut(){
$.modal.open("原料出库", prefix + "/CP");
}
//打开物料报废页面
function itemScrap(){
$.modal.open("物料报废", prefix + "/scrap");
}
</script>
</body>
</html>
Loading…
Cancel
Save