123
This commit is contained in:
parent
7e212a9064
commit
7e6e964b9b
|
@ -121,6 +121,19 @@ public class CustomerController extends BaseController
|
||||||
return success(customerService.selectCustomerByCusId(cusId));
|
return success(customerService.selectCustomerByCusId(cusId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取客户详细信息-错误修订
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('customer:customer:returnUpdate')")
|
||||||
|
@GetMapping(value = "/returnUpdate/{cusId}")
|
||||||
|
@Log(title = "客户错误修订", businessType = BusinessType.UPDATE)
|
||||||
|
public AjaxResult getReturnUpdateInfo(@PathVariable("cusId") String cusId)
|
||||||
|
{
|
||||||
|
Customer customer = customerService.selectCustomerByCusId(cusId);
|
||||||
|
customer.setCusApprovalStatus("1");// 提交状态设置为 审核中
|
||||||
|
return success(customer);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增客户管理
|
* 新增客户管理
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -17,6 +17,14 @@ export function getCustomer(cusId) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询客户信息-错判修订
|
||||||
|
export function getReturnUpdateCustomer(cusId) {
|
||||||
|
return request({
|
||||||
|
url: '/customer/customer/returnUpdate/' + cusId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 客户状态修改
|
// 客户状态修改
|
||||||
export function changCusStatus(cusId, cusState) {
|
export function changCusStatus(cusId, cusState) {
|
||||||
const data = {
|
const data = {
|
||||||
|
|
|
@ -94,6 +94,17 @@
|
||||||
v-hasPermi="['customer:customer:export']"
|
v-hasPermi="['customer:customer:export']"
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleReturnUpdate"
|
||||||
|
v-hasPermi="['customer:customer:returnUpdate']"
|
||||||
|
>错误修订</el-button>
|
||||||
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
@ -168,7 +179,7 @@
|
||||||
<el-row :gutter="8">
|
<el-row :gutter="8">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="客户名称" prop="cusName">
|
<el-form-item label="客户名称" prop="cusName">
|
||||||
<el-input v-model="form.cusName" placeholder="企查查带出" :disabled="true">
|
<el-input v-model="form.cusName" placeholder="企查查带出" :disabled="isDisCustomer">
|
||||||
<el-button slot="append" icon="el-icon-search" @click="openQcc" v-hasPermi="['customer:customer:qcclist']"></el-button>
|
<el-button slot="append" icon="el-icon-search" @click="openQcc" v-hasPermi="['customer:customer:qcclist']"></el-button>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -889,7 +900,7 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import { listCustomer, getCustomer, delCustomer,changCusStatus, addCustomer, updateCustomer, commitCustomer,returnCustomer, commitSAPCustomer, qccListCustomer, getIndustryCodeQcc } from "@/api/customer/customer";
|
import { listCustomer, getCustomer, delCustomer,changCusStatus, addCustomer, updateCustomer,getReturnUpdateCustomer, 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, getAccountAllocationGroup } 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 函数
|
||||||
|
|
||||||
|
@ -1060,6 +1071,9 @@ export default {
|
||||||
// 审批中 设置禁用 - 数据组
|
// 审批中 设置禁用 - 数据组
|
||||||
isDisSjz: false,
|
isDisSjz: false,
|
||||||
|
|
||||||
|
// 客户名称设置禁用
|
||||||
|
isDisCustomer: true,
|
||||||
|
|
||||||
/*****************************企查查查询模块*************************************/
|
/*****************************企查查查询模块*************************************/
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
qccLoading: false,
|
qccLoading: false,
|
||||||
|
@ -1179,6 +1193,18 @@ export default {
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
this.setInitF();
|
this.setInitF();
|
||||||
this.setInitV();
|
this.setInitV();
|
||||||
|
// 保存\提交 按钮显示 - 业务员
|
||||||
|
this.buttonShowSalesman = true;
|
||||||
|
// 明细添加、删除 按钮显示
|
||||||
|
this.bankButtonShow = true;
|
||||||
|
// 提交OA 按钮显示 - 数据组
|
||||||
|
this.buttonShowSjz = true;
|
||||||
|
// 审批中 设置禁用 - 业务员
|
||||||
|
this.isDisSalesman = false;
|
||||||
|
// 审批中 设置禁用 - 数据组
|
||||||
|
this.isDisSjz = false;
|
||||||
|
// 客户名称设置禁用
|
||||||
|
this.isDisCustomer = true;
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
|
@ -1216,29 +1242,47 @@ export default {
|
||||||
this.form.cusSalesman = this.$store.state.user.nickName;
|
this.form.cusSalesman = this.$store.state.user.nickName;
|
||||||
this.buttonShowSalesman = checkRole(['ITZX_SJZ']) ? false : true; // 如果是业务员角色 则保存、提交 按钮显示 反之不显示
|
this.buttonShowSalesman = checkRole(['ITZX_SJZ']) ? false : true; // 如果是业务员角色 则保存、提交 按钮显示 反之不显示
|
||||||
this.buttonShowSjz = checkRole(['ITZX_SJZ']) ? true : false;// 如果是业务员角色 则保存、提交 按钮不显示 反之显示
|
this.buttonShowSjz = checkRole(['ITZX_SJZ']) ? true : false;// 如果是业务员角色 则保存、提交 按钮不显示 反之显示
|
||||||
|
this.isDisCustomer = checkRole(['ITZX_SJZ']) ? false : true;// 如果是数据组角色角色则可编辑客户名称
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
async 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.form = response.data;
|
this.setInfo(response);
|
||||||
// 业务员角色-如果是保存状态则显示 反之不显示
|
|
||||||
this.buttonShowSalesman = this.form.cusApprovalStatus == '0'?true:false;
|
|
||||||
// 业务员提交的数据数据组审核可编辑
|
|
||||||
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.isDisSjz = this.form.cusApprovalStatus == '1'?false:true;
|
|
||||||
// 审批中状态,数据则可编辑
|
|
||||||
this.bankButtonShow = this.form.cusApprovalStatus == '0'?true:false;
|
|
||||||
|
|
||||||
this.bankList = response.data.bankList;
|
|
||||||
this.open = true;
|
|
||||||
this.title = "客户信息";
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/** 错误修订按钮操作 */
|
||||||
|
async handleReturnUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const cusId = row.cusId || this.ids
|
||||||
|
getReturnUpdateCustomer(cusId).then(response => {
|
||||||
|
this.setInfo(response);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 修改按钮操作-详细信息设置 */
|
||||||
|
setInfo(response){
|
||||||
|
this.form = response.data;
|
||||||
|
// 业务员角色-如果是保存状态则显示 反之不显示
|
||||||
|
this.buttonShowSalesman = this.form.cusApprovalStatus == '0'?true:false;
|
||||||
|
// 业务员提交的数据数据组审核可编辑
|
||||||
|
this.isDisSalesman = this.form.cusApprovalStatus == '0' ? false : (checkRole(['ITZX_SJZ'])&&this.form.cusApprovalStatus == '1') ? false : true;
|
||||||
|
// 数据组角色-如果不是完成状态, 驳回、提交OA 按钮显示
|
||||||
|
this.buttonShowSjz = (this.form.cusApprovalStatus != '2' && this.form.cusApprovalStatus != '3') ?true:false;
|
||||||
|
// 数据组角色-如果是审批中状态, 则可编辑
|
||||||
|
this.isDisSjz = this.form.cusApprovalStatus == '1'?false:true;
|
||||||
|
// 审批中状态,数据则可编辑
|
||||||
|
this.bankButtonShow = this.form.cusApprovalStatus == '0'?true:(checkRole(['ITZX_SJZ'])&&this.form.cusApprovalStatus == '1') ? true : false;
|
||||||
|
|
||||||
|
// 有客户错误修订角色则可编辑客户名称
|
||||||
|
this.isDisCustomer = (checkRole(['CUSTOMER_RETURN_UPDATE'])&&this.form.cusApprovalStatus == '1') ? false:(checkRole(['ITZX_SJZ'])&&this.form.cusApprovalStatus != '2')?false:true;
|
||||||
|
|
||||||
|
this.bankList = response.data.bankList;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "客户信息";
|
||||||
|
},
|
||||||
|
|
||||||
/** 保存按钮 */
|
/** 保存按钮 */
|
||||||
saveForm() {
|
saveForm() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
|
|
Loading…
Reference in New Issue