Browse Source

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

dev
liuxiaoxu 1 month ago
parent
commit
d3bd5affb2
  1. 137
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysQutsourcingQuotationController.java
  2. 483
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysQutsourcingQuotation.java
  3. 61
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysQutsourcingQuotationMapper.java
  4. 64
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysQutsourcingQuotationService.java
  5. 102
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysQutsourcingQuotationServiceImpl.java
  6. 184
      ruoyi-admin/src/main/resources/mapper/system/SysQutsourcingQuotationMapper.xml
  7. 533
      ruoyi-admin/src/main/resources/templates/system/qutsourcingquotation/add.html
  8. 441
      ruoyi-admin/src/main/resources/templates/system/qutsourcingquotation/edit.html
  9. 650
      ruoyi-admin/src/main/resources/templates/system/qutsourcingquotation/qutsourcingquotation.html

137
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysQutsourcingQuotationController.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.SysQutsourcingQuotation;
import com.ruoyi.system.service.ISysQutsourcingQuotationService;
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-10
*/
@Controller
@RequestMapping("/system/qutsourcingquotation")
public class SysQutsourcingQuotationController extends BaseController
{
private String prefix = "system/qutsourcingquotation";
@Autowired
private ISysQutsourcingQuotationService sysQutsourcingQuotationService;
@RequiresPermissions("system:qutsourcingquotation:view")
@GetMapping()
public String qutsourcingquotation()
{
return prefix + "/qutsourcingquotation";
}
/**
* 查询委外报价列表
*/
@RequiresPermissions("system:qutsourcingquotation:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(SysQutsourcingQuotation sysQutsourcingQuotation)
{
startPage();
List<SysQutsourcingQuotation> list = sysQutsourcingQuotationService.selectSysQutsourcingQuotationList(sysQutsourcingQuotation);
return getDataTable(list);
}
/**
* 导出委外报价列表
*/
@RequiresPermissions("system:qutsourcingquotation:export")
@Log(title = "委外报价", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysQutsourcingQuotation sysQutsourcingQuotation)
{
List<SysQutsourcingQuotation> list = sysQutsourcingQuotationService.selectSysQutsourcingQuotationList(sysQutsourcingQuotation);
ExcelUtil<SysQutsourcingQuotation> util = new ExcelUtil<SysQutsourcingQuotation>(SysQutsourcingQuotation.class);
return util.exportExcel(list, "委外报价数据");
}
/**
* 新增委外报价
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存委外报价
*/
@RequiresPermissions("system:qutsourcingquotation:add")
@Log(title = "委外报价", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(SysQutsourcingQuotation sysQutsourcingQuotation)
{
return toAjax(sysQutsourcingQuotationService.insertSysQutsourcingQuotation(sysQutsourcingQuotation));
}
/**
* 修改委外报价
*/
@GetMapping("/edit/{qutsourcingQuotationId}")
public String edit(@PathVariable("qutsourcingQuotationId") Long qutsourcingQuotationId, ModelMap mmap)
{
SysQutsourcingQuotation sysQutsourcingQuotation = sysQutsourcingQuotationService.selectSysQutsourcingQuotationById(qutsourcingQuotationId);
mmap.put("sysQutsourcingQuotation", sysQutsourcingQuotation);
return prefix + "/edit";
}
/**
* 修改保存委外报价
*/
@RequiresPermissions("system:qutsourcingquotation:edit")
@Log(title = "委外报价", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysQutsourcingQuotation sysQutsourcingQuotation)
{
return toAjax(sysQutsourcingQuotationService.updateSysQutsourcingQuotation(sysQutsourcingQuotation));
}
/**
* 删除委外报价
*/
@RequiresPermissions("system:qutsourcingquotation:remove")
@Log(title = "委外报价", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(sysQutsourcingQuotationService.deleteSysQutsourcingQuotationByIds(ids));
}
/**
* 获取报价编号
*/
@PostMapping("/getId")
@ResponseBody
public Result getId() throws Exception {
return Result.getSuccessResult(sysQutsourcingQuotationService.getId());
}
}

483
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysQutsourcingQuotation.java

@ -1,483 +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_qutsourcing_quotation
*
* @author ruoyi
* @date 2022-11-10
*/
public class SysQutsourcingQuotation extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 委外报价id */
private Long qutsourcingQuotationId;
/** 报价编码 */
@Excel(name = "报价编码")
private String quotationCode;
/** 物料代码 */
@Excel(name = "物料代码")
private String materialCode;
/** 物料名称 */
@Excel(name = "物料名称")
private String materialName;
/** 规格型号 */
@Excel(name = "规格型号")
private String specificationModel;
/** 成品机种 */
@Excel(name = "成品机种")
private String typeMachine;
/** 计量单位 */
@Excel(name = "计量单位")
private String measurementUnit;
/** 报价币别 */
@Excel(name = "报价币别")
private String commonCurrency;
/** 加工单价 */
@Excel(name = "加工单价")
private String processPrice;
/** 加工工序名称 */
@Excel(name = "加工工序名称")
private String processingProcedureName;
/** 加工工序编号 */
@Excel(name = "加工工序编号")
private String processingProcedureCode;
/** 加工商编号 */
@Excel(name = "加工商编号")
private String converterCode;
/** 加工商名称 */
@Excel(name = "加工商名称")
private String converterName;
/** 报价日期 */
@Excel(name = "报价日期")
private String pricingDate;
/** 库存单位 */
@Excel(name = "库存单位")
private String inventoryUnit;
/** 交税税率 */
@Excel(name = "交税税率")
private String taxRate;
/** 每采购单位对应多少库存单位 */
@Excel(name = "每采购单位对应多少库存单位")
private String relationalFormula;
/** 备注 */
@Excel(name = "备注")
private String quotationExplain;
/** 是否为当前报价 */
@Excel(name = "是否为当前报价")
private String currentQuote;
/** 登记人 */
@Excel(name = "登记人")
private String registrant;
/** 确认否 */
@Excel(name = "确认否")
private String confirmNo;
/** 确认人 */
@Excel(name = "确认人")
private String confirmName;
/** 确认时间 */
@Excel(name = "确认时间")
private String confirmTime;
/** 审核否 */
@Excel(name = "审核否")
private String auditNo;
/** 审核人 */
@Excel(name = "审核人")
private String auditName;
/** 审核时间 */
@Excel(name = "审核时间")
private String auditTime;
/** 核准否 */
@Excel(name = "核准否")
private String approveNo;
/** 核准人 */
@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 setQutsourcingQuotationId(Long qutsourcingQuotationId)
{
this.qutsourcingQuotationId = qutsourcingQuotationId;
}
public Long getQutsourcingQuotationId()
{
return qutsourcingQuotationId;
}
public void setQuotationCode(String quotationCode)
{
this.quotationCode = quotationCode;
}
public String getQuotationCode()
{
return quotationCode;
}
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 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 void setMeasurementUnit(String measurementUnit)
{
this.measurementUnit = measurementUnit;
}
public String getMeasurementUnit()
{
return measurementUnit;
}
public void setCommonCurrency(String commonCurrency)
{
this.commonCurrency = commonCurrency;
}
public String getCommonCurrency()
{
return commonCurrency;
}
public void setProcessPrice(String processPrice)
{
this.processPrice = processPrice;
}
public String getProcessPrice()
{
return processPrice;
}
public void setProcessingProcedureName(String processingProcedureName)
{
this.processingProcedureName = processingProcedureName;
}
public String getProcessingProcedureName()
{
return processingProcedureName;
}
public void setProcessingProcedureCode(String processingProcedureCode)
{
this.processingProcedureCode = processingProcedureCode;
}
public String getProcessingProcedureCode()
{
return processingProcedureCode;
}
public void setConverterCode(String converterCode)
{
this.converterCode = converterCode;
}
public String getConverterCode()
{
return converterCode;
}
public void setConverterName(String converterName)
{
this.converterName = converterName;
}
public String getConverterName()
{
return converterName;
}
public void setPricingDate(String pricingDate)
{
this.pricingDate = pricingDate;
}
public String getPricingDate()
{
return pricingDate;
}
public void setInventoryUnit(String inventoryUnit)
{
this.inventoryUnit = inventoryUnit;
}
public String getInventoryUnit()
{
return inventoryUnit;
}
public void setTaxRate(String taxRate)
{
this.taxRate = taxRate;
}
public String getTaxRate()
{
return taxRate;
}
public void setRelationalFormula(String relationalFormula)
{
this.relationalFormula = relationalFormula;
}
public String getRelationalFormula()
{
return relationalFormula;
}
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 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 setAuditNo(String auditNo)
{
this.auditNo = auditNo;
}
public String getAuditNo()
{
return auditNo;
}
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 setApproveNo(String approveNo)
{
this.approveNo = approveNo;
}
public String getApproveNo()
{
return approveNo;
}
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("qutsourcingQuotationId", getQutsourcingQuotationId())
.append("quotationCode", getQuotationCode())
.append("materialCode", getMaterialCode())
.append("materialName", getMaterialName())
.append("specificationModel", getSpecificationModel())
.append("typeMachine", getTypeMachine())
.append("measurementUnit", getMeasurementUnit())
.append("commonCurrency", getCommonCurrency())
.append("processPrice", getProcessPrice())
.append("processingProcedureName", getProcessingProcedureName())
.append("processingProcedureCode", getProcessingProcedureCode())
.append("converterCode", getConverterCode())
.append("converterName", getConverterName())
.append("pricingDate", getPricingDate())
.append("inventoryUnit", getInventoryUnit())
.append("taxRate", getTaxRate())
.append("relationalFormula", getRelationalFormula())
.append("quotationExplain", getQuotationExplain())
.append("currentQuote", getCurrentQuote())
.append("registrant", getRegistrant())
.append("confirmNo", getConfirmNo())
.append("confirmName", getConfirmName())
.append("confirmTime", getConfirmTime())
.append("auditNo", getAuditNo())
.append("auditName", getAuditName())
.append("auditTime", getAuditTime())
.append("approveNo", getApproveNo())
.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/SysQutsourcingQuotationMapper.java

@ -1,61 +0,0 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.SysQutsourcingQuotation;
/**
* 委外报价Mapper接口
*
* @author ruoyi
* @date 2022-11-10
*/
public interface SysQutsourcingQuotationMapper
{
/**
* 查询委外报价
*
* @param qutsourcingQuotationId 委外报价ID
* @return 委外报价
*/
public SysQutsourcingQuotation selectSysQutsourcingQuotationById(Long qutsourcingQuotationId);
/**
* 查询委外报价列表
*
* @param sysQutsourcingQuotation 委外报价
* @return 委外报价集合
*/
public List<SysQutsourcingQuotation> selectSysQutsourcingQuotationList(SysQutsourcingQuotation sysQutsourcingQuotation);
/**
* 新增委外报价
*
* @param sysQutsourcingQuotation 委外报价
* @return 结果
*/
public int insertSysQutsourcingQuotation(SysQutsourcingQuotation sysQutsourcingQuotation);
/**
* 修改委外报价
*
* @param sysQutsourcingQuotation 委外报价
* @return 结果
*/
public int updateSysQutsourcingQuotation(SysQutsourcingQuotation sysQutsourcingQuotation);
/**
* 删除委外报价
*
* @param qutsourcingQuotationId 委外报价ID
* @return 结果
*/
public int deleteSysQutsourcingQuotationById(Long qutsourcingQuotationId);
/**
* 批量删除委外报价
*
* @param qutsourcingQuotationIds 需要删除的数据ID
* @return 结果
*/
public int deleteSysQutsourcingQuotationByIds(String[] qutsourcingQuotationIds);
}

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

@ -1,64 +0,0 @@
package com.ruoyi.system.service;
import com.ruoyi.system.domain.SysQutsourcingQuotation;
import java.util.List;
/**
* 委外报价Service接口
*
* @author ruoyi
* @date 2022-11-10
*/
public interface ISysQutsourcingQuotationService
{
/**
* 查询委外报价
*
* @param qutsourcingQuotationId 委外报价ID
* @return 委外报价
*/
public SysQutsourcingQuotation selectSysQutsourcingQuotationById(Long qutsourcingQuotationId);
/**
* 查询委外报价列表
*
* @param sysQutsourcingQuotation 委外报价
* @return 委外报价集合
*/
public List<SysQutsourcingQuotation> selectSysQutsourcingQuotationList(SysQutsourcingQuotation sysQutsourcingQuotation);
/**
* 新增委外报价
*
* @param sysQutsourcingQuotation 委外报价
* @return 结果
*/
public int insertSysQutsourcingQuotation(SysQutsourcingQuotation sysQutsourcingQuotation);
/**
* 修改委外报价
*
* @param sysQutsourcingQuotation 委外报价
* @return 结果
*/
public int updateSysQutsourcingQuotation(SysQutsourcingQuotation sysQutsourcingQuotation);
/**
* 批量删除委外报价
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteSysQutsourcingQuotationByIds(String ids);
/**
* 删除委外报价信息
*
* @param qutsourcingQuotationId 委外报价ID
* @return 结果
*/
public int deleteSysQutsourcingQuotationById(Long qutsourcingQuotationId);
public String getId();
}

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

@ -1,102 +0,0 @@
package com.ruoyi.system.service.impl;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.SysQutsourcingQuotation;
import com.ruoyi.system.mapper.SysQutsourcingQuotationMapper;
import com.ruoyi.system.service.ISysQutsourcingQuotationService;
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-10
*/
@Service
public class SysQutsourcingQuotationServiceImpl implements ISysQutsourcingQuotationService
{
@Autowired
private SysQutsourcingQuotationMapper sysQutsourcingQuotationMapper;
/**
* 查询委外报价
*
* @param qutsourcingQuotationId 委外报价ID
* @return 委外报价
*/
@Override
public SysQutsourcingQuotation selectSysQutsourcingQuotationById(Long qutsourcingQuotationId)
{
return sysQutsourcingQuotationMapper.selectSysQutsourcingQuotationById(qutsourcingQuotationId);
}
/**
* 查询委外报价列表
*
* @param sysQutsourcingQuotation 委外报价
* @return 委外报价
*/
@Override
public List<SysQutsourcingQuotation> selectSysQutsourcingQuotationList(SysQutsourcingQuotation sysQutsourcingQuotation)
{
return sysQutsourcingQuotationMapper.selectSysQutsourcingQuotationList(sysQutsourcingQuotation);
}
/**
* 新增委外报价
*
* @param sysQutsourcingQuotation 委外报价
* @return 结果
*/
@Override
public int insertSysQutsourcingQuotation(SysQutsourcingQuotation sysQutsourcingQuotation)
{
return sysQutsourcingQuotationMapper.insertSysQutsourcingQuotation(sysQutsourcingQuotation);
}
/**
* 修改委外报价
*
* @param sysQutsourcingQuotation 委外报价
* @return 结果
*/
@Override
public int updateSysQutsourcingQuotation(SysQutsourcingQuotation sysQutsourcingQuotation)
{
return sysQutsourcingQuotationMapper.updateSysQutsourcingQuotation(sysQutsourcingQuotation);
}
/**
* 删除委外报价对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteSysQutsourcingQuotationByIds(String ids)
{
return sysQutsourcingQuotationMapper.deleteSysQutsourcingQuotationByIds(Convert.toStrArray(ids));
}
/**
* 删除委外报价信息
*
* @param qutsourcingQuotationId 委外报价ID
* @return 结果
*/
@Override
public int deleteSysQutsourcingQuotationById(Long qutsourcingQuotationId)
{
return sysQutsourcingQuotationMapper.deleteSysQutsourcingQuotationById(qutsourcingQuotationId);
}
@Override
public String getId() {
String time = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(System.currentTimeMillis());
return "BJ" + time.substring(2);
}
}

184
ruoyi-admin/src/main/resources/mapper/system/SysQutsourcingQuotationMapper.xml

@ -1,184 +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.SysQutsourcingQuotationMapper">
<resultMap type="SysQutsourcingQuotation" id="SysQutsourcingQuotationResult">
<result property="qutsourcingQuotationId" column="qutsourcing_quotation_id" />
<result property="quotationCode" column="quotation_code" />
<result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" />
<result property="specificationModel" column="specification_model" />
<result property="typeMachine" column="type_machine" />
<result property="measurementUnit" column="measurement_unit" />
<result property="commonCurrency" column="common_currency" />
<result property="processPrice" column="process_price" />
<result property="processingProcedureName" column="processing_procedure_name" />
<result property="processingProcedureCode" column="processing_procedure_code" />
<result property="converterCode" column="converter_code" />
<result property="converterName" column="converter_name" />
<result property="pricingDate" column="pricing_date" />
<result property="inventoryUnit" column="inventory_unit" />
<result property="taxRate" column="tax_rate" />
<result property="relationalFormula" column="relational_formula" />
<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="confirmName" column="confirm_name" />
<result property="confirmTime" column="confirm_time" />
<result property="auditNo" column="audit_no" />
<result property="auditName" column="audit_name" />
<result property="auditTime" column="audit_time" />
<result property="approveNo" column="approve_no" />
<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="selectSysQutsourcingQuotationVo">
select qutsourcing_quotation_id, quotation_code, material_code, material_name, specification_model, type_machine, measurement_unit, common_currency, process_price, processing_procedure_name, processing_procedure_code, converter_code, converter_name, pricing_date, inventory_unit, tax_rate, relational_formula, quotation_explain, current_quote, registrant, confirm_no, confirm_name, confirm_time, audit_no, audit_name, audit_time, approve_no, approve_name, approve_time, standby_one, standby_two , first_add_time, update_info_time from sys_qutsourcing_quotation
</sql>
<select id="selectSysQutsourcingQuotationList" parameterType="SysQutsourcingQuotation" resultMap="SysQutsourcingQuotationResult">
<include refid="selectSysQutsourcingQuotationVo"/>
<where>
<if test="quotationCode != null and quotationCode != ''"> and quotation_code = #{quotationCode}</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="converterName != null and converterName != ''"> and converter_name like concat('%', #{converterName}, '%')</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="selectSysQutsourcingQuotationById" parameterType="Long" resultMap="SysQutsourcingQuotationResult">
<include refid="selectSysQutsourcingQuotationVo"/>
where qutsourcing_quotation_id = #{qutsourcingQuotationId}
</select>
<insert id="insertSysQutsourcingQuotation" parameterType="SysQutsourcingQuotation" useGeneratedKeys="true" keyProperty="qutsourcingQuotationId">
insert into sys_qutsourcing_quotation
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="quotationCode != null">quotation_code,</if>
<if test="materialCode != null">material_code,</if>
<if test="materialName != null">material_name,</if>
<if test="specificationModel != null">specification_model,</if>
<if test="typeMachine != null">type_machine,</if>
<if test="measurementUnit != null">measurement_unit,</if>
<if test="commonCurrency != null">common_currency,</if>
<if test="processPrice != null">process_price,</if>
<if test="processingProcedureName != null">processing_procedure_name,</if>
<if test="processingProcedureCode != null">processing_procedure_code,</if>
<if test="converterCode != null">converter_code,</if>
<if test="converterName != null">converter_name,</if>
<if test="pricingDate != null">pricing_date,</if>
<if test="inventoryUnit != null">inventory_unit,</if>
<if test="taxRate != null">tax_rate,</if>
<if test="relationalFormula != null">relational_formula,</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="confirmName != null">confirm_name,</if>
<if test="confirmTime != null">confirm_time,</if>
<if test="auditNo != null">audit_no,</if>
<if test="auditName != null">audit_name,</if>
<if test="auditTime != null">audit_time,</if>
<if test="approveNo != null">approve_no,</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="materialCode != null">#{materialCode},</if>
<if test="materialName != null">#{materialName},</if>
<if test="specificationModel != null">#{specificationModel},</if>
<if test="typeMachine != null">#{typeMachine},</if>
<if test="measurementUnit != null">#{measurementUnit},</if>
<if test="commonCurrency != null">#{commonCurrency},</if>
<if test="processPrice != null">#{processPrice},</if>
<if test="processingProcedureName != null">#{processingProcedureName},</if>
<if test="processingProcedureCode != null">#{processingProcedureCode},</if>
<if test="converterCode != null">#{converterCode},</if>
<if test="converterName != null">#{converterName},</if>
<if test="pricingDate != null">#{pricingDate},</if>
<if test="inventoryUnit != null">#{inventoryUnit},</if>
<if test="taxRate != null">#{taxRate},</if>
<if test="relationalFormula != null">#{relationalFormula},</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="confirmName != null">#{confirmName},</if>
<if test="confirmTime != null">#{confirmTime},</if>
<if test="auditNo != null">#{auditNo},</if>
<if test="auditName != null">#{auditName},</if>
<if test="auditTime != null">#{auditTime},</if>
<if test="approveNo != null">#{approveNo},</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="updateSysQutsourcingQuotation" parameterType="SysQutsourcingQuotation">
update sys_qutsourcing_quotation
<trim prefix="SET" suffixOverrides=",">
<if test="quotationCode != null">quotation_code = #{quotationCode},</if>
<if test="materialCode != null">material_code = #{materialCode},</if>
<if test="materialName != null">material_name = #{materialName},</if>
<if test="specificationModel != null">specification_model = #{specificationModel},</if>
<if test="typeMachine != null">type_machine = #{typeMachine},</if>
<if test="measurementUnit != null">measurement_unit = #{measurementUnit},</if>
<if test="commonCurrency != null">common_currency = #{commonCurrency},</if>
<if test="processPrice != null">process_price = #{processPrice},</if>
<if test="processingProcedureName != null">processing_procedure_name = #{processingProcedureName},</if>
<if test="processingProcedureCode != null">processing_procedure_code = #{processingProcedureCode},</if>
<if test="converterCode != null">converter_code = #{converterCode},</if>
<if test="converterName != null">converter_name = #{converterName},</if>
<if test="pricingDate != null">pricing_date = #{pricingDate},</if>
<if test="inventoryUnit != null">inventory_unit = #{inventoryUnit},</if>
<if test="taxRate != null">tax_rate = #{taxRate},</if>
<if test="relationalFormula != null">relational_formula = #{relationalFormula},</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="confirmName != null">confirm_name = #{confirmName},</if>
<if test="confirmTime != null">confirm_time = #{confirmTime},</if>
<if test="auditNo != null">audit_no = #{auditNo},</if>
<if test="auditName != null">audit_name = #{auditName},</if>
<if test="auditTime != null">audit_time = #{auditTime},</if>
<if test="approveNo != null">approve_no = #{approveNo},</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 qutsourcing_quotation_id = #{qutsourcingQuotationId}
</update>
<delete id="deleteSysQutsourcingQuotationById" parameterType="Long">
delete from sys_qutsourcing_quotation where qutsourcing_quotation_id = #{qutsourcingQuotationId}
</delete>
<delete id="deleteSysQutsourcingQuotationByIds" parameterType="String">
delete from sys_qutsourcing_quotation where qutsourcing_quotation_id in
<foreach item="qutsourcingQuotationId" collection="array" open="(" separator="," close=")">
#{qutsourcingQuotationId}
</foreach>
</delete>
</mapper>

533
ruoyi-admin/src/main/resources/templates/system/qutsourcingquotation/add.html

@ -1,533 +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;
margin-left: 40px;
}
.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-qutsourcingquotation-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 name="materialCode" class="form-control m-b" required>
<option value="">请选择物料代码</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">物料名称:</label>
<div class="col-sm-8">
<input name="materialName" 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="measurementUnit" 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">
<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="processPrice" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">加工工序编号:</label>
<div class="col-sm-8">
<select name="processingProcedureCode" class="form-control m-b">
<option value="">请选择加工工序编号</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">加工工序名称:</label>
<div class="col-sm-8">
<select name="processingProcedureName" class="form-control m-b">
<option value="">请输入加工工序名称</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">加工商编号:</label>
<div class="col-sm-8">
<select name="converterCode" class="form-control m-b" required>
<option value="">请选择加工商编号</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">加工商名称:</label>
<div class="col-sm-8">
<select name="converterName" 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" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">库存单位:</label>
<div class="col-sm-8">
<select name="inventoryUnit" 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="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="relationalFormula" 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">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}">
<input type="radio" th:id="${'currentQuote_' + dict.dictCode}" name="currentQuote" th:value="${dict.dictValue}" th:checked="${dict.default}">
<label th:for="${'currentQuote_' + 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="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 finishProductdata = []
var supplierdata=[]
var proceduredata=[]
var prefix = ctx + "system/qutsourcingquotation"
$("#form-qutsourcingquotation-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-qutsourcingquotation-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
});
// 自动获取当前时间
$("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('')
}
})
*/
//获取单号
$.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/finishproduct/finishList",
type: "POST",
success: function (res) {
// console.log(res)
if (res.length > 0) {
finishProductdata = res;
//alert(JSON.stringify(data));
for (let i in finishProductdata) {
$("select[name='materialCode']").append("<option value='" + finishProductdata[i].finishProductCode + "'>" + finishProductdata[i].finishProductCode + "</option>");
}
} 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-qutsourcingquotation-add select[name='registrant']").append("<option value='" + userData[i].userName + "'>" + userData[i].userName + "</option>");
}
let userName = [[${@permission.getPrincipalProperty('userName')}]];
$("#form-qutsourcingquotation-add select[name='registrant']").val(userName).trigger("change")
}
}
})
// 成品改变
$("select[name='materialCode']").change(function () {
var finishProductCode = $(this).val();
for (i = 0; i < finishProductdata.length; i++) {
if (finishProductdata[i].finishProductCode == finishProductCode) {
$("input[name='materialName']").val(finishProductdata[i].finishProductName)
$("input[name='specificationModel']").val(finishProductdata[i].specificationModel)
$("input[name='typeMachine']").val(finishProductdata[i].typeMachine)
$("select[name='measurementUnit']").val(finishProductdata[i].inventoryUnit).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='converterCode']").append("<option value='" + supplierdata[i].supplierCode + "'>" + supplierdata[i].supplierCode + "</option>");
$("select[name='converterName']").append("<option value='" + supplierdata[i].supplierName + "'>" + supplierdata[i].supplierName + "</option>");
}
} else {
$.modal.msgError(res.msg);
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
})
$("select[name='converterCode']").change(function () {
var converterCode = $(this).val();
for (i = 0; i < supplierdata.length; i++) {
if (supplierdata[i].supplierCode == converterCode) {
$("select[name='converterName']").val(supplierdata[i].supplierName).trigger("change")
}
}
})
// $("select[name='converterName']").change(function () {
//
// var converterName = $(this).val();
//
// for (i = 0; i < supplierdata.length; i++) {
// if (supplierdata[i].converterName == converterName) {
//
// $("select[name='converterCode']").val(supplierdata[i].supplierCode).trigger("change")
//
// }
// }
// })
// 加工工序
$.ajax({
url: ctx + "system/procedure/list",
type: "POST",
success: function (res) {
// console.log(res)
if (res.rows.length > 0) {
proceduredata = res.rows;
//alert(JSON.stringify(data));
// console.log(res.rows)
for (let i in proceduredata) {
$("select[name='processingProcedureCode']").append("<option value='" + proceduredata[i].procedureCode + "'>" + proceduredata[i].procedureCode + "</option>");
$("select[name='processingProcedureName']").append("<option value='" + proceduredata[i].procedureName + "'>" + proceduredata[i].procedureName + "</option>");
}
} else {
$.modal.msgError(res.msg);
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
})
//
// $("select[name='processingProcedureName']").change(function () {
//
// var processingProcedureName = $(this).val();
//
// for (i = 0; i < proceduredata.length; i++) {
// if (proceduredata[i].procedureName == processingProcedureName) {
//
// $("select[name='processingProcedureCode']").val(proceduredata[i].procedureCode).trigger("change")
//
// }
// }
// })
$("select[name='processingProcedureCode']").change(function () {
var processingProcedureCode = $(this).val();
for (i = 0; i < proceduredata.length; i++) {
if (proceduredata[i].procedureCode == processingProcedureCode) {
$("select[name='processingProcedureName']").val(proceduredata[i].procedureName).trigger("change")
}
}
})
</script>
</body>
</html>

441
ruoyi-admin/src/main/resources/templates/system/qutsourcingquotation/edit.html

@ -1,441 +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-qutsourcingquotation-edit" th:object="${sysQutsourcingQuotation}">
<input name="qutsourcingQuotationId" th:field="*{qutsourcingQuotationId}" 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="materialCode" class="form-control m-b">-->
<!-- <option value="">所有</option>-->
<!-- </select>-->
<input name="materialCode" th:field="*{materialCode}" 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="materialName" th:field="*{materialName}" 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="measurementUnit" 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="*{measurementUnit}"></option>
</select>
</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="processPrice" th:field="*{processPrice}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">加工工序编号:</label>
<div class="col-sm-8">
<select name="processingProcedureCode" class="form-control m-b">
<option value="-1">请选择加工工序编号</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">加工工序名称:</label>
<div class="col-sm-8">
<select name="processingProcedureName" class="form-control m-b">
<option value="-1">请输入加工工序名称</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">加工商编号:</label>
<div class="col-sm-8">
<select name="converterCode" class="form-control m-b" required>
<option value="-1">请选择加工商编号</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">加工商名称:</label>
<div class="col-sm-8">
<select name="converterName" class="form-control m-b" required>
<option value="-1">请选择加工商名称</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">
<select name="inventoryUnit" 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="*{inventoryUnit}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">交税税率:</label>
<div class="col-sm-8">
<input name="taxRate" th:field="*{taxRate}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">每采购单位对应多少库存单位:</label>
<div class="col-sm-8">
<input name="relationalFormula" th:field="*{relationalFormula}" 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">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}">
<input type="radio" th:id="${'currentQuote_' + dict.dictCode}" name="currentQuote" th:value="${dict.dictValue}" th:field="*{currentQuote}">
<label th:for="${'currentQuote_' + 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="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 = [[${sysQutsourcingQuotation}]];
console.log(getData.processingProcedureCode)
var prefix = ctx + "system/qutsourcingquotation";
var supplierdata=[]
var proceduredata=[]
$("#form-qutsourcingquotation-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-qutsourcingquotation-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
});
// 厂商编号
$.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='converterCode']").append("<option value='" + supplierdata[i].supplierCode + "'>" + supplierdata[i].supplierCode + "</option>");
$("select[name='converterName']").append("<option value='" + supplierdata[i].supplierName + "'>" + supplierdata[i].supplierName + "</option>");
}
$("select[name='converterCode']").val(getData.converterCode).trigger("change")
$("select[name='converterName']").val(getData.converterName).trigger("change")
} else {
$.modal.msgError(res.msg);
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
})
$("select[name='converterCode']").change(function () {
var converterCode = $(this).val();
for (i = 0; i < supplierdata.length; i++) {
if (supplierdata[i].supplierCode == converterCode) {
$("select[name='converterName']").val(supplierdata[i].supplierName).trigger("change")
}
}
})
// $("select[name='converterName']").change(function () {
//
// var converterName = $(this).val();
//
// for (i = 0; i < supplierdata.length; i++) {
// if (supplierdata[i].converterName == converterName) {
//
// $("select[name='converterCode']").val(supplierdata[i].supplierCode).trigger("change")
//
// }
// }
// })
// 加工工序
$.ajax({
url: ctx + "system/procedure/list",
type: "POST",
success: function (res) {
console.log(res)
if (res.rows.length > 0) {
proceduredata = res.rows;
//alert(JSON.stringify(data));
// console.log(res.rows)
for (let i in proceduredata) {
$("select[name='processingProcedureCode']").append("<option value='" + proceduredata[i].procedureCode + "'>" + proceduredata[i].procedureCode + "</option>");
$("select[name='processingProcedureName']").append("<option value='" + proceduredata[i].procedureName + "'>" + proceduredata[i].procedureName + "</option>");
}
$("select[name='processingProcedureCode']").val(getData.processingProcedureCode).trigger("change")
$("select[name='processingProcedureName']").val(getData.processingProcedureName).trigger("change")
} else {
$.modal.msgError(res.msg);
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
})
//
// $("select[name='processingProcedureName']").change(function () {
//
// var processingProcedureName = $(this).val();
//
// for (i = 0; i < proceduredata.length; i++) {
// if (proceduredata[i].procedureName == processingProcedureName) {
//
// $("select[name='processingProcedureCode']").val(proceduredata[i].procedureCode).trigger("change")
//
// }
// }
// })
//获取登记人
$.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-qutsourcingquotation-edit select[name='registrant']").append("<option value='" + userData[i].userName + "'>" + userData[i].userName + "</option>");
}
$("#form-qutsourcingquotation-edit select[name='registrant']").val(getData.registrant).trigger("change")
} else {
$.modal.msgError(res.msg);
}
}
})
$("select[name='processingProcedureCode']").change(function () {
var processingProcedureCode = $(this).val();
for (i = 0; i < proceduredata.length; i++) {
if (proceduredata[i].procedureCode == processingProcedureCode) {
$("select[name='processingProcedureName']").val(proceduredata[i].procedureName).trigger("change")
}
}
})
</script>
</body>
</html>

650
ruoyi-admin/src/main/resources/templates/system/qutsourcingquotation/qutsourcingquotation.html

@ -1,650 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('委外报价列表')"/>
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>报价编码:</label>
<input type="text" name="quotationCode"/>
</li>
<li>
<label>物料代码:</label>
<!-- <select name="materialCode">-->
<!-- <option value="">所有</option>-->
<!-- </select>-->
<input type="text" name="materialCode"/>
</li>
<li>
<label>物料名称:</label>
<input type="text" name="materialName"/>
</li>
<li>
<label>加工商名称:</label>
<!-- <select name="converterName">-->
<!-- <option value="">所有</option>-->
<!-- </select>-->
<input type="text" name="converterName"/>
</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:qutsourcingquotation:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()"
shiro:hasPermission="system:qutsourcingquotation:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()"
shiro:hasPermission="system:qutsourcingquotation:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()"
shiro:hasPermission="system:qutsourcingquotation:export">
<i class="fa fa-download"></i> 导出
</a>
<a class="btn btn-info" onclick="quotationAudit()" shiro:hasPermission="system:qutsourcingquotation:audit">
<i class="fa fa-file-text"></i> 审核
</a>
<a class="btn btn-success" onclick="quotationConfirm()" shiro:hasPermission="system:qutsourcingquotation:confirm">
<i class="fa fa-hand-grab-o"></i> 确认
</a>
<a class="btn btn-primary" onclick="quotationApprove()" shiro:hasPermission="system:qutsourcingquotation:approve">
<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="qutsourcingQuotationId" name="qutsourcingQuotationId" 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="qutsourcingQuotationId3" name="qutsourcingQuotationId" 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="qutsourcingQuotationId2" name="qutsourcingQuotationId" 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:qutsourcingquotation:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:qutsourcingquotation:remove')}]];
var measurementUnitDatas = [[${@dict.getType('sys_unit_class')}]];
var commonCurrencyDatas = [[${@dict.getType('sys_common_currency')}]];
var inventoryUnitDatas = [[${@dict.getType('sys_unit_class')}]];
var currentQuoteDatas = [[${@dict.getType('sys_whether')}]];
var confirmNoDatas = [[${@dict.getType('sys_whether')}]];
var auditNoDatas = [[${@dict.getType('sys_whether')}]];
var approveNoDatas = [[${@dict.getType('sys_whether')}]];
var prefix = ctx + "system/qutsourcingquotation";
$(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: 'qutsourcingQuotationId',
title: '委外报价id',
visible: false
},
{
field: 'auditNo',
title: '审核否',
formatter: function (value, row, index) {
return $.table.selectDictLabel(auditNoDatas, value);
}
},
{
field: 'confirmNo',
title: '确认否',
visible: false,
formatter: function (value, row, index) {
// return $.table.selectDictLabel(confirmNoDatas, value);
var actions = [];
if ($.table.selectDictLabel(confirmNoDatas, value) == "<span class=''></span>") {
actions.push('<a class="btn btn-primary btn-xs disabled">已确认</a> ');
} else {
actions.push('<a class="btn btn-danger btn-xs disabled">未确认</a> ');
}
return actions.join('');
}
},
{
field: 'approveNo',
title: '核准否',
formatter: function (value, row, index) {
// return $.table.selectDictLabel(confirmNoDatas, value);
var actions = [];
if ($.table.selectDictLabel(approveNoDatas, value) == "<span class=''></span>") {
actions.push('<a class="btn btn-primary btn-xs disabled">已核准</a> ');
} else {
actions.push('<a class="btn btn-danger btn-xs disabled">未核准</a> ');
}
return actions.join('');
}
},
{
field: 'quotationCode',
title: '报价编码'
},
{
field: 'materialCode',
title: '物料代码'
},
{
field: 'materialName',
title: '物料名称'
},
{
field: 'measurementUnit',
title: '计量单位',
formatter: function (value, row, index) {
return $.table.selectDictLabel(measurementUnitDatas, value);
}
},
{
field: 'commonCurrency',
title: '报价币别',
formatter: function (value, row, index) {
return $.table.selectDictLabel(commonCurrencyDatas, value);
}
},
{
field: 'processPrice',
title: '加工单价'
},
{
field: 'processingProcedureName',
title: '加工工序名称'
},
{
field: 'processingProcedureCode',
title: '加工工序编号'
},
{
field: 'converterCode',
title: '加工商编号'
},
{
field: 'converterName',
title: '加工商名称'
},
{
field: 'pricingDate',
title: '报价日期'
},
{
field: 'inventoryUnit',
title: '库存单位',
formatter: function (value, row, index) {
return $.table.selectDictLabel(inventoryUnitDatas, value);
}
},
{
field: 'taxRate',
title: '国内税率',
},
{
field: 'relationalFormula',
title: '每采购单位对应多少库存单位',
visible: false
},
{
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: '审核人',
visible: false
},
{
field: 'auditTime',
title: '审核时间',
visible: false
},
{
field: 'approveName',
title: '核准人',
visible: false
},
{
field: 'approveTime',
title: '核准时间',
visible: false
},
{
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: 'createBy',
title: '录入时间',
},
{
field: 'updateBy',
title: '更新人'
},
{
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.qutsourcingQuotationId + '\')"><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.qutsourcingQuotationId + '\')"><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) {
$("#qutsourcingQuotationId").val(data[0].qutsourcingQuotationId)
$("#auditNo").val(1).trigger("change")
$("#auditName").val(userName)
$("#auditTime").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) {
$("#qutsourcingQuotationId2").val(data[0].qutsourcingQuotationId)
$("#confirmNo").val(1).trigger("change")
$("#confirmName").val(userName)
$("#confirmTime").datetimepicker("setDate", new Date());
$("#confirmModel").modal("show");
} else {
$.modal.alert("请选择一条数据");
}
}
// 确认
function ConfirmSubmit() {
// console.log($('#form-confirm-edit').serialize())
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) {
$("#qutsourcingQuotationId3").val(data[0].qutsourcingQuotationId)
$("#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