'123'
This commit is contained in:
parent
7a8b425741
commit
33bcaec535
|
@ -1,5 +1,5 @@
|
||||||
#for tests only !
|
#for tests only !
|
||||||
#Mon May 06 14:44:29 CST 2024
|
#Mon May 06 17:03:41 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
|
||||||
|
|
|
@ -126,23 +126,39 @@ public class CustomerController extends BaseController
|
||||||
public AjaxResult commitCustomer(@RequestBody Customer customer)
|
public AjaxResult commitCustomer(@RequestBody Customer customer)
|
||||||
{
|
{
|
||||||
String cus_id = customer.getCusId();
|
String cus_id = customer.getCusId();
|
||||||
|
customer.setUpdateBy(getUsername());
|
||||||
|
customer.setCusApprovalStatus("1");//客户提交 状态设置为 审核中
|
||||||
|
|
||||||
|
//TODO 提交校验
|
||||||
|
|
||||||
if(StringUtils.isEmpty(cus_id)){
|
if(StringUtils.isEmpty(cus_id)){
|
||||||
customer.setCusId(UUID.fastUUID().toString());
|
customer.setCusId(UUID.fastUUID().toString());
|
||||||
customer.setCusCode(IdUtils.createNo("KH_",2));
|
customer.setCusCode(IdUtils.createNo("KH_",2));
|
||||||
customer.setCreateBy(getUsername());
|
customer.setCreateBy(getUsername());
|
||||||
customerService.insertCustomer(customer);
|
customerService.insertCustomer(customer);
|
||||||
//提交OA中间表 TODO
|
|
||||||
//....
|
|
||||||
return success();
|
return success();
|
||||||
}else{
|
}else{
|
||||||
customer.setUpdateBy(getUsername());
|
|
||||||
customerService.updateCustomer(customer);
|
customerService.updateCustomer(customer);
|
||||||
//提交OA中间表 TODO
|
|
||||||
//....
|
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交客户信息-SAP
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('customer:customer:commitSAP')")
|
||||||
|
@Log(title = "客户信息提交", businessType = BusinessType.OTHER)
|
||||||
|
@PostMapping("/commitSAPCustomer")
|
||||||
|
public AjaxResult commitSAPCustomer(@RequestBody Customer customer)
|
||||||
|
{
|
||||||
|
customer.setUpdateBy(getUsername());
|
||||||
|
customer.setCusApprovalStatus("2");//客户提交 状态设置为 已审核
|
||||||
|
customerService.updateCustomer(customer);
|
||||||
|
//TODO 提交校验 调用SAP rfc接口 更新客户凭证号
|
||||||
|
return success();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除客户管理
|
* 删除客户管理
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.ruoyi.customer.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.ruoyi.common.annotation.DataScope;
|
import com.ruoyi.common.annotation.DataScope;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.ruoyi.common.utils.uuid.UUID;
|
import com.ruoyi.common.utils.uuid.UUID;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
@ -60,6 +61,8 @@ public class CustomerServiceImpl implements ICustomerService
|
||||||
@Override
|
@Override
|
||||||
public int insertCustomer(Customer customer)
|
public int insertCustomer(Customer customer)
|
||||||
{
|
{
|
||||||
|
customer.setCreateTime(DateUtils.getNowDate());
|
||||||
|
customer.setUpdateTime(DateUtils.getNowDate());
|
||||||
int rows = customerMapper.insertCustomer(customer);
|
int rows = customerMapper.insertCustomer(customer);
|
||||||
insertBank(customer);
|
insertBank(customer);
|
||||||
return rows;
|
return rows;
|
||||||
|
@ -75,6 +78,7 @@ public class CustomerServiceImpl implements ICustomerService
|
||||||
@Override
|
@Override
|
||||||
public int updateCustomer(Customer customer)
|
public int updateCustomer(Customer customer)
|
||||||
{
|
{
|
||||||
|
customer.setUpdateTime(DateUtils.getNowDate());
|
||||||
customerMapper.deleteBankByCusId(customer.getCusId());
|
customerMapper.deleteBankByCusId(customer.getCusId());
|
||||||
insertBank(customer);
|
insertBank(customer);
|
||||||
return customerMapper.updateCustomer(customer);
|
return customerMapper.updateCustomer(customer);
|
||||||
|
|
|
@ -56,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<sql id="customerJoins">
|
<sql id="customerJoins">
|
||||||
LEFT JOIN sys_user u on u.user_name=a.create_by
|
LEFT JOIN sys_user u on u.user_name=a.create_by
|
||||||
|
LEFT JOIN sys_dept d on u.dept_id = d.dept_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<sql id="selectCustomerVo">
|
<sql id="selectCustomerVo">
|
||||||
|
|
|
@ -44,6 +44,15 @@ export function commitCustomer(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//提交客户信息-SAP
|
||||||
|
export function commitSAPCustomer(data) {
|
||||||
|
return request({
|
||||||
|
url: '/customer/customer/commitSAPCustomer',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 删除客户管理
|
// 删除客户管理
|
||||||
export function delCustomer(cusId) {
|
export function delCustomer(cusId) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
:label="dict.label"
|
:label="dict.label"
|
||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
|
v-if="(!cusApprovalStatusHidden && (dict.value == '1' || dict.value == '2')) || cusApprovalStatusHidden "
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -107,7 +108,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column fixed label="客户名称" align="center" prop="cusName" width="230px">
|
<el-table-column fixed label="客户名称" align="center" prop="cusName" width="230px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link v-hasPermi="['customer:customer:edit']" :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>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="客户编码" align="center" prop="cusCode" width="230px"></el-table-column>
|
<el-table-column label="客户编码" align="center" prop="cusCode" width="230px"></el-table-column>
|
||||||
|
@ -298,26 +299,26 @@
|
||||||
<el-table :data="bankList" @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">
|
<el-table-column label="国家" prop="bankCountry" v-if="checkRole(['ITZX_SJZ'])">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.bankCountry" placeholder="选择银行代码自动带出" :disabled="true"/>
|
<el-input v-model="scope.row.bankCountry" placeholder="选择银行代码自动带出" :disabled="true"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="银行代码" prop="bankCode">
|
<el-table-column label="银行代码" prop="bankCode" v-if="checkRole(['ITZX_SJZ'])">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.bankCode" placeholder="请输入银行代码">
|
<el-input v-model="scope.row.bankCode" placeholder="请输入银行代码" :disabled="true" >
|
||||||
<i slot="suffix" class="el-input__icon el-icon-search" @click="handleSearchBankCode(scope)"></i>
|
<i v-if="!isDisSjz" slot="suffix" class="el-input__icon el-icon-search" @click="handleSearchBankCode(scope)"></i>
|
||||||
</el-input>
|
</el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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="请输入银行名称" :disabled="isDisSalesman"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="银行账户" prop="bankAccount">
|
<el-table-column label="银行账户" prop="bankAccount">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.bankAccount" placeholder="请输入银行账户" />
|
<el-input v-model="scope.row.bankAccount" placeholder="请输入银行账户" :disabled="isDisSalesman" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -472,7 +473,7 @@
|
||||||
<el-table-column label="法人" align="center" prop="operName" />
|
<el-table-column label="法人" align="center" prop="operName" />
|
||||||
<el-table-column label="注册时间" align="center" prop="startDate" />
|
<el-table-column label="注册时间" align="center" prop="startDate" />
|
||||||
<el-table-column label="增值税号" align="center" prop="creditCode" />
|
<el-table-column label="增值税号" align="center" prop="creditCode" />
|
||||||
|
<el-table-column label="地址" align="center" prop="address" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--<pagination
|
<!--<pagination
|
||||||
v-show="qccTotal>0"
|
v-show="qccTotal>0"
|
||||||
|
@ -534,7 +535,7 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import { listCustomer, getCustomer, delCustomer, addCustomer, updateCustomer, commitCustomer, qccListCustomer } from "@/api/customer/customer";
|
import { listCustomer, getCustomer, delCustomer, addCustomer, updateCustomer, commitCustomer,commitSAPCustomer, qccListCustomer } 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 } from "@/api/common/sapRfc";// sap-rfc 函数
|
||||||
|
|
||||||
|
@ -592,6 +593,8 @@ export default {
|
||||||
dicts: ['cus_currency','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 {
|
||||||
|
//提交状态下拉框数据设置
|
||||||
|
cusApprovalStatusHidden: true,
|
||||||
//选项卡默认
|
//选项卡默认
|
||||||
activeName: 'customerInfo',
|
activeName: 'customerInfo',
|
||||||
|
|
||||||
|
@ -757,6 +760,7 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
const roles = this.$store.state.user.roles;
|
const roles = this.$store.state.user.roles;
|
||||||
if(roles && roles.indexOf('ITZX_SJZ') !== -1 && roles.indexOf('admin') == -1 ){//数据组默认查看审批中 单据
|
if(roles && roles.indexOf('ITZX_SJZ') !== -1 && roles.indexOf('admin') == -1 ){//数据组默认查看审批中 单据
|
||||||
|
this.cusApprovalStatusHidden = false;
|
||||||
this.queryParams.cusApprovalStatus = '1';
|
this.queryParams.cusApprovalStatus = '1';
|
||||||
}
|
}
|
||||||
this.getList();
|
this.getList();
|
||||||
|
@ -843,7 +847,7 @@ export default {
|
||||||
this.isDisSalesman = this.form.cusApprovalStatus == '0'?false:true;
|
this.isDisSalesman = this.form.cusApprovalStatus == '0'?false:true;
|
||||||
|
|
||||||
this.buttonShowSjz = this.form.cusApprovalStatus != '0'?true:false;
|
this.buttonShowSjz = this.form.cusApprovalStatus != '0'?true:false;
|
||||||
this.isDisSjz = this.form.cusApprovalStatus != '0'?true:false;
|
this.isDisSjz = this.form.cusApprovalStatus == '1'?false:true;
|
||||||
|
|
||||||
this.bankList = response.data.bankList;
|
this.bankList = response.data.bankList;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
|
@ -884,6 +888,19 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
/** 提交SAP按钮 */
|
||||||
|
commitSAPForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.form.bankList = this.bankList;
|
||||||
|
commitSAPCustomer(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("提交SAP成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const cusIds = row.cusId || this.ids;
|
const cusIds = row.cusId || this.ids;
|
||||||
|
@ -932,6 +949,7 @@ export default {
|
||||||
openQcc(){
|
openQcc(){
|
||||||
this.qccOpen = true;
|
this.qccOpen = true;
|
||||||
this.qccTitle = "企查查客户信息";
|
this.qccTitle = "企查查客户信息";
|
||||||
|
this.resetQccQuery();
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 切换每页显示条数 */
|
/** 切换每页显示条数 */
|
||||||
|
@ -972,6 +990,8 @@ export default {
|
||||||
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.qccOpen = false;
|
this.qccOpen = false;
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
|
@ -982,8 +1002,9 @@ export default {
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQccQuery() {
|
resetQccQuery() {
|
||||||
this.qccCustomerList = [];
|
this.qccCustomerList = [];
|
||||||
//this.qccTotal = 0;
|
this.queryQccParams = {
|
||||||
this.resetForm("queryQccForm");
|
Name: ""
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/*****************************企查查查询模块*************************************/
|
/*****************************企查查查询模块*************************************/
|
||||||
/*****************************银行代码查询模块*************************************/
|
/*****************************银行代码查询模块*************************************/
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
:label="dict.label"
|
:label="dict.label"
|
||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
|
v-if="!quotApprovalStatusHidden && (dict.value == '1' || dict.value == '2') "
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -720,6 +721,7 @@
|
||||||
import { listQuot, getQuot, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete, commitQuot, commitJsQuot, commitHjQuot, feedbackQuot, rejectQuot } from "@/api/quot/quot";
|
import { listQuot, getQuot, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete, commitQuot, commitJsQuot, commitHjQuot, feedbackQuot, rejectQuot } from "@/api/quot/quot";
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
import { checkPermi } from '@/utils/permission';// 权限判断函数
|
import { checkPermi } from '@/utils/permission';// 权限判断函数
|
||||||
|
import { getDicts } from "@/api/system/dict/data";
|
||||||
|
|
||||||
// 导入技术确认单详情组件
|
// 导入技术确认单详情组件
|
||||||
import jsqrDialog from '@/views/technicalConfirm/technicalConfirm/jsxzInfo.vue';
|
import jsqrDialog from '@/views/technicalConfirm/technicalConfirm/jsxzInfo.vue';
|
||||||
|
@ -736,6 +738,8 @@ export default {
|
||||||
dicts: ['quot_approval_status','quot_jsxz_group','quot_jsxz_chapter','quot_jsxz_approval_status','quot_jsxz_standard','quot_hj_approval_status'],
|
dicts: ['quot_approval_status','quot_jsxz_group','quot_jsxz_chapter','quot_jsxz_approval_status','quot_jsxz_standard','quot_hj_approval_status'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
//提交状态下拉框数据设置
|
||||||
|
quotApprovalStatusHidden: true,
|
||||||
//选项卡默认
|
//选项卡默认
|
||||||
activeName: 'quotInfo',
|
activeName: 'quotInfo',
|
||||||
|
|
||||||
|
@ -824,7 +828,8 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
const roles = this.$store.state.user.roles;
|
const roles = this.$store.state.user.roles;
|
||||||
if(roles && roles.indexOf('QUOT') !== -1 && roles.indexOf('admin') == -1 ){//报价组默认查看待审核 单据
|
if(roles && roles.indexOf('QUOT') !== -1 && roles.indexOf('admin') == -1 ){//报价组默认查看待审核 单据
|
||||||
this.queryParams.quotApprovalStatus = '1';
|
this.quotApprovalStatusHidden = false;
|
||||||
|
this.queryParams.quotApprovalStatus = '1';
|
||||||
}
|
}
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue