'123'
This commit is contained in:
parent
2523df4f0d
commit
ed96804c9e
|
@ -1,29 +1,23 @@
|
|||
package com.ruoyi.web.controller.quot;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.constant.WebsocketConst;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.common.utils.file.MinioUtil;
|
||||
import com.ruoyi.common.utils.http.HttpUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.utils.sign.Base64;
|
||||
import com.ruoyi.common.utils.uuid.UUID;
|
||||
import com.ruoyi.priceVerification.domain.QuotHj;
|
||||
|
@ -31,29 +25,34 @@ import com.ruoyi.priceVerification.service.IQuotHjService;
|
|||
import com.ruoyi.quot.domain.*;
|
||||
import com.ruoyi.quot.domain.jsw.*;
|
||||
import com.ruoyi.quot.service.IQuotFileService;
|
||||
import com.ruoyi.quot.service.IQuotService;
|
||||
import com.ruoyi.system.service.ISysConfigService;
|
||||
import com.ruoyi.system.service.ISysDeptService;
|
||||
import com.ruoyi.system.service.ISysNoticeService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import com.ruoyi.technicalConfirm.domain.QuotJsqr;
|
||||
import com.ruoyi.technicalConfirm.service.IQuotJsqrService;
|
||||
import com.ruoyi.web.utils.IdUtils;
|
||||
import com.ruoyi.web.utils.SapHana.SapHanaUtils;
|
||||
import com.ruoyi.web.utils.SendNotice.NoticeUtil;
|
||||
import com.ruoyi.web.utils.rbExcel.excelUtil;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.quot.service.IQuotService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 报价Controller
|
||||
*
|
||||
|
@ -749,6 +748,22 @@ public class QuotController extends BaseController
|
|||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验该客户税号是否在经营部注册公司名单里
|
||||
* @param quot
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/checkCustom")
|
||||
public Boolean checkCustom(@RequestBody Quot quot){
|
||||
Boolean isExist = false;
|
||||
String quotCustomerBm = quot.getQuotCustomerBm();
|
||||
String tax = SapHanaUtils.selectTaxByBm(quotCustomerBm);
|
||||
if(StringUtils.isNotEmpty(tax)){
|
||||
isExist = quotService.selectRegisteredCompanyByTax(tax);
|
||||
}
|
||||
return isExist;
|
||||
}
|
||||
|
||||
/**
|
||||
* 报价单提交OA
|
||||
*/
|
||||
|
@ -1056,4 +1071,15 @@ public class QuotController extends BaseController
|
|||
}
|
||||
return zbInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计有效报价单模块-平均处理时间
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('quot:quot:listStatisticsQuotQuot')")
|
||||
@GetMapping("/handleTime")
|
||||
public String handleTime(Quot quot)
|
||||
{
|
||||
String time = quotService.selectHandleTime(quot);
|
||||
return time;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,111 @@
|
|||
package com.ruoyi.web.controller.registeredCompany;
|
||||
|
||||
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.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.utils.uuid.UUID;
|
||||
import com.ruoyi.registeredCompany.domain.RegisteredCompany;
|
||||
import com.ruoyi.registeredCompany.service.IRegisteredCompanyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 经营部注册公司Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-07-31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/registeredCompany/registeredCompany")
|
||||
public class RegisteredCompanyController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRegisteredCompanyService registeredCompanyService;
|
||||
|
||||
/**
|
||||
* 查询经营部注册公司列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('registeredCompany:registeredCompany:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RegisteredCompany registeredCompany)
|
||||
{
|
||||
startPage();
|
||||
List<RegisteredCompany> list = registeredCompanyService.selectRegisteredCompanyList(registeredCompany);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出经营部注册公司列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('registeredCompany:registeredCompany:export')")
|
||||
@Log(title = "经营部注册公司", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RegisteredCompany registeredCompany)
|
||||
{
|
||||
List<RegisteredCompany> list = registeredCompanyService.selectRegisteredCompanyList(registeredCompany);
|
||||
ExcelUtil<RegisteredCompany> util = new ExcelUtil<RegisteredCompany>(RegisteredCompany.class);
|
||||
util.exportExcel(response, list, "经营部注册公司数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取经营部注册公司详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('registeredCompany:registeredCompany:query')")
|
||||
@GetMapping(value = "/{regId}")
|
||||
public AjaxResult getInfo(@PathVariable("regId") String regId)
|
||||
{
|
||||
return success(registeredCompanyService.selectRegisteredCompanyByRegId(regId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增经营部注册公司
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('registeredCompany:registeredCompany:add')")
|
||||
@Log(title = "经营部注册公司新增", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RegisteredCompany registeredCompany)
|
||||
{
|
||||
if (!registeredCompanyService.checkTaxUnique(registeredCompany))
|
||||
{
|
||||
return error("创建注册公司失败,税号已存在");
|
||||
}
|
||||
registeredCompany.setRegId(UUID.fastUUID().toString());
|
||||
registeredCompany.setCreateBy(getUsername());
|
||||
registeredCompany.setUpdateBy(getUsername());
|
||||
return toAjax(registeredCompanyService.insertRegisteredCompany(registeredCompany));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改经营部注册公司
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('registeredCompany:registeredCompany:edit')")
|
||||
@Log(title = "经营部注册公司修改", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RegisteredCompany registeredCompany)
|
||||
{
|
||||
if (!registeredCompanyService.checkTaxUnique(registeredCompany))
|
||||
{
|
||||
return error("修改注册公司失败,税号已存在");
|
||||
}
|
||||
registeredCompany.setUpdateBy(getUsername());
|
||||
return toAjax(registeredCompanyService.updateRegisteredCompany(registeredCompany));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除经营部注册公司
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('registeredCompany:registeredCompany:remove')")
|
||||
@Log(title = "经营部注册公司", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{regIds}")
|
||||
public AjaxResult remove(@PathVariable String[] regIds)
|
||||
{
|
||||
return toAjax(registeredCompanyService.deleteRegisteredCompanyByRegIds(regIds));
|
||||
}
|
||||
}
|
|
@ -13,7 +13,7 @@ import java.util.List;
|
|||
public class SapRfcUtils {
|
||||
|
||||
/**
|
||||
* 获取SAP 国家数据
|
||||
* 获取SAP 客户数据
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package com.ruoyi.web.utils.SapHana;
|
||||
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
|
||||
|
@ -40,4 +42,36 @@ public class SapHanaUtils {
|
|||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据客户编码查询SAP客户税号
|
||||
* @param quotCustomerBm
|
||||
* @return
|
||||
*/
|
||||
public static String selectTaxByBm(String quotCustomerBm) {
|
||||
String tax = "";
|
||||
Connection conn = null;
|
||||
ResultSet rs = null;
|
||||
try {
|
||||
conn = HanaDB.getConn();
|
||||
StringBuffer sf = new StringBuffer();
|
||||
|
||||
if(StringUtils.isNotEmpty(quotCustomerBm)){
|
||||
sf.append(" select top 1 BAHNS from SAPHANADB.KNA1 ");
|
||||
sf.append(" where 1=1 and KUNNR = '"+quotCustomerBm+"' ");
|
||||
rs = HanaDB.executeQuery(conn, String.valueOf(sf));
|
||||
if (rs.next()) {
|
||||
do {
|
||||
tax = rs.getString(1);
|
||||
} while (rs.next());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
HanaDB.close(rs);
|
||||
HanaDB.close(conn);
|
||||
}
|
||||
return tax;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package com.ruoyi.quot.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.quot.domain.Quot;
|
||||
import com.ruoyi.quot.domain.QuotMaterial;
|
||||
import com.ruoyi.quot.domain.QuotZb;
|
||||
import com.ruoyi.quot.domain.SysOaQuot;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 报价Mapper接口
|
||||
*
|
||||
|
@ -155,6 +156,19 @@ public interface QuotMapper
|
|||
*/
|
||||
void setHandle(String quotId);
|
||||
|
||||
/**
|
||||
* 报价组-保存反馈说明
|
||||
* @param quot
|
||||
*/
|
||||
void saveQuotFeedbackExplanation(Quot quot);
|
||||
|
||||
/**
|
||||
* 根据客户税号查询经营部注册公司名单里是否存在
|
||||
* @param tax
|
||||
* @return
|
||||
*/
|
||||
String selectRegisteredCompanyByTax(String tax);
|
||||
|
||||
/**
|
||||
* 统计有效报价单模块-获取报价单数据
|
||||
* @param quot
|
||||
|
@ -170,8 +184,9 @@ public interface QuotMapper
|
|||
List<QuotZb> selectZbInfo(Quot quot);
|
||||
|
||||
/**
|
||||
* 报价组-保存反馈说明
|
||||
* 统计有效报价单模块-平均处理时间
|
||||
* @param quot
|
||||
* @return
|
||||
*/
|
||||
void saveQuotFeedbackExplanation(Quot quot);
|
||||
String selectHandleTime(Quot quot);
|
||||
}
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
package com.ruoyi.quot.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.customer.domain.Customer;
|
||||
import com.ruoyi.quot.domain.Quot;
|
||||
import com.ruoyi.quot.domain.QuotZb;
|
||||
import com.ruoyi.quot.domain.SysOaQuot;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 报价Service接口
|
||||
*
|
||||
|
@ -138,6 +137,19 @@ public interface IQuotService
|
|||
*/
|
||||
void setHandle(String quotId);
|
||||
|
||||
/**
|
||||
* 报价组-保存反馈说明
|
||||
* @param quot
|
||||
*/
|
||||
void saveQuotFeedbackExplanation(Quot quot);
|
||||
|
||||
/**
|
||||
* 根据客户税号查询经营部注册公司名单里是否存在
|
||||
* @param tax
|
||||
* @return
|
||||
*/
|
||||
Boolean selectRegisteredCompanyByTax(String tax);
|
||||
|
||||
/**
|
||||
* 统计有效报价单模块-获取报价单数据
|
||||
* @param quot
|
||||
|
@ -153,8 +165,9 @@ public interface IQuotService
|
|||
List<QuotZb> selectZbInfo(Quot quot);
|
||||
|
||||
/**
|
||||
* 报价组-保存反馈说明
|
||||
* 统计有效报价单模块-平均处理时间
|
||||
* @param quot
|
||||
* @return
|
||||
*/
|
||||
void saveQuotFeedbackExplanation(Quot quot);
|
||||
String selectHandleTime(Quot quot);
|
||||
}
|
||||
|
|
|
@ -1,24 +1,23 @@
|
|||
package com.ruoyi.quot.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.annotation.DataSource;
|
||||
import com.ruoyi.common.enums.DataSourceType;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.uuid.UUID;
|
||||
import com.ruoyi.customer.domain.Customer;
|
||||
import com.ruoyi.quot.domain.Quot;
|
||||
import com.ruoyi.quot.domain.QuotMaterial;
|
||||
import com.ruoyi.quot.domain.QuotZb;
|
||||
import com.ruoyi.quot.domain.SysOaQuot;
|
||||
import com.ruoyi.quot.mapper.QuotMapper;
|
||||
import com.ruoyi.quot.service.IQuotService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.ArrayList;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.ruoyi.quot.domain.QuotMaterial;
|
||||
import com.ruoyi.quot.mapper.QuotMapper;
|
||||
import com.ruoyi.quot.domain.Quot;
|
||||
import com.ruoyi.quot.service.IQuotService;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 报价Service业务层处理
|
||||
|
@ -309,6 +308,16 @@ public class QuotServiceImpl implements IQuotService
|
|||
return quotMapper.selectZbInfo(quot);
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计有效报价单模块-平均处理时间
|
||||
* @param quot
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String selectHandleTime(Quot quot) {
|
||||
return quotMapper.selectHandleTime(quot);
|
||||
}
|
||||
|
||||
/**
|
||||
* 报价组-保存反馈说明
|
||||
* @param quot
|
||||
|
@ -317,4 +326,15 @@ public class QuotServiceImpl implements IQuotService
|
|||
public void saveQuotFeedbackExplanation(Quot quot) {
|
||||
quotMapper.saveQuotFeedbackExplanation(quot);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据客户税号查询经营部注册公司名单里是否存在
|
||||
* @param tax
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Boolean selectRegisteredCompanyByTax(String tax) {
|
||||
String count = quotMapper.selectRegisteredCompanyByTax(tax);
|
||||
return !"0".equals(count);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,111 @@
|
|||
package com.ruoyi.registeredCompany.domain;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 经营部注册公司对象 registered_company
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-07-31
|
||||
*/
|
||||
public class RegisteredCompany extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private String regId;
|
||||
|
||||
/** 业务员账号 */
|
||||
@Excel(name = "业务员账号")
|
||||
private String regSalesmanCode;
|
||||
|
||||
/** 业务员 */
|
||||
@Excel(name = "业务员")
|
||||
private String regSalesmanName;
|
||||
|
||||
/** 注册公司 */
|
||||
@Excel(name = "注册公司")
|
||||
private String regCompany;
|
||||
|
||||
/** 税号 */
|
||||
@Excel(name = "税号")
|
||||
private String regTax;
|
||||
|
||||
/** 状态(0-启用,1-停用) */
|
||||
@Excel(name = "状态",dictType = "common_state")
|
||||
private String regState;
|
||||
|
||||
public void setRegId(String regId)
|
||||
{
|
||||
this.regId = regId;
|
||||
}
|
||||
|
||||
public String getRegId()
|
||||
{
|
||||
return regId;
|
||||
}
|
||||
public void setRegSalesmanCode(String regSalesmanCode)
|
||||
{
|
||||
this.regSalesmanCode = regSalesmanCode;
|
||||
}
|
||||
|
||||
public String getRegSalesmanCode()
|
||||
{
|
||||
return regSalesmanCode;
|
||||
}
|
||||
public void setRegSalesmanName(String regSalesmanName)
|
||||
{
|
||||
this.regSalesmanName = regSalesmanName;
|
||||
}
|
||||
|
||||
public String getRegSalesmanName()
|
||||
{
|
||||
return regSalesmanName;
|
||||
}
|
||||
public void setRegCompany(String regCompany)
|
||||
{
|
||||
this.regCompany = regCompany;
|
||||
}
|
||||
|
||||
public String getRegCompany()
|
||||
{
|
||||
return regCompany;
|
||||
}
|
||||
public void setRegTax(String regTax)
|
||||
{
|
||||
this.regTax = regTax;
|
||||
}
|
||||
|
||||
public String getRegTax()
|
||||
{
|
||||
return regTax;
|
||||
}
|
||||
public void setRegState(String regState)
|
||||
{
|
||||
this.regState = regState;
|
||||
}
|
||||
|
||||
public String getRegState()
|
||||
{
|
||||
return regState;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("regId", getRegId())
|
||||
.append("regSalesmanCode", getRegSalesmanCode())
|
||||
.append("regSalesmanName", getRegSalesmanName())
|
||||
.append("regCompany", getRegCompany())
|
||||
.append("regTax", getRegTax())
|
||||
.append("regState", getRegState())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
package com.ruoyi.registeredCompany.mapper;
|
||||
|
||||
import com.ruoyi.registeredCompany.domain.RegisteredCompany;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 经营部注册公司Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-07-31
|
||||
*/
|
||||
public interface RegisteredCompanyMapper
|
||||
{
|
||||
/**
|
||||
* 查询经营部注册公司
|
||||
*
|
||||
* @param regId 经营部注册公司主键
|
||||
* @return 经营部注册公司
|
||||
*/
|
||||
public RegisteredCompany selectRegisteredCompanyByRegId(String regId);
|
||||
|
||||
/**
|
||||
* 查询经营部注册公司列表
|
||||
*
|
||||
* @param registeredCompany 经营部注册公司
|
||||
* @return 经营部注册公司集合
|
||||
*/
|
||||
public List<RegisteredCompany> selectRegisteredCompanyList(RegisteredCompany registeredCompany);
|
||||
|
||||
/**
|
||||
* 新增经营部注册公司
|
||||
*
|
||||
* @param registeredCompany 经营部注册公司
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRegisteredCompany(RegisteredCompany registeredCompany);
|
||||
|
||||
/**
|
||||
* 修改经营部注册公司
|
||||
*
|
||||
* @param registeredCompany 经营部注册公司
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRegisteredCompany(RegisteredCompany registeredCompany);
|
||||
|
||||
/**
|
||||
* 删除经营部注册公司
|
||||
*
|
||||
* @param regId 经营部注册公司主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRegisteredCompanyByRegId(String regId);
|
||||
|
||||
/**
|
||||
* 批量删除经营部注册公司
|
||||
*
|
||||
* @param regIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRegisteredCompanyByRegIds(String[] regIds);
|
||||
|
||||
/**
|
||||
* 校验税号是否存在
|
||||
* @param regTax
|
||||
* @return
|
||||
*/
|
||||
RegisteredCompany checkTaxUnique(String regTax);
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
package com.ruoyi.registeredCompany.service;
|
||||
|
||||
import com.ruoyi.registeredCompany.domain.RegisteredCompany;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 经营部注册公司Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-07-31
|
||||
*/
|
||||
public interface IRegisteredCompanyService
|
||||
{
|
||||
/**
|
||||
* 查询经营部注册公司
|
||||
*
|
||||
* @param regId 经营部注册公司主键
|
||||
* @return 经营部注册公司
|
||||
*/
|
||||
public RegisteredCompany selectRegisteredCompanyByRegId(String regId);
|
||||
|
||||
/**
|
||||
* 查询经营部注册公司列表
|
||||
*
|
||||
* @param registeredCompany 经营部注册公司
|
||||
* @return 经营部注册公司集合
|
||||
*/
|
||||
public List<RegisteredCompany> selectRegisteredCompanyList(RegisteredCompany registeredCompany);
|
||||
|
||||
/**
|
||||
* 新增经营部注册公司
|
||||
*
|
||||
* @param registeredCompany 经营部注册公司
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRegisteredCompany(RegisteredCompany registeredCompany);
|
||||
|
||||
/**
|
||||
* 修改经营部注册公司
|
||||
*
|
||||
* @param registeredCompany 经营部注册公司
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRegisteredCompany(RegisteredCompany registeredCompany);
|
||||
|
||||
/**
|
||||
* 批量删除经营部注册公司
|
||||
*
|
||||
* @param regIds 需要删除的经营部注册公司主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRegisteredCompanyByRegIds(String[] regIds);
|
||||
|
||||
/**
|
||||
* 删除经营部注册公司信息
|
||||
*
|
||||
* @param regId 经营部注册公司主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRegisteredCompanyByRegId(String regId);
|
||||
|
||||
/**
|
||||
* 校验税号是否存在
|
||||
* @param registeredCompany
|
||||
* @return
|
||||
*/
|
||||
boolean checkTaxUnique(RegisteredCompany registeredCompany);
|
||||
}
|
|
@ -0,0 +1,116 @@
|
|||
package com.ruoyi.registeredCompany.service.impl;
|
||||
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.registeredCompany.domain.RegisteredCompany;
|
||||
import com.ruoyi.registeredCompany.mapper.RegisteredCompanyMapper;
|
||||
import com.ruoyi.registeredCompany.service.IRegisteredCompanyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 经营部注册公司Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-07-31
|
||||
*/
|
||||
@Service
|
||||
public class RegisteredCompanyServiceImpl implements IRegisteredCompanyService
|
||||
{
|
||||
@Autowired
|
||||
private RegisteredCompanyMapper registeredCompanyMapper;
|
||||
|
||||
/**
|
||||
* 查询经营部注册公司
|
||||
*
|
||||
* @param regId 经营部注册公司主键
|
||||
* @return 经营部注册公司
|
||||
*/
|
||||
@Override
|
||||
public RegisteredCompany selectRegisteredCompanyByRegId(String regId)
|
||||
{
|
||||
return registeredCompanyMapper.selectRegisteredCompanyByRegId(regId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询经营部注册公司列表
|
||||
*
|
||||
* @param registeredCompany 经营部注册公司
|
||||
* @return 经营部注册公司
|
||||
*/
|
||||
@Override
|
||||
public List<RegisteredCompany> selectRegisteredCompanyList(RegisteredCompany registeredCompany)
|
||||
{
|
||||
return registeredCompanyMapper.selectRegisteredCompanyList(registeredCompany);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增经营部注册公司
|
||||
*
|
||||
* @param registeredCompany 经营部注册公司
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRegisteredCompany(RegisteredCompany registeredCompany)
|
||||
{
|
||||
registeredCompany.setCreateTime(DateUtils.getNowDate());
|
||||
registeredCompany.setUpdateTime(DateUtils.getNowDate());
|
||||
return registeredCompanyMapper.insertRegisteredCompany(registeredCompany);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改经营部注册公司
|
||||
*
|
||||
* @param registeredCompany 经营部注册公司
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRegisteredCompany(RegisteredCompany registeredCompany)
|
||||
{
|
||||
registeredCompany.setUpdateTime(DateUtils.getNowDate());
|
||||
return registeredCompanyMapper.updateRegisteredCompany(registeredCompany);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除经营部注册公司
|
||||
*
|
||||
* @param regIds 需要删除的经营部注册公司主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRegisteredCompanyByRegIds(String[] regIds)
|
||||
{
|
||||
return registeredCompanyMapper.deleteRegisteredCompanyByRegIds(regIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除经营部注册公司信息
|
||||
*
|
||||
* @param regId 经营部注册公司主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRegisteredCompanyByRegId(String regId)
|
||||
{
|
||||
return registeredCompanyMapper.deleteRegisteredCompanyByRegId(regId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验税号是否存在
|
||||
* @param registeredCompany
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean checkTaxUnique(RegisteredCompany registeredCompany) {
|
||||
String regId = StringUtils.isNull(registeredCompany.getRegId()) ? "-1" : registeredCompany.getRegId();
|
||||
RegisteredCompany info = registeredCompanyMapper.checkTaxUnique(registeredCompany.getRegTax());
|
||||
if (StringUtils.isNotNull(info) && !info.getRegId().equals(regId))
|
||||
{
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
}
|
||||
return UserConstants.UNIQUE;
|
||||
}
|
||||
}
|
|
@ -221,6 +221,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and quot_approval_status in ('1','2')
|
||||
</select>
|
||||
|
||||
<select id="selectRegisteredCompanyByTax" parameterType="String" resultType="String">
|
||||
select count(1) from registered_company where reg_tax = #{tax} and reg_state = '0'
|
||||
</select>
|
||||
|
||||
<insert id="insertQuot" parameterType="Quot">
|
||||
insert into quot
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
@ -580,4 +584,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
group by quot_distinguish) a
|
||||
</select>
|
||||
|
||||
<select id="selectHandleTime" resultType="String">
|
||||
select ROUND(sum(secDiff)/ 3600.00 /count(1), 2) diff from (
|
||||
select case when a.dayDiff = 0 then a.secDiff
|
||||
when a.dayDiff = 1 then a.secDiff-14*3600
|
||||
when a.dayDiff > 1 then a.secDiff-(a.dayDiff-1)*24*3600
|
||||
else 0 end secDiff
|
||||
from (
|
||||
select quot_inquiry_date, quot_quotation_date,
|
||||
datediff(day,quot_inquiry_date,quot_quotation_date) dayDiff,
|
||||
datediff(second,quot_inquiry_date,quot_quotation_date) secDiff
|
||||
from quot a
|
||||
<where>
|
||||
and quot_approval_status = '2' and quot_jsxz_approval_status='0'
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and datediff(d, quot_quotation_date, #{params.beginTime}) <![CDATA[<=]]> 0
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and datediff(d, quot_quotation_date, #{params.endTime}) <![CDATA[>=]]> 0
|
||||
</if>
|
||||
</where>
|
||||
)a
|
||||
)a
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -0,0 +1,97 @@
|
|||
<?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.registeredCompany.mapper.RegisteredCompanyMapper">
|
||||
|
||||
<resultMap type="RegisteredCompany" id="RegisteredCompanyResult">
|
||||
<result property="regId" column="reg_id" />
|
||||
<result property="regSalesmanCode" column="reg_salesman_code" />
|
||||
<result property="regSalesmanName" column="reg_salesman_name" />
|
||||
<result property="regCompany" column="reg_company" />
|
||||
<result property="regTax" column="reg_tax" />
|
||||
<result property="regState" column="reg_state" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRegisteredCompanyVo">
|
||||
select reg_id, reg_salesman_code, reg_salesman_name, reg_company, reg_tax, reg_state, create_by, create_time, update_by, update_time from registered_company
|
||||
</sql>
|
||||
|
||||
<select id="selectRegisteredCompanyList" parameterType="RegisteredCompany" resultMap="RegisteredCompanyResult">
|
||||
<include refid="selectRegisteredCompanyVo"/>
|
||||
<where>
|
||||
<if test="regSalesmanCode != null and regSalesmanCode != ''"> and reg_salesman_code = #{regSalesmanCode}</if>
|
||||
<if test="regSalesmanName != null and regSalesmanName != ''"> and reg_salesman_name like concat('%', #{regSalesmanName}, '%')</if>
|
||||
<if test="regCompany != null and regCompany != ''"> and reg_company like concat('%', #{regCompany}, '%')</if>
|
||||
<if test="regState != null and regState != ''"> and reg_state = #{regState}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectRegisteredCompanyByRegId" parameterType="String" resultMap="RegisteredCompanyResult">
|
||||
<include refid="selectRegisteredCompanyVo"/>
|
||||
where reg_id = #{regId}
|
||||
</select>
|
||||
|
||||
<insert id="insertRegisteredCompany" parameterType="RegisteredCompany">
|
||||
insert into registered_company
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="regId != null">reg_id,</if>
|
||||
<if test="regSalesmanCode != null">reg_salesman_code,</if>
|
||||
<if test="regSalesmanName != null">reg_salesman_name,</if>
|
||||
<if test="regCompany != null and regCompany != ''">reg_company,</if>
|
||||
<if test="regTax != null and regTax != ''">reg_tax,</if>
|
||||
<if test="regState != null">reg_state,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="regId != null">#{regId},</if>
|
||||
<if test="regSalesmanCode != null">#{regSalesmanCode},</if>
|
||||
<if test="regSalesmanName != null">#{regSalesmanName},</if>
|
||||
<if test="regCompany != null and regCompany != ''">#{regCompany},</if>
|
||||
<if test="regTax != null and regTax != ''">#{regTax},</if>
|
||||
<if test="regState != null">#{regState},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateRegisteredCompany" parameterType="RegisteredCompany">
|
||||
update registered_company
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="regSalesmanCode != null">reg_salesman_code = #{regSalesmanCode},</if>
|
||||
<if test="regSalesmanName != null">reg_salesman_name = #{regSalesmanName},</if>
|
||||
<if test="regCompany != null and regCompany != ''">reg_company = #{regCompany},</if>
|
||||
<if test="regTax != null and regTax != ''">reg_tax = #{regTax},</if>
|
||||
<if test="regState != null">reg_state = #{regState},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where reg_id = #{regId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteRegisteredCompanyByRegId" parameterType="String">
|
||||
delete from registered_company where reg_id = #{regId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRegisteredCompanyByRegIds" parameterType="String">
|
||||
delete from registered_company where reg_id in
|
||||
<foreach item="regId" collection="array" open="(" separator="," close=")">
|
||||
#{regId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="checkTaxUnique" parameterType="String" resultMap="RegisteredCompanyResult">
|
||||
select top(1) reg_id from registered_company where reg_tax = #{regTax} and reg_state = '0'
|
||||
</select>
|
||||
</mapper>
|
|
@ -136,6 +136,15 @@ export function commitJswQuot(data) {
|
|||
})
|
||||
}
|
||||
|
||||
//校验该客户税号是否在经营部注册公司名单里
|
||||
export function checkCustom(data) {
|
||||
return request({
|
||||
url: '/quot/quot/checkCustom',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
//提交OA
|
||||
export function commitOAQuot(data) {
|
||||
return request({
|
||||
|
@ -226,4 +235,14 @@ export function zbInfo(query) {
|
|||
})
|
||||
}
|
||||
|
||||
//平均处理时间
|
||||
export function handleTime(query) {
|
||||
return request({
|
||||
url: '/quot/quot/handleTime',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询经营部注册公司列表
|
||||
export function listRegisteredCompany(query) {
|
||||
return request({
|
||||
url: '/registeredCompany/registeredCompany/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询经营部注册公司详细
|
||||
export function getRegisteredCompany(regId) {
|
||||
return request({
|
||||
url: '/registeredCompany/registeredCompany/' + regId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增经营部注册公司
|
||||
export function addRegisteredCompany(data) {
|
||||
return request({
|
||||
url: '/registeredCompany/registeredCompany',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改经营部注册公司
|
||||
export function updateRegisteredCompany(data) {
|
||||
return request({
|
||||
url: '/registeredCompany/registeredCompany',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除经营部注册公司
|
||||
export function delRegisteredCompany(regId) {
|
||||
return request({
|
||||
url: '/registeredCompany/registeredCompany/' + regId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -1076,7 +1076,7 @@
|
|||
import { NumberAdd } from '@/utils/number';// 数值计算
|
||||
import { toDecimal,versionList } from "@/api/redBook/redBook";
|
||||
|
||||
import { changQuotPrintStatus,listQuot, getQuot, getReturnUpdateQuot,getAllPass,getAllReject, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete, commitQuot, commitJsQuot, commitHjQuot, commitJswQuot, commitOAQuot, feedbackQuot, madeQuot, rejectQuot, setHandle,saveQuotFeedbackExplanation } from "@/api/quot/quot";
|
||||
import { changQuotPrintStatus,listQuot, getQuot, getReturnUpdateQuot,getAllPass,getAllReject, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete, commitQuot, commitJsQuot, commitHjQuot, commitJswQuot, checkCustom, commitOAQuot, feedbackQuot, madeQuot, rejectQuot, setHandle,saveQuotFeedbackExplanation } from "@/api/quot/quot";
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { checkPermi,checkRole } from '@/utils/permission';// 权限判断函数
|
||||
import { getDicts } from "@/api/system/dict/data";
|
||||
|
@ -1599,8 +1599,22 @@ export default {
|
|||
});
|
||||
},
|
||||
|
||||
/** 报价组提交金OA按钮 */
|
||||
/** 报价组提交OA按钮 */
|
||||
commitOAForm() {
|
||||
//校验该客户税号是否在经营部注册公司名单里
|
||||
checkCustom(this.form).then(isExist => {
|
||||
if(isExist){
|
||||
this.$modal.confirm('该询价客户为经营部注册公司,是否继续操作?').then(function() {
|
||||
}).then(() => {
|
||||
this.commitOAQuot();
|
||||
}).catch(() => {});
|
||||
}else{
|
||||
this.commitOAQuot();
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 提交OA */
|
||||
commitOAQuot(){
|
||||
this.form.quotMaterialList = this.quotMaterialList;
|
||||
commitOAQuot(this.form).then(response => {
|
||||
this.$modal.msgSuccess("提交OA成功");
|
||||
|
|
|
@ -0,0 +1,334 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form-item label="业务员账号" prop="regSalesmanCode">
|
||||
<el-input
|
||||
v-model="queryParams.regSalesmanCode"
|
||||
placeholder="请输入业务员账号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务员" prop="regSalesmanName">
|
||||
<el-input
|
||||
v-model="queryParams.regSalesmanName"
|
||||
placeholder="请输入业务员"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="注册公司" prop="regCompany">
|
||||
<el-input
|
||||
v-model="queryParams.regCompany"
|
||||
placeholder="请输入注册公司"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="regState">
|
||||
<el-select v-model="queryParams.regState" placeholder="请选择状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.common_state"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['registeredCompany:registeredCompany:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['registeredCompany:registeredCompany:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['registeredCompany:registeredCompany:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['registeredCompany:registeredCompany:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
<div v-tableHeight="{customHeight: 76}">
|
||||
<el-table height="100%" v-loading="loading" :data="registeredCompanyList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label=" id" align="center" prop="regId" v-if="false"/>
|
||||
<el-table-column label="业务员账号" align="center" prop="regSalesmanCode" />
|
||||
<el-table-column label="业务员" align="center" prop="regSalesmanName" />
|
||||
<el-table-column label="注册公司" align="center" prop="regCompany" width="350" />
|
||||
<el-table-column label="税号" align="center" prop="regTax" width="200"/>
|
||||
<el-table-column label="状态" align="center" prop="regState" width="100">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.common_state" :value="scope.row.regState"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['registeredCompany:registeredCompany:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['registeredCompany:registeredCompany:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改经营部注册公司对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-row :gutter="8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="业务员账号" prop="regSalesmanCode">
|
||||
<el-input v-model="form.regSalesmanCode" placeholder="请输入业务员账号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="业务员" prop="regSalesmanName">
|
||||
<el-input v-model="form.regSalesmanName" placeholder="请输入业务员" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="注册公司" prop="regCompany">
|
||||
<el-input v-model="form.regCompany" placeholder="请输入注册公司" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="税号" prop="regTax">
|
||||
<el-input v-model="form.regTax" placeholder="请输入税号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="8">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="状态" prop="regState">
|
||||
<el-select v-model="form.regState" placeholder="请选择状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.common_state"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listRegisteredCompany, getRegisteredCompany, delRegisteredCompany, addRegisteredCompany, updateRegisteredCompany } from "@/api/registeredCompany/registeredCompany";
|
||||
|
||||
export default {
|
||||
name: "RegisteredCompany",
|
||||
dicts: ['common_state'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 经营部注册公司表格数据
|
||||
registeredCompanyList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
regSalesmanCode: null,
|
||||
regSalesmanName: null,
|
||||
regCompany: null,
|
||||
regState: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
regCompany: [
|
||||
{ required: true, message: "注册公司不能为空", trigger: "blur" }
|
||||
],
|
||||
regTax: [
|
||||
{ required: true, message: "税号不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询经营部注册公司列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listRegisteredCompany(this.queryParams).then(response => {
|
||||
this.registeredCompanyList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
regId: null,
|
||||
regSalesmanCode: null,
|
||||
regSalesmanName: null,
|
||||
regCompany: null,
|
||||
regTax: null,
|
||||
regState: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.regId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "经营部注册公司";
|
||||
this.form.regState = '0';
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const regId = row.regId || this.ids
|
||||
getRegisteredCompany(regId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "经营部注册公司";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.regId != null) {
|
||||
updateRegisteredCompany(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addRegisteredCompany(this.form).then(response => {
|
||||
this.$modal.msgSuccess("创建成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const regIds = row.regId || this.ids;
|
||||
this.$modal.confirm('是否确认删除该经营部注册公司?').then(function() {
|
||||
return delRegisteredCompany(regIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('registeredCompany/registeredCompany/export', {
|
||||
...this.queryParams
|
||||
}, `registeredCompany_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -59,6 +59,7 @@
|
|||
<span style="margin-left: 30px">总单量:<span style="font-size: 18px">{{sumQuotCount}}</span></span>
|
||||
|
||||
<span style="margin-left: 30px">{{this.zbInfo}}</span>
|
||||
<span style="margin-left: 30px">平均处理时长(小时/单):{{this.time}}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="quotList" style="width: 100%;margin-top: 10px;" :height="tableHeight">
|
||||
|
@ -90,7 +91,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { listStatisticsQuotQuot,zbInfo } from "@/api/quot/quot"; // 有效报价单统计
|
||||
import { listStatisticsQuotQuot,zbInfo,handleTime } from "@/api/quot/quot"; // 有效报价单统计
|
||||
import {toDecimal} from "@/api/redBook/redBook";
|
||||
import { getNowDate } from '@/utils/date'
|
||||
|
||||
|
@ -118,7 +119,8 @@ export default {
|
|||
quotSalesmanName: null,
|
||||
quotProject: null
|
||||
},
|
||||
zbInfo: null
|
||||
zbInfo: null,
|
||||
time: null
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
@ -135,6 +137,7 @@ export default {
|
|||
});
|
||||
|
||||
this.getZb();
|
||||
this.getHandleTime();
|
||||
},
|
||||
|
||||
/** 明细进单占比 */
|
||||
|
@ -144,6 +147,13 @@ export default {
|
|||
});
|
||||
},
|
||||
|
||||
/** 平均处理时间 */
|
||||
getHandleTime() {
|
||||
handleTime(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
this.time = response;
|
||||
});
|
||||
},
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
|
|
Loading…
Reference in New Issue