zhangsiqi
1 year ago
11 changed files with 1314 additions and 42 deletions
@ -0,0 +1,145 @@ |
|||
package com.ruoyi.system.controller; |
|||
|
|||
import com.alibaba.fastjson.JSONArray; |
|||
import com.alibaba.fastjson.JSONObject; |
|||
import com.ruoyi.common.annotation.Log; |
|||
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.remind.service.RemindService; |
|||
import com.ruoyi.system.domain.SysCustomerQuote; |
|||
import com.ruoyi.system.domain.exportDto.SysCustomerDto; |
|||
import com.ruoyi.system.service.ISysCustomerOperService; |
|||
import com.ruoyi.system.service.ISysCustomerQuoteService; |
|||
import com.ruoyi.system.service.ISysDictTypeService; |
|||
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.ui.ModelMap; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.io.IOException; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 客户报价信息Controller |
|||
* |
|||
* @author ruoyi |
|||
* @date 2022-11-02 |
|||
*/ |
|||
@Controller |
|||
@RequestMapping("/system/customerQuote") |
|||
public class SysCustomerQouteController extends BaseController |
|||
{ |
|||
private final String prefix = "system/customerQuote"; |
|||
|
|||
@Autowired |
|||
private ISysCustomerQuoteService sysCustomerQuoteService; |
|||
@Autowired |
|||
private ISysDictTypeService sysDictTypeService; |
|||
@Autowired |
|||
private RemindService remindService; |
|||
@Autowired |
|||
private ISysCustomerOperService sysCustomerOperService; |
|||
|
|||
@RequiresPermissions("system:customerQuote:view") |
|||
@GetMapping() |
|||
public String customerQoute() |
|||
{ |
|||
return prefix + "/customerQuote"; |
|||
} |
|||
|
|||
/** |
|||
* 查询客户报价信息列表 |
|||
*/ |
|||
@RequiresPermissions("system:customerQuote:list") |
|||
@PostMapping("/list") |
|||
@ResponseBody |
|||
public TableDataInfo list(SysCustomerQuote sysCustomerQoute) |
|||
{ |
|||
startPage(); |
|||
List<SysCustomerQuote> list = sysCustomerQuoteService.selectSysCustomerQuoteList(sysCustomerQoute); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 新增客户报价信息 |
|||
*/ |
|||
@GetMapping("/add") |
|||
public String add() |
|||
{ |
|||
return prefix + "/add"; |
|||
} |
|||
|
|||
/** |
|||
* 新增保存客户报价信息 |
|||
*/ |
|||
@RequiresPermissions("system:customerQuote:add") |
|||
@Log(title = "客户报价信息", businessType = BusinessType.INSERT) |
|||
@PostMapping("/add") |
|||
@ResponseBody |
|||
public AjaxResult addSave(SysCustomerQuote sysCustomerQuote) |
|||
{ |
|||
return toAjax(sysCustomerQuoteService.insertSysCustomerQuote(sysCustomerQuote)); |
|||
} |
|||
|
|||
|
|||
|
|||
/** |
|||
* 修改客户报价信息 |
|||
*/ |
|||
@GetMapping("/edit/{id}") |
|||
public String edit(@PathVariable("id") Long id, ModelMap mmap) |
|||
{ |
|||
SysCustomerQuote sysCustomerQuote = sysCustomerQuoteService.selectSysCustomerQuoteById(id); |
|||
mmap.put("sysCustomerQuote", sysCustomerQuote); |
|||
return prefix + "/edit"; |
|||
} |
|||
/** |
|||
* 修改保存客户报价信息 |
|||
*/ |
|||
@RequiresPermissions("system:customer:edit") |
|||
@Log(title = "客户报价信息", businessType = BusinessType.UPDATE) |
|||
@PostMapping("/edit") |
|||
@ResponseBody |
|||
public AjaxResult editSave(SysCustomerQuote sysCustomerQuote) |
|||
{ |
|||
//审核客户表
|
|||
return toAjax(sysCustomerQuoteService.updateSysCustomerQuote(sysCustomerQuote)); |
|||
} |
|||
|
|||
/** |
|||
* 删除客户报价信息 |
|||
*/ |
|||
@RequiresPermissions("system:customerQuote:remove") |
|||
@Log(title = "客户报价信息", businessType = BusinessType.DELETE) |
|||
@PostMapping( "/remove") |
|||
@ResponseBody |
|||
public AjaxResult remove(String[] ids) |
|||
{ |
|||
return toAjax(sysCustomerQuoteService.deleteSysCustomerQuoteByIds(ids)); |
|||
} |
|||
|
|||
//查找客户代码和名称
|
|||
@PostMapping( "/getcode") |
|||
@ResponseBody |
|||
public List code(){ |
|||
List list= sysCustomerQuoteService.selectSysCustomerQuoteBycode(); |
|||
return list; |
|||
} |
|||
|
|||
@RequiresPermissions("system:customerQuote:export") |
|||
@Log(title = "客户报价信息", businessType = BusinessType.EXPORT) |
|||
@RequestMapping("/exportCustomerInfo") |
|||
@ResponseBody |
|||
public void exportCustomerInfo(@RequestBody String selectData, HttpServletResponse response) throws IOException { |
|||
//数据处理
|
|||
JSONObject jsonObject = (JSONObject) JSONObject.parse(selectData); |
|||
JSONArray jsonArray = jsonObject.getJSONArray("selectData"); |
|||
List<SysCustomerDto> selectDataList = JSONObject.parseArray(String.valueOf(jsonArray), SysCustomerDto.class); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,218 @@ |
|||
package com.ruoyi.system.domain; |
|||
|
|||
import com.ruoyi.common.core.domain.BaseEntity; |
|||
|
|||
import java.util.Date; |
|||
|
|||
public class SysCustomerQuote extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
//客户报价表id
|
|||
private Long id; |
|||
//客户报价编号
|
|||
private String supplierCode; |
|||
//客户的编号
|
|||
private String customerCode; |
|||
//客户名称/企业名称
|
|||
private String customerName; |
|||
//物料合计
|
|||
private String enterprise; |
|||
//数量合计
|
|||
private String enterpirseSum; |
|||
//报价币种
|
|||
private String commonCurrency; |
|||
//不含税总价(RMB)
|
|||
private Double noRmbTax; |
|||
//函数总价
|
|||
private Double rmbTax; |
|||
//不含税总价(美元)
|
|||
private String noUsbTax; |
|||
//含税总价(美元)
|
|||
private String usbtax; |
|||
//审核标识 0 未审核 1 审核通过 2 审核拒绝
|
|||
private String deginFlag; |
|||
//删除表示
|
|||
private String delFlag; |
|||
private String createBy; |
|||
private Date createTime; |
|||
private String updateBy; |
|||
private Date updateTime; |
|||
private String remark; |
|||
|
|||
public Long getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(Long id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public String getSupplierCode() { |
|||
return supplierCode; |
|||
} |
|||
|
|||
public void setSupplierCode(String supplierCode) { |
|||
this.supplierCode = supplierCode; |
|||
} |
|||
|
|||
public String getCustomerCode() { |
|||
return customerCode; |
|||
} |
|||
|
|||
public void setCustomerCode(String customerCode) { |
|||
this.customerCode = customerCode; |
|||
} |
|||
|
|||
public String getCustomerName() { |
|||
return customerName; |
|||
} |
|||
|
|||
public void setCustomerName(String customerName) { |
|||
this.customerName = customerName; |
|||
} |
|||
|
|||
public String getEnterprise() { |
|||
return enterprise; |
|||
} |
|||
|
|||
public void setEnterprise(String enterprise) { |
|||
this.enterprise = enterprise; |
|||
} |
|||
|
|||
public String getEnterpirseSum() { |
|||
return enterpirseSum; |
|||
} |
|||
|
|||
public void setEnterpirseSum(String enterpirseSum) { |
|||
this.enterpirseSum = enterpirseSum; |
|||
} |
|||
|
|||
public String getCommonCurrency() { |
|||
return commonCurrency; |
|||
} |
|||
|
|||
public void setCommonCurrency(String commonCurrency) { |
|||
this.commonCurrency = commonCurrency; |
|||
} |
|||
|
|||
public Double getNoRmbTax() { |
|||
return noRmbTax; |
|||
} |
|||
|
|||
public void setNoRmbTax(Double noRmbTax) { |
|||
this.noRmbTax = noRmbTax; |
|||
} |
|||
|
|||
public Double getRmbTax() { |
|||
return rmbTax; |
|||
} |
|||
|
|||
public void setRmbTax(Double rmbTax) { |
|||
this.rmbTax = rmbTax; |
|||
} |
|||
|
|||
public String getNoUsbTax() { |
|||
return noUsbTax; |
|||
} |
|||
|
|||
public void setNoUsbTax(String noUsbTax) { |
|||
this.noUsbTax = noUsbTax; |
|||
} |
|||
|
|||
public String getUsbtax() { |
|||
return usbtax; |
|||
} |
|||
|
|||
public void setUsbtax(String usbtax) { |
|||
this.usbtax = usbtax; |
|||
} |
|||
|
|||
public String getDeginFlag() { |
|||
return deginFlag; |
|||
} |
|||
|
|||
public void setDeginFlag(String deginFlag) { |
|||
this.deginFlag = deginFlag; |
|||
} |
|||
|
|||
public String getDelFlag() { |
|||
return delFlag; |
|||
} |
|||
|
|||
public void setDelFlag(String delFlag) { |
|||
this.delFlag = delFlag; |
|||
} |
|||
|
|||
@Override |
|||
public String getCreateBy() { |
|||
return createBy; |
|||
} |
|||
|
|||
@Override |
|||
public void setCreateBy(String createBy) { |
|||
this.createBy = createBy; |
|||
} |
|||
|
|||
@Override |
|||
public Date getCreateTime() { |
|||
return createTime; |
|||
} |
|||
|
|||
@Override |
|||
public void setCreateTime(Date createTime) { |
|||
this.createTime = createTime; |
|||
} |
|||
|
|||
@Override |
|||
public String getUpdateBy() { |
|||
return updateBy; |
|||
} |
|||
|
|||
@Override |
|||
public void setUpdateBy(String updateBy) { |
|||
this.updateBy = updateBy; |
|||
} |
|||
|
|||
@Override |
|||
public Date getUpdateTime() { |
|||
return updateTime; |
|||
} |
|||
|
|||
@Override |
|||
public void setUpdateTime(Date updateTime) { |
|||
this.updateTime = updateTime; |
|||
} |
|||
|
|||
@Override |
|||
public String getRemark() { |
|||
return remark; |
|||
} |
|||
|
|||
@Override |
|||
public void setRemark(String remark) { |
|||
this.remark = remark; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return "SysCutomerQuote{" + |
|||
"id=" + id + |
|||
", supplierCode='" + supplierCode + '\'' + |
|||
", customerCode='" + customerCode + '\'' + |
|||
", customerName='" + customerName + '\'' + |
|||
", enterprise='" + enterprise + '\'' + |
|||
", enterpirseSum='" + enterpirseSum + '\'' + |
|||
", commonCurrency='" + commonCurrency + '\'' + |
|||
", noRmbTax=" + noRmbTax + |
|||
", rmbTax=" + rmbTax + |
|||
", noUsbTax='" + noUsbTax + '\'' + |
|||
", usbtax='" + usbtax + '\'' + |
|||
", deginFlag='" + deginFlag + '\'' + |
|||
", delFlag='" + delFlag + '\'' + |
|||
", createBy='" + createBy + '\'' + |
|||
", createTime=" + createTime + |
|||
", updateBy='" + updateBy + '\'' + |
|||
", updateTime=" + updateTime + |
|||
", remark='" + remark + '\'' + |
|||
'}'; |
|||
} |
|||
} |
@ -0,0 +1,68 @@ |
|||
package com.ruoyi.system.mapper; |
|||
|
|||
import com.ruoyi.system.domain.SysCustomerQuote; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 客户报价信息Mapper接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2022-11-02 |
|||
*/ |
|||
public interface SysCustomerQuoteMapper |
|||
{ |
|||
/** |
|||
* 查询客户报价信息 |
|||
* |
|||
* @param id 客户报价信息ID |
|||
* @return 客户报价信息 |
|||
*/ |
|||
|
|||
SysCustomerQuote selectSysCustomerQuoteById(Long id); |
|||
|
|||
/** |
|||
* 查询客户报价信息列表 |
|||
* |
|||
* @param sysCustomerQuote 客户报价信息 |
|||
* @return 客户报价信息集合 |
|||
*/ |
|||
List<SysCustomerQuote> selectSysCustomerQuoteList(SysCustomerQuote sysCustomerQuote); |
|||
|
|||
/** |
|||
* 新增客户报价信息 |
|||
* |
|||
* @param sysCustomerQuote 客户报价信息 |
|||
* @return 结果 |
|||
*/ |
|||
int insertSysCustomerQuote(SysCustomerQuote sysCustomerQuote); |
|||
|
|||
/** |
|||
* 修改客户报价信息 |
|||
* |
|||
* @param sysCustomerQuote 客户报价信息 |
|||
* @return 结果 |
|||
*/ |
|||
int updateSysCustomerQuote(SysCustomerQuote sysCustomerQuote); |
|||
|
|||
/** |
|||
* 删除客户报价信息 |
|||
* |
|||
* @param id 客户报价信息ID |
|||
* @return 结果 |
|||
*/ |
|||
int deleteSysCustomerQuoteById(Long id); |
|||
|
|||
/** |
|||
* 批量删除客户报价信息 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
int deleteSysCustomerQuoteByIds(String[] ids); |
|||
|
|||
|
|||
List selectSysCustomerQuoteBycode(); |
|||
|
|||
SysCustomerQuote selectSysCustomerByCustomerCode(String customerCode); |
|||
} |
@ -0,0 +1,68 @@ |
|||
package com.ruoyi.system.service; |
|||
|
|||
import com.ruoyi.system.domain.SysCustomerQuote; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 客户报价信息service接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2022-11-02 |
|||
*/ |
|||
public interface ISysCustomerQuoteService |
|||
{ |
|||
/** |
|||
* 查询客户报价信息 |
|||
* |
|||
* @param id 客户报价信息ID |
|||
* @return 客户报价信息 |
|||
*/ |
|||
|
|||
SysCustomerQuote selectSysCustomerQuoteById(Long id); |
|||
|
|||
/** |
|||
* 查询客户报价信息列表 |
|||
* |
|||
* @param sysCustomerQuote 客户报价信息 |
|||
* @return 客户报价信息集合 |
|||
*/ |
|||
List<SysCustomerQuote> selectSysCustomerQuoteList(SysCustomerQuote sysCustomerQuote); |
|||
|
|||
/** |
|||
* 新增客户报价信息 |
|||
* |
|||
* @param sysCustomerQuote 客户报价信息 |
|||
* @return 结果 |
|||
*/ |
|||
int insertSysCustomerQuote(SysCustomerQuote sysCustomerQuote); |
|||
|
|||
/** |
|||
* 修改客户报价信息 |
|||
* |
|||
* @param sysCustomerQuote 客户报价信息 |
|||
* @return 结果 |
|||
*/ |
|||
int updateSysCustomerQuote(SysCustomerQuote sysCustomerQuote); |
|||
|
|||
/** |
|||
* 删除客户报价信息 |
|||
* |
|||
* @param id 客户报价信息ID |
|||
* @return 结果 |
|||
*/ |
|||
int deleteSysCustomerQuoteById(Long id); |
|||
|
|||
/** |
|||
* 批量删除客户报价信息 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
int deleteSysCustomerQuoteByIds(String[] ids); |
|||
|
|||
|
|||
List selectSysCustomerQuoteBycode(); |
|||
|
|||
SysCustomerQuote selectSysCustomerByCustomerCode(String customerCode); |
|||
} |
@ -0,0 +1,54 @@ |
|||
package com.ruoyi.system.service.impl; |
|||
|
|||
import com.ruoyi.system.domain.SysCustomerQuote; |
|||
import com.ruoyi.system.mapper.SysCustomerQuoteMapper; |
|||
import com.ruoyi.system.service.ISysCustomerQuoteService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Service |
|||
public class SySCustomerQuoteServiceImpl implements ISysCustomerQuoteService { |
|||
@Autowired |
|||
private SysCustomerQuoteMapper sysCustomerQuoteMapper; |
|||
@Override |
|||
public SysCustomerQuote selectSysCustomerQuoteById(Long id) { |
|||
return sysCustomerQuoteMapper.selectSysCustomerQuoteById(id); |
|||
} |
|||
|
|||
@Override |
|||
public List<SysCustomerQuote> selectSysCustomerQuoteList(SysCustomerQuote sysCustomerQuote) { |
|||
return sysCustomerQuoteMapper.selectSysCustomerQuoteList(sysCustomerQuote); |
|||
} |
|||
|
|||
@Override |
|||
public int insertSysCustomerQuote(SysCustomerQuote sysCustomerQuote) { |
|||
return sysCustomerQuoteMapper.insertSysCustomerQuote(sysCustomerQuote); |
|||
} |
|||
|
|||
@Override |
|||
public int updateSysCustomerQuote(SysCustomerQuote sysCustomerQuote) { |
|||
return sysCustomerQuoteMapper.updateSysCustomerQuote(sysCustomerQuote); |
|||
} |
|||
|
|||
@Override |
|||
public int deleteSysCustomerQuoteById(Long id) { |
|||
return sysCustomerQuoteMapper.deleteSysCustomerQuoteById(id); |
|||
} |
|||
|
|||
@Override |
|||
public int deleteSysCustomerQuoteByIds(String[] ids) { |
|||
return sysCustomerQuoteMapper.deleteSysCustomerQuoteByIds(ids); |
|||
} |
|||
|
|||
@Override |
|||
public List selectSysCustomerQuoteBycode() { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public SysCustomerQuote selectSysCustomerByCustomerCode(String customerCode) { |
|||
return sysCustomerQuoteMapper.selectSysCustomerByCustomerCode(customerCode); |
|||
} |
|||
} |
@ -0,0 +1,133 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper |
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ruoyi.system.mapper.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="enterpriseName" /> |
|||
<result property="enterpriseSum" column="emterpriseSum" /> |
|||
<result property="commonCurrency" column="common_currency" /> |
|||
<result property="noRmbTax" column="noRmbTax" /> |
|||
<result property="rmbTax" column="rmbTax" /> |
|||
<result property="noUsbTax" column="noUsbTax" /> |
|||
<result property="usbtax" column="usbtax" /> |
|||
<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" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectSysCustomerQuoteVo"> |
|||
select id,supplierCode,customerCode,enterprise,enterpriseSum,common_currency,noRmbTax,noUsbTax,degin_flaf,del_flag,create_by,create_time,update_by,update_time,remark from sys_customer_quote |
|||
</sql> |
|||
|
|||
<select id="selectSysCustomerQuoteList" parameterType="SysCustomerQuote" resultMap="SysCustomerQuoteResult"> |
|||
<include refid="selectSysCustomerQuoteVo"/> |
|||
<where> |
|||
<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 = #{customerName}</if> |
|||
<if test="enterprise != null and enterprise != ''"> and enterprise like concat('%', #{enterprise}, '%')</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectSysCustomerQuoteById" parameterType="Long" resultMap="SysCustomerQuoteResult"> |
|||
<include refid="selectSysCustomerQuoteVo"/> |
|||
where id = #{id} |
|||
</select> |
|||
|
|||
<select id="selectSysCustomerByQuoteCode" resultMap="SysCustomerQuoteResult"> |
|||
select customerCode,cusotomerName from sys_customer_quote |
|||
</select> |
|||
|
|||
<select id="selectSysCustomerByCustomerQuoteCode" parameterType="String" resultMap="SysCustomerQuoteResult"> |
|||
<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="enterprise != null and enterprise != ''" >enterprise,</if> |
|||
<if test="enterpriseSum != null" >enterpriseSum,</if> |
|||
<if test="commonCurrency =null and commonCurrency != ''" >common_currency,</if> |
|||
<if test="noRmbTax != null" >noRmbTax,</if> |
|||
<if test="rmbTax != null" >rmbTax,</if> |
|||
<if test="noUsbTax != null">noUsbTax,</if> |
|||
<if test="usbTax != null ">usbTax,</if> |
|||
<if test="creatBy != null and createBy != ''" >create_by,</if> |
|||
<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, |
|||
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="enterprise != null and enterprise != ''" >#{enterprise},</if> |
|||
<if test="enterpriseSum != null" >#{enterpriseSum},</if> |
|||
<if test="commonCurrency =null and commonCurrency != ''" >#{common_currency},</if> |
|||
<if test="noRmbTax != null" >#{noRmbTax},</if> |
|||
<if test="rmbTax != null" >#{rmbTax},</if> |
|||
<if test="noUsbTax != null">#{noUsbTax},</if> |
|||
<if test="usbTax != null ">#{usbTax},</if> |
|||
<if test="creatBy != null and createBy != ''" >#{create_by},</if> |
|||
<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> |
|||
0, |
|||
0, |
|||
now(), |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateSysCustomerQuote" parameterType="SysCustomerQuote"> |
|||
update sys_customer_quote |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<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="enterprise != null and enterprise != ''" >enterprise = #{enterprise},</if> |
|||
<if test="enterpriseSum != null" >enterpriseSum = #{enterpriseSum},</if> |
|||
<if test="commonCurrency =null and commonCurrency != ''" >common_currency = #{common_currency},,</if> |
|||
<if test="noRmbTax != null" >noRmbTax = #{noRmbTax},</if> |
|||
<if test="rmbTax != null" >rmbTax = #{rmbTax},</if> |
|||
<if test="noUsbTax != null">noUsbTax = #{noUsbTax},</if> |
|||
<if test="usbTax != null ">usbTax = #{usbTax},</if> |
|||
<if test="deginFlag != null and deginFlag != ''" >degin_flag = #{deginFlag},</if> |
|||
<if test="creatBy != 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), |
|||
</trim> |
|||
where customer_id = #{customerId} |
|||
</update> |
|||
<delete id="deleteSysCustomerQuoteById" parameterType="Long"> |
|||
delete from sys_customer_quote where id = #{id} |
|||
</delete> |
|||
|
|||
<delete id="deleteSysCustomerQuoteByIds" parameterType="String"> |
|||
delete from sys_customer_quote where id in |
|||
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
</mapper> |
@ -0,0 +1,144 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('新增客户报价信息')" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet"> |
|||
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet"> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-customercustomerQuote-add"> |
|||
<div class="form-group" hidden="hidden"> |
|||
<label class="col-sm-3 control-label">客户报价单ID:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="id" class="form-control" type="text" required > |
|||
</div> |
|||
</div> |
|||
<div class="form-group" hidden="hidden"> |
|||
<label class="col-sm-3 control-label">报价编号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="supplierCode" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group" hidden="hidden"> |
|||
<label class="col-sm-3 control-label"> 业务员 </label> |
|||
<div class="col-sm-8"> |
|||
<input name="createBy" class="form-control" type="text" required> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">客户编号</label> |
|||
<div class="col-sm-8"> |
|||
<input name="customerCode" class="form-control" type="text" readonly > |
|||
</div> |
|||
</div> |
|||
<div class="form-group" > |
|||
<label class="col-sm-3 control-label">客户名称:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="customerName" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group" > |
|||
<label class="col-sm-3 control-label"> 报价币种:</label> |
|||
<div class="col-sm-8"> |
|||
<select id="commonCurrency" name="commonCurrency" class="form-control" |
|||
th:with="type=${@dict.getType('sys_coin_class')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" |
|||
th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group" > |
|||
<label class="col-sm-3 control-label"> 美元汇率:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="commonCurrency" class="form-control" type="text" > |
|||
</div> |
|||
</div> |
|||
<div class="form-group" > |
|||
<label class="col-sm-3 control-label"> 物料合计:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="enterprise" class="form-control" type="text" > |
|||
</div> |
|||
</div> |
|||
<div class="form-group" > |
|||
<label class="col-sm-3 control-label"> 数量合计:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="enterpriseSum" class="form-control" type="text" > |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group" > |
|||
<label class="col-sm-3 control-label"> 不含税总价(RMB):</label> |
|||
<div class="col-sm-8"> |
|||
<input name="noRmbTax" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label"> 含税总价(RMB):</label> |
|||
<div class="col-sm-8"> |
|||
<input name="rmbTax" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group" > |
|||
<label class="col-sm-3 control-label"> 不含税总价(美元):</label> |
|||
<div class="col-sm-8"> |
|||
<input name="noUsbTax" class="form-control" type="text" required readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group" hidden="hidden"> |
|||
<label class="col-sm-3 control-label"> 审核标志:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="deginFlag" th:with="type=${@dict.getType('sys_export_sales')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" |
|||
th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label"> 删除标志</label> |
|||
<div class="col-sm-8"> |
|||
<input name="del_flag" class="form-control" type="text" required > |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label"> 备注</label> |
|||
<div class="col-sm-8"> |
|||
<input name="remark" class="form-control" type="textarea" required> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: select2-js"/> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "system/customerQuote" |
|||
$("#form-customerQuote-add").validate({ |
|||
focusCleanup: true, |
|||
//配置验证规则,key就是被验证的dom对象,value就是调用验证的方法(也是json格式) |
|||
rules: { |
|||
//这里的customerPurser 指的是上面标签的name属性 |
|||
}, |
|||
// 验证失败的提示信息 |
|||
messages: { |
|||
customerPurser: { |
|||
required: "必填" //自定义required的错误信息内容 |
|||
} |
|||
} |
|||
}); |
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/add",$('#form-customer-add').serialize()); |
|||
} |
|||
} |
|||
$("input[name='createTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,382 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
|||
<head> |
|||
<th:block th:include="include :: header('客户报价信息列表')"/> |
|||
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet"> |
|||
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet"> |
|||
<script type="text/javascript" th:src="@{/js/axios.min.js}"></script> |
|||
</head> |
|||
|
|||
<style> |
|||
.form-horizontal .form-group { |
|||
width: 50%; |
|||
} |
|||
|
|||
.base-customer { |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
justify-content: space-between; |
|||
} |
|||
|
|||
.base-customer .form-group { |
|||
width: 30%; |
|||
} |
|||
|
|||
.details-title { |
|||
width: 100%; |
|||
position: fixed; |
|||
font-size: 20px; |
|||
padding: 10px 0; |
|||
text-align: center; |
|||
background-color: #a7b1c2; |
|||
color: #FFFFFF; |
|||
z-index: 9999; |
|||
|
|||
} |
|||
|
|||
.details-body { |
|||
padding-top: 80px; |
|||
overflow-y: auto; |
|||
max-height: 750px; |
|||
|
|||
} |
|||
|
|||
.hiddenDetailInfo { |
|||
display: none; |
|||
} |
|||
|
|||
.search-collapse, .select-table { |
|||
box-shadow: none; |
|||
} |
|||
|
|||
</style> |
|||
<body class="gray-bg"> |
|||
<div class="container-div"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 search-collapse"> |
|||
<form id="formId"> |
|||
<div class="select-list"> |
|||
<ul> |
|||
<li> |
|||
<label>客户/企业代码:</label> |
|||
<input type="text" name="customerCode"/> |
|||
</li> |
|||
<li> |
|||
<label>审核状态:</label> |
|||
<select name="deginFlag" th:with="type=${@dict.getType('sys_export_sales')}"> |
|||
<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="cusotmerName"/> |
|||
</li> |
|||
<li> |
|||
<a class="btn btn-primary |
|||
btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
|||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i |
|||
class="fa fa-refresh"></i> 重置</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
|
|||
<div class="btn-group-sm" id="toolbar" role="group"> |
|||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:customerQuote:add"> |
|||
<i class="fa fa-plus"></i> 添加 |
|||
</a> |
|||
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()"--> |
|||
<!-- shiro:hasPermission="system:customer:edit">--> |
|||
<!-- <i class="fa fa-edit"></i> 修改--> |
|||
<!-- </a>--> |
|||
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()"--> |
|||
<!-- shiro:hasPermission="system:customer:remove">--> |
|||
<!-- <i class="fa fa-remove"></i> 删除--> |
|||
<!-- </a>--> |
|||
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:customer:export">--> |
|||
<!-- <i class="fa fa-download"></i> 导出--> |
|||
<!-- </a>--> |
|||
<a class="btn btn-warning single disabled" onclick="exportCustomerInfo()" shiro:hasPermission="system:customerQuote:export" > |
|||
<i class="fa fa-download"></i> 导出 |
|||
</a> |
|||
<!-- <a class="btn btn-danger" onclick="oneexport()" shiro:hasPermission="system:customer:export">--> |
|||
<!-- <i class="fa fa-download"></i> 单个导出--> |
|||
<!-- </a>--> |
|||
|
|||
</div> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table" style="white-space:nowrap"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<div class="alert alert-success hide">审核成功</div> |
|||
|
|||
<th:block th:include="include :: footer"/> |
|||
<th:block th:include="include :: select2-js"/> |
|||
|
|||
<script th:inline="javascript"> |
|||
var editFlag = [[${@permission.hasPermi('system:customerQoute:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('system:customerQoute:remove')}]]; |
|||
var exportSalesDatas = [[${@dict.getType('sys_export_sales')}]]; |
|||
var customerCountryDatas = [[${@dict.getType('sys_country')}]]; |
|||
var commonCurrencyDatas = [[${@dict.getType('sys_common_currency')}]]; |
|||
var integrityRatingDatas = [[${@dict.getType('sys_integrity_rating')}]]; |
|||
var shippingTemplateDatas = [[${@dict.getType('sys_shipping_template')}]]; |
|||
var confirmTaxDatas = [[${@dict.getType('sys_confirm_tax')}]]; |
|||
var prefix = ctx + "system/customerQuote"; |
|||
|
|||
$(function () { |
|||
var options = { |
|||
url: prefix + "/list", |
|||
createUrl: prefix + "/add", |
|||
updateUrl: prefix + "/edit/{id}", |
|||
removeUrl: prefix + "/remove", |
|||
exportUrl: prefix + "/export", |
|||
clickToSelect: true, |
|||
modalName: "客户报价", |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
field: 'deginflag', |
|||
title: '审核状态', |
|||
formatter: function (value, row, index) { |
|||
if (value == 0){ |
|||
return "待审核"; |
|||
} |
|||
if(value==1){ |
|||
return "审核通过"; |
|||
} |
|||
if (value == 2){ |
|||
return "审核拒绝"; |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
field: 'delflag', |
|||
title: '客户状态', |
|||
formatter: function (value, row, index) { |
|||
if (value == 0){ |
|||
return "否"; |
|||
} |
|||
if(value==1){ |
|||
return "是"; |
|||
} |
|||
if (value == 2){ |
|||
return "作废"; |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
field: 'id', |
|||
title: '报价id', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'customerCode', |
|||
title: '客户/企业代码' |
|||
}, |
|||
{ |
|||
field: 'customerName', |
|||
title: '客户/企业名称' |
|||
}, |
|||
{ |
|||
field: 'enterprise', |
|||
title: '物料合计' |
|||
}, |
|||
{ |
|||
field: 'entpriseSum', |
|||
title: '物料数量合计' |
|||
}, |
|||
{ |
|||
field: 'noRmbTax', |
|||
title: '不含税总价(RMB)', |
|||
}, |
|||
{ |
|||
field: 'rmbTax', |
|||
title: '含税总价(RMB)' |
|||
}, |
|||
{ |
|||
field: 'noUsbTax', |
|||
title: '不含税总价(美元)' |
|||
}, |
|||
{ |
|||
filed: 'usbTax', |
|||
title: '含税总价(美元)' |
|||
}, |
|||
{ |
|||
field: 'deginflag', |
|||
title: '审核状态', |
|||
formatter:function(row,value,index){ |
|||
if (value == 0){ |
|||
return "未审核"; |
|||
} |
|||
if (value == 1){ |
|||
return '审核成功'; |
|||
} |
|||
if(value == 2){ |
|||
return '审核拒绝'; |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'commonCurrency', |
|||
title: '报价币种', |
|||
formatter: function (value, row, index) { |
|||
return $.table.selectDictLabel(commonCurrencyDatas, value); |
|||
}, |
|||
}, |
|||
{ |
|||
field: 'remarks', |
|||
title: '备注内容', |
|||
visible: false |
|||
}, |
|||
{ |
|||
filed: 'creteBy', |
|||
title: '创建人' |
|||
}, |
|||
{ |
|||
field: 'createTime', |
|||
title: '录入时间', |
|||
formatter: function (value, row, index) { |
|||
if (value == null) { |
|||
return " "; |
|||
} else { |
|||
return value; |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'updateBy', |
|||
title: '修改人' |
|||
}, |
|||
{ |
|||
field: 'updateTime', |
|||
title: '上次修改时间', |
|||
formatter: function (value, row, index) { |
|||
if (value == null) { |
|||
return " "; |
|||
} else { |
|||
var vArr = value.split(',') |
|||
return vArr[0]; |
|||
} |
|||
} |
|||
} |
|||
] |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
// 联系人 |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form('form-contacts-add')) { |
|||
$.operate.save(prefix1 + "/add", $('#form-contacts-add').serialize()); |
|||
$('#infoModal').modal("hide") |
|||
} |
|||
} |
|||
|
|||
function showdetails() { |
|||
var data = $("#bootstrap-table").bootstrapTable("getSelections"); |
|||
// var enterpriseCode=data[0].enterpriseCode; |
|||
// console.log(data.length,enterpriseCode) |
|||
if (data.length == 1) { |
|||
$("#enterpriseCode").val(data[0].enterpriseCode) |
|||
$("input[name='exportSales']").val(data[0].exportSales) |
|||
$("#enterpriseName").val(data[0].enterpriseName) |
|||
} |
|||
|
|||
} |
|||
|
|||
function close() { |
|||
$("#detailsModal").modal("hide"); |
|||
$(this).removeData("modal"); |
|||
} |
|||
|
|||
function showAudit() { |
|||
let data = $("#bootstrap-table").bootstrapTable("getSelections"); |
|||
let userName = [[${@permission.getPrincipalProperty('userName')}]]; |
|||
if (data.length === 1) { |
|||
$("#customerIdId").val(data[0].customerId) |
|||
$("#deginflag").val(1).trigger("change") |
|||
$("#identifyingPeople").val(userName) |
|||
$("#AuditModel").modal("show"); |
|||
} else { |
|||
$.modal.alert("请选择一条数据"); |
|||
} |
|||
|
|||
} |
|||
function AuditConfirmSubmit(number) { |
|||
var auditNo = $("deginflag").val() |
|||
$.ajax({ |
|||
url: prefix + "/edit", |
|||
type: "post", |
|||
resultType: "json", |
|||
data: $('#form-audit-edit').serialize(), |
|||
success: function (resp) { |
|||
console.log(resp) |
|||
$("#bootstrap-table").bootstrapTable('refresh'); |
|||
// $(".alert-success").addClass("show"); |
|||
// window.setTimeout(function () { |
|||
// $(".alert-success").removeClass("show"); |
|||
// }, 1000);//显示的时间 |
|||
if (resp.msg == 0) { |
|||
$.modal.msgSuccess("审核成功!") |
|||
} else { |
|||
$.modal.msgError("审核失败") |
|||
} |
|||
}, |
|||
error: function () { |
|||
$.modal.msgError("出错了!"); |
|||
} |
|||
}); |
|||
} |
|||
//导出 |
|||
function exportCustomerInfo() { |
|||
// rows为选中行的id |
|||
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId); |
|||
//选择的行数据 |
|||
var selectData = $("#bootstrap-table").bootstrapTable("getSelections") |
|||
// console.log(JSON.stringify(selectData)) |
|||
// console.log(selectData) |
|||
|
|||
if (rows.length !== 1) { |
|||
$.modal.alert("请选择一条记录"); |
|||
return; |
|||
} else { |
|||
$.modal.confirm("是否确认要导出本条信息?", function (){ |
|||
axios({ |
|||
url: prefix + '/exportCustomerInfo', |
|||
data:{ |
|||
selectData:JSON.stringify(selectData) |
|||
}, |
|||
method: 'POST', |
|||
responseType: 'blob' |
|||
}).then(response => { |
|||
// console.log(response) |
|||
// console.log(response.data) |
|||
const URL = window.URL.createObjectURL(response.data) |
|||
// 创建隐藏<a>标签进行下载 |
|||
const tempLink = document.createElement('a') |
|||
tempLink.style.display = 'none' |
|||
tempLink.href = URL |
|||
let time = new Date().toLocaleString() |
|||
tempLink.setAttribute('download', time + "客户基本信息.xlsx") |
|||
if (typeof tempLink.download === 'undefined') { |
|||
tempLink.setAttribute('target', '_blank') |
|||
} |
|||
document.body.appendChild(tempLink) |
|||
tempLink.click() |
|||
document.body.removeChild(tempLink)// 移除dom元素 |
|||
window.URL.revokeObjectURL(URL)//释放内存 |
|||
}) |
|||
}); |
|||
} |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue