pull/781/head
parent
6667e8b300
commit
50691d39d1
|
|
@ -0,0 +1,20 @@
|
||||||
|
<template>
|
||||||
|
|
||||||
|
<ContentWrap :bodyStyle="{ padding: '0px' }" class="!mb-0">
|
||||||
|
<IFrame :src="src" />
|
||||||
|
</ContentWrap>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
|
||||||
|
defineOptions({ name: 'previewDoc' })
|
||||||
|
|
||||||
|
const { query } = useRoute() // 查询参数
|
||||||
|
const src = ref('')
|
||||||
|
console.log('%csrccomponents/IFrame/src/preview.vue:13 query.fileExtension', 'color: #007acc;', query.src);
|
||||||
|
if(query.type === 'pdf') {
|
||||||
|
src.value = decodeURIComponent(query.src)
|
||||||
|
} else {
|
||||||
|
src.value = 'https://view.officeapps.live.com/op/embed.aspx?src='+query.src
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
@ -26,7 +26,10 @@
|
||||||
<Icon class="mr-5px" icon="ep:refresh" />
|
<Icon class="mr-5px" icon="ep:refresh" />
|
||||||
重置
|
重置
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button v-hasPermi="['crm:contact:create']" type="primary" @click="openForm('create')">
|
||||||
|
<Icon class="mr-5px" icon="ep:plus" />
|
||||||
|
新增联系人
|
||||||
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
@ -54,12 +57,16 @@
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
||||||
|
<!-- 表单弹窗:添加/修改 -->
|
||||||
|
<ContactForm ref="formRef" @success="getList" />
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||||
import * as ContactApi from '@/api/crm/contact'
|
import * as ContactApi from '@/api/crm/contact'
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
|
import ContactForm from '@/views/crm/contact/ContactForm.vue'
|
||||||
import download from '@/utils/download'
|
import download from '@/utils/download'
|
||||||
import { BillTemplateApi, BillTemplateVO } from '@/api/crm/billtemplate'
|
import { BillTemplateApi, BillTemplateVO } from '@/api/crm/billtemplate'
|
||||||
|
|
||||||
|
|
@ -88,7 +95,6 @@ const exportLoading = ref(false) // 导出的加载中
|
||||||
const open = async (data: [], id) => {
|
const open = async (data: [], id) => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
multipleSelection.value = data
|
multipleSelection.value = data
|
||||||
console.log('%csrc/components/contact/index.vue:91 id', 'color: #007acc;', id);
|
|
||||||
queryParams.customerId = id
|
queryParams.customerId = id
|
||||||
await getList()
|
await getList()
|
||||||
await setSelections()
|
await setSelections()
|
||||||
|
|
@ -100,6 +106,12 @@ const getRowKey = (row) => {
|
||||||
return row.id
|
return row.id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 添加/修改操作 */
|
||||||
|
const formRef = ref()
|
||||||
|
const openForm = (type: string, id?: number) => {
|
||||||
|
formRef.value.open(type,id, queryParams.customerId)
|
||||||
|
}
|
||||||
|
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
|
|
|
||||||
|
|
@ -517,7 +517,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
||||||
name: 'CrmCustomerDetail',
|
name: 'CrmCustomerDetail',
|
||||||
meta: {
|
meta: {
|
||||||
title: '客户详情',
|
title: '客户详情',
|
||||||
noCache: true,
|
noCache: false,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
activeMenu: '/crm/customer'
|
activeMenu: '/crm/customer'
|
||||||
},
|
},
|
||||||
|
|
@ -773,6 +773,18 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
||||||
title: '合同预览',
|
title: '合同预览',
|
||||||
activeMenu: '/crm/filetemplate'
|
activeMenu: '/crm/filetemplate'
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'filetemplate/preview',
|
||||||
|
component: () => import('@/components/IFrame/src/preview.vue'),
|
||||||
|
name: 'FileTemplatePreview',
|
||||||
|
meta: {
|
||||||
|
noCache: true,
|
||||||
|
hidden: true,
|
||||||
|
canTo: true,
|
||||||
|
title: '文件预览',
|
||||||
|
activeMenu: '/filetemplate/preview'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -484,6 +484,6 @@ onMounted(async () => {
|
||||||
// formData.value.ownerUserId = useUserStore().getUser.id
|
// formData.value.ownerUserId = useUserStore().getUser.id
|
||||||
// }
|
// }
|
||||||
// 获取联系人
|
// 获取联系人
|
||||||
contactList.value = await ContactApi.getSimpleContactList()
|
contactList.value = await CustomerApi.getCustomerSimpleList()
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -93,14 +93,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="授信计算周期" prop="creditCalcCycle" >
|
<el-form-item label="授信计算周期" prop="creditCalcCycle" >
|
||||||
<el-select v-model="formData.creditCalcCycle" placeholder="" disabled>
|
<el-input v-model="formData.creditCalcCycle" placeholder="" disabled />
|
||||||
<el-option
|
|
||||||
v-for="dict in getIntDictOptions('credit_calc_cycle')"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
|
|
@ -268,7 +261,18 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="商务负责人" prop="ownerUserId">
|
<el-form-item label="商务负责人" prop="ownerUserId">
|
||||||
<el-input v-model="formData.ownerUserId" placeholder="" disabled />
|
<el-select
|
||||||
|
v-model="formData.ownerUserId"
|
||||||
|
disabled
|
||||||
|
class="w-1/1"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in userOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.nickname"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
:rules="formRules"
|
:rules="formRules"
|
||||||
label-width="130px"
|
label-width="142px"
|
||||||
v-loading="formLoading"
|
v-loading="formLoading"
|
||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
<el-input v-model="formData.regType" disabled placeholder="自动获取" />
|
<el-input v-model="formData.regType" disabled placeholder="自动获取" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<!-- <el-col :span="8">
|
||||||
<el-form-item label="上市情况" prop="customerId">
|
<el-form-item label="上市情况" prop="customerId">
|
||||||
<el-select v-model="formData.customerId" placeholder="请选择上市情况" disabled @change="onCustomerChange">
|
<el-select v-model="formData.customerId" placeholder="请选择上市情况" disabled @change="onCustomerChange">
|
||||||
<el-option
|
<el-option
|
||||||
|
|
@ -35,13 +35,13 @@
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<!-- <el-col :span="8">
|
<!-- <el-col :span="8">
|
||||||
<el-form-item label="合作类型" prop="cooperationType">
|
<el-form-item label="合作类型" prop="cooperationType">
|
||||||
<el-input v-model="formData.cooperationType" disabled />
|
<el-input v-model="formData.cooperationType" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
<el-col :span="8">
|
<!-- <el-col :span="8">
|
||||||
<el-form-item label="融资信息" prop="companyType">
|
<el-form-item label="融资信息" prop="companyType">
|
||||||
<el-select v-model="formData.customerId" placeholder="请选择融资信息" disabled @change="onCustomerChange">
|
<el-select v-model="formData.customerId" placeholder="请选择融资信息" disabled @change="onCustomerChange">
|
||||||
<el-option
|
<el-option
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="实缴资金" prop="paidInCapital">
|
<el-form-item label="实缴资金" prop="paidInCapital">
|
||||||
<el-input v-model="formData.actualCapital" disabled />
|
<el-input v-model="formData.actualCapital" disabled />
|
||||||
|
|
@ -123,7 +123,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="目前额度" prop="creditLimit">
|
<el-form-item label="目前额度" prop="creditLimit">
|
||||||
<el-input v-model="formData.creditLimit" placeholder="请输入目前额度" disabled />
|
<el-input v-model="formData.creditLimit" placeholder="" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
|
|
@ -132,7 +132,7 @@
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in orgList"
|
v-for="dict in orgList"
|
||||||
:key="dict.id"
|
:key="dict.id"
|
||||||
:label="dict.name"
|
:label="dict.orgName"
|
||||||
:value="dict.id"
|
:value="dict.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
@ -140,12 +140,12 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="调整金额(元)" prop="changeAmount">
|
<el-form-item label="调整金额(元)" prop="changeAmount">
|
||||||
<el-input v-model="formData.changeAmount" type="number" :disabled="!!type" placeholder="请输入调整金额(元)" @input="onChangeAmount" />
|
<el-input v-model="formData.changeAmount" oninput="value=value.match(/^\d+(?:\.\d{0,2})?/)" :disabled="!!type" placeholder="请输入调整金额(元)" @input="onChangeAmount" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="最终额度" prop="afterAmount">
|
<el-form-item label="最终额度" prop="afterAmount">
|
||||||
<el-input v-model="formData.afterAmount" type="number" disabled placeholder="请输入最终额度" />
|
<el-input v-model="formData.afterAmount" type="number" disabled placeholder="" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
|
|
@ -276,7 +276,7 @@ watch(
|
||||||
)
|
)
|
||||||
|
|
||||||
const onChangeAmount = async (amount: number) => {
|
const onChangeAmount = async (amount: number) => {
|
||||||
formData.value.afterAmount = Number(formData.value.creditLimit) + Number(amount);
|
formData.value.afterAmount = Number(formData.value.creditLimit) + Number(amount).toFixed(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
const onCustomerChange = async (customerId: string) => {
|
const onCustomerChange = async (customerId: string) => {
|
||||||
|
|
@ -385,7 +385,7 @@ const resetForm = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// const route = useRoute();
|
// const route = useRoute();
|
||||||
// onMounted(async () => {
|
onMounted(async () => {
|
||||||
// console.log('%csrc/views/crm/quotation/QuotationForm.vue:596 route', 'color: #007acc;', route);
|
// console.log('%csrc/views/crm/quotation/QuotationForm.vue:596 route', 'color: #007acc;', route);
|
||||||
// formType.value = route.query.id;
|
// formType.value = route.query.id;
|
||||||
|
|
||||||
|
|
@ -404,10 +404,10 @@ const resetForm = () => {
|
||||||
// businessList.value = await BusinessApi.getSimpleBusinessList()
|
// businessList.value = await BusinessApi.getSimpleBusinessList()
|
||||||
// // 获得部门树
|
// // 获得部门树
|
||||||
// deptTree.value = handleTree(await DeptApi.getSimpleDeptList())
|
// deptTree.value = handleTree(await DeptApi.getSimpleDeptList())
|
||||||
// const org = await ContractApi.getOrg({
|
const org = await ContractApi.getOrg({
|
||||||
// pageNo: 1,
|
pageNo: 1,
|
||||||
// pageSize: 1000
|
pageSize: 1000
|
||||||
// })
|
})
|
||||||
// orgList.value = org.list
|
orgList.value = org.list
|
||||||
// });
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -94,14 +94,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="授信计算周期" prop="creditCalcCycle" >
|
<el-form-item label="授信计算周期" prop="creditCalcCycle" >
|
||||||
<el-select v-model="formData.creditCalcCycle" placeholder="" disabled>
|
<el-input v-model="formData.creditCalcCycle" placeholder="" disabled />
|
||||||
<el-option
|
|
||||||
v-for="dict in getIntDictOptions('credit_calc_cycle')"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
|
|
@ -268,7 +261,18 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="商务负责人" prop="ownerUserId">
|
<el-form-item label="商务负责人" prop="ownerUserId">
|
||||||
<el-input v-model="formData.ownerUserId" placeholder="" disabled />
|
<el-select
|
||||||
|
v-model="formData.ownerUserId"
|
||||||
|
disabled
|
||||||
|
class="w-1/1"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in userOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.nickname"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
|
|
|
||||||
|
|
@ -283,7 +283,7 @@
|
||||||
command="handlePrint"
|
command="handlePrint"
|
||||||
v-if="checkPermi(['crm:contract:print']) && scope.row.auditStatus === 2"
|
v-if="checkPermi(['crm:contract:print']) && scope.row.auditStatus === 2"
|
||||||
>
|
>
|
||||||
打印合同
|
合同下载
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
command="handleDelete"
|
command="handleDelete"
|
||||||
|
|
|
||||||
|
|
@ -27,11 +27,22 @@
|
||||||
align="center"
|
align="center"
|
||||||
prop="nextTime"
|
prop="nextTime"
|
||||||
:formatter="dateFormatter"
|
:formatter="dateFormatter"
|
||||||
width="180px"
|
width="180px" />
|
||||||
/>
|
<el-table-column label="图片" align="center" prop="picUrls">
|
||||||
<el-table-column label="图片" align="center" prop="picUrls" />
|
<template #default="scope">
|
||||||
|
<el-link
|
||||||
|
v-if="scope.row.picUrls"
|
||||||
|
:underline="false"
|
||||||
|
type="primary"
|
||||||
|
@click="previewPic(scope.row.picUrls)"
|
||||||
|
>
|
||||||
|
预览
|
||||||
|
</el-link>
|
||||||
|
<span v-else>无附件</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="附件" align="center" prop="fileUrls">
|
<el-table-column label="附件" align="center" prop="fileUrls">
|
||||||
<!-- <template #default="scope">
|
<template #default="scope">
|
||||||
<el-link
|
<el-link
|
||||||
v-if="scope.row.fileUrls"
|
v-if="scope.row.fileUrls"
|
||||||
:underline="false"
|
:underline="false"
|
||||||
|
|
@ -41,7 +52,7 @@
|
||||||
预览
|
预览
|
||||||
</el-link>
|
</el-link>
|
||||||
<span v-else>无附件</span>
|
<span v-else>无附件</span>
|
||||||
</template> -->
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="关联的联系人编号数组" align="center" prop="contactIds" />
|
<el-table-column label="关联的联系人编号数组" align="center" prop="contactIds" />
|
||||||
<el-table-column label="创建者" align="center" prop="creator" >
|
<el-table-column label="创建者" align="center" prop="creator" >
|
||||||
|
|
@ -88,6 +99,12 @@
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
|
<el-image-viewer
|
||||||
|
v-if="show"
|
||||||
|
:url-list="urlList"
|
||||||
|
show-progress
|
||||||
|
@close="show = false"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- 表单弹窗:添加/修改 -->
|
<!-- 表单弹窗:添加/修改 -->
|
||||||
<ReturnVisitRecordForm ref="formRef" @success="getList" />
|
<ReturnVisitRecordForm ref="formRef" @success="getList" />
|
||||||
|
|
@ -110,7 +127,8 @@ const props = defineProps<{
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const userOptions = ref<UserApi.UserVO[]>([]) // 用户列表
|
const userOptions = ref<UserApi.UserVO[]>([]) // 用户列表
|
||||||
|
const show = ref(false)
|
||||||
|
const urlList = ref([])
|
||||||
const loading = ref(true) // 列表的加载中
|
const loading = ref(true) // 列表的加载中
|
||||||
const list = ref<ReturnVisitRecordVO[]>([]) // 列表的数据
|
const list = ref<ReturnVisitRecordVO[]>([]) // 列表的数据
|
||||||
const total = ref(0) // 列表的总页数
|
const total = ref(0) // 列表的总页数
|
||||||
|
|
@ -190,9 +208,17 @@ const handleExport = async () => {
|
||||||
exportLoading.value = false
|
exportLoading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const router = useRouter() // 路由
|
||||||
|
|
||||||
|
const previewPic = (val) => {
|
||||||
|
show.value = true
|
||||||
|
urlList.value = val.split(',')
|
||||||
|
}
|
||||||
|
|
||||||
const previewFile = (fileUrls) => {
|
const previewFile = (fileUrls) => {
|
||||||
// 假设 fileUrls 是一个字符串,包含文件的完整 URL
|
|
||||||
|
|
||||||
|
// // 假设 fileUrls 是一个字符串,包含文件的完整 URL
|
||||||
if (!fileUrls) {
|
if (!fileUrls) {
|
||||||
message.error('没有附件');
|
message.error('没有附件');
|
||||||
return;
|
return;
|
||||||
|
|
@ -200,25 +226,13 @@ const previewFile = (fileUrls) => {
|
||||||
|
|
||||||
// 检查文件类型
|
// 检查文件类型
|
||||||
const fileExtension = fileUrls.split('.').pop().toLowerCase();
|
const fileExtension = fileUrls.split('.').pop().toLowerCase();
|
||||||
switch (fileExtension) {
|
router.push({
|
||||||
case 'pdf':
|
name: 'FileTemplatePreview',
|
||||||
// 预览 PDF 文件
|
query: {
|
||||||
window.open(fileUrls, '_blank');
|
src: encodeURIComponent(fileUrls),
|
||||||
break;
|
type: fileExtension
|
||||||
case 'xlsx':
|
}
|
||||||
case 'xls':
|
})
|
||||||
// 预览 Excel 文件
|
|
||||||
window.open(fileUrls, '_blank');
|
|
||||||
break;
|
|
||||||
case 'doc':
|
|
||||||
case 'docx':
|
|
||||||
// 预览 Word 文件
|
|
||||||
window.open(fileUrls, '_blank');
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
message.error('不支持的文件类型');
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
const getName = (opt, val) => {
|
const getName = (opt, val) => {
|
||||||
const arr = opt.filter(v => v.id == val)
|
const arr = opt.filter(v => v.id == val)
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,32 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="跟进内容" prop="content" />
|
<el-table-column align="center" label="跟进内容" prop="content" />
|
||||||
|
<el-table-column label="图片" align="center" prop="picUrls">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-link
|
||||||
|
v-if="scope.row.picUrls"
|
||||||
|
:underline="false"
|
||||||
|
type="primary"
|
||||||
|
@click="previewPic(scope.row.picUrls)"
|
||||||
|
>
|
||||||
|
预览
|
||||||
|
</el-link>
|
||||||
|
<span v-else>无附件</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="附件" align="center" prop="fileUrls">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-link
|
||||||
|
v-if="scope.row.fileUrls"
|
||||||
|
:underline="false"
|
||||||
|
type="primary"
|
||||||
|
@click="previewFile(scope.row.fileUrls)"
|
||||||
|
>
|
||||||
|
预览
|
||||||
|
</el-link>
|
||||||
|
<span v-else>无附件</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:formatter="dateFormatter"
|
:formatter="dateFormatter"
|
||||||
align="center"
|
align="center"
|
||||||
|
|
@ -84,6 +110,14 @@
|
||||||
/>
|
/>
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
|
|
||||||
|
<el-image-viewer
|
||||||
|
v-if="show"
|
||||||
|
:url-list="urlList"
|
||||||
|
show-progress
|
||||||
|
@close="show = false"
|
||||||
|
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- 表单弹窗:添加/修改 -->
|
<!-- 表单弹窗:添加/修改 -->
|
||||||
<FollowUpRecordForm ref="formRef" @success="getList" />
|
<FollowUpRecordForm ref="formRef" @success="getList" />
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -104,7 +138,8 @@ const props = defineProps<{
|
||||||
}>()
|
}>()
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
|
const show = ref(false)
|
||||||
|
const urlList = ref([])
|
||||||
const loading = ref(true) // 列表的加载中
|
const loading = ref(true) // 列表的加载中
|
||||||
const list = ref<FollowUpRecordVO[]>([]) // 列表的数据
|
const list = ref<FollowUpRecordVO[]>([]) // 列表的数据
|
||||||
const total = ref(0) // 列表的总页数
|
const total = ref(0) // 列表的总页数
|
||||||
|
|
@ -127,6 +162,11 @@ const getList = async () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const previewPic = (val) => {
|
||||||
|
show.value = true
|
||||||
|
urlList.value = val.split(',')
|
||||||
|
}
|
||||||
|
|
||||||
/** 添加/修改操作 */
|
/** 添加/修改操作 */
|
||||||
const formRef = ref<InstanceType<typeof FollowUpRecordForm>>()
|
const formRef = ref<InstanceType<typeof FollowUpRecordForm>>()
|
||||||
const openForm = () => {
|
const openForm = () => {
|
||||||
|
|
@ -146,6 +186,26 @@ const handleDelete = async (id: number) => {
|
||||||
} catch {}
|
} catch {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//预览
|
||||||
|
const previewFile = (fileUrls) => {
|
||||||
|
// // 假设 fileUrls 是一个字符串,包含文件的完整 URL
|
||||||
|
if (!fileUrls) {
|
||||||
|
message.error('没有附件');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查文件类型
|
||||||
|
const router = useRouter() // 路由
|
||||||
|
const fileExtension = fileUrls.split('.').pop().toLowerCase();
|
||||||
|
router.push({
|
||||||
|
name: 'FileTemplatePreview',
|
||||||
|
query: {
|
||||||
|
src: encodeURIComponent(fileUrls),
|
||||||
|
type: fileExtension
|
||||||
|
}
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
/** 打开联系人详情 */
|
/** 打开联系人详情 */
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
const openContactDetail = (id: number) => {
|
const openContactDetail = (id: number) => {
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="客户" prop="customerId">
|
<el-form-item label="客户" prop="customerId">
|
||||||
<el-select v-model="formData.customerId" placeholder="请选择客户" disabled clearable @change="onCustomerChange">
|
<el-select v-model="formData.customerId" placeholder="" disabled clearable @change="onCustomerChange">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in customerList"
|
v-for="item in customerList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
|
@ -243,7 +243,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="方案报价人" prop="pricingUserId">
|
<el-form-item label="方案报价人" prop="pricingUserId">
|
||||||
<el-select v-model="formData.pricingUserId" placeholder="请选择方案报价人">
|
<el-select v-model="formData.pricingUserId" disabled placeholder="请选择方案报价人">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in userOptions"
|
v-for="dict in userOptions"
|
||||||
:key="dict.id"
|
:key="dict.id"
|
||||||
|
|
@ -396,6 +396,7 @@ import * as UserApi from '@/api/system/user'
|
||||||
import * as DeptApi from '@/api/system/dept'
|
import * as DeptApi from '@/api/system/dept'
|
||||||
import * as BusinessApi from '@/api/crm/business'
|
import * as BusinessApi from '@/api/crm/business'
|
||||||
import { propTypes } from '@/utils/propTypes'
|
import { propTypes } from '@/utils/propTypes'
|
||||||
|
import { useUserStore } from '@/store/modules/user';
|
||||||
|
|
||||||
/** CRM 方案报价 表单 */
|
/** CRM 方案报价 表单 */
|
||||||
defineOptions({ name: 'QuotationForm' })
|
defineOptions({ name: 'QuotationForm' })
|
||||||
|
|
@ -708,6 +709,9 @@ onMounted(async () => {
|
||||||
|
|
||||||
if (formType.value) open(formType.value)
|
if (formType.value) open(formType.value)
|
||||||
|
|
||||||
|
formData.value.pricingUserId = useUserStore().getUser.id;
|
||||||
|
|
||||||
|
|
||||||
// 获得客户列表
|
// 获得客户列表
|
||||||
customerList.value = await CustomerApi.getSelfCustomerSimpleList()
|
customerList.value = await CustomerApi.getSelfCustomerSimpleList()
|
||||||
// 获得用户列表
|
// 获得用户列表
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,11 @@
|
||||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||||
<el-table-column label="唯一主键" align="center" prop="id" />
|
<el-table-column label="唯一主键" align="center" prop="id" />
|
||||||
<!-- <el-table-column label="项目ID" align="center" prop="projectId" /> -->
|
<!-- <el-table-column label="项目ID" align="center" prop="projectId" /> -->
|
||||||
<el-table-column label="姓名" align="center" prop="userId" />
|
<el-table-column label="姓名" align="center" prop="userId">
|
||||||
|
<template #default="scope">
|
||||||
|
{{getName(userOptions, scope.row.userId)}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="系统占比" align="center" prop="bonusPercentage">
|
<el-table-column label="系统占比" align="center" prop="bonusPercentage">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{(scope.row.bonusPercentage * 100).toFixed(2) + '%'}}
|
{{(scope.row.bonusPercentage * 100).toFixed(2) + '%'}}
|
||||||
|
|
@ -143,6 +147,11 @@ const handleExport = async () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getName = (opt, val) => {
|
||||||
|
const arr = opt.filter(v => v.id == val)
|
||||||
|
return arr.length ? arr[0]['nickname'] : ''
|
||||||
|
}
|
||||||
|
|
||||||
/** 初始化 **/
|
/** 初始化 **/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList()
|
getList()
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@
|
||||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||||
<el-table-column label="序号" align="center" prop="id" />
|
<el-table-column label="序号" align="center" prop="id" />
|
||||||
<el-table-column label="任务标题" align="center" prop="taskName" />
|
<el-table-column label="任务标题" align="center" prop="taskName" />
|
||||||
<el-table-column label="任务编号" align="center" prop="taskNo" />
|
<el-table-column label="任务编号" align="center" prop="taskNo" width="150" />
|
||||||
<el-table-column label="任务进度" align="center" prop="taskProgress">
|
<el-table-column label="任务进度" align="center" prop="taskProgress">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{Math.floor(scope.row.taskProgress * 100)}}
|
{{Math.floor(scope.row.taskProgress * 100) +'%'}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="任务状态" align="center" prop="taskStateName" />
|
<el-table-column label="任务状态" align="center" prop="taskStateName" />
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,19 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="项目开始日期" align="center" prop="startDate" width="170" />
|
<el-table-column label="项目开始日期" align="center" prop="startDate" width="170" />
|
||||||
<el-table-column label="项目结束日期" align="center" prop="endDate" width="170" />
|
<el-table-column label="项目结束日期" align="center" prop="endDate" width="170" />
|
||||||
<el-table-column label="项目附件" align="center" prop="attachment" />
|
<el-table-column label="项目附件" align="center" prop="attachment">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-link
|
||||||
|
v-if="scope.row.attachment"
|
||||||
|
:underline="false"
|
||||||
|
type="primary"
|
||||||
|
@click="previewFile(scope.row.attachment)"
|
||||||
|
>
|
||||||
|
预览
|
||||||
|
</el-link>
|
||||||
|
<span v-else>无附件</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="立项奖金评估" align="center" prop="bonusEvaluation" width="120">
|
<el-table-column label="立项奖金评估" align="center" prop="bonusEvaluation" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{scope.row.bonusEvaluation ? '是' : '否'}}
|
{{scope.row.bonusEvaluation ? '是' : '否'}}
|
||||||
|
|
@ -248,8 +260,8 @@
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 表单弹窗:添加/修改 -->
|
<!-- 表单弹窗:添加/修改 -->
|
||||||
<ProjectTaskForm ref="taskRef" @success="getList" />
|
<ProjectTaskForm ref="taskRef" @success="getList" :userOptions="userOptions" />
|
||||||
<ProjectBonusForm ref="bonusRef" @success="getList" :userOptions="userOptions" />
|
<ProjectBonusForm ref="bonusRef" @success="getList" :userOptions="userOptions" :id="projectId" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|
@ -268,7 +280,7 @@ defineOptions({ name: 'Project' })
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const userOptions = ref<UserApi.UserVO[]>([]) // 用户列表
|
const userOptions = ref<UserApi.UserVO[]>([]) // 用户列表
|
||||||
|
const projectId = ref('')
|
||||||
const loading = ref(true) // 列表的加载中
|
const loading = ref(true) // 列表的加载中
|
||||||
const list = ref<ProjectVO[]>([]) // 列表的数据
|
const list = ref<ProjectVO[]>([]) // 列表的数据
|
||||||
const total = ref(0) // 列表的总页数
|
const total = ref(0) // 列表的总页数
|
||||||
|
|
@ -365,11 +377,32 @@ const bonusRef = ref()
|
||||||
const taskRef = ref()
|
const taskRef = ref()
|
||||||
|
|
||||||
const openAddUserForm = (row) => {
|
const openAddUserForm = (row) => {
|
||||||
bonusRef.value.open(row.id)
|
projectId.value = row.id
|
||||||
|
bonusRef.value.open(row)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//预览
|
||||||
|
const previewFile = (fileUrls) => {
|
||||||
|
// // 假设 fileUrls 是一个字符串,包含文件的完整 URL
|
||||||
|
if (!fileUrls) {
|
||||||
|
message.error('没有附件');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查文件类型
|
||||||
|
const fileExtension = fileUrls.split('.').pop().toLowerCase();
|
||||||
|
router.push({
|
||||||
|
name: 'FileTemplatePreview',
|
||||||
|
query: {
|
||||||
|
src: encodeURIComponent(fileUrls),
|
||||||
|
type: fileExtension
|
||||||
|
}
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
const handleAddTask = (row) => {
|
const handleAddTask = (row) => {
|
||||||
taskRef.value.open(row.id)
|
row.type = 'create'
|
||||||
|
taskRef.value.open(row)
|
||||||
}
|
}
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
const handleDelete = async (id: number) => {
|
const handleDelete = async (id: number) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue