|
|
|
@ -94,6 +94,17 @@
|
|
|
|
|
v-hasPermi="['customer:customer:export']"
|
|
|
|
|
>导出</el-button>
|
|
|
|
|
</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>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
@ -168,7 +179,7 @@
|
|
|
|
|
<el-row :gutter="8">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<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-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -889,7 +900,7 @@
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<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 { 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,
|
|
|
|
|
|
|
|
|
|
// 客户名称设置禁用
|
|
|
|
|
isDisCustomer: true,
|
|
|
|
|
|
|
|
|
|
/*****************************企查查查询模块*************************************/
|
|
|
|
|
// 遮罩层
|
|
|
|
|
qccLoading: false,
|
|
|
|
@ -1179,6 +1193,18 @@ export default {
|
|
|
|
|
this.resetForm("form");
|
|
|
|
|
this.setInitF();
|
|
|
|
|
this.setInitV();
|
|
|
|
|
// 保存\提交 按钮显示 - 业务员
|
|
|
|
|
this.buttonShowSalesman = true;
|
|
|
|
|
// 明细添加、删除 按钮显示
|
|
|
|
|
this.bankButtonShow = true;
|
|
|
|
|
// 提交OA 按钮显示 - 数据组
|
|
|
|
|
this.buttonShowSjz = true;
|
|
|
|
|
// 审批中 设置禁用 - 业务员
|
|
|
|
|
this.isDisSalesman = false;
|
|
|
|
|
// 审批中 设置禁用 - 数据组
|
|
|
|
|
this.isDisSjz = false;
|
|
|
|
|
// 客户名称设置禁用
|
|
|
|
|
this.isDisCustomer = true;
|
|
|
|
|
},
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
|
handleQuery() {
|
|
|
|
@ -1216,29 +1242,47 @@ export default {
|
|
|
|
|
this.form.cusSalesman = this.$store.state.user.nickName;
|
|
|
|
|
this.buttonShowSalesman = checkRole(['ITZX_SJZ']) ? false : true; // 如果是业务员角色 则保存、提交 按钮显示 反之不显示
|
|
|
|
|
this.buttonShowSjz = checkRole(['ITZX_SJZ']) ? true : false;// 如果是业务员角色 则保存、提交 按钮不显示 反之显示
|
|
|
|
|
this.isDisCustomer = checkRole(['ITZX_SJZ']) ? false : true;// 如果是数据组角色角色则可编辑客户名称
|
|
|
|
|
},
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
async handleUpdate(row) {
|
|
|
|
|
this.reset();
|
|
|
|
|
const cusId = row.cusId || this.ids
|
|
|
|
|
getCustomer(cusId).then(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'?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 = "客户信息";
|
|
|
|
|
this.setInfo(response);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/** 错误修订按钮操作 */
|
|
|
|
|
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;
|
|
|
|
|
// 数据组角色-如果不是完成且驳回状态、提交SAP、驳回 按钮显示
|
|
|
|
|
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() {
|
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
|