|
|
@@ -1,3 +1,4 @@
|
|
|
+<!-- @Author: Antigravity -->
|
|
|
<template>
|
|
|
<div class="p-2">
|
|
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter"
|
|
|
@@ -36,11 +37,10 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="用户名" align="center" prop="userName" />
|
|
|
<el-table-column label="手机号" align="center" prop="phone" />
|
|
|
- <el-table-column label="微信OpenID" align="center" prop="wechatOpenid" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="微信UnionID" align="center" prop="wechatUnionid" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="授权客户ERP编码" align="center" prop="authClientFNum" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column label="注册时间" align="center" prop="createTime" width="160" />
|
|
|
<el-table-column label="授权客户名称" align="center" prop="authClientName" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="创建时间" align="center" prop="createTime" width="160" />
|
|
|
+ <el-table-column label="授权客户类型" align="center" prop="authClientClass" width="120" />
|
|
|
+ <el-table-column label="授权加入时间" align="center" prop="authClientEnterDate" width="160" />
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120">
|
|
|
<template #default="scope">
|
|
|
<el-tooltip content="授权客户" placement="top">
|
|
|
@@ -56,10 +56,10 @@
|
|
|
</el-card>
|
|
|
|
|
|
<!-- 授权客户对话框 -->
|
|
|
- <el-dialog v-model="authDialog.visible" title="授权客户" width="800px" append-to-body>
|
|
|
+ <el-dialog v-model="authDialog.visible" title="授权客户" width="900px" append-to-body>
|
|
|
<el-form :model="erpQueryParams" ref="erpQueryFormRef" :inline="true" label-width="68px">
|
|
|
<el-form-item label="客户名称" prop="fName">
|
|
|
- <el-input v-model="erpQueryParams.fName" placeholder="请输入客户名称" clearable style="width: 200px"
|
|
|
+ <el-input v-model="erpQueryParams.fName" placeholder="请输入客户名称" clearable style="width: 240px"
|
|
|
@keyup.enter="getErpList" />
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
@@ -68,13 +68,14 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<el-table v-loading="erpLoading" :data="erpList" highlight-current-row @current-change="handleErpCurrentChange">
|
|
|
- <el-table-column label="客户编码" align="center" prop="fnum" />
|
|
|
- <el-table-column label="客户名称" align="center" prop="fname" />
|
|
|
- <el-table-column label="联系人" align="center" prop="contactMan" />
|
|
|
- <el-table-column label="联系电话" align="center" prop="contactTel" />
|
|
|
+ <el-table-column label="代码" align="center" prop="fnum" width="100" :formatter="(row: ErpClientVO) => row.fnum || '-'" />
|
|
|
+ <el-table-column label="名称" align="left" prop="fname" min-width="180" :show-overflow-tooltip="true" :formatter="(row: ErpClientVO) => row.fname || '-'" />
|
|
|
+ <el-table-column label="客户类型" align="center" prop="fclass" width="100" :formatter="(row: ErpClientVO) => row.fclass || '-'" />
|
|
|
+ <el-table-column label="加入名称" align="center" prop="enterName" width="100" :formatter="(row: ErpClientVO) => row.enterName || '-'" />
|
|
|
+ <el-table-column label="加入时间" align="center" prop="enterDate" width="170" :formatter="(row: ErpClientVO) => row.enterDate || '-'" />
|
|
|
</el-table>
|
|
|
<pagination v-show="erpTotal > 0" v-model:page="erpQueryParams.pageNum" v-model:limit="erpQueryParams.pageSize"
|
|
|
- :total="erpTotal" @pagination="getErpList" />
|
|
|
+ :total="erpTotal" layout="total, prev, pager, next" @pagination="getErpList" />
|
|
|
<template #footer>
|
|
|
<div class="dialog-footer">
|
|
|
<el-button :loading="buttonLoading" type="primary" @click="confirmAuth">确 定</el-button>
|
|
|
@@ -89,6 +90,7 @@
|
|
|
import { listCustomer, getCustomer, authCustomer } from '@/api/system/customer';
|
|
|
import { CustomerVO, CustomerQuery, CustomerForm } from '@/api/system/customer/types';
|
|
|
import { listErpClient } from '@/api/erp/client';
|
|
|
+import { ErpClientVO, ErpClientQuery } from '@/api/erp/client/types';
|
|
|
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
|
|
|
@@ -107,14 +109,14 @@ const authDialog = reactive({
|
|
|
customerId: undefined as string | number | undefined
|
|
|
});
|
|
|
const erpLoading = ref(false);
|
|
|
-const erpList = ref<any[]>([]);
|
|
|
+const erpList = ref<ErpClientVO[]>([]);
|
|
|
const erpTotal = ref(0);
|
|
|
-const erpQueryParams = reactive({
|
|
|
+const erpQueryParams = reactive<ErpClientQuery>({
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
fName: undefined
|
|
|
});
|
|
|
-const selectedErpClient = ref<any>(null);
|
|
|
+const selectedErpClient = ref<ErpClientVO | null>(null);
|
|
|
const erpQueryFormRef = ref<ElFormInstance>();
|
|
|
|
|
|
const data = reactive<PageData<CustomerForm, CustomerQuery>>({
|
|
|
@@ -182,7 +184,7 @@ const resetErpQuery = () => {
|
|
|
};
|
|
|
|
|
|
/** ERP客户行选中 */
|
|
|
-const handleErpCurrentChange = (val: any) => {
|
|
|
+const handleErpCurrentChange = (val: ErpClientVO | null) => {
|
|
|
selectedErpClient.value = val;
|
|
|
};
|
|
|
|
|
|
@@ -194,7 +196,7 @@ const confirmAuth = async () => {
|
|
|
}
|
|
|
buttonLoading.value = true;
|
|
|
try {
|
|
|
- await authCustomer(authDialog.customerId!, selectedErpClient.value.fnum);
|
|
|
+ await authCustomer(authDialog.customerId!, selectedErpClient.value.frowId);
|
|
|
proxy?.$modal.msgSuccess('授权成功');
|
|
|
authDialog.visible = false;
|
|
|
getList();
|
|
|
@@ -207,3 +209,14 @@ onMounted(() => {
|
|
|
getList();
|
|
|
});
|
|
|
</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+/** @Author: Antigravity - 优化弹窗分页居中 */
|
|
|
+:deep(.el-dialog .pagination-container) {
|
|
|
+ display: flex !important;
|
|
|
+ justify-content: center !important;
|
|
|
+ background-color: transparent !important;
|
|
|
+ padding: 20px 0 10px 0 !important;
|
|
|
+ margin-top: 0 !important;
|
|
|
+}
|
|
|
+</style>
|