'123'
This commit is contained in:
parent
518bf039ef
commit
7a8b425741
|
@ -1,5 +1,5 @@
|
||||||
#for tests only !
|
#for tests only !
|
||||||
#Tue Apr 30 16:42:04 CST 2024
|
#Mon May 06 14:44:29 CST 2024
|
||||||
jco.destination.pool_capacity=10
|
jco.destination.pool_capacity=10
|
||||||
jco.client.lang=ZH
|
jco.client.lang=ZH
|
||||||
jco.client.ashost=172.19.0.125
|
jco.client.ashost=172.19.0.125
|
||||||
|
@ -7,5 +7,5 @@ jco.client.saprouter=
|
||||||
jco.client.user=RFC
|
jco.client.user=RFC
|
||||||
jco.client.sysnr=00
|
jco.client.sysnr=00
|
||||||
jco.destination.peak_limit=10
|
jco.destination.peak_limit=10
|
||||||
jco.client.passwd=uD8ely7MSR~%EjN[YVSQi{Uk(g)lY*X:C|ocMpezcUAU:e-g
|
jco.client.passwd=654321
|
||||||
jco.client.client=800
|
jco.client.client=800
|
||||||
|
|
|
@ -1,21 +1,34 @@
|
||||||
package com.ruoyi.web.controller.common;
|
package com.ruoyi.web.controller.common;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSON;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.config.RuoYiConfig;
|
import com.ruoyi.common.config.RuoYiConfig;
|
||||||
import com.ruoyi.common.constant.CacheConstants;
|
import com.ruoyi.common.constant.CacheConstants;
|
||||||
import com.ruoyi.common.constant.Constants;
|
import com.ruoyi.common.constant.Constants;
|
||||||
|
import com.ruoyi.common.constant.HttpStatus;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.redis.RedisCache;
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
import com.ruoyi.common.core.redis.RedisLock;
|
import com.ruoyi.common.core.redis.RedisLock;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||||
import com.ruoyi.common.utils.file.FileUtils;
|
import com.ruoyi.common.utils.file.FileUtils;
|
||||||
import com.ruoyi.common.utils.file.MinioUtil;
|
import com.ruoyi.common.utils.file.MinioUtil;
|
||||||
|
import com.ruoyi.customer.domain.Bank;
|
||||||
|
import com.ruoyi.customer.domain.BankCode;
|
||||||
import com.ruoyi.customer.domain.Customer;
|
import com.ruoyi.customer.domain.Customer;
|
||||||
|
import com.ruoyi.customer.domain.qcc.FuzzySearch;
|
||||||
|
import com.ruoyi.customer.domain.qcc.QccFuzzySearchJsonResult;
|
||||||
import com.ruoyi.framework.config.ServerConfig;
|
import com.ruoyi.framework.config.ServerConfig;
|
||||||
import com.ruoyi.materialType.domain.CMaterialType;
|
import com.ruoyi.materialType.domain.CMaterialType;
|
||||||
import com.ruoyi.web.utils.SapFunction.RfcResult;
|
import com.ruoyi.web.utils.SapFunction.RfcResult;
|
||||||
import com.ruoyi.web.utils.SapFunction.SapRfcUtils;
|
import com.ruoyi.web.utils.SapFunction.SapRfcUtils;
|
||||||
|
import com.ruoyi.web.utils.qcc.HttpHelper;
|
||||||
|
import com.ruoyi.web.utils.qcc.QiChaChaUtil;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.apache.http.client.methods.HttpHead;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -58,10 +71,10 @@ public class SapRfcController
|
||||||
{
|
{
|
||||||
AjaxResult ajax = AjaxResult.success();
|
AjaxResult ajax = AjaxResult.success();
|
||||||
|
|
||||||
List<RfcResult> resCache = redisCache.getCacheObject(getSapCacheKey("country"));
|
List<RfcResult> resCache = redisCache.getCacheObject(getSapCacheKey("countrys"));
|
||||||
if(CollectionUtils.isEmpty(resCache)){
|
if(CollectionUtils.isEmpty(resCache)){
|
||||||
resCache = SapRfcUtils.getCountrys(null);
|
resCache = SapRfcUtils.getCountrys(null);
|
||||||
redisCache.setCacheObject(getSapCacheKey("country"),resCache);
|
redisCache.setCacheObject(getSapCacheKey("countrys"),resCache);
|
||||||
}
|
}
|
||||||
log.info("获取国家数据条数 - {}", resCache.size());
|
log.info("获取国家数据条数 - {}", resCache.size());
|
||||||
ajax.put("countrysDicts", resCache);
|
ajax.put("countrysDicts", resCache);
|
||||||
|
@ -215,6 +228,48 @@ public class SapRfcController
|
||||||
return ajax;
|
return ajax;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取客户税分类数据
|
||||||
|
* @param customer
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('customer:customer:list')")
|
||||||
|
@GetMapping("/getTax")
|
||||||
|
public AjaxResult getTax(Customer customer)
|
||||||
|
{
|
||||||
|
AjaxResult ajax = AjaxResult.success();
|
||||||
|
|
||||||
|
List<RfcResult> resCache = redisCache.getCacheObject(getSapCacheKey("tax"));
|
||||||
|
if(CollectionUtils.isEmpty(resCache)){
|
||||||
|
resCache = SapRfcUtils.getTax(null);
|
||||||
|
redisCache.setCacheObject(getSapCacheKey("tax"),resCache);
|
||||||
|
}
|
||||||
|
log.info("获取客户税分类数据条数 - {}", resCache.size());
|
||||||
|
ajax.put("taxDicts", resCache);
|
||||||
|
return ajax;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取统驭科目数据
|
||||||
|
* @param customer
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('customer:customer:list')")
|
||||||
|
@GetMapping("/getReconciliationAccount")
|
||||||
|
public AjaxResult getReconciliationAccount(Customer customer)
|
||||||
|
{
|
||||||
|
AjaxResult ajax = AjaxResult.success();
|
||||||
|
|
||||||
|
List<RfcResult> resCache = redisCache.getCacheObject(getSapCacheKey("reconciliationAccount"));
|
||||||
|
if(CollectionUtils.isEmpty(resCache)){
|
||||||
|
resCache = SapRfcUtils.getReconciliationAccount(null);
|
||||||
|
redisCache.setCacheObject(getSapCacheKey("reconciliationAccount"),resCache);
|
||||||
|
}
|
||||||
|
log.info("获取统驭科目数据条数 - {}", resCache.size());
|
||||||
|
ajax.put("reconciliationAccountDicts", resCache);
|
||||||
|
return ajax;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取redis SAP公共数据
|
* 获取redis SAP公共数据
|
||||||
* @param type
|
* @param type
|
||||||
|
@ -224,4 +279,30 @@ public class SapRfcController
|
||||||
{
|
{
|
||||||
return CacheConstants.SAP_COMMON + type;
|
return CacheConstants.SAP_COMMON + type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*=======================================查询SAP银行代码信息=================================================*/
|
||||||
|
/**
|
||||||
|
* 查询银行代码列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('customer:customer:bankCodeList')")
|
||||||
|
@Log(title = "银行代码信息查询", businessType = BusinessType.OTHER)
|
||||||
|
@GetMapping("/bankCodeList")
|
||||||
|
public TableDataInfo bankCodeList(BankCode bank)
|
||||||
|
{
|
||||||
|
String bankName = bank.getBankName();
|
||||||
|
List<BankCode> resCache = new ArrayList<BankCode>();
|
||||||
|
try {
|
||||||
|
resCache = SapRfcUtils.getBankCodeList(bankName);
|
||||||
|
} catch (Exception e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
TableDataInfo rspData = new TableDataInfo();
|
||||||
|
rspData.setCode(HttpStatus.SUCCESS);
|
||||||
|
rspData.setMsg("查询成功");
|
||||||
|
rspData.setRows(resCache);
|
||||||
|
rspData.setTotal(new PageInfo(resCache).getTotal());
|
||||||
|
return rspData;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.ruoyi.web.utils.SapFunction;
|
package com.ruoyi.web.utils.SapFunction;
|
||||||
|
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.customer.domain.BankCode;
|
||||||
import com.sap.conn.jco.JCoDestination;
|
import com.sap.conn.jco.JCoDestination;
|
||||||
import com.sap.conn.jco.JCoFunction;
|
import com.sap.conn.jco.JCoFunction;
|
||||||
import com.sap.conn.jco.JCoParameterList;
|
import com.sap.conn.jco.JCoParameterList;
|
||||||
|
@ -10,6 +11,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class SapRfcUtils {
|
public class SapRfcUtils {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取SAP国家数据
|
* 获取SAP国家数据
|
||||||
* @param param 不传查询全部
|
* @param param 不传查询全部
|
||||||
|
@ -265,4 +267,103 @@ public class SapRfcUtils {
|
||||||
}
|
}
|
||||||
return countrys;
|
return countrys;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取客户税分类数据
|
||||||
|
* @param param 不传查询全部
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static List<RfcResult> getTax(String param){
|
||||||
|
JCoFunction function = null;
|
||||||
|
RfcResult rfcResult = null;
|
||||||
|
List<RfcResult> countrys = new ArrayList<>();
|
||||||
|
|
||||||
|
JCoDestination destination = ConnectToSAP.connect();
|
||||||
|
try {
|
||||||
|
function = destination.getRepository().getFunctionTemplate("ZRFC_BASIC_DATA").getFunction();
|
||||||
|
if (function == null)
|
||||||
|
throw new RuntimeException("RFC_SYSTEM_INFO not found in SAP.");
|
||||||
|
JCoParameterList input = function.getImportParameterList();
|
||||||
|
input.setValue("FLAG40", StringUtils.isNotNull(param)?param:"X");//输入参数
|
||||||
|
function.execute(destination);
|
||||||
|
JCoTable table = function.getTableParameterList().getTable("T_TSKDT");
|
||||||
|
for(int i = 0; i<table.getNumRows(); i++){
|
||||||
|
table.setRow(i);
|
||||||
|
rfcResult = new RfcResult();
|
||||||
|
rfcResult.setValue(table.getString("TAXKD"));
|
||||||
|
rfcResult.setLabel(table.getString("VTEXT"));
|
||||||
|
countrys.add(rfcResult);
|
||||||
|
}
|
||||||
|
}catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return countrys;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取统驭科目数据
|
||||||
|
* @param param 不传查询全部
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static List<RfcResult> getReconciliationAccount(String param){
|
||||||
|
JCoFunction function = null;
|
||||||
|
RfcResult rfcResult = null;
|
||||||
|
List<RfcResult> countrys = new ArrayList<>();
|
||||||
|
|
||||||
|
JCoDestination destination = ConnectToSAP.connect();
|
||||||
|
try {
|
||||||
|
function = destination.getRepository().getFunctionTemplate("ZRFC_BASIC_DATA").getFunction();
|
||||||
|
if (function == null)
|
||||||
|
throw new RuntimeException("RFC_SYSTEM_INFO not found in SAP.");
|
||||||
|
JCoParameterList input = function.getImportParameterList();
|
||||||
|
input.setValue("FLAG28", StringUtils.isNotNull(param)?param:"X");//输入参数
|
||||||
|
function.execute(destination);
|
||||||
|
JCoTable table = function.getTableParameterList().getTable("T_HKONT");
|
||||||
|
for(int i = 0; i<table.getNumRows(); i++){
|
||||||
|
table.setRow(i);
|
||||||
|
rfcResult = new RfcResult();
|
||||||
|
rfcResult.setValue(table.getString("SAKNR"));
|
||||||
|
rfcResult.setLabel(table.getString("TXT20"));
|
||||||
|
countrys.add(rfcResult);
|
||||||
|
}
|
||||||
|
}catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return countrys;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*=======================================查询SAP银行代码信息=================================================*/
|
||||||
|
/**
|
||||||
|
* 获取银行代码数据
|
||||||
|
* @param param 不传查询全部
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static List<BankCode> getBankCodeList(String param){
|
||||||
|
JCoFunction function = null;
|
||||||
|
BankCode rfcResult = null;
|
||||||
|
List<BankCode> countrys = new ArrayList<>();
|
||||||
|
|
||||||
|
JCoDestination destination = ConnectToSAP.connect();
|
||||||
|
try {
|
||||||
|
function = destination.getRepository().getFunctionTemplate("ZSRM_GET_BANKKEY").getFunction();
|
||||||
|
if (function == null)
|
||||||
|
throw new RuntimeException("RFC_SYSTEM_INFO not found in SAP.");
|
||||||
|
JCoParameterList input = function.getImportParameterList();
|
||||||
|
input.setValue("DESCRIPTION", StringUtils.isNotNull(param)?param:"X");//输入参数
|
||||||
|
function.execute(destination);
|
||||||
|
JCoTable table = function.getTableParameterList().getTable("T_DATA");
|
||||||
|
for(int i = 0; i<table.getNumRows(); i++){
|
||||||
|
table.setRow(i);
|
||||||
|
rfcResult = new BankCode();
|
||||||
|
rfcResult.setBankCode(table.getString("BANKL"));
|
||||||
|
rfcResult.setBankName(table.getString("BANKA"));
|
||||||
|
rfcResult.setBankCountry(table.getString("BANKS"));
|
||||||
|
countrys.add(rfcResult);
|
||||||
|
}
|
||||||
|
}catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return countrys;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,12 @@ public class Bank extends BaseEntity
|
||||||
/** 银行账户 */
|
/** 银行账户 */
|
||||||
private String bankAccount;
|
private String bankAccount;
|
||||||
|
|
||||||
|
/** 银行代码 */
|
||||||
|
private String bankCode;
|
||||||
|
|
||||||
|
/** 国家 */
|
||||||
|
private String bankCountry;
|
||||||
|
|
||||||
/** 客户ID */
|
/** 客户ID */
|
||||||
private String cusId;
|
private String cusId;
|
||||||
|
|
||||||
|
@ -63,14 +69,10 @@ public class Bank extends BaseEntity
|
||||||
{
|
{
|
||||||
return cusId;
|
return cusId;
|
||||||
}
|
}
|
||||||
|
public String getBankCode() { return bankCode; }
|
||||||
|
|
||||||
@Override
|
public void setBankCode(String bankCode) { this.bankCode = bankCode; }
|
||||||
public String toString() {
|
public String getBankCountry() { return bankCountry; }
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("bankId", getBankId())
|
public void setBankCountry(String bankCountry) { this.bankCountry = bankCountry; }
|
||||||
.append("bankName", getBankName())
|
|
||||||
.append("bankAccount", getBankAccount())
|
|
||||||
.append("cusId", getCusId())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
package com.ruoyi.customer.domain;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 银行代码对象 bankCode
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2024-03-25
|
||||||
|
*/
|
||||||
|
public class BankCode
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 银行ID */
|
||||||
|
private String bankCode;
|
||||||
|
|
||||||
|
/** 银行名称 */
|
||||||
|
private String bankName;
|
||||||
|
|
||||||
|
/** 国家 */
|
||||||
|
private String bankCountry;
|
||||||
|
|
||||||
|
public String getBankCode() {
|
||||||
|
return bankCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBankCode(String bankCode) {
|
||||||
|
this.bankCode = bankCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBankName() {
|
||||||
|
return bankName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBankName(String bankName) {
|
||||||
|
this.bankName = bankName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBankCountry() {
|
||||||
|
return bankCountry;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBankCountry(String bankCountry) {
|
||||||
|
this.bankCountry = bankCountry;
|
||||||
|
}
|
||||||
|
}
|
|
@ -319,6 +319,9 @@ public class Customer extends BaseEntity
|
||||||
private String cusDistributionChannel;
|
private String cusDistributionChannel;
|
||||||
private String cusSalesTerritory;
|
private String cusSalesTerritory;
|
||||||
private String cusSaleOffice;
|
private String cusSaleOffice;
|
||||||
|
private String cusCurrency;
|
||||||
|
private String cusTax;
|
||||||
|
private String cusReconciliationAccount;
|
||||||
|
|
||||||
public String getCusSalesOrganization() { return cusSalesOrganization; }
|
public String getCusSalesOrganization() { return cusSalesOrganization; }
|
||||||
|
|
||||||
|
@ -335,4 +338,16 @@ public class Customer extends BaseEntity
|
||||||
public String getCusSaleOffice() { return cusSaleOffice; }
|
public String getCusSaleOffice() { return cusSaleOffice; }
|
||||||
|
|
||||||
public void setCusSaleOffice(String cusSaleOffice) { this.cusSaleOffice = cusSaleOffice; }
|
public void setCusSaleOffice(String cusSaleOffice) { this.cusSaleOffice = cusSaleOffice; }
|
||||||
|
|
||||||
|
public String getCusCurrency() { return cusCurrency; }
|
||||||
|
|
||||||
|
public void setCusCurrency(String cusCurrency) { this.cusCurrency = cusCurrency; }
|
||||||
|
|
||||||
|
public String getCusTax() { return cusTax; }
|
||||||
|
|
||||||
|
public void setCusTax(String cusTax) { this.cusTax = cusTax; }
|
||||||
|
|
||||||
|
public String getCusReconciliationAccount() { return cusReconciliationAccount; }
|
||||||
|
|
||||||
|
public void setCusReconciliationAccount(String cusReconciliationAccount) { this.cusReconciliationAccount = cusReconciliationAccount; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="cusDistributionChannel" column="cus_distribution_channel" />
|
<result property="cusDistributionChannel" column="cus_distribution_channel" />
|
||||||
<result property="cusSalesTerritory" column="cus_sales_territory" />
|
<result property="cusSalesTerritory" column="cus_sales_territory" />
|
||||||
<result property="cusSaleOffice" column="cus_sale_office" />
|
<result property="cusSaleOffice" column="cus_sale_office" />
|
||||||
|
<result property="cusCurrency" column="cus_currency" />
|
||||||
|
<result property="cusTax" column="cus_tax" />
|
||||||
|
<result property="cusReconciliationAccount" column="cus_reconciliation_account" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="CustomerBankResult" type="Customer" extends="CustomerResult">
|
<resultMap id="CustomerBankResult" type="Customer" extends="CustomerResult">
|
||||||
|
@ -46,6 +49,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="bankId" column="sub_bank_id" />
|
<result property="bankId" column="sub_bank_id" />
|
||||||
<result property="bankName" column="sub_bank_name" />
|
<result property="bankName" column="sub_bank_name" />
|
||||||
<result property="bankAccount" column="sub_bank_account" />
|
<result property="bankAccount" column="sub_bank_account" />
|
||||||
|
<result property="bankCode" column="sub_bank_code" />
|
||||||
|
<result property="bankCountry" column="sub_bank_country" />
|
||||||
<result property="cusId" column="sub_cus_id" />
|
<result property="cusId" column="sub_cus_id" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
@ -59,7 +64,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
a.cus_classification, a.cus_receiving_email, a.cus_recipient, a.cus_recipient_phone, a.cus_remark,
|
a.cus_classification, a.cus_receiving_email, a.cus_recipient, a.cus_recipient_phone, a.cus_remark,
|
||||||
a.cus_state, a.cus_approval_status,a.create_time,u.nick_name create_name,
|
a.cus_state, a.cus_approval_status,a.create_time,u.nick_name create_name,
|
||||||
|
|
||||||
a.cus_sales_organization,a.cus_distribution_channel,a.cus_sales_territory,a.cus_sale_office
|
a.cus_sales_organization,a.cus_distribution_channel,a.cus_sales_territory,a.cus_sale_office,
|
||||||
|
a.cus_currency,a.cus_tax,a.cus_reconciliation_account
|
||||||
from customer a
|
from customer a
|
||||||
<include refid="customerJoins"/>
|
<include refid="customerJoins"/>
|
||||||
</sql>
|
</sql>
|
||||||
|
@ -82,8 +88,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
a.cus_group, a.cus_vat_no, a.cus_type, a.cus_country, a.cus_language, a.cus_label, a.cus_classification, a.cus_receiving_email,
|
a.cus_group, a.cus_vat_no, a.cus_type, a.cus_country, a.cus_language, a.cus_label, a.cus_classification, a.cus_receiving_email,
|
||||||
a.cus_recipient, a.cus_recipient_phone, a.cus_remark, a.cus_state, a.cus_approval_status,
|
a.cus_recipient, a.cus_recipient_phone, a.cus_remark, a.cus_state, a.cus_approval_status,
|
||||||
a.cus_sales_organization,a.cus_distribution_channel,a.cus_sales_territory,a.cus_sale_office,
|
a.cus_sales_organization,a.cus_distribution_channel,a.cus_sales_territory,a.cus_sale_office,
|
||||||
|
a.cus_currency,a.cus_tax,a.cus_reconciliation_account,
|
||||||
b.bank_id as sub_bank_id, b.bank_name as sub_bank_name, b.bank_account as sub_bank_account, b.cus_id as sub_cus_id
|
b.bank_id as sub_bank_id, b.bank_name as sub_bank_name, b.bank_account as sub_bank_account, b.cus_id as sub_cus_id,
|
||||||
|
b.bank_code as sub_bank_code,b.bank_country as sub_bank_country
|
||||||
from customer a
|
from customer a
|
||||||
left join bank b on b.cus_id = a.cus_id
|
left join bank b on b.cus_id = a.cus_id
|
||||||
where a.cus_id = #{cusId}
|
where a.cus_id = #{cusId}
|
||||||
|
@ -119,6 +126,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="cusDistributionChannel != null and cusDistributionChannel != ''">cus_distribution_channel,</if>
|
<if test="cusDistributionChannel != null and cusDistributionChannel != ''">cus_distribution_channel,</if>
|
||||||
<if test="cusSalesTerritory != null and cusSalesTerritory != ''">cus_sales_territory,</if>
|
<if test="cusSalesTerritory != null and cusSalesTerritory != ''">cus_sales_territory,</if>
|
||||||
<if test="cusSaleOffice != null and cusSaleOffice != ''">cus_sale_office,</if>
|
<if test="cusSaleOffice != null and cusSaleOffice != ''">cus_sale_office,</if>
|
||||||
|
<if test="cusCurrency != null and cusCurrency != ''">cus_currency,</if>
|
||||||
|
<if test="cusTax != null and cusTax != ''">cus_tax,</if>
|
||||||
|
<if test="cusReconciliationAccount != null and cusReconciliationAccount != ''">cus_reconciliation_account,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="cusId != null">#{cusId},</if>
|
<if test="cusId != null">#{cusId},</if>
|
||||||
|
@ -148,6 +158,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="cusDistributionChannel != null and cusDistributionChannel != ''">#{cusDistributionChannel},</if>
|
<if test="cusDistributionChannel != null and cusDistributionChannel != ''">#{cusDistributionChannel},</if>
|
||||||
<if test="cusSalesTerritory != null and cusSalesTerritory != ''">#{cusSalesTerritory},</if>
|
<if test="cusSalesTerritory != null and cusSalesTerritory != ''">#{cusSalesTerritory},</if>
|
||||||
<if test="cusSaleOffice != null and cusSaleOffice != ''">#{cusSaleOffice},</if>
|
<if test="cusSaleOffice != null and cusSaleOffice != ''">#{cusSaleOffice},</if>
|
||||||
|
<if test="cusCurrency != null and cusCurrency != ''">#{cusCurrency},</if>
|
||||||
|
<if test="cusTax != null and cusTax != ''">#{cusTax},</if>
|
||||||
|
<if test="cusReconciliationAccount != null and cusReconciliationAccount != ''">#{cusReconciliationAccount},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
@ -180,6 +193,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="cusDistributionChannel != null and cusDistributionChannel != ''">cus_distribution_channel = #{cusDistributionChannel},</if>
|
<if test="cusDistributionChannel != null and cusDistributionChannel != ''">cus_distribution_channel = #{cusDistributionChannel},</if>
|
||||||
<if test="cusSalesTerritory != null and cusSalesTerritory != ''">cus_sales_territory = #{cusSalesTerritory},</if>
|
<if test="cusSalesTerritory != null and cusSalesTerritory != ''">cus_sales_territory = #{cusSalesTerritory},</if>
|
||||||
<if test="cusSaleOffice != null and cusSaleOffice != ''">cus_sale_office = #{cusSaleOffice},</if>
|
<if test="cusSaleOffice != null and cusSaleOffice != ''">cus_sale_office = #{cusSaleOffice},</if>
|
||||||
|
<if test="cusCurrency != null and cusCurrency != ''">cus_currency = #{cusCurrency},</if>
|
||||||
|
<if test="cusTax != null and cusTax != ''">cus_tax = #{cusTax},</if>
|
||||||
|
<if test="cusReconciliationAccount != null and cusReconciliationAccount != ''">cus_reconciliation_account = #{cusReconciliationAccount},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where cus_id = #{cusId}
|
where cus_id = #{cusId}
|
||||||
</update>
|
</update>
|
||||||
|
@ -207,9 +223,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<insert id="batchBank">
|
<insert id="batchBank">
|
||||||
insert into bank(bank_id, bank_name, bank_account, cus_id) values
|
insert into bank(bank_id, bank_name, bank_account, cus_id,bank_code,bank_country) values
|
||||||
<foreach item="item" index="index" collection="list" separator=",">
|
<foreach item="item" index="index" collection="list" separator=",">
|
||||||
( #{item.bankId}, #{item.bankName}, #{item.bankAccount}, #{item.cusId})
|
( #{item.bankId}, #{item.bankName}, #{item.bankAccount}, #{item.cusId}, #{item.bankCode}, #{item.bankCountry})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -64,5 +64,31 @@ export function getSaleOffice(query) {
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 查询客户税分类数据
|
||||||
|
export function getTax(query) {
|
||||||
|
return request({
|
||||||
|
url: '/rfc/rfc/getTax',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询统驭科目数据
|
||||||
|
export function getReconciliationAccount(query) {
|
||||||
|
return request({
|
||||||
|
url: '/rfc/rfc/getReconciliationAccount',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询银行代码数据
|
||||||
|
export function bankCodeList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/rfc/rfc/bankCodeList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -170,14 +170,14 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="街道/门牌号" prop="cusStreet">
|
<el-form-item label="街道/门牌号" prop="cusStreet">
|
||||||
<el-input v-model="form.cusStreet" placeholder="请输入街道/门牌号" :disabled="isDis"/>
|
<el-input v-model="form.cusStreet" placeholder="请输入街道/门牌号" :disabled="isDisSalesman"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="8">
|
<el-row :gutter="8">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="街道" prop="cusQccStreet">
|
<el-form-item label="街道" prop="cusQccStreet">
|
||||||
<el-input v-model="form.cusQccStreet" placeholder="企查查带出" :disabled="isDis"/>
|
<el-input v-model="form.cusQccStreet" placeholder="企查查带出" :disabled="isDisSalesman"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
@ -189,12 +189,12 @@
|
||||||
<el-row :gutter="8">
|
<el-row :gutter="8">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="电话号码" prop="cusPhoneNumber">
|
<el-form-item label="电话号码" prop="cusPhoneNumber">
|
||||||
<el-input v-model="form.cusPhoneNumber" placeholder="请输入电话号码" :disabled="isDis"/>
|
<el-input v-model="form.cusPhoneNumber" placeholder="请输入电话号码" :disabled="isDisSalesman"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="客户组类别" prop="cusGroup">
|
<el-form-item label="客户组类别" prop="cusGroup">
|
||||||
<el-select v-model="form.cusGroup" placeholder="请选择客户组类别" style="width: 100%;" :disabled="isDis">
|
<el-select v-model="form.cusGroup" placeholder="请选择客户组类别" style="width: 100%;" :disabled="isDisSalesman">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.cus_group"
|
v-for="dict in dict.type.cus_group"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
|
@ -206,7 +206,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="客户类型" prop="cusType">
|
<el-form-item label="客户类型" prop="cusType">
|
||||||
<el-select v-model="form.cusType" placeholder="请选择客户类型" style="width: 100%;" :disabled="isDis">
|
<el-select v-model="form.cusType" placeholder="请选择客户类型" style="width: 100%;" :disabled="isDisSalesman">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.cus_type"
|
v-for="dict in dict.type.cus_type"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
|
@ -220,7 +220,7 @@
|
||||||
<el-row :gutter="8">
|
<el-row :gutter="8">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="国家" prop="cusCountry">
|
<el-form-item label="国家" prop="cusCountry">
|
||||||
<el-select v-model="form.cusCountry" placeholder="请选择国家" style="width: 100%;" :disabled="isDis">
|
<el-select v-model="form.cusCountry" placeholder="请选择国家" style="width: 100%;" :disabled="isDisSalesman">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in countrysDicts"
|
v-for="item in countrysDicts"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
|
@ -232,7 +232,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="语言" prop="cusLanguage">
|
<el-form-item label="语言" prop="cusLanguage">
|
||||||
<el-select v-model="form.cusLanguage" placeholder="请选择语言" style="width: 100%;" :disabled="isDis">
|
<el-select v-model="form.cusLanguage" placeholder="请选择语言" style="width: 100%;" :disabled="isDisSalesman">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in languageDicts"
|
v-for="item in languageDicts"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
|
@ -248,36 +248,36 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="客户标签" prop="cusLabel">
|
<el-form-item label="客户标签" prop="cusLabel">
|
||||||
<el-input v-model="form.cusLabel" placeholder="请输入客户标签" :disabled="isDis"/>
|
<el-input v-model="form.cusLabel" placeholder="请输入客户标签" :disabled="isDisSalesman"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="客户分类" prop="cusClassification">
|
<el-form-item label="客户分类" prop="cusClassification">
|
||||||
<el-input v-model="form.cusClassification" placeholder="请输入客户分类" :disabled="isDis"/>
|
<el-input v-model="form.cusClassification" placeholder="请输入客户分类" :disabled="isDisSalesman"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="8">
|
<el-row :gutter="8">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="电子发票邮箱" prop="cusReceivingEmail">
|
<el-form-item label="电子发票邮箱" prop="cusReceivingEmail">
|
||||||
<el-input v-model="form.cusReceivingEmail" placeholder="请输入电子发票接收邮箱" :disabled="isDis"/>
|
<el-input v-model="form.cusReceivingEmail" placeholder="请输入电子发票接收邮箱" :disabled="isDisSalesman"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="收件人" prop="cusRecipient">
|
<el-form-item label="收件人" prop="cusRecipient">
|
||||||
<el-input v-model="form.cusRecipient" placeholder="请输入收件人" :disabled="isDis"/>
|
<el-input v-model="form.cusRecipient" placeholder="请输入收件人" :disabled="isDisSalesman"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="收件人电话" prop="cusRecipientPhone">
|
<el-form-item label="收件人电话" prop="cusRecipientPhone">
|
||||||
<el-input v-model="form.cusRecipientPhone" placeholder="请输入收件人电话" :disabled="isDis"/>
|
<el-input v-model="form.cusRecipientPhone" placeholder="请输入收件人电话" :disabled="isDisSalesman"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>-->
|
</el-row>-->
|
||||||
<el-row :gutter="8">
|
<el-row :gutter="8">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="备注" prop="cusRemark">
|
<el-form-item label="备注" prop="cusRemark">
|
||||||
<el-input type="textarea" autosize v-model="form.cusRemark" placeholder="请输入备注" :disabled="isDis"/>
|
<el-input type="textarea" autosize v-model="form.cusRemark" placeholder="请输入备注" :disabled="isDisSalesman"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -286,18 +286,30 @@
|
||||||
<el-row class="mb8" :gutter="8">
|
<el-row class="mb8" :gutter="8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<div v-hasPermi="['customer:customer:bankAdd']">
|
<div v-hasPermi="['customer:customer:bankAdd']">
|
||||||
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddBank" v-if="buttonShow">添加</el-button>
|
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddBank" v-if="buttonShowSalesman">添加</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<div v-hasPermi="['customer:customer:bankDel']">
|
<div v-hasPermi="['customer:customer:bankDel']">
|
||||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteBank" v-if="buttonShow">删除</el-button>
|
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteBank" v-if="buttonShowSalesman">删除</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table :data="bankList" :row-class-name="rowBankIndex" @selection-change="handleBankSelectionChange" ref="bank">
|
<el-table :data="bankList" @selection-change="handleBankSelectionChange" ref="bank">
|
||||||
<el-table-column type="selection" width="50" align="center" />
|
<el-table-column type="selection" width="50" align="center" />
|
||||||
<el-table-column label="序号" align="center" prop="index" width="50"/>
|
<el-table-column label="序号" align="center" prop="index" width="50"/>
|
||||||
|
<el-table-column label="国家" prop="bankCountry">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model="scope.row.bankCountry" placeholder="选择银行代码自动带出" :disabled="true"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="银行代码" prop="bankCode">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model="scope.row.bankCode" placeholder="请输入银行代码">
|
||||||
|
<i 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">
|
<el-table-column label="银行名称" prop="bankName">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.bankName" placeholder="请输入银行名称" />
|
<el-input v-model="scope.row.bankName" placeholder="请输入银行名称" />
|
||||||
|
@ -310,35 +322,11 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="维护信息" name="checkInfo">
|
<el-tab-pane label="销售数据" name="checkInfo" v-if="checkRole(['ITZX_SJZ'])">
|
||||||
<el-row :gutter="8">
|
<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="isDis">
|
|
||||||
<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="isDis">
|
|
||||||
<el-option
|
|
||||||
v-for="item in languageDicts"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="付款条件" prop="cusPaymentTerms">
|
<el-form-item label="付款条件" prop="cusPaymentTerms">
|
||||||
<el-select v-model="form.cusPaymentTerms" placeholder="请选择付款条件" style="width: 100%;" :disabled="isDis">
|
<el-select v-model="form.cusPaymentTerms" placeholder="请选择付款条件" style="width: 100%;" :disabled="isDisSjz">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in paymentTermsDicts"
|
v-for="item in paymentTermsDicts"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
|
@ -347,11 +335,9 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="8">
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="行业代码" prop="cusIndustryCode">
|
<el-form-item label="行业代码" prop="cusIndustryCode">
|
||||||
<el-select v-model="form.cusIndustryCode" placeholder="请选择行业代码" style="width: 100%;" :disabled="isDis">
|
<el-select v-model="form.cusIndustryCode" placeholder="请选择行业代码" style="width: 100%;" :disabled="isDisSjz">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in industryCodeDicts"
|
v-for="item in industryCodeDicts"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
|
@ -361,9 +347,23 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</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-col :span="8">
|
||||||
<el-form-item label="销售组织" prop="cusSalesOrganization">
|
<el-form-item label="销售组织" prop="cusSalesOrganization">
|
||||||
<el-select v-model="form.cusSalesOrganization" placeholder="请选择销售组织" style="width: 100%;" :disabled="isDis">
|
<el-select v-model="form.cusSalesOrganization" placeholder="请选择销售组织" style="width: 100%;" :disabled="isDisSjz">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in salesOrganizationDicts"
|
v-for="item in salesOrganizationDicts"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
|
@ -375,7 +375,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="分销渠道" prop="cusDistributionChannel">
|
<el-form-item label="分销渠道" prop="cusDistributionChannel">
|
||||||
<el-select v-model="form.cusDistributionChannel" placeholder="请选择分销渠道" style="width: 100%;" :disabled="isDis">
|
<el-select v-model="form.cusDistributionChannel" placeholder="请选择分销渠道" style="width: 100%;" :disabled="isDisSjz">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in distributionChannelDicts"
|
v-for="item in distributionChannelDicts"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
|
@ -385,13 +385,37 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</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>
|
||||||
<el-row :gutter="8">
|
<el-row :gutter="8">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="销售地区" prop="cusSalesTerritory">
|
<el-form-item label="币种" prop="cusCurrency">
|
||||||
<el-select v-model="form.cusSalesTerritory" placeholder="请选择销售地区" style="width: 100%;" :disabled="isDis">
|
<el-select v-model="form.cusCurrency" placeholder="请选择币种" style="width: 100%;" :disabled="isDisSjz">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in salesTerritoryDicts"
|
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"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
|
@ -400,10 +424,10 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="销售办公室" prop="cusSaleOffice">
|
<el-form-item label="统驭科目" prop="cusReconciliationAccount">
|
||||||
<el-select v-model="form.cusSaleOffice" placeholder="请选择销售办公室" style="width: 100%;" :disabled="isDis">
|
<el-select v-model="form.cusReconciliationAccount" placeholder="请选择统驭科目" style="width: 100%;" :disabled="isDisSjz">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in saleOfficeDicts"
|
v-for="item in reconciliationAccountDicts"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
|
@ -417,10 +441,13 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<span v-hasPermi="['customer:customer:save']">
|
<span v-hasPermi="['customer:customer:save']">
|
||||||
<el-button @click="saveForm" v-if="buttonShow">保 存</el-button>
|
<el-button @click="saveForm" v-if="buttonShowSalesman">保 存</el-button>
|
||||||
</span>
|
</span>
|
||||||
<span style="margin-left: 10px" v-hasPermi="['customer:customer:commit']">
|
<span style="margin-left: 10px" v-hasPermi="['customer:customer:commit']">
|
||||||
<el-button type="primary" plain @click="commitForm" v-if="buttonShow">提 交</el-button>
|
<el-button type="primary" plain @click="commitForm" v-if="buttonShowSalesman">提 交</el-button>
|
||||||
|
</span>
|
||||||
|
<span style="margin-left: 10px" v-hasPermi="['customer:customer:commitSAP']">
|
||||||
|
<el-button type="primary" plain @click="commitSAPForm" v-if="buttonShowSjz">提 交OA</el-button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -460,6 +487,40 @@
|
||||||
<el-button @click="qccCancel">取 消</el-button>
|
<el-button @click="qccCancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 银行代码 查询 对话框 -->
|
||||||
|
<el-dialog :title="bankCodeTitle" :visible.sync="bankCodeOpen" width="800px" :show-close="false" append-to-body>
|
||||||
|
<el-form :model="queryBankCodeParams" ref="queryBankCodeForm" size="small" :inline="true" label-width="100px">
|
||||||
|
<el-form-item label="银行名称" prop="Name">
|
||||||
|
<el-input
|
||||||
|
v-model="queryBankCodeParams.bankName"
|
||||||
|
placeholder="请输入银行名称"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleBankCodeQuery">搜索</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-table v-loading="bankCodeLoading" ref="bankCodeTable" :data="bankCodePagedData" @selection-change="handleSelectionBankCodeChange" height="300">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="银行代码" align="center" prop="bankCode" width="120"/>
|
||||||
|
<el-table-column label="银行名称" align="center" prop="bankName" />
|
||||||
|
<el-table-column label="国家" align="center" prop="bankCountry" width="120"/>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="bankCodeTotal>0"
|
||||||
|
:total="bankCodeTotal"
|
||||||
|
:page.sync="bankCodeCurrentPage"
|
||||||
|
:limit.sync="bankCodePageSize"
|
||||||
|
@size-change="handleBankCodeSizeChange"
|
||||||
|
@current-change="handleBankCodeCurrentChange"
|
||||||
|
/>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="bankCodeConfirm" :disabled="bankCodeSingle">确 定</el-button>
|
||||||
|
<el-button @click="bankCodeCancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<style>
|
<style>
|
||||||
|
@ -475,11 +536,60 @@
|
||||||
<script>
|
<script>
|
||||||
import { listCustomer, getCustomer, delCustomer, addCustomer, updateCustomer, commitCustomer, qccListCustomer } from "@/api/customer/customer";
|
import { listCustomer, getCustomer, delCustomer, addCustomer, updateCustomer, commitCustomer, qccListCustomer } from "@/api/customer/customer";
|
||||||
import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
|
import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
|
||||||
import { getCountrys,getIndustryCode,getLanguage,getPaymentTerms,getSalesOrganization,getDistributionChannel,getSalesTerritory,getSaleOffice } from "@/api/common/sapRfc";// sap-rfc 函数
|
import { bankCodeList,getCountrys,getIndustryCode,getLanguage,getPaymentTerms,getSalesOrganization,getDistributionChannel,getSalesTerritory,getSaleOffice,getTax,getReconciliationAccount } from "@/api/common/sapRfc";// sap-rfc 函数
|
||||||
|
|
||||||
|
// 自定义校验-付款条件
|
||||||
|
const validateCusPaymentTerms = (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
callback(new Error("付款条件不能为空"));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// 自定义校验-行业代码
|
||||||
|
const validateCusIndustryCode = (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
callback(new Error("行业代码不能为空"));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// 自定义校验-销售地区
|
||||||
|
const validateCusSalesTerritory = (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
callback(new Error("销售地区不能为空"));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// 自定义校验-销售办公室
|
||||||
|
const validateCusSaleOffice = (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
callback(new Error("销售办公室不能为空"));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// 自定义校验-客户税分类
|
||||||
|
const validateCusTax = (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
callback(new Error("客户税分类不能为空"));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// 自定义校验-统驭科目
|
||||||
|
const validateCusReconciliationAccount = (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
callback(new Error("统驭科目不能为空"));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Customer",
|
name: "Customer",
|
||||||
dicts: ['cus_group', 'cus_approval_status', 'cus_type', 'common_state'],
|
dicts: ['cus_currency','cus_group','cus_approval_status', 'cus_type', 'common_state'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
//选项卡默认
|
//选项卡默认
|
||||||
|
@ -527,15 +637,9 @@ export default {
|
||||||
cusStreet: [
|
cusStreet: [
|
||||||
{ required: true, message: "街道/门牌号不能为空", trigger: "blur" }
|
{ required: true, message: "街道/门牌号不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
cusPaymentTerms: [
|
|
||||||
{ required: true, message: "付款条件不能为空", trigger: "change" }
|
|
||||||
],
|
|
||||||
cusPhoneNumber: [
|
cusPhoneNumber: [
|
||||||
{ required: true, message: "电话号码不能为空", trigger: "blur" }
|
{ required: true, message: "电话号码不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
cusIndustryCode: [
|
|
||||||
{ required: true, message: "行业代码不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
cusGroup: [
|
cusGroup: [
|
||||||
{ required: true, message: "客户组类别不能为空", trigger: "change" }
|
{ required: true, message: "客户组类别不能为空", trigger: "change" }
|
||||||
],
|
],
|
||||||
|
@ -548,6 +652,14 @@ export default {
|
||||||
cusLanguage: [
|
cusLanguage: [
|
||||||
{ required: true, message: "语言不能为空", trigger: "change" }
|
{ required: true, message: "语言不能为空", trigger: "change" }
|
||||||
],
|
],
|
||||||
|
|
||||||
|
// 数据组表单填写校验
|
||||||
|
cusPaymentTerms: [
|
||||||
|
{ required: true,trigger: "change", validator: validateCusPaymentTerms}
|
||||||
|
],
|
||||||
|
cusIndustryCode: [
|
||||||
|
{ required: true, trigger: "blur", validator: validateCusIndustryCode }
|
||||||
|
],
|
||||||
cusSalesOrganization: [
|
cusSalesOrganization: [
|
||||||
{ required: true, message: "销售组织不能为空", trigger: "blur"}
|
{ required: true, message: "销售组织不能为空", trigger: "blur"}
|
||||||
],
|
],
|
||||||
|
@ -555,16 +667,32 @@ export default {
|
||||||
{ required: true, message: "分销渠道不能为空", trigger: "blur" }
|
{ required: true, message: "分销渠道不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
cusSalesTerritory: [
|
cusSalesTerritory: [
|
||||||
{ required: true, message: "销售地区不能为空", trigger: "blur" }
|
{ required: true, trigger: "blur", validator: validateCusSalesTerritory }
|
||||||
],
|
],
|
||||||
cusSaleOffice: [
|
cusSaleOffice: [
|
||||||
{ required: true, message: "销售办公室不能为空", trigger: "blur" }
|
{ required: true, trigger: "blur", validator: validateCusSaleOffice }
|
||||||
],
|
],
|
||||||
|
cusCurrency: [
|
||||||
|
{ required: true, message: "币种不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
cusTax: [
|
||||||
|
{ required: true, trigger: "blur", validator: validateCusTax }
|
||||||
|
],
|
||||||
|
cusReconciliationAccount: [
|
||||||
|
{ required: true, trigger: "blur", validator: validateCusReconciliationAccount }
|
||||||
|
],
|
||||||
|
|
||||||
},
|
},
|
||||||
// 保存\提交,明细添加、删除 按钮显示
|
// 保存\提交,明细添加、删除 按钮显示 - 业务员
|
||||||
buttonShow: true,
|
buttonShowSalesman: true,
|
||||||
// 审批中 设置禁用
|
|
||||||
isDis: false,
|
// 提交OA 按钮显示 - 数据组
|
||||||
|
buttonShowSjz: true,
|
||||||
|
|
||||||
|
// 审批中 设置禁用 - 业务员
|
||||||
|
isDisSalesman: false,
|
||||||
|
// 审批中 设置禁用 - 数据组
|
||||||
|
isDisSjz: false,
|
||||||
|
|
||||||
/*****************************企查查查询模块*************************************/
|
/*****************************企查查查询模块*************************************/
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
|
@ -588,6 +716,29 @@ export default {
|
||||||
Name: null
|
Name: null
|
||||||
},
|
},
|
||||||
/*****************************企查查查询模块*************************************/
|
/*****************************企查查查询模块*************************************/
|
||||||
|
/*****************************银行代码查询模块*************************************/
|
||||||
|
// 遮罩层
|
||||||
|
bankCodeLoading: false,
|
||||||
|
// 弹出层标题
|
||||||
|
bankCodeTitle: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
bankCodeOpen: false,
|
||||||
|
|
||||||
|
// 银行代码表格数据
|
||||||
|
bankSelectedIndex: "",
|
||||||
|
bankCodeTotal: 0,
|
||||||
|
bankCodeCurrentPage: 1,
|
||||||
|
bankCodePageSize: 10,
|
||||||
|
bankCodeList: [], // 银行代码数据
|
||||||
|
|
||||||
|
// 非单个禁用
|
||||||
|
bankCodeSingle: true,
|
||||||
|
// 非多个禁用
|
||||||
|
bankCodeMultiple: true,
|
||||||
|
queryBankCodeParams:{
|
||||||
|
bankName: null
|
||||||
|
},
|
||||||
|
/*****************************银行代码查询模块*************************************/
|
||||||
/*****************************SAP-RFC查询模块*************************************/
|
/*****************************SAP-RFC查询模块*************************************/
|
||||||
countrysDicts: [], // 国家数据列表
|
countrysDicts: [], // 国家数据列表
|
||||||
industryCodeDicts: [], // 行业代码数据列表
|
industryCodeDicts: [], // 行业代码数据列表
|
||||||
|
@ -597,11 +748,17 @@ export default {
|
||||||
distributionChannelDicts: [], // 分销渠道数据列表
|
distributionChannelDicts: [], // 分销渠道数据列表
|
||||||
salesTerritoryDicts: [], // 销售地区数据列表
|
salesTerritoryDicts: [], // 销售地区数据列表
|
||||||
saleOfficeDicts: [], // 销售办公室数据列表
|
saleOfficeDicts: [], // 销售办公室数据列表
|
||||||
|
taxDicts: [], // 客户税分类数据列表
|
||||||
|
reconciliationAccountDicts: [], // 统驭科目数据列表
|
||||||
/*****************************SAP-RFC查询模块*************************************/
|
/*****************************SAP-RFC查询模块*************************************/
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
const roles = this.$store.state.user.roles;
|
||||||
|
if(roles && roles.indexOf('ITZX_SJZ') !== -1 && roles.indexOf('admin') == -1 ){//数据组默认查看审批中 单据
|
||||||
|
this.queryParams.cusApprovalStatus = '1';
|
||||||
|
}
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -682,8 +839,12 @@ export default {
|
||||||
this.setInitF();
|
this.setInitF();
|
||||||
|
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.buttonShow = this.form.cusApprovalStatus == '0'?true:false;
|
this.buttonShowSalesman = this.form.cusApprovalStatus == '0'?true:false;
|
||||||
this.isDis = this.form.cusApprovalStatus == '0'?false:true;
|
this.isDisSalesman = this.form.cusApprovalStatus == '0'?false:true;
|
||||||
|
|
||||||
|
this.buttonShowSjz = this.form.cusApprovalStatus != '0'?true:false;
|
||||||
|
this.isDisSjz = this.form.cusApprovalStatus != '0'?true:false;
|
||||||
|
|
||||||
this.bankList = response.data.bankList;
|
this.bankList = response.data.bankList;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改客户信息";
|
this.title = "修改客户信息";
|
||||||
|
@ -732,14 +893,12 @@ export default {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
|
||||||
/** 银行序号 */
|
|
||||||
rowBankIndex({ row, rowIndex }) {
|
|
||||||
row.index = rowIndex + 1;
|
|
||||||
},
|
},
|
||||||
/** 银行添加按钮操作 */
|
/** 银行添加按钮操作 */
|
||||||
handleAddBank() {
|
handleAddBank() {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
|
obj.bankCountry = "";
|
||||||
|
obj.bankCode = "";
|
||||||
obj.bankName = "";
|
obj.bankName = "";
|
||||||
obj.bankAccount = "";
|
obj.bankAccount = "";
|
||||||
this.bankList.push(obj);
|
this.bankList.push(obj);
|
||||||
|
@ -756,6 +915,7 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 复选框选中数据 */
|
/** 复选框选中数据 */
|
||||||
handleBankSelectionChange(selection) {
|
handleBankSelectionChange(selection) {
|
||||||
this.checkedBank = selection.map(item => item.index)
|
this.checkedBank = selection.map(item => item.index)
|
||||||
|
@ -826,6 +986,77 @@ export default {
|
||||||
this.resetForm("queryQccForm");
|
this.resetForm("queryQccForm");
|
||||||
},
|
},
|
||||||
/*****************************企查查查询模块*************************************/
|
/*****************************企查查查询模块*************************************/
|
||||||
|
/*****************************银行代码查询模块*************************************/
|
||||||
|
/** 选择银行代码弹出框 */
|
||||||
|
handleSearchBankCode(scope) {
|
||||||
|
this.bankCodeOpen = true;
|
||||||
|
this.bankCodeTitle = "银行代码信息";
|
||||||
|
this.resetBankCodeQuery();
|
||||||
|
this.bankSelectedIndex = scope.$index;
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 切换每页显示条数 */
|
||||||
|
handleBankCodeSizeChange(val) {
|
||||||
|
this.bankCodePageSize = val;
|
||||||
|
this.bankCodeCurrentPage = 1;
|
||||||
|
},
|
||||||
|
/** 页码选择 */
|
||||||
|
handleBankCodeCurrentChange(val) {
|
||||||
|
this.bankCodeCurrentPage = val;
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 银行代码查询 */
|
||||||
|
handleBankCodeQuery(){
|
||||||
|
if(!this.queryBankCodeParams.bankName){
|
||||||
|
this.$message.warning("请输入银行名称!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.bankCodeLoading = true;
|
||||||
|
bankCodeList(this.queryBankCodeParams).then(response => {
|
||||||
|
this.bankCodeList = response.rows;
|
||||||
|
this.bankCodeTotal = response.total;
|
||||||
|
this.bankCodeCurrentPage = 1;
|
||||||
|
this.bankCodeLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionBankCodeChange(selection) {
|
||||||
|
this.bankCodeSingle = selection.length!==1
|
||||||
|
this.bankCodeMultiple = !selection.length
|
||||||
|
},
|
||||||
|
|
||||||
|
// 确认按钮
|
||||||
|
bankCodeConfirm(){
|
||||||
|
const bankCodeTable = this.$refs.bankCodeTable;
|
||||||
|
const selectedData = bankCodeTable.selection;
|
||||||
|
const bankCode = selectedData[0].bankCode;
|
||||||
|
const bankName = selectedData[0].bankName;
|
||||||
|
const bankCountry = selectedData[0].bankCountry;
|
||||||
|
|
||||||
|
// 获取指定行的数据
|
||||||
|
const bank = this.bankList[this.bankSelectedIndex];
|
||||||
|
|
||||||
|
bank.bankCode = bankCode;
|
||||||
|
bank.bankName = bankName;
|
||||||
|
bank.bankCountry = bankCountry;
|
||||||
|
this.bankCodeOpen = false;
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
bankCodeCancel() {
|
||||||
|
this.bankCodeOpen = false;
|
||||||
|
this.resetBankCodeQuery();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetBankCodeQuery() {
|
||||||
|
this.bankCodeList = [];
|
||||||
|
this.bankCodeTotal = 0;
|
||||||
|
this.queryBankCodeParams = {
|
||||||
|
bankName: ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/*****************************银行代码查询模块*************************************/
|
||||||
/*****************************SAP-RFC查询模块*************************************/
|
/*****************************SAP-RFC查询模块*************************************/
|
||||||
// 默认值设置
|
// 默认值设置
|
||||||
setInitV(){
|
setInitV(){
|
||||||
|
@ -834,9 +1065,10 @@ export default {
|
||||||
this.form.cusGroup = 'Z001';
|
this.form.cusGroup = 'Z001';
|
||||||
this.form.cusType = '0';
|
this.form.cusType = '0';
|
||||||
this.form.cusCountry = 'CN';
|
this.form.cusCountry = 'CN';
|
||||||
this.form.cusLanguage = 'ZH';
|
this.form.cusLanguage = '1';
|
||||||
this.form.cusSalesOrganization = '1100';
|
this.form.cusSalesOrganization = '1100';
|
||||||
this.form.cusDistributionChannel = '10';
|
this.form.cusDistributionChannel = '10';
|
||||||
|
this.form.cusCurrency = 'CNY';
|
||||||
},
|
},
|
||||||
// 加载SAP公共数据
|
// 加载SAP公共数据
|
||||||
setInitF(){
|
setInitF(){
|
||||||
|
@ -850,6 +1082,8 @@ export default {
|
||||||
this.getDistributionChannel();
|
this.getDistributionChannel();
|
||||||
this.getSalesTerritory();
|
this.getSalesTerritory();
|
||||||
this.getSaleOffice();
|
this.getSaleOffice();
|
||||||
|
this.getTax();
|
||||||
|
this.getReconciliationAccount();
|
||||||
},
|
},
|
||||||
//SAP国家数据列表
|
//SAP国家数据列表
|
||||||
getCountrys(){
|
getCountrys(){
|
||||||
|
@ -899,15 +1133,27 @@ export default {
|
||||||
this.saleOfficeDicts = response.saleOfficeDicts;
|
this.saleOfficeDicts = response.saleOfficeDicts;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//客户税分类数据列表
|
||||||
|
getTax(){
|
||||||
|
getTax(this.queryParams).then(response => {
|
||||||
|
this.taxDicts = response.taxDicts;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//客户税分类数据列表
|
||||||
|
getReconciliationAccount(){
|
||||||
|
getReconciliationAccount(this.queryParams).then(response => {
|
||||||
|
this.reconciliationAccountDicts = response.reconciliationAccountDicts;
|
||||||
|
});
|
||||||
|
},
|
||||||
/*****************************SAP-RFC查询模块*************************************/
|
/*****************************SAP-RFC查询模块*************************************/
|
||||||
},
|
},
|
||||||
/* computed: {
|
computed: {
|
||||||
// 计算出当前页的企查查客户数据列表
|
// 计算出当前页的银行代码数据列表
|
||||||
qccPagedData() {
|
bankCodePagedData() {
|
||||||
const startIndex = (this.qccCurrentPage - 1) * this.qccPageSize;
|
const startIndex = (this.bankCodeCurrentPage - 1) * this.bankCodePageSize;
|
||||||
const endIndex = startIndex + this.qccPageSize;
|
const endIndex = startIndex + this.bankCodePageSize;
|
||||||
return this.qccCustomerList.slice(startIndex, endIndex);
|
return this.bankCodeList.slice(startIndex, endIndex);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},*/
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -822,6 +822,10 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
const roles = this.$store.state.user.roles;
|
||||||
|
if(roles && roles.indexOf('QUOT') !== -1 && roles.indexOf('admin') == -1 ){//报价组默认查看待审核 单据
|
||||||
|
this.queryParams.quotApprovalStatus = '1';
|
||||||
|
}
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
Loading…
Reference in New Issue