liuxiaoxu
7 months ago
9 changed files with 1211 additions and 0 deletions
@ -0,0 +1,151 @@ |
|||
package com.ruoyi.purchase.controller; |
|||
|
|||
import java.util.List; |
|||
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.ui.ModelMap; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.ResponseBody; |
|||
import com.ruoyi.common.annotation.Log; |
|||
import com.ruoyi.common.enums.BusinessType; |
|||
import com.ruoyi.purchase.domain.PurchaseQuote; |
|||
import com.ruoyi.purchase.service.IPurchaseQuoteService; |
|||
import com.ruoyi.common.core.controller.BaseController; |
|||
import com.ruoyi.common.core.domain.AjaxResult; |
|||
import com.ruoyi.common.utils.poi.ExcelUtil; |
|||
import com.ruoyi.common.core.page.TableDataInfo; |
|||
|
|||
/** |
|||
* 采购报价单Controller |
|||
* |
|||
* @author 刘晓旭 |
|||
* @date 2024-04-15 |
|||
*/ |
|||
@Controller |
|||
@RequestMapping("/purchase/purchaseQuote") |
|||
public class PurchaseQuoteController extends BaseController |
|||
{ |
|||
private String prefix = "purchase/purchaseQuote"; |
|||
|
|||
@Autowired |
|||
private IPurchaseQuoteService purchaseQuoteService; |
|||
|
|||
@RequiresPermissions("purchase:purchaseQuote:view") |
|||
@GetMapping() |
|||
public String purchaseQuote() |
|||
{ |
|||
return prefix + "/purchaseQuote"; |
|||
} |
|||
|
|||
/** |
|||
* 查询采购报价单列表 |
|||
*/ |
|||
@RequiresPermissions("purchase:purchaseQuote:list") |
|||
@PostMapping("/list") |
|||
@ResponseBody |
|||
public TableDataInfo list(PurchaseQuote purchaseQuote) |
|||
{ |
|||
startPage(); |
|||
List<PurchaseQuote> list = purchaseQuoteService.selectPurchaseQuoteList(purchaseQuote); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
/** |
|||
* 导出采购报价单列表 |
|||
*/ |
|||
@RequiresPermissions("purchase:purchaseQuote:export") |
|||
@Log(title = "采购报价单", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
@ResponseBody |
|||
public AjaxResult export(PurchaseQuote purchaseQuote) |
|||
{ |
|||
List<PurchaseQuote> list = purchaseQuoteService.selectPurchaseQuoteList(purchaseQuote); |
|||
ExcelUtil<PurchaseQuote> util = new ExcelUtil<PurchaseQuote>(PurchaseQuote.class); |
|||
return util.exportExcel(list, "采购报价单数据"); |
|||
} |
|||
|
|||
/** |
|||
* 新增采购报价单 |
|||
*/ |
|||
@GetMapping("/add") |
|||
public String add() |
|||
{ |
|||
return prefix + "/add"; |
|||
} |
|||
|
|||
/** |
|||
* 新增保存采购报价单 |
|||
*/ |
|||
@RequiresPermissions("purchase:purchaseQuote:add") |
|||
@Log(title = "采购报价单", businessType = BusinessType.INSERT) |
|||
@PostMapping("/add") |
|||
@ResponseBody |
|||
public AjaxResult addSave(PurchaseQuote purchaseQuote) |
|||
{ |
|||
return toAjax(purchaseQuoteService.insertPurchaseQuote(purchaseQuote)); |
|||
} |
|||
|
|||
/** |
|||
* 修改采购报价单 |
|||
*/ |
|||
@GetMapping("/edit/{purchaseQuoteId}") |
|||
public String edit(@PathVariable("purchaseQuoteId") Long purchaseQuoteId, ModelMap mmap) |
|||
{ |
|||
PurchaseQuote purchaseQuote = purchaseQuoteService.selectPurchaseQuoteById(purchaseQuoteId); |
|||
mmap.put("purchaseQuote", purchaseQuote); |
|||
return prefix + "/edit"; |
|||
} |
|||
|
|||
/** |
|||
* 修改保存采购报价单 |
|||
*/ |
|||
@RequiresPermissions("purchase:purchaseQuote:edit") |
|||
@Log(title = "采购报价单", businessType = BusinessType.UPDATE) |
|||
@PostMapping("/edit") |
|||
@ResponseBody |
|||
public AjaxResult editSave(PurchaseQuote purchaseQuote) |
|||
{ |
|||
return toAjax(purchaseQuoteService.updatePurchaseQuote(purchaseQuote)); |
|||
} |
|||
|
|||
/** |
|||
* 删除采购报价单 |
|||
*/ |
|||
@RequiresPermissions("purchase:purchaseQuote:remove") |
|||
@Log(title = "采购报价单", businessType = BusinessType.DELETE) |
|||
@PostMapping( "/remove") |
|||
@ResponseBody |
|||
public AjaxResult remove(String ids) |
|||
{ |
|||
return toAjax(purchaseQuoteService.deletePurchaseQuoteByIds(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 作废采购报价单 |
|||
*/ |
|||
@RequiresPermissions("purchase:purchaseQuote:cancel") |
|||
@Log(title = "采购报价单", businessType = BusinessType.CANCEL) |
|||
@GetMapping( "/cancel/{id}") |
|||
@ResponseBody |
|||
public AjaxResult cancel(@PathVariable("id") Long id){ |
|||
return toAjax(purchaseQuoteService.cancelPurchaseQuoteById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 恢复采购报价单 |
|||
*/ |
|||
@RequiresPermissions("purchase:purchaseQuote:restore") |
|||
@Log(title = "采购报价单", businessType = BusinessType.RESTORE) |
|||
@GetMapping( "/restore/{id}") |
|||
@ResponseBody |
|||
public AjaxResult restore(@PathVariable("id")Long id) |
|||
{ |
|||
return toAjax(purchaseQuoteService.restorePurchaseQuoteById(id)); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,224 @@ |
|||
package com.ruoyi.purchase.domain; |
|||
|
|||
import java.math.BigDecimal; |
|||
import org.apache.commons.lang3.builder.ToStringBuilder; |
|||
import org.apache.commons.lang3.builder.ToStringStyle; |
|||
import com.ruoyi.common.annotation.Excel; |
|||
import com.ruoyi.common.core.domain.BaseEntity; |
|||
|
|||
/** |
|||
* 采购报价单对象 purchase_quote |
|||
* |
|||
* @author 刘晓旭 |
|||
* @date 2024-04-15 |
|||
*/ |
|||
public class PurchaseQuote extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 采购报价索引id */ |
|||
private Long purchaseQuoteId; |
|||
|
|||
/** 采购报价单号 */ |
|||
@Excel(name = "采购报价单号") |
|||
private String purchaseQuoteCode; |
|||
|
|||
/** 采购员 */ |
|||
@Excel(name = "采购员") |
|||
private String purchaseBuyer; |
|||
|
|||
/** 供应商ID */ |
|||
@Excel(name = "供应商ID") |
|||
private String supplierQuoteCode; |
|||
|
|||
/** 供应商名称 */ |
|||
@Excel(name = "供应商名称") |
|||
private String supplierName; |
|||
|
|||
/** 税率 */ |
|||
private BigDecimal taxRate; |
|||
|
|||
/** 物料合计 */ |
|||
@Excel(name = "物料合计") |
|||
private String materialAmount; |
|||
|
|||
/** 定价时间 */ |
|||
@Excel(name = "定价时间") |
|||
private String pricingDate; |
|||
|
|||
/** 料号 */ |
|||
@Excel(name = "料号") |
|||
private String materialNo; |
|||
|
|||
/** 录入时间 */ |
|||
@Excel(name = "录入时间") |
|||
private String firstAddTime; |
|||
|
|||
/** 修改时间 */ |
|||
@Excel(name = "修改时间") |
|||
private String updateInfoTime; |
|||
|
|||
/** 物料名称 */ |
|||
@Excel(name = "物料名称") |
|||
private String materialName; |
|||
|
|||
/** 审核状态 */ |
|||
@Excel(name = "审核状态") |
|||
private String auditStatus; |
|||
|
|||
/** 使用状态 */ |
|||
@Excel(name = "使用状态") |
|||
private String useStatus; |
|||
|
|||
public void setPurchaseQuoteId(Long purchaseQuoteId) |
|||
{ |
|||
this.purchaseQuoteId = purchaseQuoteId; |
|||
} |
|||
|
|||
public Long getPurchaseQuoteId() |
|||
{ |
|||
return purchaseQuoteId; |
|||
} |
|||
public void setPurchaseQuoteCode(String purchaseQuoteCode) |
|||
{ |
|||
this.purchaseQuoteCode = purchaseQuoteCode; |
|||
} |
|||
|
|||
public String getPurchaseQuoteCode() |
|||
{ |
|||
return purchaseQuoteCode; |
|||
} |
|||
public void setPurchaseBuyer(String purchaseBuyer) |
|||
{ |
|||
this.purchaseBuyer = purchaseBuyer; |
|||
} |
|||
|
|||
public String getPurchaseBuyer() |
|||
{ |
|||
return purchaseBuyer; |
|||
} |
|||
public void setSupplierQuoteCode(String supplierQuoteCode) |
|||
{ |
|||
this.supplierQuoteCode = supplierQuoteCode; |
|||
} |
|||
|
|||
public String getSupplierQuoteCode() |
|||
{ |
|||
return supplierQuoteCode; |
|||
} |
|||
public void setSupplierName(String supplierName) |
|||
{ |
|||
this.supplierName = supplierName; |
|||
} |
|||
|
|||
public String getSupplierName() |
|||
{ |
|||
return supplierName; |
|||
} |
|||
public void setTaxRate(BigDecimal taxRate) |
|||
{ |
|||
this.taxRate = taxRate; |
|||
} |
|||
|
|||
public BigDecimal getTaxRate() |
|||
{ |
|||
return taxRate; |
|||
} |
|||
public void setMaterialAmount(String materialAmount) |
|||
{ |
|||
this.materialAmount = materialAmount; |
|||
} |
|||
|
|||
public String getMaterialAmount() |
|||
{ |
|||
return materialAmount; |
|||
} |
|||
public void setPricingDate(String pricingDate) |
|||
{ |
|||
this.pricingDate = pricingDate; |
|||
} |
|||
|
|||
public String getPricingDate() |
|||
{ |
|||
return pricingDate; |
|||
} |
|||
public void setMaterialNo(String materialNo) |
|||
{ |
|||
this.materialNo = materialNo; |
|||
} |
|||
|
|||
public String getMaterialNo() |
|||
{ |
|||
return materialNo; |
|||
} |
|||
public void setFirstAddTime(String firstAddTime) |
|||
{ |
|||
this.firstAddTime = firstAddTime; |
|||
} |
|||
|
|||
public String getFirstAddTime() |
|||
{ |
|||
return firstAddTime; |
|||
} |
|||
public void setUpdateInfoTime(String updateInfoTime) |
|||
{ |
|||
this.updateInfoTime = updateInfoTime; |
|||
} |
|||
|
|||
public String getUpdateInfoTime() |
|||
{ |
|||
return updateInfoTime; |
|||
} |
|||
public void setMaterialName(String materialName) |
|||
{ |
|||
this.materialName = materialName; |
|||
} |
|||
|
|||
public String getMaterialName() |
|||
{ |
|||
return materialName; |
|||
} |
|||
public void setAuditStatus(String auditStatus) |
|||
{ |
|||
this.auditStatus = auditStatus; |
|||
} |
|||
|
|||
public String getAuditStatus() |
|||
{ |
|||
return auditStatus; |
|||
} |
|||
public void setUseStatus(String useStatus) |
|||
{ |
|||
this.useStatus = useStatus; |
|||
} |
|||
|
|||
public String getUseStatus() |
|||
{ |
|||
return useStatus; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|||
.append("purchaseQuoteId", getPurchaseQuoteId()) |
|||
.append("purchaseQuoteCode", getPurchaseQuoteCode()) |
|||
.append("purchaseBuyer", getPurchaseBuyer()) |
|||
.append("supplierQuoteCode", getSupplierQuoteCode()) |
|||
.append("supplierName", getSupplierName()) |
|||
.append("taxRate", getTaxRate()) |
|||
.append("materialAmount", getMaterialAmount()) |
|||
.append("pricingDate", getPricingDate()) |
|||
.append("materialNo", getMaterialNo()) |
|||
.append("firstAddTime", getFirstAddTime()) |
|||
.append("updateInfoTime", getUpdateInfoTime()) |
|||
.append("materialName", getMaterialName()) |
|||
.append("createBy", getCreateBy()) |
|||
.append("createTime", getCreateTime()) |
|||
.append("updateBy", getUpdateBy()) |
|||
.append("updateTime", getUpdateTime()) |
|||
.append("auditStatus", getAuditStatus()) |
|||
.append("useStatus", getUseStatus()) |
|||
.append("remark", getRemark()) |
|||
.toString(); |
|||
} |
|||
} |
@ -0,0 +1,77 @@ |
|||
package com.ruoyi.purchase.mapper; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.purchase.domain.PurchaseQuote; |
|||
|
|||
/** |
|||
* 采购报价单Mapper接口 |
|||
* |
|||
* @author 刘晓旭 |
|||
* @date 2024-04-15 |
|||
*/ |
|||
public interface PurchaseQuoteMapper |
|||
{ |
|||
/** |
|||
* 查询采购报价单 |
|||
* |
|||
* @param purchaseQuoteId 采购报价单ID |
|||
* @return 采购报价单 |
|||
*/ |
|||
public PurchaseQuote selectPurchaseQuoteById(Long purchaseQuoteId); |
|||
|
|||
/** |
|||
* 查询采购报价单列表 |
|||
* |
|||
* @param purchaseQuote 采购报价单 |
|||
* @return 采购报价单集合 |
|||
*/ |
|||
public List<PurchaseQuote> selectPurchaseQuoteList(PurchaseQuote purchaseQuote); |
|||
|
|||
/** |
|||
* 新增采购报价单 |
|||
* |
|||
* @param purchaseQuote 采购报价单 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertPurchaseQuote(PurchaseQuote purchaseQuote); |
|||
|
|||
/** |
|||
* 修改采购报价单 |
|||
* |
|||
* @param purchaseQuote 采购报价单 |
|||
* @return 结果 |
|||
*/ |
|||
public int updatePurchaseQuote(PurchaseQuote purchaseQuote); |
|||
|
|||
/** |
|||
* 删除采购报价单 |
|||
* |
|||
* @param purchaseQuoteId 采购报价单ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deletePurchaseQuoteById(Long purchaseQuoteId); |
|||
|
|||
/** |
|||
* 批量删除采购报价单 |
|||
* |
|||
* @param purchaseQuoteIds 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deletePurchaseQuoteByIds(String[] purchaseQuoteIds); |
|||
|
|||
/** |
|||
* 作废采购报价单 |
|||
* |
|||
* @param purchaseQuoteId 采购报价单ID |
|||
* @return 结果 |
|||
*/ |
|||
public int cancelPurchaseQuoteById(Long purchaseQuoteId); |
|||
|
|||
/** |
|||
* 恢复采购报价单 |
|||
* |
|||
* @param purchaseQuoteId 采购报价单ID |
|||
* @return 结果 |
|||
*/ |
|||
public int restorePurchaseQuoteById(Long purchaseQuoteId); |
|||
} |
@ -0,0 +1,75 @@ |
|||
package com.ruoyi.purchase.service; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.purchase.domain.PurchaseQuote; |
|||
|
|||
/** |
|||
* 采购报价单Service接口 |
|||
* |
|||
* @author 刘晓旭 |
|||
* @date 2024-04-15 |
|||
*/ |
|||
public interface IPurchaseQuoteService |
|||
{ |
|||
/** |
|||
* 查询采购报价单 |
|||
* |
|||
* @param purchaseQuoteId 采购报价单ID |
|||
* @return 采购报价单 |
|||
*/ |
|||
public PurchaseQuote selectPurchaseQuoteById(Long purchaseQuoteId); |
|||
|
|||
/** |
|||
* 查询采购报价单列表 |
|||
* |
|||
* @param purchaseQuote 采购报价单 |
|||
* @return 采购报价单集合 |
|||
*/ |
|||
public List<PurchaseQuote> selectPurchaseQuoteList(PurchaseQuote purchaseQuote); |
|||
|
|||
/** |
|||
* 新增采购报价单 |
|||
* |
|||
* @param purchaseQuote 采购报价单 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertPurchaseQuote(PurchaseQuote purchaseQuote); |
|||
|
|||
/** |
|||
* 修改采购报价单 |
|||
* |
|||
* @param purchaseQuote 采购报价单 |
|||
* @return 结果 |
|||
*/ |
|||
public int updatePurchaseQuote(PurchaseQuote purchaseQuote); |
|||
|
|||
/** |
|||
* 批量删除采购报价单 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deletePurchaseQuoteByIds(String ids); |
|||
|
|||
/** |
|||
* 删除采购报价单信息 |
|||
* |
|||
* @param purchaseQuoteId 采购报价单ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deletePurchaseQuoteById(Long purchaseQuoteId); |
|||
|
|||
/** |
|||
* 作废采购报价单 |
|||
* @param purchaseQuoteId 采购报价单ID |
|||
* @return |
|||
*/ |
|||
int cancelPurchaseQuoteById(Long purchaseQuoteId); |
|||
|
|||
/** |
|||
* 恢复采购报价单 |
|||
* @param purchaseQuoteId 采购报价单ID |
|||
* @return |
|||
*/ |
|||
int restorePurchaseQuoteById(Long purchaseQuoteId); |
|||
} |
@ -0,0 +1,126 @@ |
|||
package com.ruoyi.purchase.service.impl; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.common.utils.DateUtils; |
|||
import com.ruoyi.common.utils.ShiroUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import com.ruoyi.purchase.mapper.PurchaseQuoteMapper; |
|||
import com.ruoyi.purchase.domain.PurchaseQuote; |
|||
import com.ruoyi.purchase.service.IPurchaseQuoteService; |
|||
import com.ruoyi.common.core.text.Convert; |
|||
|
|||
/** |
|||
* 采购报价单Service业务层处理 |
|||
* |
|||
* @author 刘晓旭 |
|||
* @date 2024-04-15 |
|||
*/ |
|||
@Service |
|||
public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService |
|||
{ |
|||
@Autowired |
|||
private PurchaseQuoteMapper purchaseQuoteMapper; |
|||
|
|||
/** |
|||
* 查询采购报价单 |
|||
* |
|||
* @param purchaseQuoteId 采购报价单ID |
|||
* @return 采购报价单 |
|||
*/ |
|||
@Override |
|||
public PurchaseQuote selectPurchaseQuoteById(Long purchaseQuoteId) |
|||
{ |
|||
return purchaseQuoteMapper.selectPurchaseQuoteById(purchaseQuoteId); |
|||
} |
|||
|
|||
/** |
|||
* 查询采购报价单列表 |
|||
* |
|||
* @param purchaseQuote 采购报价单 |
|||
* @return 采购报价单 |
|||
*/ |
|||
@Override |
|||
public List<PurchaseQuote> selectPurchaseQuoteList(PurchaseQuote purchaseQuote) |
|||
{ |
|||
return purchaseQuoteMapper.selectPurchaseQuoteList(purchaseQuote); |
|||
} |
|||
|
|||
/** |
|||
* 新增采购报价单 |
|||
* |
|||
* @param purchaseQuote 采购报价单 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int insertPurchaseQuote(PurchaseQuote purchaseQuote) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
purchaseQuote.setCreateBy(loginName); |
|||
purchaseQuote.setCreateTime(DateUtils.getNowDate()); |
|||
return purchaseQuoteMapper.insertPurchaseQuote(purchaseQuote); |
|||
} |
|||
|
|||
/** |
|||
* 修改采购报价单 |
|||
* |
|||
* @param purchaseQuote 采购报价单 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int updatePurchaseQuote(PurchaseQuote purchaseQuote) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
purchaseQuote.setUpdateBy(loginName); |
|||
purchaseQuote.setUpdateTime(DateUtils.getNowDate()); |
|||
return purchaseQuoteMapper.updatePurchaseQuote(purchaseQuote); |
|||
} |
|||
|
|||
/** |
|||
* 删除采购报价单对象 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deletePurchaseQuoteByIds(String ids) |
|||
{ |
|||
return purchaseQuoteMapper.deletePurchaseQuoteByIds(Convert.toStrArray(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 删除采购报价单信息 |
|||
* |
|||
* @param purchaseQuoteId 采购报价单ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deletePurchaseQuoteById(Long purchaseQuoteId) |
|||
{ |
|||
return purchaseQuoteMapper.deletePurchaseQuoteById(purchaseQuoteId); |
|||
} |
|||
|
|||
/** |
|||
* 作废采购报价单 |
|||
* |
|||
* @param purchaseQuoteId 采购报价单ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int cancelPurchaseQuoteById(Long purchaseQuoteId) |
|||
{ |
|||
return purchaseQuoteMapper.cancelPurchaseQuoteById(purchaseQuoteId); |
|||
} |
|||
|
|||
/** |
|||
* 恢复采购报价单信息 |
|||
* |
|||
* @param purchaseQuoteId 采购报价单ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int restorePurchaseQuoteById(Long purchaseQuoteId) |
|||
{ |
|||
return purchaseQuoteMapper.restorePurchaseQuoteById(purchaseQuoteId); |
|||
} |
|||
} |
@ -0,0 +1,145 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper |
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ruoyi.purchase.mapper.PurchaseQuoteMapper"> |
|||
|
|||
<resultMap type="PurchaseQuote" id="PurchaseQuoteResult"> |
|||
<result property="purchaseQuoteId" column="purchase_quote_id" /> |
|||
<result property="purchaseQuoteCode" column="purchase_quote_code" /> |
|||
<result property="purchaseBuyer" column="purchaseBuyer" /> |
|||
<result property="supplierQuoteCode" column="supplier_quote_code" /> |
|||
<result property="supplierName" column="supplier_name" /> |
|||
<result property="taxRate" column="tax_rate" /> |
|||
<result property="materialAmount" column="material_amount" /> |
|||
<result property="pricingDate" column="pricingDate" /> |
|||
<result property="materialNo" column="material_no" /> |
|||
<result property="firstAddTime" column="first_add_time" /> |
|||
<result property="updateInfoTime" column="update_info_time" /> |
|||
<result property="materialName" column="material_name" /> |
|||
<result property="createBy" column="create_by" /> |
|||
<result property="createTime" column="create_time" /> |
|||
<result property="updateBy" column="update_by" /> |
|||
<result property="updateTime" column="update_time" /> |
|||
<result property="auditStatus" column="audit_status" /> |
|||
<result property="useStatus" column="use_status" /> |
|||
<result property="remark" column="remark" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectPurchaseQuoteVo"> |
|||
select purchase_quote_id, purchase_quote_code, purchaseBuyer, supplier_quote_code, supplier_name, tax_rate, material_amount, pricingDate, material_no, first_add_time, update_info_time, material_name, create_by, create_time, update_by, update_time, audit_status, use_status, remark from purchase_quote |
|||
</sql> |
|||
|
|||
<select id="selectPurchaseQuoteList" parameterType="PurchaseQuote" resultMap="PurchaseQuoteResult"> |
|||
<include refid="selectPurchaseQuoteVo"/> |
|||
<where> |
|||
<if test="purchaseQuoteCode != null and purchaseQuoteCode != ''"> and purchase_quote_code = #{purchaseQuoteCode}</if> |
|||
<if test="purchaseBuyer != null and purchaseBuyer != ''"> and purchaseBuyer = #{purchaseBuyer}</if> |
|||
<if test="supplierQuoteCode != null and supplierQuoteCode != ''"> and supplier_quote_code = #{supplierQuoteCode}</if> |
|||
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if> |
|||
<if test="materialAmount != null and materialAmount != ''"> and material_amount = #{materialAmount}</if> |
|||
<if test="params.beginPricingDate != null and params.beginPricingDate != '' and params.endPricingDate != null and params.endPricingDate != ''"> and pricingDate between #{params.beginPricingDate} and #{params.endPricingDate}</if> |
|||
<if test="materialNo != null and materialNo != ''"> and material_no = #{materialNo}</if> |
|||
<if test="params.beginFirstAddTime != null and params.beginFirstAddTime != '' and params.endFirstAddTime != null and params.endFirstAddTime != ''"> and first_add_time between #{params.beginFirstAddTime} and #{params.endFirstAddTime}</if> |
|||
<if test="updateInfoTime != null and updateInfoTime != ''"> and update_info_time = #{updateInfoTime}</if> |
|||
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if> |
|||
<if test="createTime != null "> and create_time = #{createTime}</if> |
|||
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if> |
|||
<if test="useStatus != null and useStatus != ''"> and use_status = #{useStatus}</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectPurchaseQuoteById" parameterType="Long" resultMap="PurchaseQuoteResult"> |
|||
<include refid="selectPurchaseQuoteVo"/> |
|||
where purchase_quote_id = #{purchaseQuoteId} |
|||
</select> |
|||
|
|||
<insert id="insertPurchaseQuote" parameterType="PurchaseQuote" useGeneratedKeys="true" keyProperty="purchaseQuoteId"> |
|||
insert into purchase_quote |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="purchaseQuoteCode != null">purchase_quote_code,</if> |
|||
<if test="purchaseBuyer != null">purchaseBuyer,</if> |
|||
<if test="supplierQuoteCode != null">supplier_quote_code,</if> |
|||
<if test="supplierName != null">supplier_name,</if> |
|||
<if test="taxRate != null">tax_rate,</if> |
|||
<if test="materialAmount != null">material_amount,</if> |
|||
<if test="pricingDate != null">pricingDate,</if> |
|||
<if test="materialNo != null">material_no,</if> |
|||
<if test="firstAddTime != null">first_add_time,</if> |
|||
<if test="updateInfoTime != null">update_info_time,</if> |
|||
<if test="materialName != null">material_name,</if> |
|||
<if test="createBy != null">create_by,</if> |
|||
<if test="createTime != null">create_time,</if> |
|||
<if test="updateBy != null">update_by,</if> |
|||
<if test="updateTime != null">update_time,</if> |
|||
<if test="auditStatus != null">audit_status,</if> |
|||
<if test="useStatus != null">use_status,</if> |
|||
<if test="remark != null">remark,</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="purchaseQuoteCode != null">#{purchaseQuoteCode},</if> |
|||
<if test="purchaseBuyer != null">#{purchaseBuyer},</if> |
|||
<if test="supplierQuoteCode != null">#{supplierQuoteCode},</if> |
|||
<if test="supplierName != null">#{supplierName},</if> |
|||
<if test="taxRate != null">#{taxRate},</if> |
|||
<if test="materialAmount != null">#{materialAmount},</if> |
|||
<if test="pricingDate != null">#{pricingDate},</if> |
|||
<if test="materialNo != null">#{materialNo},</if> |
|||
<if test="firstAddTime != null">#{firstAddTime},</if> |
|||
<if test="updateInfoTime != null">#{updateInfoTime},</if> |
|||
<if test="materialName != null">#{materialName},</if> |
|||
<if test="createBy != null">#{createBy},</if> |
|||
<if test="createTime != null">#{createTime},</if> |
|||
<if test="updateBy != null">#{updateBy},</if> |
|||
<if test="updateTime != null">#{updateTime},</if> |
|||
<if test="auditStatus != null">#{auditStatus},</if> |
|||
<if test="useStatus != null">#{useStatus},</if> |
|||
<if test="remark != null">#{remark},</if> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updatePurchaseQuote" parameterType="PurchaseQuote"> |
|||
update purchase_quote |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="purchaseQuoteCode != null">purchase_quote_code = #{purchaseQuoteCode},</if> |
|||
<if test="purchaseBuyer != null">purchaseBuyer = #{purchaseBuyer},</if> |
|||
<if test="supplierQuoteCode != null">supplier_quote_code = #{supplierQuoteCode},</if> |
|||
<if test="supplierName != null">supplier_name = #{supplierName},</if> |
|||
<if test="taxRate != null">tax_rate = #{taxRate},</if> |
|||
<if test="materialAmount != null">material_amount = #{materialAmount},</if> |
|||
<if test="pricingDate != null">pricingDate = #{pricingDate},</if> |
|||
<if test="materialNo != null">material_no = #{materialNo},</if> |
|||
<if test="firstAddTime != null">first_add_time = #{firstAddTime},</if> |
|||
<if test="updateInfoTime != null">update_info_time = #{updateInfoTime},</if> |
|||
<if test="materialName != null">material_name = #{materialName},</if> |
|||
<if test="createBy != null">create_by = #{createBy},</if> |
|||
<if test="createTime != null">create_time = #{createTime},</if> |
|||
<if test="updateBy != null">update_by = #{updateBy},</if> |
|||
<if test="updateTime != null">update_time = #{updateTime},</if> |
|||
<if test="auditStatus != null">audit_status = #{auditStatus},</if> |
|||
<if test="useStatus != null">use_status = #{useStatus},</if> |
|||
<if test="remark != null">remark = #{remark},</if> |
|||
</trim> |
|||
where purchase_quote_id = #{purchaseQuoteId} |
|||
</update> |
|||
|
|||
<delete id="deletePurchaseQuoteById" parameterType="Long"> |
|||
delete from purchase_quote where purchase_quote_id = #{purchaseQuoteId} |
|||
</delete> |
|||
|
|||
<delete id="deletePurchaseQuoteByIds" parameterType="String"> |
|||
delete from purchase_quote where purchase_quote_id in |
|||
<foreach item="purchaseQuoteId" collection="array" open="(" separator="," close=")"> |
|||
#{purchaseQuoteId} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<update id="cancelPurchaseQuoteById" parameterType="Long"> |
|||
update purchase_quote set del_flag = '1' where purchase_quote_id = #{purchaseQuoteId} |
|||
</update> |
|||
|
|||
<update id="restorePurchaseQuoteById" parameterType="Long"> |
|||
update purchase_quote set del_flag = '0' where purchase_quote_id = #{purchaseQuoteId} |
|||
</update> |
|||
|
|||
</mapper> |
@ -0,0 +1,118 @@ |
|||
<!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-purchaseQuote-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">采购员:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="purchaseBuyer" 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">供应商ID:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="supplierQuoteCode" 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="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="materialAmount" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">定价时间:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="pricingDate" 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="materialNo" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">录入时间:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="firstAddTime" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">修改时间:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="updateInfoTime" 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"> |
|||
<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"> |
|||
<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"> |
|||
<textarea name="remark" class="form-control"></textarea> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "purchase/purchaseQuote" |
|||
$("#form-purchaseQuote-add").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/add", $('#form-purchaseQuote-add').serialize()); |
|||
} |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,119 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('修改采购报价单')" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-purchaseQuote-edit" th:object="${purchaseQuote}"> |
|||
<input name="purchaseQuoteId" th:field="*{purchaseQuoteId}" 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">采购员:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="purchaseBuyer" 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">供应商ID:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="supplierQuoteCode" th:field="*{supplierQuoteCode}" 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="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="materialAmount" th:field="*{materialAmount}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">定价时间:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="pricingDate" th:field="*{pricingDate}" 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="materialNo" th:field="*{materialNo}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">录入时间:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="firstAddTime" th:field="*{firstAddTime}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">修改时间:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="updateInfoTime" th:field="*{updateInfoTime}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">物料名称:</label> |
|||
<div class="col-sm-8"> |
|||
<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"> |
|||
<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> |
|||
<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"> |
|||
<textarea name="remark" class="form-control">[[*{remark}]]</textarea> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "purchase/purchaseQuote"; |
|||
$("#form-purchaseQuote-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/edit", $('#form-purchaseQuote-edit').serialize()); |
|||
} |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,176 @@ |
|||
<!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="supplierQuoteCode"/> |
|||
</li> |
|||
<li> |
|||
<label>供应商名称:</label> |
|||
<input type="text" name="supplierName"/> |
|||
</li> |
|||
<li> |
|||
<label>料号:</label> |
|||
<input type="text" name="materialNo"/> |
|||
</li> |
|||
<li> |
|||
<label>物料名称:</label> |
|||
<input type="text" name="materialName"/> |
|||
</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> |
|||
<label>录入时间:</label> |
|||
<input type="text" class="time-input" placeholder="请选择录入时间" name="createTime"/> |
|||
</li> |
|||
<li> |
|||
<label>采购员:</label> |
|||
<select name="purchaseBuyer"> |
|||
<option value="">所有</option> |
|||
<option value="-1">代码生成请选择字典属性</option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<label>定价时间:</label> |
|||
<input type="text" name="pricingDate"/> |
|||
</li> |
|||
<li> |
|||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
|||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
|
|||
<div class="btn-group-sm" id="toolbar" role="group"> |
|||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="purchase:purchaseQuote:add"> |
|||
<i class="fa fa-plus"></i> 添加 |
|||
</a> |
|||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="purchase:purchaseQuote:edit"> |
|||
<i class="fa fa-edit"></i> 修改 |
|||
</a> |
|||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="purchase:purchaseQuote:remove"> |
|||
<i class="fa fa-remove"></i> 删除 |
|||
</a> |
|||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="purchase:purchaseQuote:export"> |
|||
<i class="fa fa-download"></i> 导出 |
|||
</a> |
|||
</div> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var editFlag = [[${@permission.hasPermi('purchase:purchaseQuote:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('purchase:purchaseQuote:remove')}]]; |
|||
var cancelFlag = [[${@permission.hasPermi('purchase:purchaseQuote:cancel')}]]; |
|||
var restoreFlag = [[${@permission.hasPermi('purchase:purchaseQuote:restore')}]]; |
|||
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; |
|||
var useStatusDatas = [[${@dict.getType('useStatus')}]]; |
|||
var prefix = ctx + "purchase/purchaseQuote"; |
|||
|
|||
$(function() { |
|||
var options = { |
|||
url: prefix + "/list", |
|||
createUrl: prefix + "/add", |
|||
updateUrl: prefix + "/edit/{id}", |
|||
removeUrl: prefix + "/remove", |
|||
cancelUrl: prefix + "/cancel/{id}", |
|||
restoreUrl: prefix + "/restore/{id}", |
|||
exportUrl: prefix + "/export", |
|||
modalName: "采购报价单", |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
title: '采购报价索引id', |
|||
field: 'purchaseQuoteId', |
|||
visible: false |
|||
}, |
|||
|
|||
{ |
|||
title: '审核状态', |
|||
field: 'auditStatus', |
|||
formatter: function (value, row, index) { |
|||
return $.table.selectDictLabel(auditStatusDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
title: '采购员', |
|||
field: 'purchaseBuyer', |
|||
}, |
|||
{ |
|||
title: '采购报价单号', |
|||
field: 'purchaseQuoteCode', |
|||
}, |
|||
{ |
|||
title: '供应商ID', |
|||
field: 'supplierQuoteCode', |
|||
}, |
|||
{ |
|||
title: '供应商名称', |
|||
field: 'supplierName', |
|||
}, |
|||
{ |
|||
title: '物料合计', |
|||
field: 'materialAmount', |
|||
}, |
|||
{ |
|||
title: '定价时间', |
|||
field: 'pricingDate', |
|||
}, |
|||
{ |
|||
title: '录入时间', |
|||
field: 'createTime', |
|||
}, |
|||
{ |
|||
title: '更新人', |
|||
field: 'updateBy', |
|||
}, |
|||
{ |
|||
title: '上次更新时间', |
|||
field: 'updateTime', |
|||
}, |
|||
|
|||
{ |
|||
title: '操作', |
|||
align: 'center', |
|||
formatter: function(value, row, index) { |
|||
var actions = []; |
|||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.purchaseQuoteId + '\')"><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.purchaseQuoteId + '\')"><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…
Reference in new issue