This commit is contained in:
xd 2024-05-28 17:27:29 +08:00
parent 8307e7726e
commit a30fa7a018
22 changed files with 389 additions and 443 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@ -143,6 +143,16 @@
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
<include>**/*.yml</include>
</includes>
<!--是否替换资源中的属性-->
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<targetPath>BOOT-INF</targetPath>
@ -159,6 +169,10 @@
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.*</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
<plugins>

View File

@ -3,11 +3,15 @@ package com.ruoyi.web.controller.customer;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import javax.servlet.http.HttpServletResponse;
import com.alibaba.fastjson2.JSON;
import com.ruoyi.common.constant.CacheConstants;
import com.ruoyi.common.constant.WebsocketConst;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.uuid.UUID;
import com.ruoyi.customer.domain.RfcResult;
@ -17,6 +21,7 @@ import com.ruoyi.customer.domain.qcc.QccECIIndustryVerifyJsonResult;
import com.ruoyi.customer.domain.qcc.QccFuzzySearchJsonResult;
import com.ruoyi.quot.domain.Quot;
import com.ruoyi.system.domain.SysNotice;
import com.ruoyi.system.service.ISysConfigService;
import com.ruoyi.system.service.ISysNoticeService;
import com.ruoyi.web.utils.IdUtils;
import com.ruoyi.web.utils.SapFunction.SapRfcUtils;
@ -56,6 +61,11 @@ import com.ruoyi.common.core.page.TableDataInfo;
@PropertySource("classpath:/common.yml")
public class CustomerController extends BaseController
{
@Autowired
private RedisCache redisCache;
@Autowired
private ISysConfigService configService;
// 接口请求Key
@Value("${qichacha.key}")
private String Qcc_Key;
@ -267,6 +277,29 @@ public class CustomerController extends BaseController
}
/***********************************************企查查模块************************************/
/**
* 查询企查查客户列表
*/
@PreAuthorize("@ss.hasPermi('customer:customer:qcclist')")
@PostMapping("/checkQccCount")
public AjaxResult checkQccCount(){
String qccCusCount = configService.selectConfigByKey("qcc:cus:count");
Integer searchCount = redisCache.getCacheObject(getCacheKey(getUsername()));
if (searchCount == null){
searchCount = 1;
} else{
searchCount++;
}
if(searchCount<= Integer.valueOf(qccCusCount)){
redisCache.setCacheObject(getCacheKey(getUsername()), searchCount, DateUtils.secondsUntilMidnight(), TimeUnit.SECONDS);
}else{
return error("已超过查询限制次数");
}
return success();
}
/**
* 查询企查查客户列表
*/
@ -296,6 +329,17 @@ public class CustomerController extends BaseController
return getDataTable(result);
}
/**
* 企查查客户查询次数缓存键名
*
* @param username 用户名
* @return 缓存键key
*/
private String getCacheKey(String username)
{
return CacheConstants.QCC_CUS + username;
}
// 获取企查查客户行业代码
@PreAuthorize("@ss.hasPermi('customer:customer:qcclist')")
@GetMapping("/getIndustryCodeQcc/{cusName}")

View File

@ -47,6 +47,8 @@ public class CacheController
caches.add(new SysCache(CacheConstants.SAP_COMMON, "SAP公共数据"));
caches.add(new SysCache(CacheConstants.RB_VERSION_DATE, "调价版本"));
caches.add(new SysCache(CacheConstants.QCC_CUS, "企查查客户查询次数"));
}
@PreAuthorize("@ss.hasPermi('monitor:cache:list')")

View File

@ -0,0 +1,22 @@
package com.ruoyi.web.controller.tool.quot;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api("报价单数据接收")
@RestController
@RequestMapping("/jsw/jsw")
public class quotJswController extends BaseController {
@ApiOperation("同步报价数据")
@PostMapping("/updateQuot")
public R<quotModel> updateQuot(quotModel quot)
{
return R.ok(quot);
}
}

View File

@ -0,0 +1,114 @@
package com.ruoyi.web.controller.tool.quot;
import java.math.BigDecimal;
public class quotMaterialModel {
private String matXingh;//型号
private String matGuig;//规格
private String matDiany;//电压
private String matStandard;//标准
private BigDecimal matSl;//数量
private String matDanw;//单位
private String matRemark;//备注
private BigDecimal matMatprice;//料价
private BigDecimal matPrice;//红本价
private BigDecimal matQuotPrice;//报价
private BigDecimal matQuotAllPrice;//报价金额
private String matMatpriceDiff;//料价价差率
public String getMatXingh() {
return matXingh;
}
public void setMatXingh(String matXingh) {
this.matXingh = matXingh;
}
public String getMatGuig() {
return matGuig;
}
public void setMatGuig(String matGuig) {
this.matGuig = matGuig;
}
public String getMatDiany() {
return matDiany;
}
public void setMatDiany(String matDiany) {
this.matDiany = matDiany;
}
public String getMatStandard() {
return matStandard;
}
public void setMatStandard(String matStandard) {
this.matStandard = matStandard;
}
public BigDecimal getMatSl() {
return matSl;
}
public void setMatSl(BigDecimal matSl) {
this.matSl = matSl;
}
public String getMatDanw() {
return matDanw;
}
public void setMatDanw(String matDanw) {
this.matDanw = matDanw;
}
public String getMatRemark() {
return matRemark;
}
public void setMatRemark(String matRemark) {
this.matRemark = matRemark;
}
public BigDecimal getMatMatprice() {
return matMatprice;
}
public void setMatMatprice(BigDecimal matMatprice) {
this.matMatprice = matMatprice;
}
public BigDecimal getMatPrice() {
return matPrice;
}
public void setMatPrice(BigDecimal matPrice) {
this.matPrice = matPrice;
}
public BigDecimal getMatQuotPrice() {
return matQuotPrice;
}
public void setMatQuotPrice(BigDecimal matQuotPrice) {
this.matQuotPrice = matQuotPrice;
}
public BigDecimal getMatQuotAllPrice() {
return matQuotAllPrice;
}
public void setMatQuotAllPrice(BigDecimal matQuotAllPrice) {
this.matQuotAllPrice = matQuotAllPrice;
}
public String getMatMatpriceDiff() {
return matMatpriceDiff;
}
public void setMatMatpriceDiff(String matMatpriceDiff) {
this.matMatpriceDiff = matMatpriceDiff;
}
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.web.controller.tool.quot;
import java.util.List;
public class quotModel {
private String quotJswCode;//金思维报价单号
private String quotCode;//报价单号
private String quotTongPrice;//铜价
private String quotLvPrice;//铝价
private String quotMatpriceDiff;//整单料价价差率
private List<quotMaterialModel> quotMaterial;//明细
public String getQuotJswCode() {
return quotJswCode;
}
public void setQuotJswCode(String quotJswCode) {
this.quotJswCode = quotJswCode;
}
public String getQuotCode() {
return quotCode;
}
public void setQuotCode(String quotCode) {
this.quotCode = quotCode;
}
public String getQuotTongPrice() {
return quotTongPrice;
}
public void setQuotTongPrice(String quotTongPrice) {
this.quotTongPrice = quotTongPrice;
}
public String getQuotLvPrice() {
return quotLvPrice;
}
public void setQuotLvPrice(String quotLvPrice) {
this.quotLvPrice = quotLvPrice;
}
public String getQuotMatpriceDiff() {
return quotMatpriceDiff;
}
public void setQuotMatpriceDiff(String quotMatpriceDiff) {
this.quotMatpriceDiff = quotMatpriceDiff;
}
public List<quotMaterialModel> getQuotMaterial() {
return quotMaterial;
}
public void setQuotMaterial(List<quotMaterialModel> quotMaterial) {
this.quotMaterial = quotMaterial;
}
}

View File

@ -6,6 +6,7 @@ import com.ruoyi.quot.domain.Quot;
import com.ruoyi.quot.domain.QuotMaterial;
import com.ruoyi.redBook.domain.OAQuot;
import com.ruoyi.redBook.domain.OAQuotProduct;
import com.ruoyi.web.utils.IdUtils;
import jxl.HeaderFooter;
import jxl.Workbook;
import jxl.format.Alignment;
@ -15,10 +16,16 @@ import jxl.format.VerticalAlignment;
import jxl.write.Number;
import jxl.write.*;
import jxl.write.biff.RowsExceededException;
import org.apache.commons.io.FileUtils;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.math.BigDecimal;
import java.net.URL;
@ -279,22 +286,22 @@ public class excelUtil {
label = new Label(0, i-3, "备注",wff_merge);
wsheet.addCell(label);
// 获取当前类加载器
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
// 获取资源的URL
URL resourceUrl = classLoader.getResource("jnlogo.png");
File file=new File(resourceUrl.getPath());
InputStream fileInputStream = new ClassPathResource("/jnlogo.png").getInputStream();
File file = new File("logon/"+IdUtils.createNo("jnlogo",3)+".png"); // 指定输出文件路径
//转换
FileUtils.copyInputStreamToFile(fileInputStream, file);
//设置图片位置前两个参数为插入图片的单元格坐标后面是设置从插入的单元格开始横向和纵向分别要占用的单元格个数最后传入图片文件
WritableImage image=new WritableImage(0.3, 0.2, 1.25, 2.55,file);
wsheet.addImage(image);
// 获取当前类加载器
ClassLoader classLoader2 = Thread.currentThread().getContextClassLoader();
// 获取资源的URL
URL resourceUrl2 = classLoader2.getResource("wc.png");
file=new File(resourceUrl2.getPath());
InputStream fileInputStream2 = new ClassPathResource("/wc.png").getInputStream();
File file2 = new File("logon/"+IdUtils.createNo("wc",3)+".png"); // 指定输出文件路径
//转换
FileUtils.copyInputStreamToFile(fileInputStream2, file2);
//设置图片位置前两个参数为插入图片的单元格坐标后面是设置从插入的单元格开始横向和纵向分别要占用的单元格个数最后传入图片文件
image=new WritableImage(6.7, 0.2, 1.20, 2.65,file);
image=new WritableImage(6.7, 0.2, 1.20, 2.65,file2);
wsheet.addImage(image);
wsheet.getSettings().setBottomMargin(0.7d);
@ -312,11 +319,8 @@ public class excelUtil {
footer.getCentre().setFontSize(13);
wsheet.getSettings().setFooter(footer);
wsheet.getSettings().setPrintTitles(0, 8, 0, 7);
wwb.write();
wwb.close();
@ -590,22 +594,22 @@ public class excelUtil {
label = new Label(0, i-3, "备注",wff_merge);
wsheet.addCell(label);
// 获取当前类加载器
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
// 获取资源的URL
URL resourceUrl = classLoader.getResource("jnlogo.png");
File file=new File(resourceUrl.getPath());
InputStream fileInputStream = new ClassPathResource("/jnlogo.png").getInputStream();
File file = new File("logon/"+IdUtils.createNo("jnlogo",3)+".png"); // 指定输出文件路径
//转换
FileUtils.copyInputStreamToFile(fileInputStream, file);
//设置图片位置前两个参数为插入图片的单元格坐标后面是设置从插入的单元格开始横向和纵向分别要占用的单元格个数最后传入图片文件
WritableImage image=new WritableImage(0.3, 0.2, 1.25, 2.55,file);
wsheet.addImage(image);
// 获取当前类加载器
ClassLoader classLoader2 = Thread.currentThread().getContextClassLoader();
// 获取资源的URL
URL resourceUrl2 = classLoader2.getResource("wc.png");
file=new File(resourceUrl2.getPath());
InputStream fileInputStream2 = new ClassPathResource("/wc.png").getInputStream();
File file2 = new File("logon/"+IdUtils.createNo("wc",3)+".png"); // 指定输出文件路径
//转换
FileUtils.copyInputStreamToFile(fileInputStream2, file2);
//设置图片位置前两个参数为插入图片的单元格坐标后面是设置从插入的单元格开始横向和纵向分别要占用的单元格个数最后传入图片文件
image=new WritableImage(6.7, 0.2, 1.20, 2.65,file);
image=new WritableImage(6.7, 0.2, 1.20, 2.65,file2);
wsheet.addImage(image);
wsheet.getSettings().setBottomMargin(0.7d);
@ -623,11 +627,8 @@ public class excelUtil {
footer.getCentre().setFontSize(13);
wsheet.getSettings().setFooter(footer);
wsheet.getSettings().setPrintTitles(0, 8, 0, 7);
wwb.write();
wwb.close();

View File

@ -1,40 +0,0 @@
package com.ruoyi.web.webservice.config;
import com.ruoyi.web.webservice.service.QuotWebService;
import org.apache.cxf.bus.spring.SpringBus;
import org.apache.cxf.jaxws.EndpointImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.xml.ws.Endpoint;
@Configuration
public class WebServiceConfiguration {
@Autowired
private QuotWebService quotWebService;
@Autowired
private SpringBus spirngBus;
/**
* 发布服务
* @return
*/
@Bean
public Endpoint quotWebServiceEndpoint(){
System.out.println("服务发布");
//这里指定的端口不能跟应用的端口冲突, 单独指定
String path = "http://127.0.0.1:9090/ws/quot";
EndpointImpl endpoint = new EndpointImpl(spirngBus, quotWebService);
endpoint.publish(path);
System.out.println("服务成功path: " + path);
System.out.println(String.format("在线的wsdl%s?wsdl", path));
return endpoint ;
}
}

View File

@ -1,13 +0,0 @@
package com.ruoyi.web.webservice.domain;
public class QuotEntity {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

View File

@ -1,15 +0,0 @@
package com.ruoyi.web.webservice.service;
import com.ruoyi.web.webservice.domain.QuotEntity;
import javax.jws.WebMethod;
import javax.jws.WebService;
@WebService(
name = "QuotWebService", // 暴露服务名称
targetNamespace = "http://QuotWebService.service.webservice.web.ruoyi.com"// 命名空间,一般是接口的包名倒序
)
public interface QuotWebService {
@WebMethod
QuotEntity getQuotInfo();
}

View File

@ -1,21 +0,0 @@
package com.ruoyi.web.webservice.service.impl;
import com.ruoyi.web.webservice.domain.QuotEntity;
import com.ruoyi.web.webservice.service.QuotWebService;
import org.springframework.stereotype.Service;
import javax.jws.WebService;
@Service
@WebService(serviceName = "QuotWebService", // 与接口中指定的name一致, 都可以不写
targetNamespace = "http://QuotWebService.service.webservice.web.ruoyi.com", // 与接口中的命名空间一致,一般是接口的包名倒都可以不用写
endpointInterface = "com.ruoyi.web.webservice.service.QuotWebService" // 接口类全路径
)
public class QuotWebServiceImpl implements QuotWebService {
@Override
public QuotEntity getQuotInfo() {
QuotEntity quot = new QuotEntity();
quot.setName("测试");
return quot;
}
}

View File

@ -61,4 +61,9 @@ public class CacheConstants
* 调价日期数据 redis key
*/
public static final String RB_VERSION_DATE = "rb_version_date:";
/**
* 企查查客户查询次数
*/
public static final String QCC_CUS = "qcc_cus:";
}

View File

@ -3,11 +3,8 @@ package com.ruoyi.common.utils;
import java.lang.management.ManagementFactory;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.*;
import java.time.temporal.ChronoUnit;
import java.util.Date;
import org.apache.commons.lang3.time.DateFormatUtils;
@ -188,4 +185,27 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
ZonedDateTime zdt = localDateTime.atZone(ZoneId.systemDefault());
return Date.from(zdt.toInstant());
}
/**
* 计算当前时间至晚上24点之前的秒数
* @return
*/
public static Integer secondsUntilMidnight()
{
// 获取当前时间
LocalDateTime now = LocalDateTime.now();
// 获取今天的结束时间即明天的开始时间
LocalDateTime endOfDay = now.toLocalDate().plusDays(1).atStartOfDay();
// 计算剩余秒数
long secondsLeft = Duration.between(now, endOfDay).getSeconds();
return Integer.parseInt(String.valueOf(secondsLeft));
}
public static void main(String[] args) {
System.out.println(secondsUntilMidnight());
}
}

View File

@ -87,6 +87,9 @@ public class Quot extends BaseEntity
/** 铜价 */
private String quotTongPrice;
/** 整单料价价差率 */
private String quotMatpriceDiff;
/** 是否打印 */
private String quotPrint;
/** 打印人 */
@ -281,6 +284,9 @@ public class Quot extends BaseEntity
public String getQuotTongPrice() { return quotTongPrice; }
public void setQuotTongPrice(String quotTongPrice) { this.quotTongPrice = quotTongPrice; }
public String getQuotMatpriceDiff() { return quotMatpriceDiff; }
public void setQuotMatpriceDiff(String quotMatpriceDiff) { this.quotMatpriceDiff = quotMatpriceDiff; }
public String getQuotPrint() { return quotPrint; }
public void setQuotPrint(String quotPrint) { this.quotPrint = quotPrint; }

View File

@ -29,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="quotApprovalStatus" column="quot_approval_status" />
<result property="quotLvPrice" column="quot_lv_price" />
<result property="quotTongPrice" column="quot_tong_price" />
<result property="quotMatpriceDiff" column="quot_matprice_diff" />
<result property="quotPrint" column="quot_print" />
<result property="quotPrintUserName" column="quot_print_user_name" />
<result property="createBy" column="create_by" />
@ -93,7 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.quot_phone, a.quot_inquiry_date, a.quot_project, a.quot_quotation_date, a.quot_quotation_from,
a.quot_quotation_require, a.quot_feedback_explanation, a.quot_quantity, a.quot_total_price,
a.quot_check_user_name, u2.nick_name quot_check_user_nickname, a.quot_approval_status,
a.quot_lv_price,a.quot_tong_price,a.quot_print,u3.nick_name quot_print_user_name,
a.quot_lv_price,a.quot_tong_price,a.quot_matprice_diff,a.quot_print,u3.nick_name quot_print_user_name,
a.create_by, a.create_time, a.update_by, a.update_time, u.nick_name create_name,
a.quot_jsxz_standard,a.quot_jsxz_approval_status,a.quot_jsxz_chapter,
@ -130,7 +131,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.quot_salesman_dept_id, a.quot_salesman_dept_name, a.quot_address, a.quot_phone, a.quot_inquiry_date,
a.quot_project, a.quot_quotation_date, a.quot_quotation_from, a.quot_quotation_require, a.quot_feedback_explanation,
a.quot_quantity, a.quot_total_price, a.quot_check_user_name, u2.nick_name quot_check_user_nickname, a.quot_approval_status,
a.quot_lv_price,a.quot_tong_price,a.quot_print,u3.nick_name quot_print_user_name,
a.quot_lv_price,a.quot_tong_price,a.quot_matprice_diff,a.quot_print,u3.nick_name quot_print_user_name,
a.create_by, a.create_time, a.update_by, a.update_time,
a.quot_jsxz_standard,a.quot_jsxz_approval_status,a.quot_jsxz_chapter,
@ -187,6 +188,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="quotApprovalStatus != null">quot_approval_status,</if>
<if test="quotLvPrice != null">quot_lv_price,</if>
<if test="quotTongPrice != null">quot_tong_price,</if>
<if test="quotMatpriceDiff != null">quot_matprice_diff,</if>
<if test="quotPrint != null">quot_print,</if>
<if test="quotPrintUserName != null">quot_print_user_name,</if>
<if test="createBy != null">create_by,</if>
@ -228,6 +230,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="quotApprovalStatus != null">#{quotApprovalStatus},</if>
<if test="quotLvPrice != null">#{quotLvPrice},</if>
<if test="quotTongPrice != null">#{quotTongPrice},</if>
<if test="quotMatpriceDiff != null">#{quotMatpriceDiff},</if>
<if test="quotPrint != null">#{quotPrint},</if>
<if test="quotPrintUserName != null">#{quotPrintUserName},</if>
<if test="createBy != null">#{createBy},</if>
@ -272,6 +275,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="quotApprovalStatus != null">quot_approval_status = #{quotApprovalStatus},</if>
<if test="quotLvPrice != null">quot_lv_price = #{quotLvPrice},</if>
<if test="quotTongPrice != null">quot_tong_price = #{quotTongPrice},</if>
<if test="quotMatpriceDiff != null">quot_matprice_diff = #{quotMatpriceDiff},</if>
<if test="quotPrint != null">quot_print = #{quotPrint},</if>
<if test="quotPrintUserName != null">quot_print_user_name = #{quotPrintUserName},</if>
<if test="createBy != null">create_by = #{createBy},</if>

View File

@ -92,6 +92,14 @@ export function delCustomer(cusId) {
}
/******************************企查查模块***********************************/
// 校验是否超过企查查接口查询次数
export function checkQccCount() {
return request({
url: '/customer/customer/checkQccCount',
method: 'post'
})
}
// 查询企查查客户列表
export function qccListCustomer(query) {
return request({

View File

@ -113,7 +113,9 @@
<el-table-column label="客户ID" align="center" prop="cusId" v-if="false"/>
<el-table-column fixed label="审批状态" align="center" prop="cusApprovalStatus" width="100">
<template slot-scope="scope">
<el-tooltip :content="scope.row.cusReturnRemark" placement="bottom" effect="dark" :disabled="scope.row.cusReturnRemark==null">
<dict-tag :options="dict.type.cus_approval_status" :value="scope.row.cusApprovalStatus"/>
</el-tooltip>
</template>
</el-table-column>
<el-table-column fixed label="业务员" align="center" prop="cusSalesman"/>
@ -186,7 +188,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="街道" prop="cusQccStreet">
<el-input v-model="form.cusQccStreet" placeholder="企查查带出" :disabled="true"/>
<el-input v-model="form.cusQccStreet" placeholder="企查查带出" :disabled="isDisCustomer"/>
</el-form-item>
</el-col>
</el-row>
@ -198,7 +200,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="增值税号" prop="cusVatNo">
<el-input v-model="form.cusVatNo" placeholder="企查查带出" :disabled="true"/>
<el-input v-model="form.cusVatNo" placeholder="企查查带出" :disabled="isDisCustomer"/>
</el-form-item>
</el-col>
</el-row>
@ -303,311 +305,13 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8" v-if="this.form.cusReturnRemark!=null">
<el-row :gutter="8" v-if="checkRole(['ITZX_SJZ']) || (!checkRole(['ITZX_SJZ'])&&this.form.cusReturnRemark!=null)">
<el-col :span="24">
<el-form-item label="驳回备注" prop="cusReturnRemark">
<el-input type="textarea" autosize v-model="form.cusReturnRemark" placeholder="数据组填写"/>
</el-form-item>
</el-col>
</el-row>
<!--<el-tabs v-model="activeName" tab-position="left" style="margin-left: 15px; margin-right: 15px;height: 480px;">
<el-tab-pane label="基本信息" name="customerInfo">
<el-row :gutter="8">
<el-col :span="12">
<el-form-item label="客户编码" prop="cusCode">
<el-input v-model="form.cusCode" placeholder="系统自动生成" :disabled="true"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="SAP客户编码" prop="cusSapCode">
<el-input v-model="form.cusSapCode" placeholder="审批通过自动生成" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="12">
<el-form-item label="客户名称" prop="cusName">
<el-input v-model="form.cusName" placeholder="企查查带出" :disabled="true">
<el-button slot="append" icon="el-icon-search" @click="openQcc" v-hasPermi="['customer:customer:qcclist']"></el-button>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="街道/门牌号" prop="cusStreet">
<el-input v-model="form.cusStreet" placeholder="请输入街道/门牌号" :disabled="isDisSalesman"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="12">
<el-form-item label="街道" prop="cusQccStreet">
<el-input v-model="form.cusQccStreet" placeholder="企查查带出" :disabled="true"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="增值税号" prop="cusVatNo">
<el-input v-model="form.cusVatNo" placeholder="企查查带出" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="8">
<el-form-item label="电话号码" prop="cusPhoneNumber">
<el-input v-model="form.cusPhoneNumber" placeholder="请输入电话号码" :disabled="isDisSalesman"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="客户组类别" prop="cusGroup">
<el-select v-model="form.cusGroup" placeholder="请选择客户组类别" style="width: 100%;" :disabled="isDisSalesman">
<el-option
v-for="dict in dict.type.cus_group"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="客户类型" prop="cusType">
<el-select v-model="form.cusType" placeholder="请选择客户类型" style="width: 100%;" :disabled="isDisSalesman">
<el-option
v-for="dict in dict.type.cus_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="8">
<el-form-item label="国家" prop="cusCountry">
<el-select v-model="form.cusCountry" placeholder="请选择国家" style="width: 100%;" :disabled="isDisSalesman">
<el-option
v-for="item in countrysDicts"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="语言" prop="cusLanguage">
<el-select v-model="form.cusLanguage" placeholder="请选择语言" style="width: 100%;" :disabled="isDisSalesman">
<el-option
v-for="item in languageDicts"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
&lt;!&ndash; <el-row :gutter="8">
<el-col :span="8">
</el-col>
<el-col :span="8">
<el-form-item label="客户标签" prop="cusLabel">
<el-input v-model="form.cusLabel" placeholder="请输入客户标签" :disabled="isDisSalesman"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="客户分类" prop="cusClassification">
<el-input v-model="form.cusClassification" placeholder="请输入客户分类" :disabled="isDisSalesman"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="8">
<el-form-item label="电子发票邮箱" prop="cusReceivingEmail">
<el-input v-model="form.cusReceivingEmail" placeholder="请输入电子发票接收邮箱" :disabled="isDisSalesman"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="收件人" prop="cusRecipient">
<el-input v-model="form.cusRecipient" placeholder="请输入收件人" :disabled="isDisSalesman"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="收件人电话" prop="cusRecipientPhone">
<el-input v-model="form.cusRecipientPhone" placeholder="请输入收件人电话" :disabled="isDisSalesman"/>
</el-form-item>
</el-col>
</el-row>&ndash;&gt;
<el-row :gutter="8">
<el-col :span="24">
<el-form-item label="备注" prop="cusRemark">
<el-input type="textarea" autosize v-model="form.cusRemark" placeholder="请输入备注" :disabled="isDisSalesman"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="24">
<el-form-item label="驳回备注" prop="cusReturnRemark">
<el-input type="textarea" autosize v-model="form.cusReturnRemark" placeholder="数据组填写"/>
</el-form-item>
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="开票银行" name="bankInfo">
<el-row class="mb8" :gutter="8">
<el-col :span="1.5">
<div v-hasPermi="['customer:customer:bankAdd']">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddBank" v-if="buttonShowSalesman">添加</el-button>
</div>
</el-col>
<el-col :span="1.5">
<div v-hasPermi="['customer:customer:bankDel']">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteBank" v-if="buttonShowSalesman">删除</el-button>
</div>
</el-col>
</el-row>
<el-table :data="bankList" @selection-change="handleBankSelectionChange" ref="bank">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="国家" prop="bankCountry" v-if="checkRole(['ITZX_SJZ'])">
<template slot-scope="scope">
<el-input v-model="scope.row.bankCountry" placeholder="选择银行代码自动带出" :disabled="true"/>
</template>
</el-table-column>
<el-table-column label="银行代码" prop="bankCode" v-if="checkRole(['ITZX_SJZ'])">
<template slot-scope="scope">
<el-input v-model="scope.row.bankCode" placeholder="请输入银行代码" :disabled="true" >
<i v-if="!isDisSjz" slot="suffix" class="el-input__icon el-icon-search" @click="handleSearchBankCode(scope)"></i>
</el-input>
</template>
</el-table-column>
<el-table-column label="银行名称" prop="bankName">
<template slot-scope="scope">
<el-input v-model="scope.row.bankName" placeholder="请输入银行名称" :disabled="isDisSalesman"/>
</template>
</el-table-column>
<el-table-column label="银行账户" prop="bankAccount">
<template slot-scope="scope">
<el-input v-model="scope.row.bankAccount" placeholder="请输入银行账户" :disabled="isDisSalesman" />
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="销售数据" name="checkInfo" v-if="checkRole(['ITZX_SJZ'])">
<el-row :gutter="8">
<el-col :span="8">
<el-form-item label="付款条件" prop="cusPaymentTerms">
<el-select v-model="form.cusPaymentTerms" placeholder="请选择付款条件" style="width: 100%;" :disabled="isDisSjz">
<el-option
v-for="item in paymentTermsDicts"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="行业代码" prop="cusIndustryCode">
<el-select v-model="form.cusIndustryCode" placeholder="请选择行业代码" style="width: 100%;" :disabled="isDisSjz">
<el-option
v-for="item in industryCodeDicts"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="销售地区" prop="cusSalesTerritory">
<el-select v-model="form.cusSalesTerritory" placeholder="请选择销售地区" style="width: 100%;" :disabled="isDisSjz">
<el-option
v-for="item in salesTerritoryDicts"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="8">
<el-form-item label="销售组织" prop="cusSalesOrganization">
<el-select v-model="form.cusSalesOrganization" placeholder="请选择销售组织" style="width: 100%;" :disabled="isDisSjz">
<el-option
v-for="item in salesOrganizationDicts"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="分销渠道" prop="cusDistributionChannel">
<el-select v-model="form.cusDistributionChannel" placeholder="请选择分销渠道" style="width: 100%;" :disabled="isDisSjz">
<el-option
v-for="item in distributionChannelDicts"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="销售办公室" prop="cusSaleOffice">
<el-select v-model="form.cusSaleOffice" placeholder="请选择销售办公室" style="width: 100%;" :disabled="isDisSjz">
<el-option
v-for="item in saleOfficeDicts"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="8">
<el-form-item label="币种" prop="cusCurrency">
<el-select v-model="form.cusCurrency" placeholder="请选择币种" style="width: 100%;" :disabled="isDisSjz">
<el-option
v-for="dict in dict.type.cus_currency"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="客户税分类" prop="cusTax">
<el-select v-model="form.cusTax" placeholder="请选择客户税" style="width: 100%;" :disabled="isDisSjz">
<el-option
v-for="item in taxDicts"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="统驭科目" prop="cusReconciliationAccount">
<el-select v-model="form.cusReconciliationAccount" placeholder="请选择统驭科目" style="width: 100%;" :disabled="isDisSjz">
<el-option
v-for="item in reconciliationAccountDicts"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-tab-pane>
</el-tabs>-->
<el-divider content-position="left" class="customer_divider_text">银行信息</el-divider>
<el-row class="mb8" :gutter="8">
@ -622,8 +326,9 @@
</div>
</el-col>
</el-row>
<el-table :data="bankList" @selection-change="handleBankSelectionChange" ref="bank">
<el-table :data="bankList" @selection-change="handleBankSelectionChange" :row-class-name="rowBankIndex" ref="bank">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="序号" align="center" prop="index" width="50"/>
<el-table-column label="国家" prop="bankCountry" v-if="checkRole(['ITZX_SJZ'])">
<template slot-scope="scope">
<el-input v-model="scope.row.bankCountry" placeholder="选择银行代码自动带出" :disabled="true"/>
@ -806,7 +511,7 @@
</el-dialog>
<!-- 企查查 客户查询 对话框 -->
<el-dialog :title="qccTitle" :visible.sync="qccOpen" width="800px" :show-close="false" append-to-body>
<el-dialog :title="qccTitle" :visible.sync="qccOpen" width="1000px" append-to-body>
<el-form :model="queryQccParams" ref="queryQccForm" size="small" :inline="true" label-width="100px" @submit.native.prevent>
<el-form-item label="公司名称" prop="Name">
<el-input
@ -822,8 +527,8 @@
</el-form>
<el-table v-loading="qccLoading" ref="qccTable" :data="qccCustomerList" @selection-change="handleSelectionQccChange" height="300">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="公司名" align="center" prop="name" />
<el-table-column label="法人" align="center" prop="operName" />
<el-table-column label="公司名" width="280" align="center" prop="name" />
<el-table-column label="法人" width="100" align="center" prop="operName" />
<el-table-column label="注册时间" align="center" prop="startDate" />
<el-table-column label="增值税号" align="center" prop="creditCode" />
<el-table-column label="地址" align="center" prop="address" />
@ -843,7 +548,7 @@
</el-dialog>
<!-- 银行代码 查询 对话框 -->
<el-dialog :title="bankCodeTitle" :visible.sync="bankCodeOpen" width="800px" :show-close="false" append-to-body>
<el-dialog :title="bankCodeTitle" :visible.sync="bankCodeOpen" width="800px" append-to-body>
<el-form :model="queryBankCodeParams" ref="queryBankCodeForm" size="small" :inline="true" label-width="100px" @submit.native.prevent>
<el-form-item label="银行名称" prop="Name">
<el-input
@ -900,7 +605,7 @@
}
</style>
<script>
import { listCustomer, getCustomer, delCustomer,changCusStatus, addCustomer, updateCustomer,getReturnUpdateCustomer, commitCustomer,returnCustomer, commitSAPCustomer, qccListCustomer, getIndustryCodeQcc } from "@/api/customer/customer";
import { listCustomer, getCustomer, delCustomer,changCusStatus, addCustomer, updateCustomer,getReturnUpdateCustomer, commitCustomer,returnCustomer, commitSAPCustomer, checkQccCount, qccListCustomer, getIndustryCodeQcc } from "@/api/customer/customer";
import { checkPermi, checkRole } from "@/utils/permission"; //
import { bankCodeList,getCountrys,getIndustryCode,getLanguage,getPaymentTerms,getSalesOrganization,getDistributionChannel,getSalesTerritory,getSaleOffice,getTax,getReconciliationAccount, getAccountAllocationGroup } from "@/api/common/sapRfc";// sap-rfc
@ -1243,6 +948,7 @@ export default {
this.buttonShowSalesman = checkRole(['ITZX_SJZ']) ? false : true; //
this.buttonShowSjz = checkRole(['ITZX_SJZ']) ? true : false;//
this.isDisCustomer = checkRole(['ITZX_SJZ']) ? false : true;//
this.handleAddBank();//
},
/** 修改按钮操作 */
async handleUpdate(row) {
@ -1279,6 +985,9 @@ export default {
this.isDisCustomer = (checkRole(['CUSTOMER_RETURN_UPDATE'])&&this.form.cusApprovalStatus == '1') ? false:(checkRole(['ITZX_SJZ'])&&this.form.cusApprovalStatus != '2')?false:true;
this.bankList = response.data.bankList;
if(this.bankList.length==0){
this.handleAddBank();//
}
this.open = true;
this.title = "客户信息";
},
@ -1309,6 +1018,22 @@ export default {
this.$refs["form"].validate(valid => {
if (valid) {
this.form.bankList = this.bankList;
//
try{
if(this.bankList.length==0){
this.$modal.msgError("未添加银行信息");
return;
}
this.bankList.forEach((row, index) => {
if(!row.bankName || !row.bankAccount){
this.$modal.msgError("银行名称或银行账户不能为空");
throw new Error;
}
})
}catch(e){
return;
}
commitCustomer(this.form).then(response => {
this.$modal.msgSuccess("提交成功");
this.open = false;
@ -1385,6 +1110,11 @@ export default {
/** 复选框选中数据 */
handleBankSelectionChange(selection) {
this.checkedBank = selection.map(item => item.index)
console.log(this.checkedBank)
},
/** 序号 */
rowBankIndex({ row, rowIndex }) {
row.index = rowIndex + 1;
},
/** 导出按钮操作 */
handleExport() {
@ -1418,6 +1148,8 @@ export default {
return;
}
//
checkQccCount().then(response => {
this.qccLoading = true;
qccListCustomer(this.queryQccParams).then(response => {
this.qccCustomerList = response.rows;
@ -1425,6 +1157,7 @@ export default {
//this.qccCurrentPage = 1;
this.qccLoading = false;
});
});
},
//
@ -1547,6 +1280,7 @@ export default {
this.form.cusCurrency = 'CNY';
this.form.cusTax = '1';
this.form.cusReconciliationAccount = '1122010100';
this.form.cusAccountAllocationGroup = '01';
},
// SAP
setInitF(){

View File

@ -414,7 +414,7 @@
let fileName = "BJD_"+this.getTodayCourse()+".xls";
if(this.form.quotCode){
fileName = "BJD_"+this.form.quotCode+".xls";
fileName = this.form.quotCode+".xls";
}
if ("download" in document.createElement("a")) {
// IE