This commit is contained in:
xd 2024-05-27 20:31:32 +08:00
parent 7e212a9064
commit 7e6e964b9b
3 changed files with 82 additions and 17 deletions

View File

@ -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);
}
/** /**
* 新增客户管理 * 新增客户管理
*/ */

View File

@ -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 = {

View File

@ -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 => {