Compare commits
7 Commits
0507f7602c
...
7a018b4296
Author | SHA1 | Date |
---|---|---|
zhangsiqi | 7a018b4296 | 3 months ago |
zhangsiqi | 580766f56c | 3 months ago |
zhangsiqi | 64545bfd25 | 3 months ago |
zhangsiqi | f026a32067 | 3 months ago |
zhangsiqi | cbc463bfa1 | 3 months ago |
zhangsiqi | 178cb9aad5 | 3 months ago |
zhangsiqi | 84e55eea6e | 3 months ago |
38 changed files with 2595 additions and 957 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.PurchaseQuoteHistory; |
|||
import com.ruoyi.purchase.service.IPurchaseQuoteHistoryService; |
|||
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-08-28 |
|||
*/ |
|||
@Controller |
|||
@RequestMapping("/purchaseQuoteHistory/purchaseQuoteHistory") |
|||
public class PurchaseQuoteHistoryController extends BaseController |
|||
{ |
|||
private String prefix = "purchaseQuoteHistory/purchaseQuoteHistory"; |
|||
|
|||
@Autowired |
|||
private IPurchaseQuoteHistoryService purchaseQuoteHistoryService; |
|||
|
|||
@RequiresPermissions("purchaseQuoteHistory:purchaseQuoteHistory:view") |
|||
@GetMapping() |
|||
public String purchaseQuoteHistory() |
|||
{ |
|||
return prefix + "/purchaseQuoteHistory"; |
|||
} |
|||
|
|||
/** |
|||
* 查询采购物料历史报价信息列表 |
|||
*/ |
|||
@RequiresPermissions("purchaseQuoteHistory:purchaseQuoteHistory:list") |
|||
@PostMapping("/list") |
|||
@ResponseBody |
|||
public TableDataInfo list(PurchaseQuoteHistory purchaseQuoteHistory) |
|||
{ |
|||
startPage(); |
|||
List<PurchaseQuoteHistory> list = purchaseQuoteHistoryService.selectPurchaseQuoteHistoryList(purchaseQuoteHistory); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
/** |
|||
* 导出采购物料历史报价信息列表 |
|||
*/ |
|||
@RequiresPermissions("purchaseQuoteHistory:purchaseQuoteHistory:export") |
|||
@Log(title = "采购物料历史报价信息", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
@ResponseBody |
|||
public AjaxResult export(PurchaseQuoteHistory purchaseQuoteHistory) |
|||
{ |
|||
List<PurchaseQuoteHistory> list = purchaseQuoteHistoryService.selectPurchaseQuoteHistoryList(purchaseQuoteHistory); |
|||
ExcelUtil<PurchaseQuoteHistory> util = new ExcelUtil<PurchaseQuoteHistory>(PurchaseQuoteHistory.class); |
|||
return util.exportExcel(list, "采购物料历史报价信息数据"); |
|||
} |
|||
|
|||
/** |
|||
* 新增采购物料历史报价信息 |
|||
*/ |
|||
@GetMapping("/add") |
|||
public String add() |
|||
{ |
|||
return prefix + "/add"; |
|||
} |
|||
|
|||
/** |
|||
* 新增保存采购物料历史报价信息 |
|||
*/ |
|||
@RequiresPermissions("purchaseQuoteHistory:purchaseQuoteHistory:add") |
|||
@Log(title = "采购物料历史报价信息", businessType = BusinessType.INSERT) |
|||
@PostMapping("/add") |
|||
@ResponseBody |
|||
public AjaxResult addSave(PurchaseQuoteHistory purchaseQuoteHistory) |
|||
{ |
|||
return toAjax(purchaseQuoteHistoryService.insertPurchaseQuoteHistory(purchaseQuoteHistory)); |
|||
} |
|||
|
|||
/** |
|||
* 修改采购物料历史报价信息 |
|||
*/ |
|||
@GetMapping("/edit/{purchaseQuoteChildId}") |
|||
public String edit(@PathVariable("purchaseQuoteChildId") Long purchaseQuoteChildId, ModelMap mmap) |
|||
{ |
|||
PurchaseQuoteHistory purchaseQuoteHistory = purchaseQuoteHistoryService.selectPurchaseQuoteHistoryById(purchaseQuoteChildId); |
|||
mmap.put("purchaseQuoteHistory", purchaseQuoteHistory); |
|||
return prefix + "/edit"; |
|||
} |
|||
|
|||
/** |
|||
* 修改保存采购物料历史报价信息 |
|||
*/ |
|||
@RequiresPermissions("purchaseQuoteHistory:purchaseQuoteHistory:edit") |
|||
@Log(title = "采购物料历史报价信息", businessType = BusinessType.UPDATE) |
|||
@PostMapping("/edit") |
|||
@ResponseBody |
|||
public AjaxResult editSave(PurchaseQuoteHistory purchaseQuoteHistory) |
|||
{ |
|||
return toAjax(purchaseQuoteHistoryService.updatePurchaseQuoteHistory(purchaseQuoteHistory)); |
|||
} |
|||
|
|||
/** |
|||
* 删除采购物料历史报价信息 |
|||
*/ |
|||
@RequiresPermissions("purchaseQuoteHistory:purchaseQuoteHistory:remove") |
|||
@Log(title = "采购物料历史报价信息", businessType = BusinessType.DELETE) |
|||
@PostMapping( "/remove") |
|||
@ResponseBody |
|||
public AjaxResult remove(String ids) |
|||
{ |
|||
return toAjax(purchaseQuoteHistoryService.deletePurchaseQuoteHistoryByIds(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 作废采购物料历史报价信息 |
|||
*/ |
|||
@RequiresPermissions("purchaseQuoteHistory:purchaseQuoteHistory:cancel") |
|||
@Log(title = "采购物料历史报价信息", businessType = BusinessType.CANCEL) |
|||
@GetMapping( "/cancel/{id}") |
|||
@ResponseBody |
|||
public AjaxResult cancel(@PathVariable("id") Long id){ |
|||
return toAjax(purchaseQuoteHistoryService.cancelPurchaseQuoteHistoryById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 恢复采购物料历史报价信息 |
|||
*/ |
|||
@RequiresPermissions("purchaseQuoteHistory:purchaseQuoteHistory:restore") |
|||
@Log(title = "采购物料历史报价信息", businessType = BusinessType.RESTORE) |
|||
@GetMapping( "/restore/{id}") |
|||
@ResponseBody |
|||
public AjaxResult restore(@PathVariable("id")Long id) |
|||
{ |
|||
return toAjax(purchaseQuoteHistoryService.restorePurchaseQuoteHistoryById(id)); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,323 @@ |
|||
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_history |
|||
* |
|||
* @author zhang |
|||
* @date 2024-08-28 |
|||
*/ |
|||
public class PurchaseQuoteHistory extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 采购报价历史id */ |
|||
@Excel(name = "采购报价历史id") |
|||
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; |
|||
|
|||
/** 国内税率 */ |
|||
@Excel(name = "国内税率") |
|||
private BigDecimal taxRate; |
|||
|
|||
/** 美元汇率 */ |
|||
@Excel(name = "美元汇率") |
|||
private BigDecimal usdRate; |
|||
|
|||
/** 物料的数量 */ |
|||
@Excel(name = "物料的数量") |
|||
private BigDecimal materialNum; |
|||
|
|||
/** 物料的对外报价 */ |
|||
@Excel(name = "物料的对外报价") |
|||
private Long materialSole; |
|||
|
|||
/** 物料的不含税单价(RMB) */ |
|||
@Excel(name = "物料的不含税单价(RMB)") |
|||
private BigDecimal materialRmb; |
|||
|
|||
/** 物料的含税单价(RMB) */ |
|||
@Excel(name = "物料的含税单价(RMB)") |
|||
private BigDecimal materialNormb; |
|||
|
|||
/** 供应商编号 */ |
|||
@Excel(name = "供应商编号") |
|||
private String supplierCode; |
|||
|
|||
/** 供应商名称 */ |
|||
@Excel(name = "供应商名称") |
|||
private String supplierName; |
|||
|
|||
/** 删除状态 */ |
|||
@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(BigDecimal taxRate) |
|||
{ |
|||
this.taxRate = taxRate; |
|||
} |
|||
|
|||
public BigDecimal getTaxRate() |
|||
{ |
|||
return taxRate; |
|||
} |
|||
public void setUsdRate(BigDecimal usdRate) |
|||
{ |
|||
this.usdRate = usdRate; |
|||
} |
|||
|
|||
public BigDecimal getUsdRate() |
|||
{ |
|||
return usdRate; |
|||
} |
|||
public void setMaterialNum(BigDecimal materialNum) |
|||
{ |
|||
this.materialNum = materialNum; |
|||
} |
|||
|
|||
public BigDecimal getMaterialNum() |
|||
{ |
|||
return materialNum; |
|||
} |
|||
public void setMaterialSole(Long materialSole) |
|||
{ |
|||
this.materialSole = materialSole; |
|||
} |
|||
|
|||
public Long 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 setSupplierCode(String supplierCode) |
|||
{ |
|||
this.supplierCode = supplierCode; |
|||
} |
|||
|
|||
public String getSupplierCode() |
|||
{ |
|||
return supplierCode; |
|||
} |
|||
public void setSupplierName(String supplierName) |
|||
{ |
|||
this.supplierName = supplierName; |
|||
} |
|||
|
|||
public String getSupplierName() |
|||
{ |
|||
return supplierName; |
|||
} |
|||
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("supplierCode", getSupplierCode()) |
|||
.append("supplierName", getSupplierName()) |
|||
.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(); |
|||
} |
|||
} |
@ -0,0 +1,77 @@ |
|||
package com.ruoyi.purchase.mapper; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.purchase.domain.PurchaseQuoteHistory; |
|||
|
|||
/** |
|||
* 采购物料历史报价信息Mapper接口 |
|||
* |
|||
* @author zhang |
|||
* @date 2024-08-28 |
|||
*/ |
|||
public interface PurchaseQuoteHistoryMapper |
|||
{ |
|||
/** |
|||
* 查询采购物料历史报价信息 |
|||
* |
|||
* @param purchaseQuoteChildId 采购物料历史报价信息ID |
|||
* @return 采购物料历史报价信息 |
|||
*/ |
|||
public PurchaseQuoteHistory selectPurchaseQuoteHistoryById(Long purchaseQuoteChildId); |
|||
|
|||
/** |
|||
* 查询采购物料历史报价信息列表 |
|||
* |
|||
* @param purchaseQuoteHistory 采购物料历史报价信息 |
|||
* @return 采购物料历史报价信息集合 |
|||
*/ |
|||
public List<PurchaseQuoteHistory> selectPurchaseQuoteHistoryList(PurchaseQuoteHistory purchaseQuoteHistory); |
|||
|
|||
/** |
|||
* 新增采购物料历史报价信息 |
|||
* |
|||
* @param purchaseQuoteHistory 采购物料历史报价信息 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertPurchaseQuoteHistory(PurchaseQuoteHistory purchaseQuoteHistory); |
|||
|
|||
/** |
|||
* 修改采购物料历史报价信息 |
|||
* |
|||
* @param purchaseQuoteHistory 采购物料历史报价信息 |
|||
* @return 结果 |
|||
*/ |
|||
public int updatePurchaseQuoteHistory(PurchaseQuoteHistory purchaseQuoteHistory); |
|||
|
|||
/** |
|||
* 删除采购物料历史报价信息 |
|||
* |
|||
* @param purchaseQuoteChildId 采购物料历史报价信息ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deletePurchaseQuoteHistoryById(Long purchaseQuoteChildId); |
|||
|
|||
/** |
|||
* 批量删除采购物料历史报价信息 |
|||
* |
|||
* @param purchaseQuoteChildIds 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deletePurchaseQuoteHistoryByIds(String[] purchaseQuoteChildIds); |
|||
|
|||
/** |
|||
* 作废采购物料历史报价信息 |
|||
* |
|||
* @param purchaseQuoteChildId 采购物料历史报价信息ID |
|||
* @return 结果 |
|||
*/ |
|||
public int cancelPurchaseQuoteHistoryById(Long purchaseQuoteChildId); |
|||
|
|||
/** |
|||
* 恢复采购物料历史报价信息 |
|||
* |
|||
* @param purchaseQuoteChildId 采购物料历史报价信息ID |
|||
* @return 结果 |
|||
*/ |
|||
public int restorePurchaseQuoteHistoryById(Long purchaseQuoteChildId); |
|||
} |
@ -0,0 +1,75 @@ |
|||
package com.ruoyi.purchase.service; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.purchase.domain.PurchaseQuoteHistory; |
|||
|
|||
/** |
|||
* 采购物料历史报价信息Service接口 |
|||
* |
|||
* @author zhang |
|||
* @date 2024-08-28 |
|||
*/ |
|||
public interface IPurchaseQuoteHistoryService |
|||
{ |
|||
/** |
|||
* 查询采购物料历史报价信息 |
|||
* |
|||
* @param purchaseQuoteChildId 采购物料历史报价信息ID |
|||
* @return 采购物料历史报价信息 |
|||
*/ |
|||
public PurchaseQuoteHistory selectPurchaseQuoteHistoryById(Long purchaseQuoteChildId); |
|||
|
|||
/** |
|||
* 查询采购物料历史报价信息列表 |
|||
* |
|||
* @param purchaseQuoteHistory 采购物料历史报价信息 |
|||
* @return 采购物料历史报价信息集合 |
|||
*/ |
|||
public List<PurchaseQuoteHistory> selectPurchaseQuoteHistoryList(PurchaseQuoteHistory purchaseQuoteHistory); |
|||
|
|||
/** |
|||
* 新增采购物料历史报价信息 |
|||
* |
|||
* @param purchaseQuoteHistory 采购物料历史报价信息 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertPurchaseQuoteHistory(PurchaseQuoteHistory purchaseQuoteHistory); |
|||
|
|||
/** |
|||
* 修改采购物料历史报价信息 |
|||
* |
|||
* @param purchaseQuoteHistory 采购物料历史报价信息 |
|||
* @return 结果 |
|||
*/ |
|||
public int updatePurchaseQuoteHistory(PurchaseQuoteHistory purchaseQuoteHistory); |
|||
|
|||
/** |
|||
* 批量删除采购物料历史报价信息 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deletePurchaseQuoteHistoryByIds(String ids); |
|||
|
|||
/** |
|||
* 删除采购物料历史报价信息信息 |
|||
* |
|||
* @param purchaseQuoteChildId 采购物料历史报价信息ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deletePurchaseQuoteHistoryById(Long purchaseQuoteChildId); |
|||
|
|||
/** |
|||
* 作废采购物料历史报价信息 |
|||
* @param purchaseQuoteChildId 采购物料历史报价信息ID |
|||
* @return |
|||
*/ |
|||
int cancelPurchaseQuoteHistoryById(Long purchaseQuoteChildId); |
|||
|
|||
/** |
|||
* 恢复采购物料历史报价信息 |
|||
* @param purchaseQuoteChildId 采购物料历史报价信息ID |
|||
* @return |
|||
*/ |
|||
int restorePurchaseQuoteHistoryById(Long purchaseQuoteChildId); |
|||
} |
@ -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.PurchaseQuoteHistoryMapper; |
|||
import com.ruoyi.purchase.domain.PurchaseQuoteHistory; |
|||
import com.ruoyi.purchase.service.IPurchaseQuoteHistoryService; |
|||
import com.ruoyi.common.core.text.Convert; |
|||
|
|||
/** |
|||
* 采购物料历史报价信息Service业务层处理 |
|||
* |
|||
* @author zhang |
|||
* @date 2024-08-28 |
|||
*/ |
|||
@Service |
|||
public class PurchaseQuoteHistoryServiceImpl implements IPurchaseQuoteHistoryService |
|||
{ |
|||
@Autowired |
|||
private PurchaseQuoteHistoryMapper purchaseQuoteHistoryMapper; |
|||
|
|||
/** |
|||
* 查询采购物料历史报价信息 |
|||
* |
|||
* @param purchaseQuoteChildId 采购物料历史报价信息ID |
|||
* @return 采购物料历史报价信息 |
|||
*/ |
|||
@Override |
|||
public PurchaseQuoteHistory selectPurchaseQuoteHistoryById(Long purchaseQuoteChildId) |
|||
{ |
|||
return purchaseQuoteHistoryMapper.selectPurchaseQuoteHistoryById(purchaseQuoteChildId); |
|||
} |
|||
|
|||
/** |
|||
* 查询采购物料历史报价信息列表 |
|||
* |
|||
* @param purchaseQuoteHistory 采购物料历史报价信息 |
|||
* @return 采购物料历史报价信息 |
|||
*/ |
|||
@Override |
|||
public List<PurchaseQuoteHistory> selectPurchaseQuoteHistoryList(PurchaseQuoteHistory purchaseQuoteHistory) |
|||
{ |
|||
return purchaseQuoteHistoryMapper.selectPurchaseQuoteHistoryList(purchaseQuoteHistory); |
|||
} |
|||
|
|||
/** |
|||
* 新增采购物料历史报价信息 |
|||
* |
|||
* @param purchaseQuoteHistory 采购物料历史报价信息 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int insertPurchaseQuoteHistory(PurchaseQuoteHistory purchaseQuoteHistory) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
purchaseQuoteHistory.setCreateBy(loginName); |
|||
purchaseQuoteHistory.setCreateTime(DateUtils.getNowDate()); |
|||
return purchaseQuoteHistoryMapper.insertPurchaseQuoteHistory(purchaseQuoteHistory); |
|||
} |
|||
|
|||
/** |
|||
* 修改采购物料历史报价信息 |
|||
* |
|||
* @param purchaseQuoteHistory 采购物料历史报价信息 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int updatePurchaseQuoteHistory(PurchaseQuoteHistory purchaseQuoteHistory) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
purchaseQuoteHistory.setUpdateBy(loginName); |
|||
purchaseQuoteHistory.setUpdateTime(DateUtils.getNowDate()); |
|||
return purchaseQuoteHistoryMapper.updatePurchaseQuoteHistory(purchaseQuoteHistory); |
|||
} |
|||
|
|||
/** |
|||
* 删除采购物料历史报价信息对象 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deletePurchaseQuoteHistoryByIds(String ids) |
|||
{ |
|||
return purchaseQuoteHistoryMapper.deletePurchaseQuoteHistoryByIds(Convert.toStrArray(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 删除采购物料历史报价信息信息 |
|||
* |
|||
* @param purchaseQuoteChildId 采购物料历史报价信息ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deletePurchaseQuoteHistoryById(Long purchaseQuoteChildId) |
|||
{ |
|||
return purchaseQuoteHistoryMapper.deletePurchaseQuoteHistoryById(purchaseQuoteChildId); |
|||
} |
|||
|
|||
/** |
|||
* 作废采购物料历史报价信息 |
|||
* |
|||
* @param purchaseQuoteChildId 采购物料历史报价信息ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int cancelPurchaseQuoteHistoryById(Long purchaseQuoteChildId) |
|||
{ |
|||
return purchaseQuoteHistoryMapper.cancelPurchaseQuoteHistoryById(purchaseQuoteChildId); |
|||
} |
|||
|
|||
/** |
|||
* 恢复采购物料历史报价信息信息 |
|||
* |
|||
* @param purchaseQuoteChildId 采购物料历史报价信息ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int restorePurchaseQuoteHistoryById(Long purchaseQuoteChildId) |
|||
{ |
|||
return purchaseQuoteHistoryMapper.restorePurchaseQuoteHistoryById(purchaseQuoteChildId); |
|||
} |
|||
} |
@ -0,0 +1,180 @@ |
|||
<?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.PurchaseQuoteHistoryMapper"> |
|||
|
|||
<resultMap type="PurchaseQuoteHistory" id="PurchaseQuoteHistoryResult"> |
|||
<result property="purchaseQuoteChildId" column="purchase_quote_child_id" /> |
|||
<result property="purchaseQuoteCode" column="purchase_quote_code" /> |
|||
<result property="materialId" column="material_id" /> |
|||
<result property="materialCode" column="material_code" /> |
|||
<result property="materialName" column="material_name" /> |
|||
<result property="materialType" column="material_type" /> |
|||
<result property="processMethod" column="processMethod" /> |
|||
<result property="brand" column="brand" /> |
|||
<result property="photoUrl" column="photoUrl" /> |
|||
<result property="describe" column="describe" /> |
|||
<result property="taxRate" column="tax_rate" /> |
|||
<result property="usdRate" column="usd_rate" /> |
|||
<result property="materialNum" column="material_num" /> |
|||
<result property="materialSole" column="material_sole" /> |
|||
<result property="materialRmb" column="material_rmb" /> |
|||
<result property="materialNormb" column="material_noRmb" /> |
|||
<result property="supplierCode" column="supplier_code" /> |
|||
<result property="supplierName" column="supplier_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="remark" column="remark" /> |
|||
<result property="useStatus" column="use_status" /> |
|||
<result property="auditStatus" column="audit_status" /> |
|||
<result property="delFlag" column="del_flag" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectPurchaseQuoteHistoryVo"> |
|||
select purchase_quote_child_id, purchase_quote_code, material_id, material_code, material_name, material_type, processMethod, brand, photoUrl, describe, tax_rate, usd_rate, material_num, material_sole, material_rmb, material_noRmb, supplier_code, supplier_name, create_by, create_time, update_by, update_time, remark, use_status, audit_status, del_flag from purchase_quote_history |
|||
</sql> |
|||
|
|||
<select id="selectPurchaseQuoteHistoryList" parameterType="PurchaseQuoteHistory" resultMap="PurchaseQuoteHistoryResult"> |
|||
<include refid="selectPurchaseQuoteHistoryVo"/> |
|||
<where> |
|||
<if test="purchaseQuoteChildId != null "> and purchase_quote_child_id = #{purchaseQuoteChildId}</if> |
|||
<if test="purchaseQuoteCode != null and purchaseQuoteCode != ''"> and purchase_quote_code = #{purchaseQuoteCode}</if> |
|||
<if test="materialId != null "> and material_id = #{materialId}</if> |
|||
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if> |
|||
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if> |
|||
<if test="materialType != null and materialType != ''"> and material_type = #{materialType}</if> |
|||
<if test="processMethod != null and processMethod != ''"> and processMethod = #{processMethod}</if> |
|||
<if test="brand != null and brand != ''"> and brand = #{brand}</if> |
|||
<if test="photoUrl != null and photoUrl != ''"> and photoUrl = #{photoUrl}</if> |
|||
<if test="describe != null and describe != ''"> and describe = #{describe}</if> |
|||
<if test="taxRate != null "> and tax_rate = #{taxRate}</if> |
|||
<if test="usdRate != null "> and usd_rate = #{usdRate}</if> |
|||
<if test="materialNum != null "> and material_num = #{materialNum}</if> |
|||
<if test="materialSole != null "> and material_sole = #{materialSole}</if> |
|||
<if test="materialRmb != null "> and material_rmb = #{materialRmb}</if> |
|||
<if test="materialNormb != null "> and material_noRmb = #{materialNormb}</if> |
|||
<if test="supplierCode != null and supplierCode != ''"> and supplier_code = #{supplierCode}</if> |
|||
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if> |
|||
<if test="useStatus != null and useStatus != ''"> and use_status = #{useStatus}</if> |
|||
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectPurchaseQuoteHistoryById" parameterType="Long" resultMap="PurchaseQuoteHistoryResult"> |
|||
<include refid="selectPurchaseQuoteHistoryVo"/> |
|||
where purchase_quote_child_id = #{purchaseQuoteChildId} |
|||
</select> |
|||
|
|||
<insert id="insertPurchaseQuoteHistory" parameterType="PurchaseQuoteHistory" useGeneratedKeys="true" keyProperty="purchaseQuoteChildId"> |
|||
insert into purchase_quote_history |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="purchaseQuoteCode != null">purchase_quote_code,</if> |
|||
<if test="materialId != null">material_id,</if> |
|||
<if test="materialCode != null">material_code,</if> |
|||
<if test="materialName != null">material_name,</if> |
|||
<if test="materialType != null">material_type,</if> |
|||
<if test="processMethod != null">processMethod,</if> |
|||
<if test="brand != null">brand,</if> |
|||
<if test="photoUrl != null">photoUrl,</if> |
|||
<if test="describe != null">describe,</if> |
|||
<if test="taxRate != null">tax_rate,</if> |
|||
<if test="usdRate != null">usd_rate,</if> |
|||
<if test="materialNum != null">material_num,</if> |
|||
<if test="materialSole != null">material_sole,</if> |
|||
<if test="materialRmb != null">material_rmb,</if> |
|||
<if test="materialNormb != null">material_noRmb,</if> |
|||
<if test="supplierCode != null">supplier_code,</if> |
|||
<if test="supplierName != null">supplier_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="remark != null">remark,</if> |
|||
<if test="useStatus != null">use_status,</if> |
|||
<if test="auditStatus != null">audit_status,</if> |
|||
<if test="delFlag != null">del_flag,</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="purchaseQuoteCode != null">#{purchaseQuoteCode},</if> |
|||
<if test="materialId != null">#{materialId},</if> |
|||
<if test="materialCode != null">#{materialCode},</if> |
|||
<if test="materialName != null">#{materialName},</if> |
|||
<if test="materialType != null">#{materialType},</if> |
|||
<if test="processMethod != null">#{processMethod},</if> |
|||
<if test="brand != null">#{brand},</if> |
|||
<if test="photoUrl != null">#{photoUrl},</if> |
|||
<if test="describe != null">#{describe},</if> |
|||
<if test="taxRate != null">#{taxRate},</if> |
|||
<if test="usdRate != null">#{usdRate},</if> |
|||
<if test="materialNum != null">#{materialNum},</if> |
|||
<if test="materialSole != null">#{materialSole},</if> |
|||
<if test="materialRmb != null">#{materialRmb},</if> |
|||
<if test="materialNormb != null">#{materialNormb},</if> |
|||
<if test="supplierCode != null">#{supplierCode},</if> |
|||
<if test="supplierName != null">#{supplierName},</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="remark != null">#{remark},</if> |
|||
<if test="useStatus != null">#{useStatus},</if> |
|||
<if test="auditStatus != null">#{auditStatus},</if> |
|||
<if test="delFlag != null">#{delFlag},</if> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updatePurchaseQuoteHistory" parameterType="PurchaseQuoteHistory"> |
|||
update purchase_quote_history |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="purchaseQuoteCode != null">purchase_quote_code = #{purchaseQuoteCode},</if> |
|||
<if test="materialId != null">material_id = #{materialId},</if> |
|||
<if test="materialCode != null">material_code = #{materialCode},</if> |
|||
<if test="materialName != null">material_name = #{materialName},</if> |
|||
<if test="materialType != null">material_type = #{materialType},</if> |
|||
<if test="processMethod != null">processMethod = #{processMethod},</if> |
|||
<if test="brand != null">brand = #{brand},</if> |
|||
<if test="photoUrl != null">photoUrl = #{photoUrl},</if> |
|||
<if test="describe != null">describe = #{describe},</if> |
|||
<if test="taxRate != null">tax_rate = #{taxRate},</if> |
|||
<if test="usdRate != null">usd_rate = #{usdRate},</if> |
|||
<if test="materialNum != null">material_num = #{materialNum},</if> |
|||
<if test="materialSole != null">material_sole = #{materialSole},</if> |
|||
<if test="materialRmb != null">material_rmb = #{materialRmb},</if> |
|||
<if test="materialNormb != null">material_noRmb = #{materialNormb},</if> |
|||
<if test="supplierCode != null">supplier_code = #{supplierCode},</if> |
|||
<if test="supplierName != null">supplier_name = #{supplierName},</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="remark != null">remark = #{remark},</if> |
|||
<if test="useStatus != null">use_status = #{useStatus},</if> |
|||
<if test="auditStatus != null">audit_status = #{auditStatus},</if> |
|||
<if test="delFlag != null">del_flag = #{delFlag},</if> |
|||
</trim> |
|||
where purchase_quote_child_id = #{purchaseQuoteChildId} |
|||
</update> |
|||
|
|||
<delete id="deletePurchaseQuoteHistoryById" parameterType="Long"> |
|||
delete from purchase_quote_history where purchase_quote_child_id = #{purchaseQuoteChildId} |
|||
</delete> |
|||
|
|||
<delete id="deletePurchaseQuoteHistoryByIds" parameterType="String"> |
|||
delete from purchase_quote_history where purchase_quote_child_id in |
|||
<foreach item="purchaseQuoteChildId" collection="array" open="(" separator="," close=")"> |
|||
#{purchaseQuoteChildId} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<update id="cancelPurchaseQuoteHistoryById" parameterType="Long"> |
|||
update purchase_quote_history set del_flag = '1' where purchase_quote_child_id = #{purchaseQuoteChildId} |
|||
</update> |
|||
|
|||
<update id="restorePurchaseQuoteHistoryById" parameterType="Long"> |
|||
update purchase_quote_history set del_flag = '0' where purchase_quote_child_id = #{purchaseQuoteChildId} |
|||
</update> |
|||
|
|||
</mapper> |
@ -0,0 +1,162 @@ |
|||
<!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-purchaseQuoteHistory-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"> |
|||
<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"> |
|||
<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"> |
|||
<input type="radio" name="useStatus" value=""> |
|||
<label th:for="useStatus" th:text="未知"></label> |
|||
</div> |
|||
<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"> |
|||
<div class="radio-box"> |
|||
<input type="radio" name="auditStatus" value=""> |
|||
<label th:for="auditStatus" th:text="未知"></label> |
|||
</div> |
|||
<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="delFlag" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "purchaseQuoteHistory/purchaseQuoteHistory" |
|||
$("#form-purchaseQuoteHistory-add").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/add", $('#form-purchaseQuoteHistory-add').serialize()); |
|||
} |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,109 @@ |
|||
<!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>物料编号:</label> |
|||
<input type="text" name="materialCode"/> |
|||
</li> |
|||
<li> |
|||
<label>审核状态:</label> |
|||
<select name="auditStatus"> |
|||
<option value="">所有</option> |
|||
<option value="-1">代码生成请选择字典属性</option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</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-warning" onclick="$.table.exportExcel()" shiro:hasPermission="purchaseQuoteHistory:purchaseQuoteHistory: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('purchaseQuoteHistory:purchaseQuoteHistory:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('purchaseQuoteHistory:purchaseQuoteHistory:remove')}]]; |
|||
var cancelFlag = [[${@permission.hasPermi('purchaseQuoteHistory:purchaseQuoteHistory:cancel')}]]; |
|||
var restoreFlag = [[${@permission.hasPermi('purchaseQuoteHistory:purchaseQuoteHistory:restore')}]]; |
|||
var prefix = ctx + "purchaseQuoteHistory/purchaseQuoteHistory"; |
|||
|
|||
$(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: '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: 'taxRate',}, |
|||
{title: '美元汇率', field: 'usdRate',}, |
|||
{title: '物料的数量', field: 'materialNum',}, |
|||
{title: '物料的对外报价', field: 'materialSole',}, |
|||
{title: '物料的不含税单价(RMB)', field: 'materialRmb',}, |
|||
{title: '物料的含税单价(RMB)', field: 'materialNormb',}, |
|||
{title: '供应商编号', field: 'supplierCode',}, |
|||
{title: '供应商名称', field: 'supplierName',}, |
|||
{title: '备注', field: 'remark',}, |
|||
{title: '删除状态', field: 'useStatus',}, |
|||
{title: '审核状态', field: 'auditStatus',}, |
|||
{ |
|||
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…
Reference in new issue