Browse Source

删除旧版无用的KHTH/SC退换货 return_goods_khth_sc_info和系统中对应的前端所有代码和后端所有代码 和对应的系统菜单数据

删除旧版无用的return_goods_product表
删除旧版无用的return_goods_order表
删除旧版无用的销售对账列表对象 sendcplist和系统中对应的前端所有代码和后端所有代码 和对应的系统菜单数据
dev
liuxiaoxu 4 months ago
parent
commit
cb05eb9ed9
  1. 126
      ruoyi-admin/src/main/java/com/ruoyi/finance/controller/SendcplistController.java
  2. 21
      ruoyi-admin/src/main/java/com/ruoyi/finance/domain/Parameter.java
  3. 276
      ruoyi-admin/src/main/java/com/ruoyi/finance/domain/SaleorderHL.java
  4. 491
      ruoyi-admin/src/main/java/com/ruoyi/finance/domain/Sendcplist.java
  5. 41
      ruoyi-admin/src/main/java/com/ruoyi/finance/domain/productpriceCAA.java
  6. 61
      ruoyi-admin/src/main/java/com/ruoyi/finance/mapper/SendcplistMapper.java
  7. 61
      ruoyi-admin/src/main/java/com/ruoyi/finance/service/ISendcplistService.java
  8. 94
      ruoyi-admin/src/main/java/com/ruoyi/finance/service/impl/SendcplistServiceImpl.java
  9. 215
      ruoyi-admin/src/main/resources/mapper/finance/SendcplistMapper.xml
  10. 243
      ruoyi-admin/src/main/resources/templates/finance/sendcplist/add.html
  11. 244
      ruoyi-admin/src/main/resources/templates/finance/sendcplist/edit.html
  12. 337
      ruoyi-admin/src/main/resources/templates/finance/sendcplist/sendcplist.html
  13. 542
      ruoyi-admin/src/main/resources/templates/outsource/materialRequisitionOutsource/add.html
  14. 506
      ruoyi-admin/src/main/resources/templates/outsource/materialRequisitionOutsource/edit.html
  15. 281
      ruoyi-admin/src/main/resources/templates/outsource/materialRequisitionOutsource/materialRequisitionOutsource.html
  16. 645
      ruoyi-admin/src/main/resources/templates/outsource/outsourceInspectionNotice/add.html
  17. 626
      ruoyi-admin/src/main/resources/templates/outsource/outsourceInspectionNotice/edit.html
  18. 377
      ruoyi-admin/src/main/resources/templates/outsource/outsourceInspectionNotice/outsourceInspectionNotice.html
  19. 921
      ruoyi-admin/src/main/resources/templates/outsource/outsourceOrderInfo/add.html
  20. 900
      ruoyi-admin/src/main/resources/templates/outsource/outsourceOrderInfo/edit.html
  21. 602
      ruoyi-admin/src/main/resources/templates/outsource/outsourceOrderInfo/outsourceOrderInfo.html
  22. 104
      ruoyi-admin/src/main/resources/templates/outsource/outsourceOrderMaterial/add.html
  23. 105
      ruoyi-admin/src/main/resources/templates/outsource/outsourceOrderMaterial/edit.html
  24. 151
      ruoyi-admin/src/main/resources/templates/outsource/outsourceOrderMaterial/outsourceOrderMaterial.html
  25. 67
      ruoyi-admin/src/main/resources/templates/outsource/process/add.html
  26. 44
      ruoyi-admin/src/main/resources/templates/outsource/process/edit.html
  27. 136
      ruoyi-admin/src/main/resources/templates/outsource/process/process.html

126
ruoyi-admin/src/main/java/com/ruoyi/finance/controller/SendcplistController.java

@ -1,126 +0,0 @@
package com.ruoyi.finance.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.finance.domain.Sendcplist;
import com.ruoyi.finance.service.ISendcplistService;
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 ruoyi
* @date 2021-11-24
*/
@Controller
@RequestMapping("/finance/sendcplist")
public class SendcplistController extends BaseController
{
private String prefix = "finance/sendcplist";
@Autowired
private ISendcplistService sendcplistService;
@RequiresPermissions("finance:sendcplist:view")
@GetMapping()
public String sendcplist()
{
return prefix + "/sendcplist";
}
/**
* 查询销售对账列表列表
*/
@RequiresPermissions("finance:sendcplist:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(Sendcplist sendcplist)
{
startPage();
List<Sendcplist> list = sendcplistService.selectSendcplistList(sendcplist);
return getDataTable(list);
}
/**
* 导出销售对账列表列表
*/
@RequiresPermissions("finance:sendcplist:export")
@Log(title = "销售对账列表", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(Sendcplist sendcplist)
{
List<Sendcplist> list = sendcplistService.selectSendcplistList(sendcplist);
ExcelUtil<Sendcplist> util = new ExcelUtil<Sendcplist>(Sendcplist.class);
return util.exportExcel(list, "销售对账列表数据");
}
/**
* 新增销售对账列表
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存销售对账列表
*/
@RequiresPermissions("finance:sendcplist:add")
@Log(title = "销售对账列表", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(Sendcplist sendcplist)
{
return toAjax(sendcplistService.insertSendcplist(sendcplist));
}
/**
* 修改销售对账列表
*/
@GetMapping("/edit/{outputID}")
public String edit(@PathVariable("outputID") String outputID, ModelMap mmap)
{
Sendcplist sendcplist = sendcplistService.selectSendcplistById(outputID);
mmap.put("sendcplist", sendcplist);
return prefix + "/edit";
}
/**
* 修改保存销售对账列表
*/
@RequiresPermissions("finance:sendcplist:edit")
@Log(title = "销售对账列表", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(Sendcplist sendcplist)
{
return toAjax(sendcplistService.updateSendcplist(sendcplist));
}
/**
* 删除销售对账列表
*/
@RequiresPermissions("finance:sendcplist:remove")
@Log(title = "销售对账列表", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(sendcplistService.deleteSendcplistByIds(ids));
}
}

21
ruoyi-admin/src/main/java/com/ruoyi/finance/domain/Parameter.java

@ -1,21 +0,0 @@
package com.ruoyi.finance.domain;
public class Parameter {
//客户资料记录数
private String Num;
public String getNum() {
return Num;
}
public void setNum(String num) {
Num = num;
}
@Override
public String toString() {
return "Parameter{" +
"Num='" + Num + '\'' +
'}';
}
}

276
ruoyi-admin/src/main/java/com/ruoyi/finance/domain/SaleorderHL.java

@ -1,276 +0,0 @@
package com.ruoyi.finance.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import java.math.BigDecimal;
import java.util.Date;
public class SaleorderHL {
/** */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
private Date sendDate;
/** */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
private Date sendDate2;
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
private Date plandate;
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
private Date plandate2;
/** */
@Excel(name = "")
private String dateStart;
/** */
@Excel(name = "")
private String dateEed;
public String getDateStart() {
return dateStart;
}
public void setDateStart(String dateStart) {
this.dateStart = dateStart;
}
public String getDateEed() {
return dateEed;
}
public void setDateEed(String dateEed) {
this.dateEed = dateEed;
}
/** */
@Excel(name = "")
private String saleorderIDL;
/** */
@Excel(name = "")
private String saleorderNO;
/** */
@Excel(name = "")
private String pCode;
/** */
@Excel(name = "")
private String pName;
/** */
@Excel(name = "")
private String wlCode;
/** */
@Excel(name = "")
private String itemname;
/** */
@Excel(name = "")
private String crlName;
/** */
@Excel(name = "")
private BigDecimal price;
/** */
@Excel(name = "")
private Integer qty;
/** */
@Excel(name = "")
private BigDecimal amt;
/** */
@Excel(name = "")
private String getMoneyMemo;
/** */
@Excel(name = "")
private String saler;
/** */
@Excel(name = "")
private String endFlag;
/** */
@Excel(name = "")
private String piNo;
public Date getSendDate2() {
return sendDate2;
}
public void setSendDate2(Date sendDate2) {
this.sendDate2 = sendDate2;
}
public Date getPlandate2() {
return plandate2;
}
public void setPlandate2(Date plandate2) {
this.plandate2 = plandate2;
}
public Date getSendDate() {
return sendDate;
}
public void setSendDate(Date sendDate) {
this.sendDate = sendDate;
}
public Date getPlandate() {
return plandate;
}
public void setPlandate(Date plandate) {
this.plandate = plandate;
}
public String getSaleorderIDL() {
return saleorderIDL;
}
public void setSaleorderIDL(String saleorderIDL) {
this.saleorderIDL = saleorderIDL;
}
public String getSaleorderNO() {
return saleorderNO;
}
public void setSaleorderNO(String saleorderNO) {
this.saleorderNO = saleorderNO;
}
public String getpCode() {
return pCode;
}
public void setpCode(String pCode) {
this.pCode = pCode;
}
public String getpName() {
return pName;
}
public void setpName(String pName) {
this.pName = pName;
}
public String getWlCode() {
return wlCode;
}
public void setWlCode(String wlCode) {
this.wlCode = wlCode;
}
public String getItemname() {
return itemname;
}
public void setItemname(String itemname) {
this.itemname = itemname;
}
public String getCrlName() {
return crlName;
}
public void setCrlName(String crlName) {
this.crlName = crlName;
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public Integer getQty() {
return qty;
}
public void setQty(Integer qty) {
this.qty = qty;
}
public BigDecimal getAmt() {
return amt;
}
public void setAmt(BigDecimal amt) {
this.amt = amt;
}
public String getGetMoneyMemo() {
return getMoneyMemo;
}
public void setGetMoneyMemo(String getMoneyMemo) {
this.getMoneyMemo = getMoneyMemo;
}
public String getSaler() {
return saler;
}
public void setSaler(String saler) {
this.saler = saler;
}
public String getEndFlag() {
return endFlag;
}
public void setEndFlag(String endFlag) {
this.endFlag = endFlag;
}
public String getPiNo() {
return piNo;
}
public void setPiNo(String piNo) {
this.piNo = piNo;
}
@Override
public String toString() {
return "SaleorderHL{" +
"sendDate=" + sendDate +
", sendDate2=" + sendDate2 +
", plandate=" + plandate +
", plandate2=" + plandate2 +
", dateStart='" + dateStart + '\'' +
", dateEed='" + dateEed + '\'' +
", saleorderIDL='" + saleorderIDL + '\'' +
", saleorderNO='" + saleorderNO + '\'' +
", pCode='" + pCode + '\'' +
", pName='" + pName + '\'' +
", wlCode='" + wlCode + '\'' +
", itemname='" + itemname + '\'' +
", crlName='" + crlName + '\'' +
", price=" + price +
", qty=" + qty +
", amt=" + amt +
", getMoneyMemo='" + getMoneyMemo + '\'' +
", saler='" + saler + '\'' +
", endFlag='" + endFlag + '\'' +
", piNo='" + piNo + '\'' +
'}';
}
}

491
ruoyi-admin/src/main/java/com/ruoyi/finance/domain/Sendcplist.java

@ -1,491 +0,0 @@
package com.ruoyi.finance.domain;
import java.math.BigDecimal;
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;
/**
* 销售对账列表对象 sendcplist
*
* @author ruoyi
* @date 2021-11-24
*/
public class Sendcplist extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** */
@Excel(name = "")
private String outputID;
/** */
@Excel(name = "")
private String PNO;
/** */
@Excel(name = "")
private String wlCode;
/** */
@Excel(name = "")
private String Itemname;
/** */
@Excel(name = "")
private String Itemstandard;
/** */
@Excel(name = "")
private String machineNo;
/** */
@Excel(name = "")
private String stockDw;
/** */
@Excel(name = "")
private Long planQty;
/** */
@Excel(name = "")
private Long Qty;
/** */
@Excel(name = "")
private Long returnQty;
/** */
@Excel(name = "")
private Long Weight;
/** */
@Excel(name = "")
private String crlName;
/** */
@Excel(name = "")
private Long Price;
/** */
@Excel(name = "")
private Long Amt;
/** */
@Excel(name = "")
private String MemoList;
/** */
@Excel(name = "")
private String wldm;
/** */
@Excel(name = "")
private String orderno;
/** */
@Excel(name = "")
private Integer endFlag;
/** */
@Excel(name = "")
private String piNo;
/** */
@Excel(name = "")
private BigDecimal rmbHuilv;
/** */
@Excel(name = "")
private BigDecimal nowsalePrice;
/** */
@Excel(name = "")
private BigDecimal nowsaleRmbPrice;
/** */
@Excel(name = "")
private BigDecimal useQty;
/** */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
private Date useDate;
/** */
@Excel(name = "")
private String useMemo;
/** */
@Excel(name = "")
private String confirmMan;
/** */
@Excel(name = "")
private BigDecimal nowPrice;
/** */
@Excel(name = "")
private String versionNo;
/** */
@Excel(name = "")
private Long haveVsAccount;
/** */
@Excel(name = "")
private String haveVsMan;
/** */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
private Date haveVsTime;
/** */
@Excel(name = "")
private BigDecimal dzQty;
/** */
@Excel(name = "")
private BigDecimal lastDzQty;
public void setOutputID(String outputID)
{
this.outputID = outputID;
}
public String getOutputID()
{
return outputID;
}
public void setPNO(String PNO)
{
this.PNO = PNO;
}
public String getPNO()
{
return PNO;
}
public void setWlCode(String wlCode)
{
this.wlCode = wlCode;
}
public String getWlCode()
{
return wlCode;
}
public void setItemname(String Itemname)
{
this.Itemname = Itemname;
}
public String getItemname()
{
return Itemname;
}
public void setItemstandard(String Itemstandard)
{
this.Itemstandard = Itemstandard;
}
public String getItemstandard()
{
return Itemstandard;
}
public void setMachineNo(String machineNo)
{
this.machineNo = machineNo;
}
public String getMachineNo()
{
return machineNo;
}
public void setStockDw(String stockDw)
{
this.stockDw = stockDw;
}
public String getStockDw()
{
return stockDw;
}
public void setPlanQty(Long planQty)
{
this.planQty = planQty;
}
public Long getPlanQty()
{
return planQty;
}
public void setQty(Long Qty)
{
this.Qty = Qty;
}
public Long getQty()
{
return Qty;
}
public void setReturnQty(Long returnQty)
{
this.returnQty = returnQty;
}
public Long getReturnQty()
{
return returnQty;
}
public void setWeight(Long Weight)
{
this.Weight = Weight;
}
public Long getWeight()
{
return Weight;
}
public void setCrlName(String crlName)
{
this.crlName = crlName;
}
public String getCrlName()
{
return crlName;
}
public void setPrice(Long Price)
{
this.Price = Price;
}
public Long getPrice()
{
return Price;
}
public void setAmt(Long Amt)
{
this.Amt = Amt;
}
public Long getAmt()
{
return Amt;
}
public void setMemoList(String MemoList)
{
this.MemoList = MemoList;
}
public String getMemoList()
{
return MemoList;
}
public void setWldm(String wldm)
{
this.wldm = wldm;
}
public String getWldm()
{
return wldm;
}
public void setOrderno(String orderno)
{
this.orderno = orderno;
}
public String getOrderno()
{
return orderno;
}
public void setEndFlag(Integer endFlag)
{
this.endFlag = endFlag;
}
public Integer getEndFlag()
{
return endFlag;
}
public void setPiNo(String piNo)
{
this.piNo = piNo;
}
public String getPiNo()
{
return piNo;
}
public void setRmbHuilv(BigDecimal rmbHuilv)
{
this.rmbHuilv = rmbHuilv;
}
public BigDecimal getRmbHuilv()
{
return rmbHuilv;
}
public void setNowsalePrice(BigDecimal nowsalePrice)
{
this.nowsalePrice = nowsalePrice;
}
public BigDecimal getNowsalePrice()
{
return nowsalePrice;
}
public void setNowsaleRmbPrice(BigDecimal nowsaleRmbPrice)
{
this.nowsaleRmbPrice = nowsaleRmbPrice;
}
public BigDecimal getNowsaleRmbPrice()
{
return nowsaleRmbPrice;
}
public void setUseQty(BigDecimal useQty)
{
this.useQty = useQty;
}
public BigDecimal getUseQty()
{
return useQty;
}
public void setUseDate(Date useDate)
{
this.useDate = useDate;
}
public Date getUseDate()
{
return useDate;
}
public void setUseMemo(String useMemo)
{
this.useMemo = useMemo;
}
public String getUseMemo()
{
return useMemo;
}
public void setConfirmMan(String confirmMan)
{
this.confirmMan = confirmMan;
}
public String getConfirmMan()
{
return confirmMan;
}
public void setNowPrice(BigDecimal nowPrice)
{
this.nowPrice = nowPrice;
}
public BigDecimal getNowPrice()
{
return nowPrice;
}
public void setVersionNo(String versionNo)
{
this.versionNo = versionNo;
}
public String getVersionNo()
{
return versionNo;
}
public void setHaveVsAccount(Long haveVsAccount)
{
this.haveVsAccount = haveVsAccount;
}
public Long getHaveVsAccount()
{
return haveVsAccount;
}
public void setHaveVsMan(String haveVsMan)
{
this.haveVsMan = haveVsMan;
}
public String getHaveVsMan()
{
return haveVsMan;
}
public void setHaveVsTime(Date haveVsTime)
{
this.haveVsTime = haveVsTime;
}
public Date getHaveVsTime()
{
return haveVsTime;
}
public void setDzQty(BigDecimal dzQty)
{
this.dzQty = dzQty;
}
public BigDecimal getDzQty()
{
return dzQty;
}
public void setLastDzQty(BigDecimal lastDzQty)
{
this.lastDzQty = lastDzQty;
}
public BigDecimal getLastDzQty()
{
return lastDzQty;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("outputID", getOutputID())
.append("PNO", getPNO())
.append("wlCode", getWlCode())
.append("Itemname", getItemname())
.append("Itemstandard", getItemstandard())
.append("machineNo", getMachineNo())
.append("stockDw", getStockDw())
.append("planQty", getPlanQty())
.append("Qty", getQty())
.append("returnQty", getReturnQty())
.append("Weight", getWeight())
.append("crlName", getCrlName())
.append("Price", getPrice())
.append("Amt", getAmt())
.append("MemoList", getMemoList())
.append("wldm", getWldm())
.append("orderno", getOrderno())
.append("endFlag", getEndFlag())
.append("piNo", getPiNo())
.append("rmbHuilv", getRmbHuilv())
.append("nowsalePrice", getNowsalePrice())
.append("nowsaleRmbPrice", getNowsaleRmbPrice())
.append("useQty", getUseQty())
.append("useDate", getUseDate())
.append("useMemo", getUseMemo())
.append("confirmMan", getConfirmMan())
.append("nowPrice", getNowPrice())
.append("versionNo", getVersionNo())
.append("haveVsAccount", getHaveVsAccount())
.append("haveVsMan", getHaveVsMan())
.append("haveVsTime", getHaveVsTime())
.append("dzQty", getDzQty())
.append("lastDzQty", getLastDzQty())
.toString();
}
}

41
ruoyi-admin/src/main/java/com/ruoyi/finance/domain/productpriceCAA.java

@ -1,41 +0,0 @@
package com.ruoyi.finance.domain;
public class productpriceCAA {
private String Id;
private String Name;
private String Date;
public String getId() {
return Id;
}
public void setId(String id) {
Id = id;
}
public String getName() {
return Name;
}
public void setName(String name) {
Name = name;
}
public String getDate() {
return Date;
}
public void setDate(String date) {
Date = date;
}
@Override
public String toString() {
return "productpriceCAA{" +
"Id='" + Id + '\'' +
", Name='" + Name + '\'' +
", Date='" + Date + '\'' +
'}';
}
}

61
ruoyi-admin/src/main/java/com/ruoyi/finance/mapper/SendcplistMapper.java

@ -1,61 +0,0 @@
package com.ruoyi.finance.mapper;
import java.util.List;
import com.ruoyi.finance.domain.Sendcplist;
/**
* 销售对账列表Mapper接口
*
* @author ruoyi
* @date 2021-11-24
*/
public interface SendcplistMapper
{
/**
* 查询销售对账列表
*
* @param outputID 销售对账列表ID
* @return 销售对账列表
*/
public Sendcplist selectSendcplistById(String outputID);
/**
* 查询销售对账列表列表
*
* @param sendcplist 销售对账列表
* @return 销售对账列表集合
*/
public List<Sendcplist> selectSendcplistList(Sendcplist sendcplist);
/**
* 新增销售对账列表
*
* @param sendcplist 销售对账列表
* @return 结果
*/
public int insertSendcplist(Sendcplist sendcplist);
/**
* 修改销售对账列表
*
* @param sendcplist 销售对账列表
* @return 结果
*/
public int updateSendcplist(Sendcplist sendcplist);
/**
* 删除销售对账列表
*
* @param outputID 销售对账列表ID
* @return 结果
*/
public int deleteSendcplistById(String outputID);
/**
* 批量删除销售对账列表
*
* @param outputIDs 需要删除的数据ID
* @return 结果
*/
public int deleteSendcplistByIds(String[] outputIDs);
}

61
ruoyi-admin/src/main/java/com/ruoyi/finance/service/ISendcplistService.java

@ -1,61 +0,0 @@
package com.ruoyi.finance.service;
import java.util.List;
import com.ruoyi.finance.domain.Sendcplist;
/**
* 销售对账列表Service接口
*
* @author ruoyi
* @date 2021-11-24
*/
public interface ISendcplistService
{
/**
* 查询销售对账列表
*
* @param outputID 销售对账列表ID
* @return 销售对账列表
*/
public Sendcplist selectSendcplistById(String outputID);
/**
* 查询销售对账列表列表
*
* @param sendcplist 销售对账列表
* @return 销售对账列表集合
*/
public List<Sendcplist> selectSendcplistList(Sendcplist sendcplist);
/**
* 新增销售对账列表
*
* @param sendcplist 销售对账列表
* @return 结果
*/
public int insertSendcplist(Sendcplist sendcplist);
/**
* 修改销售对账列表
*
* @param sendcplist 销售对账列表
* @return 结果
*/
public int updateSendcplist(Sendcplist sendcplist);
/**
* 批量删除销售对账列表
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteSendcplistByIds(String ids);
/**
* 删除销售对账列表信息
*
* @param outputID 销售对账列表ID
* @return 结果
*/
public int deleteSendcplistById(String outputID);
}

94
ruoyi-admin/src/main/java/com/ruoyi/finance/service/impl/SendcplistServiceImpl.java

@ -1,94 +0,0 @@
package com.ruoyi.finance.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.finance.mapper.SendcplistMapper;
import com.ruoyi.finance.domain.Sendcplist;
import com.ruoyi.finance.service.ISendcplistService;
import com.ruoyi.common.core.text.Convert;
/**
* 销售对账列表Service业务层处理
*
* @author ruoyi
* @date 2021-11-24
*/
@Service
public class SendcplistServiceImpl implements ISendcplistService
{
@Autowired
private SendcplistMapper sendcplistMapper;
/**
* 查询销售对账列表
*
* @param outputID 销售对账列表ID
* @return 销售对账列表
*/
@Override
public Sendcplist selectSendcplistById(String outputID)
{
return sendcplistMapper.selectSendcplistById(outputID);
}
/**
* 查询销售对账列表列表
*
* @param sendcplist 销售对账列表
* @return 销售对账列表
*/
@Override
public List<Sendcplist> selectSendcplistList(Sendcplist sendcplist)
{
return sendcplistMapper.selectSendcplistList(sendcplist);
}
/**
* 新增销售对账列表
*
* @param sendcplist 销售对账列表
* @return 结果
*/
@Override
public int insertSendcplist(Sendcplist sendcplist)
{
return sendcplistMapper.insertSendcplist(sendcplist);
}
/**
* 修改销售对账列表
*
* @param sendcplist 销售对账列表
* @return 结果
*/
@Override
public int updateSendcplist(Sendcplist sendcplist)
{
return sendcplistMapper.updateSendcplist(sendcplist);
}
/**
* 删除销售对账列表对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteSendcplistByIds(String ids)
{
return sendcplistMapper.deleteSendcplistByIds(Convert.toStrArray(ids));
}
/**
* 删除销售对账列表信息
*
* @param outputID 销售对账列表ID
* @return 结果
*/
@Override
public int deleteSendcplistById(String outputID)
{
return sendcplistMapper.deleteSendcplistById(outputID);
}
}

215
ruoyi-admin/src/main/resources/mapper/finance/SendcplistMapper.xml

@ -1,215 +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.finance.mapper.SendcplistMapper">
<resultMap type="Sendcplist" id="SendcplistResult">
<result property="outputID" column="outputID" />
<result property="PNO" column="PNO" />
<result property="wlCode" column="Wl_Code" />
<result property="Itemname" column="Itemname" />
<result property="Itemstandard" column="Itemstandard" />
<result property="machineNo" column="Machine_no" />
<result property="stockDw" column="Stock_dw" />
<result property="planQty" column="Plan_Qty" />
<result property="Qty" column="Qty" />
<result property="returnQty" column="Return_Qty" />
<result property="Weight" column="Weight" />
<result property="crlName" column="Crl_Name" />
<result property="Price" column="Price" />
<result property="Amt" column="Amt" />
<result property="MemoList" column="MemoList" />
<result property="wldm" column="wldm" />
<result property="orderno" column="orderno" />
<result property="endFlag" column="end_flag" />
<result property="piNo" column="PI_NO" />
<result property="rmbHuilv" column="RMB_Huilv" />
<result property="nowsalePrice" column="nowsale_price" />
<result property="nowsaleRmbPrice" column="NowSale_RMB_Price" />
<result property="useQty" column="Use_Qty" />
<result property="useDate" column="use_date" />
<result property="useMemo" column="USE_MEMO" />
<result property="confirmMan" column="Confirm_Man" />
<result property="nowPrice" column="now_price" />
<result property="versionNo" column="Version_NO" />
<result property="haveVsAccount" column="Have_VS_Account" />
<result property="haveVsMan" column="Have_VS_Man" />
<result property="haveVsTime" column="Have_VS_time" />
<result property="dzQty" column="DZ_Qty" />
<result property="lastDzQty" column="LAST_DZ_QTY" />
</resultMap>
<sql id="selectSendcplistVo">
select outputID, PNO, Wl_Code, Itemname, Itemstandard, Machine_no, Stock_dw, Plan_Qty, Qty, Return_Qty, Weight, Crl_Name, Price, Amt, MemoList, wldm, orderno, end_flag, PI_NO, RMB_Huilv, nowsale_price, NowSale_RMB_Price, Use_Qty, use_date, USE_MEMO, Confirm_Man, now_price, Version_NO, Have_VS_Account, Have_VS_Man, Have_VS_time, DZ_Qty, LAST_DZ_QTY from sendcplist
</sql>
<select id="selectSendcplistList" parameterType="Sendcplist" resultMap="SendcplistResult">
<include refid="selectSendcplistVo"/>
<where>
<if test="outputID != null and outputID != ''"> and outputID = #{outputID}</if>
<if test="PNO != null and PNO != ''"> and PNO = #{PNO}</if>
<if test="wlCode != null and wlCode != ''"> and Wl_Code = #{wlCode}</if>
<if test="Itemname != null and Itemname != ''"> and Itemname like concat('%', #{Itemname}, '%')</if>
<if test="Itemstandard != null and Itemstandard != ''"> and Itemstandard = #{Itemstandard}</if>
<if test="machineNo != null and machineNo != ''"> and Machine_no = #{machineNo}</if>
<if test="stockDw != null and stockDw != ''"> and Stock_dw = #{stockDw}</if>
<if test="planQty != null "> and Plan_Qty = #{planQty}</if>
<if test="Qty != null "> and Qty = #{Qty}</if>
<if test="returnQty != null "> and Return_Qty = #{returnQty}</if>
<if test="Weight != null "> and Weight = #{Weight}</if>
<if test="crlName != null and crlName != ''"> and Crl_Name like concat('%', #{crlName}, '%')</if>
<if test="Price != null "> and Price = #{Price}</if>
<if test="Amt != null "> and Amt = #{Amt}</if>
<if test="MemoList != null and MemoList != ''"> and MemoList = #{MemoList}</if>
<if test="wldm != null and wldm != ''"> and wldm = #{wldm}</if>
<if test="orderno != null and orderno != ''"> and orderno = #{orderno}</if>
<if test="endFlag != null "> and end_flag = #{endFlag}</if>
<if test="piNo != null and piNo != ''"> and PI_NO = #{piNo}</if>
<if test="rmbHuilv != null "> and RMB_Huilv = #{rmbHuilv}</if>
<if test="nowsalePrice != null "> and nowsale_price = #{nowsalePrice}</if>
<if test="nowsaleRmbPrice != null "> and NowSale_RMB_Price = #{nowsaleRmbPrice}</if>
<if test="useQty != null "> and Use_Qty = #{useQty}</if>
<if test="useDate != null "> and use_date = #{useDate}</if>
<if test="useMemo != null and useMemo != ''"> and USE_MEMO = #{useMemo}</if>
<if test="confirmMan != null and confirmMan != ''"> and Confirm_Man = #{confirmMan}</if>
<if test="nowPrice != null "> and now_price = #{nowPrice}</if>
<if test="versionNo != null and versionNo != ''"> and Version_NO = #{versionNo}</if>
<if test="haveVsAccount != null "> and Have_VS_Account = #{haveVsAccount}</if>
<if test="haveVsMan != null and haveVsMan != ''"> and Have_VS_Man = #{haveVsMan}</if>
<if test="haveVsTime != null "> and Have_VS_time = #{haveVsTime}</if>
<if test="dzQty != null "> and DZ_Qty = #{dzQty}</if>
<if test="lastDzQty != null "> and LAST_DZ_QTY = #{lastDzQty}</if>
</where>
</select>
<select id="selectSendcplistById" parameterType="String" resultMap="SendcplistResult">
<include refid="selectSendcplistVo"/>
where outputID = #{outputID}
</select>
<insert id="insertSendcplist" parameterType="Sendcplist">
insert into sendcplist
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="outputID != null and outputID != ''">outputID,</if>
<if test="PNO != null">PNO,</if>
<if test="wlCode != null and wlCode != ''">Wl_Code,</if>
<if test="Itemname != null">Itemname,</if>
<if test="Itemstandard != null">Itemstandard,</if>
<if test="machineNo != null">Machine_no,</if>
<if test="stockDw != null">Stock_dw,</if>
<if test="planQty != null">Plan_Qty,</if>
<if test="Qty != null">Qty,</if>
<if test="returnQty != null">Return_Qty,</if>
<if test="Weight != null">Weight,</if>
<if test="crlName != null">Crl_Name,</if>
<if test="Price != null">Price,</if>
<if test="Amt != null">Amt,</if>
<if test="MemoList != null">MemoList,</if>
<if test="wldm != null">wldm,</if>
<if test="orderno != null">orderno,</if>
<if test="endFlag != null">end_flag,</if>
<if test="piNo != null">PI_NO,</if>
<if test="rmbHuilv != null">RMB_Huilv,</if>
<if test="nowsalePrice != null">nowsale_price,</if>
<if test="nowsaleRmbPrice != null">NowSale_RMB_Price,</if>
<if test="useQty != null">Use_Qty,</if>
<if test="useDate != null">use_date,</if>
<if test="useMemo != null">USE_MEMO,</if>
<if test="confirmMan != null">Confirm_Man,</if>
<if test="nowPrice != null">now_price,</if>
<if test="versionNo != null">Version_NO,</if>
<if test="haveVsAccount != null">Have_VS_Account,</if>
<if test="haveVsMan != null">Have_VS_Man,</if>
<if test="haveVsTime != null">Have_VS_time,</if>
<if test="dzQty != null">DZ_Qty,</if>
<if test="lastDzQty != null">LAST_DZ_QTY,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="outputID != null and outputID != ''">#{outputID},</if>
<if test="PNO != null">#{PNO},</if>
<if test="wlCode != null and wlCode != ''">#{wlCode},</if>
<if test="Itemname != null">#{Itemname},</if>
<if test="Itemstandard != null">#{Itemstandard},</if>
<if test="machineNo != null">#{machineNo},</if>
<if test="stockDw != null">#{stockDw},</if>
<if test="planQty != null">#{planQty},</if>
<if test="Qty != null">#{Qty},</if>
<if test="returnQty != null">#{returnQty},</if>
<if test="Weight != null">#{Weight},</if>
<if test="crlName != null">#{crlName},</if>
<if test="Price != null">#{Price},</if>
<if test="Amt != null">#{Amt},</if>
<if test="MemoList != null">#{MemoList},</if>
<if test="wldm != null">#{wldm},</if>
<if test="orderno != null">#{orderno},</if>
<if test="endFlag != null">#{endFlag},</if>
<if test="piNo != null">#{piNo},</if>
<if test="rmbHuilv != null">#{rmbHuilv},</if>
<if test="nowsalePrice != null">#{nowsalePrice},</if>
<if test="nowsaleRmbPrice != null">#{nowsaleRmbPrice},</if>
<if test="useQty != null">#{useQty},</if>
<if test="useDate != null">#{useDate},</if>
<if test="useMemo != null">#{useMemo},</if>
<if test="confirmMan != null">#{confirmMan},</if>
<if test="nowPrice != null">#{nowPrice},</if>
<if test="versionNo != null">#{versionNo},</if>
<if test="haveVsAccount != null">#{haveVsAccount},</if>
<if test="haveVsMan != null">#{haveVsMan},</if>
<if test="haveVsTime != null">#{haveVsTime},</if>
<if test="dzQty != null">#{dzQty},</if>
<if test="lastDzQty != null">#{lastDzQty},</if>
</trim>
</insert>
<update id="updateSendcplist" parameterType="Sendcplist">
update sendcplist
<trim prefix="SET" suffixOverrides=",">
<if test="PNO != null">PNO = #{PNO},</if>
<if test="wlCode != null and wlCode != ''">Wl_Code = #{wlCode},</if>
<if test="Itemname != null">Itemname = #{Itemname},</if>
<if test="Itemstandard != null">Itemstandard = #{Itemstandard},</if>
<if test="machineNo != null">Machine_no = #{machineNo},</if>
<if test="stockDw != null">Stock_dw = #{stockDw},</if>
<if test="planQty != null">Plan_Qty = #{planQty},</if>
<if test="Qty != null">Qty = #{Qty},</if>
<if test="returnQty != null">Return_Qty = #{returnQty},</if>
<if test="Weight != null">Weight = #{Weight},</if>
<if test="crlName != null">Crl_Name = #{crlName},</if>
<if test="Price != null">Price = #{Price},</if>
<if test="Amt != null">Amt = #{Amt},</if>
<if test="MemoList != null">MemoList = #{MemoList},</if>
<if test="wldm != null">wldm = #{wldm},</if>
<if test="orderno != null">orderno = #{orderno},</if>
<if test="endFlag != null">end_flag = #{endFlag},</if>
<if test="piNo != null">PI_NO = #{piNo},</if>
<if test="rmbHuilv != null">RMB_Huilv = #{rmbHuilv},</if>
<if test="nowsalePrice != null">nowsale_price = #{nowsalePrice},</if>
<if test="nowsaleRmbPrice != null">NowSale_RMB_Price = #{nowsaleRmbPrice},</if>
<if test="useQty != null">Use_Qty = #{useQty},</if>
<if test="useDate != null">use_date = #{useDate},</if>
<if test="useMemo != null">USE_MEMO = #{useMemo},</if>
<if test="confirmMan != null">Confirm_Man = #{confirmMan},</if>
<if test="nowPrice != null">now_price = #{nowPrice},</if>
<if test="versionNo != null">Version_NO = #{versionNo},</if>
<if test="haveVsAccount != null">Have_VS_Account = #{haveVsAccount},</if>
<if test="haveVsMan != null">Have_VS_Man = #{haveVsMan},</if>
<if test="haveVsTime != null">Have_VS_time = #{haveVsTime},</if>
<if test="dzQty != null">DZ_Qty = #{dzQty},</if>
<if test="lastDzQty != null">LAST_DZ_QTY = #{lastDzQty},</if>
</trim>
where outputID = #{outputID}
</update>
<delete id="deleteSendcplistById" parameterType="String">
delete from sendcplist where outputID = #{outputID}
</delete>
<delete id="deleteSendcplistByIds" parameterType="String">
delete from sendcplist where outputID in
<foreach item="outputID" collection="array" open="(" separator="," close=")">
#{outputID}
</foreach>
</delete>
</mapper>

243
ruoyi-admin/src/main/resources/templates/finance/sendcplist/add.html

@ -1,243 +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-sendcplist-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required"></label>
<div class="col-sm-8">
<input name="outputID" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="PNO" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required"></label>
<div class="col-sm-8">
<input name="wlCode" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="Itemname" 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="Itemstandard" 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="machineNo" 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="stockDw" 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="planQty" 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="Qty" 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="returnQty" 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="Weight" 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="crlName" 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="Price" 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="Amt" 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="MemoList" 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="wldm" 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="orderno" 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="endFlag" 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="piNo" 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="rmbHuilv" 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="nowsalePrice" 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="nowsaleRmbPrice" 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="useQty" 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="useDate" 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="useMemo" 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="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">
<input name="nowPrice" 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="versionNo" 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="haveVsAccount" 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="haveVsMan" 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="haveVsTime" 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="dzQty" 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="lastDzQty" 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 + "finance/sendcplist"
$("#form-sendcplist-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-sendcplist-add').serialize());
}
}
$("input[name='useDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='haveVsTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

244
ruoyi-admin/src/main/resources/templates/finance/sendcplist/edit.html

@ -1,244 +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-sendcplist-edit" th:object="${sendcplist}">
<input name="outputID" th:field="*{outputID}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required"></label>
<div class="col-sm-8">
<input name="outputID" th:field="*{outputID}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="PNO" th:field="*{PNO}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required"></label>
<div class="col-sm-8">
<input name="wlCode" th:field="*{wlCode}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="Itemname" th:field="*{Itemname}" 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="Itemstandard" th:field="*{Itemstandard}" 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="machineNo" th:field="*{machineNo}" 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="stockDw" th:field="*{stockDw}" 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="planQty" th:field="*{planQty}" 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="Qty" th:field="*{Qty}" 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="returnQty" th:field="*{returnQty}" 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="Weight" th:field="*{Weight}" 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="crlName" th:field="*{crlName}" 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="Price" th:field="*{Price}" 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="Amt" th:field="*{Amt}" 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="MemoList" th:field="*{MemoList}" 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="wldm" th:field="*{wldm}" 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="orderno" th:field="*{orderno}" 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="endFlag" th:field="*{endFlag}" 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="piNo" th:field="*{piNo}" 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="rmbHuilv" th:field="*{rmbHuilv}" 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="nowsalePrice" th:field="*{nowsalePrice}" 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="nowsaleRmbPrice" th:field="*{nowsaleRmbPrice}" 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="useQty" th:field="*{useQty}" 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="useDate" th:value="${#dates.format(sendcplist.useDate, '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="useMemo" th:field="*{useMemo}" 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="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">
<input name="nowPrice" th:field="*{nowPrice}" 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="versionNo" th:field="*{versionNo}" 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="haveVsAccount" th:field="*{haveVsAccount}" 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="haveVsMan" th:field="*{haveVsMan}" 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="haveVsTime" th:value="${#dates.format(sendcplist.haveVsTime, '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="dzQty" th:field="*{dzQty}" 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="lastDzQty" th:field="*{lastDzQty}" 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 + "finance/sendcplist";
$("#form-sendcplist-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-sendcplist-edit').serialize());
}
}
$("input[name='useDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='haveVsTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

337
ruoyi-admin/src/main/resources/templates/finance/sendcplist/sendcplist.html

@ -1,337 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('销售对账列表列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label></label>
<input type="text" name="orderno"/>
</li>
<li>
<label></label>
<input type="text" name="outputID"/>
</li>
<li>
<label></label>
<input type="text" name="PNO"/>
</li>
<li>
<label></label>
<input type="text" name="wlCode"/>
</li>
<li>
<label></label>
<input type="text" name="Itemname"/>
</li>
<li>
<label></label>
<input type="text" name="Itemstandard"/>
</li>
<li>
<label></label>
<input type="text" name="machineNo"/>
</li>
<li>
<label></label>
<input type="text" name="stockDw"/>
</li>
<li>
<label></label>
<input type="text" name="planQty"/>
</li>
<li>
<label></label>
<input type="text" name="Qty"/>
</li>
<li>
<label></label>
<input type="text" name="returnQty"/>
</li>
<li>
<label></label>
<input type="text" name="Weight"/>
</li>
<li>
<label></label>
<input type="text" name="crlName"/>
</li>
<li>
<label></label>
<input type="text" name="Price"/>
</li>
<li>
<label></label>
<input type="text" name="Amt"/>
</li>
<li>
<label></label>
<input type="text" name="MemoList"/>
</li>
<li>
<label></label>
<input type="text" name="wldm"/>
</li>
<li>
<label></label>
<input type="text" name="endFlag"/>
</li>
<li>
<label></label>
<input type="text" name="piNo"/>
</li>
<li>
<label></label>
<input type="text" name="rmbHuilv"/>
</li>
<li>
<label></label>
<input type="text" name="nowsalePrice"/>
</li>
<li>
<label></label>
<input type="text" name="nowsaleRmbPrice"/>
</li>
<li>
<label></label>
<input type="text" name="useQty"/>
</li>
<li>
<label></label>
<input type="text" class="time-input" placeholder="请选择" name="useDate"/>
</li>
<li>
<label></label>
<input type="text" name="useMemo"/>
</li>
<li>
<label></label>
<input type="text" name="confirmMan"/>
</li>
<li>
<label></label>
<input type="text" name="nowPrice"/>
</li>
<li>
<label></label>
<input type="text" name="versionNo"/>
</li>
<li>
<label></label>
<input type="text" name="haveVsAccount"/>
</li>
<li>
<label></label>
<input type="text" name="haveVsMan"/>
</li>
<li>
<label></label>
<input type="text" class="time-input" placeholder="请选择" name="haveVsTime"/>
</li>
<li>
<label></label>
<input type="text" name="dzQty"/>
</li>
<li>
<label></label>
<input type="text" name="lastDzQty"/>
</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="finance:sendcplist:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="finance:sendcplist:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="finance:sendcplist:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="finance:sendcplist: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('finance:sendcplist:edit')}]];
var removeFlag = [[${@permission.hasPermi('finance:sendcplist:remove')}]];
var prefix = ctx + "finance/sendcplist";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "销售对账列表",
columns: [{
checkbox: true
},
{
field: 'outputID',
title: ''
},
{
field: 'PNO',
title: ''
},
{
field: 'wlCode',
title: ''
},
{
field: 'Itemname',
title: ''
},
{
field: 'Itemstandard',
title: ''
},
{
field: 'machineNo',
title: ''
},
{
field: 'stockDw',
title: ''
},
{
field: 'planQty',
title: ''
},
{
field: 'Qty',
title: ''
},
{
field: 'returnQty',
title: ''
},
{
field: 'Weight',
title: ''
},
{
field: 'crlName',
title: ''
},
{
field: 'Price',
title: ''
},
{
field: 'Amt',
title: ''
},
{
field: 'MemoList',
title: ''
},
{
field: 'wldm',
title: ''
},
{
field: 'orderno',
title: ''
},
{
field: 'endFlag',
title: ''
},
{
field: 'piNo',
title: ''
},
{
field: 'rmbHuilv',
title: ''
},
{
field: 'nowsalePrice',
title: ''
},
{
field: 'nowsaleRmbPrice',
title: ''
},
{
field: 'useQty',
title: ''
},
{
field: 'useDate',
title: ''
},
{
field: 'useMemo',
title: ''
},
{
field: 'confirmMan',
title: ''
},
{
field: 'nowPrice',
title: ''
},
{
field: 'versionNo',
title: ''
},
{
field: 'haveVsAccount',
title: ''
},
{
field: 'haveVsMan',
title: ''
},
{
field: 'haveVsTime',
title: ''
},
{
field: 'dzQty',
title: ''
},
{
field: 'lastDzQty',
title: ''
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.outputID + '\')"><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.outputID + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

542
ruoyi-admin/src/main/resources/templates/outsource/materialRequisitionOutsource/add.html

@ -1,542 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增委外加工领料单')" />
<th:block th:include="include :: datetimepicker-css"/>
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet">
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet">
<th:block th:include="include :: bootstrap-editable-css"/>
<style>
.other-container {
width: 90%;
height: 200px;
margin: auto;
}
.other {
margin-top: 20px;
}
h4 {
display: inline-block;
margin-right: 20px;
}
.modal-body{
height: 550px;
}
iframe{
width: 100%;
height: 500px;
frameborder: 0;
border: 0;
display: inline-block;
}
</style>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-MaterialRequisitionOutsource-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">领料单号:</label>
<div class="col-sm-8">
<input name="materialRequisitionNumber" class="form-control" type="text" required readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">委外单号:</label>
<div class="col-sm-8">
<!-- <input name="outsourceOrderNumber" class="form-control" type="text" required>-->
<select name="outsourceOrderNumber" class="form-control m-b" required>
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">订单号码:</label>
<div class="col-sm-8">
<input name="salesOrderNumber" 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="batchNumber" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">厂商编号:</label>
<div class="col-sm-8">
<input name="supplierCode" class="form-control" type="text" required readonly>
<!-- <select name="supplierCode" class="form-control m-b" required>-->
<!-- <option value="">所有</option>-->
<!-- </select>-->
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">厂商名称:</label>
<div class="col-sm-8">
<input name="supplierName" class="form-control" type="text" required readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">领料人:</label>
<div class="col-sm-8">
<!-- <input name="materialRequisitionPerson" class="form-control" type="text">-->
<select name="materialRequisitionPerson" class="form-control m-b" type="text">
<option value="">请选择领料人</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库名称:</label>
<div class="col-sm-8">
<!-- <input name="stockName" class="form-control" type="text">-->
<select name="stockName" class="form-control m-b">
<option value="">请选择仓库名称</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库编号:</label>
<div class="col-sm-8">
<input name="stockNumber" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库管理员:</label>
<div class="col-sm-8">
<input name="stockManager" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出库类型:</label>
<div class="col-sm-8">
<select name="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="outputDate" 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">
<textarea name="remarkContent" class="form-control" type="text"></textarea>
</div>
</div>
<!-- <div class="form-group"> -->
<!-- <label class="col-sm-3 control-label">领料否:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <select name="getMaterialFlag" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}">-->
<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
<!-- </select>-->
<!-- </div>-->
<!-- </div>-->
<!--<div class="form-group">
<label class="col-sm-3 control-label">备用一:</label>
<div class="col-sm-8">
<input name="standbyOne" 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="standbyTwo" class="form-control" type="text">
</div>
</div>-->
</form>
</div>
<div class="other-container">
<div class="other">
<br><hr>
<h4>物料信息(选择”委外单号”)</h4>
<!-- <a class="btn btn-primary" onclick="showQuotationModal()"><i class="fa fa-plus"></i>&nbsp;选择信息</a>-->
<div class="col-sm-12 select-table table-striped">
<table id="addMaterialTable" style="white-space:nowrap"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: bootstrap-table-editable-js"/>
<script th:inline="javascript">
var prefix = ctx + "manufacture/materialRequisitionInfo";
var prefixList = ctx + "manufacture/materialRequisitionDetail"
var prefixOrder = ctx + "outsource/outsourceOrderInfo"
var prefixOrderMaterial = ctx + "outsource/outsourceOrderMaterial"
$("#form-MaterialRequisitionOutsource-add").validate({
focusCleanup: true
});
function submitHandler() {
let getData=$('#addMaterialTable').bootstrapTable('getData', true)
if(getData.length > 0){
//确认添加选中的物料数据
confirmMaterial();
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-MaterialRequisitionOutsource-add').serialize());}
} else {
$.modal.alertWarning("未选择物料,请选择!")
}
}
$("input[name='outputDate']").datetimepicker({
format: "yyyy-mm-dd hh:ii:ss",
minView: "month",
autoclose: true,
todayBtn: true
});
$("input[name='outputDate']").datetimepicker("setDate",new Date())
$(function () {
//初始化添加材料表
$('#addMaterialTable').bootstrapTable({
pagination: true,
pageNumber: 1,
pageSize: 10,
showToggle: false, // 是否显示详细视图和列表视图的切换按钮
cardView: false, // 是否显示详细视图
detailView: false, // 是否显示父子表
smartDisplay: false, // 加了这个才显示每页显示的行数
showExport: false, // 是否显示导出按钮
clickToSelect: true,//点击行选中
contentType: "application/x-www-form-urlencoded",
paginationDetailHAlign: ' hiddenDetailInfo',
height: 250,
queryParams: function (params) {
//console.log("123");
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
// enterpriseCode: data[0].enterpriseCode
};
// console.log(data[0].enterpriseCode)
return curParams
},
columns: [
{
title: '操作',
align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeMaterialData(\'' + row.materialCode + '\')" ><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
},
{
field: 'materialRequisitionNumber',
title: '领料单号',
visible: false
},
{
field: 'materialCode',
title: '物料代码',
editable: {
type: 'text',
title: '物料代码',
emptytext: '物料代码',
validate: function (value) {
}
}
},
{
field: 'materialName',
title: '物料名称',
editable: {
type: 'text',
title: '物料名称',
emptytext: '物料名称',
validate: function (value) {
}
}
},
{
field: 'specificationModel',
title: '规格型号',
editable: {
type: 'text',
title: '规格型号',
emptytext: '规格型号',
validate: function (value) {
}
}
},
{
field: 'inventoryUnit',
title: '单位',
editable: {
type: 'text',
title: '单位',
emptytext: '单位',
validate: function (value) {
}
}
},
{
field: 'planQuantity',
title: '计划数量',
editable: {
type: 'text',
title: '计划数量',
emptytext: '计划数量',
validate: function (v) {
if (isNaN(v)) return '数量必须是数字';
var ex = /^[1-9]\d*$/;
if (!ex.test(v)) return '数量必须是正整数';
}
}
},
{
field: 'description',
title: '说明',
editable: {
type: 'text',
title: '说明',
emptytext: '说明',
validate: function (v) {
}
}
},
{
field: 'unitUsage',
title: '单位用量',
editable: {
type: 'text',
title: '单位用量',
emptytext: '单位用量',
validate: function (value) {
}
}
},
{
field: 'bomRank',
title: 'bom阶',
editable: {
type: 'text',
title: 'bom阶',
emptytext: 'bom阶',
validate: function (value) {
}
}
},
{
field: 'upFinishProductCode',
title: '上级半成品代码',
editable: {
type: 'text',
title: '上级半成品代码',
emptytext: '上级半成品代码',
validate: function (value) {
}
}
},
{
field: 'storageLocation',
title: '存放位置',
editable: {
type: 'text',
title: '存放位置',
emptytext: '存放位置',
validate: function (value) {
}
}
},
{
field: 'materialType',
title: '物料类别',
visible: false
}]
})
});
//获取委外单号
$.ajax({
url: prefixOrder + "/list",
type: "post",
dateType: "json",
success: function (res) {
if (res.rows.length > 0) {
let orderData = res.rows;
for (let i in orderData) {
// console.log(finishProductData[i].finishProductCode)
$("#form-MaterialRequisitionOutsource-add select[name='outsourceOrderNumber']").append("<option value='" + orderData[i].outsourceOrderNumber + "'>" + orderData[i].outsourceOrderNumber + "</option>");
}
$("#form-MaterialRequisitionOutsource-add select[name='outsourceOrderNumber']").change(function () {
var outsourceOrderNumber = $(this).val();
for (let i=0;i<orderData.length;i++) {
if (orderData[i].outsourceOrderNumber == outsourceOrderNumber) {
$("#form-MaterialRequisitionOutsource-add input[name='supplierCode']").val(orderData[i].supplierCode).trigger("change");
$("#form-MaterialRequisitionOutsource-add input[name='supplierName']").val(orderData[i].supplierName);
// $("#form-MaterialRequisitionOutsource-add select[name='materialRequisitionPerson']").val(orderData[i].materialRequisitionPerson).trigger("change");
// $("#form-MaterialRequisitionOutsource-add select[name='stockName']").val(orderData[i].stockName).trigger("change");
// $("#form-MaterialRequisitionOutsource-add input[name='stockNumber']").val(orderData[i].stockNumber);
// $("#form-MaterialRequisitionOutsource-add input[name='stockManager']").val(orderData[i].stockManager);
showMaterial();
}
}
})
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
})
function showMaterial() {
$('#addMaterialTable').bootstrapTable("removeAll");
var outsourceOrderNumber = $("select[name='outsourceOrderNumber']").val();
$.ajax({
url: ctx + 'manufacture/materialRequisitionInfo/selectOutsourceDetail/'+ outsourceOrderNumber,
type: "post",
// data: {
// outsourceOrderNumber: outsourceOrderNumber
// },
success: function (res) {
// console.log(res.rows)
if (res.rows.length>0) {
var count = res.rows.length;
var data = res.rows;
var materialRequisitionNumber = $("#form-MaterialRequisitionOutsource-add input[name='materialRequisitionNumber']").val()
for (let i in data) {
$("#addMaterialTable").bootstrapTable('insertRow', {
index: count + i,
row: {
materialRequisitionNumber: materialRequisitionNumber,
materialCode: data[i].materialCode,
materialName: data[i].materialName,
specificationModel: data[i].specificationModel,
inventoryUnit: data[i].inventoryUnit,
planQuantity: data[i].planQuantity,
description: data[i].description,
unitUsage: data[i].unitUsage,
bomRank: data[i].bomRank,
upFinishProductCode: data[i].upFinishProductCode,
storageLocation: data[i].storageLocation,
materialType: data[i].materialType,
}
});
}
} else {
$.modal.alertWarning("该订单内无物料,请先添加!")
}
}
})
}
//获取单号
$.ajax({
url: prefix + "/getOutsourceId",
type: "post",
dateType: "json",
success: function (resp) {
if (resp.code === 0) {
$("input[name='materialRequisitionNumber']").val(resp.data);
} else {
$.modal.msgError("失败啦");
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
});
//获取领料人
$.ajax({
url: ctx + "system/user/list",
type: "post",
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
let userData = res.rows;
for (let i in userData) {
// console.log(finishProductData[i].finishProductCode)
$("#form-MaterialRequisitionOutsource-add select[name='materialRequisitionPerson']").append("<option value='" + userData[i].userName + "'>" + userData[i].userName + "</option>");
}
let userName = [[${@permission.getPrincipalProperty('userName')}]];
$("#form-MaterialRequisitionOutsource-add select[name='materialRequisitionPerson']").val(userName).trigger("change")
}
}
})
//获取仓库信息
$.ajax({
url: ctx + "stock/stockInfo/list",
type: "post",
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
let stockData = res.rows;
for (let i in stockData) {
// console.log(finishProductData[i].finishProductCode)
$("#form-MaterialRequisitionOutsource-add select[name='stockName']").append("<option value='" + stockData[i].stockname + "'>" + stockData[i].stockname + "</option>");
$("#form-MaterialRequisitionOutsource-add select[name='stockName']").change(function () {
var stockName = $(this).val();
for (let i=0;i<stockData.length;i++) {
if (stockData[i].stockname == stockName) {
$("#form-MaterialRequisitionOutsource-add input[name='stockNumber']").val(stockData[i].stockNO);
$("#form-MaterialRequisitionOutsource-add input[name='stockManager']").val(stockData[i].stockmanager);
}
}
})
}
}
}
})
//确认添加选中的物料数据
function confirmMaterial() {
$("#addMaterialTable").bootstrapTable('refresh');
let data = $('#addMaterialTable').bootstrapTable('getData', true);
// let getData=$('#addProductTable').bootstrapTable('getData', true)
// console.log(data)
$.ajax({
url: prefixList + '/addEditSave',
type: "POST",
data: {
data: JSON.stringify(data)
},
dataType: "json",
success: function (resp) {
// console.log(data)
console.log(resp)
},
})
}
//添加表格内删除物料信息
function removeMaterialData(materialCode){
var ids = [];
ids.push(materialCode);
$('#addMaterialTable').bootstrapTable("remove",{
field:'materialCode',
values:ids
})
$("#addMaterialTable").bootstrapTable('refresh');
}
</script>
</body>
</html>

506
ruoyi-admin/src/main/resources/templates/outsource/materialRequisitionOutsource/edit.html

@ -1,506 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改委外加工领料单')" />
<th:block th:include="include :: datetimepicker-css"/>
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet">
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet">
<th:block th:include="include :: bootstrap-editable-css"/>
<style>
.other-container {
width: 90%;
height: 200px;
margin: auto;
}
.other {
margin-top: 20px;
}
h4 {
display: inline-block;
margin-right: 20px;
}
.modal-body{
height: 550px;
}
iframe{
width: 100%;
height: 500px;
frameborder: 0;
border: 0;
display: inline-block;
}
</style>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-MaterialRequisitionOutsource-edit" th:object="${materialRequisitionInfo}">
<input name="materialRequisitionId" th:field="*{materialRequisitionId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">领料单号:</label>
<div class="col-sm-8">
<input name="materialRequisitionNumber" th:field="*{materialRequisitionNumber}" class="form-control" type="text" required readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">委外单号:</label>
<div class="col-sm-8">
<!-- <input name="outsourceOrderNumber" th:field="*{outsourceOrderNumber}" class="form-control" type="text">-->
<select name="outsourceOrderNumber" th:field="*{outsourceOrderNumber}" class="form-control m-b" required disabled>
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">订单号码:</label>
<div class="col-sm-8">
<input name="salesOrderNumber" th:field="*{salesOrderNumber}" 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="batchNumber" th:field="*{batchNumber}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">厂商编号:</label>
<div class="col-sm-8">
<input name="supplierCode" th:field="*{supplierCode}" class="form-control" type="text" required readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">厂商名称:</label>
<div class="col-sm-8">
<input name="supplierName" th:field="*{supplierName}" class="form-control" type="text" required readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">领料人:</label>
<div class="col-sm-8">
<!-- <input name="materialRequisitionPerson" th:field="*{materialRequisitionPerson}" class="form-control" type="text">-->
<select name="materialRequisitionPerson" th:field="*{materialRequisitionPerson}" class="form-control m-b" type="text">
<option value="">请选择领料人</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库名称:</label>
<div class="col-sm-8">
<!-- <input name="stockName" th:field="*{stockName}" class="form-control" type="text">-->
<select name="stockName" th:field="*{stockName}" class="form-control m-b">
<option value="">请选择仓库名称</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库编号:</label>
<div class="col-sm-8">
<input name="stockNumber" th:field="*{stockNumber}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库管理员:</label>
<div class="col-sm-8">
<input name="stockManager" th:field="*{stockManager}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出库类型:</label>
<div class="col-sm-8">
<select name="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}" th:field="*{outputClass}"></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="outputDate" th:field="*{outputDate}" 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">
<textarea name="remarkContent" th:field="*{remarkContent}" class="form-control" type="text"></textarea>
</div>
</div>
<!-- <div class="form-group"> -->
<!-- <label class="col-sm-3 control-label">领料否:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <select name="getMaterialFlag" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}">-->
<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{getMaterialFlag}"></option>-->
<!-- </select>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="form-group"> -->
<!-- <label class="col-sm-3 control-label">备用一:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <input name="standbyOne" th:field="*{standbyOne}" 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="standbyTwo" th:field="*{standbyTwo}" class="form-control" type="text">-->
<!-- </div>-->
<!-- </div>-->
</form>
</div>
<div class="other-container">
<div class="other">
<br><hr>
<h4>物料信息(选择”委外单号”)</h4>
<!-- <a class="btn btn-primary" onclick="showQuotationModal()"><i class="fa fa-plus"></i>&nbsp;选择信息</a>-->
<div class="col-sm-12 select-table table-striped">
<table id="addMaterialTable" style="white-space:nowrap"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: bootstrap-table-editable-js"/>
<script th:inline="javascript">
var prefix = ctx + "manufacture/materialRequisitionInfo";
var prefixList = ctx + "manufacture/materialRequisitionDetail"
var prefixOrder = ctx + "outsource/outsourceOrderInfo"
var prefixOrderMaterial = ctx + "outsource/outsourceOrderMaterial"
var getData = [[${materialRequisitionInfo}]]
$("#form-MaterialRequisitionOutsource-edit").validate({
focusCleanup: true
});
function submitHandler() {
let getData=$('#addMaterialTable').bootstrapTable('getData', true)
if(getData.length > 0){
$.modal.confirm("确认以上修改?", function () {
//确认添加选中的物料数据
confirmMaterial();
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-MaterialRequisitionOutsource-edit').serialize());
} else {
$.modal.alertWarning("未选择物料,请选择!")
}
})
}
}
$("input[name='outputDate']").datetimepicker({
format: "yyyy-mm-dd hh:ii:ss",
minView: "month",
autoclose: true,
todayBtn: true
});
$(function () {
//初始化添加材料表
$('#addMaterialTable').bootstrapTable({
url: prefixList + '/list',
method: 'post',
pagination: true,
pageNumber: 1,
pageSize: 10,
showToggle: false, // 是否显示详细视图和列表视图的切换按钮
cardView: false, // 是否显示详细视图
detailView: false, // 是否显示父子表
smartDisplay: false, // 加了这个才显示每页显示的行数
showExport: false, // 是否显示导出按钮
clickToSelect: true,//点击行选中
contentType: "application/x-www-form-urlencoded",
paginationDetailHAlign: ' hiddenDetailInfo',
height: 250,
queryParams: function (params) {
//console.log("123");
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
// enterpriseCode: data[0].enterpriseCode
materialRequisitionNumber: getData.materialRequisitionNumber
};
// console.log(data[0].enterpriseCode)
return curParams
},
columns: [
{
field: 'materialRequisitionNumber',
title: '领料单号',
visible: false
},
{
field: 'materialCode',
title: '物料代码',
editable: {
type: 'text',
title: '物料代码',
emptytext: '物料代码',
validate: function (value) {
}
}
},
{
field: 'materialName',
title: '物料名称',
editable: {
type: 'text',
title: '物料名称',
emptytext: '物料名称',
validate: function (value) {
}
}
},
{
field: 'specificationModel',
title: '规格型号',
editable: {
type: 'text',
title: '规格型号',
emptytext: '规格型号',
validate: function (value) {
}
}
},
{
field: 'inventoryUnit',
title: '单位',
editable: {
type: 'text',
title: '单位',
emptytext: '单位',
validate: function (value) {
}
}
},
{
field: 'planQuantity',
title: '计划数量',
editable: {
type: 'text',
title: '计划数量',
emptytext: '计划数量',
validate: function (v) {
if (isNaN(v)) return '数量必须是数字';
var ex = /^[1-9]\d*$/;
if (!ex.test(v)) return '数量必须是正整数';
}
}
},
{
field: 'description',
title: '说明',
editable: {
type: 'text',
title: '说明',
emptytext: '说明',
validate: function (v) {
}
}
},
{
field: 'unitUsage',
title: '单位用量',
editable: {
type: 'text',
title: '单位用量',
emptytext: '单位用量',
validate: function (value) {
}
}
},
{
field: 'bomRank',
title: 'bom阶',
editable: {
type: 'text',
title: 'bom阶',
emptytext: 'bom阶',
validate: function (value) {
}
}
},
{
field: 'upFinishProductCode',
title: '上级半成品代码',
editable: {
type: 'text',
title: '上级半成品代码',
emptytext: '上级半成品代码',
validate: function (value) {
}
}
},
{
field: 'storageLocation',
title: '存放位置',
editable: {
type: 'text',
title: '存放位置',
emptytext: '存放位置',
validate: function (value) {
}
}
},
{
field: 'materialType',
title: '物料类别',
visible: false
}]
})
});
//获取委外单号
$.ajax({
url: prefixOrder + "/list",
type: "post",
dateType: "json",
success: function (res) {
if (res.rows.length > 0) {
let orderData = res.rows;
for (let i in orderData) {
// console.log(finishProductData[i].finishProductCode)
$("#form-MaterialRequisitionOutsource-edit select[name='outsourceOrderNumber']").append("<option value='" + orderData[i].outsourceOrderNumber + "'>" + orderData[i].outsourceOrderNumber + "</option>");
}
$("#form-MaterialRequisitionOutsource-edit select[name='outsourceOrderNumber']").val(getData.outsourceOrderNumber).trigger("change");
$("#form-MaterialRequisitionOutsource-edit select[name='outsourceOrderNumber']").change(function () {
var outsourceOrderNumber = $(this).val();
for (let i=0;i<orderData.length;i++) {
if (orderData[i].outsourceOrderNumber == outsourceOrderNumber) {
$("#form-MaterialRequisitionOutsource-edit input[name='supplierCode']").val(orderData[i].supplierCode).trigger("change");
$("#form-MaterialRequisitionOutsource-edit input[name='supplierName']").val(orderData[i].supplierName);
// $("#form-MaterialRequisitionOutsource-edit select[name='materialRequisitionPerson']").val(orderData[i].materialRequisitionPerson).trigger("change");
// $("#form-MaterialRequisitionOutsource-edit select[name='stockName']").val(orderData[i].stockName).trigger("change");
// $("#form-MaterialRequisitionOutsource-edit input[name='stockNumber']").val(orderData[i].stockNumber);
// $("#form-MaterialRequisitionOutsource-edit input[name='stockManager']").val(orderData[i].stockManager);
}
}
$.ajax({
url: prefixOrderMaterial + '/list',
type: "post",
data: {
outsourceOrderNumber: outsourceOrderNumber
},
success: function (res) {
// console.log(res)
$('#addMaterialTable').bootstrapTable("removeAll")
// console.log(res.rows)
if (res.rows.length>0) {
let data = res.rows;
var count = $('#addMaterialTable').bootstrapTable('getData').length;
var materialRequisitionNumber = $("#form-MaterialRequisitionOutsource-edit input[name='materialRequisitionNumber']").val()
for (let j in data) {
$("#addMaterialTable").bootstrapTable('insertRow', {
index: count + j,
row: {
materialRequisitionNumber: materialRequisitionNumber,
materialCode: data[j].materialCode,
materialName: data[j].materialName,
specificationModel: data[j].specificationModel,
inventoryUnit: data[j].inventoryUnit,
planQuantity: data[j].quantity,
description: data[j].description,
unitUsage: '',
bomRank: '',
upFinishProductCode: '',
storageLocation: '',
materialType: ''
}
});
}
} else {
$.modal.alertWarning("该订单内无物料,请先添加!")
}
}
})
})
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
})
//获取领料人
$.ajax({
url: ctx + "system/user/list",
type: "post",
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
let userData = res.rows;
for (let i in userData) {
// console.log(finishProductData[i].finishProductCode)
$("#form-MaterialRequisitionOutsource-edit select[name='materialRequisitionPerson']").append("<option value='" + userData[i].userName + "'>" + userData[i].userName + "</option>");
}
$("#form-MaterialRequisitionOutsource-edit select[name='materialRequisitionPerson']").val(getData.materialRequisitionPerson).trigger("change");
}
}
})
//获取仓库信息
$.ajax({
url: ctx + "stock/stockInfo/list",
type: "post",
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
let stockData = res.rows;
for (let i in stockData) {
// console.log(finishProductData[i].finishProductCode)
$("#form-MaterialRequisitionOutsource-edit select[name='stockName']").append("<option value='" + stockData[i].stockname + "'>" + stockData[i].stockname + "</option>");
$("#form-MaterialRequisitionOutsource-edit select[name='stockName']").val(getData.stockName).trigger("change");
$("#form-MaterialRequisitionOutsource-edit select[name='stockName']").change(function () {
var stockName = $(this).val();
for (let i=0;i<stockData.length;i++) {
if (stockData[i].stockname == stockName) {
$("#form-MaterialRequisitionOutsource-edit input[name='stockNumber']").val(stockData[i].stockNO);
$("#form-MaterialRequisitionOutsource-edit input[name='stockManager']").val(stockData[i].stockmanager);
}
}
})
}
}
}
})
//确认添加选中的物料数据
function confirmMaterial() {
$("#addMaterialTable").bootstrapTable('refresh');
let data = $('#addMaterialTable').bootstrapTable('getData', true);
// let getData=$('#addProductTable').bootstrapTable('getData', true)
// console.log(data)
$.ajax({
url: prefixList + '/addEditSave',
type: "POST",
data: {
data: JSON.stringify(data)
},
dataType: "json",
success: function (resp) {
// console.log(data)
// console.log(resp)
},
})
}
</script>
</body>
</html>

281
ruoyi-admin/src/main/resources/templates/outsource/materialRequisitionOutsource/materialRequisitionOutsource.html

@ -1,281 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('领料单列表')" />
<th:block th:include="include :: datetimepicker-css"/>
<script type="text/javascript" th:src="@{/js/axios.min.js}"></script>
</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="materialRequisitionNumber"/>
</li>
<li>
<label>订单号码:</label>
<input type="text" name="salesOrderNumber"/>
</li>
<li>
<label>制工单号:</label>
<input type="text" name="workOrderNumber"/>
</li>
<li>
<label>领料部门:</label>
<select name="deptName" th:with="type=${@dict.getType('sys_dept_type')}">
<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="stockName"/>
</li>
<li>
<label>出库类型:</label>
<select name="outputClass" th:with="type=${@dict.getType('sys_out_type')}">
<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[beginOutputDate]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束日期" name="params[endOutputDate]"/>
</li>
<li>
<label>领料否:</label>
<select name="getMaterialFlag" th:with="type=${@dict.getType('sys_whether')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="manufacture:materialRequisitionInfo:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="manufacture:materialRequisitionInfo:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="removeSelected()" shiro:hasPermission="manufacture:materialRequisitionInfo:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="exportSelectedOutSource()" shiro:hasPermission="manufacture:materialRequisitionInfo:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" style="white-space: nowrap"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('manufacture:materialRequisitionInfo:edit')}]];
var removeFlag = [[${@permission.hasPermi('manufacture:materialRequisitionInfo:remove')}]];
var outputClassDatas = [[${@dict.getType('sys_out_type')}]];
var getMaterialFlagDatas = [[${@dict.getType('sys_whether')}]];
var prefix = ctx + "manufacture/materialRequisitionInfo";
var prefixMaterialRequisitionDetail = ctx + "manufacture/materialRequisitionDetail";
$(function() {
var options = {
url: prefix + "/listOutsource",
createUrl: prefix + "/addOutsource",
updateUrl: prefix + "/editOutsource/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
clickToSelect: true,
modalName: "委外加工领料单",
columns: [{
checkbox: true
},
{
field: 'materialRequisitionId',
title: '委外加工领料id',
visible: false
},
{
field: 'materialRequisitionNumber',
title: '领料单号'
},
{
field: 'outsourceOrderNumber',
title: '委外单号'
},
{
field: 'salesOrderNumber',
title: '订单号码'
},
{
field: 'batchNumber',
title: '生产批号'
},
{
field: 'supplierCode',
title: '厂商编号'
},
{
field: 'supplierName',
title: '厂商名称'
},
{
field: 'materialRequisitionPerson',
title: '领料人'
},
{
field: 'stockNumber',
title: '仓库编号'
},
{
field: 'stockName',
title: '仓库名称'
},
{
field: 'stockManager',
title: '仓库管理员'
},
{
field: 'outputClass',
title: '出库类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(outputClassDatas, value);
}
},
{
field: 'outputDate',
title: '出库时间'
},
{
field: 'remarkContent',
title: '备注内容'
},
{
field: 'getMaterialFlag',
title: '领料否',
formatter: function(value, row, index) {
return $.table.selectDictLabel(getMaterialFlagDatas, value);
}
},
{
field: 'firstAddTime',
title: '录入时间',
formatter: function (value, row, index) {
if (value == null) {
return " ";
} else {
return value;
}
}
},
{
field: 'updateInfoTime',
title: '上次修改时间',
formatter: function (value, row, index) {
if (value == null) {
return " ";
} else {
var vArr = value.split(',')
return vArr[0];
}
}
}]
// {
// title: '操作',
// align: 'center',
// formatter: function(value, row, index) {
// var actions = [];
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.materialRequisitionId + '\')"><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.materialRequisitionId + '\')"><i class="fa fa-remove"></i>删除</a>');
// return actions.join('');
// }
// }
};
$.table.init(options);
});
//删除
function removeSelected() {
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
// console.log(rows)
if (rows.length > 0) {
$.modal.confirm("是否删除选中的"+ rows.length +"条委外领料单?", function () {
$.ajax({
url: prefix + '/removeSelected',
type: 'post',
data: {
ids : rows.join()
},
success: function (res) {
// console.log(res)
$("#bootstrap-table").bootstrapTable("refresh");
$.modal.msgSuccess("删除成功!")
},
error: function (res) {
$.modal.msgError(res.error())
}
})
})
} else {
$.modal.msgWarning("请选择一条数据")
}
}
//导出
function exportSelectedOutSource() {
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
var data = $("#bootstrap-table").bootstrapTable("getSelections")
if (rows.length !== 1) {
$.modal.alert("请选择一条记录");
return;
} else {
// rows为选中行的id
// console.log(rows);
// console.log(data);
// console.log(data[0].orderNumber)
$.modal.confirm("是否确认要导出本条领料单?", function (){
axios({
url: prefix + '/exportOutsource/'+data[0].materialRequisitionId,
method: 'POST',
responseType: 'blob'
}).then(response => {
// console.log(response)
const URL = window.URL.createObjectURL(response.data)
// 创建隐藏<a>标签进行下载
const tempLink = document.createElement('a')
tempLink.style.display = 'none'
tempLink.href = URL
let time = new Date().toLocaleString()
tempLink.setAttribute('download', time + "委外领料单.xlsx")
if (typeof tempLink.download === 'undefined') {
tempLink.setAttribute('target', '_blank')
}
document.body.appendChild(tempLink)
tempLink.click()
document.body.removeChild(tempLink)// 移除dom元素
window.URL.revokeObjectURL(URL)//释放内存
})
});
}
}
</script>
</body>
</html>

645
ruoyi-admin/src/main/resources/templates/outsource/outsourceInspectionNotice/add.html

@ -1,645 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增委外加工入库检验通知')" />
<th:block th:include="include :: datetimepicker-css"/>
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet">
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet">
<th:block th:include="include :: bootstrap-editable-css"/>
<style>
.other-container {
width: 90%;
height: 200px;
margin: auto;
}
.other {
margin-top: 20px;
}
h4 {
display: inline-block;
margin-right: 20px;
}
.modal-body{
height: 550px;
}
iframe{
width: 100%;
height: 500px;
frameborder: 0;
border: 0;
display: inline-block;
}
</style>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-outsourceInspectionNotice-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">入通知单号:</label>
<div class="col-sm-8">
<input name="inNoticeNumber" class="form-control" type="text" required readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">委外订单单号:</label>
<div class="col-sm-8">
<!-- <input name="outsourceOrderNumber" class="form-control" type="text" required>-->
<select name="outsourceOrderNumber" class="form-control m-b" required>
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">厂商代码:</label>
<div class="col-sm-8">
<input name="supplierCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">厂商名称:</label>
<div class="col-sm-8">
<input name="supplierName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库编号:</label>
<div class="col-sm-8">
<!-- <input name="stockNumber" class="form-control" type="text">-->
<select name="stockNumber" class="form-control m-b">
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库名称:</label>
<div class="col-sm-8">
<!-- <input name="stockName" class="form-control" type="text">-->
<select name="stockName" class="form-control m-b">
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">交检日期:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="inspectionDate" class="form-control" placeholder="yyyy-MM-dd" type="text" readonly>
<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="warehousingDate" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">加工工序编号:</label>
<div class="col-sm-8">
<!-- <input name="procedureCode" class="form-control" type="text">-->
<select name="procedureCode" class="form-control m-b">
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">加工工序名称:</label>
<div class="col-sm-8">
<!-- <input name="procedureName" class="form-control" type="text">-->
<select name="procedureName" class="form-control m-b">
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">接收人员:</label>
<div class="col-sm-8">
<!-- <input name="receivingPersonnel" class="form-control" type="text">-->
<select name="receivingPersonnel" class="form-control m-b" required>
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">录入人员:</label>
<div class="col-sm-8">
<input name="entryPersonnel" 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="processingType" class="form-control" type="text">-->
<select name="processingType" class="form-control m-b" th:with="type=${@dict.getType('processing_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">
<textarea name="remarks" class="form-control"></textarea>
</div>
</div>
<div class="form-group" hidden>
<label class="col-sm-3 control-label">确认否:</label>
<div class="col-sm-8">
<select name="confirmFlag" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
</form>
</div>
<div class="other-container">
<div class="other">
<br><hr>
<h4>订单材料信息</h4>
<div class="col-sm-12 select-table table-striped">
<table id="addDetailTable" style="white-space:nowrap"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: bootstrap-table-editable-js"/>
<script th:src="@{/ajax/libs/select2/select2.js}"></script>
<script th:inline="javascript">
var prefix = ctx + "outsource/outsourceInspectionNotice"
var prefixOutsourceOrderInfo = ctx + "outsource/outsourceOrderInfo"
var prefixOutsourceOrderMaterial = ctx + "outsource/outsourceOrderMaterial"
var prefixUser = ctx + "system/user"
var prefixInspectionDetail = ctx + "storehouse/warehousingInspectionDetail"
var purchasingUnitDatas = [[${@dict.getType('sys_unit_class')}]];
var judgmentResultsDatas = [[${@dict.getType('judgment_results')}]];
var materialTypeDatas = [[${@dict.getType('ck_meterialt_type')}]];
$("#form-outsourceInspectionNotice-add").validate({
focusCleanup: true
});
function submitHandler() {
let getData=$('#addDetailTable').bootstrapTable('getData', true)
if(getData.length > 0) {
//确认添加选中的物料数据
if ($.validate.form()) {
confirmDetailMaterial();
$.operate.save(prefix + "/add", $('#form-outsourceInspectionNotice-add').serialize());
}
} else {
$.modal.alertWarning("未选择物料,请添加!")
}
}
$("input[name='inspectionDate']").datetimepicker({
format: "yyyy-mm-dd hh:ii:ss",
minView: "month",
autoclose: true,
todayBtn: true
});
$("input[name='inspectionDate']").datetimepicker('setDate', new Date())
$("input[name='warehousingDate']").datetimepicker({
format: "yyyy-mm-dd hh:ii:ss",
minView: "month",
autoclose: true,
todayBtn: true
});
$("input[name='warehousingDate']").datetimepicker('setDate', new Date())
$(document).ready(function(){
$("#form-outsourceInspectionNotice-add select[name='processingType']").select2({
tags: true,
insertTag: function (data, tag) {
// Insert the tag at the end of the results
data.push(tag);
}
});
});
//获取单号
$.ajax({
url: prefix + "/getId",
type: "post",
dateType: "json",
success: function (resp) {
if (resp.code === 0) {
$("input[name='inNoticeNumber']").val(resp.data);
} else {
$.modal.msgError("失败啦");
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
});
//获取委外加工订单单号
$.ajax({
url: prefixOutsourceOrderInfo + "/list",
type: "post",
dateType: "json",
success: function (res) {
if (res.rows.length > 0) {
var orderData = res.rows;
//alert(JSON.stringify(data));
for (let i in orderData) {
// console.log(finishProductData[i].finishProductCode)
$("#form-outsourceInspectionNotice-add select[name='outsourceOrderNumber']").append("<option value='" + orderData[i].outsourceOrderNumber + "'>" + orderData[i].outsourceOrderNumber + "</option>");
}
$("#form-outsourceInspectionNotice-add select[name='outsourceOrderNumber']").change(function () {
var outsourceOrderNumber = $(this).val();
for (let i=0;i<orderData.length;i++) {
if (orderData[i].outsourceOrderNumber == outsourceOrderNumber) {
$("#form-outsourceInspectionNotice-add input[name='supplierCode']").val(orderData[i].supplierCode);
$("#form-outsourceInspectionNotice-add input[name='supplierName']").val(orderData[i].supplierName);
$("#form-outsourceInspectionNotice-add select[name='stockNumber']").val(orderData[i].deliveryStockNumber).trigger("change");
$("#form-outsourceInspectionNotice-add select[name='stockName']").val(orderData[i].deliveryStockName).trigger("change");
$("#form-outsourceInspectionNotice-add select[name='procedureCode']").val(orderData[i].procedureCode).trigger("change");
$("#form-outsourceInspectionNotice-add select[name='procedureName']").val(orderData[i].procedureName).trigger("change");
// $("#form-outsourceInspectionNotice-add select[name='processingType']").val(orderData[i].procedureName).trigger("change");
var processingTypeData = {
id: orderData[i].procedureName,
text: orderData[i].procedureName
};
if ($("#form-outsourceInspectionNotice-add select[name='processingType']").find("option[value='" + processingTypeData.id + "']").length) {
$("#form-outsourceInspectionNotice-add select[name='processingType']").val(processingTypeData.id).trigger('change');
} else {
// Create a DOM Option and pre-select by default
var newOption = new Option(processingTypeData.text, processingTypeData.id, true, true);
// Append it to the select
$("#form-outsourceInspectionNotice-add select[name='processingType']").append(newOption).trigger('change');
}
$("#form-outsourceInspectionNotice-add select[name='processingType']").select2({
tags: true
});
showDetailMaterial();
}
}
})
} else {
$.modal.msgError(res.msg);
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
});
var changeStoreId = 0
//仓库信息
$.ajax({
url: ctx + 'stock/stockInfo/list',
type: 'post',
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
var stockData = res.rows;
//alert(JSON.stringify(data));
for (let i in stockData) {
$("#form-outsourceInspectionNotice-add select[name='stockNumber']").append("<option value='" + stockData[i].stockNO + "'>" + stockData[i].stockNO + "</option>");
$("#form-outsourceInspectionNotice-add select[name='stockName']").append("<option value='" + stockData[i].stockname + "'>" + stockData[i].stockname + "</option>");
}
$("#form-outsourceInspectionNotice-add select[name='stockNumber']").change(function () {
var stockNumber = $(this).val();
for (let i=0;i<stockData.length;i++) {
if (stockData[i].stockNO == stockNumber) {
changeStoreId++;
if (changeStoreId<2) {
$("#form-outsourceInspectionNotice-add select[name='stockName']").val(stockData[i].stockname).trigger("change")
changeStoreId = 0
}
}
}
})
$("#form-outsourceInspectionNotice-add select[name='stockName']").change(function () {
var stockName = $(this).val();
for (let i=0;i<stockData.length;i++) {
if (stockData[i].stockname == stockName) {
changeStoreId++;
if (changeStoreId<2) {
$("#form-outsourceInspectionNotice-add select[name='stockNumber']").val(stockData[i].stockNO).trigger("change")
changeStoreId = 0
}
}
}
})
}
}
})
var changeProcedureId = 0
//工序信息
$.ajax({
url: ctx + 'system/procedure/list',
type: 'post',
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
var procedureData = res.rows;
let procedureCode1 = $("#form-outsourceInspectionNotice-add select[name='procedureCode']");
let procedureName1 = $("#form-outsourceInspectionNotice-add select[name='procedureName']");
//alert(JSON.stringify(data));
for (let i in procedureData) {
procedureCode1.append("<option value='" + procedureData[i].procedureCode + "'>" + procedureData[i].procedureCode + "</option>");
procedureName1.append("<option value='" + procedureData[i].procedureName + "'>" + procedureData[i].procedureName + "</option>");
}
procedureCode1.change(function () {
var procedureCode = procedureCode1.val();
for (let i=0;i<procedureData.length;i++) {
if (procedureData[i].procedureCode == procedureCode) {
changeProcedureId++;
if (changeProcedureId<2) {
procedureName1.val(procedureData[i].procedureName).trigger("change")
var processingTypeData = {
id: procedureData[i].procedureName,
text: procedureData[i].procedureName
};
var newOption = new Option(processingTypeData.text, processingTypeData.id, true, true);
changeProcedureId = 0;
}
}
}
})
procedureName1.change(function () {
var procedureName = procedureName1.val();
for (let i=0;i<procedureData.length;i++) {
if (procedureData[i].procedureName == procedureName) {
changeProcedureId++;
if (changeProcedureId<2) {
procedureCode1.val(procedureData[i].procedureCode).trigger("change")
var processingTypeData = {
id: procedureName,
text: procedureName
};
var newOption = new Option(processingTypeData.text, processingTypeData.id, true, true);
changeProcedureId = 0;
}
}
}
})
}
}
})
//获取接收人员
$.ajax({
url: prefixUser + "/list",
type: "post",
dateType: "json",
success: function (res) {
if (res.rows.length > 0) {
var userData = res.rows;
//alert(JSON.stringify(data));
for (let i in userData) {
// console.log(finishProductData[i].finishProductCode)
$("#form-outsourceInspectionNotice-add select[name='receivingPersonnel']").append("<option value='" + userData[i].userName + "'>" + userData[i].userName + "</option>");
}
} else {
$.modal.msgError(res.msg);
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
});
$(function () {
//填入录入人员
let userName = [[${@permission.getPrincipalProperty('userName')}]];
$("#form-outsourceInspectionNotice-add input[name='entryPersonnel']").val(userName);
})
//初始化添加材料表
$('#addDetailTable').bootstrapTable({
pagination: true,
pageNumber: 1,
pageSize: 10,
showToggle: false, // 是否显示详细视图和列表视图的切换按钮
cardView: false, // 是否显示详细视图
detailView: false, // 是否显示父子表
smartDisplay: false, // 加了这个才显示每页显示的行数
showExport: false, // 是否显示导出按钮
clickToSelect: true,//点击行选中
contentType: "application/x-www-form-urlencoded",
paginationDetailHAlign: ' hiddenDetailInfo',
height: 250,
uniqueId: 'materialCode',
queryParams: function (params) {
//console.log("123");
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
// enterpriseCode: data[0].enterpriseCode
};
// console.log(data[0].enterpriseCode)
return curParams
},
columns: [
{
title: '操作',
align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeMaterialData(\'' + row.materialCode + '\')" ><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
},
{
field: 'warehousingInspectionDetailId',
title: '入库检验通知物料id',
visible: false
},
{
field: 'inNoticeNumber',
title: '入通知单号',
visible: false
},
{
field: 'materialCode',
title: '物料代码'
},
{
field: 'materialName',
title: '物料名称'
},
{
field: 'specificationModel',
title: '规格型号'
},
{
field: 'typeMachine',
title: '机种',
editable: {
type: 'text',
title: '机种',
emptytext: '机种',
validate: function (v) {
}
}
},
{
field: 'materialType',
title: '物料类别',
formatter: function(value, row, index) {
return $.table.selectDictLabel(materialTypeDatas, value);
},
visible: false
},
{
field: 'purchasingUnit',
title: '单位',
formatter: function(value, row, index) {
return $.table.selectDictLabel(purchasingUnitDatas, value);
}
},
{
field: 'materialQuantity',
title: '送货数量'
},
{
field: 'qualifiedQuantity',
title: '合格数量',
editable: {
type: 'text',
title: '合格数量',
emptytext: '合格数量',
validate: function (v) {
if (isNaN(v)) return '数量必须是数字';
var ex = /^[1-9]\d*$/;
if (!ex.test(v)) return '数量必须是正整数';
}
}
},
{
field: 'purchaseExplain',
title: '说明',
editable: {
type: 'text',
title: '说明',
emptytext: '说明',
validate: function (v) {
}
}
},
{
field: 'productionOrderNumber',
title: '生产单号',
editable: {
type: 'text',
title: '生产单号',
emptytext: '生产单号',
validate: function (v) {
}
}
},
{
field: 'judgmentResults',
title: '判定结果',
editable: {
type: 'select',
title: '判定结果',
emptytext: '判定结果',
source: function() {
let result = [];
for (let i = 0;i<judgmentResultsDatas.length;i++) {
result.push({value: judgmentResultsDatas[i].dictValue,text: judgmentResultsDatas[i].dictLabel})
}
return result;
},
validate: function (value) {
}
}
}]
})
//选择订单号显示表内订单信息
function showDetailMaterial() {
$('#addDetailTable').bootstrapTable("removeAll")
var outsourceOrderNumber = $("select[name='outsourceOrderNumber']").val();
$.ajax({
url: prefixOutsourceOrderMaterial + '/list',
type: 'post',
data: {
outsourceOrderNumber: outsourceOrderNumber
},
success: function (res) {
console.log(res)
var count = res.rows.length;
var data = res.rows;
var inNoticeNumber = $("input[name='inNoticeNumber']").val();
for (i = 0; i < res.rows.length; i++) {
$("#addDetailTable").bootstrapTable('insertRow', {
index: count + i,
row: {
inNoticeNumber: inNoticeNumber,
materialCode: data[i].materialCode,
materialName: data[i].materialName,
specificationModel: data[i].specificationModel,
typeMachine: '',
materialType: '',
purchasingUnit: data[i].inventoryUnit,
materialQuantity: data[i].quantity,
qualifiedQuantity: data[i].quantity,
purchaseExplain: data[i].description,
productionOrderNumber: data[i].outsourceWorkNumber,
judgmentResults: ''
}
});
}
}
})
}
//确认添加选中的物料数据
function confirmDetailMaterial() {
$("#addDetailTable").bootstrapTable('refresh');
let data = $('#addDetailTable').bootstrapTable('getData', true);
// let getData=$('#addProductTable').bootstrapTable('getData', true)
// console.log(data)
$.ajax({
url: prefixInspectionDetail + '/addEditSave',
type: "POST",
data: {
data: JSON.stringify(data)
},
dataType: "json",
success: function (resp) {
// console.log(data)
console.log(resp)
},
})
}
//添加表格内删除物料信息
function removeMaterialData(materialCode){
var ids = [];
ids.push(materialCode);
$('#addDetailTable').bootstrapTable("remove",{
field:'materialCode',
values:ids
})
$("#addDetailTable").bootstrapTable('refresh');
}
</script>
</body>
</html>

626
ruoyi-admin/src/main/resources/templates/outsource/outsourceInspectionNotice/edit.html

@ -1,626 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改委外加工入库检验通知')" />
<th:block th:include="include :: datetimepicker-css"/>
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet">
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet">
<th:block th:include="include :: bootstrap-editable-css"/>
<style>
.other-container {
width: 90%;
height: 200px;
margin: auto;
}
.other {
margin-top: 20px;
}
h4 {
display: inline-block;
margin-right: 20px;
}
.modal-body{
height: 550px;
}
iframe{
width: 100%;
height: 500px;
frameborder: 0;
border: 0;
display: inline-block;
}
</style>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-outsourceInspectionNotice-edit" th:object="${outsourceInspectionNotice}">
<input name="warehousingInspectionNoticeId" th:field="*{warehousingInspectionNoticeId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">入通知单号:</label>
<div class="col-sm-8">
<input name="inNoticeNumber" th:field="*{inNoticeNumber}" class="form-control" type="text" required readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">委外订单单号:</label>
<div class="col-sm-8">
<!-- <input name="outsourceOrderNumber" th:field="*{outsourceOrderNumber}" class="form-control" type="text" required>-->
<select name="outsourceOrderNumber" class="form-control m-b" required disabled>
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">厂商代码:</label>
<div class="col-sm-8">
<input name="supplierCode" th:field="*{supplierCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">厂商名称:</label>
<div class="col-sm-8">
<input name="supplierName" th:field="*{supplierName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库编号:</label>
<div class="col-sm-8">
<!-- <input name="stockNumber" th:field="*{stockNumber}" class="form-control" type="text">-->
<select name="stockNumber" class="form-control m-b">
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库名称:</label>
<div class="col-sm-8">
<!-- <input name="stockName" th:field="*{stockName}" class="form-control" type="text">-->
<select name="stockName" class="form-control m-b">
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">交检日期:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="inspectionDate" th:field="*{inspectionDate}" class="form-control" placeholder="yyyy-MM-dd" type="text" readonly>
<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="warehousingDate" th:field="*{warehousingDate}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">加工工序编号:</label>
<div class="col-sm-8">
<!-- <input name="procedureCode" th:field="*{procedureCode}" class="form-control" type="text">-->
<select name="procedureCode" class="form-control m-b">
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">加工工序名称:</label>
<div class="col-sm-8">
<!-- <input name="procedureName" th:field="*{procedureName}" class="form-control" type="text">-->
<select name="procedureName" class="form-control m-b">
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">接收人员:</label>
<div class="col-sm-8">
<!-- <input name="receivingPersonnel" th:field="*{receivingPersonnel}" class="form-control" type="text">-->
<select name="receivingPersonnel" class="form-control m-b" required>
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">录入人员:</label>
<div class="col-sm-8">
<input name="entryPersonnel" th:field="*{entryPersonnel}" 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="processingType" th:field="*{processingType}" class="form-control" type="text">-->
<select name="processingType" class="form-control m-b" th:with="type=${@dict.getType('processing_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{processingType}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="remarks" class="form-control">[[*{remarks}]]</textarea>
</div>
</div>
</form>
</div>
<div class="other-container">
<div class="other">
<br><hr>
<h4>订单材料信息</h4>
<div class="col-sm-12 select-table table-striped">
<table id="addDetailTable" style="white-space:nowrap"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: bootstrap-table-editable-js"/>
<script th:src="@{/ajax/libs/select2/select2.js}"></script>
<script th:inline="javascript">
var getData = [[${outsourceInspectionNotice}]]
var prefix = ctx + "outsource/outsourceInspectionNotice"
var prefixOutsourceOrderInfo = ctx + "outsource/outsourceOrderInfo"
var prefixOutsourceOrderMaterial = ctx + "outsource/outsourceOrderMaterial"
var prefixUser = ctx + "system/user"
var prefixInspectionDetail = ctx + "storehouse/warehousingInspectionDetail"
var purchasingUnitDatas = [[${@dict.getType('sys_unit_class')}]];
var judgmentResultsDatas = [[${@dict.getType('judgment_results')}]];
var materialTypeDatas = [[${@dict.getType('ck_meterialt_type')}]];
$("#form-outsourceInspectionNotice-edit").validate({
focusCleanup: true
});
function submitHandler() {
let getData=$('#addDetailTable').bootstrapTable('getData', true)
if(getData.length > 0) {
//确认添加选中的物料数据
if ($.validate.form()) {
confirmDetailMaterial();
$.operate.save(prefix + "/edit", $('#form-outsourceInspectionNotice-edit').serialize());
}
} else {
$.modal.alertWarning("未选择物料,请添加!")
}
}
$("input[name='inspectionDate']").datetimepicker({
format: "yyyy-mm-dd hh:ii:ss",
minView: "month",
autoclose: true,
todayBtn: true
});
$("input[name='warehousingDate']").datetimepicker({
format: "yyyy-mm-dd hh:ii:ss",
minView: "month",
autoclose: true,
todayBtn: true
});
//获取委外加工订单单号
$.ajax({
url: prefixOutsourceOrderInfo + "/list",
type: "post",
dateType: "json",
success: function (res) {
if (res.rows.length > 0) {
var orderData = res.rows;
//alert(JSON.stringify(data));
for (let i in orderData) {
// console.log(finishProductData[i].finishProductCode)
$("#form-outsourceInspectionNotice-edit select[name='outsourceOrderNumber']").append("<option value='" + orderData[i].outsourceOrderNumber + "'>" + orderData[i].outsourceOrderNumber + "</option>");
}
$("#form-outsourceInspectionNotice-edit select[name='outsourceOrderNumber']").val(getData.outsourceOrderNumber).trigger("change")
let processingTypeData = {
id: getData.processingType,
text: getData.processingType
};
if ($("#form-outsourceInspectionNotice-edit select[name='processingType']").find("option[value='" + processingTypeData.id + "']").length) {
$("#form-outsourceInspectionNotice-edit select[name='processingType']").val(processingTypeData.id).trigger('change');
} else {
// Create a DOM Option and pre-select by default
var newOption = new Option(processingTypeData.text, processingTypeData.id, true, true);
// Append it to the select
$("#form-outsourceInspectionNotice-edit select[name='processingType']").append(newOption).trigger('change');
}
$("#form-outsourceInspectionNotice-edit select[name='processingType']").select2({
tags: true
});
// console.log(getData.procedureCode)
// $("#form-outsourceInspectionNotice-edit select[name='outsourceOrderNumber']").change(function () {
// var outsourceOrderNumber = $(this).val();
// for (let i=0;i<orderData.length;i++) {
// if (orderData[i].outsourceOrderNumber == outsourceOrderNumber) {
// $("#form-outsourceInspectionNotice-edit input[name='supplierCode']").val(orderData[i].supplierCode);
// $("#form-outsourceInspectionNotice-edit input[name='supplierName']").val(orderData[i].supplierName);
// $("#form-outsourceInspectionNotice-edit select[name='stockNumber']").val(orderData[i].deliveryStockNumber).trigger("change");
// $("#form-outsourceInspectionNotice-edit select[name='stockName']").val(orderData[i].deliveryStockName).trigger("change");
// $("#form-outsourceInspectionNotice-edit select[name='procedureCode']").val(orderData[i].procedureCode).trigger("change");
// $("#form-outsourceInspectionNotice-edit select[name='procedureName']").val(orderData[i].procedureName).trigger("change");
// $("#form-outsourceInspectionNotice-edit input[name='processingType']").val(orderData[i].procedureName);
// showDetailMaterial();
// }
// }
// })
} else {
$.modal.msgError(res.msg);
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
});
$(document).ready(function(){
$("#form-outsourceInspectionNotice-edit select[name='processingType']").select2({
tags: true,
insertTag: function (data, tag) {
// Insert the tag at the end of the results
data.push(tag);
}
});
});
var changeStoreId = 0
//仓库信息
$.ajax({
url: ctx + 'stock/stockInfo/list',
type: 'post',
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
var stockData = res.rows;
//alert(JSON.stringify(data));
for (let i in stockData) {
$("#form-outsourceInspectionNotice-edit select[name='stockNumber']").append("<option value='" + stockData[i].stockNO + "'>" + stockData[i].stockNO + "</option>");
$("#form-outsourceInspectionNotice-edit select[name='stockName']").append("<option value='" + stockData[i].stockname + "'>" + stockData[i].stockname + "</option>");
}
$("#form-outsourceInspectionNotice-edit select[name='stockNumber']").val(getData.stockNumber).trigger("change")
$("#form-outsourceInspectionNotice-edit select[name='stockName']").val(getData.stockName).trigger("change")
$("#form-outsourceInspectionNotice-edit select[name='stockNumber']").change(function () {
var stockNumber = $(this).val();
for (let i=0;i<stockData.length;i++) {
if (stockData[i].stockNO == stockNumber) {
changeStoreId++;
if (changeStoreId<2) {
$("#form-outsourceInspectionNotice-edit select[name='stockName']").val(stockData[i].stockname).trigger("change")
changeStoreId = 0
}
}
}
})
$("#form-outsourceInspectionNotice-edit select[name='stockName']").change(function () {
var stockName = $(this).val();
for (let i=0;i<stockData.length;i++) {
if (stockData[i].stockname == stockName) {
changeStoreId++;
if (changeStoreId<2) {
$("#form-outsourceInspectionNotice-edit select[name='stockNumber']").val(stockData[i].stockNO).trigger("change")
changeStoreId = 0
}
}
}
})
}
}
})
var changeProcedureId = 0
//工序信息
$.ajax({
url: ctx + 'system/procedure/list',
type: 'post',
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
var procedureData = res.rows;
let procedureCode1 = $("#form-outsourceInspectionNotice-edit select[name='procedureCode']");
let procedureName1 = $("#form-outsourceInspectionNotice-edit select[name='procedureName']");
//alert(JSON.stringify(data));
for (let i in procedureData) {
procedureCode1.append("<option value='" + procedureData[i].procedureCode + "'>" + procedureData[i].procedureCode + "</option>");
procedureName1.append("<option value='" + procedureData[i].procedureName + "'>" + procedureData[i].procedureName + "</option>");
}
$("#form-outsourceInspectionNotice-edit select[name='procedureCode']").val(getData.procedureCode).trigger("change")
$("#form-outsourceInspectionNotice-edit select[name='procedureName']").val(getData.procedureName).trigger("change")
procedureCode1.change(function () {
var procedureCode = procedureCode1.val();
for (let i=0;i<procedureData.length;i++) {
if (procedureData[i].procedureCode == procedureCode) {
changeProcedureId++;
if (changeProcedureId<2) {
procedureName1.val(procedureData[i].procedureName).trigger("change")
let processingTypeData = {
id: procedureData[i].procedureName,
text: procedureData[i].procedureName
};
var newOption = new Option(processingTypeData.text, processingTypeData.id, true, true);
changeProcedureId = 0;
}
}
}
})
procedureName1.change(function () {
var procedureName = procedureName1.val();
for (let i=0;i<procedureData.length;i++) {
if (procedureData[i].procedureName == procedureName) {
changeProcedureId++;
if (changeProcedureId<2) {
procedureCode1.val(procedureData[i].procedureCode).trigger("change")
let processingTypeData = {
id: procedureName,
text: procedureName
};
var newOption = new Option(processingTypeData.text, processingTypeData.id, true, true);
changeProcedureId = 0;
}
}
}
})
}
}
})
//获取接收人员
$.ajax({
url: prefixUser + "/list",
type: "post",
dateType: "json",
success: function (res) {
if (res.rows.length > 0) {
var userData = res.rows;
//alert(JSON.stringify(data));
for (let i in userData) {
// console.log(finishProductData[i].finishProductCode)
$("#form-outsourceInspectionNotice-edit select[name='receivingPersonnel']").append("<option value='" + userData[i].userName + "'>" + userData[i].userName + "</option>");
$("#form-outsourceInspectionNotice-edit select[name='receivingPersonnel']").val(getData.receivingPersonnel).trigger("change")
}
} else {
$.modal.msgError(res.msg);
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
});
//初始化添加材料表
$('#addDetailTable').bootstrapTable({
url: prefixInspectionDetail + '/list',
method: 'post',
pagination: true,
pageNumber: 1,
pageSize: 10,
showToggle: false, // 是否显示详细视图和列表视图的切换按钮
cardView: false, // 是否显示详细视图
detailView: false, // 是否显示父子表
smartDisplay: false, // 加了这个才显示每页显示的行数
showExport: false, // 是否显示导出按钮
clickToSelect: true,//点击行选中
contentType: "application/x-www-form-urlencoded",
paginationDetailHAlign: ' hiddenDetailInfo',
height: 250,
uniqueId: 'materialCode',
queryParams: function (params) {
//console.log("123");
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
inNoticeNumber: getData.inNoticeNumber
};
// console.log(data[0].enterpriseCode)
return curParams
},
columns: [
{
field: 'warehousingInspectionDetailId',
title: '入库检验通知物料id',
visible: false
},
{
field: 'inNoticeNumber',
title: '入通知单号',
visible: false
},
{
field: 'materialCode',
title: '物料代码'
},
{
field: 'materialName',
title: '物料名称'
},
{
field: 'specificationModel',
title: '规格型号'
},
{
field: 'typeMachine',
title: '机种',
editable: {
type: 'text',
title: '机种',
emptytext: '机种',
validate: function (v) {
}
},
formatter: (value, row, index) => {
if (value === null) {
return ""
} else {
return value
}
}
},
{
field: 'materialType',
title: '物料类别',
formatter: function(value, row, index) {
return $.table.selectDictLabel(materialTypeDatas, value);
},
visible: false
},
{
field: 'purchasingUnit',
title: '单位',
formatter: function(value, row, index) {
return $.table.selectDictLabel(purchasingUnitDatas, value);
}
},
{
field: 'materialQuantity',
title: '送货数量'
},
{
field: 'qualifiedQuantity',
title: '合格数量',
editable: {
type: 'text',
title: '合格数量',
emptytext: '合格数量',
validate: function (v) {
if (isNaN(v)) return '数量必须是数字';
var ex = /^[1-9]\d*$/;
if (!ex.test(v)) return '数量必须是正整数';
}
}
},
{
field: 'purchaseExplain',
title: '说明',
editable: {
type: 'text',
title: '说明',
emptytext: '说明',
validate: function (v) {
}
},
formatter: (value, row, index) => {
if (value === null) {
return ""
} else {
return value
}
}
},
{
field: 'productionOrderNumber',
title: '生产单号',
editable: {
type: 'text',
title: '生产单号',
emptytext: '生产单号',
validate: function (v) {
}
},
formatter: (value, row, index) => {
if (value === null) {
return ""
} else {
return value
}
}
},
{
field: 'judgmentResults',
title: '判定结果',
editable: {
type: 'select',
title: '判定结果',
emptytext: '判定结果',
source: function() {
let result = [];
for (let i = 0;i<judgmentResultsDatas.length;i++) {
result.push({value: judgmentResultsDatas[i].dictValue,text: judgmentResultsDatas[i].dictLabel})
}
return result;
},
validate: function (value) {
}
},
formatter: (value, row, index) => {
if (value === null) {
return ""
} else {
return value
}
}
}]
})
//选择订单号显示表内订单信息
function showDetailMaterial() {
$('#addDetailTable').bootstrapTable("removeAll")
var outsourceOrderNumber = $("select[name='outsourceOrderNumber']").val();
$.ajax({
url: prefixOutsourceOrderMaterial + '/list',
type: 'post',
data: {
outsourceOrderNumber: outsourceOrderNumber
},
success: function (res) {
console.log(res)
var count = res.rows.length;
var data = res.rows;
var inNoticeNumber = $("input[name='inNoticeNumber']").val();
for (i = 0; i < res.rows.length; i++) {
$("#addDetailTable").bootstrapTable('insertRow', {
index: count + i,
row: {
inNoticeNumber: inNoticeNumber,
materialCode: data[i].materialCode,
materialName: data[i].materialName,
specificationModel: data[i].specificationModel,
typeMachine: '',
materialType: '',
purchasingUnit: data[i].inventoryUnit,
materialQuantity: data[i].quantity,
qualifiedQuantity: data[i].quantity,
purchaseExplain: data[i].description,
productionOrderNumber: data[i].outsourceWorkNumber,
judgmentResults: ''
}
});
}
}
})
}
//确认添加选中的物料数据
function confirmDetailMaterial() {
$("#addDetailTable").bootstrapTable('refresh');
let data = $('#addDetailTable').bootstrapTable('getData', true);
// let getData=$('#addProductTable').bootstrapTable('getData', true)
// console.log(data)
$.ajax({
url: prefixInspectionDetail + '/addEditSave',
type: "POST",
data: {
data: JSON.stringify(data)
},
dataType: "json",
success: function (resp) {
// console.log(data)
console.log(resp)
},
})
}
</script>
</body>
</html>

377
ruoyi-admin/src/main/resources/templates/outsource/outsourceInspectionNotice/outsourceInspectionNotice.html

@ -1,377 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('委外加工入库检验通知列表')" />
<th:block th:include="include :: datetimepicker-css"/>
<script type="text/javascript" th:src="@{/js/axios.min.js}"></script>
</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="inNoticeNumber"/>
</li>
<li>
<label>委外订单单号:</label>
<input type="text" name="outsourceOrderNumber"/>
</li>
<li>
<label>厂商代码:</label>
<input type="text" name="supplierCode"/>
</li>
<li>
<label>厂商名称:</label>
<input type="text" name="supplierName"/>
</li>
<li class="select-time">
<label>交检日期:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginInspectionDate]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endInspectionDate]"/>
</li>
<li class="select-time">
<label>入库日期:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginWarehousingDate]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endWarehousingDate]"/>
</li>
<li>
<label>加工工序编号:</label>
<input type="text" name="procedureCode"/>
</li>
<li>
<label>加工工序名称:</label>
<input type="text" name="procedureName"/>
</li>
<li>
<label>确认否:</label>
<select name="confirmFlag" th:with="type=${@dict.getType('sys_whether')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="outsource:outsourceInspectionNotice:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="outsource:outsourceInspectionNotice:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="removeSelected()" shiro:hasPermission="outsource:outsourceInspectionNotice:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="exportSelected()" shiro:hasPermission="outsource:outsourceInspectionNotice:export">
<i class="fa fa-download"></i> 导出
</a>
<a class="btn btn-primary" onclick="reviewConfirm()" shiro:hasPermission="outsource:outsourceInspectionNotice:confirm">
<i class="fa fa-hand-grab-o"></i> 确认
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" style="white-space: nowrap"></table>
</div>
</div>
</div>
<!--订单确认-->
<div class="modal fade" id="confirmModel">
<div class="modal-dialog">
<div class="modal-content message_align">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">×</span></button>
<h4 class="modal-title">确认信息</h4>
</div>
<div class="modal-body" style="height: 180px">
<form id="form-confirm-edit">
<div class="form-group" style="display: none">
<label class="col-sm-3 control-label is-required">入库检验通知id:</label>
<div class="col-sm-8">
<input id="warehousingInspectionNoticeId" name="warehousingInspectionNoticeId" class="form-control" type="text" required
readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">确认否:</label>
<div class="col-sm-8">
<select id="confirmFlag" name="confirmFlag" class="form-control" th:with="type=${@dict.getType('sys_whether')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">确认日期:</label>
<div class="col-sm-8">
<div class="input-group date">
<input id="confirmTime" name="confirmTime" class="form-control" placeholder="yyyy-mm-dd hh:ii:ss" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">确认人:</label>
<div class="col-sm-8">
<input id="confirmPerson" name="confirmPerson" class="form-control" type="text">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button type="button" onclick="confirmSubmit()" class="btn btn-success" data-dismiss="modal">确定</button>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('outsource:outsourceInspectionNotice:edit')}]];
var removeFlag = [[${@permission.hasPermi('outsource:outsourceInspectionNotice:remove')}]];
var exportSalesDatas = [[${@dict.getType('sys_export_sales')}]];
var warehousingCategoryDatas = [[${@dict.getType('warehousing_category')}]];
var confirmFlagDatas = [[${@dict.getType('sys_whether')}]];
var prefix = ctx + "outsource/outsourceInspectionNotice";
var prefixDetail = ctx + "storehouse/warehousingInspectionDetail"
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "委外加工入库检验通知",
clickToSelect: true,
columns: [{
checkbox: true
},
{
field: 'warehousingInspectionNoticeId',
title: '入库检验通知id',
visible: false
},
{
field: 'confirmFlag',
title: '确认否',
formatter: function(value, row, index) {
// return $.table.selectDictLabel(confirmNoDatas, value);
var actions = [];
if ($.table.selectDictLabel(confirmFlagDatas, value) == "<span class=''></span>") {
actions.push('<a class="btn btn-primary btn-xs disabled">已确认</a> ');
} else {
actions.push('<a class="btn btn-danger btn-xs disabled">未确认</a> ');
}
return actions.join('');
}
},
{
field: 'inNoticeNumber',
title: '入通知单号'
},
{
field: 'outsourceOrderNumber',
title: '委外订单单号'
},
{
field: 'supplierCode',
title: '厂商代码'
},
{
field: 'supplierName',
title: '厂商名称'
},
{
field: 'stockNumber',
title: '仓库编号'
},
{
field: 'stockName',
title: '仓库名称'
},
{
field: 'inspectionDate',
title: '交检日期'
},
{
field: 'warehousingDate',
title: '入库日期'
},
{
field: 'remarks',
title: '备注'
},
{
field: 'firstAddTime',
title: '录入时间',
formatter: function (value, row, index) {
if (value == null) {
return " ";
} else {
return value;
}
}
},
{
field: 'updateInfoTime',
title: '上次修改时间',
formatter: function (value, row, index) {
if (value == null) {
return " ";
} else {
var vArr = value.split(',')
return vArr[0];
}
}
},
{
field: 'procedureCode',
title: '加工工序编号'
},
{
field: 'procedureName',
title: '加工工序名称'
},
{
field: 'receivingPersonnel',
title: '接收人员'
},
{
field: 'entryPersonnel',
title: '录入人员'
},
{
field: 'processingType',
title: '加工类型'
}]
};
$.table.init(options);
});
//删除
function removeSelected() {
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
console.log(rows)
if (rows.length > 0) {
$.modal.confirm("是否删除选中的"+ rows.length +"条入库检验通知单?", function () {
$.ajax({
url: prefix + '/removeSelected',
type: 'post',
data: {
ids : rows.join()
},
success: function (res) {
// console.log(res)
$("#bootstrap-table").bootstrapTable("refresh");
$.modal.msgSuccess("删除成功!")
},
error: function (res) {
$.modal.msgError(res.error())
}
})
})
} else {
$.modal.msgWarning("请选择一条数据")
}
}
//导出
function exportSelected() {
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
var data = $("#bootstrap-table").bootstrapTable("getSelections")
if (rows.length !== 1) {
$.modal.alert("请选择一条记录");
return;
} else {
// rows为选中行的id
// console.log(rows);
// console.log(data);
// console.log(data[0].orderNumber)
$.modal.confirm("是否确认要导出本条订单?", function (){
axios({
url: prefix + '/exportSelected/'+data[0].warehousingInspectionNoticeId,
method: 'POST',
responseType: 'blob'
}).then(response => {
// console.log(response)
const URL = window.URL.createObjectURL(response.data)
// 创建隐藏<a>标签进行下载
const tempLink = document.createElement('a')
tempLink.style.display = 'none'
tempLink.href = URL
let time = new Date().toLocaleString()
tempLink.setAttribute('download', time + "委外加工入库检验通知单.xlsx")
if (typeof tempLink.download === 'undefined') {
tempLink.setAttribute('target', '_blank')
}
document.body.appendChild(tempLink)
tempLink.click()
document.body.removeChild(tempLink)// 移除dom元素
window.URL.revokeObjectURL(URL)//释放内存
})
});
}
}
$("input[name='confirmTime']").datetimepicker({
format: "yyyy-mm-dd hh:ii:ss",
minView: "month",
autoclose: true,
todayBtn: true
});
// 订单确认
function reviewConfirm(){
let data = $("#bootstrap-table").bootstrapTable("getSelections");
let userName = [[${@permission.getPrincipalProperty('userName')}]];
if (data.length ===1) {
$("#warehousingInspectionNoticeId").val(data[0].warehousingInspectionNoticeId)
$("#confirmFlag").val(data[0].confirmFlag).trigger("change")
$("#confirmPerson").val(userName)
$("#confirmTime").datetimepicker("setDate", new Date());
$("#confirmModel").modal("show");
}else {
$.modal.alert("请选择一条数据");
}
}
// 订单确认
function confirmSubmit(){
$.ajax({
url: prefix + "/edit",
type: "post",
resultType: "json",
data: $('#form-confirm-edit').serialize(),
success: function (resp) {
// console.log(resp)
$("#confirmModel").modal("hide");
$("#bootstrap-table").bootstrapTable('refresh');
$.modal.msgSuccess("操作成功!")
},
error: function () {
$.modal.msgError("出错了!");
}
});
}
</script>
</body>
</html>

921
ruoyi-admin/src/main/resources/templates/outsource/outsourceOrderInfo/add.html

@ -1,921 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增委外加工订单')" />
<th:block th:include="include :: datetimepicker-css"/>
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet">
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet">
<th:block th:include="include :: bootstrap-editable-css"/>
<style>
.other-container {
width: 90%;
height: 200px;
margin: auto;
}
.other {
margin-top: 20px;
}
h4 {
display: inline-block;
margin-right: 20px;
}
.modal-body{
height: 550px;
}
iframe{
width: 100%;
height: 500px;
frameborder: 0;
border: 0;
display: inline-block;
}
</style>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-outsourceOrderInfo-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">委外订单单号:</label>
<div class="col-sm-8">
<input name="outsourceOrderNumber" class="form-control" type="text" required readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">委外加工批号:</label>
<div class="col-sm-8">
<input name="outsourceBatchNumber" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">厂商编号:</label>
<div class="col-sm-8">
<!-- <input name="supplierCode" class="form-control" type="text">-->
<select name="supplierCode" class="form-control m-b" required>
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">厂商名称:</label>
<div class="col-sm-8">
<input name="supplierName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">主联系人:</label>
<div class="col-sm-8">
<input name="customerContact" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系电话:</label>
<div class="col-sm-8">
<input name="contactNumber" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">传真:</label>
<div class="col-sm-8">
<input name="customerFax" 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="customerAddress" 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="deliveryTime" 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="billingTime" 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="procedureCode" class="form-control m-b">
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">加工工序名称:</label>
<div class="col-sm-8">
<select name="procedureName" class="form-control m-b">
<option value="">所有</option>
</select>
<!-- <input name="procedureName" 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="issueStockNumber" class="form-control m-b">
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">发出仓库名称:</label>
<div class="col-sm-8">
<!-- <select name="issueStockName" class="form-control m-b">-->
<!-- <option value="">所有</option>-->
<!-- </select>-->
<input name="issueStockName" 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="deliveryStockNumber" class="form-control m-b">
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">交货仓库名称:</label>
<div class="col-sm-8">
<!-- <select name="deliveryStockName" class="form-control m-b">-->
<!-- <option value="">所有</option>-->
<!-- </select>-->
<input name="deliveryStockName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注内容:</label>
<div class="col-sm-8">
<textarea name="remarks" class="form-control"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">承运公司:</label>
<div class="col-sm-8">
<!-- <input name="carrierCompany" class="form-control" type="text">-->
<select name="carrierCompany" class="form-control m-b">
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group hidden">
<label class="col-sm-3 control-label">确认否:</label>
<div class="col-sm-8">
<!-- <input name="confirmFlag" class="form-control" type="text">-->
<select name="confirmFlag" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group hidden">
<label class="col-sm-3 control-label">结案否:</label>
<div class="col-sm-8">
<!-- <input name="closeCaseFlag" class="form-control" type="text">-->
<select name="closeCaseFlag" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
</form>
</div>
<div class="other-container">
<div class="other">
<br><hr>
<h4>选择报价信息</h4><a class="btn btn-primary" onclick="showQuotationModal()"><i class="fa fa-plus"></i>&nbsp;选择材料</a>
<div class="col-sm-12 select-table table-striped">
<table id="addQuotationTable" style="white-space:nowrap"></table>
</div>
</div>
<div class="modal inmodal" id="qutQuotationModal"
role="dilog" aria-hidden="true">
<!-- 查询供应商报价-->
<div class="modal-dialog" style="width: 1000px;background-color: #FFFFFF">
<div class="modal-content" style="background-color: #FFFFFF">
<div class="modal-body">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="quotationFormId">
<div class="select-list">
<ul>
<li>
<label>报价编码:</label>
<input type="text" name="quotationCode"/>
</li>
<li>
<label>物料代码:</label>
<input type="text" name="materialCode"/>
</li>
<li>
<label>物料名称:</label>
<input type="text" name="materialName"/>
</li>
<li>
<label>加工商名称:</label>
<input type="text" name="converterName"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search('quotationFormId','quotationTable')"><i
class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('quotationFormId','quotationTable')"><i
class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="quotationTable" style="white-space:nowrap"></table>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<a class="btn btn-warning btn-rounded" onclick="addQuotationToTable()">确认添加</a>
<a class="btn btn-primary btn-rounded" onclick="closeQuotationModal()">关闭</a>
</div>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js"/>
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: bootstrap-table-editable-js"/>
<script th:inline="javascript">
var prefix = ctx + "outsource/outsourceOrderInfo";
var prefixMaterial = ctx + "outsource/outsourceOrderMaterial";
var prefixQutsourcingquotation = ctx + "system/qutsourcingquotation";
var measurementUnitDatas = [[${@dict.getType('sys_unit_class')}]];
var commonCurrencyDatas = [[${@dict.getType('sys_common_currency')}]];
var inventoryUnitDatas = [[${@dict.getType('sys_unit_class')}]];
var currentQuoteDatas = [[${@dict.getType('sys_whether')}]];
var confirmNoDatas = [[${@dict.getType('sys_whether')}]];
var auditNoDatas = [[${@dict.getType('sys_whether')}]];
var materialTypeDatas = [[${@dict.getType('ck_meterialt_type')}]];
var approveNoDatas = [[${@dict.getType('sys_whether')}]];
$("#form-outsourceOrderInfo-add").validate({
focusCleanup: true
});
function submitHandler() {
let getData=$('#addQuotationTable').bootstrapTable('getData', true)
if(getData.length > 0){
//确认添加选中的物料数据
confirmQuotation();
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-outsourceOrderInfo-add').serialize());
}
} else {
$.modal.alertWarning("未选择物料,请选择!")
}
}
$("input[name='deliveryTime']").datetimepicker({
format: "yyyy-mm-dd hh:ii:ss",
minView: "month",
autoclose: true,
todayBtn: true
});
$("input[name='deliveryTime']").datetimepicker("setDate", new Date())
$("input[name='billingTime']").datetimepicker({
format: "yyyy-mm-dd hh:ii:ss",
minView: "month",
autoclose: true,
todayBtn: true
});
$("input[name='billingTime']").datetimepicker("setDate", new Date())
//获取单号
$.ajax({
url: prefix + "/getId",
type: "post",
dateType: "json",
success: function (resp) {
if (resp.code === 0) {
$("input[name='outsourceOrderNumber']").val(resp.data);
} else {
$.modal.msgError("失败啦");
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
});
//供应商资料
$.ajax({
url: ctx + 'system/supplier/list',
type: 'post',
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
var supplierData = res.rows;
//alert(JSON.stringify(data));
for (let i in supplierData) {
// console.log(finishProductData[i].finishProductCode)
$("#form-outsourceOrderInfo-add select[name='supplierCode']").append("<option value='" + supplierData[i].supplierCode + "'>" + supplierData[i].supplierCode + "</option>");
$("#form-outsourceOrderInfo-add select[name='carrierCompany']").append("<option value='" + supplierData[i].supplierName + "'>" + supplierData[i].supplierName + "</option>");
}
$("#form-outsourceOrderInfo-add select[name='supplierCode']").change(function () {
var supplierCode = $(this).val();
for (let i=0;i<supplierData.length;i++) {
if (supplierData[i].supplierCode == supplierCode) {
$("#form-outsourceOrderInfo-add input[name='supplierName']").val(supplierData[i].supplierName)
$("#form-outsourceOrderInfo-add input[name='customerContact']").val(supplierData[i].customerContact)
$("#form-outsourceOrderInfo-add input[name='contactNumber']").val(supplierData[i].contactNumber)
$("#form-outsourceOrderInfo-add input[name='customerFax']").val(supplierData[i].customerFax)
$("#form-outsourceOrderInfo-add input[name='customerAddress']").val(supplierData[i].customerAddress)
let time = new Date()
let year = time.getFullYear()
let month = time.getMonth()+1
let day = time.getDate()
let hour = time.getHours()
let minute = time.getMinutes()
let second = time.getSeconds()
let millisecond = time.getMilliseconds()
String(month).length < 2 ? (month = "0" + month): month;
String(day).length < 2 ? (day = "0" + day): day;
String(minute).length < 2 ? (minute = "0" + minute): minute;
String(second).length < 2 ? (second = "0" + second): second;
$("#form-outsourceOrderInfo-add input[name='outsourceBatchNumber']").val(supplierCode+year+month+day+hour+minute+second+millisecond)
//承运公司
let supplierName = $("#form-outsourceOrderInfo-add input[name='supplierName']").val()
$("#form-outsourceOrderInfo-add select[name='carrierCompany']").val(supplierName).trigger("change")
}
}
})
} else {
$.modal.msgError(res.msg);
}
}
})
var changeProcedureId = 0
//工序信息
$.ajax({
url: ctx + 'system/procedure/list',
type: 'post',
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
var procedureData = res.rows;
let procedureCode1 = $("#form-outsourceOrderInfo-add select[name='procedureCode']");
let procedureName1 = $("#form-outsourceOrderInfo-add select[name='procedureName']");
//alert(JSON.stringify(data));
for (let i in procedureData) {
procedureCode1.append("<option value='" + procedureData[i].procedureCode + "'>" + procedureData[i].procedureCode + "</option>");
procedureName1.append("<option value='" + procedureData[i].procedureName + "'>" + procedureData[i].procedureName + "</option>");
}
procedureCode1.change(function () {
var procedureCode = procedureCode1.val();
for (let i=0;i<procedureData.length;i++) {
if (procedureData[i].procedureCode == procedureCode) {
changeProcedureId++;
if (changeProcedureId<2) {
procedureName1.val(procedureData[i].procedureName).trigger("change")
changeProcedureId = 0;
}
}
}
})
procedureName1.change(function () {
var procedureName = procedureName1.val();
for (let i=0;i<procedureData.length;i++) {
if (procedureData[i].procedureName == procedureName) {
changeProcedureId++;
if (changeProcedureId<2) {
procedureCode1.val(procedureData[i].procedureCode).trigger("change")
changeProcedureId = 0;
}
}
}
})
}
}
})
//仓库信息
$.ajax({
url: ctx + 'stock/stockInfo/list',
type: 'post',
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
var stockData = res.rows;
//alert(JSON.stringify(data));
for (let i in stockData) {
$("#form-outsourceOrderInfo-add select[name='issueStockNumber']").append("<option value='" + stockData[i].stockNO + "'>" + stockData[i].stockNO + "</option>");
$("#form-outsourceOrderInfo-add select[name='deliveryStockNumber']").append("<option value='" + stockData[i].stockNO + "'>" + stockData[i].stockNO + "</option>");
}
$("#form-outsourceOrderInfo-add select[name='issueStockNumber']").change(function () {
var issueStockNumber = $(this).val();
for (let i=0;i<stockData.length;i++) {
if (stockData[i].stockNO == issueStockNumber) {
$("#form-outsourceOrderInfo-add input[name='issueStockName']").val(stockData[i].stockname)
}
}
})
$("#form-outsourceOrderInfo-add select[name='deliveryStockNumber']").change(function () {
var deliveryStockNumber = $(this).val();
for (let i=0;i<stockData.length;i++) {
if (stockData[i].stockNO == deliveryStockNumber) {
$("#form-outsourceOrderInfo-add input[name='deliveryStockName']").val(stockData[i].stockname)
}
}
})
}
}
})
$(function () {
//显示报价信息
showQuotation();
//初始化报价表
$('#addQuotationTable').bootstrapTable({
pagination: true,
pageNumber: 1,
pageSize: 10,
showToggle: false, // 是否显示详细视图和列表视图的切换按钮
cardView: false, // 是否显示详细视图
detailView: false, // 是否显示父子表
contentType: "application/x-www-form-urlencoded",
smartDisplay: false, // 加了这个才显示每页显示的行数
showExport: false, // 是否显示导出按钮
clickToSelect: true,//点击行选中
paginationDetailHAlign: ' hiddenDetailInfo',
height: 250,
uniqueId: 'materialCode',
queryParams: function (params) {
//console.log("123");
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
// enterpriseCode: data[0].enterpriseCode
};
// console.log(data[0].enterpriseCode)
return curParams
},
columns: [
{
title: '操作',
align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeMaterialData(\'' + row.materialCode + '\')" ><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
},
{
field: 'outsourceOrderNumber',
title: '委外订单号',
visible: false
},
{
field: 'outsourceWorkNumber',
title: '工单号',
editable: {
type: 'text',
title: '工单号',
emptytext: '工单号',
validate: function (v) {
}
}
},
{
field: 'materialCode',
title: '物料代码'
},
{
field: 'materialName',
title: '物料名称'
},
{
field: 'specificationModel',
title: '规格型号'
},
{
field: 'materialType',
title: '物料类别',
formatter: function(value, row, index) {
return $.table.selectDictLabel(materialTypeDatas, value);
},
visible: false
},
{
field: 'inventoryUnit',
title: '单位',
editable: {
type: 'select',
title: '单位',
emptytext: '单位',
source: function() {
let result = [];
for (let i = 0;i<inventoryUnitDatas.length;i++) {
result.push({value: inventoryUnitDatas[i].dictValue,text: inventoryUnitDatas[i].dictLabel})
}
return result;
},
validate: function (value) {
}
}
},
{
field: 'quantity',
title: '数量',
editable: {
type: 'text',
title: '数量',
emptytext: '数量',
validate: function (v) {
if (isNaN(v)) return '数量必须是数字';
var ex = /^[1-9]\d*$/;
if (!ex.test(v)) return '数量必须是正整数';
}
}
},
{
field: 'processPrice',
title: '加工单价',
editable: {
type: 'text',
title: '加工单价',
emptytext: '加工单价',
validate: function (v) {
}
}
},
{
field: 'processFee',
title: '加工费',
editable: {
type: 'text',
title: '加工费',
emptytext: '加工费',
validate: function (value) {
}
},
formatter:function(value, row, index) {
let total = row.processPrice * row.quantity;
row.processFee = row.processPrice * row.quantity;
return total.toFixed(2);
}
},
{
field: 'deliveryDate',
title: '交期',
editable: {
type: 'date',
title: '交期',
emptytext: '交期',
clear: false,
placement: 'center',//位置
title: '请选择日期:',
validate: function (value) {
// var date = eval('new ' + eval(value).source)
// return date.format("yyyy-MM-dd");
}
}
},
{
field: 'description',
title: '说明',
editable: {
type: 'text',
title: '说明',
emptytext: '说明',
validate: function (value) {
}
}
}]
})
})
//显示弹窗
function showQuotationModal() {
if ($.validate.form()) {
$("#qutQuotationModal").modal("show");
} else {
$.modal.alertWarning("请填写必填项");
}
}
//关闭报价信息模态框
function closeQuotationModal() {
$("#qutQuotationModal").modal("hide");
}
//显示报价信息
function showQuotation() {
var options = {
id: 'quotationTable',
url: prefixQutsourcingquotation + "/list",
clickToSelect: true,
modalName: "委外报价",
columns: [{
checkbox: true
},
{
field: 'qutsourcingQuotationId',
title: '委外报价id',
visible: false
},
// {
// field: 'auditNo',
// title: '审核否',
// formatter: function (value, row, index) {
// // return $.table.selectDictLabel(auditNoDatas, value);
// var actions = [];
// if ($.table.selectDictLabel(auditNoDatas, value) == "<span class=''></span>") {
// actions.push('<a class="btn btn-primary btn-xs disabled">已审核</a> ');
// } else {
// actions.push('<a class="btn btn-danger btn-xs disabled">未审核</a> ');
// }
// return actions.join('');
// }
// },
// {
// field: 'confirmNo',
// title: '确认否',
// formatter: function (value, row, index) {
// // return $.table.selectDictLabel(confirmNoDatas, value);
//
// var actions = [];
// if ($.table.selectDictLabel(confirmNoDatas, value) == "<span class=''></span>") {
// actions.push('<a class="btn btn-primary btn-xs disabled">已确认</a> ');
// } else {
// actions.push('<a class="btn btn-danger btn-xs disabled">未确认</a> ');
// }
// return actions.join('');
// }
// },
// {
// field: 'approveNo',
// title: '核准否',
// formatter: function (value, row, index) {
// // return $.table.selectDictLabel(confirmNoDatas, value);
//
// var actions = [];
// if ($.table.selectDictLabel(approveNoDatas, value) == "<span class=''></span>") {
// actions.push('<a class="btn btn-primary btn-xs disabled">已核准</a> ');
// } else {
// actions.push('<a class="btn btn-danger btn-xs disabled">未核准</a> ');
// }
// return actions.join('');
// }
// },
{
field: 'quotationCode',
title: '报价编码'
},
{
field: 'materialCode',
title: '物料代码'
},
{
field: 'materialName',
title: '物料名称'
},
{
field: 'specificationModel',
title: '规格型号'
},
{
field: 'typeMachine',
title: '成品机种'
},
{
field: 'measurementUnit',
title: '计量单位',
formatter: function (value, row, index) {
return $.table.selectDictLabel(measurementUnitDatas, value);
}
},
{
field: 'commonCurrency',
title: '报价币别',
formatter: function (value, row, index) {
return $.table.selectDictLabel(commonCurrencyDatas, value);
}
},
{
field: 'processPrice',
title: '加工单价'
},
{
field: 'processingProcedureName',
title: '加工工序名称'
},
{
field: 'processingProcedureCode',
title: '加工工序编号'
},
{
field: 'converterCode',
title: '加工商编号'
},
{
field: 'converterName',
title: '加工商名称'
},
{
field: 'pricingDate',
title: '报价日期'
},
{
field: 'inventoryUnit',
title: '库存单位',
formatter: function (value, row, index) {
return $.table.selectDictLabel(inventoryUnitDatas, value);
}
},
{
field: 'taxRate',
title: '交税税率'
},
{
field: 'relationalFormula',
title: '每采购单位对应多少库存单位'
},
{
field: 'quotationExplain',
title: '备注'
},
{
field: 'currentQuote',
title: '是否为当前报价',
formatter: function (value, row, index) {
return $.table.selectDictLabel(currentQuoteDatas, value);
}
},
{
field: 'registrant',
title: '登记人'
},
{
field: 'confirmName',
title: '确认人'
},
{
field: 'confirmTime',
title: '确认时间'
},
{
field: 'auditName',
title: '审核人'
},
{
field: 'auditTime',
title: '审核时间'
},
{
field: 'approveName',
title: '核准人'
},
{
field: 'approveTime',
title: '核准时间'
},
{
field: 'standbyOne',
title: '备用一',
visible: false
},
{
field: 'standbyTwo',
title: '备用二',
visible: false
},
{
field: 'firstAddTime',
title: '录入时间',
formatter: function (value, row, index) {
if (value == null) {
return " ";
} else {
return value;
}
}
},
{
field: 'updateInfoTime',
title: '上次修改时间',
formatter: function (value, row, index) {
if (value == null) {
return " ";
} else {
var vArr = value.split(',')
return vArr[0];
}
}
}
]
};
$.table.init(options);
}
//表中添加选中的物料信息
function addQuotationToTable() {
var data = $("#quotationTable").bootstrapTable("getSelections");
var count = $('#addQuotationTable').bootstrapTable('getData').length;
var outsourceOrderNumber = $("input[name='outsourceOrderNumber']").val();
// console.log(data);
// console.log(count);
for (i = 0; i < data.length; i++) {
let material = $('#addQuotationTable').bootstrapTable('getRowByUniqueId', data[i].materialCode);
// console.log(material)
// console.log(data[i].materialCode)
if (material != null) {
alert(material.materialName + "已存在,不可重复添加!");
continue;
}
$("#addQuotationTable").bootstrapTable('insertRow', {
index: count + i,
row: {
outsourceOrderNumber: outsourceOrderNumber,
outsourceWorkNumber: '',
materialCode: data[i].materialCode,
materialName: data[i].materialName,
specificationModel: data[i].specificationModel,
materialType: '',
inventoryUnit: data[i].inventoryUnit,
processPrice: data[i].processPrice,
quantity: '',
processFee: '',
deliveryDate: '',
description: ''
}
});
}
$("#quotationTable").bootstrapTable("uncheckAll");
closeQuotationModal();
}
//确认添加选中的物料数据
function confirmQuotation() {
$("#addQuotationTable").bootstrapTable('refresh');
let data = $('#addQuotationTable').bootstrapTable('getData', true);
// let getData=$('#addProductTable').bootstrapTable('getData', true)
// console.log(data)
$.ajax({
url: prefixMaterial + '/addEditSave',
type: "POST",
data: {
data: JSON.stringify(data)
},
dataType: "json",
success: function (resp) {
// console.log(data)
console.log(resp)
},
})
}
//添加表格内删除物料信息
function removeMaterialData(materialCode){
var ids = [];
ids.push(materialCode);
$('#addQuotationTable').bootstrapTable("remove",{
field:'materialCode',
values:ids
})
$("#addQuotationTable").bootstrapTable('refresh');
}
</script>
</body>
</html>

900
ruoyi-admin/src/main/resources/templates/outsource/outsourceOrderInfo/edit.html

@ -1,900 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改委外加工订单')" />
<th:block th:include="include :: datetimepicker-css" />
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet">
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet">
<th:block th:include="include :: bootstrap-editable-css"/>
<style>
.other-container {
width: 90%;
height: 200px;
margin: auto;
}
.other {
margin-top: 20px;
}
h4 {
display: inline-block;
margin-right: 20px;
}
.modal-body{
height: 550px;
}
iframe{
width: 100%;
height: 500px;
frameborder: 0;
border: 0;
display: inline-block;
}
</style>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-outsourceOrderInfo-edit" th:object="${outsourceOrderInfo}">
<input name="outsourceOrderId" th:field="*{outsourceOrderId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">委外订单单号:</label>
<div class="col-sm-8">
<input name="outsourceOrderNumber" th:field="*{outsourceOrderNumber}" class="form-control" type="text" required readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">委外加工批号:</label>
<div class="col-sm-8">
<input name="outsourceBatchNumber" th:field="*{outsourceBatchNumber}" class="form-control" type="text" required readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">厂商编号:</label>
<div class="col-sm-8">
<!-- <input name="supplierCode" th:field="*{supplierCode}" class="form-control" type="text">-->
<select name="supplierCode" th:field="*{supplierCode}" class="form-control m-b" required disabled>
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">厂商名称:</label>
<div class="col-sm-8">
<input name="supplierName" th:field="*{supplierName}" class="form-control" type="text" required readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">主联系人:</label>
<div class="col-sm-8">
<input name="customerContact" th:field="*{customerContact}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系电话:</label>
<div class="col-sm-8">
<input name="contactNumber" th:field="*{contactNumber}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">传真:</label>
<div class="col-sm-8">
<input name="customerFax" th:field="*{customerFax}" 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="customerAddress" th:field="*{customerAddress}" 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="deliveryTime" th:field="*{deliveryTime}" 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="billingTime" th:field="*{billingTime}" 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="procedureCode" th:field="*{procedureCode}" class="form-control m-b">
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">加工工序名称:</label>
<div class="col-sm-8">
<select name="procedureName" class="form-control m-b">
<option value="">所有</option>
</select>
<!-- <input name="procedureName" th:field="*{procedureName}" 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="issueStockNumber" th:field="*{issueStockNumber}" class="form-control m-b">
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">发出仓库名称:</label>
<div class="col-sm-8">
<!-- <select name="issueStockName" class="form-control m-b">-->
<!-- <option value="">所有</option>-->
<!-- </select>-->
<input name="issueStockName" th:field="*{issueStockName}" 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="deliveryStockNumber" th:field="*{deliveryStockNumber}" class="form-control m-b">
<option value="">所有</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">交货仓库名称:</label>
<div class="col-sm-8">
<!-- <select name="deliveryStockName" class="form-control m-b">-->
<!-- <option value="">所有</option>-->
<!-- </select>-->
<input name="deliveryStockName" th:field="*{deliveryStockName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注内容:</label>
<div class="col-sm-8">
<textarea name="remarks" class="form-control">[[*{remarks}]]</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">承运公司:</label>
<div class="col-sm-8">
<!-- <input name="carrierCompany" th:field="*{carrierCompany}" class="form-control" type="text">-->
<select name="carrierCompany" class="form-control m-b">
<option value="">所有</option>
</select>
</div>
</div>
</form>
</div>
<div class="other-container">
<div class="other">
<br><hr>
<h4>选择报价信息</h4>
<a class="btn btn-primary" onclick="showQuotationModal()"><i class="fa fa-plus"></i>&nbsp;选择材料</a>
<a class="btn btn-danger" onclick="removeMaterial()" ><i class="fa fa-remove"></i>&nbsp;删除材料</a>
<div class="col-sm-12 select-table table-striped">
<table id="addQuotationTable" style="white-space:nowrap"></table>
</div>
</div>
<div class="modal inmodal" id="qutQuotationModal"
role="dilog" aria-hidden="true">
<!-- 查询供应商报价-->
<div class="modal-dialog" style="width: 1000px;background-color: #FFFFFF">
<div class="modal-content" style="background-color: #FFFFFF">
<div class="modal-body">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="quotationFormId">
<div class="select-list">
<ul>
<li>
<label>报价编码:</label>
<input type="text" name="quotationCode"/>
</li>
<li>
<label>物料代码:</label>
<input type="text" name="materialCode"/>
</li>
<li>
<label>物料名称:</label>
<input type="text" name="materialName"/>
</li>
<li>
<label>加工商名称:</label>
<input type="text" name="converterName"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search('quotationFormId','quotationTable')"><i
class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('quotationFormId','quotationTable')"><i
class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="quotationTable" style="white-space:nowrap"></table>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<a class="btn btn-warning btn-rounded" onclick="addQuotationToTable()">确认添加</a>
<a class="btn btn-primary btn-rounded" onclick="closeQuotationModal()">关闭</a>
</div>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: bootstrap-table-editable-js"/>
<script th:inline="javascript">
var getData = [[${outsourceOrderInfo}]]
var prefix = ctx + "outsource/outsourceOrderInfo";
var prefixMaterial = ctx + "outsource/outsourceOrderMaterial";
var prefixQutsourcingquotation = ctx + "system/qutsourcingquotation";
var measurementUnitDatas = [[${@dict.getType('sys_unit_class')}]];
var commonCurrencyDatas = [[${@dict.getType('sys_common_currency')}]];
var inventoryUnitDatas = [[${@dict.getType('sys_unit_class')}]];
var currentQuoteDatas = [[${@dict.getType('sys_whether')}]];
var confirmNoDatas = [[${@dict.getType('sys_whether')}]];
var auditNoDatas = [[${@dict.getType('sys_whether')}]];
var materialTypeDatas = [[${@dict.getType('ck_meterialt_type')}]];
var approveNoDatas = [[${@dict.getType('sys_whether')}]];
$("#form-outsourceOrderInfo-edit").validate({
focusCleanup: true
});
function submitHandler() {
let getData=$('#addQuotationTable').bootstrapTable('getData', true)
if(getData.length > 0){
//确认添加选中的物料数据
confirmQuotation();
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-outsourceOrderInfo-edit').serialize());
}
} else {
$.modal.alertWarning("未选择物料,请选择!")
}
}
$("input[name='deliveryTime']").datetimepicker({
format: "yyyy-mm-dd hh:ii:ss",
minView: "month",
autoclose: true,
todayBtn: true
});
$("input[name='billingTime']").datetimepicker({
format: "yyyy-mm-dd hh:ii:ss",
minView: "month",
autoclose: true,
todayBtn: true
});
//供应商资料
$.ajax({
url: ctx + 'system/supplier/list',
type: 'post',
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
var supplierData = res.rows;
//alert(JSON.stringify(data));
for (let i in supplierData) {
// console.log(finishProductData[i].finishProductCode)
$("#form-outsourceOrderInfo-edit select[name='supplierCode']").append("<option value='" + supplierData[i].supplierCode + "'>" + supplierData[i].supplierCode + "</option>");
$("#form-outsourceOrderInfo-edit select[name='carrierCompany']").append("<option value='" + supplierData[i].supplierName + "'>" + supplierData[i].supplierName + "</option>");
}
$("#form-outsourceOrderInfo-edit select[name='supplierCode']").val(getData.supplierCode).trigger("change")
$("#form-outsourceOrderInfo-edit select[name='carrierCompany']").val(getData.carrierCompany).trigger("change")
$("#form-outsourceOrderInfo-edit select[name='supplierCode']").change(function () {
var supplierCode = $(this).val();
for (let i=0;i<supplierData.length;i++) {
if (supplierData[i].supplierCode == supplierCode) {
$("#form-outsourceOrderInfo-edit input[name='supplierName']").val(supplierData[i].supplierName)
$("#form-outsourceOrderInfo-edit input[name='customerContact']").val(supplierData[i].customerContact)
$("#form-outsourceOrderInfo-edit input[name='contactNumber']").val(supplierData[i].contactNumber)
$("#form-outsourceOrderInfo-edit input[name='customerFax']").val(supplierData[i].customerFax)
$("#form-outsourceOrderInfo-edit input[name='customerAddress']").val(supplierData[i].customerAddress)
//承运公司
let supplierName = $("#form-outsourceOrderInfo-add input[name='supplierName']").val()
$("#form-outsourceOrderInfo-add select[name='carrierCompany']").val(supplierName).trigger("change")
}
}
})
} else {
$.modal.msgError(res.msg);
}
}
})
var changeProcedureId = 0
//工序信息
$.ajax({
url: ctx + 'system/procedure/list',
type: 'post',
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
var procedureData = res.rows;
let procedureCode1 = $("#form-outsourceOrderInfo-edit select[name='procedureCode']");
let procedureName1 = $("#form-outsourceOrderInfo-edit select[name='procedureName']");
//alert(JSON.stringify(data));
for (let i in procedureData) {
procedureCode1.append("<option value='" + procedureData[i].procedureCode + "'>" + procedureData[i].procedureCode + "</option>");
procedureName1.append("<option value='" + procedureData[i].procedureName + "'>" + procedureData[i].procedureName + "</option>");
}
procedureCode1.val(getData.procedureCode).trigger("change")
procedureName1.val(getData.procedureName).trigger("change")
procedureCode1.change(function () {
var procedureCode = procedureCode1.val();
for (let i=0;i<procedureData.length;i++) {
if (procedureData[i].procedureCode == procedureCode) {
changeProcedureId++;
if (changeProcedureId<2) {
procedureName1.val(procedureData[i].procedureName).trigger("change")
changeProcedureId = 0;
}
}
}
})
procedureName1.change(function () {
var procedureName = procedureName1.val();
for (let i=0;i<procedureData.length;i++) {
if (procedureData[i].procedureName == procedureName) {
changeProcedureId++;
if (changeProcedureId<2) {
procedureCode1.val(procedureData[i].procedureCode).trigger("change")
changeProcedureId = 0;
}
}
}
})
}
}
})
//仓库信息
$.ajax({
url: ctx + 'stock/stockInfo/list',
type: 'post',
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
var stockData = res.rows;
//alert(JSON.stringify(data));
for (let i in stockData) {
$("#form-outsourceOrderInfo-edit select[name='issueStockNumber']").append("<option value='" + stockData[i].stockNO + "'>" + stockData[i].stockNO + "</option>");
$("#form-outsourceOrderInfo-edit select[name='deliveryStockNumber']").append("<option value='" + stockData[i].stockNO + "'>" + stockData[i].stockNO + "</option>");
}
$("#form-outsourceOrderInfo-edit select[name='issueStockNumber']").val(getData.issueStockNumber).trigger("change")
$("#form-outsourceOrderInfo-edit select[name='deliveryStockNumber']").val(getData.deliveryStockNumber).trigger("change")
$("#form-outsourceOrderInfo-edit select[name='issueStockNumber']").change(function () {
var issueStockNumber = $(this).val();
for (let i=0;i<stockData.length;i++) {
if (stockData[i].stockNO == issueStockNumber) {
$("#form-outsourceOrderInfo-edit input[name='issueStockName']").val(stockData[i].stockname)
}
}
})
$("#form-outsourceOrderInfo-edit select[name='deliveryStockNumber']").change(function () {
var deliveryStockNumber = $(this).val();
for (let i=0;i<stockData.length;i++) {
if (stockData[i].stockNO == deliveryStockNumber) {
$("#form-outsourceOrderInfo-edit input[name='deliveryStockName']").val(stockData[i].stockname)
}
}
})
}
}
})
$(function () {
//显示报价信息
showQuotation();
//初始化报价表
$('#addQuotationTable').bootstrapTable({
url: prefixMaterial + '/list',
method: "post",
pagination: true,
pageNumber: 1,
pageSize: 10,
contentType: "application/x-www-form-urlencoded",
showToggle: false, // 是否显示详细视图和列表视图的切换按钮
cardView: false, // 是否显示详细视图
detailView: false, // 是否显示父子表
smartDisplay: false, // 加了这个才显示每页显示的行数
showExport: false, // 是否显示导出按钮
clickToSelect: true,//点击行选中
paginationDetailHAlign: ' hiddenDetailInfo',
height: 250,
uniqueId: 'materialCode',
queryParams: function (params) {
//console.log("123");
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
outsourceOrderNumber: getData.outsourceOrderNumber
// enterpriseCode: data[0].enterpriseCode
};
// console.log(data[0].enterpriseCode)
return curParams
},
columns: [
{
checkbox: true
},
{
field: 'outsourceOrderNumber',
title: '委外订单号',
visible: false
},
{
field: 'outsourceWorkNumber',
title: '工单号',
editable: {
type: 'text',
title: '工单号',
emptytext: '工单号',
validate: function (v) {
}
}
},
{
field: 'materialCode',
title: '物料代码'
},
{
field: 'materialName',
title: '物料名称'
},
{
field: 'specificationModel',
title: '规格型号'
},
{
field: 'materialType',
title: '物料类别',
formatter: function(value, row, index) {
return $.table.selectDictLabel(materialTypeDatas, value);
},
visible: false
},
{
field: 'inventoryUnit',
title: '单位',
editable: {
type: 'select',
title: '单位',
emptytext: '单位',
source: function() {
let result = [];
for (let i = 0;i<inventoryUnitDatas.length;i++) {
result.push({value: inventoryUnitDatas[i].dictValue,text: inventoryUnitDatas[i].dictLabel})
}
return result;
},
validate: function (value) {
}
}
},
{
field: 'quantity',
title: '数量',
editable: {
type: 'text',
title: '数量',
emptytext: '数量',
validate: function (v) {
if (isNaN(v)) return '数量必须是数字';
var ex = /^[1-9]\d*$/;
if (!ex.test(v)) return '数量必须是正整数';
}
}
},
{
field: 'processPrice',
title: '加工单价',
editable: {
type: 'text',
title: '加工单价',
emptytext: '加工单价',
validate: function (v) {
}
}
},
{
field: 'processFee',
title: '加工费',
editable: {
type: 'text',
title: '加工费',
emptytext: '加工费',
validate: function (value) {
}
},
formatter:function(value, row, index) {
let total = row.processPrice * row.quantity;
row.processFee = row.processPrice * row.quantity;
return total.toFixed(2);
}
},
{
field: 'deliveryDate',
title: '交期',
editable: {
type: 'date',
title: '交期',
emptytext: '交期',
clear: false,
placement: 'center',//位置
title: '请选择日期:',
validate: function (value) {
// var date = eval('new ' + eval(value).source)
// return date.format("yyyy-MM-dd");
}
}
},
{
field: 'description',
title: '说明',
editable: {
type: 'text',
title: '说明',
emptytext: '说明',
validate: function (value) {
}
}
}]
})
})
//显示弹窗
function showQuotationModal() {
if ($.validate.form()) {
$("#qutQuotationModal").modal("show");
} else {
$.modal.alertWarning("请填写必填项");
}
}
//关闭报价信息模态框
function closeQuotationModal() {
$("#qutQuotationModal").modal("hide");
}
//显示报价信息
function showQuotation() {
var options = {
id: 'quotationTable',
url: prefixQutsourcingquotation + "/list",
clickToSelect: true,
modalName: "委外报价",
columns: [{
checkbox: true
},
{
field: 'qutsourcingQuotationId',
title: '委外报价id',
visible: false
},
// {
// field: 'auditNo',
// title: '审核否',
// formatter: function (value, row, index) {
// // return $.table.selectDictLabel(auditNoDatas, value);
// var actions = [];
// if ($.table.selectDictLabel(auditNoDatas, value) == "<span class=''></span>") {
// actions.push('<a class="btn btn-primary btn-xs disabled">已审核</a> ');
// } else {
// actions.push('<a class="btn btn-danger btn-xs disabled">未审核</a> ');
// }
// return actions.join('');
// }
// },
// {
// field: 'confirmNo',
// title: '确认否',
// formatter: function (value, row, index) {
// // return $.table.selectDictLabel(confirmNoDatas, value);
//
// var actions = [];
// if ($.table.selectDictLabel(confirmNoDatas, value) == "<span class=''></span>") {
// actions.push('<a class="btn btn-primary btn-xs disabled">已确认</a> ');
// } else {
// actions.push('<a class="btn btn-danger btn-xs disabled">未确认</a> ');
// }
// return actions.join('');
// }
// },
// {
// field: 'approveNo',
// title: '核准否',
// formatter: function (value, row, index) {
// // return $.table.selectDictLabel(confirmNoDatas, value);
//
// var actions = [];
// if ($.table.selectDictLabel(approveNoDatas, value) == "<span class=''></span>") {
// actions.push('<a class="btn btn-primary btn-xs disabled">已核准</a> ');
// } else {
// actions.push('<a class="btn btn-danger btn-xs disabled">未核准</a> ');
// }
// return actions.join('');
// }
// },
{
field: 'quotationCode',
title: '报价编码'
},
{
field: 'materialCode',
title: '物料代码'
},
{
field: 'materialName',
title: '物料名称'
},
{
field: 'specificationModel',
title: '规格型号'
},
{
field: 'typeMachine',
title: '成品机种'
},
{
field: 'measurementUnit',
title: '计量单位',
formatter: function (value, row, index) {
return $.table.selectDictLabel(measurementUnitDatas, value);
}
},
{
field: 'commonCurrency',
title: '报价币别',
formatter: function (value, row, index) {
return $.table.selectDictLabel(commonCurrencyDatas, value);
}
},
{
field: 'processPrice',
title: '加工单价'
},
{
field: 'processingProcedureName',
title: '加工工序名称'
},
{
field: 'processingProcedureCode',
title: '加工工序编号'
},
{
field: 'converterCode',
title: '加工商编号'
},
{
field: 'converterName',
title: '加工商名称'
},
{
field: 'pricingDate',
title: '报价日期'
},
{
field: 'inventoryUnit',
title: '库存单位',
formatter: function (value, row, index) {
return $.table.selectDictLabel(inventoryUnitDatas, value);
}
},
{
field: 'taxRate',
title: '交税税率'
},
{
field: 'relationalFormula',
title: '每采购单位对应多少库存单位'
},
{
field: 'quotationExplain',
title: '备注'
},
{
field: 'currentQuote',
title: '是否为当前报价',
formatter: function (value, row, index) {
return $.table.selectDictLabel(currentQuoteDatas, value);
}
},
{
field: 'registrant',
title: '登记人'
},
{
field: 'confirmName',
title: '确认人'
},
{
field: 'confirmTime',
title: '确认时间'
},
{
field: 'auditName',
title: '审核人'
},
{
field: 'auditTime',
title: '审核时间'
},
{
field: 'approveName',
title: '核准人'
},
{
field: 'approveTime',
title: '核准时间'
},
{
field: 'standbyOne',
title: '备用一',
visible: false
},
{
field: 'standbyTwo',
title: '备用二',
visible: false
},
{
field: 'firstAddTime',
title: '录入时间',
formatter: function (value, row, index) {
if (value == null) {
return " ";
} else {
return value;
}
}
},
{
field: 'updateInfoTime',
title: '上次修改时间',
formatter: function (value, row, index) {
if (value == null) {
return " ";
} else {
var vArr = value.split(',')
return vArr[0];
}
}
}
]
};
$.table.init(options);
}
//表中添加选中的物料信息
function addQuotationToTable() {
var data = $("#quotationTable").bootstrapTable("getSelections");
var count = $('#addQuotationTable').bootstrapTable('getData').length;
var outsourceOrderNumber = $("input[name='outsourceOrderNumber']").val();
// console.log(data);
// console.log(count);
for (i = 0; i < data.length; i++) {
let material = $('#addQuotationTable').bootstrapTable('getRowByUniqueId', data[i].materialCode);
// console.log(material)
// console.log(data[i].materialCode)
if (material != null) {
alert(material.materialName + "已存在,不可重复添加!");
continue;
}
$("#addQuotationTable").bootstrapTable('insertRow', {
index: count + i,
row: {
outsourceOrderNumber: outsourceOrderNumber,
outsourceWorkNumber: '',
materialCode: data[i].materialCode,
materialName: data[i].materialName,
specificationModel: data[i].specificationModel,
materialType: '',
inventoryUnit: data[i].inventoryUnit,
processPrice: data[i].processPrice,
quantity: '',
processFee: '',
deliveryDate: '',
description: ''
}
});
}
$("#quotationTable").bootstrapTable("uncheckAll");
closeQuotationModal();
}
//确认添加选中的物料数据
function confirmQuotation() {
$("#addQuotationTable").bootstrapTable('refresh');
let data = $('#addQuotationTable').bootstrapTable('getData', true);
// let getData=$('#addProductTable').bootstrapTable('getData', true)
// console.log(data)
$.ajax({
url: prefixMaterial + '/addEditSave',
type: "POST",
data: {
data: JSON.stringify(data)
},
dataType: "json",
success: function (resp) {
// console.log(data)
console.log(resp)
},
})
}
// 批量删除物料
function removeMaterial() {
var addQuotationTableData = $("#addQuotationTable").bootstrapTable("getSelections");
var ids = [];
var materialCodes=[];
for (let i = 0;i < addQuotationTableData.length;i++) {
ids.push(addQuotationTableData[i].outsourceOrderMaterialId)
materialCodes.push(addQuotationTableData[i].materialCode)
}
// console.log(ids)
if (addQuotationTableData.length > 0) {
$.modal.confirm("是否确认要删除选中的产品?", function (){
$.ajax({
url: prefixMaterial + "/removeMaterial",
type: "POST",
data: {
ids: JSON.stringify(ids)
},
success: function (res) {
// console.log(ids)
// console.log(res)
$.modal.msgSuccess("删除成功")
// $("#addProductTable").bootstrapTable('refreshOptions', {pageNumber: 1}); // pageNumber:1, 指定页码为第1页
// $("#addProductTable").bootstrapTable('refresh');
$("#addQuotationTable").bootstrapTable ('remove', { field: 'materialCode', values: materialCodes })
}
})
})
} else {
alert("请选择需要删除的数据")
}
}
</script>
</body>
</html>

602
ruoyi-admin/src/main/resources/templates/outsource/outsourceOrderInfo/outsourceOrderInfo.html

@ -1,602 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('委外加工订单列表')" />
<script type="text/javascript" th:src="@{/js/axios.min.js}"></script>
<th:block th:include="include :: datetimepicker-css"/>
</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="outsourceOrderNumber"/>
</li>
<li>
<label>委外加工批号:</label>
<input type="text" name="outsourceBatchNumber"/>
</li>
<li>
<label>厂商编号:</label>
<input type="text" name="supplierCode"/>
</li>
<li>
<label>厂商名称:</label>
<input type="text" name="supplierName"/>
</li>
<li class="select-time">
<label>交货日期:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始日期" name="params[beginDeliveryTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束日期" name="params[endDeliveryTime]"/>
</li>
<li>
<label>加工工序名称:</label>
<select name="procedureName">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</option>
</select>
</li>
<li>
<label>确认否:</label>
<!-- <input type="text" name="confirmFlag"/>-->
<select name="confirmFlag" th:with="type=${@dict.getType('sys_whether')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>结案否:</label>
<!-- <input type="text" name="closeCaseFlag"/>-->
<select name="closeCaseFlag" th:with="type=${@dict.getType('sys_whether')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="outsource:outsourceOrderInfo:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="outsource:outsourceOrderInfo:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="removeSelectedOrder()" shiro:hasPermission="outsource:outsourceOrderInfo:remove">
<i class="fa fa-remove"></i> 删除
</a>
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="outsource:outsourceOrderInfo:export">-->
<!-- <i class="fa fa-download"></i> 导出-->
<!-- </a>-->
<a class="btn btn-warning" onclick="exportSelectedOrder()" shiro:hasPermission="outsource:outsourceOrderInfo:export">
<i class="fa fa-download"></i> 导出
</a>
<a class="btn btn-primary" onclick="reviewConfirm()" shiro:hasPermission="outsource:outsourceOrderInfo:confirm">
<i class="fa fa-hand-grab-o"></i> 确认
</a>
<a class="btn btn-primary" onclick="reviewCloseCase()" shiro:hasPermission="outsource:outsourceOrderInfo:closeCase">
<i class="fa fa-hand-grab-o"></i> 结案
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" style="white-space: nowrap"></table>
</div>
</div>
</div>
<!--订单确认-->
<div class="modal fade" id="confirmModel">
<div class="modal-dialog">
<div class="modal-content message_align">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">×</span></button>
<h4 class="modal-title">确认信息</h4>
</div>
<div class="modal-body" style="height: 180px">
<form id="form-confirm-edit">
<div class="form-group" style="display: none">
<label class="col-sm-3 control-label is-required">委外加工订单id:</label>
<div class="col-sm-8">
<input name="outsourceOrderId" class="form-control" type="text" required
readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">确认否:</label>
<div class="col-sm-8">
<select id="confirmFlag" name="confirmFlag" class="form-control" th:with="type=${@dict.getType('sys_whether')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">确认日期:</label>
<div class="col-sm-8">
<div class="input-group date">
<input id="confirmTime" name="confirmTime" class="form-control" placeholder="yyyy-mm-dd hh:ii:ss" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">确认人:</label>
<div class="col-sm-8">
<input id="confirmPerson" name="confirmPerson" class="form-control" type="text">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button type="button" onclick="confirmSubmit()" class="btn btn-success" data-dismiss="modal">确定</button>
</div>
</div>
</div>
</div>
<!--订单结案-->
<div class="modal fade" id="closeCaseModal">
<div class="modal-dialog">
<div class="modal-content message_align">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">×</span></button>
<h4 class="modal-title">结案信息</h4>
</div>
<div class="modal-body" style="height: 180px">
<form id="form-closeCase-edit">
<div class="form-group" style="display: none">
<label class="col-sm-3 control-label is-required">委外加工订单id:</label>
<div class="col-sm-8">
<input name="outsourceOrderId" class="form-control" type="text" required
readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label ">结案否:</label>
<div class="col-sm-8">
<select id="closeCaseFlag" name="closeCaseFlag" class="form-control"
th:with="type=${@dict.getType('sys_whether')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label ">结案时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input id="closeCaseTime" name="closeCaseTime" class="form-control"
placeholder="yyyy-mm-dd hh:ii:ss" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label ">结案人:</label>
<div class="col-sm-8">
<!-- <input id="auditName" name="auditName" class="form-control" type="text" th:value="${@permission.getPrincipalProperty('userName')}">-->
<input id="closeCasePerson" name="closeCasePerson" class="form-control" type="text">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button type="button" onclick="closeCaseSubmit()" class="btn btn-success" data-dismiss="modal">确定</button>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js"/>
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('outsource:outsourceOrderInfo:edit')}]];
var removeFlag = [[${@permission.hasPermi('outsource:outsourceOrderInfo:remove')}]];
var closeCaseNoDatas = [[${@dict.getType('sys_whether')}]];
var confirmNoDatas = [[${@dict.getType('sys_whether')}]];
var commonCurrencyDatas = [[${@dict.getType('sys_common_currency')}]];
var prefix = ctx + "outsource/outsourceOrderInfo";
var prefixDetail = ctx + "outsource/outsourceOrderMaterial"
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
// detailView: true,
clickToSelect: true,
modalName: "委外加工订单",
columns: [{
checkbox: true
},
{
field: 'outsourceOrderId',
title: '委外订单id',
visible: false
},
{
field: 'confirmFlag',
title: '确认否',
formatter: function(value, row, index) {
// return $.table.selectDictLabel(confirmNoDatas, value);
var actions = [];
if ($.table.selectDictLabel(confirmNoDatas, value) == "<span class=''></span>") {
actions.push('<a class="btn btn-primary btn-xs disabled">已确认</a> ');
} else {
actions.push('<a class="btn btn-danger btn-xs disabled">未确认</a> ');
}
return actions.join('');
}
},
{
field: 'closeCaseFlag',
title: '结案否',
formatter: function(value, row, index) {
// return $.table.selectDictLabel(closeCaseNoDatas, value);
var actions = [];
if ($.table.selectDictLabel(closeCaseNoDatas, value) == "<span class=''></span>") {
actions.push('<a class="btn btn-primary btn-xs disabled">已结案</a> ');
} else {
actions.push('<a class="btn btn-danger btn-xs disabled">未结案</a> ');
}
return actions.join('');
}
},
{
field: 'outsourceOrderNumber',
title: '委外订单单号'
},
{
field: 'outsourceBatchNumber',
title: '委外加工批号'
},
{
field: 'supplierCode',
title: '厂商编号'
},
{
field: 'supplierName',
title: '厂商名称'
},
{
field: 'customerContact',
title: '主联系人'
},
{
field: 'contactNumber',
title: '联系电话'
},
{
field: 'customerFax',
title: '传真'
},
{
field: 'customerAddress',
title: '企业地址'
},
{
field: 'deliveryTime',
title: '交货时间'
},
{
field: 'procedureCode',
title: '加工工序编号'
},
{
field: 'procedureName',
title: '加工工序名称'
},
{
field: 'issueStockNumber',
title: '发出仓库编号'
},
{
field: 'issueStockName',
title: '发出仓库名称'
},
{
field: 'deliveryStockNumber',
title: '交货仓库编号'
},
{
field: 'deliveryStockName',
title: '交货仓库名称'
},
{
field: 'billingTime',
title: '开单时间'
},
{
field: 'remarks',
title: '备注内容'
},
{
field: 'carrierCompany',
title: '承运公司'
},
{
field: 'confirmPerson',
title: '确认人'
},
{
field: 'confirmTime',
title: '确认时间'
},
{
field: 'closeCasePerson',
title: '结案人'
},
{
field: 'closeCaseTime',
title: '结案时间'
},
{
field: 'firstAddTime',
title: '录入时间',
formatter: function (value, row, index) {
if (value == null) {
return " ";
} else {
return value;
}
}
},
{
field: 'updateInfoTime',
title: '上次修改时间',
formatter: function (value, row, index) {
if (value == null) {
return " ";
} else {
var vArr = value.split(',')
return vArr[0];
}
}
}],
onExpandRow: function (index, row, $detail) {
initDetail(index,row,$detail);
}
};
$.table.init(options);
});
//初始化子表格(循环)
initDetail = function (index, row, $detail) {
var outsourceOrderNumber = row.outsourceOrderNumber;
// console.log(finishProductCode)
var detail_table = $detail.html('<table class="table-container"></table>').find('table');
$(detail_table).bootstrapTable({
url: prefixDetail + '/list',
contentType: "application/x-www-form-urlencoded",
method: 'post',
queryParams: function (params) {
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
outsourceOrderNumber: outsourceOrderNumber
};
// console.log(data[0].enterpriseCode)
return curParams
},
toolbar: false, //工具按钮用哪个容器
striped: true, //是否显示行间隔色
cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
pagination: false, //是否显示分页(*)
sortable: false, //是否启用排序
pageNumber: 1, //初始化加载第一页,默认第一页
pageSize: 10, //每页的记录行数(*)
pageList: [10, 25, 50, 100], //可供选择的每页的行数(*)
search: false, //是否显示表格搜索,此搜索是客户端搜索,不会进服务端,所以,个人感觉意义不大
strictSearch: true,
showColumns: false, //是否显示所有的列
showRefresh: false, //是否显示刷新按钮
clickToSelect: true, //是否启用点击选中行
showToggle: false, //是否显示详细视图和列表视图的切换按钮
cardView: false, //是否显示详细视图
columns: [
{
field: 'materialCode',
title: '物料代码'
},
{
field: 'materialName',
title: '物料名称'
},
{
field: 'specificationModel',
title: '规格型号'
},
{
field: 'materialType',
title: '物料类别',
formatter: function (value, row, index) {
return $.table.selectDictLabel(materialTypeDatas, value);
},
visible: false
},
{
field: 'inventoryUnit',
title: '单位'
},
{
field: 'quantity',
title: '数量'
},
{
field: 'processPrice',
title: '加工单价'
},
{
field: 'processFee',
title: '加工费'
},
{
field: 'deliveryDate',
title: '交期'
},
{
field: 'description',
title: '说明'
}],
//无线循环取子表,直到子表里面没有记录
onExpandRow: function (index, row, $Subdetail) {
initDetail(index, row, $Subdetail);
}
})
}
//删除
function removeSelectedOrder() {
var orderData = $("#bootstrap-table").bootstrapTable("getSelections");
if (orderData.length === 1) {
$.modal.confirm("是否删除此订单?", function () {
$.ajax({
url: prefix + '/removeSelectedOrder',
type: 'post',
data: {
orderData : JSON.stringify(orderData)
},
success: function (res) {
// console.log(res)
$("#bootstrap-table").bootstrapTable("refresh");
$.modal.msgSuccess("删除成功!")
},
error: function (res) {
$.modal.msgError(res.error())
}
})
})
} else {
$.modal.msgWarning("请选择一条数据")
}
}
//导出
function exportSelectedOrder() {
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
var data = $("#bootstrap-table").bootstrapTable("getSelections")
if (rows.length !== 1) {
$.modal.alert("请选择一条记录");
return;
} else {
$.modal.confirm("是否确认要导出本条订单?", function (){
axios({
url: prefix + '/exportSelected/'+data[0].outsourceOrderId,
method: 'POST',
responseType: 'blob'
}).then(response => {
// console.log(response)
const URL = window.URL.createObjectURL(response.data)
// 创建隐藏<a>标签进行下载
const tempLink = document.createElement('a')
tempLink.style.display = 'none'
tempLink.href = URL
let time = new Date().toLocaleString()
tempLink.setAttribute('download', time + "委外加工订单.xlsx")
if (typeof tempLink.download === 'undefined') {
tempLink.setAttribute('target', '_blank')
}
document.body.appendChild(tempLink)
tempLink.click()
document.body.removeChild(tempLink)// 移除dom元素
window.URL.revokeObjectURL(URL)//释放内存
})
});
}
}
// 订单确认
function reviewConfirm(){
let data = $("#bootstrap-table").bootstrapTable("getSelections");
let userName = [[${@permission.getPrincipalProperty('userName')}]];
if (data.length ===1) {
$("#form-confirm-edit input[name='outsourceOrderId']").val(data[0].outsourceOrderId)
$("#confirmFlag").val(data[0].confirmFlag).trigger("change")
$("#confirmPerson").val(userName)
$("#confirmTime").datetimepicker("setDate", new Date());
$("#confirmModel").modal("show");
}else {
$.modal.alert("请选择一条数据");
}
}
// 订单确认
function confirmSubmit(){
$.ajax({
url: prefix + "/edit",
type: "post",
resultType: "json",
data: $('#form-confirm-edit').serialize(),
success: function (resp) {
// console.log(resp)
$("#confirmModel").modal("hide");
$("#bootstrap-table").bootstrapTable('refresh');
$.modal.msgSuccess("操作成功!")
},
error: function () {
$.modal.msgError("出错了!");
}
});
}
// 订单结案
function reviewCloseCase(){
let data = $("#bootstrap-table").bootstrapTable("getSelections");
let userName = [[${@permission.getPrincipalProperty('userName')}]];
if (data.length ===1) {
$("#form-closeCase-edit input[name='outsourceOrderId']").val(data[0].outsourceOrderId)
$("#closeCaseFlag").val(data[0].closeCaseFlag).trigger("change")
$("#closeCasePerson").val(userName)
$("#closeCaseTime").datetimepicker("setDate", new Date());
$("#closeCaseModal").modal("show");
}else {
$.modal.alert("请选择一条数据");
}
}
// 订单结案
function closeCaseSubmit(){
$.ajax({
url: prefix + "/edit",
type: "post",
resultType: "json",
data: $('#form-closeCase-edit').serialize(),
success: function (resp) {
// console.log(resp)
$("#closeCaseModal").modal("hide");
$("#bootstrap-table").bootstrapTable('refresh');
$.modal.msgSuccess("操作成功!")
},
error: function () {
$.modal.msgError("出错了!");
}
});
}
</script>
</body>
</html>

104
ruoyi-admin/src/main/resources/templates/outsource/outsourceOrderMaterial/add.html

@ -1,104 +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-outsourceOrderMaterial-add">
<div class="form-group">
<label class="col-sm-3 control-label">委外加工订单单号:</label>
<div class="col-sm-8">
<input name="outsourceOrderNumber" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料代码:</label>
<div class="col-sm-8">
<input name="materialCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料名称:</label>
<div class="col-sm-8">
<input name="materialName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">规格型号:</label>
<div class="col-sm-8">
<input name="specificationModel" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料类别:</label>
<div class="col-sm-8">
<select name="materialType" class="form-control m-b" th:with="type=${@dict.getType('ck_meterialt_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="inventoryUnit" 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="quantity" 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="processPrice" 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="processFee" 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="deliveryDate" 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="description" 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 + "outsource/outsourceOrderMaterial"
$("#form-outsourceOrderMaterial-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-outsourceOrderMaterial-add').serialize());
}
}
$("input[name='deliveryDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

105
ruoyi-admin/src/main/resources/templates/outsource/outsourceOrderMaterial/edit.html

@ -1,105 +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-outsourceOrderMaterial-edit" th:object="${outsourceOrderMaterial}">
<input name="outsourceOrderMaterialId" th:field="*{outsourceOrderMaterialId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">委外加工订单单号:</label>
<div class="col-sm-8">
<input name="outsourceOrderNumber" th:field="*{outsourceOrderNumber}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料代码:</label>
<div class="col-sm-8">
<input name="materialCode" th:field="*{materialCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料名称:</label>
<div class="col-sm-8">
<input name="materialName" th:field="*{materialName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">规格型号:</label>
<div class="col-sm-8">
<input name="specificationModel" th:field="*{specificationModel}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料类别:</label>
<div class="col-sm-8">
<select name="materialType" class="form-control m-b" th:with="type=${@dict.getType('ck_meterialt_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{materialType}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">单位:</label>
<div class="col-sm-8">
<input name="inventoryUnit" th:field="*{inventoryUnit}" 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="quantity" th:field="*{quantity}" 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="processPrice" th:field="*{processPrice}" 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="processFee" th:field="*{processFee}" 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="deliveryDate" th:value="${#dates.format(outsourceOrderMaterial.deliveryDate, '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="description" th:field="*{description}" 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 + "outsource/outsourceOrderMaterial";
$("#form-outsourceOrderMaterial-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-outsourceOrderMaterial-edit').serialize());
}
}
$("input[name='deliveryDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

151
ruoyi-admin/src/main/resources/templates/outsource/outsourceOrderMaterial/outsourceOrderMaterial.html

@ -1,151 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('委外加工订单物料列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>委外加工订单单号:</label>
<input type="text" name="outsourceOrderNumber"/>
</li>
<li>
<label>物料代码:</label>
<input type="text" name="materialCode"/>
</li>
<li>
<label>物料名称:</label>
<input type="text" name="materialName"/>
</li>
<li>
<label>物料类别:</label>
<select name="materialType" th:with="type=${@dict.getType('ck_meterialt_type')}">
<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[beginDeliveryDate]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endDeliveryDate]"/>
</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="outsource:outsourceOrderMaterial:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="outsource:outsourceOrderMaterial:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="outsource:outsourceOrderMaterial:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="outsource:outsourceOrderMaterial: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('outsource:outsourceOrderMaterial:edit')}]];
var removeFlag = [[${@permission.hasPermi('outsource:outsourceOrderMaterial:remove')}]];
var materialTypeDatas = [[${@dict.getType('ck_meterialt_type')}]];
var prefix = ctx + "outsource/outsourceOrderMaterial";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "委外加工订单物料",
columns: [{
checkbox: true
},
{
field: 'outsourceOrderMaterialId',
title: '委外加工物料id',
visible: false
},
{
field: 'outsourceOrderNumber',
title: '委外加工订单单号'
},
{
field: 'materialCode',
title: '物料代码'
},
{
field: 'materialName',
title: '物料名称'
},
{
field: 'specificationModel',
title: '规格型号'
},
{
field: 'materialType',
title: '物料类别',
formatter: function(value, row, index) {
return $.table.selectDictLabel(materialTypeDatas, value);
}
},
{
field: 'inventoryUnit',
title: '单位'
},
{
field: 'quantity',
title: '数量'
},
{
field: 'processPrice',
title: '加工单价'
},
{
field: 'processFee',
title: '加工费'
},
{
field: 'deliveryDate',
title: '交期'
},
{
field: 'description',
title: '说明'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.outsourceOrderMaterialId + '\')"><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.outsourceOrderMaterialId + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

67
ruoyi-admin/src/main/resources/templates/outsource/process/add.html

@ -1,67 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增委外工序列表')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-process-add">
<div class="form-group">
<label class="col-sm-6 control-label">委外工序ID:</label>
<div class="col-sm-6">
<input name="outsourceProcessId" class="form-control" type="text" required >
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label is-required">委外工序编号:</label>
<div class="col-sm-6">
<input name="outsourceProcessCode" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label is-required">委外工序名称:</label>
<div class="col-sm-6">
<input name="outsourceProcessName" class="form-control m-b" required />
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">备注:</label>
<div class="col-sm-6">
<input name="remark" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "outsource/process"
$("#form-process-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-process-add').serialize());
}
}
$(function(){
$.ajax({
url: prefix + "/getId",
type: "post",
dateType: "json",
success: function (resp) {
if (resp.code === 0) {
$("input[name='outsourceProcessId']").val(resp.data);
} else {
$.modal.msgError("失败啦");
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
});
})
</script>
</body>
</html>

44
ruoyi-admin/src/main/resources/templates/outsource/process/edit.html

@ -1,44 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改委外工序列表')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-process-edit" th:object="${outsourceProcess}">
<input name="outsourceProcessId" th:field="*{outsourceProcessId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">委外工序编号:</label>
<div class="col-sm-8">
<input name="outsourceProcessCode" th:field="*{outsourceProcessCode}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">委外工序名称:</label>
<div class="col-sm-8">
<input name="outsourceProcessName" th:field="*{outsourceProcessCode}" class="form-control m-b" required />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<input name="remark" th:field="*{remark}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "outsource/process";
$("#form-process-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-process-edit').serialize());
}
}
</script>
</body>
</html>

136
ruoyi-admin/src/main/resources/templates/outsource/process/process.html

@ -1,136 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('委外工序列表列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>委外工序ID:</label>
<input type="text" name="outsourceProcessId"/>
</li>
<li>
<label>委外工序编号:</label>
<input type="text" name="outsourceProcessCode"/>
</li>
<li>
<label>委外工序名称:</label>
<select name="outsourceProcessName">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</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="outsource:process:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="outsource:process:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="outsource:process:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="outsource:process: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('outsource:process:edit')}]];
var removeFlag = [[${@permission.hasPermi('outsource:process:remove')}]];
var cancelFlag = [[${@permission.hasPermi('outsource:process:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('outsource:process:restore')}]];
var prefix = ctx + "outsource/process";
$(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
},
{
field: 'outsourceProcessId',
title: '委外工序ID',
visible: false
},
{
field: 'outsourceProcessCode',
title: '委外工序编号'
},
{
field: 'outsourceProcessName',
title: '委外工序名称'
},
{
field: 'remark',
title: '备注'
},
{
field: 'createBy',
title: '录入人'
},
{
field: 'createTime',
title: '录入时间'
},
{
field: 'updateBy',
title: '更新人'
},
{
field: 'updateTime',
title: '最后更新时间'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.outsourceProcessId + '\')"><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.outsourceProcessId + '\')"><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