'123'
This commit is contained in:
parent
9381577c87
commit
eee1ae46ab
|
@ -1,5 +1,5 @@
|
||||||
#for tests only !
|
#for tests only !
|
||||||
#Fri May 24 13:35:10 CST 2024
|
#Mon May 27 16:27:32 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.120
|
jco.client.ashost=172.19.0.120
|
||||||
|
@ -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=u?K-{MKso0NR;1AE/+Y9s/7g^0`/0Uo7Mk{RY=Aw!O|5bcY$
|
jco.client.passwd=654321
|
||||||
jco.client.client=300
|
jco.client.client=300
|
||||||
|
|
|
@ -284,6 +284,27 @@ public class SapRfcController
|
||||||
return ajax;
|
return ajax;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取账户分配组
|
||||||
|
* @param customer
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('customer:customer:list')")
|
||||||
|
@GetMapping("/getAccountAllocationGroup")
|
||||||
|
public AjaxResult getAccountAllocationGroup(Customer customer)
|
||||||
|
{
|
||||||
|
AjaxResult ajax = AjaxResult.success();
|
||||||
|
|
||||||
|
List<RfcResult> resCache = redisCache.getCacheObject(getSapCacheKey("accountAllocationGroup"));
|
||||||
|
if(CollectionUtils.isEmpty(resCache)){
|
||||||
|
resCache = SapRfcUtils.getAccountAllocationGroup(null);
|
||||||
|
redisCache.setCacheObject(getSapCacheKey("accountAllocationGroup"),resCache);
|
||||||
|
}
|
||||||
|
log.info("获取账户分配组数据条数 - {}", resCache.size());
|
||||||
|
ajax.put("accountAllocationGroupDicts", resCache);
|
||||||
|
return ajax;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取redis SAP公共数据
|
* 获取redis SAP公共数据
|
||||||
* @param type
|
* @param type
|
||||||
|
|
|
@ -11,7 +11,9 @@ import com.ruoyi.common.core.domain.model.LoginUser;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.utils.uuid.UUID;
|
import com.ruoyi.common.utils.uuid.UUID;
|
||||||
import com.ruoyi.customer.domain.RfcResult;
|
import com.ruoyi.customer.domain.RfcResult;
|
||||||
|
import com.ruoyi.customer.domain.qcc.ECIIndustryVerify;
|
||||||
import com.ruoyi.customer.domain.qcc.FuzzySearch;
|
import com.ruoyi.customer.domain.qcc.FuzzySearch;
|
||||||
|
import com.ruoyi.customer.domain.qcc.QccECIIndustryVerifyJsonResult;
|
||||||
import com.ruoyi.customer.domain.qcc.QccFuzzySearchJsonResult;
|
import com.ruoyi.customer.domain.qcc.QccFuzzySearchJsonResult;
|
||||||
import com.ruoyi.quot.domain.Quot;
|
import com.ruoyi.quot.domain.Quot;
|
||||||
import com.ruoyi.system.domain.SysNotice;
|
import com.ruoyi.system.domain.SysNotice;
|
||||||
|
@ -63,6 +65,10 @@ public class CustomerController extends BaseController
|
||||||
@Value("${qichacha.serviceName}")
|
@Value("${qichacha.serviceName}")
|
||||||
private String Qcc_serviceName;
|
private String Qcc_serviceName;
|
||||||
|
|
||||||
|
// 接口请求地址
|
||||||
|
@Value("${qichacha.serviceNameGetInfo}")
|
||||||
|
private String Qcc_serviceName_GetInfo;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICustomerService customerService;
|
private ICustomerService customerService;
|
||||||
|
|
||||||
|
@ -174,10 +180,14 @@ public class CustomerController extends BaseController
|
||||||
@PostMapping("/returnCustomer")
|
@PostMapping("/returnCustomer")
|
||||||
public AjaxResult returnCustomer(@RequestBody Customer customer)
|
public AjaxResult returnCustomer(@RequestBody Customer customer)
|
||||||
{
|
{
|
||||||
|
if(!StringUtils.isEmpty(customer.getCusApprovalStatus())){
|
||||||
customer.setUpdateBy(getUsername());
|
customer.setUpdateBy(getUsername());
|
||||||
customer.setCusApprovalStatus("3");//客户提交 状态设置为 已驳回
|
customer.setCusApprovalStatus("3");//客户提交 状态设置为 已驳回
|
||||||
customerService.updateCustomer(customer);
|
customerService.updateCustomer(customer);
|
||||||
return success();
|
return success();
|
||||||
|
}else{
|
||||||
|
return error("单据ID为空,无法操作");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -188,10 +198,17 @@ public class CustomerController extends BaseController
|
||||||
@PostMapping("/commitSAPCustomer")
|
@PostMapping("/commitSAPCustomer")
|
||||||
public AjaxResult commitSAPCustomer(@RequestBody Customer customer)
|
public AjaxResult commitSAPCustomer(@RequestBody Customer customer)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if("1".equals(customer.getCusApprovalStatus())){// 数据组 提交业务员创建的客户数据提交SAP
|
||||||
customer.setUpdateBy(getUsername());
|
customer.setUpdateBy(getUsername());
|
||||||
customer.setCusApprovalStatus("2");//客户提交 状态设置为 已审核
|
customer.setCusApprovalStatus("2");//客户提交 状态设置为 已审核
|
||||||
|
}else if(StringUtils.isEmpty(customer.getCusApprovalStatus())){// 数据组创建的客户数据提交SAP
|
||||||
//TODO 提交校验 调用SAP rfc接口 更新客户凭证号
|
customer.setCusId(UUID.fastUUID().toString());
|
||||||
|
customer.setCusCode(IdUtils.createNo("KH_",2));
|
||||||
|
customer.setCreateBy(getUsername());
|
||||||
|
customer.setCusApprovalStatus("2");//客户提交 状态设置为 已审核
|
||||||
|
customerService.insertCustomer(customer);
|
||||||
|
}
|
||||||
RfcResult result = SapRfcUtils.sendSAP(customer);
|
RfcResult result = SapRfcUtils.sendSAP(customer);
|
||||||
String type = result.getType();
|
String type = result.getType();
|
||||||
if("S".equals(type)){
|
if("S".equals(type)){
|
||||||
|
@ -265,4 +282,35 @@ public class CustomerController extends BaseController
|
||||||
}
|
}
|
||||||
return getDataTable(result);
|
return getDataTable(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取企查查客户行业代码
|
||||||
|
@PreAuthorize("@ss.hasPermi('customer:customer:qcclist')")
|
||||||
|
@GetMapping("/getIndustryCodeQcc/{cusName}")
|
||||||
|
public AjaxResult getIndustryCodeQcc(@PathVariable String cusName)
|
||||||
|
{
|
||||||
|
AjaxResult result = new AjaxResult();
|
||||||
|
String cusIndustryCodeQcc = "";
|
||||||
|
String customerName = cusName;
|
||||||
|
String reqInterNme = Qcc_serviceName_GetInfo;
|
||||||
|
try {
|
||||||
|
if(!StringUtils.isEmpty(customerName)){
|
||||||
|
HttpHead reqHeader = new HttpHead();
|
||||||
|
String[] autherHeader = QiChaChaUtil.RandomAuthentHeader(Qcc_Key, Qcc_SecretKey);
|
||||||
|
reqHeader.setHeader("Token", autherHeader[0]);
|
||||||
|
reqHeader.setHeader("Timespan", autherHeader[1]);
|
||||||
|
String reqUri = reqInterNme.concat("?key=").concat(Qcc_Key).concat("&").concat("searchKey=").concat(customerName);
|
||||||
|
String tokenJson = HttpHelper.httpGet(reqUri, reqHeader.getAllHeaders());
|
||||||
|
System.out.println(String.format("==========================>this is response:{%s}", tokenJson));
|
||||||
|
QccECIIndustryVerifyJsonResult obj = JSON.parseObject(tokenJson, QccECIIndustryVerifyJsonResult.class);
|
||||||
|
ECIIndustryVerify eCIIndustryVerify = obj.getResult();
|
||||||
|
if("1".equals(eCIIndustryVerify.getVerifyResult())){
|
||||||
|
cusIndustryCodeQcc = eCIIndustryVerify.getData().getIndustry();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result.put("cusIndustryCodeQcc",cusIndustryCodeQcc);
|
||||||
|
} catch (Exception e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -363,6 +363,38 @@ public class SapRfcUtils {
|
||||||
return countrys;
|
return countrys;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取账户分配组
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static List<RfcResult> getAccountAllocationGroup(Object 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("FLAG39", StringUtils.isNotNull(param)?param:"X");//输入参数
|
||||||
|
function.execute(destination);
|
||||||
|
JCoTable table = function.getTableParameterList().getTable("T_TVKTT");
|
||||||
|
for(int i = 0; i<table.getNumRows(); i++){
|
||||||
|
table.setRow(i);
|
||||||
|
rfcResult = new RfcResult();
|
||||||
|
rfcResult.setValue(table.getString("KTGRD"));
|
||||||
|
rfcResult.setLabel(table.getString("VTEXT"));
|
||||||
|
countrys.add(rfcResult);
|
||||||
|
}
|
||||||
|
}catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return countrys;
|
||||||
|
}
|
||||||
|
|
||||||
/*=======================================查询SAP银行代码信息=================================================*/
|
/*=======================================查询SAP银行代码信息=================================================*/
|
||||||
/**
|
/**
|
||||||
* 获取银行代码数据
|
* 获取银行代码数据
|
||||||
|
@ -433,7 +465,7 @@ public class SapRfcUtils {
|
||||||
|
|
||||||
|
|
||||||
JCoStructure jCoStructure2 = input.getStructure("IS_SALES");
|
JCoStructure jCoStructure2 = input.getStructure("IS_SALES");
|
||||||
jCoStructure2.setValue("VKORG",customer.getCusSalesOrganization());//销售组织
|
jCoStructure2.setValue("VKORG","1100");//销售组织
|
||||||
jCoStructure2.setValue("VTWEG",customer.getCusDistributionChannel());//分销渠道
|
jCoStructure2.setValue("VTWEG",customer.getCusDistributionChannel());//分销渠道
|
||||||
jCoStructure2.setValue("SPART","00");//产品组
|
jCoStructure2.setValue("SPART","00");//产品组
|
||||||
jCoStructure2.setValue("BZIRK",customer.getCusSalesTerritory());//销售地区
|
jCoStructure2.setValue("BZIRK",customer.getCusSalesTerritory());//销售地区
|
||||||
|
@ -499,5 +531,4 @@ public class SapRfcUtils {
|
||||||
}
|
}
|
||||||
System.out.println(countrys.size());
|
System.out.println(countrys.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@ sapWebservice.psw: QAZ54321
|
||||||
qichacha.key: 824936f8e78c4f4788978da38b26d488
|
qichacha.key: 824936f8e78c4f4788978da38b26d488
|
||||||
qichacha.secretKey: 8B9EB102FD17E0CF2EDEC0FB507DEC1E
|
qichacha.secretKey: 8B9EB102FD17E0CF2EDEC0FB507DEC1E
|
||||||
qichacha.serviceName: https://api.qichacha.com/FuzzySearch/GetList
|
qichacha.serviceName: https://api.qichacha.com/FuzzySearch/GetList
|
||||||
|
qichacha.serviceNameGetInfo: https://api.qichacha.com/ECIIndustryVerify/GetInfo
|
||||||
|
|
||||||
# SAP-RFC函数
|
# SAP-RFC函数
|
||||||
sapRfc.ashost: 172.19.0.125 #服务器
|
sapRfc.ashost: 172.19.0.125 #服务器
|
||||||
|
|
|
@ -51,6 +51,9 @@ public class Customer extends BaseEntity
|
||||||
@Excel(name = "行业代码")
|
@Excel(name = "行业代码")
|
||||||
private String cusIndustryCode;
|
private String cusIndustryCode;
|
||||||
|
|
||||||
|
/** 企查查行业代码 */
|
||||||
|
private String cusIndustryCodeQcc;
|
||||||
|
|
||||||
/** 客户组类别 */
|
/** 客户组类别 */
|
||||||
@Excel(name = "客户组类别",dictType = "cus_group")
|
@Excel(name = "客户组类别",dictType = "cus_group")
|
||||||
private String cusGroup;
|
private String cusGroup;
|
||||||
|
@ -106,6 +109,10 @@ public class Customer extends BaseEntity
|
||||||
@Excel(name = "客户审批状态",dictType = "cus_approval_status")
|
@Excel(name = "客户审批状态",dictType = "cus_approval_status")
|
||||||
private String cusApprovalStatus;
|
private String cusApprovalStatus;
|
||||||
|
|
||||||
|
/** 客户审批状态 */
|
||||||
|
@Excel(name = "业务员")
|
||||||
|
private String cusSalesman;
|
||||||
|
|
||||||
/** 创建人 */
|
/** 创建人 */
|
||||||
@Excel(name = "创建人")
|
@Excel(name = "创建人")
|
||||||
private String createName;
|
private String createName;
|
||||||
|
@ -188,6 +195,9 @@ public class Customer extends BaseEntity
|
||||||
{
|
{
|
||||||
return cusIndustryCode;
|
return cusIndustryCode;
|
||||||
}
|
}
|
||||||
|
public String getCusIndustryCodeQcc() { return cusIndustryCodeQcc; }
|
||||||
|
|
||||||
|
public void setCusIndustryCodeQcc(String cusIndustryCodeQcc) { this.cusIndustryCodeQcc = cusIndustryCodeQcc; }
|
||||||
public void setCusGroup(String cusGroup)
|
public void setCusGroup(String cusGroup)
|
||||||
{
|
{
|
||||||
this.cusGroup = cusGroup;
|
this.cusGroup = cusGroup;
|
||||||
|
@ -308,7 +318,9 @@ public class Customer extends BaseEntity
|
||||||
{
|
{
|
||||||
return cusApprovalStatus;
|
return cusApprovalStatus;
|
||||||
}
|
}
|
||||||
|
public String getCusSalesman() { return cusSalesman; }
|
||||||
|
|
||||||
|
public void setCusSalesman(String cusSalesman) { this.cusSalesman = cusSalesman; }
|
||||||
public String getCreateName() {
|
public String getCreateName() {
|
||||||
return createName;
|
return createName;
|
||||||
}
|
}
|
||||||
|
@ -316,7 +328,6 @@ public class Customer extends BaseEntity
|
||||||
public void setCreateName(String createName) {
|
public void setCreateName(String createName) {
|
||||||
this.createName = createName;
|
this.createName = createName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Bank> getBankList()
|
public List<Bank> getBankList()
|
||||||
{
|
{
|
||||||
return bankList;
|
return bankList;
|
||||||
|
@ -335,6 +346,7 @@ public class Customer extends BaseEntity
|
||||||
private String cusCurrency;
|
private String cusCurrency;
|
||||||
private String cusTax;
|
private String cusTax;
|
||||||
private String cusReconciliationAccount;
|
private String cusReconciliationAccount;
|
||||||
|
private String cusAccountAllocationGroup;
|
||||||
|
|
||||||
public String getCusSalesOrganization() { return cusSalesOrganization; }
|
public String getCusSalesOrganization() { return cusSalesOrganization; }
|
||||||
|
|
||||||
|
@ -363,4 +375,8 @@ public class Customer extends BaseEntity
|
||||||
public String getCusReconciliationAccount() { return cusReconciliationAccount; }
|
public String getCusReconciliationAccount() { return cusReconciliationAccount; }
|
||||||
|
|
||||||
public void setCusReconciliationAccount(String cusReconciliationAccount) { this.cusReconciliationAccount = cusReconciliationAccount; }
|
public void setCusReconciliationAccount(String cusReconciliationAccount) { this.cusReconciliationAccount = cusReconciliationAccount; }
|
||||||
|
|
||||||
|
public String getCusAccountAllocationGroup() { return cusAccountAllocationGroup; }
|
||||||
|
|
||||||
|
public void setCusAccountAllocationGroup(String cusAccountAllocationGroup) { this.cusAccountAllocationGroup = cusAccountAllocationGroup; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.ruoyi.customer.domain.qcc;
|
||||||
|
|
||||||
|
public class ECIIndustryVerify {
|
||||||
|
private String VerifyResult;
|
||||||
|
private ResultData Data;
|
||||||
|
|
||||||
|
public String getVerifyResult() {
|
||||||
|
return VerifyResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVerifyResult(String verifyResult) {
|
||||||
|
VerifyResult = verifyResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultData getData() {
|
||||||
|
return Data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setData(ResultData data) {
|
||||||
|
Data = data;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.ruoyi.customer.domain.qcc;
|
||||||
|
|
||||||
|
public class QccECIIndustryVerifyJsonResult {
|
||||||
|
private String Status;
|
||||||
|
private ECIIndustryVerify Result;
|
||||||
|
|
||||||
|
public String getStatus() {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(String status) {
|
||||||
|
Status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ECIIndustryVerify getResult() {
|
||||||
|
return Result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResult(ECIIndustryVerify result) {
|
||||||
|
Result = result;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,76 @@
|
||||||
|
package com.ruoyi.customer.domain.qcc;
|
||||||
|
|
||||||
|
public class ResultData {
|
||||||
|
private String IndustryCode;
|
||||||
|
private String Industry;
|
||||||
|
private String SubIndustryCode;
|
||||||
|
private String SubIndustry;
|
||||||
|
private String MiddleCategoryCode;
|
||||||
|
private String MiddleCategory;
|
||||||
|
private String SmallCategoryCode;
|
||||||
|
private String SmallCategory;
|
||||||
|
|
||||||
|
public String getIndustryCode() {
|
||||||
|
return IndustryCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndustryCode(String industryCode) {
|
||||||
|
IndustryCode = industryCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIndustry() {
|
||||||
|
return Industry;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndustry(String industry) {
|
||||||
|
Industry = industry;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSubIndustryCode() {
|
||||||
|
return SubIndustryCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSubIndustryCode(String subIndustryCode) {
|
||||||
|
SubIndustryCode = subIndustryCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSubIndustry() {
|
||||||
|
return SubIndustry;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSubIndustry(String subIndustry) {
|
||||||
|
SubIndustry = subIndustry;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMiddleCategoryCode() {
|
||||||
|
return MiddleCategoryCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMiddleCategoryCode(String middleCategoryCode) {
|
||||||
|
MiddleCategoryCode = middleCategoryCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMiddleCategory() {
|
||||||
|
return MiddleCategory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMiddleCategory(String middleCategory) {
|
||||||
|
MiddleCategory = middleCategory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSmallCategoryCode() {
|
||||||
|
return SmallCategoryCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSmallCategoryCode(String smallCategoryCode) {
|
||||||
|
SmallCategoryCode = smallCategoryCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSmallCategory() {
|
||||||
|
return SmallCategory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSmallCategory(String smallCategory) {
|
||||||
|
SmallCategory = smallCategory;
|
||||||
|
}
|
||||||
|
}
|
|
@ -14,6 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="cusPaymentTerms" column="cus_payment_terms" />
|
<result property="cusPaymentTerms" column="cus_payment_terms" />
|
||||||
<result property="cusPhoneNumber" column="cus_phone_number" />
|
<result property="cusPhoneNumber" column="cus_phone_number" />
|
||||||
<result property="cusIndustryCode" column="cus_industry_code" />
|
<result property="cusIndustryCode" column="cus_industry_code" />
|
||||||
|
<result property="cusIndustryCodeQcc" column="cus_industry_code_qcc" />
|
||||||
<result property="cusGroup" column="cus_group" />
|
<result property="cusGroup" column="cus_group" />
|
||||||
<result property="cusVatNo" column="cus_vat_no" />
|
<result property="cusVatNo" column="cus_vat_no" />
|
||||||
<result property="cusType" column="cus_type" />
|
<result property="cusType" column="cus_type" />
|
||||||
|
@ -28,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="cusReturnRemark" column="cus_return_remark" />
|
<result property="cusReturnRemark" column="cus_return_remark" />
|
||||||
<result property="cusState" column="cus_state" />
|
<result property="cusState" column="cus_state" />
|
||||||
<result property="cusApprovalStatus" column="cus_approval_status" />
|
<result property="cusApprovalStatus" column="cus_approval_status" />
|
||||||
|
<result property="cusSalesman" column="cus_salesman" />
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by" />
|
||||||
<result property="createName" column="create_name" />
|
<result property="createName" column="create_name" />
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
|
@ -41,6 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="cusCurrency" column="cus_currency" />
|
<result property="cusCurrency" column="cus_currency" />
|
||||||
<result property="cusTax" column="cus_tax" />
|
<result property="cusTax" column="cus_tax" />
|
||||||
<result property="cusReconciliationAccount" column="cus_reconciliation_account" />
|
<result property="cusReconciliationAccount" column="cus_reconciliation_account" />
|
||||||
|
<result property="cusAccountAllocationGroup" column="cus_account_allocation_group" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="CustomerBankResult" type="Customer" extends="CustomerResult">
|
<resultMap id="CustomerBankResult" type="Customer" extends="CustomerResult">
|
||||||
|
@ -63,12 +66,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<sql id="selectCustomerVo">
|
<sql id="selectCustomerVo">
|
||||||
select a.cus_id, a.cus_code, a.cus_name, a.cus_sap_code, a.cus_street, a.cus_qcc_street,a.cus_payment_terms, a.cus_phone_number,
|
select a.cus_id, a.cus_code, a.cus_name, a.cus_sap_code, a.cus_street, a.cus_qcc_street,a.cus_payment_terms, a.cus_phone_number,
|
||||||
a.cus_industry_code, a.cus_group, a.cus_vat_no, a.cus_type, a.cus_country, a.cus_language, a.cus_label,
|
a.cus_industry_code, a.cus_industry_code_qcc, 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_return_remark,
|
a.cus_classification, a.cus_receiving_email, a.cus_recipient, a.cus_recipient_phone, a.cus_remark,a.cus_return_remark,
|
||||||
a.cus_state, a.cus_approval_status,a.create_time,u.nick_name create_name,
|
a.cus_state, a.cus_approval_status,a.cus_salesman,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
|
a.cus_currency,a.cus_tax,a.cus_reconciliation_account,a.cus_account_allocation_group
|
||||||
from customer a
|
from customer a
|
||||||
<include refid="customerJoins"/>
|
<include refid="customerJoins"/>
|
||||||
</sql>
|
</sql>
|
||||||
|
@ -84,14 +87,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<!-- 数据范围过滤 -->
|
<!-- 数据范围过滤 -->
|
||||||
${params.dataScope}
|
${params.dataScope}
|
||||||
</where>
|
</where>
|
||||||
|
order by a.update_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectCustomerByCusId" parameterType="java.lang.String" resultMap="CustomerBankResult">
|
<select id="selectCustomerByCusId" parameterType="java.lang.String" resultMap="CustomerBankResult">
|
||||||
select a.cus_id, a.cus_code, a.cus_name, a.cus_sap_code, a.cus_street,a.cus_qcc_street, a.cus_payment_terms, a.cus_phone_number, a.cus_industry_code,
|
select a.cus_id, a.cus_code, a.cus_name, a.cus_sap_code, a.cus_street,a.cus_qcc_street, a.cus_payment_terms, a.cus_phone_number, a.cus_industry_code,
|
||||||
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_industry_code_qcc,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_return_remark, a.cus_state, a.cus_approval_status,
|
a.cus_recipient, a.cus_recipient_phone, a.cus_remark,a.cus_return_remark, a.cus_state, a.cus_approval_status,a.cus_salesman,
|
||||||
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,
|
a.cus_currency,a.cus_tax,a.cus_reconciliation_account,a.cus_account_allocation_group,
|
||||||
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
|
b.bank_code as sub_bank_code,b.bank_country as sub_bank_country
|
||||||
from customer a
|
from customer a
|
||||||
|
@ -111,6 +115,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="cusPaymentTerms != null and cusPaymentTerms != ''">cus_payment_terms,</if>
|
<if test="cusPaymentTerms != null and cusPaymentTerms != ''">cus_payment_terms,</if>
|
||||||
<if test="cusPhoneNumber != null and cusPhoneNumber != ''">cus_phone_number,</if>
|
<if test="cusPhoneNumber != null and cusPhoneNumber != ''">cus_phone_number,</if>
|
||||||
<if test="cusIndustryCode != null and cusIndustryCode != ''">cus_industry_code,</if>
|
<if test="cusIndustryCode != null and cusIndustryCode != ''">cus_industry_code,</if>
|
||||||
|
<if test="cusIndustryCodeQcc != null and cusIndustryCodeQcc != ''">cus_industry_code_qcc,</if>
|
||||||
<if test="cusGroup != null and cusGroup != ''">cus_group,</if>
|
<if test="cusGroup != null and cusGroup != ''">cus_group,</if>
|
||||||
<if test="cusVatNo != null and cusVatNo != ''">cus_vat_no,</if>
|
<if test="cusVatNo != null and cusVatNo != ''">cus_vat_no,</if>
|
||||||
<if test="cusType != null">cus_type,</if>
|
<if test="cusType != null">cus_type,</if>
|
||||||
|
@ -125,8 +130,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="cusReturnRemark != null">cus_return_remark,</if>
|
<if test="cusReturnRemark != null">cus_return_remark,</if>
|
||||||
<if test="cusState != null">cus_state,</if>
|
<if test="cusState != null">cus_state,</if>
|
||||||
<if test="cusApprovalStatus != null">cus_approval_status,</if>
|
<if test="cusApprovalStatus != null">cus_approval_status,</if>
|
||||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="cusSalesman != null">cus_salesman,</if>
|
||||||
create_time,
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
<if test="cusSalesOrganization != null and cusSalesOrganization != ''">cus_sales_organization,</if>
|
<if test="cusSalesOrganization != null and cusSalesOrganization != ''">cus_sales_organization,</if>
|
||||||
<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>
|
||||||
|
@ -134,6 +142,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="cusCurrency != null and cusCurrency != ''">cus_currency,</if>
|
<if test="cusCurrency != null and cusCurrency != ''">cus_currency,</if>
|
||||||
<if test="cusTax != null and cusTax != ''">cus_tax,</if>
|
<if test="cusTax != null and cusTax != ''">cus_tax,</if>
|
||||||
<if test="cusReconciliationAccount != null and cusReconciliationAccount != ''">cus_reconciliation_account,</if>
|
<if test="cusReconciliationAccount != null and cusReconciliationAccount != ''">cus_reconciliation_account,</if>
|
||||||
|
<if test="cusAccountAllocationGroup != null and cusAccountAllocationGroup != ''">cus_account_allocation_group,</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>
|
||||||
|
@ -145,6 +154,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="cusPaymentTerms != null and cusPaymentTerms != ''">#{cusPaymentTerms},</if>
|
<if test="cusPaymentTerms != null and cusPaymentTerms != ''">#{cusPaymentTerms},</if>
|
||||||
<if test="cusPhoneNumber != null and cusPhoneNumber != ''">#{cusPhoneNumber},</if>
|
<if test="cusPhoneNumber != null and cusPhoneNumber != ''">#{cusPhoneNumber},</if>
|
||||||
<if test="cusIndustryCode != null and cusIndustryCode != ''">#{cusIndustryCode},</if>
|
<if test="cusIndustryCode != null and cusIndustryCode != ''">#{cusIndustryCode},</if>
|
||||||
|
<if test="cusIndustryCodeQcc != null and cusIndustryCodeQcc != ''">#{cusIndustryCodeQcc},</if>
|
||||||
<if test="cusGroup != null and cusGroup != ''">#{cusGroup},</if>
|
<if test="cusGroup != null and cusGroup != ''">#{cusGroup},</if>
|
||||||
<if test="cusVatNo != null and cusVatNo != ''">#{cusVatNo},</if>
|
<if test="cusVatNo != null and cusVatNo != ''">#{cusVatNo},</if>
|
||||||
<if test="cusType != null">#{cusType},</if>
|
<if test="cusType != null">#{cusType},</if>
|
||||||
|
@ -159,8 +169,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="cusReturnRemark != null">#{cusReturnRemark},</if>
|
<if test="cusReturnRemark != null">#{cusReturnRemark},</if>
|
||||||
<if test="cusState != null">#{cusState},</if>
|
<if test="cusState != null">#{cusState},</if>
|
||||||
<if test="cusApprovalStatus != null">#{cusApprovalStatus},</if>
|
<if test="cusApprovalStatus != null">#{cusApprovalStatus},</if>
|
||||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="cusSalesman != null">#{cusSalesman},</if>
|
||||||
getdate(),
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
<if test="cusSalesOrganization != null and cusSalesOrganization != ''">#{cusSalesOrganization},</if>
|
<if test="cusSalesOrganization != null and cusSalesOrganization != ''">#{cusSalesOrganization},</if>
|
||||||
<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>
|
||||||
|
@ -168,6 +181,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="cusCurrency != null and cusCurrency != ''">#{cusCurrency},</if>
|
<if test="cusCurrency != null and cusCurrency != ''">#{cusCurrency},</if>
|
||||||
<if test="cusTax != null and cusTax != ''">#{cusTax},</if>
|
<if test="cusTax != null and cusTax != ''">#{cusTax},</if>
|
||||||
<if test="cusReconciliationAccount != null and cusReconciliationAccount != ''">#{cusReconciliationAccount},</if>
|
<if test="cusReconciliationAccount != null and cusReconciliationAccount != ''">#{cusReconciliationAccount},</if>
|
||||||
|
<if test="cusAccountAllocationGroup != null and cusAccountAllocationGroup != ''">#{cusAccountAllocationGroup},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
@ -182,6 +196,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="cusPaymentTerms != null and cusPaymentTerms != ''">cus_payment_terms = #{cusPaymentTerms},</if>
|
<if test="cusPaymentTerms != null and cusPaymentTerms != ''">cus_payment_terms = #{cusPaymentTerms},</if>
|
||||||
<if test="cusPhoneNumber != null and cusPhoneNumber != ''">cus_phone_number = #{cusPhoneNumber},</if>
|
<if test="cusPhoneNumber != null and cusPhoneNumber != ''">cus_phone_number = #{cusPhoneNumber},</if>
|
||||||
<if test="cusIndustryCode != null and cusIndustryCode != ''">cus_industry_code = #{cusIndustryCode},</if>
|
<if test="cusIndustryCode != null and cusIndustryCode != ''">cus_industry_code = #{cusIndustryCode},</if>
|
||||||
|
<if test="cusIndustryCodeQcc != null and cusIndustryCodeQcc != ''">cus_industry_code_qcc = #{cusIndustryCodeQcc},</if>
|
||||||
<if test="cusGroup != null and cusGroup != ''">cus_group = #{cusGroup},</if>
|
<if test="cusGroup != null and cusGroup != ''">cus_group = #{cusGroup},</if>
|
||||||
<if test="cusVatNo != null and cusVatNo != ''">cus_vat_no = #{cusVatNo},</if>
|
<if test="cusVatNo != null and cusVatNo != ''">cus_vat_no = #{cusVatNo},</if>
|
||||||
<if test="cusType != null">cus_type = #{cusType},</if>
|
<if test="cusType != null">cus_type = #{cusType},</if>
|
||||||
|
@ -196,8 +211,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="cusReturnRemark != null">cus_return_remark = #{cusReturnRemark},</if>
|
<if test="cusReturnRemark != null">cus_return_remark = #{cusReturnRemark},</if>
|
||||||
<if test="cusState != null">cus_state = #{cusState},</if>
|
<if test="cusState != null">cus_state = #{cusState},</if>
|
||||||
<if test="cusApprovalStatus != null">cus_approval_status = #{cusApprovalStatus},</if>
|
<if test="cusApprovalStatus != null">cus_approval_status = #{cusApprovalStatus},</if>
|
||||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
<if test="cusSalesman != null">cus_salesman = #{cusSalesman},</if>
|
||||||
update_time = getdate(),
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
<if test="cusSalesOrganization != null and cusSalesOrganization != ''">cus_sales_organization = #{cusSalesOrganization},</if>
|
<if test="cusSalesOrganization != null and cusSalesOrganization != ''">cus_sales_organization = #{cusSalesOrganization},</if>
|
||||||
<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>
|
||||||
|
@ -205,6 +223,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="cusCurrency != null and cusCurrency != ''">cus_currency = #{cusCurrency},</if>
|
<if test="cusCurrency != null and cusCurrency != ''">cus_currency = #{cusCurrency},</if>
|
||||||
<if test="cusTax != null and cusTax != ''">cus_tax = #{cusTax},</if>
|
<if test="cusTax != null and cusTax != ''">cus_tax = #{cusTax},</if>
|
||||||
<if test="cusReconciliationAccount != null and cusReconciliationAccount != ''">cus_reconciliation_account = #{cusReconciliationAccount},</if>
|
<if test="cusReconciliationAccount != null and cusReconciliationAccount != ''">cus_reconciliation_account = #{cusReconciliationAccount},</if>
|
||||||
|
<if test="cusAccountAllocationGroup != null and cusAccountAllocationGroup != ''">cus_account_allocation_group = #{cusAccountAllocationGroup},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where cus_id = #{cusId}
|
where cus_id = #{cusId}
|
||||||
</update>
|
</update>
|
||||||
|
|
|
@ -89,6 +89,14 @@ export function getReconciliationAccount(query) {
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 查询账户分配组数据
|
||||||
|
export function getAccountAllocationGroup(query) {
|
||||||
|
return request({
|
||||||
|
url: '/rfc/rfc/getAccountAllocationGroup',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 查询银行代码数据
|
// 查询银行代码数据
|
||||||
export function bankCodeList(query) {
|
export function bankCodeList(query) {
|
||||||
|
|
|
@ -92,3 +92,10 @@ export function qccListCustomer(query) {
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 获取行业代码
|
||||||
|
export function getIndustryCodeQcc(cusName) {
|
||||||
|
return request({
|
||||||
|
url: '/customer/customer/getIndustryCodeQcc/'+cusName,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -26,6 +26,9 @@ const user = {
|
||||||
SET_NAME: (state, name) => {
|
SET_NAME: (state, name) => {
|
||||||
state.name = name
|
state.name = name
|
||||||
},
|
},
|
||||||
|
SET_NICK_NAME: (state, nickName) => {
|
||||||
|
state.nickName = nickName
|
||||||
|
},
|
||||||
SET_AVATAR: (state, avatar) => {
|
SET_AVATAR: (state, avatar) => {
|
||||||
state.avatar = avatar
|
state.avatar = avatar
|
||||||
},
|
},
|
||||||
|
@ -98,6 +101,7 @@ const user = {
|
||||||
}
|
}
|
||||||
commit('SET_ID', user.userId)
|
commit('SET_ID', user.userId)
|
||||||
commit('SET_NAME', user.userName)
|
commit('SET_NAME', user.userName)
|
||||||
|
commit('SET_NICK_NAME', user.nickName)
|
||||||
commit('SET_AVATAR', avatar)
|
commit('SET_AVATAR', avatar)
|
||||||
|
|
||||||
commit('SET_SAPBM', sapUser.sapUserBm)
|
commit('SET_SAPBM', sapUser.sapUserBm)
|
||||||
|
|
|
@ -5,11 +5,12 @@
|
||||||
:width="width || '900px'"
|
:width="width || '900px'"
|
||||||
:height="height || '650px'"
|
:height="height || '650px'"
|
||||||
:show-close="false" append-to-body>
|
:show-close="false" append-to-body>
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px" @submit.native.prevent>
|
||||||
<el-form-item label="公司编码" prop="Code">
|
<el-form-item label="公司编码" prop="Code">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.Code"
|
v-model="queryParams.Code"
|
||||||
placeholder="请输入公司编码"
|
placeholder="请输入公司编码"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -17,6 +18,7 @@
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.Name"
|
v-model="queryParams.Name"
|
||||||
placeholder="请输入公司名称"
|
placeholder="请输入公司名称"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
|
@ -105,6 +105,7 @@
|
||||||
<dict-tag :options="dict.type.cus_approval_status" :value="scope.row.cusApprovalStatus"/>
|
<dict-tag :options="dict.type.cus_approval_status" :value="scope.row.cusApprovalStatus"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column fixed label="业务员" align="center" prop="cusSalesman"/>
|
||||||
<el-table-column fixed label="客户名称" align="center" prop="cusName" width="300px">
|
<el-table-column fixed label="客户名称" align="center" prop="cusName" width="300px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link :underline="false" type="primary" @click="handleUpdate(scope.row)">{{scope.row.cusName}}</el-link>
|
<el-link :underline="false" type="primary" @click="handleUpdate(scope.row)">{{scope.row.cusName}}</el-link>
|
||||||
|
@ -173,15 +174,15 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="街道/门牌号" prop="cusStreet">
|
<el-form-item label="街道" prop="cusQccStreet">
|
||||||
<el-input v-model="form.cusStreet" placeholder="请输入街道/门牌号" :disabled="isDisSalesman"/>
|
<el-input v-model="form.cusQccStreet" placeholder="企查查带出" :disabled="true"/>
|
||||||
</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="cusStreet">
|
||||||
<el-input v-model="form.cusQccStreet" placeholder="企查查带出" :disabled="true"/>
|
<el-input v-model="form.cusStreet" placeholder="请输入街道/门牌号" :disabled="isDisSalesman"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
@ -204,6 +205,7 @@
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
:label="dict.label"
|
:label="dict.label"
|
||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
|
:hidden="dict.value!='Z001' && dict.value!='Z002'"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -246,6 +248,11 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="8" v-if="checkRole(['ITZX_SJZ'])">
|
||||||
|
<el-form-item label="业务员" prop="cusSalesman">
|
||||||
|
<el-input v-model="form.cusSalesman" :disabled="isDisSjz"/>
|
||||||
|
</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">
|
||||||
|
@ -285,7 +292,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="8">
|
<el-row :gutter="8" v-if="this.form.cusReturnRemark!=null">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="驳回备注" prop="cusReturnRemark">
|
<el-form-item label="驳回备注" prop="cusReturnRemark">
|
||||||
<el-input type="textarea" autosize v-model="form.cusReturnRemark" placeholder="数据组填写"/>
|
<el-input type="textarea" autosize v-model="form.cusReturnRemark" placeholder="数据组填写"/>
|
||||||
|
@ -590,18 +597,17 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>-->
|
</el-tabs>-->
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<el-divider content-position="left" class="customer_divider_text">银行信息</el-divider>
|
<el-divider content-position="left" class="customer_divider_text">银行信息</el-divider>
|
||||||
<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="buttonShowSalesman">添加</el-button>
|
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddBank" v-if="bankButtonShow">添加</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="buttonShowSalesman">删除</el-button>
|
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteBank" v-if="bankButtonShow">删除</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -641,10 +647,17 @@
|
||||||
v-for="item in paymentTermsDicts"
|
v-for="item in paymentTermsDicts"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"/>
|
:value="item.value"
|
||||||
|
:hidden="item.value!='Z001' && item.value!='Z002' && item.value!='Z003' && item.value!='Z004'
|
||||||
|
&& item.value!='Z005' && item.value!='Z006'"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="客户行业代码" prop="cusIndustryCodeQcc">
|
||||||
|
<el-input v-model="form.cusIndustryCodeQcc" placeholder="企查查带出" :disabled="true"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<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="isDisSjz">
|
<el-select v-model="form.cusIndustryCode" placeholder="请选择行业代码" style="width: 100%;" :disabled="isDisSjz">
|
||||||
|
@ -657,25 +670,26 @@
|
||||||
</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-row>
|
||||||
<el-select v-model="form.cusSalesTerritory" placeholder="请选择销售地区" style="width: 100%;" :disabled="isDisSjz">
|
<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
|
<el-option
|
||||||
v-for="item in salesTerritoryDicts"
|
v-for="item in salesOrganizationDicts"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</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="cusSalesOrganization">
|
<el-form-item label="销售地区" prop="cusSalesTerritory">
|
||||||
<el-select v-model="form.cusSalesOrganization" placeholder="请选择销售组织" style="width: 100%;" :disabled="isDisSjz">
|
<el-select v-model="form.cusSalesTerritory" placeholder="请选择销售地区" style="width: 100%;" :disabled="isDisSjz">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in salesOrganizationDicts"
|
v-for="item in salesTerritoryDicts"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
|
@ -691,6 +705,7 @@
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
|
:hidden="item.value!='10' && item.value!='20'"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -741,13 +756,28 @@
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
|
:hidden="item.value!='1122010100' && item.value!='1122010200'"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="8">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="账户分配组" prop="cusAccountAllocationGroup">
|
||||||
|
<el-select v-model="form.cusAccountAllocationGroup" placeholder="请选择统驭科目" style="width: 100%;" :disabled="isDisSjz">
|
||||||
|
<el-option
|
||||||
|
v-for="item in accountAllocationGroupDicts"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
</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="buttonShowSalesman">保 存</el-button>
|
<el-button @click="saveForm" v-if="buttonShowSalesman">保 存</el-button>
|
||||||
|
@ -759,18 +789,19 @@
|
||||||
<el-button type="danger" plain @click="returnForm" v-if="buttonShowSjz">驳 回</el-button>
|
<el-button type="danger" plain @click="returnForm" v-if="buttonShowSjz">驳 回</el-button>
|
||||||
</span>
|
</span>
|
||||||
<span style="margin-left: 10px" v-hasPermi="['customer:customer:commitSAP']">
|
<span style="margin-left: 10px" v-hasPermi="['customer:customer:commitSAP']">
|
||||||
<el-button type="primary" plain @click="commitSAPForm" v-if="buttonShowSjz">提 交OA</el-button>
|
<el-button type="primary" plain @click="commitSAPForm" v-if="buttonShowSjz">提 交SAP</el-button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</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="800px" :show-close="false" append-to-body>
|
||||||
<el-form :model="queryQccParams" ref="queryQccForm" size="small" :inline="true" label-width="100px">
|
<el-form :model="queryQccParams" ref="queryQccForm" size="small" :inline="true" label-width="100px" @submit.native.prevent>
|
||||||
<el-form-item label="公司名称" prop="Name">
|
<el-form-item label="公司名称" prop="Name">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryQccParams.Name"
|
v-model="queryQccParams.Name"
|
||||||
placeholder="请输入公司名称"
|
placeholder="请输入公司名称"
|
||||||
|
@keyup.enter.native="handleQccQuery"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -802,11 +833,12 @@
|
||||||
|
|
||||||
<!-- 银行代码 查询 对话框 -->
|
<!-- 银行代码 查询 对话框 -->
|
||||||
<el-dialog :title="bankCodeTitle" :visible.sync="bankCodeOpen" width="800px" :show-close="false" append-to-body>
|
<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 :model="queryBankCodeParams" ref="queryBankCodeForm" size="small" :inline="true" label-width="100px" @submit.native.prevent>
|
||||||
<el-form-item label="银行名称" prop="Name">
|
<el-form-item label="银行名称" prop="Name">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryBankCodeParams.bankName"
|
v-model="queryBankCodeParams.bankName"
|
||||||
placeholder="请输入银行名称"
|
placeholder="请输入银行名称"
|
||||||
|
@keyup.enter.native="handleBankCodeQuery"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -836,6 +868,11 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<style>
|
<style>
|
||||||
|
/* 根据需求设置位置上下偏移 */
|
||||||
|
.offset {
|
||||||
|
margin-top: 15px; /* 向上偏移5像素 */
|
||||||
|
margin-bottom: 15px; /* 向下偏移5像素 */
|
||||||
|
}
|
||||||
.el-dialog__body {
|
.el-dialog__body {
|
||||||
padding: 10px 10px;
|
padding: 10px 10px;
|
||||||
color: #606266;
|
color: #606266;
|
||||||
|
@ -852,9 +889,9 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import { listCustomer, getCustomer, delCustomer,changCusStatus, addCustomer, updateCustomer, commitCustomer,returnCustomer, commitSAPCustomer, qccListCustomer } from "@/api/customer/customer";
|
import { listCustomer, getCustomer, delCustomer,changCusStatus, addCustomer, updateCustomer, commitCustomer,returnCustomer, commitSAPCustomer, qccListCustomer, getIndustryCodeQcc } from "@/api/customer/customer";
|
||||||
import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
|
import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
|
||||||
import { bankCodeList,getCountrys,getIndustryCode,getLanguage,getPaymentTerms,getSalesOrganization,getDistributionChannel,getSalesTerritory,getSaleOffice,getTax,getReconciliationAccount } from "@/api/common/sapRfc";// sap-rfc 函数
|
import { bankCodeList,getCountrys,getIndustryCode,getLanguage,getPaymentTerms,getSalesOrganization,getDistributionChannel,getSalesTerritory,getSaleOffice,getTax,getReconciliationAccount, getAccountAllocationGroup } from "@/api/common/sapRfc";// sap-rfc 函数
|
||||||
|
|
||||||
/** 弹窗放大、拖拽 */
|
/** 弹窗放大、拖拽 */
|
||||||
import elDragDialog from "@/directive/dialog/dragDialog";
|
import elDragDialog from "@/directive/dialog/dragDialog";
|
||||||
|
@ -956,19 +993,19 @@ export default {
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
cusName: [
|
cusName: [
|
||||||
{ required: true, message: "客户名称不能为空", trigger: "blur" }
|
{ required: true, message: "客户名称不能为空", trigger: "change" }
|
||||||
],
|
],
|
||||||
cusStreet: [
|
cusStreet: [
|
||||||
{ required: true, message: "街道/门牌号不能为空", trigger: "blur" }
|
{ required: true, message: "街道/门牌号不能为空", trigger: "change" }
|
||||||
],
|
],
|
||||||
cusPhoneNumber: [
|
cusPhoneNumber: [
|
||||||
{ required: true, message: "电话号码不能为空", trigger: "blur" }
|
{ required: true, message: "电话号码不能为空", trigger: "change" }
|
||||||
],
|
],
|
||||||
cusGroup: [
|
cusGroup: [
|
||||||
{ required: true, message: "客户组类别不能为空", trigger: "change" }
|
{ required: true, message: "客户组类别不能为空", trigger: "change" }
|
||||||
],
|
],
|
||||||
cusVatNo: [
|
cusVatNo: [
|
||||||
{ required: true, message: "增值税号不能为空", trigger: "blur" }
|
{ required: true, message: "增值税号不能为空", trigger: "change" }
|
||||||
],
|
],
|
||||||
cusCountry: [
|
cusCountry: [
|
||||||
{ required: true, message: "国家不能为空", trigger: "change" }
|
{ required: true, message: "国家不能为空", trigger: "change" }
|
||||||
|
@ -982,34 +1019,39 @@ export default {
|
||||||
{ required: true,trigger: "change", validator: validateCusPaymentTerms}
|
{ required: true,trigger: "change", validator: validateCusPaymentTerms}
|
||||||
],
|
],
|
||||||
cusIndustryCode: [
|
cusIndustryCode: [
|
||||||
{ required: true, trigger: "blur", validator: validateCusIndustryCode }
|
{ required: true, trigger: "change", validator: validateCusIndustryCode }
|
||||||
],
|
],
|
||||||
cusSalesOrganization: [
|
cusSalesOrganization: [
|
||||||
{ required: true, message: "销售组织不能为空", trigger: "blur"}
|
{ required: true, message: "销售组织不能为空", trigger: "change"}
|
||||||
],
|
],
|
||||||
cusDistributionChannel: [
|
cusDistributionChannel: [
|
||||||
{ required: true, message: "分销渠道不能为空", trigger: "blur" }
|
{ required: true, message: "分销渠道不能为空", trigger: "change" }
|
||||||
],
|
],
|
||||||
cusSalesTerritory: [
|
cusSalesTerritory: [
|
||||||
{ required: true, trigger: "blur", validator: validateCusSalesTerritory }
|
{ required: true, trigger: "change", validator: validateCusSalesTerritory }
|
||||||
],
|
],
|
||||||
cusSaleOffice: [
|
cusSaleOffice: [
|
||||||
{ required: true, trigger: "blur", validator: validateCusSaleOffice }
|
{ required: true, trigger: "change", validator: validateCusSaleOffice }
|
||||||
],
|
],
|
||||||
cusCurrency: [
|
cusCurrency: [
|
||||||
{ required: true, message: "币种不能为空", trigger: "blur" }
|
{ required: true, message: "币种不能为空", trigger: "change" }
|
||||||
],
|
],
|
||||||
cusTax: [
|
cusTax: [
|
||||||
{ required: true, trigger: "blur", validator: validateCusTax }
|
{ required: true, trigger: "change", validator: validateCusTax }
|
||||||
],
|
],
|
||||||
cusReconciliationAccount: [
|
cusReconciliationAccount: [
|
||||||
{ required: true, trigger: "blur", validator: validateCusReconciliationAccount }
|
{ required: true, trigger: "change", validator: validateCusReconciliationAccount }
|
||||||
],
|
],
|
||||||
|
cusAccountAllocationGroup: [
|
||||||
|
{ required: true, trigger: "change", validator: validateCusReconciliationAccount }
|
||||||
|
]
|
||||||
},
|
},
|
||||||
// 保存\提交,明细添加、删除 按钮显示 - 业务员
|
// 保存\提交 按钮显示 - 业务员
|
||||||
buttonShowSalesman: true,
|
buttonShowSalesman: true,
|
||||||
|
|
||||||
|
// 明细添加、删除 按钮显示
|
||||||
|
bankButtonShow: true,
|
||||||
|
|
||||||
// 提交OA 按钮显示 - 数据组
|
// 提交OA 按钮显示 - 数据组
|
||||||
buttonShowSjz: true,
|
buttonShowSjz: true,
|
||||||
|
|
||||||
|
@ -1074,6 +1116,7 @@ export default {
|
||||||
saleOfficeDicts: [], // 销售办公室数据列表
|
saleOfficeDicts: [], // 销售办公室数据列表
|
||||||
taxDicts: [], // 客户税分类数据列表
|
taxDicts: [], // 客户税分类数据列表
|
||||||
reconciliationAccountDicts: [], // 统驭科目数据列表
|
reconciliationAccountDicts: [], // 统驭科目数据列表
|
||||||
|
accountAllocationGroupDicts: [], // 账户分配组数据列表
|
||||||
/*****************************SAP-RFC查询模块*************************************/
|
/*****************************SAP-RFC查询模块*************************************/
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -1110,25 +1153,32 @@ export default {
|
||||||
cusName: null,
|
cusName: null,
|
||||||
cusSapCode: null,
|
cusSapCode: null,
|
||||||
cusStreet: null,
|
cusStreet: null,
|
||||||
cusPaymentTerms: null,
|
|
||||||
cusPhoneNumber: null,
|
cusPhoneNumber: null,
|
||||||
cusIndustryCode: null,
|
|
||||||
cusGroup: null,
|
cusGroup: null,
|
||||||
cusVatNo: null,
|
cusVatNo: null,
|
||||||
cusType: null,
|
cusType: null,
|
||||||
cusCountry: null,
|
cusCountry: null,
|
||||||
cusLanguage: null,
|
cusLanguage: null,
|
||||||
cusLabel: null,
|
cusSalesman: null,
|
||||||
cusClassification: null,
|
|
||||||
cusReceivingEmail: null,
|
|
||||||
cusRecipient: null,
|
|
||||||
cusRecipientPhone: null,
|
|
||||||
cusRemark: null,
|
cusRemark: null,
|
||||||
cusState: null,
|
cusState: null,
|
||||||
cusApprovalStatus: null
|
cusApprovalStatus: null,
|
||||||
|
|
||||||
|
cusPaymentTerms: null,
|
||||||
|
cusIndustryCode: null,
|
||||||
|
cusIndustryCodeQcc: null,
|
||||||
|
cusSalesTerritory: null,
|
||||||
|
cusDistributionChannel: null,
|
||||||
|
cusSaleOffice: null,
|
||||||
|
cusCurrency: null,
|
||||||
|
cusTax: null,
|
||||||
|
cusReconciliationAccount: null,
|
||||||
|
cusAccountAllocationGroup: null,
|
||||||
};
|
};
|
||||||
this.bankList = [];
|
this.bankList = [];
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
|
this.setInitF();
|
||||||
|
this.setInitV();
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
|
@ -1158,31 +1208,35 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
async handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加客户信息";
|
this.title = "添加客户信息";
|
||||||
|
|
||||||
this.setInitF();
|
this.form.cusSalesman = this.$store.state.user.nickName;
|
||||||
this.setInitV();
|
this.buttonShowSalesman = checkRole(['ITZX_SJZ']) ? false : true; // 如果是业务员角色 则保存、提交 按钮显示 反之不显示
|
||||||
|
this.buttonShowSjz = checkRole(['ITZX_SJZ']) ? true : false;// 如果是业务员角色 则保存、提交 按钮不显示 反之显示
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
async handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const cusId = row.cusId || this.ids
|
const cusId = row.cusId || this.ids
|
||||||
getCustomer(cusId).then(response => {
|
getCustomer(cusId).then(response => {
|
||||||
this.setInitF();
|
|
||||||
|
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
|
// 业务员角色-如果是保存状态则显示 反之不显示
|
||||||
this.buttonShowSalesman = this.form.cusApprovalStatus == '0'?true:false;
|
this.buttonShowSalesman = this.form.cusApprovalStatus == '0'?true:false;
|
||||||
this.isDisSalesman = this.form.cusApprovalStatus == '0'?false:true;
|
// 业务员提交的数据数据组审核可编辑
|
||||||
|
this.isDisSalesman = this.form.cusApprovalStatus == '0' ? false : (checkRole(['ITZX_SJZ'])&&this.form.cusApprovalStatus == '1') ? false : true;
|
||||||
|
// 数据组角色-如果不是完成状态, 驳回、提交OA 按钮显示
|
||||||
this.buttonShowSjz = this.form.cusApprovalStatus != '2'?true:false;
|
this.buttonShowSjz = this.form.cusApprovalStatus != '2'?true:false;
|
||||||
|
// 数据组角色-如果是审批中状态, 则可编辑
|
||||||
this.isDisSjz = this.form.cusApprovalStatus == '1'?false:true;
|
this.isDisSjz = this.form.cusApprovalStatus == '1'?false:true;
|
||||||
|
// 审批中状态,数据则可编辑
|
||||||
|
this.bankButtonShow = 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 = "客户信息";
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 保存按钮 */
|
/** 保存按钮 */
|
||||||
|
@ -1232,6 +1286,18 @@ export default {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.form.bankList = this.bankList;
|
this.form.bankList = this.bankList;
|
||||||
|
// 遍历表格数据
|
||||||
|
try{
|
||||||
|
this.bankList.forEach((row, index) => {
|
||||||
|
if(!row.bankCode){
|
||||||
|
this.$modal.msgError("银行代码不能为空");
|
||||||
|
throw new Error;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}catch(e){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
commitSAPCustomer(this.form).then(response => {
|
commitSAPCustomer(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("提交SAP成功");
|
this.$modal.msgSuccess("提交SAP成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
@ -1324,15 +1390,21 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 确认按钮
|
// 确认按钮
|
||||||
qccConfirm(){
|
async qccConfirm() {
|
||||||
const qccTable = this.$refs.qccTable;
|
const qccTable = this.$refs.qccTable;
|
||||||
const selectedData = qccTable.selection;
|
const selectedData = qccTable.selection;
|
||||||
this.form.cusName = selectedData[0].name;
|
this.form.cusName = selectedData[0].name;
|
||||||
this.form.cusVatNo = selectedData[0].creditCode;
|
this.form.cusVatNo = selectedData[0].creditCode;
|
||||||
this.form.cusQccStreet = selectedData[0].address;
|
this.form.cusQccStreet = selectedData[0].address;
|
||||||
|
|
||||||
|
//获取客户行业代码
|
||||||
|
await getIndustryCodeQcc(selectedData[0].name).then(response => {
|
||||||
|
console.log(response)
|
||||||
|
this.form.cusIndustryCodeQcc = response.cusIndustryCodeQcc;
|
||||||
|
})
|
||||||
this.qccOpen = false;
|
this.qccOpen = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
qccCancel() {
|
qccCancel() {
|
||||||
this.qccOpen = false;
|
this.qccOpen = false;
|
||||||
|
@ -1429,6 +1501,8 @@ export default {
|
||||||
this.form.cusSalesOrganization = '1100';
|
this.form.cusSalesOrganization = '1100';
|
||||||
this.form.cusDistributionChannel = '10';
|
this.form.cusDistributionChannel = '10';
|
||||||
this.form.cusCurrency = 'CNY';
|
this.form.cusCurrency = 'CNY';
|
||||||
|
this.form.cusTax = '1';
|
||||||
|
this.form.cusReconciliationAccount = '1122010100';
|
||||||
},
|
},
|
||||||
// 加载SAP公共数据
|
// 加载SAP公共数据
|
||||||
setInitF(){
|
setInitF(){
|
||||||
|
@ -1444,6 +1518,7 @@ export default {
|
||||||
this.getSaleOffice();
|
this.getSaleOffice();
|
||||||
this.getTax();
|
this.getTax();
|
||||||
this.getReconciliationAccount();
|
this.getReconciliationAccount();
|
||||||
|
this.getAccountAllocationGroup();
|
||||||
},
|
},
|
||||||
//SAP国家数据列表
|
//SAP国家数据列表
|
||||||
getCountrys(){
|
getCountrys(){
|
||||||
|
@ -1505,6 +1580,11 @@ export default {
|
||||||
this.reconciliationAccountDicts = response.reconciliationAccountDicts;
|
this.reconciliationAccountDicts = response.reconciliationAccountDicts;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
getAccountAllocationGroup(){
|
||||||
|
getAccountAllocationGroup(this.queryParams).then(response => {
|
||||||
|
this.accountAllocationGroupDicts = response.accountAllocationGroupDicts;
|
||||||
|
});
|
||||||
|
},
|
||||||
/*****************************SAP-RFC查询模块*************************************/
|
/*****************************SAP-RFC查询模块*************************************/
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
Loading…
Reference in New Issue