Browse Source

[feat]基础资料模块:添加采购报价物料信息表数据,建立采购报价物料信息表数据表,添加、编辑、删除功能

dev
zhangsiqi 6 months ago
parent
commit
2e1162f9bb
  1. 80
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java
  2. 151
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysPurchaseQuoteChildController.java
  3. 292
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysPurchaseQuoteChild.java
  4. 77
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysPurchaseQuoteChildMapper.java
  5. 75
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysPurchaseQuoteChildService.java
  6. 126
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysPurchaseQuoteChildServiceImpl.java
  7. 112
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/add.html
  8. 148
      ruoyi-admin/src/main/resources/templates/system/purchaseQuoteChild/add.html
  9. 143
      ruoyi-admin/src/main/resources/templates/system/purchaseQuoteChild/edit.html
  10. 228
      ruoyi-admin/src/main/resources/templates/system/purchaseQuoteChild/purchaseQuoteChild.html

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

@ -1,8 +1,21 @@
package com.ruoyi.purchase.service.impl;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import com.ruoyi.common.service.ICommonService;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.process.general.service.IProcessService;
import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper;
import com.ruoyi.system.domain.SysAttach;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.service.ISysAttachFileService;
import com.ruoyi.system.service.ISysAttachService;
import com.ruoyi.system.service.ISysRoleService;
import org.activiti.engine.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.purchase.mapper.PurchaseQuoteMapper;
@ -22,6 +35,29 @@ public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService
@Autowired
private PurchaseQuoteMapper purchaseQuoteMapper;
@Autowired
private ISysAttachService attachService;
@Autowired
private ISysAttachFileService attachFileService;
@Autowired
private ICommonService commonService;
@Autowired
private SysUserMapper userMapper;
@Autowired
private TaskService taskService;
@Autowired
private BizTodoItemMapper todoItemMapper;
@Autowired
private IProcessService processService;
@Autowired
private ISysRoleService roleService;
/**
* 查询采购报价单
*
@ -58,7 +94,24 @@ public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService
String loginName = ShiroUtils.getLoginName();
purchaseQuote.setCreateBy(loginName);
purchaseQuote.setCreateTime(DateUtils.getNowDate());
return purchaseQuoteMapper.insertPurchaseQuote(purchaseQuote);
int result = purchaseQuoteMapper.insertPurchaseQuote(purchaseQuote);
Long id = purchaseQuote.getPurchaseQuoteId();
String fileIdStr = purchaseQuote.getFileIdStr();
if(StringUtils.isNotBlank(fileIdStr)){
// 保存附件关联
SysAttach attach = new SysAttach();
attach.setCreateBy(loginName);
attach.setCreateTime(DateUtils.getNowDate());
attach.setSourceType("PurchaseQuote");
attach.setSourceSubType("photo");
attach.setRelId(id);
attachService.insertSysAttach(attach);
// 更新附件与文件关联
Long attachId = attach.getId();
List<String> fileIdList = Arrays.asList(fileIdStr.split(";"));
attachFileService.updateAttachIdByIdList(attachId,fileIdList);
}
return result;
}
/**
@ -73,7 +126,32 @@ public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService
String loginName = ShiroUtils.getLoginName();
purchaseQuote.setUpdateBy(loginName);
purchaseQuote.setUpdateTime(DateUtils.getNowDate());
Long id = purchaseQuote.getPurchaseQuoteId();
String fileIdStr = purchaseQuote.getFileIdStr();
Long photoAttachId = purchaseQuote.getPhotoAttachId();
String removeFileIdStr = purchaseQuote.getRemoveFileIdStr();
if(StringUtils.isNotBlank(removeFileIdStr)){
List<String> removeFileIdList = Arrays.asList(removeFileIdStr.split(";"));
commonService.deleteByIds(removeFileIdList);
}
if(StringUtils.isNotBlank(fileIdStr)) {
List<String> fileIdList = Arrays.asList(fileIdStr.split(";"));
if (photoAttachId == null) {
SysAttach attach = new SysAttach();
attach.setCreateBy(loginName);
attach.setCreateTime(DateUtils.getNowDate());
attach.setSourceType("PurchaseQuote");
attach.setSourceSubType("photo");
attach.setRelId(id);
attachService.insertSysAttach(attach);
photoAttachId = attach.getId();
}
attachFileService.updateAttachIdByIdList(photoAttachId, fileIdList);
}
return purchaseQuoteMapper.updatePurchaseQuote(purchaseQuote);
}
/**

151
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysPurchaseQuoteChildController.java

@ -0,0 +1,151 @@
package com.ruoyi.system.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.system.domain.SysPurchaseQuoteChild;
import com.ruoyi.system.service.ISysPurchaseQuoteChildService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 采购报价单物料信息Controller
*
* @author zhang
* @date 2024-05-15
*/
@Controller
@RequestMapping("/system/purchaseQuoteChild")
public class SysPurchaseQuoteChildController extends BaseController
{
private String prefix = "system/purchaseQuoteChild";
@Autowired
private ISysPurchaseQuoteChildService sysPurchaseQuoteChildService;
@RequiresPermissions("system:purchaseQuoteChild:view")
@GetMapping()
public String purchaseQuoteChild()
{
return prefix + "/purchaseQuoteChild";
}
/**
* 查询采购报价单物料信息列表
*/
@RequiresPermissions("system:purchaseQuoteChild:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(SysPurchaseQuoteChild sysPurchaseQuoteChild)
{
startPage();
List<SysPurchaseQuoteChild> list = sysPurchaseQuoteChildService.selectSysPurchaseQuoteChildList(sysPurchaseQuoteChild);
return getDataTable(list);
}
/**
* 导出采购报价单物料信息列表
*/
@RequiresPermissions("system:purchaseQuoteChild:export")
@Log(title = "采购报价单物料信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysPurchaseQuoteChild sysPurchaseQuoteChild)
{
List<SysPurchaseQuoteChild> list = sysPurchaseQuoteChildService.selectSysPurchaseQuoteChildList(sysPurchaseQuoteChild);
ExcelUtil<SysPurchaseQuoteChild> util = new ExcelUtil<SysPurchaseQuoteChild>(SysPurchaseQuoteChild.class);
return util.exportExcel(list, "采购报价单物料信息数据");
}
/**
* 新增采购报价单物料信息
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存采购报价单物料信息
*/
@RequiresPermissions("system:purchaseQuoteChild:add")
@Log(title = "采购报价单物料信息", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(SysPurchaseQuoteChild sysPurchaseQuoteChild)
{
return toAjax(sysPurchaseQuoteChildService.insertSysPurchaseQuoteChild(sysPurchaseQuoteChild));
}
/**
* 修改采购报价单物料信息
*/
@GetMapping("/edit/{purchaseQuoteChildId}")
public String edit(@PathVariable("purchaseQuoteChildId") Long purchaseQuoteChildId, ModelMap mmap)
{
SysPurchaseQuoteChild sysPurchaseQuoteChild = sysPurchaseQuoteChildService.selectSysPurchaseQuoteChildById(purchaseQuoteChildId);
mmap.put("sysPurchaseQuoteChild", sysPurchaseQuoteChild);
return prefix + "/edit";
}
/**
* 修改保存采购报价单物料信息
*/
@RequiresPermissions("system:purchaseQuoteChild:edit")
@Log(title = "采购报价单物料信息", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysPurchaseQuoteChild sysPurchaseQuoteChild)
{
return toAjax(sysPurchaseQuoteChildService.updateSysPurchaseQuoteChild(sysPurchaseQuoteChild));
}
/**
* 删除采购报价单物料信息
*/
@RequiresPermissions("system:purchaseQuoteChild:remove")
@Log(title = "采购报价单物料信息", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(sysPurchaseQuoteChildService.deleteSysPurchaseQuoteChildByIds(ids));
}
/**
* 作废采购报价单物料信息
*/
@RequiresPermissions("system:purchaseQuoteChild:cancel")
@Log(title = "采购报价单物料信息", businessType = BusinessType.CANCEL)
@GetMapping( "/cancel/{id}")
@ResponseBody
public AjaxResult cancel(@PathVariable("id") Long id){
return toAjax(sysPurchaseQuoteChildService.cancelSysPurchaseQuoteChildById(id));
}
/**
* 恢复采购报价单物料信息
*/
@RequiresPermissions("system:purchaseQuoteChild:restore")
@Log(title = "采购报价单物料信息", businessType = BusinessType.RESTORE)
@GetMapping( "/restore/{id}")
@ResponseBody
public AjaxResult restore(@PathVariable("id")Long id)
{
return toAjax(sysPurchaseQuoteChildService.restoreSysPurchaseQuoteChildById(id));
}
}

292
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysPurchaseQuoteChild.java

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

77
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysPurchaseQuoteChildMapper.java

@ -0,0 +1,77 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.SysPurchaseQuoteChild;
/**
* 采购报价单物料信息Mapper接口
*
* @author zhang
* @date 2024-05-15
*/
public interface SysPurchaseQuoteChildMapper
{
/**
* 查询采购报价单物料信息
*
* @param purchaseQuoteChildId 采购报价单物料信息ID
* @return 采购报价单物料信息
*/
public SysPurchaseQuoteChild selectSysPurchaseQuoteChildById(Long purchaseQuoteChildId);
/**
* 查询采购报价单物料信息列表
*
* @param sysPurchaseQuoteChild 采购报价单物料信息
* @return 采购报价单物料信息集合
*/
public List<SysPurchaseQuoteChild> selectSysPurchaseQuoteChildList(SysPurchaseQuoteChild sysPurchaseQuoteChild);
/**
* 新增采购报价单物料信息
*
* @param sysPurchaseQuoteChild 采购报价单物料信息
* @return 结果
*/
public int insertSysPurchaseQuoteChild(SysPurchaseQuoteChild sysPurchaseQuoteChild);
/**
* 修改采购报价单物料信息
*
* @param sysPurchaseQuoteChild 采购报价单物料信息
* @return 结果
*/
public int updateSysPurchaseQuoteChild(SysPurchaseQuoteChild sysPurchaseQuoteChild);
/**
* 删除采购报价单物料信息
*
* @param purchaseQuoteChildId 采购报价单物料信息ID
* @return 结果
*/
public int deleteSysPurchaseQuoteChildById(Long purchaseQuoteChildId);
/**
* 批量删除采购报价单物料信息
*
* @param purchaseQuoteChildIds 需要删除的数据ID
* @return 结果
*/
public int deleteSysPurchaseQuoteChildByIds(String[] purchaseQuoteChildIds);
/**
* 作废采购报价单物料信息
*
* @param purchaseQuoteChildId 采购报价单物料信息ID
* @return 结果
*/
public int cancelSysPurchaseQuoteChildById(Long purchaseQuoteChildId);
/**
* 恢复采购报价单物料信息
*
* @param purchaseQuoteChildId 采购报价单物料信息ID
* @return 结果
*/
public int restoreSysPurchaseQuoteChildById(Long purchaseQuoteChildId);
}

75
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysPurchaseQuoteChildService.java

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

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

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

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

@ -2,12 +2,14 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增采购报价单')" />
<th:block th:include="include :: select2-css" />
<th:block th:include="include :: datetimepicker-css" />
<link th:href="@{/ajax/libs/element-ui/element-ui.css}" rel="stylesheet"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-purchaseQuote-add">
<div class="form-group">
<div class="form-group" >
<label class="col-sm-3 control-label is-required">采购报价单号:</label>
<div class="col-sm-8">
<input name="purchaseQuoteCode" class="form-control" type="text" required>
@ -16,7 +18,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">供应商ID:</label>
<div class="col-sm-8">
<select name="supplierCode" class="form-control">
<select name="supplierQuoteCode" class="form-control">
</select>
</div>
</div>
@ -42,12 +44,33 @@
</div>
<div class="form-group">
<label class="col-sm-3 control-label">附件:</label>
<div class="col-sm-8">
<el-upload
:action="fileUploadUrl"
:on-success="uploadSuccess"
:on-preview="handlePictureCardPreview"
:on-remove="uploadRemove"
:file-list="fileList"
:limit="5"
list-type="picture"
accept=".jpg,.png"
multiple>
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,第一张图片为主图</div>
</el-upload>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
</div>
<input id="fileIdStr" type="text" name="fileIdStr" hidden>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">税率:</label>
<div class="col-sm-8">
<div class="input-group">
<input name="rmbTax" id="rmbTax_add" class="form-control" placeholder="13" />
<input name="taxRate" id="taxRate" class="form-control" placeholder="13" />
<span class="input-group-addon">%</span>
</div>
</div>
@ -70,8 +93,77 @@
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<th:block th:include="include :: datetimepicker-js" />
<script th:src="@{/ajax/libs/vue/vue.js}"></script>
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
<script th:inline="javascript">
var prefix = ctx + "purchase/purchaseQuote"
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var userName = [[${@permission.getPrincipalProperty('userName')}]];
var prefix = ctx + "purchase/purchaseQuote";
new Vue({
el: '#app',
data: function() {
return {
fileList: [],
fileUploadUrl: ctx + "common/uploadSingleFile",
fileDeleteUrl: ctx + "common/deleteFile",
fileIdList:[],
dialogImageUrl: '',
dialogVisible: false
}
},
methods: {
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
},
uploadSuccess(response, file, fileList) {
console.log(response);
if(response.code == web_status.SUCCESS){
var attachFileId = response.data.id;
file.attachFileId = attachFileId;
this.fileIdList.push(attachFileId);
$("#fileIdStr").val(this.fileIdList.join(";"));
$.modal.msgSuccess("上传成功");
}else{
$.modal.alertError(response.msg);
}
},
uploadRemove(file, fileList) {
console.log(file, fileList);
var attachFileId = file.attachFileId;
$.ajax({
type: "get",
url: this.fileDeleteUrl,
data: {id:attachFileId},
cache: false,
async: false, // 设置成同步
dataType: 'json',
success: function(result) {
if (result.code == web_status.SUCCESS) {
var index = this.fileIdList.indexOf(attachFileId);
if(index!=-1){
this.fileIdList.splice(index,1);
$("#fileIdStr").val(this.fileIdList.join(";"));
}
$.modal.msgSuccess("删除附件成功。");
} else {
$.modal.alertError(result.msg);
}
},
error: function(error) {
$.modal.alertError("删除附件失败。");
}
});
},
}
})
$("#form-purchaseQuote-add").validate({focusCleanup: true});
$(function() {
var options = {
@ -187,10 +279,10 @@
//获取供应商
function selectSupplierCode(){
$.ajax({
url: 'erp/supplier/getSupplier',
url: ctx + 'system/supplier/getSupplier',
type: "post",
dataType: "json",
success: function (data) {
success: function (res) {
if (res.rows.length > 0) {
var usertData = res.rows;
//alert(JSON.stringify(data));
@ -208,10 +300,10 @@
function selectSupplierName(){
$.ajax({
url: 'erp/supplier/getSupplier',
url: ctx + 'system/supplier/getSupplier',
type: "post",
dataType: "json",
success: function (data) {
success: function (res) {
if (res.rows.length > 0) {
var usertData = res.rows;
//alert(JSON.stringify(data));

148
ruoyi-admin/src/main/resources/templates/system/purchaseQuoteChild/add.html

@ -0,0 +1,148 @@
<!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-purchaseQuoteChild-add">
<div class="form-group">
<label class="col-sm-3 control-label">关联报价编号字段:</label>
<div class="col-sm-8">
<input name="purchaseQuoteCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料表中的id:</label>
<div class="col-sm-8">
<input name="materialId" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料表中的编号:</label>
<div class="col-sm-8">
<input name="materialCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的名称:</label>
<div class="col-sm-8">
<input name="materialName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的类型:</label>
<div class="col-sm-8">
<select name="materialType" class="form-control m-b">
<option value="">所有</option>
</select>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的加工方式:</label>
<div class="col-sm-8">
<input name="processMethod" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的品牌:</label>
<div class="col-sm-8">
<input name="brand" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的图片:</label>
<div class="col-sm-8">
<input name="photoUrl" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的描述:</label>
<div class="col-sm-8">
<input name="describe" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">国内税率:</label>
<div class="col-sm-8">
<input name="taxRate" 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="usdRate" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的数量:</label>
<div class="col-sm-8">
<input name="materialNum" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的对外报价:</label>
<div class="col-sm-8">
<input name="materialSole" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的不含税单价(RMB):</label>
<div class="col-sm-8">
<input name="materialRmb" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的含税单价(RMB):</label>
<div class="col-sm-8">
<input name="materialNormb" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="remark" class="form-control"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">删除状态:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('useStatus')}">
<input type="radio" th:id="${'useStatus_' + dict.dictCode}" name="useStatus" th:value="${dict.dictValue}" th:checked="${dict.default}">
<label th:for="${'useStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">审核状态:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('auditStatus')}">
<input type="radio" th:id="${'auditStatus_' + dict.dictCode}" name="auditStatus" th:value="${dict.dictValue}" th:checked="${dict.default}">
<label th:for="${'auditStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">删除标志:</label>
<div class="col-sm-8">
<input name="delFlag" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/purchaseQuoteChild"
$("#form-purchaseQuoteChild-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-purchaseQuoteChild-add').serialize());
}
}
</script>
</body>
</html>

143
ruoyi-admin/src/main/resources/templates/system/purchaseQuoteChild/edit.html

@ -0,0 +1,143 @@
<!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-purchaseQuoteChild-edit" th:object="${sysPurchaseQuoteChild}">
<input name="purchaseQuoteChildId" th:field="*{purchaseQuoteChildId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">关联报价编号字段:</label>
<div class="col-sm-8">
<input name="purchaseQuoteCode" th:field="*{purchaseQuoteCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料表中的id:</label>
<div class="col-sm-8">
<input name="materialId" th:field="*{materialId}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料表中的编号:</label>
<div class="col-sm-8">
<input name="materialCode" th:field="*{materialCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的名称:</label>
<div class="col-sm-8">
<input name="materialName" th:field="*{materialName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的类型:</label>
<div class="col-sm-8">
<select name="materialType" class="form-control m-b">
<option value="">所有</option>
</select>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的加工方式:</label>
<div class="col-sm-8">
<input name="processMethod" th:field="*{processMethod}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的品牌:</label>
<div class="col-sm-8">
<input name="brand" th:field="*{brand}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的图片:</label>
<div class="col-sm-8">
<input name="photoUrl" th:field="*{photoUrl}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的描述:</label>
<div class="col-sm-8">
<input name="describe" th:field="*{describe}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">国内税率:</label>
<div class="col-sm-8">
<input name="taxRate" th:field="*{taxRate}" 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="usdRate" th:field="*{usdRate}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的数量:</label>
<div class="col-sm-8">
<input name="materialNum" th:field="*{materialNum}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的对外报价:</label>
<div class="col-sm-8">
<input name="materialSole" th:field="*{materialSole}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的不含税单价(RMB):</label>
<div class="col-sm-8">
<input name="materialRmb" th:field="*{materialRmb}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料的含税单价(RMB):</label>
<div class="col-sm-8">
<input name="materialNormb" th:field="*{materialNormb}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="remark" class="form-control">[[*{remark}]]</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">删除状态:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('useStatus')}">
<input type="radio" th:id="${'useStatus_' + dict.dictCode}" name="useStatus" th:value="${dict.dictValue}" th:field="*{useStatus}">
<label th:for="${'useStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">审核状态:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('auditStatus')}">
<input type="radio" th:id="${'auditStatus_' + dict.dictCode}" name="auditStatus" th:value="${dict.dictValue}" th:field="*{auditStatus}">
<label th:for="${'auditStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/purchaseQuoteChild";
$("#form-purchaseQuoteChild-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-purchaseQuoteChild-edit').serialize());
}
}
</script>
</body>
</html>

228
ruoyi-admin/src/main/resources/templates/system/purchaseQuoteChild/purchaseQuoteChild.html

@ -0,0 +1,228 @@
<!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="purchaseQuoteCode"/>
</li>
<li>
<label>物料表中的id:</label>
<input type="text" name="materialId"/>
</li>
<li>
<label>物料表中的编号:</label>
<input type="text" name="materialCode"/>
</li>
<li>
<label>物料的名称:</label>
<input type="text" name="materialName"/>
</li>
<li>
<label>物料的类型:</label>
<select name="materialType">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</option>
</select>
</li>
<li>
<label>物料的加工方式:</label>
<input type="text" name="processMethod"/>
</li>
<li>
<label>物料的品牌:</label>
<input type="text" name="brand"/>
</li>
<li>
<label>物料的图片:</label>
<input type="text" name="photoUrl"/>
</li>
<li>
<label>物料的描述:</label>
<input type="text" name="describe"/>
</li>
<li>
<label>物料的数量:</label>
<input type="text" name="materialNum"/>
</li>
<li>
<label>物料的对外报价:</label>
<input type="text" name="materialSole"/>
</li>
<li>
<label>物料的不含税单价(RMB):</label>
<input type="text" name="materialRmb"/>
</li>
<li>
<label>物料的含税单价(RMB):</label>
<input type="text" name="materialNormb"/>
</li>
<li>
<label>删除状态:</label>
<select name="useStatus" th:with="type=${@dict.getType('useStatus')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>审核状态:</label>
<select name="auditStatus" th:with="type=${@dict.getType('auditStatus')}">
<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="system:purchaseQuoteChild:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:purchaseQuoteChild:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:purchaseQuoteChild:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:purchaseQuoteChild: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('system:purchaseQuoteChild:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:purchaseQuoteChild:remove')}]];
var cancelFlag = [[${@permission.hasPermi('system:purchaseQuoteChild:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('system:purchaseQuoteChild:restore')}]];
var useStatusDatas = [[${@dict.getType('useStatus')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var prefix = ctx + "system/purchaseQuoteChild";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
cancelUrl: prefix + "/cancel/{id}",
restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export",
modalName: "采购报价单物料信息",
columns: [{
checkbox: true
},
{
title: '采购报价单物料索引',
field: 'purchaseQuoteChildId',
visible: false
},
{
title: '关联报价编号字段',
field: 'purchaseQuoteCode',
},
{
title: '物料表中的id',
field: 'materialId',
},
{
title: '物料表中的编号',
field: 'materialCode',
},
{
title: '物料的名称',
field: 'materialName',
},
{
title: '物料的类型',
field: 'materialType',
},
{
title: '物料的加工方式',
field: 'processMethod',
},
{
title: '物料的品牌',
field: 'brand',
},
{
title: '物料的图片',
field: 'photoUrl',
},
{
title: '物料的描述',
field: 'describe',
},
{
title: '物料的数量',
field: 'materialNum',
},
{
title: '物料的对外报价',
field: 'materialSole',
},
{
title: '物料的不含税单价(RMB)',
field: 'materialRmb',
},
{
title: '物料的含税单价(RMB)',
field: 'materialNormb',
},
{
title: '备注',
field: 'remark',
},
{
title: '删除状态',
field: 'useStatus',
formatter: function(value, row, index) {
return $.table.selectDictLabel(useStatusDatas, value);
}
},
{
title: '审核状态',
field: 'auditStatus',
formatter: function(value, row, index) {
return $.table.selectDictLabel(auditStatusDatas, value);
}
},
{
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.purchaseQuoteChildId + '\')"><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.purchaseQuoteChildId + '\')"><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