Browse Source

删除旧版无用的供应商报价对象 sys_supplier_quotation和系统中对应的前端所有代码和后端所有代码 和对应的系统菜单数据

dev
liuxiaoxu 1 month ago
parent
commit
f8f6ae8b13
  1. 137
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSupplierQuotationController.java
  2. 495
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSupplierQuotation.java
  3. 61
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSupplierQuotationMapper.java
  4. 64
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSupplierQuotationService.java
  5. 102
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSupplierQuotationServiceImpl.java
  6. 190
      ruoyi-admin/src/main/resources/mapper/system/SysSupplierQuotationMapper.xml
  7. 1
      ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/add.html
  8. 554
      ruoyi-admin/src/main/resources/templates/system/supplierquotation/add.html
  9. 420
      ruoyi-admin/src/main/resources/templates/system/supplierquotation/edit.html
  10. 668
      ruoyi-admin/src/main/resources/templates/system/supplierquotation/supplierquotation.html

137
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSupplierQuotationController.java

@ -1,137 +0,0 @@
package com.ruoyi.system.controller;
import java.util.List;
import com.ruoyi.ck.utils.Result;
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.SysSupplierQuotation;
import com.ruoyi.system.service.ISysSupplierQuotationService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 供应商报价Controller
*
* @author ruoyi
* @date 2022-11-08
*/
@Controller
@RequestMapping("/system/supplierquotation")
public class SysSupplierQuotationController extends BaseController
{
private String prefix = "system/supplierquotation";
@Autowired
private ISysSupplierQuotationService sysSupplierQuotationService;
@RequiresPermissions("system:supplierquotation:view")
@GetMapping()
public String supplierquotation()
{
return prefix + "/supplierquotation";
}
/**
* 查询供应商报价列表
*/
@RequiresPermissions("system:supplierquotation:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(SysSupplierQuotation sysSupplierQuotation)
{
startPage();
List<SysSupplierQuotation> list = sysSupplierQuotationService.selectSysSupplierQuotationList(sysSupplierQuotation);
return getDataTable(list);
}
/**
* 导出供应商报价列表
*/
@RequiresPermissions("system:supplierquotation:export")
@Log(title = "供应商报价", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysSupplierQuotation sysSupplierQuotation)
{
List<SysSupplierQuotation> list = sysSupplierQuotationService.selectSysSupplierQuotationList(sysSupplierQuotation);
ExcelUtil<SysSupplierQuotation> util = new ExcelUtil<SysSupplierQuotation>(SysSupplierQuotation.class);
return util.exportExcel(list, "供应商报价数据");
}
/**
* 新增供应商报价
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存供应商报价
*/
@RequiresPermissions("system:supplierquotation:add")
@Log(title = "供应商报价", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(SysSupplierQuotation sysSupplierQuotation)
{
return toAjax(sysSupplierQuotationService.insertSysSupplierQuotation(sysSupplierQuotation));
}
/**
* 修改供应商报价
*/
@GetMapping("/edit/{supplierQuotationId}")
public String edit(@PathVariable("supplierQuotationId") Long supplierQuotationId, ModelMap mmap)
{
SysSupplierQuotation sysSupplierQuotation = sysSupplierQuotationService.selectSysSupplierQuotationById(supplierQuotationId);
mmap.put("sysSupplierQuotation", sysSupplierQuotation);
return prefix + "/edit";
}
/**
* 修改保存供应商报价
*/
@RequiresPermissions("system:supplierquotation:edit")
@Log(title = "供应商报价", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysSupplierQuotation sysSupplierQuotation)
{
return toAjax(sysSupplierQuotationService.updateSysSupplierQuotation(sysSupplierQuotation));
}
/**
* 删除供应商报价
*/
@RequiresPermissions("system:supplierquotation:remove")
@Log(title = "供应商报价", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(sysSupplierQuotationService.deleteSysSupplierQuotationByIds(ids));
}
/**
* 获取报价编号
*/
@PostMapping("/getId")
@ResponseBody
public Result getId() throws Exception {
return Result.getSuccessResult(sysSupplierQuotationService.getId());
}
}

495
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSupplierQuotation.java

@ -1,495 +0,0 @@
package com.ruoyi.system.domain;
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_supplier_quotation
*
* @author ruoyi
* @date 2022-11-08
*/
public class SysSupplierQuotation extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 供应商报价id */
private Long supplierQuotationId;
/** 报价编码 */
@Excel(name = "报价编码")
private String quotationCode;
/** 原辅料代码 */
@Excel(name = "原辅料代码")
private String rawSubsidiaryCode;
/** 原辅料名称 */
@Excel(name = "原辅料名称")
private String rawSubsidiaryName;
/** 规格型号 */
@Excel(name = "规格型号")
private String specificationModel;
/** 机种 */
@Excel(name = "机种")
private String typeMachine;
/** 物料类别 */
@Excel(name = "物料类别")
private String materialType;
/** 库存单位 */
@Excel(name = "库存单位")
private String inventoryUnit;
/** 币别 */
@Excel(name = "币别")
private String commonCurrency;
/** 库存单价 */
@Excel(name = "库存单价")
private String inventoryPrice;
/** 采购单位 */
@Excel(name = "采购单位")
private String purchasingUnit;
/** 采购单价 */
@Excel(name = "采购单价")
private String purchasePrice;
/** 关系公式 */
@Excel(name = "关系公式")
private String relationalFormula;
/** 供应商编号 */
@Excel(name = "供应商编号")
private String supplierCode;
/** 供应商名称 */
@Excel(name = "供应商名称")
private String supplierName;
/** 定价日期 */
@Excel(name = "定价日期")
private String pricingDate;
/** 含税否 */
@Excel(name = "含税否")
private String confirmTax;
/** 税率 */
@Excel(name = "税率")
private String taxRate;
/** 说明 */
@Excel(name = "说明")
private String quotationExplain;
/** 是否为当前报价 */
@Excel(name = "是否为当前报价")
private String currentQuote;
/** 登记人 */
@Excel(name = "登记人")
private String registrant;
/** 确认否 */
@Excel(name = "确认否")
private String confirmNo;
/** 审核否 */
@Excel(name = "审核否")
private String auditNo;
/** 核准否 */
@Excel(name = "核准否")
private String approveNo;
/** 确认人 */
@Excel(name = "确认人")
private String confirmName;
/** 确认时间 */
@Excel(name = "确认时间")
private String confirmTime;
/** 审核人 */
@Excel(name = "审核人")
private String auditName;
/** 审核时间 */
@Excel(name = "审核时间")
private String auditTime;
/** 核准人 */
@Excel(name = "核准人")
private String approveName;
/** 核准时间 */
@Excel(name = "核准时间")
private String approveTime;
/** 备用一 */
@Excel(name = "备用一")
private String standbyOne;
/** 备用二 */
@Excel(name = "备用二")
private String standbyTwo;
/** 录入时间 */
@Excel(name = "录入时间")
private String firstAddTime;
/** 修改时间 */
@Excel(name = "修改时间")
private String updateInfoTime;
public void setSupplierQuotationId(Long supplierQuotationId)
{
this.supplierQuotationId = supplierQuotationId;
}
public Long getSupplierQuotationId()
{
return supplierQuotationId;
}
public void setQuotationCode(String quotationCode)
{
this.quotationCode = quotationCode;
}
public String getQuotationCode()
{
return quotationCode;
}
public void setRawSubsidiaryCode(String rawSubsidiaryCode)
{
this.rawSubsidiaryCode = rawSubsidiaryCode;
}
public String getRawSubsidiaryCode()
{
return rawSubsidiaryCode;
}
public void setRawSubsidiaryName(String rawSubsidiaryName)
{
this.rawSubsidiaryName = rawSubsidiaryName;
}
public String getRawSubsidiaryName()
{
return rawSubsidiaryName;
}
public void setSpecificationModel(String specificationModel)
{
this.specificationModel = specificationModel;
}
public String getSpecificationModel()
{
return specificationModel;
}
public void setTypeMachine(String typeMachine)
{
this.typeMachine = typeMachine;
}
public String getTypeMachine()
{
return typeMachine;
}
public String getMaterialType() {
return materialType;
}
public void setMaterialType(String materialType) {
this.materialType = materialType;
}
public void setInventoryUnit(String inventoryUnit)
{
this.inventoryUnit = inventoryUnit;
}
public String getInventoryUnit()
{
return inventoryUnit;
}
public void setCommonCurrency(String commonCurrency)
{
this.commonCurrency = commonCurrency;
}
public String getCommonCurrency()
{
return commonCurrency;
}
public void setInventoryPrice(String inventoryPrice)
{
this.inventoryPrice = inventoryPrice;
}
public String getInventoryPrice()
{
return inventoryPrice;
}
public void setPurchasingUnit(String purchasingUnit)
{
this.purchasingUnit = purchasingUnit;
}
public String getPurchasingUnit()
{
return purchasingUnit;
}
public void setPurchasePrice(String purchasePrice)
{
this.purchasePrice = purchasePrice;
}
public String getPurchasePrice()
{
return purchasePrice;
}
public void setRelationalFormula(String relationalFormula)
{
this.relationalFormula = relationalFormula;
}
public String getRelationalFormula()
{
return relationalFormula;
}
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 setPricingDate(String pricingDate)
{
this.pricingDate = pricingDate;
}
public String getPricingDate()
{
return pricingDate;
}
public void setConfirmTax(String confirmTax)
{
this.confirmTax = confirmTax;
}
public String getConfirmTax()
{
return confirmTax;
}
public void setTaxRate(String taxRate)
{
this.taxRate = taxRate;
}
public String getTaxRate()
{
return taxRate;
}
public void setQuotationExplain(String quotationExplain)
{
this.quotationExplain = quotationExplain;
}
public String getQuotationExplain()
{
return quotationExplain;
}
public void setCurrentQuote(String currentQuote)
{
this.currentQuote = currentQuote;
}
public String getCurrentQuote()
{
return currentQuote;
}
public void setRegistrant(String registrant)
{
this.registrant = registrant;
}
public String getRegistrant()
{
return registrant;
}
public void setConfirmNo(String confirmNo)
{
this.confirmNo = confirmNo;
}
public String getConfirmNo()
{
return confirmNo;
}
public void setAuditNo(String auditNo)
{
this.auditNo = auditNo;
}
public String getAuditNo()
{
return auditNo;
}
public void setApproveNo(String approveNo)
{
this.approveNo = approveNo;
}
public String getApproveNo()
{
return approveNo;
}
public void setConfirmName(String confirmName)
{
this.confirmName = confirmName;
}
public String getConfirmName()
{
return confirmName;
}
public void setConfirmTime(String confirmTime)
{
this.confirmTime = confirmTime;
}
public String getConfirmTime()
{
return confirmTime;
}
public void setAuditName(String auditName)
{
this.auditName = auditName;
}
public String getAuditName()
{
return auditName;
}
public void setAuditTime(String auditTime)
{
this.auditTime = auditTime;
}
public String getAuditTime()
{
return auditTime;
}
public void setApproveName(String approveName)
{
this.approveName = approveName;
}
public String getApproveName()
{
return approveName;
}
public void setApproveTime(String approveTime)
{
this.approveTime = approveTime;
}
public String getApproveTime()
{
return approveTime;
}
public void setStandbyOne(String standbyOne)
{
this.standbyOne = standbyOne;
}
public String getStandbyOne()
{
return standbyOne;
}
public void setStandbyTwo(String standbyTwo)
{
this.standbyTwo = standbyTwo;
}
public String getStandbyTwo()
{
return standbyTwo;
}
public String getFirstAddTime() {
return firstAddTime;
}
public void setFirstAddTime(String firstAddTime) {
this.firstAddTime = firstAddTime;
}
public String getUpdateInfoTime() {
return updateInfoTime;
}
public void setUpdateInfoTime(String updateInfoTime) {
this.updateInfoTime = updateInfoTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("supplierQuotationId", getSupplierQuotationId())
.append("quotationCode", getQuotationCode())
.append("rawSubsidiaryCode", getRawSubsidiaryCode())
.append("rawSubsidiaryName", getRawSubsidiaryName())
.append("specificationModel", getSpecificationModel())
.append("typeMachine", getTypeMachine())
.append("materialType", getMaterialType())
.append("inventoryUnit", getInventoryUnit())
.append("commonCurrency", getCommonCurrency())
.append("inventoryPrice", getInventoryPrice())
.append("purchasingUnit", getPurchasingUnit())
.append("purchasePrice", getPurchasePrice())
.append("relationalFormula", getRelationalFormula())
.append("supplierCode", getSupplierCode())
.append("supplierName", getSupplierName())
.append("pricingDate", getPricingDate())
.append("confirmTax", getConfirmTax())
.append("taxRate", getTaxRate())
.append("quotationExplain", getQuotationExplain())
.append("currentQuote", getCurrentQuote())
.append("registrant", getRegistrant())
.append("confirmNo", getConfirmNo())
.append("auditNo", getAuditNo())
.append("approveNo", getApproveNo())
.append("confirmName", getConfirmName())
.append("confirmTime", getConfirmTime())
.append("auditName", getAuditName())
.append("auditTime", getAuditTime())
.append("approveName", getApproveName())
.append("approveTime", getApproveTime())
.append("standbyOne", getStandbyOne())
.append("standbyTwo", getStandbyTwo())
.append("firstAddTime", getFirstAddTime())
.append("updateInfoTime", getUpdateInfoTime())
.toString();
}
}

61
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSupplierQuotationMapper.java

@ -1,61 +0,0 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.SysSupplierQuotation;
/**
* 供应商报价Mapper接口
*
* @author ruoyi
* @date 2022-11-08
*/
public interface SysSupplierQuotationMapper
{
/**
* 查询供应商报价
*
* @param supplierQuotationId 供应商报价ID
* @return 供应商报价
*/
public SysSupplierQuotation selectSysSupplierQuotationById(Long supplierQuotationId);
/**
* 查询供应商报价列表
*
* @param sysSupplierQuotation 供应商报价
* @return 供应商报价集合
*/
public List<SysSupplierQuotation> selectSysSupplierQuotationList(SysSupplierQuotation sysSupplierQuotation);
/**
* 新增供应商报价
*
* @param sysSupplierQuotation 供应商报价
* @return 结果
*/
public int insertSysSupplierQuotation(SysSupplierQuotation sysSupplierQuotation);
/**
* 修改供应商报价
*
* @param sysSupplierQuotation 供应商报价
* @return 结果
*/
public int updateSysSupplierQuotation(SysSupplierQuotation sysSupplierQuotation);
/**
* 删除供应商报价
*
* @param supplierQuotationId 供应商报价ID
* @return 结果
*/
public int deleteSysSupplierQuotationById(Long supplierQuotationId);
/**
* 批量删除供应商报价
*
* @param supplierQuotationIds 需要删除的数据ID
* @return 结果
*/
public int deleteSysSupplierQuotationByIds(String[] supplierQuotationIds);
}

64
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSupplierQuotationService.java

@ -1,64 +0,0 @@
package com.ruoyi.system.service;
import com.ruoyi.system.domain.SysSupplierQuotation;
import java.util.List;
/**
* 供应商报价Service接口
*
* @author ruoyi
* @date 2022-11-08
*/
public interface ISysSupplierQuotationService
{
/**
* 查询供应商报价
*
* @param supplierQuotationId 供应商报价ID
* @return 供应商报价
*/
public SysSupplierQuotation selectSysSupplierQuotationById(Long supplierQuotationId);
/**
* 查询供应商报价列表
*
* @param sysSupplierQuotation 供应商报价
* @return 供应商报价集合
*/
public List<SysSupplierQuotation> selectSysSupplierQuotationList(SysSupplierQuotation sysSupplierQuotation);
/**
* 新增供应商报价
*
* @param sysSupplierQuotation 供应商报价
* @return 结果
*/
public int insertSysSupplierQuotation(SysSupplierQuotation sysSupplierQuotation);
/**
* 修改供应商报价
*
* @param sysSupplierQuotation 供应商报价
* @return 结果
*/
public int updateSysSupplierQuotation(SysSupplierQuotation sysSupplierQuotation);
/**
* 批量删除供应商报价
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteSysSupplierQuotationByIds(String ids);
/**
* 删除供应商报价信息
*
* @param supplierQuotationId 供应商报价ID
* @return 结果
*/
public int deleteSysSupplierQuotationById(Long supplierQuotationId);
public String getId();
}

102
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSupplierQuotationServiceImpl.java

@ -1,102 +0,0 @@
package com.ruoyi.system.service.impl;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.SysSupplierQuotation;
import com.ruoyi.system.mapper.SysSupplierQuotationMapper;
import com.ruoyi.system.service.ISysSupplierQuotationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.List;
/**
* 供应商报价Service业务层处理
*
* @author ruoyi
* @date 2022-11-08
*/
@Service
public class SysSupplierQuotationServiceImpl implements ISysSupplierQuotationService
{
@Autowired
private SysSupplierQuotationMapper sysSupplierQuotationMapper;
/**
* 查询供应商报价
*
* @param supplierQuotationId 供应商报价ID
* @return 供应商报价
*/
@Override
public SysSupplierQuotation selectSysSupplierQuotationById(Long supplierQuotationId)
{
return sysSupplierQuotationMapper.selectSysSupplierQuotationById(supplierQuotationId);
}
/**
* 查询供应商报价列表
*
* @param sysSupplierQuotation 供应商报价
* @return 供应商报价
*/
@Override
public List<SysSupplierQuotation> selectSysSupplierQuotationList(SysSupplierQuotation sysSupplierQuotation)
{
return sysSupplierQuotationMapper.selectSysSupplierQuotationList(sysSupplierQuotation);
}
/**
* 新增供应商报价
*
* @param sysSupplierQuotation 供应商报价
* @return 结果
*/
@Override
public int insertSysSupplierQuotation(SysSupplierQuotation sysSupplierQuotation)
{
return sysSupplierQuotationMapper.insertSysSupplierQuotation(sysSupplierQuotation);
}
/**
* 修改供应商报价
*
* @param sysSupplierQuotation 供应商报价
* @return 结果
*/
@Override
public int updateSysSupplierQuotation(SysSupplierQuotation sysSupplierQuotation)
{
return sysSupplierQuotationMapper.updateSysSupplierQuotation(sysSupplierQuotation);
}
/**
* 删除供应商报价对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteSysSupplierQuotationByIds(String ids)
{
return sysSupplierQuotationMapper.deleteSysSupplierQuotationByIds(Convert.toStrArray(ids));
}
/**
* 删除供应商报价信息
*
* @param supplierQuotationId 供应商报价ID
* @return 结果
*/
@Override
public int deleteSysSupplierQuotationById(Long supplierQuotationId)
{
return sysSupplierQuotationMapper.deleteSysSupplierQuotationById(supplierQuotationId);
}
@Override
public String getId() {
String time = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(System.currentTimeMillis());
return "BJ" + time.substring(2);
}
}

190
ruoyi-admin/src/main/resources/mapper/system/SysSupplierQuotationMapper.xml

@ -1,190 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysSupplierQuotationMapper">
<resultMap type="SysSupplierQuotation" id="SysSupplierQuotationResult">
<result property="supplierQuotationId" column="supplier_quotation_id" />
<result property="quotationCode" column="quotation_code" />
<result property="rawSubsidiaryCode" column="raw_subsidiary_code" />
<result property="rawSubsidiaryName" column="raw_subsidiary_name" />
<result property="specificationModel" column="specification_model" />
<result property="typeMachine" column="type_machine" />
<result property="materialType" column="material_type" />
<result property="inventoryUnit" column="inventory_unit" />
<result property="commonCurrency" column="common_currency" />
<result property="inventoryPrice" column="inventory_price" />
<result property="purchasingUnit" column="purchasing_unit" />
<result property="purchasePrice" column="purchase_price" />
<result property="relationalFormula" column="relational_formula" />
<result property="supplierCode" column="supplier_code" />
<result property="supplierName" column="supplier_name" />
<result property="pricingDate" column="pricing_date" />
<result property="confirmTax" column="confirm_tax" />
<result property="taxRate" column="tax_rate" />
<result property="quotationExplain" column="quotation_explain" />
<result property="currentQuote" column="current_quote" />
<result property="registrant" column="registrant" />
<result property="confirmNo" column="confirm_no" />
<result property="auditNo" column="audit_no" />
<result property="approveNo" column="approve_no" />
<result property="confirmName" column="confirm_name" />
<result property="confirmTime" column="confirm_time" />
<result property="auditName" column="audit_name" />
<result property="auditTime" column="audit_time" />
<result property="approveName" column="approve_name" />
<result property="approveTime" column="approve_time" />
<result property="standbyOne" column="standby_one" />
<result property="standbyTwo" column="standby_two" />
<result property="firstAddTime" column="first_add_time" />
<result property="updateInfoTime" column="update_info_time" />
</resultMap>
<sql id="selectSysSupplierQuotationVo">
select supplier_quotation_id, quotation_code, raw_subsidiary_code, raw_subsidiary_name, specification_model, type_machine, material_type, inventory_unit, common_currency, inventory_price, purchasing_unit, purchase_price, relational_formula, supplier_code, supplier_name, pricing_date, confirm_tax, tax_rate, quotation_explain, current_quote, registrant, confirm_no, audit_no, approve_no, confirm_name, confirm_time, audit_name, audit_time, approve_name, approve_time, standby_one, standby_two, first_add_time, update_info_time from sys_supplier_quotation
</sql>
<select id="selectSysSupplierQuotationList" parameterType="SysSupplierQuotation" resultMap="SysSupplierQuotationResult">
<include refid="selectSysSupplierQuotationVo"/>
<where>
<if test="quotationCode != null and quotationCode != ''"> and quotation_code like concat('%', #{quotationCode}, '%')</if>
<if test="rawSubsidiaryCode != null and rawSubsidiaryCode != ''"> and raw_subsidiary_code like concat('%', #{rawSubsidiaryCode}, '%')</if>
<if test="rawSubsidiaryName != null and rawSubsidiaryName != ''"> and raw_subsidiary_name like concat('%', #{rawSubsidiaryName}, '%')</if>
<if test="supplierCode != null and supplierCode != ''"> and supplier_code like concat('%', #{supplierCode}, '%')</if>
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="currentQuote != null and currentQuote != ''"> and current_quote = #{currentQuote}</if>
<if test="confirmNo != null and confirmNo != ''"> and confirm_no = #{confirmNo}</if>
<if test="auditNo != null and auditNo != ''"> and audit_no = #{auditNo}</if>
<if test="approveNo != null and approveNo != ''"> and approve_no = #{approveNo}</if>
</where>
</select>
<select id="selectSysSupplierQuotationById" parameterType="Long" resultMap="SysSupplierQuotationResult">
<include refid="selectSysSupplierQuotationVo"/>
where supplier_quotation_id = #{supplierQuotationId}
</select>
<insert id="insertSysSupplierQuotation" parameterType="SysSupplierQuotation" useGeneratedKeys="true" keyProperty="supplierQuotationId">
insert into sys_supplier_quotation
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="quotationCode != null">quotation_code,</if>
<if test="rawSubsidiaryCode != null">raw_subsidiary_code,</if>
<if test="rawSubsidiaryName != null">raw_subsidiary_name,</if>
<if test="specificationModel != null">specification_model,</if>
<if test="typeMachine != null">type_machine,</if>
<if test="materialType != null">material_type,</if>
<if test="inventoryUnit != null">inventory_unit,</if>
<if test="commonCurrency != null">common_currency,</if>
<if test="inventoryPrice != null">inventory_price,</if>
<if test="purchasingUnit != null">purchasing_unit,</if>
<if test="purchasePrice != null">purchase_price,</if>
<if test="relationalFormula != null">relational_formula,</if>
<if test="supplierCode != null">supplier_code,</if>
<if test="supplierName != null">supplier_name,</if>
<if test="pricingDate != null">pricing_date,</if>
<if test="confirmTax != null">confirm_tax,</if>
<if test="taxRate != null">tax_rate,</if>
<if test="quotationExplain != null">quotation_explain,</if>
<if test="currentQuote != null">current_quote,</if>
<if test="registrant != null">registrant,</if>
<if test="confirmNo != null">confirm_no,</if>
<if test="auditNo != null">audit_no,</if>
<if test="approveNo != null">approve_no,</if>
<if test="confirmName != null">confirm_name,</if>
<if test="confirmTime != null">confirm_time,</if>
<if test="auditName != null">audit_name,</if>
<if test="auditTime != null">audit_time,</if>
<if test="approveName != null">approve_name,</if>
<if test="approveTime != null">approve_time,</if>
<if test="standbyOne != null">standby_one,</if>
<if test="standbyTwo != null">standby_two,</if>
first_add_time,
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="quotationCode != null">#{quotationCode},</if>
<if test="rawSubsidiaryCode != null">#{rawSubsidiaryCode},</if>
<if test="rawSubsidiaryName != null">#{rawSubsidiaryName},</if>
<if test="specificationModel != null">#{specificationModel},</if>
<if test="typeMachine != null">#{typeMachine},</if>
<if test="materialType != null">#{materialType},</if>
<if test="inventoryUnit != null">#{inventoryUnit},</if>
<if test="commonCurrency != null">#{commonCurrency},</if>
<if test="inventoryPrice != null">#{inventoryPrice},</if>
<if test="purchasingUnit != null">#{purchasingUnit},</if>
<if test="purchasePrice != null">#{purchasePrice},</if>
<if test="relationalFormula != null">#{relationalFormula},</if>
<if test="supplierCode != null">#{supplierCode},</if>
<if test="supplierName != null">#{supplierName},</if>
<if test="pricingDate != null">#{pricingDate},</if>
<if test="confirmTax != null">#{confirmTax},</if>
<if test="taxRate != null">#{taxRate},</if>
<if test="quotationExplain != null">#{quotationExplain},</if>
<if test="currentQuote != null">#{currentQuote},</if>
<if test="registrant != null">#{registrant},</if>
<if test="confirmNo != null">#{confirmNo},</if>
<if test="auditNo != null">#{auditNo},</if>
<if test="approveNo != null">#{approveNo},</if>
<if test="confirmName != null">#{confirmName},</if>
<if test="confirmTime != null">#{confirmTime},</if>
<if test="auditName != null">#{auditName},</if>
<if test="auditTime != null">#{auditTime},</if>
<if test="approveName != null">#{approveName},</if>
<if test="approveTime != null">#{approveTime},</if>
<if test="standbyOne != null">#{standbyOne},</if>
<if test="standbyTwo != null">#{standbyTwo},</if>
now(),
</trim>
</insert>
<update id="updateSysSupplierQuotation" parameterType="SysSupplierQuotation">
update sys_supplier_quotation
<trim prefix="SET" suffixOverrides=",">
<if test="quotationCode != null">quotation_code = #{quotationCode},</if>
<if test="rawSubsidiaryCode != null">raw_subsidiary_code = #{rawSubsidiaryCode},</if>
<if test="rawSubsidiaryName != null">raw_subsidiary_name = #{rawSubsidiaryName},</if>
<if test="specificationModel != null">specification_model = #{specificationModel},</if>
<if test="typeMachine != null">type_machine = #{typeMachine},</if>
<if test="materialType != null">material_type = #{materialType},</if>
<if test="inventoryUnit != null">inventory_unit = #{inventoryUnit},</if>
<if test="commonCurrency != null">common_currency = #{commonCurrency},</if>
<if test="inventoryPrice != null">inventory_price = #{inventoryPrice},</if>
<if test="purchasingUnit != null">purchasing_unit = #{purchasingUnit},</if>
<if test="purchasePrice != null">purchase_price = #{purchasePrice},</if>
<if test="relationalFormula != null">relational_formula = #{relationalFormula},</if>
<if test="supplierCode != null">supplier_code = #{supplierCode},</if>
<if test="supplierName != null">supplier_name = #{supplierName},</if>
<if test="pricingDate != null">pricing_date = #{pricingDate},</if>
<if test="confirmTax != null">confirm_tax = #{confirmTax},</if>
<if test="taxRate != null">tax_rate = #{taxRate},</if>
<if test="quotationExplain != null">quotation_explain = #{quotationExplain},</if>
<if test="currentQuote != null">current_quote = #{currentQuote},</if>
<if test="registrant != null">registrant = #{registrant},</if>
<if test="confirmNo != null">confirm_no = #{confirmNo},</if>
<if test="auditNo != null">audit_no = #{auditNo},</if>
<if test="approveNo != null">approve_no = #{approveNo},</if>
<if test="confirmName != null">confirm_name = #{confirmName},</if>
<if test="confirmTime != null">confirm_time = #{confirmTime},</if>
<if test="auditName != null">audit_name = #{auditName},</if>
<if test="auditTime != null">audit_time = #{auditTime},</if>
<if test="approveName != null">approve_name = #{approveName},</if>
<if test="approveTime != null">approve_time = #{approveTime},</if>
<if test="standbyOne != null">standby_one = #{standbyOne},</if>
<if test="standbyTwo != null">standby_two = #{standbyTwo},</if>
update_info_time = CONCAT_WS(',',NOW(),update_info_time),
</trim>
where supplier_quotation_id = #{supplierQuotationId}
</update>
<delete id="deleteSysSupplierQuotationById" parameterType="Long">
delete from sys_supplier_quotation where supplier_quotation_id = #{supplierQuotationId}
</delete>
<delete id="deleteSysSupplierQuotationByIds" parameterType="String">
delete from sys_supplier_quotation where supplier_quotation_id in
<foreach item="supplierQuotationId" collection="array" open="(" separator="," close=")">
#{supplierQuotationId}
</foreach>
</delete>
</mapper>

1
ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/add.html

@ -260,7 +260,6 @@
var accountReconciliationFlagDatas = [[${@dict.getType('sys_whether')}]];
var prefix = ctx + "purchase/purchaseOrder"
var prefixSupplierQuotation = ctx + 'system/supplierquotation'
var prefixPurchaseMaterial = ctx + 'purchase/purchaseMaterial'
$("#form-purchaseOrder-add").validate({

554
ruoyi-admin/src/main/resources/templates/system/supplierquotation/add.html

@ -1,554 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="include :: header('新增供应商报价')"/>
<th:block th:include="include :: datetimepicker-css"/>
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet">
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet">
</head>
<style>
.division {
width: 100%;
border-bottom: 1px solid #f1ecec;
padding: 10px 0 0;
margin-bottom: 30px;
}
.changeWidth {
width: 33% !important;
}
.col-sm-3 {
width: 26%;
}
</style>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-supplierquotation-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">报价编码:</label>
<div class="col-sm-8">
<input name="quotationCode" class="form-control" type="text" required readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">原辅料代码:</label>
<div class="col-sm-8">
<select id="rawSubsidiaryCode" name="rawSubsidiaryCode" class="form-control m-b" required>
<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 is-required">原辅料名称:</label>
<div class="col-sm-8">
<input name="rawSubsidiaryName" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">规格型号:</label>
<div class="col-sm-8">
<input name="specificationModel" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">机种:</label>
<div class="col-sm-8">
<input name="typeMachine" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料类别:</label>
<div class="col-sm-8">
<select name="materialType" class="form-control m-b"
th:with="type=${@dict.getType('ck_meterialt_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">库存单位:</label>
<div class="col-sm-8">
<input name="inventoryUnit" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">币别:</label>
<div class="col-sm-8">
<select name="commonCurrency" class="form-control m-b"
th:with="type=${@dict.getType('sys_common_currency')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">库存单价:</label>
<div class="col-sm-8">
<input name="inventoryPrice" 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="purchasingUnit" class="form-control m-b"
th:with="type=${@dict.getType('sys_unit_class')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">采购单价:</label>
<div class="col-sm-8">
<input name="purchasePrice" 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="relationalFormula" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">供应商编号:</label>
<div class="col-sm-8">
<select id="supplierCode" name="supplierCode" class="form-control m-b" required>
<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 is-required">供应商名称:</label>
<div class="col-sm-8">
<select id="supplierName" name="supplierName" class="form-control m-b" required>
<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">
<div class="input-group date">
<input name="pricingDate" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">含税否:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}">
<input type="radio" th:id="${'confirmTax_' + dict.dictCode}" name="confirmTax"
th:value="${dict.dictValue}" th:checked="${dict.default}">
<label th:for="${'confirmTax_' + 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="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">
<textarea name="quotationExplain" class="form-control"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否为当前报价:</label>
<div class="col-sm-8">
<select name="currentQuote" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">登记人:</label>
<div class="col-sm-8">
<!-- <input name="registrant" class="form-control" type="text">-->
<select name="registrant" class="form-control m-b">
<option value="">请选择登记人</option>
</select>
</div>
</div>
<!--
<div class="division">
<h4>确认</h4>
</div>
<div class="form-group changeWidth">
<label class="col-sm-3 control-label">确认否:</label>
<div class="col-sm-8">
<select name="confirmNo" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group changeWidth">
<label class="col-sm-3 control-label">确认人:</label>
<div class="col-sm-8">
<input name="confirmName" class="form-control" type="text">
</div>
</div>
<div class="form-group changeWidth">
<label class="col-sm-3 control-label">确认时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="confirmTime" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="division">
<h4>审核</h4>
</div>
<div class="form-group changeWidth">
<label class="col-sm-3 control-label">审核否:</label>
<div class="col-sm-8">
<select name="auditNo" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group changeWidth">
<label class="col-sm-3 control-label">审核人:</label>
<div class="col-sm-8">
<input name="auditName" class="form-control" type="text">
</div>
</div>
<div class="form-group changeWidth">
<label class="col-sm-3 control-label">审核时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="auditTime" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="division">
<h4>核准</h4>
</div>
<div class="form-group changeWidth">
<label class="col-sm-3 control-label">核准否:</label>
<div class="col-sm-8">
<select name="approveNo" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group changeWidth">
<label class="col-sm-3 control-label">核准人:</label>
<div class="col-sm-8">
<input name="approveName" class="form-control" type="text">
</div>
</div>
<div class="form-group changeWidth">
<label class="col-sm-3 control-label">核准时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="approveTime" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>-->
<!-- <div class="form-group"> -->
<!-- <label class="col-sm-3 control-label">备用一:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <input name="standbyOne" class="form-control" type="text">-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="form-group"> -->
<!-- <label class="col-sm-3 control-label">备用二:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <input name="standbyTwo" class="form-control" type="text">-->
<!-- </div>-->
<!-- </div>-->
</form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: datetimepicker-js"/>
<script th:inline="javascript">
var prefix = ctx + "system/supplierquotation"
var supplierdata = []
$("#form-supplierquotation-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-supplierquotation-add').serialize());
}
}
$("input[name='pricingDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='confirmTime']").datetimepicker({
format: 'yyyy-mm-dd hh:ii:ss',
autoclose: true,
minView: 0,
minuteStep: 1
});
$("input[name='auditTime']").datetimepicker({
format: 'yyyy-mm-dd hh:ii:ss',
autoclose: true,
minView: 0,
minuteStep: 1
});
$("input[name='approveTime']").datetimepicker({
format: 'yyyy-mm-dd hh:ii:ss',
autoclose: true,
minView: 0,
minuteStep: 1
});
// 获取原辅料信息
var rawCodeList = [];
var subsidiaryCodeList = [];
var finishProductCodeList = [];
$.ajax({
url: ctx + "system/rawmaterial/list",
type: "POST",
async: false,
success: function (res) {
// console.log(1111111111)
// console.log(res.rows[1].rawMaterialCode)
for (var i = 0; i < res.rows.length; i++) {
rawCodeList.push(res.rows[i].rawMaterialCode)
}
}
})
//获取单号
$.ajax({
url: prefix + "/getId",
type: "post",
dateType: "json",
success: function (resp) {
if (resp.code === 0) {
$("input[name='quotationCode']").val(resp.data);
} else {
$.modal.msgError("失败啦");
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
});
$.ajax({
url: ctx + "system/subsidiarymaterial/list",
type: "POST",
async: false,
success: function (res) {
// console.log(1111111111)
// console.log(res.rows[0].subsidiaryMaterialCode)
for (i = 0; i < res.rows.length; i++) {
subsidiaryCodeList.push(res.rows[i].subsidiaryMaterialCode)
}
}
})
//获取登记人
$.ajax({
url: ctx + "system/user/list",
type: "post",
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
let userData = res.rows;
for (let i in userData) {
// console.log(finishProductData[i].finishProductCode)
$("#form-supplierquotation-add select[name='registrant']").append("<option value='" + userData[i].userName + "'>" + userData[i].userName + "</option>");
}
let userName = [[${@permission.getPrincipalProperty('userName')}]];
$("#form-supplierquotation-add select[name='registrant']").val(userName).trigger("change")
}
}
})
$.ajax({
url: ctx + "system/finishproduct/list",
type: "POST",
async: false,
success: function (res) {
// console.log(1111111111)
// console.log(res.rows[0].subsidiaryMaterialCode)
for (i = 0; i < res.rows.length; i++) {
finishProductCodeList.push(res.rows[i].finishProductCode)
}
}
})
var rawSubsidiaryCodeList = rawCodeList.concat(subsidiaryCodeList).concat(finishProductCodeList)
$("#rawSubsidiaryCode").select2({
tags: true,
placeholder: '请选择原辅料代码',
data: rawSubsidiaryCodeList,
allowClear: true
});
// 代码改变时
$("#rawSubsidiaryCode").change(function () {
const rawSubsidiaryCode = $(this).val();
console.log(subsidiaryCodeList)
console.log(subsidiaryCodeList.indexOf(rawSubsidiaryCode))
if (finishProductCodeList.indexOf(rawSubsidiaryCode) >= 0) {
$.ajax({
url: ctx + "system/finishproduct/getSubsidiaryCode",
type: "POST",
data: {
subsidiaryMaterialCode: $("#rawSubsidiaryCode").val()
},
success: function (res) {
console.log(res)
$("input[name='rawSubsidiaryName']").val(res.finishProductName)
$("input[name='specificationModel']").val(res.specificationModel)
$("input[name='typeMachine']").val(res.typeMachine)
$("input[name='inventoryUnit']").val(res.inventoryUnit)
$("select[name='supplierCode']").val(res.supplierCode).trigger("change")
$("select[name='supplierName']").val(res.supplierName).trigger("change")
}
})
} else if (subsidiaryCodeList.indexOf(rawSubsidiaryCode) >= 0) {
$.ajax({
url: ctx + "system/subsidiarymaterial/getSubsidiaryCode",
type: "POST",
data: {
subsidiaryMaterialCode: $("#rawSubsidiaryCode").val()
},
success: function (res) {
console.log(res)
$("input[name='rawSubsidiaryName']").val(res.subsidiaryMaterialName)
$("input[name='specificationModel']").val(res.specificationModel)
$("input[name='typeMachine']").val(res.typeMachine)
$("input[name='inventoryUnit']").val(res.inventoryUnit)
$("select[name='supplierCode']").val(res.supplierCode).trigger("change")
$("select[name='supplierName']").val(res.supplierName).trigger("change")
}
})
} else {
$.ajax({
url: ctx + "system/rawmaterial/getrawCode",
type: "POST",
data: {
rawMaterialCode: $("#rawSubsidiaryCode").val()
},
success: function (res) {
// console.log(res)
$("input[name='rawSubsidiaryName']").val(res.rawMaterialName)
$("input[name='specificationModel']").val(res.specificationModel)
$("input[name='typeMachine']").val(res.typeMachine)
$("input[name='inventoryUnit']").val(res.inventoryUnit)
$("select[name='supplierCode']").val(res.supplierCode).trigger("change")
$("select[name='supplierName']").val(res.supplierName).trigger("change")
}
})
}
})
// 供应商信息
$.ajax({
url: ctx + "system/supplier/list",
type: "POST",
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
supplierdata = res.rows;
//alert(JSON.stringify(data));
// console.log(res.rows)
for (let i in supplierdata) {
$("select[name='supplierCode']").append("<option value='" + supplierdata[i].supplierCode + "'>" + supplierdata[i].supplierCode + "</option>");
$("select[name='supplierName']").append("<option value='" + supplierdata[i].supplierName + "'>" + supplierdata[i].supplierName + "</option>");
}
} else {
$.modal.msgError(res.msg);
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
})
// 供应商编码改变
$("select[name='supplierCode']").change(function () {
var supplierCode = $(this).val();
for (i = 0; i < supplierdata.length; i++) {
if (supplierdata[i].supplierCode === supplierCode) {
$("select[name='supplierName']").val(supplierdata[i].supplierName).trigger("change")
}
}
})
// 自动获取当前时间
$("input[name='pricingDate']").datetimepicker("setDate", new Date());
/*
// 确认
$("select[name='confirmNo']").change(function () {
// console.log($(this).val())
if ($(this).val() == 1) {
$("input[name='confirmTime']").datetimepicker("setDate", new Date());
} else {
$("input[name='confirmTime']").val('')
}
})
// 审核
$("select[name='auditNo']").change(function () {
// console.log($(this).val())
if ($(this).val() == 1) {
$("input[name='auditTime']").datetimepicker("setDate", new Date());
} else {
$("input[name='auditTime']").val('')
}
})
// 核准
$("select[name='approveNo']").change(function () {
// console.log($(this).val())
if ($(this).val() == 1) {
$("input[name='approveTime']").datetimepicker("setDate", new Date());
} else {
$("input[name='approveTime']").val('')
}
})
*/
</script>
</body>
</html>

420
ruoyi-admin/src/main/resources/templates/system/supplierquotation/edit.html

@ -1,420 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改供应商报价')" />
<th:block th:include="include :: datetimepicker-css" />
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet">
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet">
</head>
<style>
.division {
width: 100%;
border-bottom: 1px solid #f1ecec;
padding: 10px 0 0;
margin-bottom: 30px;
}
.changeWidth{
width: 33% !important;
}
.col-sm-3 {
width: 26%;
}
</style>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-supplierquotation-edit" th:object="${sysSupplierQuotation}">
<input name="supplierQuotationId" th:field="*{supplierQuotationId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">报价编码:</label>
<div class="col-sm-8">
<input name="quotationCode" th:field="*{quotationCode}" class="form-control" type="text" required readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">原辅料代码:</label>
<div class="col-sm-8">
<!-- <select name="rawSubsidiaryCode" class="form-control m-b">-->
<!--&lt;!&ndash; <option value="">所有</option>&ndash;&gt;-->
<!-- </select>-->
<input name="rawSubsidiaryCode" th:field="*{rawSubsidiaryCode}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">原辅料名称:</label>
<div class="col-sm-8">
<input name="rawSubsidiaryName" th:field="*{rawSubsidiaryName}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">规格型号:</label>
<div class="col-sm-8">
<input name="specificationModel" th:field="*{specificationModel}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">机种:</label>
<div class="col-sm-8">
<input name="typeMachine" th:field="*{typeMachine}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料类别:</label>
<div class="col-sm-8">
<select name="materialType" class="form-control m-b" th:with="type=${@dict.getType('ck_meterialt_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{materialType}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">库存单位:</label>
<div class="col-sm-8">
<input name="inventoryUnit" th:field="*{inventoryUnit}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">币别:</label>
<div class="col-sm-8">
<select name="commonCurrency" class="form-control m-b" th:with="type=${@dict.getType('sys_common_currency')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{commonCurrency}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">库存单价:</label>
<div class="col-sm-8">
<input name="inventoryPrice" th:field="*{inventoryPrice}" 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="purchasingUnit" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_class')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{purchasingUnit}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">采购单价:</label>
<div class="col-sm-8">
<input name="purchasePrice" th:field="*{purchasePrice}" 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="relationalFormula" th:field="*{relationalFormula}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">供应商编号:</label>
<div class="col-sm-8">
<select name="supplierCode" class="form-control m-b" required>
<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 is-required">供应商名称:</label>
<div class="col-sm-8">
<select name="supplierName" class="form-control m-b" required>
<option value="">请选择供应商</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">定价日期:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="pricingDate" th:value="*{pricingDate}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">含税否:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}">
<input type="radio" th:id="${'confirmTax_' + dict.dictCode}" name="confirmTax" th:value="${dict.dictValue}" th:field="*{confirmTax}">
<label th:for="${'confirmTax_' + 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="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">
<textarea name="quotationExplain" class="form-control">[[*{quotationExplain}]]</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否为当前报价:</label>
<div class="col-sm-8">
<select name="currentQuote" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{currentQuote}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">登记人:</label>
<div class="col-sm-8">
<!-- <input name="registrant" th:field="*{registrant}" class="form-control" type="text">-->
<select name="registrant" class="form-control m-b" th:field="*{registrant}">
<option value="">请选择登记人</option>
</select>
</div>
</div>
<!--<div class="division">
<h4>确认</h4>
</div>
<div class="form-group changeWidth">
<label class="col-sm-3 control-label">确认否:</label>
<div class="col-sm-8">
<select name="confirmNo" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{confirmNo}"></option>
</select>
</div>
</div>
<div class="form-group changeWidth">
<label class="col-sm-3 control-label">确认人:</label>
<div class="col-sm-8">
<input name="confirmName" th:field="*{confirmName}" class="form-control" type="text">
</div>
</div>
<div class="form-group changeWidth">
<label class="col-sm-3 control-label">确认时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="confirmTime" th:value="*{confirmTime}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="division">
<h4>审核</h4>
</div>
<div class="form-group changeWidth">
<label class="col-sm-3 control-label">审核否:</label>
<div class="col-sm-8">
<select name="auditNo" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{auditNo}"></option>
</select>
</div>
</div>
<div class="form-group changeWidth">
<label class="col-sm-3 control-label">审核人:</label>
<div class="col-sm-8">
<input name="auditName" th:field="*{auditName}" class="form-control" type="text">
</div>
</div>
<div class="form-group changeWidth">
<label class="col-sm-3 control-label">审核时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="auditTime" th:value="*{auditTime}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="division">
<h4>核准</h4>
</div>
<div class="form-group changeWidth">
<label class="col-sm-3 control-label">核准否:</label>
<div class="col-sm-8">
<select name="approveNo" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{approveNo}"></option>
</select>
</div>
</div>
<div class="form-group changeWidth">
<label class="col-sm-3 control-label">核准人:</label>
<div class="col-sm-8">
<input name="approveName" th:field="*{approveName}" class="form-control" type="text">
</div>
</div>
<div class="form-group changeWidth">
<label class="col-sm-3 control-label">核准时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="approveTime" th:value="*{approveTime}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>-->
<!-- <div class="form-group"> -->
<!-- <label class="col-sm-3 control-label">备用一:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <input name="standbyOne" th:field="*{standbyOne}" class="form-control" type="text">-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="form-group"> -->
<!-- <label class="col-sm-3 control-label">备用二:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <input name="standbyTwo" th:field="*{standbyTwo}" class="form-control" type="text">-->
<!-- </div>-->
<!-- </div>-->
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var getData = [[${sysSupplierQuotation}]];
var supplierdata=[]
var prefix = ctx + "system/supplierquotation";
$("#form-supplierquotation-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-supplierquotation-edit').serialize());
}
}
$("input[name='pricingDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='confirmTime']").datetimepicker({
format: 'yyyy-mm-dd hh:ii:ss',
autoclose: true,
minView: 0,
minuteStep:1
});
$("input[name='auditTime']").datetimepicker({
format: 'yyyy-mm-dd hh:ii:ss',
autoclose: true,
minView: 0,
minuteStep:1
});
$("input[name='approveTime']").datetimepicker({
format: 'yyyy-mm-dd hh:ii:ss',
autoclose: true,
minView: 0,
minuteStep:1
});
$(document).ready(function () {
let getData = [[${sysSupplierQuotation}]];
// console.log("!!!!!!!!!!!!!!!!!!!!!!!!!1")
// console.log(getData)
// $("select[name='rawSubsidiaryCode']").val(getData.rawSubsidiaryCode)
// rawSubsidiaryCode
})
// 时间
// 确认
$("select[name='confirmNo']").change(function (){
// console.log($(this).val())
if($(this).val()==1){
$("input[name='confirmTime']").datetimepicker("setDate",new Date());
}
else {
$("input[name='confirmTime']").val('')
}
})
// 审核
$("select[name='auditNo']").change(function (){
// console.log($(this).val())
if($(this).val()==1){
$("input[name='auditTime']").datetimepicker("setDate",new Date());
}
else {
$("input[name='auditTime']").val('')
}
})
// 核准
$("select[name='approveNo']").change(function (){
// console.log($(this).val())
if($(this).val()==1){
$("input[name='approveTime']").datetimepicker("setDate",new Date());
}
else {
$("input[name='approveTime']").val('')
}
});
// 供销商信息
$.ajax({
url: ctx + "system/supplier/list",
type: "POST",
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
supplierdata = res.rows;
//alert(JSON.stringify(data));
// console.log(res.rows)
for (let i in supplierdata) {
$("select[name='supplierCode']").append("<option value='" + supplierdata[i].supplierCode + "'>" + supplierdata[i].supplierCode + "</option>");
$("select[name='supplierName']").append("<option value='" + supplierdata[i].supplierName + "'>" + supplierdata[i].supplierName + "</option>");
}
$("select[name='supplierCode']").val(getData.supplierCode).trigger("change")
$("select[name='supplierName']").val(getData.supplierName).trigger("change")
} else {
$.modal.msgError(res.msg);
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
})
//获取登记人
$.ajax({
url: ctx + "system/user/list",
type: "post",
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
let userData = res.rows;
for (let i in userData) {
// console.log(finishProductData[i].finishProductCode)
$("#form-supplierquotation-edit select[name='registrant']").append("<option value='" + userData[i].userName + "'>" + userData[i].userName + "</option>");
}
$("#form-supplierquotation-edit select[name='registrant']").val(getData.registrant).trigger("change")
} else {
$.modal.msgError(res.msg);
}
}
})
$("select[name='supplierCode']").change(function () {
var supplierCode = $(this).val();
for (i = 0; i < supplierdata.length; i++) {
if (supplierdata[i].supplierCode == supplierCode) {
$("select[name='supplierName']").val(supplierdata[i].supplierName).trigger("change")
}
}
})
</script>
</body>
</html>

668
ruoyi-admin/src/main/resources/templates/system/supplierquotation/supplierquotation.html

@ -1,668 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('供应商报价列表')"/>
<th:block th:include="include :: datetimepicker-css"/>
</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="quotationCode"/>
</li>
<li>
<label>原辅料代码:</label>
<!-- <select name="rawSubsidiaryCode">-->
<!-- <option value="">所有</option>-->
<!-- <option value="-1">代码生成请选择字典属性</option>-->
<!-- </select>-->
<input type="text" name="rawSubsidiaryCode"/>
</li>
<li>
<label>原辅料名称:</label>
<input type="text" name="rawSubsidiaryName"/>
</li>
<li>
<label>供应商名称:</label>
<!-- <select name="supplierName">-->
<!-- <option value="">所有</option>-->
<!-- <option value="-1">代码生成请选择字典属性</option>-->
<!-- </select>-->
<input type="text" name="supplierName"/>
</li>
<li>
<label>是否为当前报价:</label>
<select name="currentQuote" th:with="type=${@dict.getType('sys_whether')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>确认否:</label>
<select name="confirmNo" th:with="type=${@dict.getType('sys_whether')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>审核否:</label>
<select name="auditNo" th:with="type=${@dict.getType('sys_whether')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>核准否:</label>
<select name="approveNo" th:with="type=${@dict.getType('sys_whether')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:supplierquotation:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()"
shiro:hasPermission="system:supplierquotation:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()"
shiro:hasPermission="system:supplierquotation:remove">
<i class="fa fa-remove"></i> 删除
</a>
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()"-->
<!-- shiro:hasPermission="system:supplierquotation:export">-->
<!-- <i class="fa fa-download"></i> 导出-->
<!-- </a>-->
<a class="btn btn-info" onclick="quotationAudit()" shiro:hasPermission="system:supplierquotation:audit">
<i class="fa fa-file-text"></i> 审核
</a>
<a class="btn btn-success" onclick="quotationConfirm()" shiro:hasPermission="system:supplierquotation:confirm">
<i class="fa fa-hand-grab-o"></i> 确认
</a>
<a class="btn btn-primary" onclick="quotationApprove()" shiro:hasPermission="system:supplierquotation:approved">
<i class="fa fa-hand-grab-o"></i> 核准
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" style="white-space:nowrap"></table>
</div>
</div>
</div>
<!--审核确认-->
<div class="modal fade" id="AuditModel">
<div class="modal-dialog">
<div class="modal-content message_align">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">×</span></button>
<h4 class="modal-title">审核信息</h4>
</div>
<div class="modal-body" style="height: 180px">
<form id="form-audit-edit">
<div class="form-group" style="display: none">
<label class="col-sm-3 control-label is-required">供应商报价id:</label>
<div class="col-sm-8">
<input id="supplierQuotationId" name="supplierQuotationId" class="form-control" type="text"
required
readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">审核否:</label>
<div class="col-sm-8">
<select id="auditNo" name="auditNo" class="form-control"
th:with="type=${@dict.getType('sys_whether')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">审核时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input id="auditTime" name="auditTime" class="form-control "
placeholder="yyyy-MM-dd HH:mm:ss" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">审核人:</label>
<div class="col-sm-8">
<input id="auditName" name="auditName" class="form-control" type="text">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button type="button" onclick="AuditConfirmSubmit()" class="btn btn-success" data-dismiss="modal">确定
</button>
</div>
</div>
</div>
</div>
<div class="alert alert-success hide">审核成功</div>
<!--核准-->
<div class="modal fade" id="approveModel">
<div class="modal-dialog">
<div class="modal-content message_align">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">×</span></button>
<h4 class="modal-title">核准信息</h4>
</div>
<div class="modal-body" style="height: 180px">
<form id="form-approve-edit">
<div class="form-group" style="display: none">
<label class="col-sm-3 control-label is-required">供应商报价id:</label>
<div class="col-sm-8">
<input id="supplierQuotationId3" name="supplierQuotationId" class="form-control" type="text"
required
readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">核准否:</label>
<div class="col-sm-8">
<select id="approveNo" name="approveNo" class="form-control"
th:with="type=${@dict.getType('sys_whether')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">核准时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input id="approveTime" name="approveTime" class="form-control"
placeholder="yyyy-mm-dd hh:ii:ss" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">核准人:</label>
<div class="col-sm-8">
<input id="approveName" name="approveName" class="form-control" type="text">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button type="button" onclick="ApproveConfirmSubmit()" class="btn btn-success" data-dismiss="modal">确定
</button>
</div>
</div>
</div>
</div>
<div class="alert alert-warning hide">供应商报价已核准</div>
<!--确认-->
<div class="modal fade" id="confirmModel">
<div class="modal-dialog">
<div class="modal-content message_align">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">×</span></button>
<h4 class="modal-title">确认信息</h4>
</div>
<div class="modal-body" style="height: 180px">
<form id="form-confirm-edit">
<div class="form-group" style="display: none">
<label class="col-sm-3 control-label is-required">供应商报价id:</label>
<div class="col-sm-8">
<input id="supplierQuotationId2" name="supplierQuotationId" class="form-control" type="text"
required
readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">确认否:</label>
<div class="col-sm-8">
<select id="confirmNo" name="confirmNo" class="form-control"
th:with="type=${@dict.getType('sys_whether')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">确认日期:</label>
<div class="col-sm-8">
<div class="input-group date">
<input id="confirmTime" name="confirmTime" class="form-control"
placeholder="yyyy-mm-dd hh:ii:ss" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">确认人:</label>
<div class="col-sm-8">
<input id="confirmName" name="confirmName" class="form-control" type="text">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button type="button" onclick="ConfirmSubmit()" class="btn btn-success" data-dismiss="modal">确定</button>
</div>
</div>
</div>
</div>
<div class="alert alert-info hide">供应商报价已确认</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:supplierquotation:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:supplierquotation:remove')}]];
var commonCurrencyDatas = [[${@dict.getType('sys_common_currency')}]];
var materialTypeDatas = [[${@dict.getType('ck_meterialt_type')}]];
var purchasingUnitDatas = [[${@dict.getType('sys_unit_class')}]];
var confirmTaxDatas = [[${@dict.getType('sys_whether')}]];
var currentQuoteDatas = [[${@dict.getType('sys_whether')}]];
var confirmNoDatas = [[${@dict.getType('sys_whether')}]];
var auditNoDatas = [[${@dict.getType('sys_whether')}]];
var approveNoDatas = [[${@dict.getType('sys_whether')}]];
var prefix = ctx + "system/supplierquotation";
$(function () {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
clickToSelect: true,
modalName: "供应商报价",
columns: [{
checkbox: true
},
{
field: 'supplierQuotationId',
title: '供应商报价id',
visible: false
},
{
field: 'auditNo',
title: '审核否',
formatter: function (value, row, index) {
// return $.table.selectDictLabel(auditNoDatas, value);
var actions = [];
if ($.table.selectDictLabel(auditNoDatas, value) == "<span class=''></span>") {
actions.push('<a class="btn btn-primary btn-xs disabled">已审核</a> ');
} else {
actions.push('<a class="btn btn-danger btn-xs disabled">未审核</a> ');
}
return actions.join('');
}
},
{
field: 'confirmNo',
title: '确认否',
formatter: function (value, row, index) {
// return $.table.selectDictLabel(confirmNoDatas, value);
var actions = [];
if ($.table.selectDictLabel(confirmNoDatas, value) == "<span class=''></span>") {
actions.push('<a class="btn btn-primary btn-xs disabled">已确认</a> ');
} else {
actions.push('<a class="btn btn-danger btn-xs disabled">未确认</a> ');
}
return actions.join('');
}
},
{
field: 'approveNo',
title: '核准否',
formatter: function (value, row, index) {
// return $.table.selectDictLabel(confirmNoDatas, value);
var actions = [];
if ($.table.selectDictLabel(approveNoDatas, value) == "<span class=''></span>") {
actions.push('<a class="btn btn-primary btn-xs disabled">已核准</a> ');
} else {
actions.push('<a class="btn btn-danger btn-xs disabled">未核准</a> ');
}
return actions.join('');
}
},
{
field: 'quotationCode',
title: '报价编码'
},
{
field: 'rawSubsidiaryCode',
title: '原辅料代码'
},
{
field: 'rawSubsidiaryName',
title: '原辅料名称'
},
{
field: 'specificationModel',
title: '规格型号'
},
{
field: 'typeMachine',
title: '机种'
},
{
field: 'materialType',
title: '物料类别',
formatter: function (value, row, index) {
return $.table.selectDictLabel(materialTypeDatas, value);
}
},
{
field: 'inventoryUnit',
title: '库存单位'
},
{
field: 'commonCurrency',
title: '币别',
formatter: function (value, row, index) {
return $.table.selectDictLabel(commonCurrencyDatas, value);
}
},
{
field: 'inventoryPrice',
title: '库存单价'
},
{
field: 'purchasingUnit',
title: '采购单位',
formatter: function (value, row, index) {
return $.table.selectDictLabel(purchasingUnitDatas, value);
}
},
{
field: 'purchasePrice',
title: '采购单价'
},
{
field: 'relationalFormula',
title: '关系公式'
},
{
field: 'supplierCode',
title: '供应商编号'
},
{
field: 'supplierName',
title: '供应商名称'
},
{
field: 'pricingDate',
title: '定价日期'
},
{
field: 'confirmTax',
title: '含税否',
formatter: function (value, row, index) {
return $.table.selectDictLabel(confirmTaxDatas, value);
}
},
{
field: 'taxRate',
title: '税率'
},
{
field: 'quotationExplain',
title: '说明'
},
{
field: 'currentQuote',
title: '是否为当前报价',
formatter: function (value, row, index) {
return $.table.selectDictLabel(currentQuoteDatas, value);
}
},
{
field: 'registrant',
title: '登记人'
},
{
field: 'confirmName',
title: '确认人'
},
{
field: 'confirmTime',
title: '确认时间'
},
{
field: 'auditName',
title: '审核人'
},
{
field: 'auditTime',
title: '审核时间'
},
{
field: 'approveName',
title: '核准人'
},
{
field: 'approveTime',
title: '核准时间'
},
{
field: 'standbyOne',
title: '备用一',
visible: false
},
{
field: 'standbyTwo',
title: '备用二',
visible: false
},
{
field: 'firstAddTime',
title: '录入时间',
formatter: function (value, row, index) {
if (value == null) {
return " ";
} else {
return value;
}
}
},
{
field: 'updateInfoTime',
title: '上次修改时间',
formatter: function (value, row, index) {
if (value == null) {
return " ";
} else {
var vArr = value.split(',')
return vArr[0];
}
}
}
// {
// 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.supplierQuotationId + '\')"><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.supplierQuotationId + '\')"><i class="fa fa-remove"></i>删除</a>');
// return actions.join('');
// }
// }
]
};
$.table.init(options);
});
// 审核确认
function quotationAudit() {
let data = $("#bootstrap-table").bootstrapTable("getSelections");
let userName = [[${@permission.getPrincipalProperty('userName')}]];
if (data.length === 1) {
$("#customerId").val(data[0].customerId)
$("#deginfalg").val(1).trigger("change")
$("#updateby").val(userName)
$("#updateTime").datetimepicker("setDate", new Date());
$("#AuditModel").modal("show");
} else {
$.modal.alert("请选择一条数据");
}
}
// 审核确认
function AuditConfirmSubmit() {
var auditNo = $("#auditNo").val()
$.ajax({
url: prefix + "/edit",
type: "post",
resultType: "json",
data: $('#form-audit-edit').serialize(),
success: function (resp) {
console.log(resp)
$("#bootstrap-table").bootstrapTable('refresh');
// $(".alert-success").addClass("show");
// window.setTimeout(function () {
// $(".alert-success").removeClass("show");
// }, 1000);//显示的时间
if (auditNo == 1) {
$.modal.msgSuccess("审核成功!")
} else if (auditNo == 0) {
$.modal.msgSuccess("取消审核成功!")
}
},
error: function () {
$.modal.msgError("出错了!");
}
});
}
// 确认
function quotationConfirm() {
let data = $("#bootstrap-table").bootstrapTable("getSelections");
let userName = [[${@permission.getPrincipalProperty('userName')}]];
if (data.length === 1) {
$("#supplierQuotationId2").val(data[0].supplierQuotationId)
$("#confirmNo").val(1).trigger("change")
$("#confirmName").val(userName)
$("#confirmTime").datetimepicker("setDate", new Date());
$("#confirmModel").modal("show");
} else {
$.modal.alert("请选择一条数据");
}
}
// 确认
function ConfirmSubmit() {
var confirmNo = $("#confirmNo").val()
$.ajax({
url: prefix + "/edit",
type: "post",
resultType: "json",
data: $('#form-confirm-edit').serialize(),
success: function (resp) {
console.log(resp)
$("#bootstrap-table").bootstrapTable('refresh');
// $(".alert-info").addClass("show");
// window.setTimeout(function () {
// $(".alert-info").removeClass("show");
// }, 1000);//显示的时间
if (confirmNo == 1) {
$.modal.msgSuccess("确认成功!")
} else if (confirmNo == 0) {
$.modal.msgSuccess("取消确认成功!")
}
},
error: function () {
$.modal.msgError("出错了!");
}
});
}
// 核准
function quotationApprove() {
let data = $("#bootstrap-table").bootstrapTable("getSelections");
let userName = [[${@permission.getPrincipalProperty('userName')}]];
if (data.length === 1) {
$("#supplierQuotationId3").val(data[0].supplierQuotationId)
$("#approveNo").val(1).trigger("change")
$("#approveName").val(userName)
$("#approveTime").datetimepicker("setDate", new Date());
$("#approveModel").modal("show");
} else {
$.modal.alert("请选择一条数据");
}
}
// 核准
function ApproveConfirmSubmit() {
var approveNo = $("#approveNo").val()
$.ajax({
url: prefix + "/edit",
type: "post",
resultType: "json",
data: $('#form-approve-edit').serialize(),
success: function (resp) {
$("#bootstrap-table").bootstrapTable('refresh');
// $(".alert-warning").addClass("show");
// window.setTimeout(function () {
// $(".alert-warning").removeClass("show");
// }, 1000);//显示的时间
if (approveNo == 1) {
$.modal.msgSuccess("核准成功!")
} else if (approveNo == 0) {
$.modal.msgSuccess("取消核准成功!")
}
},
error: function () {
$.modal.msgError("出错了!");
}
});
}
</script>
</body>
</html>
Loading…
Cancel
Save