Browse Source

[fix]销售模块:修改客户报价信息表的添加物料报价信息的结构,添加客户报价详细信息页面,销售报价信息子表。

dev
zhangsiqi 6 months ago
parent
commit
effde09cbe
  1. 2
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java
  2. 6
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerQuoteChildController.java
  3. 133
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java
  4. 64
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCustomerQuote.java
  5. 6
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCustomerQuoteChild.java
  6. 803
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrder.java
  7. 108
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrderVo.java
  8. 14
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/exportDto/SysCustomerDto.java
  9. 4
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysCustomerMapper.java
  10. 2
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysCustomerQuoteChildMapper.java
  11. 2
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysCustomerQuoteMapper.java
  12. 7
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesOrderMapper.java
  13. 1
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerQuoteChildService.java
  14. 2
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerQuoteService.java
  15. 10
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesOrderService.java
  16. 9
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteChildServiceImpl.java
  17. 38
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java
  18. 78
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesOrderServiceImpl.java
  19. 1
      ruoyi-admin/src/main/resources/mapper/system/SysContactsMapper.xml
  20. 8
      ruoyi-admin/src/main/resources/mapper/system/SysCustomerMapper.xml
  21. 89
      ruoyi-admin/src/main/resources/mapper/system/SysCustomerQuoteChildMapper.xml
  22. 96
      ruoyi-admin/src/main/resources/mapper/system/SysCustomerQuoteMapper.xml
  23. 195
      ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderMapper.xml
  24. 52
      ruoyi-admin/src/main/resources/templates/erp/bom/add.html
  25. 2
      ruoyi-admin/src/main/resources/templates/erp/bom/detail.html
  26. 7
      ruoyi-admin/src/main/resources/templates/erp/bom/edit.html
  27. 34
      ruoyi-admin/src/main/resources/templates/system/customer/customer.html
  28. 247
      ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html
  29. 69
      ruoyi-admin/src/main/resources/templates/system/customerQuote/customerQuote.html
  30. 390
      ruoyi-admin/src/main/resources/templates/system/customerQuote/edit.html
  31. 1079
      ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html
  32. 1133
      ruoyi-admin/src/main/resources/templates/system/salesOrder/edit.html
  33. 1153
      ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html

2
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java

@ -259,7 +259,7 @@ public class SysCustomerController extends BaseController
//获取发票基础信息
SysCustomer sysCustomer = sysCustomerService.selectSysCustomerById(selectDataList.get(0).getCustomerId());
SysCustomer sysCustomer = sysCustomerService.selectSysCustomerById(selectDataList.get(0).getId());
SysCustomerDto sysCustomerDto = new SysCustomerDto();
BeanUtils.copyProperties(sysCustomer,sysCustomerDto);

6
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerQuoteChildController.java

@ -5,6 +5,7 @@ import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.exception.base.BaseException;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.SysCustomerQuoteChild;
import com.ruoyi.system.service.ISysCustomerQuoteChildService;
@ -41,7 +42,6 @@ public class SysCustomerQuoteChildController extends BaseController
/**
* 查询客户报价子列表
*/
@RequiresPermissions("system:quoteChild:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(SysCustomerQuoteChild sysCustomerQuoteChild)
@ -77,7 +77,6 @@ public class SysCustomerQuoteChildController extends BaseController
/**
* 新增保存客户报价子
*/
@RequiresPermissions("system:quoteChild:add")
@Log(title = "客户报价子", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
@ -89,7 +88,6 @@ public class SysCustomerQuoteChildController extends BaseController
/**
* 修改客户报价子
*/
@RequiresPermissions("system:quoteChild:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Long id, ModelMap mmap)
{
@ -101,7 +99,6 @@ public class SysCustomerQuoteChildController extends BaseController
/**
* 修改保存客户报价子
*/
@RequiresPermissions("system:quoteChild:edit")
@Log(title = "客户报价子", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
@ -113,7 +110,6 @@ public class SysCustomerQuoteChildController extends BaseController
/**
* 删除客户报价子
*/
@RequiresPermissions("system:quoteChild:remove")
@Log(title = "客户报价子", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody

133
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java

@ -14,12 +14,22 @@ import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.file.FileUploadUtils;
import com.ruoyi.common.utils.file.FileUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.erp.domain.ErpMaterialVo;
import com.ruoyi.process.general.service.IProcessService;
import com.ruoyi.system.domain.SysSalesFinish;
import com.ruoyi.system.domain.SysSalesOrder;
import com.ruoyi.system.domain.SysSalesOrderVo;
import com.ruoyi.system.domain.exportDto.SysSalesFinishDto;
import com.ruoyi.system.domain.exportDto.SysSalesOrderDto;
import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.system.service.ISysSalesFinishService;
import com.ruoyi.system.service.ISysSalesOrderService;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.Task;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -31,12 +41,10 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.*;
import static com.ruoyi.common.config.datasource.DynamicDataSourceContextHolder.log;
@ -57,6 +65,18 @@ public class SysSalesOrderController extends BaseController
@Autowired
private ISysSalesFinishService sysSalesFinishService;
@Autowired
private ISysRoleService roleService;
@Autowired
private TaskService taskService;
@Autowired
private RuntimeService runtimeService;
@Autowired
private IProcessService processService;
@RequiresPermissions("system:salesOrder:view")
@GetMapping()
public String salesOrder()
@ -70,28 +90,28 @@ public class SysSalesOrderController extends BaseController
@RequiresPermissions("system:salesOrder:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(SysSalesOrder sysSalesOrder)
public TableDataInfo list(SysSalesOrderVo sysSalesOrder)
{
startPage();
List<SysSalesOrder> list = sysSalesOrderService.selectSysSalesOrderList(sysSalesOrder);
List<SysSalesOrderVo> list = sysSalesOrderService.selectSysSalesOrderList(sysSalesOrder);
return getDataTable(list);
}
/**
* 导出销售订单列表
*/
/*
@RequiresPermissions("system:salesOrder:export")
@Log(title = "销售订单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysSalesOrder sysSalesOrder)
public AjaxResult export(SysSalesOrderVo sysSalesOrder)
{
List<SysSalesOrder> list = sysSalesOrderService.selectSysSalesOrderList(sysSalesOrder);
ExcelUtil<SysSalesOrder> util = new ExcelUtil<SysSalesOrder>(SysSalesOrder.class);
List<SysSalesOrderVo> list = sysSalesOrderService.selectSysSalesOrderList(sysSalesOrder);
ExcelUtil<SysSalesOrderVo> util = new ExcelUtil<SysSalesOrderVo>(SysSalesOrderVo.class);
return util.exportExcel(list, "销售订单数据");
}
*/
/**
* 新增销售订单
@ -312,4 +332,95 @@ public class SysSalesOrderController extends BaseController
return Result.getSuccessResult(sysSalesOrderService.getId());
}
/**
* 加载审批弹窗
* @param taskId
* @param mmap
* @return
*/
@GetMapping("/showVerifyDialog/{taskId}")
public String showVerifyDialog(@PathVariable("taskId") String taskId, ModelMap mmap) {
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
String processInstanceId = task.getProcessInstanceId();
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
SysSalesOrderVo sysSalesOrderVo = sysSalesOrderService.selectSysSalesOrderById(new Long(processInstance.getBusinessKey()));
mmap.put("formData", sysSalesOrderVo);
mmap.put("taskId", taskId);
String verifyName = task.getTaskDefinitionKey().substring(0, 1).toUpperCase() + task.getTaskDefinitionKey().substring(1);
return prefix + "/task" + verifyName;
}
/**
* 完成任务
*
* @return
*/
@RequestMapping(value = "/complete/{taskId}", method = {RequestMethod.POST, RequestMethod.GET})
@ResponseBody
public AjaxResult complete(@PathVariable("taskId") String taskId, @RequestParam(value = "saveEntity", required = false) String saveEntity,
@ModelAttribute("preloadObj") SysSalesOrderVo salesOrderVo, HttpServletRequest request) {
boolean saveEntityBoolean = BooleanUtils.toBoolean(saveEntity);
String instanceId = salesOrderVo.getInstanceId();
String instanceType = salesOrderVo.getInstanceType();
boolean approvedFlag = processService.complete(taskId, instanceId, salesOrderVo.getApplyTitle(), salesOrderVo.getSalesOrderCode(), "salesOrder", new HashMap<String, Object>(), request);
if(!approvedFlag){
// 审核状态-审核拒绝
salesOrderVo.setAuditStatus("2");
}
// 如果任务已结束更新业务表状态
boolean processIsFinish = processService.judgeProcessIsFinish(instanceId);
if (processIsFinish) {
// 审核通过
salesOrderVo.setAuditStatus("1");
// 提交
if("submit".equals(instanceType)){
// 使用状态-是
salesOrderVo.setUseStatus("1");
}
// 作废
else if("cancel".equals(instanceType)){
// 使用状态-已作废
salesOrderVo.setUseStatus("2");
}
// 恢复
else if("restore".equals(instanceType)){
// 使用状态-是
salesOrderVo.setUseStatus("1");
}
}
sysSalesOrderService.updateSysSalesOrder(salesOrderVo);
// 驳回申请后继续申请,可能修改表单
if (saveEntityBoolean) {
sysSalesOrderService.updateSysSalesOrder(salesOrderVo);
}
return success("任务已完成");
}
/**
* 自动绑定页面字段
*/
@ModelAttribute("/preloadObj")
public SysSalesOrder getObj(@RequestParam(value = "id", required = false) Long id, HttpSession session) {
if (id != null) {
return sysSalesOrderService.selectSysSalesOrderById(id);
}
return new SysSalesOrder();
}
/**
* 作废客户销售订单信息信息
*/
// @RequiresPermissions("erp:material:cancel")
@Log(title = "物料信息", businessType = BusinessType.CANCEL)
@GetMapping( "/cancel/{id}")
@ResponseBody
public AjaxResult cancel(@PathVariable("id") Long id){
SysSalesOrder sysSalesOrder = new SysSalesOrder();
sysSalesOrder.setSalesOrderId(id);
sysSalesOrder.setUseStatus("2");
sysSalesOrderService.updateSysSalesOrder(sysSalesOrder);
return AjaxResult.success();
}
}

64
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCustomerQuote.java

@ -1,10 +1,12 @@
package com.ruoyi.system.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
import java.util.List;
/**
@ -32,6 +34,9 @@ public class SysCustomerQuote extends BaseEntity
@Excel(name = "客户名称")
private String customerName;
/*订价日期*/
@Excel(name = "订价日期")
private String pricingDate;
/** 物料合计 */
@Excel(name = "物料合计")
private String enterprise;
@ -43,7 +48,8 @@ public class SysCustomerQuote extends BaseEntity
/** 报价币种 */
@Excel(name = "报价币种")
private String commonCurrency;
/*是否含税*/
private String confirmFax;
/** 国内汇率 */
@Excel(name = "国内汇率")
private Double rmbTax;
@ -76,16 +82,43 @@ public class SysCustomerQuote extends BaseEntity
@Excel(name = "含税总价(美元)")
private Double usdSum;
private String businessMembers;
/** 审核标志: 0未审核 1审核成功 2审核拒绝 */
@Excel(name = "审核标志: 0未审核 1审核成功 2审核拒绝")
private String deginFlag;
/** 删除标志(0代表存在 1代表删除) */
private String delFlag;
/** 审核标志: 0未审核 1审核成功 2审核拒绝 */
private String auditStatus;
private String useStatus;
/** 客户报价子信息 */
private List<SysCustomerQuoteChild> sysCustomerQuotechildList;
public String getConfirmFax() {
return confirmFax;
}
public void setConfirmFax(String confirmFax) {
this.confirmFax = confirmFax;
}
public String getAuditStatus() {
return auditStatus;
}
public void setAuditStatus(String auditStatus) {
this.auditStatus = auditStatus;
}
public String getUseStatus() {
return useStatus;
}
public void setUseStatus(String useStatus) {
this.useStatus = useStatus;
}
public void setId(Long id)
{
this.id = id;
@ -105,6 +138,7 @@ public class SysCustomerQuote extends BaseEntity
}
public void setSysCustomerQuotechildList(List<SysCustomerQuoteChild> sysCustomerQuotechildList) {
this.sysCustomerQuotechildList = sysCustomerQuotechildList;
}
@ -136,7 +170,16 @@ public class SysCustomerQuote extends BaseEntity
{
return customerName;
}
public void setEnterprise(String enterprise)
public String getPricingDate() {
return pricingDate;
}
public void setPricingDate(String pricingDate) {
this.pricingDate = pricingDate;
}
public void setEnterprise(String enterprise)
{
this.enterprise = enterprise;
}
@ -281,12 +324,20 @@ public class SysCustomerQuote extends BaseEntity
.append("enterprise", getEnterprise())
.append("enterpriseSum", getEnterpriseSum())
.append("commonCurrency", getCommonCurrency())
.append("pricingDate", getPricingDate())
.append("confirmFax", getConfirmFax())
.append("rmbTax", getRmbTax())
.append("usdTax", getUsdTax())
.append("noRmbSum", getNoRmbSum())
.append("rmbSum", getRmbSum())
.append("noUsdSum", getNoUsdSum())
.append("usdSum", getUsdSum())
.append("noRmb", getNoRmb())
.append("rmb", getRmb())
.append("noUsd", getNoUsd())
.append("usd", getUsd())
.append("auditStatus", getAuditStatus())
.append("useStatus", getUseStatus())
.append("deginFlag", getDeginFlag())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
@ -295,11 +346,6 @@ public class SysCustomerQuote extends BaseEntity
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("businessMembers",getBusinessMembers())
.append("sysCustomerQuoteChildList",getSysCustomerQuotechildList())
.toString();
}
public List<SysCustomerQuoteChild> getSysCustomerQuoteChildList() {
return sysCustomerQuotechildList;
}
}

6
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCustomerQuoteChild.java

@ -22,7 +22,7 @@ public class SysCustomerQuoteChild extends BaseEntity
/** 主表的中关联的id字段 */
@Excel(name = "主表的中关联的id字段")
private Long quoteId;
private String quoteId;
/** 物料表中的id */
@Excel(name = "物料表中的id")
@ -122,12 +122,12 @@ public class SysCustomerQuoteChild extends BaseEntity
{
return id;
}
public void setQuoteId(Long quoteId)
public void setQuoteId(String quoteId)
{
this.quoteId = quoteId;
}
public Long getQuoteId()
public String getQuoteId()
{
return quoteId;
}

803
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrder.java

@ -1,5 +1,6 @@
package com.ruoyi.system.domain;
import com.google.common.base.Objects;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
@ -11,547 +12,443 @@ import com.ruoyi.common.core.domain.BaseEntity;
* @author ruoyi
* @date 2022-12-15
*/
public class SysSalesOrder extends BaseEntity
{
public class SysSalesOrder extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 订单id */
/* 订单id*/
private Long salesOrderId;
/** 订单编号 */
@Excel(name = "订单编号")
/*使用状态*/
private String useStatus;
/*审核状态*/
private String auditStatus;
/*出货状态*/
private String deliveryStatus;
/*收款结案状态*/
private String closeStatus;
/*生产状态*/
private String makeStatus;
/* 订单编号*/
@Excel(name = "销售订单编号")
private String salesOrderCode;
/** 订单号码 */
@Excel(name = "订单号码")
/*订单号码*/
@Excel(name = "客户订单编号")
private String salesOrderNumber;
/** 预约单号 */
@Excel(name = "预约单号")
private String appointmentNumber;
/** 客户代码 */
@Excel(name = "订单类型")
private String salesOrderType;
/* 客户代码*/
@Excel(name = "客户代码")
private String enterpriseCode;
/** 客户名称 */
/* 客户名称*/
@Excel(name = "客户名称")
private String enterpriseName;
/** 付款条件 */
@Excel(name = "付款条件")
private String paymentTerms;
/** 交货条件 */
/*客户电话*/
private String customerPhone;
/*物料合计*/
private String materialSum;
/*数量合计*/
private String enterpriseSum;
/*不含税单价(RMB)*/
private Double noRmbPrice;
/*不含税总价(RMB)*/
private Double noRmbSum;
/*含税单价(RMB)*/
private Double rmbPrice;
/*含税总价(RMB)*/
private Double rmbTaxSum;
/*不含税单价(美元)*/
private Double noUsdPrice;
/*不含税总价(美元)*/
private Double noUsdSum;
/*含税单价(美元)*/
private Double usdPrice;
/*含税总价(美元)*/
private String usdTaxSum;
/*计划交付时间*/
private String deliveryTime;
/* 交货条件*/
@Excel(name = "交货条件")
private String deliveryConditions;
/** 交货方式 */
/* 交货方式*/
@Excel(name = "交货方式")
private String deliveryMethod;
/** 接单方式 */
/*交货地点*/
@Excel(name = "交货地点")
private String deliveryAddress;
/*付款条件*/
@Excel(name = "付款条件")
private String paymentTerms;
/*接单方式*/
@Excel(name = "接单方式")
private String orderReceivingMode;
/** 联系人 */
/* 接单日期*/
@Excel(name = "接单日期")
private String orderReceivingTime;
/*联系人*/
@Excel(name = "联系人")
private String customerContact;
/** 客户厂区 */
@Excel(name = "客户厂区")
private String customerFactory;
/** 联系电话 */
/* 联系电话*/
@Excel(name = "联系电话")
private String contactNumber;
/** 业务人员 */
@Excel(name = "业务人员")
private String businessMembers;
/** 传真号码 */
/* 传真号码*/
@Excel(name = "传真号码")
private String customerFax;
/** 交货地点 */
@Excel(name = "交货地点")
private String deliveryAddress;
/** 接单日期 */
@Excel(name = "接单日期")
private String orderReceivingTime;
/** 开单日期时间 */
@Excel(name = "开单日期时间")
private String billingTime;
/** 备注内容 */
@Excel(name = "备注内容")
private String customerRemarks;
/** 当前库存数 */
@Excel(name = "当前库存数")
private String currentInventory;
/** 信用额度 */
@Excel(name = "信用额度")
private String creditLimit;
/** 未付款数 */
@Excel(name = "未付款数")
private String unpaidAmount;
/** 可用额度 */
@Excel(name = "可用额度")
private String availableCredit;
/** 是否含税 */
/*业务人员*/
@Excel(name = "业务人员")
private String businessMembers;
/*是否含税*/
@Excel(name = "是否含税")
private String confirmTax;
/** 税率 */
/* 修改日期*/
@Excel(name = "客户验收时间")
private String modificationTime;
/* 税率*/
@Excel(name = "税率")
private String taxRate;
/** 合计金额 */
/* 合计金额*/
@Excel(name = "合计金额")
private String totalAmount;
/** 修改日期 */
@Excel(name = "修改日期")
private String modificationTime;
/** 确认日期 */
@Excel(name = "确认日期")
private String confirmTime;
/** 文件存储 */
/* 文件存储 */
@Excel(name = "文件存储")
private String fileUpload;
/*备用一*/
@Excel(name = "实收金额(RMB)")
private String standbyOne;
/*备用二*/
@Excel(name = "实收金额(美元)")
private String standbyTwo;
/* 录入时间*/
@Excel(name = "录入时间")
private String firstAddTime;
/* 修改时间*/
@Excel(name = "修改时间")
private String updateInfoTime;
/*贸易条款**/
@Excel(name = "贸易条款")
private String tradeClause;
/** 确认否 */
@Excel(name = "确认否")
private String confirmNo;
/** 确认人 */
@Excel(name = "确认人")
private String confirmName;
/** 审核否 */
@Excel(name = "审核否")
private String auditNo;
/** 备用一 */
@Excel(name = "备用一")
private String standbyOne;
@Excel(name = "已出库数量")
private Integer outBoundQuantity;
@Excel(name = "未出库数量")
private Integer unBoundQuantity;
private String instanceId;
private String instanceType;
private String applyUser;
/** 结案人 */
@Excel(name = "结案人")
private String auditName;
/** 备用二 */
@Excel(name = "备用二")
private String standbyTwo;
public Long getSalesOrderId() {
return salesOrderId;
}
/** 结案时间 */
@Excel(name = "结案时间")
private String auditTime;
public void setSalesOrderId(Long salesOrderId) {
this.salesOrderId = salesOrderId;
}
/** 结案备注 */
@Excel(name = "结案备注")
private String auditRemarks;
public String getUseStatus() {
return useStatus;
}
/** 客户使用否 */
@Excel(name = "客户使用否")
private String customerUseOrNot;
public void setUseStatus(String useStatus) {
this.useStatus = useStatus;
}
/** 对账否 */
@Excel(name = "对账否")
private String accountReconciliationOrNot;
public String getAuditStatus() {
return auditStatus;
}
/** 对账人 */
@Excel(name = "对账人")
private String accountReconciliationPerson;
public void setAuditStatus(String auditStatus) {
this.auditStatus = auditStatus;
}
/** 对账时间 */
@Excel(name = "对账时间")
private String accountReconciliationTime;
public String getDeliveryStatus() {
return deliveryStatus;
}
/** 是否开国税发票 */
@Excel(name = "是否开国税发票")
private String nationalTaxBill;
public void setDeliveryStatus(String deliveryStatus) {
this.deliveryStatus = deliveryStatus;
}
/** 录入时间 */
@Excel(name = "录入时间")
private String firstAddTime;
public String getCloseStatus() {
return closeStatus;
}
/** 修改时间 */
@Excel(name = "修改时间")
private String updateInfoTime;
public void setSalesOrderId(Long salesOrderId)
{
this.salesOrderId = salesOrderId;
public void setCloseStatus(String closeStatus) {
this.closeStatus = closeStatus;
}
public Long getSalesOrderId()
{
return salesOrderId;
public String getMakeStatus() {
return makeStatus;
}
public void setSalesOrderCode(String salesOrderCode)
{
this.salesOrderCode = salesOrderCode;
public void setMakeStatus(String makeStatus) {
this.makeStatus = makeStatus;
}
public String getSalesOrderCode()
{
public String getSalesOrderCode() {
return salesOrderCode;
}
public void setSalesOrderNumber(String salesOrderNumber)
{
this.salesOrderNumber = salesOrderNumber;
public void setSalesOrderCode(String salesOrderCode) {
this.salesOrderCode = salesOrderCode;
}
public String getSalesOrderNumber()
{
public String getSalesOrderNumber() {
return salesOrderNumber;
}
public void setAppointmentNumber(String appointmentNumber)
{
this.appointmentNumber = appointmentNumber;
public void setSalesOrderNumber(String salesOrderNumber) {
this.salesOrderNumber = salesOrderNumber;
}
public String getAppointmentNumber()
{
return appointmentNumber;
public String getSalesOrderType() {
return salesOrderType;
}
public void setEnterpriseCode(String enterpriseCode)
{
this.enterpriseCode = enterpriseCode;
public void setSalesOrderType(String salesOrderType) {
this.salesOrderType = salesOrderType;
}
public String getEnterpriseCode()
{
public String getEnterpriseCode() {
return enterpriseCode;
}
public void setEnterpriseName(String enterpriseName)
{
this.enterpriseName = enterpriseName;
public void setEnterpriseCode(String enterpriseCode) {
this.enterpriseCode = enterpriseCode;
}
public String getEnterpriseName()
{
public String getEnterpriseName() {
return enterpriseName;
}
public void setPaymentTerms(String paymentTerms)
{
this.paymentTerms = paymentTerms;
}
public String getPaymentTerms()
{
return paymentTerms;
}
public void setDeliveryConditions(String deliveryConditions)
{
this.deliveryConditions = deliveryConditions;
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
public String getDeliveryConditions()
{
return deliveryConditions;
}
public void setDeliveryMethod(String deliveryMethod)
{
this.deliveryMethod = deliveryMethod;
public String getCustomerPhone() {
return customerPhone;
}
public String getDeliveryMethod()
{
return deliveryMethod;
}
public void setOrderReceivingMode(String orderReceivingMode)
{
this.orderReceivingMode = orderReceivingMode;
public void setCustomerPhone(String customerPhone) {
this.customerPhone = customerPhone;
}
public String getOrderReceivingMode()
{
return orderReceivingMode;
}
public void setCustomerContact(String customerContact)
{
this.customerContact = customerContact;
}
public String getCustomerContact()
{
return customerContact;
}
public void setCustomerFactory(String customerFactory)
{
this.customerFactory = customerFactory;
public String getMaterialSum() {
return materialSum;
}
public String getCustomerFactory()
{
return customerFactory;
}
public void setContactNumber(String contactNumber)
{
this.contactNumber = contactNumber;
public void setMaterialSum(String materialSum) {
this.materialSum = materialSum;
}
public String getContactNumber()
{
return contactNumber;
}
public void setBusinessMembers(String businessMembers)
{
this.businessMembers = businessMembers;
public String getEnterpriseSum() {
return enterpriseSum;
}
public String getBusinessMembers()
{
return businessMembers;
}
public void setCustomerFax(String customerFax)
{
this.customerFax = customerFax;
public void setEnterpriseSum(String enterpriseSum) {
this.enterpriseSum = enterpriseSum;
}
public String getCustomerFax()
{
return customerFax;
}
public void setDeliveryAddress(String deliveryAddress)
{
this.deliveryAddress = deliveryAddress;
public Double getNoRmbPrice() {
return noRmbPrice;
}
public String getDeliveryAddress()
{
return deliveryAddress;
}
public void setOrderReceivingTime(String orderReceivingTime)
{
this.orderReceivingTime = orderReceivingTime;
public void setNoRmbPrice(Double noRmbPrice) {
this.noRmbPrice = noRmbPrice;
}
public String getOrderReceivingTime()
{
return orderReceivingTime;
}
public void setBillingTime(String billingTime)
{
this.billingTime = billingTime;
public Double getNoRmbSum() {
return noRmbSum;
}
public String getBillingTime()
{
return billingTime;
public void setNoRmbSum(Double noRmbSum) {
this.noRmbSum = noRmbSum;
}
public void setCustomerRemarks(String customerRemarks)
{
this.customerRemarks = customerRemarks;
public Double getRmbPrice() {
return rmbPrice;
}
public String getCustomerRemarks()
{
return customerRemarks;
public void setRmbPrice(Double rmbPrice) {
this.rmbPrice = rmbPrice;
}
public void setCurrentInventory(String currentInventory)
{
this.currentInventory = currentInventory;
public Double getRmbTaxSum() {
return rmbTaxSum;
}
public String getCurrentInventory()
{
return currentInventory;
public void setRmbTaxSum(Double rmbTaxSum) {
this.rmbTaxSum = rmbTaxSum;
}
public void setCreditLimit(String creditLimit)
{
this.creditLimit = creditLimit;
public Double getNoUsdPrice() {
return noUsdPrice;
}
public String getCreditLimit()
{
return creditLimit;
public void setNoUsdPrice(Double noUsdPrice) {
this.noUsdPrice = noUsdPrice;
}
public void setUnpaidAmount(String unpaidAmount)
{
this.unpaidAmount = unpaidAmount;
public Double getNoUsdSum() {
return noUsdSum;
}
public String getUnpaidAmount()
{
return unpaidAmount;
public void setNoUsdSum(Double noUsdSum) {
this.noUsdSum = noUsdSum;
}
public void setAvailableCredit(String availableCredit)
{
this.availableCredit = availableCredit;
public Double getUsdPrice() {
return usdPrice;
}
public String getAvailableCredit()
{
return availableCredit;
public void setUsdPrice(Double usdPrice) {
this.usdPrice = usdPrice;
}
public void setConfirmTax(String confirmTax)
{
this.confirmTax = confirmTax;
public String getUsdTaxSum() {
return usdTaxSum;
}
public String getConfirmTax()
{
return confirmTax;
public void setUsdTaxSum(String usdTaxSum) {
this.usdTaxSum = usdTaxSum;
}
public void setTaxRate(String taxRate)
{
this.taxRate = taxRate;
public String getDeliveryTime() {
return deliveryTime;
}
public String getTaxRate()
{
return taxRate;
public void setDeliveryTime(String deliveryTime) {
this.deliveryTime = deliveryTime;
}
public void setTotalAmount(String totalAmount)
{
this.totalAmount = totalAmount;
public String getDeliveryConditions() {
return deliveryConditions;
}
public String getTotalAmount()
{
return totalAmount;
public void setDeliveryConditions(String deliveryConditions) {
this.deliveryConditions = deliveryConditions;
}
public void setModificationTime(String modificationTime)
{
this.modificationTime = modificationTime;
public String getDeliveryMethod() {
return deliveryMethod;
}
public String getModificationTime()
{
return modificationTime;
public void setDeliveryMethod(String deliveryMethod) {
this.deliveryMethod = deliveryMethod;
}
public void setConfirmTime(String confirmTime)
{
this.confirmTime = confirmTime;
public String getDeliveryAddress() {
return deliveryAddress;
}
public String getConfirmTime()
{
return confirmTime;
public void setDeliveryAddress(String deliveryAddress) {
this.deliveryAddress = deliveryAddress;
}
public void setConfirmNo(String confirmNo)
{
this.confirmNo = confirmNo;
public String getPaymentTerms() {
return paymentTerms;
}
public String getConfirmNo()
{
return confirmNo;
public void setPaymentTerms(String paymentTerms) {
this.paymentTerms = paymentTerms;
}
public void setConfirmName(String confirmName)
{
this.confirmName = confirmName;
public String getOrderReceivingMode() {
return orderReceivingMode;
}
public String getConfirmName()
{
return confirmName;
public void setOrderReceivingMode(String orderReceivingMode) {
this.orderReceivingMode = orderReceivingMode;
}
public void setAuditNo(String auditNo)
{
this.auditNo = auditNo;
public String getOrderReceivingTime() {
return orderReceivingTime;
}
public String getAuditNo()
{
return auditNo;
public void setOrderReceivingTime(String orderReceivingTime) {
this.orderReceivingTime = orderReceivingTime;
}
public void setStandbyOne(String standbyOne)
{
this.standbyOne = standbyOne;
public String getCustomerContact() {
return customerContact;
}
public String getStandbyOne()
{
return standbyOne;
public void setCustomerContact(String customerContact) {
this.customerContact = customerContact;
}
public void setAuditName(String auditName)
{
this.auditName = auditName;
public String getContactNumber() {
return contactNumber;
}
public String getAuditName()
{
return auditName;
public void setContactNumber(String contactNumber) {
this.contactNumber = contactNumber;
}
public void setStandbyTwo(String standbyTwo)
{
this.standbyTwo = standbyTwo;
public String getCustomerFax() {
return customerFax;
}
public String getStandbyTwo()
{
return standbyTwo;
public void setCustomerFax(String customerFax) {
this.customerFax = customerFax;
}
public void setAuditTime(String auditTime)
{
this.auditTime = auditTime;
public String getBusinessMembers() {
return businessMembers;
}
public String getAuditTime()
{
return auditTime;
public void setBusinessMembers(String businessMembers) {
this.businessMembers = businessMembers;
}
public void setAuditRemarks(String auditRemarks)
{
this.auditRemarks = auditRemarks;
public String getConfirmTax() {
return confirmTax;
}
public String getAuditRemarks()
{
return auditRemarks;
public void setConfirmTax(String confirmTax) {
this.confirmTax = confirmTax;
}
public String getCustomerUseOrNot() {
return customerUseOrNot;
public String getTaxRate() {
return taxRate;
}
public void setCustomerUseOrNot(String customerUseOrNot) {
this.customerUseOrNot = customerUseOrNot;
public void setTaxRate(String taxRate) {
this.taxRate = taxRate;
}
public String getAccountReconciliationOrNot() {
return accountReconciliationOrNot;
public String getTotalAmount() {
return totalAmount;
}
public void setAccountReconciliationOrNot(String accountReconciliationOrNot) {
this.accountReconciliationOrNot = accountReconciliationOrNot;
public void setTotalAmount(String totalAmount) {
this.totalAmount = totalAmount;
}
public String getAccountReconciliationPerson() {
return accountReconciliationPerson;
public String getFileUpload() {
return fileUpload;
}
public void setAccountReconciliationPerson(String accountReconciliationPerson) {
this.accountReconciliationPerson = accountReconciliationPerson;
public void setFileUpload(String fileUpload) {
this.fileUpload = fileUpload;
}
public String getAccountReconciliationTime() {
return accountReconciliationTime;
public String getStandbyOne() {
return standbyOne;
}
public void setAccountReconciliationTime(String accountReconciliationTime) {
this.accountReconciliationTime = accountReconciliationTime;
public void setStandbyOne(String standbyOne) {
this.standbyOne = standbyOne;
}
public String getNationalTaxBill() {
return nationalTaxBill;
public String getStandbyTwo() {
return standbyTwo;
}
public void setNationalTaxBill(String nationalTaxBill) {
this.nationalTaxBill = nationalTaxBill;
public void setStandbyTwo(String standbyTwo) {
this.standbyTwo = standbyTwo;
}
public String getFirstAddTime() {
@ -570,60 +467,110 @@ public class SysSalesOrder extends BaseEntity
this.updateInfoTime = updateInfoTime;
}
public String getFileUpload() {
return fileUpload;
public String getModificationTime() {
return modificationTime;
}
public void setFileUpload(String fileUpload) {
this.fileUpload = fileUpload;
public void setModificationTime(String modificationTime) {
this.modificationTime = modificationTime;
}
public String getTradeClause() {
return tradeClause;
}
public void setTradeClause(String tradeClause) {
this.tradeClause = tradeClause;
}
public Integer getOutboundQuantity() {
return outBoundQuantity;
}
public void setOutboundQuantity(Integer outBoundQuantity) {
this.outBoundQuantity = outBoundQuantity;
}
public Integer getUnBoundQuantity() {
return unBoundQuantity;
}
public void setUnBoundQuantity(Integer unBoundQuantity) {
this.unBoundQuantity = unBoundQuantity;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("salesOrderId", getSalesOrderId())
.append("salesOrderCode", getSalesOrderCode())
.append("salesOrderNumber", getSalesOrderNumber())
.append("appointmentNumber", getAppointmentNumber())
.append("enterpriseCode", getEnterpriseCode())
.append("enterpriseName", getEnterpriseName())
.append("paymentTerms", getPaymentTerms())
.append("deliveryConditions", getDeliveryConditions())
.append("deliveryMethod", getDeliveryMethod())
.append("orderReceivingMode", getOrderReceivingMode())
.append("customerContact", getCustomerContact())
.append("customerFactory", getCustomerFactory())
.append("contactNumber", getContactNumber())
.append("businessMembers", getBusinessMembers())
.append("customerFax", getCustomerFax())
.append("deliveryAddress", getDeliveryAddress())
.append("orderReceivingTime", getOrderReceivingTime())
.append("billingTime", getBillingTime())
.append("customerRemarks", getCustomerRemarks())
.append("currentInventory", getCurrentInventory())
.append("creditLimit", getCreditLimit())
.append("unpaidAmount", getUnpaidAmount())
.append("availableCredit", getAvailableCredit())
.append("confirmTax", getConfirmTax())
.append("taxRate", getTaxRate())
.append("totalAmount", getTotalAmount())
.append("modificationTime", getModificationTime())
.append("confirmTime", getConfirmTime())
.append("confirmNo", getConfirmNo())
.append("confirmName", getConfirmName())
.append("auditNo", getAuditNo())
.append("standbyOne", getStandbyOne())
.append("auditName", getAuditName())
.append("standbyTwo", getStandbyTwo())
.append("auditTime", getAuditTime())
.append("customerUseOrNot", getAccountReconciliationOrNot())
.append("accountReconciliationOrNot", getAccountReconciliationOrNot())
.append("accountReconciliationPerson", getAccountReconciliationPerson())
.append("accountReconciliationTime", getAccountReconciliationTime())
.append("nationalTaxBill", getNationalTaxBill())
.append("firstAddTime", getFirstAddTime())
.append("updateInfoTime", getUpdateInfoTime())
.append("fileUpload", getFileUpload())
.toString();
return Objects.toStringHelper(this)
.add("salesOrderId", salesOrderId)
.add("useStatus", useStatus)
.add("auditStatus", auditStatus)
.add("deliveryStatus", deliveryStatus)
.add("closeStatus", closeStatus)
.add("makeStatus", makeStatus)
.add("salesOrderCode", salesOrderCode)
.add("salesOrderNumber", salesOrderNumber)
.add("salesOrderType", salesOrderType)
.add("enterpriseCode", enterpriseCode)
.add("enterpriseName", enterpriseName)
.add("customerPhone", customerPhone)
.add("materialSum", materialSum)
.add("enterpriseSum", enterpriseSum)
.add("noRmbPrice", noRmbPrice)
.add("noRmbSum", noRmbSum)
.add("rmbPrice", rmbPrice)
.add("rmbTaxSum", rmbTaxSum)
.add("noUsdPrice", noUsdPrice)
.add("noUsdSum", noUsdSum)
.add("usdPrice", usdPrice)
.add("usdTaxSum", usdTaxSum)
.add("deliveryTime", deliveryTime)
.add("deliveryConditions", deliveryConditions)
.add("deliveryMethod", deliveryMethod)
.add("deliveryAddress", deliveryAddress)
.add("paymentTerms", paymentTerms)
.add("orderReceivingMode", orderReceivingMode)
.add("orderReceivingTime", orderReceivingTime)
.add("customerContact", customerContact)
.add("contactNumber", contactNumber)
.add("customerFax", customerFax)
.add("businessMembers", businessMembers)
.add("confirmTax", confirmTax)
.add("modificationTime", modificationTime)
.add("taxRate", taxRate)
.add("totalAmount", totalAmount)
.add("fileUpload", fileUpload)
.add("standbyOne", standbyOne)
.add("standbyTwo", standbyTwo)
.add("firstAddTime", firstAddTime)
.add("updateInfoTime", updateInfoTime)
.add("tradeClause", tradeClause)
.add("outboundQuantity", outBoundQuantity)
.add("unBoundQuantity", unBoundQuantity)
.toString();
}
public String getInstanceId() {
return instanceId;
}
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
}
public String getInstanceType() {
return instanceType;
}
public void setInstanceType(String instanceType) {
this.instanceType = instanceType;
}
public String getApplyUser() {
return applyUser;
}
public void setApplyUser(String applyUser) {
this.applyUser = applyUser;
}
}

108
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrderVo.java

@ -0,0 +1,108 @@
package com.ruoyi.system.domain;
import java.util.Date;
public class SysSalesOrderVo extends SysSalesOrder{
/** 申请人姓名 */
private String applyUserName;
/** 任务ID */
private String taskId;
/** 任务名称 */
private String taskName;
/** 办理时间 */
private Date doneTime;
/** 创建人 */
private String createUserName;
/** 流程实例状态 1 激活 2 挂起 */
private String suspendState;
/** 待办用户id */
private String todoUserId;
/** 流程实例类型名称 */
private String instanceTypeName;
/**
* 关键词
*/
private String keyword;
private String applyTitle;
public String getApplyUserName() {
return applyUserName;
}
public void setApplyUserName(String applyUserName) {
this.applyUserName = applyUserName;
}
public String getTaskId() {
return taskId;
}
public void setTaskId(String taskId) {
this.taskId = taskId;
}
public String getTaskName() {
return taskName;
}
public void setTaskName(String taskName) {
this.taskName = taskName;
}
public Date getDoneTime() {
return doneTime;
}
public void setDoneTime(Date doneTime) {
this.doneTime = doneTime;
}
public String getCreateUserName() {
return createUserName;
}
public void setCreateUserName(String createUserName) {
this.createUserName = createUserName;
}
public String getSuspendState() {
return suspendState;
}
public void setSuspendState(String suspendState) {
this.suspendState = suspendState;
}
public String getTodoUserId() {
return todoUserId;
}
public void setTodoUserId(String todoUserId) {
this.todoUserId = todoUserId;
}
public String getInstanceTypeName() {
return instanceTypeName;
}
public void setInstanceTypeName(String instanceTypeName) {
this.instanceTypeName = instanceTypeName;
}
public String getKeyword() {
return keyword;
}
public void setKeyword(String keyword) {
this.keyword = keyword;
}
public String getApplyTitle() {
return applyTitle;
}
public void setApplyTitle(String applyTitle) {
this.applyTitle = applyTitle;
}
}

14
ruoyi-admin/src/main/java/com/ruoyi/system/domain/exportDto/SysCustomerDto.java

@ -2,6 +2,7 @@ package com.ruoyi.system.domain.exportDto;
import com.alibaba.excel.annotation.ExcelProperty;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.system.domain.SysCustomer;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
@ -11,10 +12,11 @@ import org.apache.commons.lang3.builder.ToStringStyle;
* @author ruoyi
* @date 2022-11-02
*/
public class SysCustomerDto extends BaseEntity
public class SysCustomerDto extends SysCustomer
{
private static final long serialVersionUID = 1L;
/** 客户id */
private Long id;
/** 客户id */
private Long customerId;
@ -600,6 +602,14 @@ public class SysCustomerDto extends BaseEntity
return countryNumber;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

4
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysCustomerMapper.java

@ -48,10 +48,10 @@ public interface SysCustomerMapper
/**
* 删除客户基本信息
*
* @param customerId 客户基本信息ID
* @param id 客户基本信息ID
* @return 结果
*/
int deleteSysCustomerById(Long customerId);
int deleteSysCustomerById(Long id);
/**
* 批量删除客户基本信息

2
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysCustomerQuoteChildMapper.java

@ -13,6 +13,8 @@ public interface SysCustomerQuoteChildMapper {
int updateSysCustomerQuoteChild(SysCustomerQuoteChild sysCustomerQuoteChild);
List<SysCustomerQuoteChild> selectSysCustomerQuoteChildByQuoteId(String quoteId);
int deleteSysCustomerQuoteChildByIds(String[] ids);
/*删除ids中的quoteId的所有子项*/

2
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysCustomerQuoteMapper.java

@ -88,4 +88,6 @@ public interface SysCustomerQuoteMapper
public int deleteSysCustomerQuotechildByQuoteId(Long id);
public SysCustomerQuote selectSysCustomerByCustomerQuoteCode(String customerCode);
List<SysCustomerQuote> selectSysCustomerQuoteBycode();
}

7
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesOrderMapper.java

@ -2,6 +2,7 @@ package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.SysSalesOrder;
import com.ruoyi.system.domain.SysSalesOrderVo;
/**
* 销售订单Mapper接口
@ -13,11 +14,11 @@ public interface SysSalesOrderMapper
{
/**
* 查询销售订单
*
*
* @param salesOrderId 销售订单ID
* @return 销售订单
*/
public SysSalesOrder selectSysSalesOrderById(Long salesOrderId);
public SysSalesOrderVo selectSysSalesOrderById(Long salesOrderId);
/**
* 查询销售订单列表
@ -25,7 +26,7 @@ public interface SysSalesOrderMapper
* @param sysSalesOrder 销售订单
* @return 销售订单集合
*/
public List<SysSalesOrder> selectSysSalesOrderList(SysSalesOrder sysSalesOrder);
public List<SysSalesOrderVo> selectSysSalesOrderList(SysSalesOrder sysSalesOrder);
/**
* 新增销售订单

1
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerQuoteChildService.java

@ -10,6 +10,7 @@ public interface ISysCustomerQuoteChildService {
int insertSysCustomerQuoteChild(SysCustomerQuoteChild sysCustomerQuoteChild);
SysCustomerQuoteChild selectSysCustomerQuoteChildById(Long id);
List<SysCustomerQuoteChild> selectSysCustomerQuoteChildByQuoteId(String quoteId);
int updateSysCustomerQuoteChild(SysCustomerQuoteChild sysCustomerQuoteChild);

2
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerQuoteService.java

@ -62,7 +62,7 @@ public interface ISysCustomerQuoteService
int deleteSysCustomerQuoteByIds(String[] ids);
List selectSysCustomerQuoteBycode();
List<SysCustomerQuote> selectSysCustomerQuoteBycode();
List<SysCustomerQuote> selectSysCustomerByCustomerCode(String customerCode);

10
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesOrderService.java

@ -1,6 +1,8 @@
package com.ruoyi.system.service;
import com.ruoyi.system.domain.SysSalesOrderVo;
import com.ruoyi.system.domain.SysSalesOrder;
import com.ruoyi.system.domain.SysSalesOrderVo;
import java.util.List;
@ -14,11 +16,11 @@ public interface ISysSalesOrderService
{
/**
* 查询销售订单
*
*
* @param salesOrderId 销售订单ID
* @return 销售订单
*/
public SysSalesOrder selectSysSalesOrderById(Long salesOrderId);
public SysSalesOrderVo selectSysSalesOrderById(Long salesOrderId);
/**
* 查询销售订单列表
@ -26,7 +28,9 @@ public interface ISysSalesOrderService
* @param sysSalesOrder 销售订单
* @return 销售订单集合
*/
public List<SysSalesOrder> selectSysSalesOrderList(SysSalesOrder sysSalesOrder);
List<SysSalesOrder> selectSysSalesOrderList(SysSalesOrder sysSalesOrder);
List<SysSalesOrderVo> selectSysSalesOrderList(SysSalesOrderVo sysSalesOrderVo);
/**
* 新增销售订单

9
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteChildServiceImpl.java

@ -3,14 +3,16 @@ package com.ruoyi.system.service.impl;
import com.ruoyi.system.domain.SysCustomerQuoteChild;
import com.ruoyi.system.mapper.SysCustomerQuoteChildMapper;
import com.ruoyi.system.service.ISysCustomerQuoteChildService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class SysCustomerQuoteChildServiceImpl implements ISysCustomerQuoteChildService {
@Autowired
private SysCustomerQuoteChildMapper sysCustomerQuoteChildMapper;
@Override
public List<SysCustomerQuoteChild> selectSysCustomerQuoteChildList(SysCustomerQuoteChild sysCustomerQuoteChild) {
public List<SysCustomerQuoteChild> selectSysCustomerQuoteChildList (SysCustomerQuoteChild sysCustomerQuoteChild) {
return sysCustomerQuoteChildMapper.selectSysCustomerQuoteChildList(sysCustomerQuoteChild);
}
@ -24,6 +26,11 @@ public class SysCustomerQuoteChildServiceImpl implements ISysCustomerQuoteChildS
return sysCustomerQuoteChildMapper.selectSysCustomerQuoteChildById(id);
}
@Override
public List<SysCustomerQuoteChild> selectSysCustomerQuoteChildByQuoteId(String quoteId) {
return sysCustomerQuoteChildMapper.selectSysCustomerQuoteChildByQuoteId(quoteId);
}
@Override
public int updateSysCustomerQuoteChild(SysCustomerQuoteChild sysCustomerQuoteChild) {
return sysCustomerQuoteChildMapper.updateSysCustomerQuoteChild(sysCustomerQuoteChild);

38
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java

@ -12,6 +12,7 @@ import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@Service
@ -25,9 +26,6 @@ public class SysCustomerQuoteServiceImpl implements ISysCustomerQuoteService {
@Override
public SysCustomerQuote selectSysCustomerQuoteById(Long id) {
SysCustomerQuote sysCustomerQuote = sysCustomerQuoteMapper.selectSysCustomerQuoteById(id);
SysCustomerQuoteChild sysCustomerQuoteChild = new SysCustomerQuoteChild();
sysCustomerQuoteChild.setQuoteId(sysCustomerQuote.getId());
sysCustomerQuote.setSysCustomerQuoteChildList(sysCustomerQuoteChildMapper.selectSysCustomerQuoteChildList(sysCustomerQuoteChild));
return sysCustomerQuote;
}
@ -41,12 +39,14 @@ public class SysCustomerQuoteServiceImpl implements ISysCustomerQuoteService {
String loginName = ShiroUtils.getLoginName();
sysCustomerQuote.setCreateBy(loginName);
sysCustomerQuoteMapper.insertSysCustomerQuote(sysCustomerQuote);
sysCustomerQuote.getId();
int i = 0;
for (SysCustomerQuoteChild sysCustomerQuoteChild : sysCustomerQuote.getSysCustomerQuoteChildList()) {
sysCustomerQuoteChild.setQuoteId(sysCustomerQuote.getId());
sysCustomerQuoteChildMapper.insertSysCustomerQuoteChild(sysCustomerQuoteChild);
i++;
int s = sysCustomerQuote.getSysCustomerQuotechildList().size();
if (s >= 1) {
for (SysCustomerQuoteChild sysCustomerQuoteChild : sysCustomerQuote.getSysCustomerQuotechildList()) {
sysCustomerQuoteChild.setQuoteId(sysCustomerQuote.getSupplierCode());
sysCustomerQuoteChildMapper.insertSysCustomerQuoteChild(sysCustomerQuoteChild);
i++;
}
}
return i;
}
@ -54,12 +54,21 @@ public class SysCustomerQuoteServiceImpl implements ISysCustomerQuoteService {
@Override
public int updateSysCustomerQuote(SysCustomerQuote sysCustomerQuote) {
String loginName = ShiroUtils.getLoginName();
sysCustomerQuote.setCreateBy(loginName);
sysCustomerQuote.setUpdateBy(loginName);
sysCustomerQuoteMapper.updateSysCustomerQuote(sysCustomerQuote);
int i = 0;
for (SysCustomerQuoteChild sysCustomerQuoteChild : sysCustomerQuote.getSysCustomerQuoteChildList()) {
sysCustomerQuoteChildMapper.updateSysCustomerQuoteChild(sysCustomerQuoteChild);
i++;
int s = sysCustomerQuote.getSysCustomerQuotechildList().size();
if (s >= 1) {
for (SysCustomerQuoteChild sysCustomerQuoteChild : sysCustomerQuote.getSysCustomerQuotechildList()) {
if (sysCustomerQuoteChild.getId() == null){
sysCustomerQuoteChild.setQuoteId(sysCustomerQuote.getSupplierCode());
sysCustomerQuoteChildMapper.insertSysCustomerQuoteChild(sysCustomerQuoteChild);
continue;
}
sysCustomerQuoteChild.setQuoteId(sysCustomerQuote.getSupplierCode());
sysCustomerQuoteChildMapper.updateSysCustomerQuoteChild(sysCustomerQuoteChild);
i++;
}
}
return i;
}
@ -76,10 +85,11 @@ public class SysCustomerQuoteServiceImpl implements ISysCustomerQuoteService {
}
@Override
public List selectSysCustomerQuoteBycode() {
return null;
public List<SysCustomerQuote> selectSysCustomerQuoteBycode() {
return sysCustomerQuoteMapper.selectSysCustomerQuoteBycode();
}
@Override
public List<SysCustomerQuote> selectSysCustomerByCustomerCode(String customerCode) {
return Collections.singletonList(sysCustomerQuoteMapper.selectSysCustomerByCustomerQuoteCode(customerCode));

78
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesOrderServiceImpl.java

@ -1,14 +1,26 @@
package com.ruoyi.system.service.impl;
import com.github.pagehelper.Page;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.PageDomain;
import com.ruoyi.common.core.page.TableSupport;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.service.ICommonService;
import com.ruoyi.process.general.service.IProcessService;
import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper;
import com.ruoyi.system.domain.SysSalesOrderVo;
import com.ruoyi.system.domain.SysSalesOrder;
import com.ruoyi.system.mapper.SysSalesOrderMapper;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.service.ISysAttachFileService;
import com.ruoyi.system.service.ISysAttachService;
import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.system.service.ISysSalesOrderService;
import org.activiti.engine.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.List;
/**
@ -26,28 +38,80 @@ public class SysSalesOrderServiceImpl implements ISysSalesOrderService
@Autowired
private RedisCache redisCache;
@Autowired
private ISysAttachService attachService;
@Autowired
private ISysAttachFileService attachFileService;
@Autowired
private ICommonService commonService;
@Autowired
private SysUserMapper userMapper;
@Autowired
private TaskService taskService;
@Autowired
private BizTodoItemMapper todoItemMapper;
@Autowired
private IProcessService processService;
@Autowired
private ISysRoleService roleService;
/**
* 查询销售订单
*
*
* @param salesOrderId 销售订单ID
* @return 销售订单
*/
@Override
public SysSalesOrder selectSysSalesOrderById(Long salesOrderId)
public SysSalesOrderVo selectSysSalesOrderById(Long salesOrderId)
{
return sysSalesOrderMapper.selectSysSalesOrderById(salesOrderId);
SysSalesOrderVo sysSalesOrderVo = sysSalesOrderMapper.selectSysSalesOrderById(salesOrderId);
SysUser sysUser = userMapper.selectUserByLoginName(sysSalesOrderVo.getApplyUserName());
if (sysUser != null) {
sysSalesOrderVo.setApplyUserName(sysUser.getUserName());
}
return sysSalesOrderVo;
}
@Override
public List<SysSalesOrder> selectSysSalesOrderList(SysSalesOrder sysSalesOrder) {
return null;
}
/**
* 查询销售订单列表
*
* @param sysSalesOrder 销售订单
* @param sysSalesOrderVo 销售订单
* @return 销售订单
*/
@Override
public List<SysSalesOrder> selectSysSalesOrderList(SysSalesOrder sysSalesOrder)
public List<SysSalesOrderVo> selectSysSalesOrderList(SysSalesOrderVo sysSalesOrderVo)
{
return sysSalesOrderMapper.selectSysSalesOrderList(sysSalesOrder);
PageDomain pageDomain = TableSupport.buildPageRequest();
Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize();
//PageHelper 仅对第一List分页有效
Page<SysSalesOrderVo> list = (Page<SysSalesOrderVo>) sysSalesOrderMapper.selectSysSalesOrderList(sysSalesOrderVo);
Page<SysSalesOrderVo> page = new Page<>();
for(SysSalesOrderVo sysSalesOrderVo1 : list){
SysUser sysUser = userMapper.selectUserByLoginName(sysSalesOrderVo1.getCreateBy());
if (sysUser != null) {
sysSalesOrderVo.setCreateBy(sysUser.getUserName());
}
SysUser sysUser2 = userMapper.selectUserByLoginName(sysSalesOrderVo.getApplyUser());
if (sysUser2!=null){
sysSalesOrderVo.setApplyUserName(sysUser2.getUserName());
}
}
return list;
}
/**

1
ruoyi-admin/src/main/resources/mapper/system/SysContactsMapper.xml

@ -37,6 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
<if test="customerFax != null and customerFax != ''"> and customer_fax like concat('%', #{customerFax} '%')</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and first_add_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
</where>
</select>

8
ruoyi-admin/src/main/resources/mapper/system/SysCustomerMapper.xml

@ -90,12 +90,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="customerPurser != null and customerPurser != ''"> and customer_purser like concat('%', #{customerPurser}, '%')</if>
<if test="customerAbbreviation != null and customerAbbreviation != ''"> and customer_abbreviation like concat('%', #{customer_abbreviation}, '%')</if>
<if test="deliveryAddress != null and deliveryAddress != ''"> and delivery_address like concat('%', #{deliveryAddress}, '%')</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and first_add_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
<if test="customerSign != null and customerSign != ''"> and customer_sign = #{customerSign}</if>
</where>
</select>
<select id="selectSysCustomerById" parameterType="Long" resultMap="SysCustomerResult">
<include refid="selectSysCustomerVo"/>
where customer_id = #{id}
where id = #{id}
</select>
<select id="selectSysCustomerBycode" resultMap="SysCustomerResult">
@ -252,11 +254,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</update>
<delete id="deleteSysCustomerById" parameterType="Long">
delete from sys_customer where id = #{customerId}
update set sys_customer set use_status = 1 where id = #{id}
</delete>
<delete id="deleteSysCustomerByIds" parameterType="String">
delete from sys_customer where id in
update set sys_customer set use_status = 1 where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>

89
ruoyi-admin/src/main/resources/mapper/system/SysCustomerQuoteChildMapper.xml

@ -4,38 +4,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysCustomerQuoteChildMapper">
<resultMap type="SysCustomerQuoteChild" id="SysCustomerQuoteChildResult">
<result property="id" column="id" />
<result property="quoteId" column="quoteId" />
<result property="materialId" column="materialId" />
<result property="materialCode" column="materialCode" />
<result property="materialName" column="materialName" />
<result property="materialType" column="materialType" />
<result property="processMethod" column="processMethod" />
<result property="brand" column="brand" />
<result property="photoUrl" column="photoUrl" />
<result property="describe" column="describe" />
<result property="countTax" column="countTax" />
<result property="usdTax" column="usdTax" />
<result property="materialNum" column="materialNum" />
<result property="materialSole" column="materialSole" />
<result property="materialRmb" column="materialRmb" />
<result property="materialNoRmb" column="materialNoRmb" />
<result property="materialNoUsd" column="materialNoUsd" />
<result property="materialUsd" column="materialUsd" />
<result property="materialUsdSum" column="materialUsdSum" />
<result property="materialNoUsdSum" column="materialNoUsdSum" />
<result property="materialNoRmbSum" column="materialNoRmbSum" />
<result property="materialRmbSum" column="materialRmbSum" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="useStatus" column="use_status" />
<result property="auditStatus" column="audit_status" />
<result property="deginFlag" column="degin_flag" />
<result property="delFlag" column="del_flag" />
<resultMap type="SysCustomerQuoteChild" id="customerQuoteChildResult">
<result property="id" column="id" />
<result property="quoteId" column="quoteId" />
<result property="materialId" column="materialId" />
<result property="materialCode" column="materialCode" />
<result property="materialName" column="materialName" />
<result property="materialType" column="materialType" />
<result property="processMethod" column="processMethod" />
<result property="brand" column="brand" />
<result property="photoUrl" column="photoUrl" />
<result property="describe" column="describe" />
<result property="countTax" column="countTax" />
<result property="usdTax" column="usdTax" />
<result property="materialNum" column="materialNum" />
<result property="materialSole" column="materialSole" />
<result property="materialRmb" column="materialRmb" />
<result property="materialNoRmb" column="materialNoRmb" />
<result property="materialNoUsd" column="materialNoUsd" />
<result property="materialUsd" column="materialUsd" />
<result property="materialUsdSum" column="materialUsdSum" />
<result property="materialNoUsdSum" column="materialNoUsdSum" />
<result property="materialNoRmbSum" column="materialNoRmbSum" />
<result property="materialRmbSum" column="materialRmbSum" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="useStatus" column="use_status" />
<result property="auditStatus" column="audit_status" />
</resultMap>
<sql id="selectSysCustomerQuoteChildVo">
@ -44,27 +42,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
materialNoUsdSum, materialNoRmbSum, materialRmbSum, create_by, create_time, update_by,
update_time, remark, use_status,audit_status from sys_customer_quotechild
</sql>
<select id="selectSysCustomerQuoteChildList" parameterType="SysCustomerQuoteChild" resultMap="SysCustomerQuoteChildResult">
select quoteId,id, materialId, materialCode, materialName, materialType, processMethod, brand, photoUrl,
`describe`,countTax, usdTax, materialNum,materialSole, materialRmb, materialNoRmb, materialNoUsd, materialUsd, materialUsdSum,
materialNoUsdSum, materialNoRmbSum, materialRmbSum, create_by, create_time, update_by,
update_time, remark, use_status,audit_status from sys_customer_quotechild
<select id="selectSysCustomerQuoteChildList" parameterType="SysCustomerQuoteChild" resultMap="customerQuoteChildResult">
<include refid="selectSysCustomerQuoteChildVo"/>
<where>
<if test="quoteId != null "> and quoteId = #{quoteId}</if>
<if test="quoteId != null and quoteId !='' "> and quoteId = #{quoteId}</if>
<if test="materialId != null "> and materialId = #{materialId}</if>
<if test="materialCode != null and materialCode != ''"> and materialCode = #{materialCode}</if>
<if test="materialCode != null and materialCode != ''"> and materialCode like concat('%', #{#{materialCode}}, '%')</if>
<if test="materialName != null and materialName != ''"> and materialName like concat('%', #{materialName}, '%')</if>
</where>
</select>
<select id="selectSysCustomerQuoteChildById" parameterType="Long" resultMap="SysCustomerQuoteChildResult">
<select id="selectSysCustomerQuoteChildById" parameterType="Long" resultMap="customerQuoteChildResult">
<include refid="selectSysCustomerQuoteChildVo"/>
where id = #{id}
</select>
<insert id="insertSysCustomerQuoteChild" parameterType="SysCustomerQuoteChild">
<select id="selectSysCustomerQuoteChildByQuoteId" parameterType="String" resultMap="customerQuoteChildResult">
<include refid="selectSysCustomerQuoteChildVo"/>
where quoteId = #{quoteId}
</select>
<insert id="insertSysCustomerQuoteChild" parameterType="SysCustomerQuoteChild" useGeneratedKeys="true" keyProperty="id">
insert into sys_customer_quotechild
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="quoteId != null">quoteId,</if>
@ -91,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="remark != null">remark,</if>
useStatus,auditStatus
use_status,audit_status
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="quoteId != null">#{quoteId},</if>
@ -156,7 +151,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteSysCustomerQuoteChildById" parameterType="Long">
update sys_customer_quotechild set delFlag = 1 from sys_customer_quotechild where id = #{id}
update sys_customer_quotechild set delFlag = 1 where id = #{id}
</delete>
<delete id="deleteSysCustomerQuoteChildByIds" parameterType="String">

96
ruoyi-admin/src/main/resources/mapper/system/SysCustomerQuoteMapper.xml

@ -5,38 +5,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.ruoyi.system.mapper.SysCustomerQuoteMapper">
<resultMap type="SysCustomerQuote" id="SysCustomerQuoteResult">
<result property="id" column="id" />
<result property="supplierCode" column="supplierCode" />
<result property="customerCode" column="customerCode" />
<result property="customerName" column="customerName" />
<result property="enterprise" column="enterprise" />
<result property="enterpriseSum" column="enterpriseSum" />
<result property="commonCurrency" column="common_currency" />
<result property="rmbTax" column="rmbTax" />
<result property="usdTax" column="usdTax" />
<result property="noRmb" column="noRmb" />
<result property="noRmbSum" column="noRmbSum" />
<result property="rmb" column="rmb" />
<result property="rmbSum" column="rmbSum" />
<result property="noUsd" column="noUsd" />
<result property="noUsdSum" column="noUsdSum" />
<result property="usd" column="usd" />
<result property="usdSum" column="usdSum" />
<result property="business_members" column="businessMembers" />
<result property="degin_flag" column="deginFlag" />
<result property="del_flag" column="delFlag" />
<result property="create_by" column="createBy" />
<result property="create_time" column="createTime" />
<result property="update_by" column="updateBy" />
<result property="update_time" column="updateTime" />
<result property="remark" column="remark" />
<result property="id" column="id" />
<result property="supplierCode" column="supplierCode" />
<result property="customerCode" column="customerCode" />
<result property="customerName" column="customerName" />
<result property="pricingDate" column="pricingDate" />
<result property="enterprise" column="enterprise" />
<result property="enterpriseSum" column="enterpriseSum" />
<result property="commonCurrency" column="common_currency" />
<result property="confirmFax" column="confirm_fax" />
<result property="rmbTax" column="rmbTax" />
<result property="usdTax" column="usdTax" />
<result property="noRmb" column="noRmb" />
<result property="noRmbSum" column="noRmbSum" />
<result property="rmb" column="rmb" />
<result property="rmbSum" column="rmbSum" />
<result property="noUsd" column="noUsd" />
<result property="noUsdSum" column="noUsdSum" />
<result property="usd" column="usd" />
<result property="usdSum" column="usdSum" />
<result property="businessMembers" column="business_members" />
<result property="deginFlag" column="degin_flag" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="auditStatus" column="audit_status" />
<result property="useStatus" column="use_status" />
</resultMap>
<sql id="selectSysCustomerQuoteVo">
select id,supplierCode,customerCode,enterprise,enterpriseSum,common_currency,
rmbTax,usdTax,noRmb,noRmbSum,rmb,rmbSum,noUsd,noUsdSum,usd,usdSum,business_members,
degin_flag,del_flag,create_by,create_time,update_by,update_time,remark from sys_customer_quote
select id,supplierCode,customerCode,customerName,pricingDate,enterprise,enterpriseSum,common_currency,
confirm_fax,rmbTax,usdTax,noRmb,noRmbSum,rmb,rmbSum,noUsd,noUsdSum,usd,usdSum,business_members,
degin_flag,del_flag,create_by,create_time,update_by,update_time,remark,
audit_status,use_status
from sys_customer_quote
</sql>
<select id="selectSysCustomerQuoteList" parameterType="SysCustomerQuote" resultMap="SysCustomerQuoteResult">
@ -45,7 +50,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="supplierCode!= null and supplierCode != ''"> and supplierCode like concat('%', #{supplierCode}, '%')</if>
<if test="customerCode!= null and customerCode != ''"> and customerCode like concat('%', #{customerCode}, '%')</if>
<if test="customerName!= null and customerName != ''"> and customerName like concat('%', #{customerName}, '%')</if>
<if test="enterprise!= null and enterprise!= ''"> and enterprise like concat('%', #{enterprise}, '%')</if>
<if test="auditStatus!= null and auditStatus != ''"> and audit_status = #{auditStatus}</if>
<if test="useStatus!= null and useStatus != ''"> and use_status = #{useStatus}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and pricingDate between #{params.beginCreateTime} and #{params.endCreateTime}</if>
</where>
</select>
@ -54,7 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</select>
<select id="selectSysCustomerByQuoteCode" resultMap="SysCustomerQuoteResult">
<select id="selectSysCustomerQuoteBycode" resultMap="SysCustomerQuoteResult">
select customerCode,cusotomerName from sys_customer_quote
</select>
@ -62,17 +69,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectSysCustomerQuoteVo"/>
where customerCode = #{cusotomerCode}
</select>
<insert id="insertSysCustomerQuote" parameterType="SysCustomerQuote" useGeneratedKeys="true" keyProperty="id">
insert into sys_customer_quote
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="supplierCode != null and supplierCode != ''" >supplierCode,</if>
<if test="customerCode != null and customerCode != ''" >customerCode,</if>
<if test="customerName != null and customerName !=''">customerName,</if>
<if test="pricingDate != null and pricingDate != ''" >pricingDate,</if>
<if test="enterprise != null and enterprise != ''" >enterprise,</if>
<if test="enterpriseSum != null and enterpriseSum != ''" >enterpriseSum,</if>
<if test="commonCurrency =null and commonCurrency != ''" >common_currency,</if>
<if test="confirmFax != null and confirmFax != ''" >confirm_fax,</if>
<if test="rmbTax != null and rmbTax != ''" >rmbTax,</if>
<if test="usdTax != null and usdTax != '' ">usdTax,</if>
<if test="noRmb != null and noRmb != ''" >noRmb,</if>
@ -88,17 +95,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null and updateBy != ''" >update_by,</if>
<if test="updateTime != null and updateTime != ''" >update_time,</if>
<if test="remark != null and remark != ''" >remark,</if>
degin_flag,
del_flag,
audit_status,
use_status,
create_time,
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="supplierCode != null and supplierCode != ''" >#{supplierCode},</if>
<if test="customerCode != null and customerCode != ''" >#{customerCode},</if>
<if test="customerName != null and customerName !=''">#{customerName},</if>
<if test="pricingDate != null and pricingDate != ''" >#{pricingDate},</if>
<if test="enterprise != null and enterprise != ''" >#{enterprise},</if>
<if test="enterpriseSum != null and enterpriseSum != ''" >#{enterpriseSum},</if>
<if test="commonCurrency =null and commonCurrency != ''" >#{commonCurrency},</if>
<if test="confirmFax != null and confirmFax != ''" >#{confirmFax},</if>
<if test="rmbTax != null and rmbTax != ''" >#{rmbTax},</if>
<if test="usdTax != null and usdTax != '' ">#{usdTax},</if>
<if test="noRmb != null and noRmb != ''" >#{noRmb},</if>
@ -126,9 +135,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="supplierCode != null and supplierCode != ''" >supplierCode = #{supplierCode},</if>
<if test="customerCode != null and customerCode != ''" >customerCode = #{customerCode},</if>
<if test="customerName != null and customerName !=''">customerName = #{customerName},</if>
<if test="pricingDate != null and pricingDate != ''" >pricingDate = #{pricingDate},</if>
<if test="enterprise != null and enterprise != ''" >enterprise = #{enterprise},</if>
<if test="enterpriseSum != null and enterpriseSum != ''" >enterpriseSum = #{enterpriseSum},</if>
<if test="commonCurrency =null and commonCurrency != ''" >common_currency = #{common_currency},,</if>
<if test="commonCurrency =null and commonCurrency != ''" >common_currency = #{common_currency},</if>
<if test="confirmFax != null and confirmFax != ''" >confirm_fax = #{confirmFax},</if>
<if test="rmbTax != null and rmbTax != ''" >rmbTax = #{rmbTax},</if>
<if test="usdTax != null and usdTax != '' ">usdTax = #{usdTax},</if>
<if test="noRmb != null and noRmb != ''" >noRmb = #{noRmb},</if>
@ -140,22 +151,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="usd != null and usd != ''" >usd = #{usd},</if>
<if test="usdSum != null and usdSum != ''" >usdSum = #{usdSum},</if>
<if test="businessMembers != null and businessMembers != ''" >businessMembers = #{businessMembers},</if>
<if test="deginFlag != null and deginFlag != ''" >degin_flag = #{deginFlag},</if>
<if test="createBy != null and createBy != ''" >create_by = #{createBy},</if>
<if test="updateBy != null and updateBy != ''" >update_by = #{updateBy},</if>
<if test="updateTime != null and updateTime != ''" >update_time = #{updateBy},</if>
<if test="remark != null and remark != ''" >remark = #{remark},</if>
del_flag,
update_time = CONCAT_WS(',',NOW(),update_time),
<if test="auditStatus != null and auditStatus != ''" >audit_status = #{auditStatus},</if>
<if test="useStatus != null and useStatus != ''" >use_status = #{useStatus},</if>
update_time = now()
</trim>
where customer_id = #{customerId}
where id = #{id}
</update>
<delete id="deleteSysCustomerQuoteById" parameterType="Long">
delete from sys_customer_quote where id = #{id}
update sys_customer_quote set use_status = 1 from sys_customer_quote where id = #{id}
</delete>
<delete id="deleteSysCustomerQuoteByIds" parameterType="String">
delete from sys_customer_quote where id in
update sys_customer_quote set use_status = 1 sys_customer_quote where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>

195
ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderMapper.xml

@ -5,52 +5,67 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.ruoyi.system.mapper.SysSalesOrderMapper">
<resultMap type="SysSalesOrder" id="SysSalesOrderResult">
<result property="salesOrderId" column="sales_order_id" />
<result property="salesOrderCode" column="sales_order_code" />
<result property="salesOrderNumber" column="sales_order_number" />
<result property="appointmentNumber" column="appointment_number" />
<result property="enterpriseCode" column="enterprise_code" />
<result property="enterpriseName" column="enterprise_name" />
<result property="paymentTerms" column="payment_terms" />
<result property="deliveryConditions" column="delivery_conditions" />
<result property="deliveryMethod" column="delivery_method" />
<result property="orderReceivingMode" column="order_receiving_mode" />
<result property="customerContact" column="customer_contact" />
<result property="customerFactory" column="customer_factory" />
<result property="contactNumber" column="contact_number" />
<result property="businessMembers" column="business_members" />
<result property="customerFax" column="customer_fax" />
<result property="deliveryAddress" column="delivery_address" />
<result property="orderReceivingTime" column="order_receiving_time" />
<result property="billingTime" column="billing_time" />
<result property="customerRemarks" column="customer_remarks" />
<result property="currentInventory" column="current_inventory" />
<result property="creditLimit" column="credit_limit" />
<result property="unpaidAmount" column="unpaid_amount" />
<result property="availableCredit" column="available_credit" />
<result property="confirmTax" column="confirm_tax" />
<result property="taxRate" column="tax_rate" />
<result property="totalAmount" column="total_amount" />
<result property="modificationTime" column="modification_time" />
<result property="confirmTime" column="confirm_time" />
<result property="confirmNo" column="confirm_no" />
<result property="confirmName" column="confirm_name" />
<result property="auditNo" column="audit_no" />
<result property="standbyOne" column="standby_one" />
<result property="auditName" column="audit_name" />
<result property="standbyTwo" column="standby_two" />
<result property="auditTime" column="audit_time" />
<result property="auditRemarks" column="audit_remarks" />
<result property="nationalTaxBill" column="national_tax_bill" />
<result property="firstAddTime" column="first_add_time" />
<result property="updateInfoTime" column="update_info_time" />
<result property="fileUpload" column="file_upload" />
<result property="salesOrderId" column="sales_order_id" />
<result property="useStatus" column="use_status" />
<result property="auditStatus" column="audit_status" />
<result property="makeStatus" column="make_status" />
<result property="deliveryStatus" column="delivery_status" />
<result property="closeStatus" column="close_status" />
<result property="salesOrderCode" column="sales_order_code" />
<result property="salesOrderNumber" column="sales_order_number" />
<result property="salesOrderType" column="sales_order_type" />
<result property="enterpriseCode" column="enterprise_code" />
<result property="enterpriseName" column="enterprise_name" />
<result property="materialSum" column="material_sum" />
<result property="enterpriseSum" column="enterprise_sum" />
<result property="noRmbPrice" column="noRmbPrice" />
<result property="noRmbSum" column="noRmbSum" />
<result property="rmbPrice" column="rmbPrice" />
<result property="rmbTaxSum" column="rmbTaxSum" />
<result property="noUsdPrice" column="noUsdPrice" />
<result property="noUsdSum" column="noUsdSum" />
<result property="usdPrice" column="usdPrice" />
<result property="usdTaxSum" column="usdTaxSum" />
<result property="paymentTerms" column="payment_terms" />
<result property="deliveryTime" column="delivery_time" />
<result property="deliveryConditions" column="delivery_conditions" />
<result property="deliveryMethod" column="delivery_method" />
<result property="deliveryAddress" column="delivery_address" />
<result property="orderReceivingMode" column="order_receiving_mode" />
<result property="customerContact" column="customer_contact" />
<result property="contactNumber" column="contact_number" />
<result property="customerFax" column="customer_fax" />
<result property="businessMembers" column="business_members" />
<result property="confirmTax" column="confirm_tax" />
<result property="taxRate" column="tax_rate" />
<result property="totalAmount" column="total_amount" />
<result property="modificationTime" column="modification_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" />
<result property="fileUpload" column="file_upload" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="tradeClause" column="trade_clause" />
<result property="remark" column="remark" />
<result property="outBoundQuantity" column="out_bound_quantity" />
<result property="unBoundQuantity" column="un_bound_quantity" />
</resultMap>
<sql id="selectSysSalesOrderVo">
select sales_order_id, sales_order_code, sales_order_number, appointment_number, enterprise_code, enterprise_name, payment_terms, delivery_conditions, delivery_method, order_receiving_mode, customer_contact, customer_factory, contact_number, business_members, customer_fax, delivery_address, order_receiving_time, billing_time, customer_remarks, current_inventory, credit_limit, unpaid_amount, available_credit, confirm_tax, tax_rate, total_amount, modification_time, confirm_time, confirm_no, confirm_name, audit_no, standby_one, audit_name, standby_two, audit_time, audit_remarks, national_tax_bill, first_add_time, update_info_time, file_upload
from sys_sales_order
select sales_order_id, use_status, audit_status, make_status, delivery_status,
close_status, sales_order_code, sales_order_number, sales_order_type,enterprise_code,
enterprise_name, material_sum, enterprise_sum, noRmbPrice, noRmbSum, rmbPrice, rmbTaxSum,
noUsdPrice, noUsdSum, usdPrice, usdTaxSum, payment_terms, delivery_time,
delivery_conditions, delivery_method, delivery_address, order_receiving_mode,
customer_contact, contact_number, customer_fax, business_members, confirm_tax, tax_rate,
total_amount, billing_time, modification_time,standby_one, standby_two, first_add_time,
update_info_time, file_upload, create_by, create_time, update_by, update_time, remark,
out_bound_quantity, un_bound_quantity, trade_clause
from sys_sales_order
</sql>
<select id="selectSysSalesOrderList" parameterType="SysSalesOrder" resultMap="SysSalesOrderResult">
@ -58,20 +73,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="salesOrderCode != null and salesOrderCode != ''"> and sales_order_code like concat('%', #{salesOrderCode}, '%')</if>
<if test="salesOrderNumber != null and salesOrderNumber != ''"> and sales_order_number like concat('%', #{salesOrderNumber}, '%')</if>
<if test="appointmentNumber != null and appointmentNumber != ''"> and appointment_number like concat('%', #{appointmentNumber}, '%')</if>
<if test="enterpriseCode != null and enterpriseCode != ''"> and enterprise_code like concat('%', #{enterpriseCode}, '%')</if>
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="customerContact != null and customerContact != ''"> and customer_contact = #{customerContact}</if>
<if test="contactNumber != null and contactNumber != ''"> and contact_number = #{contactNumber}</if>
<if test="businessMembers != null and businessMembers != ''"> and business_members = #{businessMembers}</if>
<if test="auditNo != null and auditNo != ''"> and audit_no = #{auditNo}</if>
<if test="confirmNo != null and confirmNo != ''"> and confirm_no = #{confirmNo}</if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(order_receiving_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
</if>
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
and date_format(order_receiving_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if>
<if test="useStatus != null and useStatus != ''"> and use_status = #{useStatus}</if>
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if>
<if test="makeStatus != null and makeStatus != ''"> and make_status = #{makeStatus}</if>
<if test="deliveryStatus != null and deliveryStatus != ''"> and delivery_status = #{deliveryStatus}</if>
<if test="closeStatus != null and closeStatus != ''"> and close_status = #{closeStatus}</if>
</where>
</select>
@ -85,82 +96,64 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="salesOrderCode != null">sales_order_code,</if>
<if test="salesOrderNumber != null">sales_order_number,</if>
<if test="appointmentNumber != null">appointment_number,</if>
<if test="enterpriseCode != null">enterprise_code,</if>
<if test="enterpriseName != null">enterprise_name,</if>
<if test="paymentTerms != null">payment_terms,</if>
<if test="deliveryTime != null">delivery_time,</if>
<if test="deliveryAddress != null">#{deliveryAddress},</if>
<if test="deliveryConditions != null">delivery_conditions,</if>
<if test="deliveryMethod != null">delivery_method,</if>
<if test="orderReceivingMode != null">order_receiving_mode,</if>
<if test="customerContact != null">customer_contact,</if>
<if test="customerFactory != null">customer_factory,</if>
<if test="contactNumber != null">contact_number,</if>
<if test="businessMembers != null">business_members,</if>
<if test="customerFax != null">customer_fax,</if>
<if test="deliveryAddress != null">delivery_address,</if>
<if test="orderReceivingTime != null">order_receiving_time,</if>
<if test="billingTime != null">billing_time,</if>
<if test="customerRemarks != null">customer_remarks,</if>
<if test="currentInventory != null">current_inventory,</if>
<if test="creditLimit != null">credit_limit,</if>
<if test="unpaidAmount != null">unpaid_amount,</if>
<if test="availableCredit != null">available_credit,</if>
<if test="orderReceivingMode != null">order_receiving_mode,</if>
<if test="confirmTax != null">confirm_tax,</if>
<if test="taxRate != null">tax_rate,</if>
<if test="totalAmount != null">total_amount,</if>
<if test="modificationTime != null">modification_time,</if>
<if test="confirmTime != null">confirm_time,</if>
<if test="confirmNo != null">confirm_no,</if>
<if test="confirmName != null">confirm_name,</if>
<if test="auditNo != null">audit_no,</if>
<if test="standbyOne != null">standby_one,</if>
<if test="auditName != null">audit_name,</if>
<if test="standbyTwo != null">standby_two,</if>
<if test="auditTime != null">audit_time,</if>
<if test="auditRemarks != null">audit_remarks,</if>
<if test="nationalTaxBill != null">national_tax_bill,</if>
<if test="fileUpload != null">file_upload,</if>
first_add_time,
<if test="createBy != null">create_by,</if>
<if test="remark != null">remark,</if>
<if test="outBoundQuantity != null">out_bound_quantity,</if>
<if test="unBoundQuantity != null">un_bound_quantity,</if>
<if test="tradeClause != null">trade_clause,</if>
first_add_time,create_time
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="salesOrderCode != null">#{salesOrderCode},</if>
<if test="salesOrderNumber != null">#{salesOrderNumber},</if>
<if test="appointmentNumber != null">#{appointmentNumber},</if>
<if test="enterpriseCode != null">#{enterpriseCode},</if>
<if test="enterpriseName != null">#{enterpriseName},</if>
<if test="paymentTerms != null">#{paymentTerms},</if>
<if test="deliveryTime != null">#{deliveryTime},</if>
<if test="deliveryStatus != null">#{deliveryStatus},</if>
<if test="deliveryConditions != null">#{deliveryConditions},</if>
<if test="deliveryMethod != null">#{deliveryMethod},</if>
<if test="orderReceivingMode != null">#{orderReceivingMode},</if>
<if test="customerContact != null">#{customerContact},</if>
<if test="customerFactory != null">#{customerFactory},</if>
<if test="contactNumber != null">#{contactNumber},</if>
<if test="businessMembers != null">#{businessMembers},</if>
<if test="customerFax != null">#{customerFax},</if>
<if test="deliveryAddress != null">#{deliveryAddress},</if>
<if test="orderReceivingTime != null">#{orderReceivingTime},</if>
<if test="billingTime != null">#{billingTime},</if>
<if test="customerRemarks != null">#{customerRemarks},</if>
<if test="currentInventory != null">#{currentInventory},</if>
<if test="creditLimit != null">#{creditLimit},</if>
<if test="unpaidAmount != null">#{unpaidAmount},</if>
<if test="availableCredit != null">#{availableCredit},</if>
<if test="orderReceivingMode != null">#{orderReceivingMode},</if>
<if test="confirmTax != null">#{confirmTax},</if>
<if test="taxRate != null">#{taxRate},</if>
<if test="totalAmount != null">#{totalAmount},</if>
<if test="modificationTime != null">#{modificationTime},</if>
<if test="confirmTime != null">#{confirmTime},</if>
<if test="confirmNo != null">#{confirmNo},</if>
<if test="confirmName != null">#{confirmName},</if>
<if test="auditNo != null">#{auditNo},</if>
<if test="standbyOne != null">#{standbyOne},</if>
<if test="auditName != null">#{auditName},</if>
<if test="standbyTwo != null">#{standbyTwo},</if>
<if test="auditTime != null">#{auditTime},</if>
<if test="auditRemarks != null">#{auditRemarks},</if>
<if test="nationalTaxBill != null">#{nationalTaxBill},</if>
<if test="fileUpload != null">#{fileUpload},</if>
now(),
<if test="createBy != null">#{createBy},</if>
<if test="remark != null">#{remark},</if>
<if test="outBoundQuantity != null">#{outBoundQuantity},</if>
<if test="unBoundQuantity != null">#{unBoundQuantity},</if>
<if test="tradeClause != null">#{tradeClause},</if>
now(),now()
</trim>
</insert>
@ -174,47 +167,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
<if test="paymentTerms != null">payment_terms = #{paymentTerms},</if>
<if test="deliveryConditions != null">delivery_conditions = #{deliveryConditions},</if>
<if test="deliveryTime != null">delivery_time = #{deliveryTime},</if>
<if test="deliveryAddress != null">delivery_address = #{deliveryAddress},</if>
<if test="deliveryMethod != null">delivery_method = #{deliveryMethod},</if>
<if test="orderReceivingMode != null">order_receiving_mode = #{orderReceivingMode},</if>
<if test="customerContact != null">customer_contact = #{customerContact},</if>
<if test="customerFactory != null">customer_factory = #{customerFactory},</if>
<if test="contactNumber != null">contact_number = #{contactNumber},</if>
<if test="businessMembers != null">business_members = #{businessMembers},</if>
<if test="customerFax != null">customer_fax = #{customerFax},</if>
<if test="deliveryAddress != null">delivery_address = #{deliveryAddress},</if>
<if test="orderReceivingTime != null">order_receiving_time = #{orderReceivingTime},</if>
<if test="billingTime != null">billing_time = #{billingTime},</if>
<if test="customerRemarks != null">customer_remarks = #{customerRemarks},</if>
<if test="currentInventory != null">current_inventory = #{currentInventory},</if>
<if test="creditLimit != null">credit_limit = #{creditLimit},</if>
<if test="unpaidAmount != null">unpaid_amount = #{unpaidAmount},</if>
<if test="availableCredit != null">available_credit = #{availableCredit},</if>
<if test="confirmTax != null">confirm_tax = #{confirmTax},</if>
<if test="taxRate != null">tax_rate = #{taxRate},</if>
<if test="totalAmount != null">total_amount = #{totalAmount},</if>
<if test="modificationTime != null">modification_time = #{modificationTime},</if>
<if test="confirmTime != null">confirm_time = #{confirmTime},</if>
<if test="confirmNo != null">confirm_no = #{confirmNo},</if>
<if test="confirmName != null">confirm_name = #{confirmName},</if>
<if test="auditNo != null">audit_no = #{auditNo},</if>
<if test="standbyOne != null">standby_one = #{standbyOne},</if>
<if test="auditName != null">audit_name = #{auditName},</if>
<if test="standbyTwo != null">standby_two = #{standbyTwo},</if>
<if test="auditTime != null">audit_time = #{auditTime},</if>
<if test="auditRemarks != null">audit_remarks = #{auditRemarks},</if>
<if test="nationalTaxBill != null">national_tax_bill = #{nationalTaxBill},</if>
<if test="fileUpload != null">file_upload = #{fileUpload},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="outBoundQuantity != null">out_bound_quantity = #{outBoundQuantity},</if>
<if test="unBoundQuantity != null"> un_bound_quantity = #{unBoundQuantity}</if>
<if test="tradeClause != null">trade_clause = #{tradeClause},</if>
update_info_time = CONCAT_WS(',',NOW(),update_info_time),
update_time = #{updateTime}
</trim>
where sales_order_id = #{salesOrderId}
</update>
<delete id="deleteSysSalesOrderById" parameterType="Long">
delete from sys_sales_order where sales_order_id = #{salesOrderId}
update sys_sales_order set use_status = 1 where sales_order_id = #{salesOrderId}
</delete>
<delete id="deleteSysSalesOrderByIds" parameterType="String">
delete from sys_sales_order where sales_order_id in
update sys_sales_order set use_status = 1 where sales_order_id in
<foreach item="salesOrderId" collection="array" open="(" separator="," close=")">
#{salesOrderId}
</foreach>

52
ruoyi-admin/src/main/resources/templates/erp/bom/add.html

@ -172,59 +172,11 @@
minimumInputLength: 1
}
});
//todo 物料名称下拉框
// $("#materialName").select2({
// theme: "bootstrap",
// allowClear: true,
// placeholder: "请选择一个料号名称",
// ajax:{
// type: "get",
// url:ctx + "erp/material/getMaterialSelList",
// dataType:"json",
// delay:250,
// data:function(params){
// var searchVal = params.term;
// var obj = {
// keyword: searchVal
// };
// return obj;
// },
// cache:true,
// processResults: function (res, params) {
// var options = [];
// if(res.code==0){
// var resultList = res.data;
// console.log(resultList);
// for(var i= 0, len=resultList.length;i<len;i++){
// var option = resultList[i];
// option.id = resultList[i]["materialNo"];
// option.text = resultList[i]["materialName"];
// options.push(option);
// }
// }
// return {
// results: options
// };
// },
// escapeMarkup: function (markup) { return markup; },
// minimumInputLength: 1
// }
// });
$('#materialNo').on('select2:select', function (e) {
var data = e.params.data;
$("input[name='materialName']").val(data.materialName);
materilalSelect(data);
});
// $('#materialName').on('select2:select', function (e) {
// // debugger
// var data = e.params.data;
// if(($("#material").select2("val"))!=data.materialNo){
// $("#materialNo").val(data.materialNo);
// materilalSelect(data);
// }else{
// return;
// }
// });
var options = {
id: 'bootstrap-sub-table-1',
showSearch: false,
@ -329,11 +281,7 @@
return "输入数值不能大100"
}else if(value < 0){
return "输入数值不能小于0";
}else {
new Number(value).toFixed(4)*100 +"%";
}
}
}
},

2
ruoyi-admin/src/main/resources/templates/erp/bom/detail.html

@ -133,7 +133,7 @@
}
$(function() {
$("#selectMaterialType").val([erpBom.materialType]).trigger("change");
$("#selectMaterialType").val(materilaType1).trigger("change");
// $("#selectMaterialType").val([erpBom.materialType]).trigger("change");
// $("#selectProcessMethod").val([erpBom.processMethod]).trigger("change");
// $("#selectUnit").val([erpBom.unit]).trigger("change");

7
ruoyi-admin/src/main/resources/templates/erp/bom/edit.html

@ -283,10 +283,10 @@
{
field: 'lossRate',
align: 'center',
title: '损耗率',
title: '损耗率(%)',
editable : {
type : 'text',
title : '损耗率',
title : '损耗率(%)',
validate : function(value) {
if (!value) {
return '损耗率不能为空';
@ -294,6 +294,9 @@
if (isNaN(value)) {
return '损耗率必须为数字';
}
if (value < 0 || value > 100) {
return '损耗率必须大于等于0小于等于100';
}
}
}
},

34
ruoyi-admin/src/main/resources/templates/system/customer/customer.html

@ -75,13 +75,20 @@
</li>
<li>
<label>审核状态:</label>
<select name="auditStatus">
<option value="">所有</option>
<select name="auditStatus" th:with="auditStatus=${@dict.getType('auditStatus')}">
<option value="">所有</option>
<option th:each="dict : ${auditStatus}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}">
</option>
</select>
</li>
<li>
<label>使用状态:</label>
<select name="useStatus">
<select name="useStatus" th:with="useStatus=${@dict.getType('useStatus')}">
<option value="">所有</option>
<option th:each="dict : ${useStatus}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}">
</option>
</select>
</li>
<li>
@ -92,8 +99,11 @@
</li>
<li>
<label>客户标识:</label>
<select name="customerSign">
<select name="customerSign" th:with="customerSign=${@dict.getType('sys_customer_sign')}">
<option value="">所有</option>
<option th:each="dict : ${customerSign}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}">
</option>
</select>
</li>
<li class="select-time">
@ -328,7 +338,6 @@
</div>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>
<script th:inline="javascript">
@ -510,6 +519,21 @@
escapeMarkup: function (markup) { return markup; },
}
});
$.ajax({
url: ctx + 'system/user/list',
type: 'post',
success: function (res) {
console.log(res)
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("#select[name='businessMembers']").append("<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
}
} else {
$.modal.msgError(res.msg);
}
}
});
});
//导出

247
ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html

@ -56,9 +56,9 @@
<label class="col-sm-6 control-label is-required">是否含税:</label>
<div class="col-sm-6">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}">
<input required 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>
<input required type="radio" th:id="${'confirmFax_' + dict.dictCode}"
name="confirmFax" th:value="${dict.dictValue}" th:checked="${dict.default}">
<label th:for="${'confirmFax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
@ -71,7 +71,10 @@
<div class="form-group">
<label class="col-sm-4 control-label">订价日期:</label>
<div class="col-sm-8">
<input name="createTime" class="form-control" type="datetime-local">
<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>
@ -84,21 +87,21 @@
<div class="container">
<h4 class="form-header h4">计算</h4>
<div class="col-xs-12 form-row">
<label class=" col-sm-2">物料合计:</label><input class="col-sm-2" name="enterprise" id="enterprise" type="text" disabled/>
<label class=" col-sm-2">数量合计:</label><input class="col-sm-2" name="enterpriseSum" id="enterpriseSum" type="text" disabled/>
<label class=" col-sm-2">物料合计:</label><input class="col-sm-4" name="enterprise" id="enterprise" type="text" disabled/>
<label class=" col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" id="enterpriseSum" type="number" disabled/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2"> 不含税单价:</label><input placeholder="RMB" class="col-sm-1" name="noRmb" id="noRmb" type="text" disabled/>
<label class="col-sm-2"> 不含税总价:</label><input placeholder="RMB" class="col-sm-1" name="noRmbSum" id="noRmbSum" type="text" disabled/>
<label class="col-sm-2"> 含税单价:</label><input placeholder="RMB" class="col-sm-1" name="rmb" id="rmb" type="text" disabled/>
<label class="col-sm-2"> 含税总价:</label><input placeholder="RMB" class="col-sm-1" name="rmbSum" id="rmbSum" type="text" disabled/>
<label class="col-sm-2"> 不含税单价:</label><input placeholder="RMB" class="col-sm-1" name="noRmb" id="noRmb" type="number" disabled/>
<label class="col-sm-2"> 不含税总价:</label><input placeholder="RMB" class="col-sm-1" name="noRmbSum" id="noRmbSum" type="number" disabled/>
<label class="col-sm-2"> 含税单价:</label><input placeholder="RMB" class="col-sm-1" name="rmb" id="rmb" type="number" disabled/>
<label class="col-sm-2"> 含税总价:</label><input placeholder="RMB" class="col-sm-1" name="rmbSum" id="rmbSum" type="number" disabled/>
</div>
<div class="col-xs-12">
<label class="col-sm-2">不含税单价:</label><input placeholder="USD" class="col-sm-1" name="noUsd" id="noUsd" type="text" disabled/>
<label class="col-sm-2">不含税总价:</label><input placeholder="USD" class="col-sm-1" name="noUsdSum" id="noUsdSum" type="text" disabled/>
<label class="col-sm-2">含税单价:</label><input placeholder="USD" class="col-sm-1" name="usd" id="usd" type="text" disabled/>
<label class="col-sm-2">含税总价:</label><input placeholder="USD" class="col-sm-1" name="usdSum" id="usdSum" type="text" disabled/>
<label class="col-sm-2">不含税单价:</label><input placeholder="USD" class="col-sm-1" name="noUsd" id="noUsd" type="number" disabled/>
<label class="col-sm-2">不含税总价:</label><input placeholder="USD" class="col-sm-1" name="noUsdSum" id="noUsdSum" type="number" disabled/>
<label class="col-sm-2">含税单价:</label><input placeholder="USD" class="col-sm-1" name="usd" id="usd" type="number" disabled/>
<label class="col-sm-2">含税总价:</label><input placeholder="USD" class="col-sm-1" name="usdSum" id="usdSum" type="number" disabled/>
</div>
</div>
<div class="container">
@ -125,15 +128,15 @@
<th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-table-editable-js" />
<th:block th:include="include :: select2-js" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var materialTypeDatas = [[${@dict.getType('sys_material_type')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var userName = [[${@permission.getPrincipalProperty('userName')}]];
var prefix = ctx + "system/customerQuote";
var $table = $('#bootstrap-sub-table-quoteChild');
var commonCurrency;
var commonCurrency = $("#commonCurrency_add option:selected").val();
$("#form-customerQuote-add").validate({
focusCleanup: true,
});
@ -158,53 +161,54 @@
//获取客户信息
$(function(){
$("#customerCode").select2({
theme: "bootstrap",
allowClear: true,
placeholder: "请选择客户",
ajax:{
type: "post",
url:ctx + "system/customer/list",
dataType:"json",
delay:250,
data:function(params){
var searchVal = params.term;
var obj = {
params:{
enterpriseCode: searchVal
}
};
return obj;
},
cache:true,
processResults: function (res, params) {
var resultList = res.rows;
console.log("传输的数值");
console.log(resultList);
var options = [];
for(var i= 0, len=resultList.length;i<len;i++){
var option = resultList[i];
option.id = resultList[i]["enterpriseCode"];
option.text = resultList[i]["enterpriseCode"];
options.push(option);
}
return {
results: options,
pagination: {
// more:res["data"]["more"]
theme: "bootstrap",
allowClear: true,
placeholder: "请选择客户",
ajax:{
type: "post",
url:ctx + "system/customer/list",
dataType:"json",
delay:250,
data:function(params){
var searchVal = params.term;
var obj = {
params:{
enterpriseCode: searchVal
}
};
return obj;
},
cache:true,
processResults: function (res, params) {
var resultList = res.rows;
console.log("传输的数值");
console.log(resultList);
var options = [];
for(var i= 0, len=resultList.length;i<len;i++){
var option = resultList[i];
option.id = resultList[i]["enterpriseCode"];
option.text = resultList[i]["enterpriseCode"];
options.push(option);
}
};
},
escapeMarkup: function (markup) { return markup; },
// minimumInputLength: 1
}
return {
results: options,
pagination: {
// more:res["data"]["more"]
}
};
},
escapeMarkup: function (markup) { return markup; },
// minimumInputLength: 1
}
});
})
})
$('#customerCode').on('select2:select', function (e) {
var data = e.params.data;
$("input[name='customerName']").val(data.enterpriseName);
$("select[name='commonCurrency']").val(data.commonCurrency).trigger('change');
$("input[name='customerFax']").val(data.customerFax);
$("input[name='rmbTax']").val(data.taxRate);
$("input[name='confirmFax']").val(data.confirmTax);
commonCurrency = $("#commonCurrency_add option:selected").val();
});
$(function() {
@ -214,7 +218,6 @@
pagination: false,
sidePagination: "client",
model: "物料报价信息",
onEditableSave:onEditableSave,
columns: [
{checkbox: true},
{field: 'index',align: 'center', title: "序号",
@ -263,32 +266,12 @@
{ title: '物料的不含税单价(RMB)',
field: 'materialNoRmb',
align: 'center',
editable: commonCurrency == 1?false:true,
// onEditableSave: function (field, row, index, oldValue, $elemt) {
//
// $table.bootstrapTable('updateRow', {
// index: $elemt.data('index'),
// row: row
// });
// }
editable: commonCurrency == '1'?false:true,
},
{title: '物料的不含税单价(USD)',
field: 'materialNoUsd',
align: 'center',
editable: commonCurrency == 2?false:true,
// onEditableSave: function(value, row, index,$elemt) {
// row.materialUsd = row.materialNoUsd;
// row.materialUsdSum = row.materialNum * row.materialUsd;
// row.materialNoUsdSum = row.materialNoUsd * row.materialNum;
// row.materialNoRmb = $("#usdTax").val() * row.materialNoUsd;
// row.materialRmb =$("#usdTax").val() * row.materialNoUsd * (1 + $("#rmbTax").val());
// row.materialNoRmbSum = row.materialNoRmb * row.materialNum;
// row.materialRmbSum = row.materialRmb * row.materialNum;
// $table.bootstrapTable('updateRow', {
// index: $elemt.data('index'),
// row: row
// });
// },
editable: commonCurrency == '2'?false:true,
},
{ title: '物料的含税单价(USD)',
field: 'materialUsd',
@ -358,7 +341,39 @@
return actions.join('');
}
}
]
],
onEditableSave:function(field, row, oldValue, $el){
if(field =="materialNum" && row.materialNum != '' && currentCurrency == '1'){
$("#bootstrap-sub-table-quoteChild").bootstrapTable('updateByUniqueId', {
id: row.id,
row: {
materialNoRmb : row.materialNoRmb,
materialRmb : row.materialNoRmb * (1 + $("#rmbTax").val()),
materialNoUsd : row.materialNoRmb / $("#rmbTax").val(),
materialNoUsdSum : row.materialNoRmb / $("#rmbTax").val(),
materialUsd : row.materialNum * (row.materialNoRmb / $("#rmbTax").val()),
materialUsdSum : row.materialNum * (row.materialNoRmb / $("#rmbTax").val()),
materialNoRmbSum : row.materialNum * row.materialNoRmb,
materialRmbSum : row.materialNum * row.materialRmb
}
});
}
else if(field =="materialNum" && row.materialNum != '' && currentCurrency == '2'){
$("#bootstrap-sub-table-quoteChild").bootstrapTable('updateByUniqueId', {
id: row.id,
row: {
materialUsd : row.materialNoUsd,
materialUsdSum : row.materialNum * row.materialUsd,
materialNoUsdSum : row.materialNoUsd * row.materialNum,
materialNoRmb : $("#usdTax").val() * row.materialNoUsd,
materialRmb : $("#usdTax").val() * row.materialNoUsd * (1 + $("#rmbTax").val()),
materialNoRmbSum : row.materialNoRmb * row.materialNum,
materialRmbSum : row.materialRmb * row.materialNum
}
});
}
getTotalAmount()
},
};
$.table.init(options);
});
@ -432,12 +447,11 @@
updateBy: "",
updateTime: "",
remark: "",
deginFlag: "",
}
})
layer.close(index);
var enterpriseSum = parseInt($("#enterpriseSum").val());
$("#enterpriseSum").val((enterpriseSum==''?0:enterpriseSum) + 1);
var enterpriseSum = $("#enterpriseSum").val();
$("#enterpriseSum").val((enterpriseSum==null?0:enterpriseSum) + 1);
}
function insertRow() {
var url = ctx + "erp/material/select";
@ -457,40 +471,34 @@
var enterpriseSum = parseInt($("#enterpriseSum").val());
$("#enterpriseSum").val((enterpriseSum==null?0:enterpriseSum) - 1);
}
//添加无物料号物料
function insertNRow(){
var url = ctx + "erp/material/select";
var options = {
title: '选择料号',
url: url,
callBack: doNSubmit
};
$.modal.openOptions(options);
}
$("input[name='pricingDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
//计算
function getTotalAmount(){
// $("#addFinishbomTable").bootstrapTable('refresh');
let getData = $table.bootstrapTable('getData', true);
let getData = $("#bootstrap-sub-table-quoteChild").bootstrapTable('getData', true);
var enterprise = "";
var enterpriseSum = 0;
var noRmb = "";
var rmb = "";
var noRmb = 0;
var rmb = 0;
var noRmbSum =0;
var rmbSum = 0;
var noUsd = "";
var usd = "";
var noUsd = 0;
var usd = 0;
var noUsdSum = 0;
var usdSum = 0;
for(var i=0;i<getData.length;i++){
enterprise += getData[i].materialName + ":" + getData[i].materialNum +",";
enterpriseSum += getData[i].materialNum;
noRmb += getData[i].materialNoRmb + "+";
rmb += getData[i].materialRmb + "+";
noRmb += getData[i].materialNoRmb ;
rmb += getData[i].materialRmb ;
noRmbSum += getData[i].materialNoRmbSum;
rmbSum += getData[i].materialRmbSum;
noUsd += getData[i].materialNoUsd + "+";
usd += getData[i].materialUsd + "+";
noUsd += getData[i].materialNoUsd ;
usd += getData[i].materialUsd ;
noUsdSum += getData[i].materialNoUsdSum;
usdSum += getData[i].materialUsdSum;
}
@ -506,40 +514,7 @@
$("#usdSum").val(usdSum);
}
// 结算金额
function onEditableSave(field, row, oldValue, $el){
if(field =="materialNum" && row.materialNum != "" && commonCurrency =="1"){
$table.bootstrapTable('updateByUniqueId', {
id: row.id,
row: {
materialNoRmb : row.materialNoRmb,
materialRmb : row.materialNoRmb * (1 + $("#rmbTax").val()),
materialNoUsd : row.materialNoRmb / $("#rmbTax").val(),
materialNoUsdSum : row.materialNoRmb / $("#rmbTax").val(),
materialUsd : row.materialNum * (row.materialNoRmb / $("#rmbTax").val()),
materialUsdSum : row.materialNum * (row.materialNoRmb / $("#rmbTax").val()),
materialNoRmbSum : row.materialNum * row.materialNoRmb,
materialRmbSum : row.materialNum * row.materialRmb,
}
});
}
else if(field =="materialNum" && row.materialNum != "" && commonCurrency == "2"){
$table.bootstrapTable('updateByUniqueId', {
id: row.id,
row: {
materialUsd : row.materialNoUsd,
materialUsdSum : row.materialNum * row.materialUsd,
materialNoUsdSum : row.materialNoUsd * row.materialNum,
materialNoRmb : $("#usdTax").val() * row.materialNoUsd,
materialRmb : $("#usdTax").val() * row.materialNoUsd * (1 + $("#rmbTax").val()),
materialNoRmbSum : row.materialNoRmb * row.materialNum,
materialRmbSum : row.materialRmb * row.materialNum,
}
});
}
getTotalAmount()
}
</script>
</body>
</html>

69
ruoyi-admin/src/main/resources/templates/system/customerQuote/customerQuote.html

@ -24,18 +24,11 @@
</li>
<li>
<label>审核标志:</label>
<select name="deginFlag" th:with="type=${@dict.getType('auditStatus')}">
<select name="auditStatus" th:with="type=${@dict.getType('auditStatus')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>料号:</label>
<input type="text" name="materialCode"/>
</li>
<li>
<label>物料名称:</label>
<input type="text" name="materialCode"/>
</li>
<li>
<label>定价时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
@ -54,15 +47,6 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:customerQuote:add">
<i class="fa fa-plus"></i> 添加
</a>
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:customerQuote:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:customerQuote:audit">
<i class="fa fa-edit"></i> 审核
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:customerQuote:remove">
<i class="fa fa-remove"></i> 删除
</a> -->
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:customerQuote:export">
<i class="fa fa-download"></i> 导出
</a>
@ -73,13 +57,15 @@
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:customerQuote:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:customerQuote:remove')}]];
var cancelFlag = [[${@permission.hasPermi('system:customerQuote:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('system:customerQuote:restore')}]];
var auditStatusData = [[${@dict.getType('auditStatus')}]];
var useStatusData = [[${@dict.getType('useStatus')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var useStatusDatas = [[${@dict.getType('useStatus')}]];
var currencyDatas = [[${@dict.getType('sys_common_currency')}]];
var prefix = ctx + "system/customerQuote";
$(function() {
var options = {
@ -95,20 +81,27 @@
fixedRightNumber:1,
columns: [
{checkbox: true},
{title: '审核状态',field: 'deginFlag',
formatter:function (value){$.table.selectDictLabel(auditStatusData,value);}
{ title: '审核状态',field: 'auditStatus',
formatter: function (value, row, index) {
console.log(index + " " + JSON.stringify(row));
return $.table.selectDictLabel(auditStatusDatas, value);
}
},
{title: '审核状态',field: 'delFlag',
formatter:function (value){$.table.selectDictLabel(useStatusData,value);}
{title: '客户状态',field: 'useStatus',
formatter: function (value, row, index)
{return $.table.selectDictLabel(useStatusDatas, value);},
},
{title: '业务员',field: 'businessMembers'},
{title:'业务员',field:'businessMembers'},
{title: '客户报价表编号',field:'id',visible: false},
{title: '客户报价编号',field: 'supplierCode'},
{title: '客户编号',field: 'customerCode'},
{title: '客户名称',field: 'customerName'},
{title: '物料合计',field: 'enterprise'},
{title: '数量合计',field: 'enterpriseSum'},
{ title: '报价币种',field: 'commonCurrency'},
{title: '报价币种',field: 'commonCurrency',
formatter: function (value, row, index) {
return $.table.selectDictLabel(currencyDatas, value);
}},
{title: '国内汇率',field: 'rmbTax'},
{title: '美元汇率',field: 'usdTax'},
{title: '不含税总价(RMB)',field: 'noRmbSum'},
@ -116,27 +109,9 @@
{title: '不含税总价(美元)',field: 'noUsdSum'},
{title: '含税总价(美元)',field: 'usdSum'},
{title: '录入人',field: 'createBy'},
{
title: '定价时间',
field: 'createTime',
formatter: function(value, row, index) {
if (value == null) {
return " ";
} else {
return value;
}
}
},
{title: '定价时间',field: 'createTime'},
{title: '更新人',field: 'updateBy'},
{ title: '上次修改时间',field: 'updateTime',
formatter: function(value, row, index) {
if (value == null) {
return " ";
} else {
return value;
}
}
},
{ title: '上次修改时间',field: 'updateTime'},
{title: '备注',field: 'remark'},
{
title: '操作',
@ -145,7 +120,7 @@
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><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.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
if(row.delFlag == '0'){
if(row.useStatus == '2'){
actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a> ');
}else{
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i>恢复</a> ');

390
ruoyi-admin/src/main/resources/templates/system/customerQuote/edit.html

@ -9,17 +9,17 @@
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-customerQuote-edit" th:object="${sysCustomerQuote}">
<div class="form-group" hidden="hidden">
<div class="form-group" hidden="hidden">
<label class="col-sm-4 control-label">客户报价ID:</label>
<div class="col-sm-8">
<input name="id" th:field="*{id}" class="form-control" type="number" readonly>
</div>
</div>
<label class="col-sm-4 control-label">客户报价编号:</label>
<div class="col-sm-8">
<input name="supplierCode" th:field="*{supplierCode}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-4 control-label">客户报价ID:</label>
<div class="col-sm-8">
<input name="id" th:field="*{id}" class="form-control" type="text" readonly>
</div>
</div>
<div class="col-xs-12" shiro:hasPermission="system:customerQuote:edit">
<label class="col-sm-4 control-label">业务员:</label>
<div class="col-sm-8">
@ -31,9 +31,7 @@
<div class="form-group">
<label class="col-sm-4 control-label">客户编号:</label>
<div class="col-sm-8">
<select readonly class="form-control" th:field="*{customerCode}" onclick="selMaterialTb()" id="customerCode" name="customerCode" required>
</select>
<input readonly class="form-control" th:field="*{customerCode}" name="customerCode" required >
</div>
</div>
<div class="form-group">
@ -45,9 +43,9 @@
<div class="form-group">
<label class="col-sm-4 control-label">报价币种:</label>
<div class="col-sm-8">
<select class="form-control" name="commonCurrency" th:with="dictList=${@dict.getType('sys_common_currency')}" required>
<select class="form-control" name="commonCurrency" th:with="dictList=${@dict.getType('sys_common_currency')}" th:field="*{commonCurrency}" required>
<option value="">请选择</option>
<option th:each="dict : ${dictList}" th:value="${dict.dictValue}" th:text="${dict.dictLabel}" th:field="*{commonCurrency}"></option>
<option th:each="dict : ${dictList}" th:value="${dict.dictValue}" th:text="${dict.dictLabel}" ></option>
</select>
</div>
</div>
@ -61,8 +59,9 @@
<label class="col-sm-6 control-label is-required">是否含税:</label>
<div class="col-sm-6">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}">
<input required 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>
<input required type="radio" th:id="${'confirmFax_' + dict.dictCode}"
name="confirmFax" th:value="${dict.dictValue}" th:field="*{confirmFax}" th:checked="${dict.isDefault == 'Y' ? true : false}">
<label th:for="${'confirmFax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
@ -75,7 +74,10 @@
<div class="form-group">
<label class="col-sm-4 control-label">订价日期:</label>
<div class="col-sm-8">
<input readonly name="createTime" th:field="*{createTime}" class="form-control" type="datetime-local">
<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>
@ -88,21 +90,21 @@
<div class="container">
<h4 class="form-header h4">计算</h4>
<div class="col-xs-12 form-row">
<label class=" col-sm-2">物料合计:</label><input class="col-sm-2" name="enterprise" id="enterprise" th:field="*{enterprise}" type="text" disabled/>
<label class=" col-sm-2">数量合计:</label><input class="col-sm-2" name="enterpriseSum" id="enterpriseSum" th:field="*{enterpriseSum}" "text" disabled/>
<label class=" col-sm-2">物料合计:</label><input class="col-sm-4" name="enterprise" id="enterprise" th:field="*{enterprise}" type="text" disabled/>
<label class=" col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" id="enterpriseSum" th:field="*{enterpriseSum}" type="number" disabled/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2"> 不含税单价(RMB):</label><input placeholder="RMB" class="col-sm-1" name="noRmb" id="noRmb" th:field="*{noRmb}" type="text" disabled />
<label class="col-sm-2"> 不含税总价:</label><input placeholder="RMB" class="col-sm-1" name="noRmbSum" id="noRmbSum" th:field="*{noRmbSum}" type="text" disabled/>
<label class="col-sm-2"> 不含税单价(RMB):</label><input placeholder="RMB" class="col-sm-1" name="noRmb" id="noRmb" th:field="*{noRmb}" type="number" disabled />
<label class="col-sm-2"> 不含税总价:</label><input placeholder="RMB" class="col-sm-1" name="noRmbSum" id="noRmbSum" th:field="*{noRmbSum}" type="number" disabled/>
<label class="col-sm-2"> 含税单价:</label><input placeholder="RMB" class="col-sm-1" name="rmb" id="rmb" type="text" th:field="*{rmb}" disabled/>
<label class="col-sm-2"> 含税总价:</label><input placeholder="RMB" class="col-sm-1" name="rmbSum" id="rmbSum" th:field="*{rmbSum}" type="text" disabled/>
<label class="col-sm-2"> 含税总价:</label><input placeholder="RMB" class="col-sm-1" name="rmbSum" id="rmbSum" th:field="*{rmbSum}" type="number" disabled/>
</div>
<div class="col-xs-12">
<label class="col-sm-2">不含税单价:</label><input placeholder="USD" class="col-sm-1" name="noUsd" id="noUsd" th:field="*{noUsd}" type="text" disabled/>
<label class="col-sm-2">不含税总价:</label><input placeholder="USD" class="col-sm-1" name="noUsdSum" id="noUsdSum" th:field="*{noUsdSum}" type="text" disabled/>
<label class="col-sm-2">含税单价:</label><input placeholder="USD" class="col-sm-1" name="usd" id="usd" type="text" th:field="*{usd}" disabled/>
<label class="col-sm-2">含税总价:</label><input placeholder="USD" class="col-sm-1" name="usdSum" id="usdSum" th:field="*{usdSum}" type="text" disabled/>
<label class="col-sm-2">不含税单价(美元)</label><input placeholder="USD" class="col-sm-1" name="noUsd" id="noUsd" th:field="*{noUsd}" type="number" disabled/>
<label class="col-sm-2">不含税总价:</label><input placeholder="USD" class="col-sm-1" name="noUsdSum" id="noUsdSum" th:field="*{noUsdSum}" type="number" disabled/>
<label class="col-sm-2">含税单价:</label><input placeholder="USD" class="col-sm-1" name="usd" id="usd" th:field="*{usd}" type="number" disabled/>
<label class="col-sm-2">含税总价:</label><input placeholder="USD" class="col-sm-1" name="usdSum" id="usdSum" th:field="*{usdSum}" type="number" disabled/>
</div>
</div>
<div class="container">
@ -129,20 +131,20 @@
<th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-table-editable-js" />
<th:block th:include="include :: select2-js" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var materialTypeDatas = [[${@dict.getType('sys_material_type')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var userName = [[${@permission.getPrincipalProperty('userName')}]];
var customerQuote = [[${sysCustomerQuote}]];
var sysCustomerQuote = [[${sysCustomerQuote}]];
var prefix = ctx + "system/customerQuote"
var $table = $('#bootstrap-table-Quote-child');
$("#form-customerQuote-edit").validate({
focusCleanup: true,
});
var customerCode1 = [[${sysCustomerQuote.customerCode}]];
$(function(){
$(function() {
/*业务员列表*/
$.ajax({
url: ctx + 'system/user/list',
@ -162,80 +164,81 @@
}
}
});
/*客户列表*/
$.ajax({
url: ctx + 'system/customer/list',
type: 'post',
success: function (res) {
console.log(res)
if (res.rows.length > 0) {
var resultList = res.rows;
for (let i in resultList) {
// console.log(finishProductData[i].finishProductCode)
$("#form-customerQuote-edit select[name='customerCode']").append("<option value='"
+ resultList[i].enterpriseCode + "'>"
+ resultList[i].enterpriseCode + "</option>");
}
row = resultList.filter(item => item.enterpriseCode == customerCode1)[0];
$("#form-customerQuote-edit select[name='customerCode']").val(customerCode1).trigger("change");
$("input[name='customerName']").val(row.enterpriseName);
$("select[name='commonCurrency']").val(row.commonCurrency).trigger('change');
$("input[name='customerFax']").val(row.customerFax);
$("input[name='rmbTax']").val(row.taxRate);
} else {
$.modal.msgError(res.msg);
}
$("input[name='customerFax']").val([sysCustomerQuote.customerFax]);
$("input[name='rmbTax']").val([sysCustomerQuote.taxRate]);
$("input[name='customerFax']").change(function () {
if ($("input[name='customerFax']").val() == "1") {
var taxRate = $("input[name='rmbTax']").val();
$("input[name='rmbTax']").val(taxRate / 100);
} else {
$("input[name='rmbTax']").val(0);
}
});
});
$(function() {
var options = {
id: "bootstrap-table-Quote-child",
url: ctx + "system/quoteChild/list",
queryParams: queryParams,
pagination: false,
sidePagination: "client",
clickToSelect: true,
showExport: true,
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
sidePagination: "server",
showPaginationSwitch: false,
model: "物料报价信息",
queryParams: function (params) {
//console.log("123");
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
quoteId: customerQuote.id,
};
return curParams;
},
onEditableSave: onEditableSave,
columns: [
{checkbox: true},
{title: 'id',field: 'id',align: 'center',visible: false},
{title: '物料索引id',field: 'materialId',align: 'center'},
{title: '报价id',field: 'quoteId',align: 'center',visible: false},
{title: '序号',align: 'center',
formatter: function (value, row, index) {
return $.table.serialNumber(index);
}
},
{title: '报价子表id',field: 'id',align: 'center',visible: false},
{title: '物料报价主表id',field: 'quoteId',align: 'center',visible: false},
{title: '物料索引',field: 'materialId',align: 'center',visible: false},
{title: '料号',field: 'materialCode',align: 'center'},
{title: '物料名称',field: 'materialName',align: 'center'},
{title: '图片',field: 'photoUrl'},
{title: '物料类型',field: 'materialType',align: 'center'},
{title: '描述',field: 'describe',align: 'center'},
{title: '物料类型',field: 'materialType',align: 'center',
formatter: function(value, row, index) {
$.table.selectCategoryLabel(materialTypeDatas, value);
}
},
{ title: '描述',field: 'describe',align: 'center'},
{title: '品牌',field: 'brand',align: 'center'},
{title: '单位',field: 'unit',align: 'center'},
{title: '加工方式',field: 'processMethod',align: 'center'},
{title: '对外售价',field: 'materialSole',editable: true},
{
title: '图片', field: 'photoUrl', align: 'center',
formatter: function (value, row, index) {
return $.table.imageView(value);
}
},
{ title: '单位',field: 'unit',align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(sysUnitClassDatas, value);
}
},
{title: '加工方式',field: 'processMethod',align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{title: '国内税率',field: 'countTax',align: 'center',editable: true},
{title: '美元汇率',field: 'usdTax', align: 'center',editable: true},
{title: '对外售价',field: 'materialSole',editable: true},
{title: '物料的数量',field: 'materialNum',align: 'center',editable: true},
{title: '物料的含税单价(RMB)',field: 'materialNoRmb', align: 'center',editable: true},
{title: '物料的不含税单价(美元)',field: 'materialNoUsd',align: 'center',editable: true},
{title: '物料的含税单价(美元)',field: 'materialUsd',align: 'center',editable: true},
{title: '物料的含税总价(美元)',field: 'materialUsdSum',align: 'center' ,editable: true},
{title: '物料的不含税总价(美元)',field: 'materialNoUsdSum',align: 'center',editable: true},
{title: '物料的含税总价(RMB)',field: 'materialNoRmbSum', align: 'center',editable: true},
{title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',editable: true,editable: true},
{title: '物料的不含税单价(美元)',field: 'materialNoUsd',align: 'center',editable: true,editable: true},
{title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center',editable: true},
{title: '物料的含税总价(RMB)',field: 'materialNoRmbSum',align: 'center',editable: true},
{title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center',editable: true},
{title: '录入人',field: 'createBy',align: 'center',visible: false},
{title: '录入时间',field: 'createTime', align: 'center',visible: false},
{title: '更新人',field: 'updateBy', align: 'center',visible: false},
{title: '上次更新时间',field: 'updateTime',align: 'center',visible: false},
{title: '备注',field: 'remark',align: 'center',visible: false},
{title: '物料的含税单价(美元)',field: 'materialUsd',align: 'center',editable: true},
{title: '物料的含税总价(美元)',field: 'materialUsdSum',align: 'center',editable: true},
{title: '物料的不含税总价(美元)', field: 'materialNoUsdSum',align: 'center',editable: true},
{field: 'remark',align: 'center',title: '备注',visible: false},
{title: '操作', align: 'center',
formatter: function (value, row, index) {
var actions = [];
@ -243,16 +246,25 @@
return actions.join('');
}
}
]
};
$table.init(options);
$.table.init(options);
});
function queryParams(params) {
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
quoteId: sysCustomerQuote.supplierCode,
};
curParams.quoteId = sysCustomerQuote.supplierCode;
return curParams;
}
function submitHandler() {
if ($.validate.form()) {
var formData = $("#form-customerQuote-edit").serializeArray();
console.log("formData",formData);
var tableData = $("#bootstrap-sub-table-quoteChild").bootstrapTable('getData');
var tableData = $("#bootstrap-table-Quote-child").bootstrapTable('getData');
console.log("tableData",JSON.stringify(tableData));
var rows = tableData.length;
if(rows==0){
@ -266,87 +278,135 @@
}
}
}
$("select[name='customerCode']").val([customerCode1]).trigger('change');
$('#customerCode').on('select2:select', function (e) {
var data = e.params.data;
$("input[name='customerName']").val(data.enterpriseName);
$("select[name='commonCurrency']").val(data.commonCurrency).trigger('change');
$("input[name='customerFax']").val(data.customerFax);
$("input[name='rmbTax']").val(data.taxRate);
commonCurrency = $("#commonCurrency_add option:selected").val();
});
// function doSubmit(index, layero,uniqueId){
// console.log(uniqueId);
// var iframeWin = window[layero.find('iframe')[0]['name']];
// var rowData = iframeWin.$("#bootstrap-table-Quote-child").bootstrapTable('getSelections')[0];
// console.log("rowData: "+rowData);
// $table.bootstrapTable('insertRow', {
// index:1,
// row: {
// id:rowData.id,
// quoteId:'',
// materialNo: rowData.materialNo,
// materialName: rowData.materialName,
// materialType: rowData.materialType,
// describe: rowData.describe,
// brand: rowData.brand,
// unit: rowData.unit,
// processMethod: rowData.processMethod,
// photoUrl: "",
// countTax: "",
// usdTax: "",
// materialNum: "",
// materialSole: "",
// materialRmb: "",
// materialNoRmb: "",
// materialNoUsd: "",
// materialUsd: "",
// materialUsdSum: "",
// materialNoUsdSum: "",
// materialNoRmbSum: "",
// materialRmbSum: "",
// createBy: "",
// createTime: "",
// updateBy: "",
// updateTime: "",
// remark: "",
// }
// })
// layer.close(index);
// var enterpriseSum = parseInt($("#enterpriseSum").val());
// $("#enterpriseSum").val((enterpriseSum==null?0:enterpriseSum) + 1);
// }
// function insertRow() {
// var url = ctx + "erp/material/select";
// var options = {
// title: '选择料号',
// url: url,
// callBack: doSubmit
// };
// $.modal.openOptions(options);
// }
function doSubmit(index, layero,uniqueId){
console.log(uniqueId);
var iframeWin = window[layero.find('iframe')[0]['name']];
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0];
console.log("rowData: "+rowData);
let enterpriseSum = $("#enterpriseSum").val();
$("#enterpriseSum").val((enterpriseSum==''?0:enterpriseSum) + 1);
var timestamp = new Date().getTime();
var totalNum = $("#bootstrap-table-Quote-child").bootstrapTable('getData').length;
$("#bootstrap-table-Quote-child").bootstrapTable('insertRow', {
index: totalNum,
row: {
id:'',
quoteId:$("#supplierCode").val(),
materialId:rowData.id,
materialCode: rowData.materialNo,
materialName: rowData.materialName,
materialType: rowData.materialType,
describe: rowData.describe,
brand: rowData.brand,
photoUrl: rowData.photoUrl,
unit: rowData.unit,
processMethod: rowData.processMethod,
countTax: '',
usdTax: '',
materialSole: "",
materialNum: "",
materialNoRmb: "",
materialNoUsd: "",
materialRmb: "",
materialNoRmbSum: "",
materialRmbSum: "",
materialUsd: "",
materialUsdSum: "",
materialNoUsdSum: "",
remark: "",
}
})
layer.close(index);
}
function insertRow() {
var url = ctx + "erp/material/select";
var options = {
title: '选择料号',
url: url,
callBack: doSubmit
};
$.modal.openOptions(options);
}
/* 删除指定表格行 */
// function removeRow(id){
// $.table.bootstrapTable('remove', {
// field: 'id',
// values: id
// })
// var enterpriseSum = parseInt($("#enterpriseSum").val());
// $("#enterpriseSum").val((enterpriseSum==null?0:enterpriseSum) - 1);
// }
//添加无物料号物料
// function insertNRow(){
// $table.bootstrapTable('insertRow', {
// index:1,
// row: {
// id:'', quoteId:'', materialNo: '无', materialName: '', materialType: '', describe: '',
// brand: '', unit: '', processMethod: '', photoUrl: "", countTax: "", usdTax: "", materialNum: "",
// materialSole: "", materialRmb: "", materialNoRmb: "", materialNoUsd: "", materialUsd: "",
// materialUsdSum: "", materialNoUsdSum: "", materialNoRmbSum: "", materialRmbSum: "",
// createBy: "", createTime: "", updateBy: "", updateTime: "", remark: ""
// }
// })
// }
function removeRow(rowData){
$.table.bootstrapTable('remove', {
field: 'id',
values: rowData.id
})
let enterpriseSum = $("#enterpriseSum").val();
$("#enterpriseSum").val((enterpriseSum==null?0:enterpriseSum) - rowData.materialNum);
}
$("input[name='pricingDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
//计算
function getTotalAmount(){
// $("#addFinishbomTable").bootstrapTable('refresh');
let getData = $("#bootstrap-table-Quote-child").bootstrapTable('getData', true);
var enterprise = "";
let enterpriseSum = 0;
let noRmb = 0;let rmb = 0;let noRmbSum = 0;
let rmbSum = 0;let noUsd = 0;let usd = 0;
let noUsdSum = 0;let usdSum = 0;
for(var i=0;i<getData.length;i++){
enterprise += getData[i].materialName + ": 数量" + getData[i].materialNum +"; ";
enterpriseSum +=getData[i].materialNum;
noRmb += getData[i].materialNoRmb ;
rmb +=getData[i].materialRmb;
noRmbSum += getData[i].materialNoRmbSum;
rmbSum += getData[i].materialRmbSum;
noUsd += getData[i].materialNoUsd ;
usd += getData[i].materialUsd ;
noUsdSum += getData[i].materialNoUsdSum;
usdSum += getData[i].materialUsdSum;
}
$("#enterprise").val(enterprise);
$("#enterpriseSum").val(enterpriseSum);
$("#noRmb").val(noRmb);
$("#rmb").val(rmb);
$("#noRmbSum").val(noRmbSum);
$("#rmbSum").val(rmbSum);
$("#noUsd").val(noUsd);
$("#usd").val(usd);
$("#noUsdSum").val(noUsdSum);
$("#usdSum").val(usdSum);
}
// 结算金额
function onEditableSave(field, row, oldValue, $el){
const commonCurrency = $("#commonCurrency:checked").val();
if(field =="materialNum" && row.materialNum != "" && commonCurrency =="1"){
$("#bootstrap-table-Quote-child").bootstrapTable('updateByUniqueId', {
id: row.id,
row: {
materialNoRmb : row.materialNoRmb,
materialRmb : row.materialNoRmb * (1 + $("#rmbTax").val()),
materialNoUsd : row.materialNoRmb / $("#rmbTax").val(),
materialNoUsdSum : row.materialNoRmb / $("#rmbTax").val(),
materialUsd : row.materialNum * (row.materialNoRmb / $("#rmbTax").val()),
materialUsdSum : row.materialNum * (row.materialNoRmb / $("#rmbTax").val()),
materialNoRmbSum : row.materialNum * row.materialNoRmb,
materialRmbSum : row.materialNum * row.materialRmb
}
});
}
else if(field =="materialNum" && row.materialNum != "" && commonCurrency =="2"){
$("#bootstrap-table-Quote-child").bootstrapTable('updateByUniqueId', {
id: row.id,
row: {
materialUsd : row.materialNoUsd,
materialUsdSum : row.materialNum * row.materialUsd,
materialNoUsdSum : row.materialNoUsd * row.materialNum,
materialNoRmb : $("#usdTax").val() * row.materialNoUsd,
materialRmb : $("#usdTax").val() * row.materialNoUsd * (1 + $("#rmbTax").val()),
materialNoRmbSum : row.materialNoRmb * row.materialNum,
materialRmbSum : row.materialRmb * row.materialNum
}
});
}
getTotalAmount()
}
</script>
</body>
</html>

1079
ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html

File diff suppressed because it is too large

1133
ruoyi-admin/src/main/resources/templates/system/salesOrder/edit.html

File diff suppressed because it is too large

1153
ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html

File diff suppressed because it is too large
Loading…
Cancel
Save