diff --git a/src/components/IFrame/src/preview.vue b/src/components/IFrame/src/preview.vue
new file mode 100644
index 000000000..faad24718
--- /dev/null
+++ b/src/components/IFrame/src/preview.vue
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
diff --git a/src/components/contact/index.vue b/src/components/contact/index.vue
index 0257d50d1..9c1c0fb3c 100644
--- a/src/components/contact/index.vue
+++ b/src/components/contact/index.vue
@@ -26,7 +26,10 @@
重置
-
+
+
+ 新增联系人
+
@@ -54,12 +57,16 @@
+
+
+
diff --git a/src/views/crm/contract/ContractForm.vue b/src/views/crm/contract/ContractForm.vue
index 8571061d6..1a5cd9049 100644
--- a/src/views/crm/contract/ContractForm.vue
+++ b/src/views/crm/contract/ContractForm.vue
@@ -93,14 +93,7 @@
-
-
-
+
@@ -268,7 +261,18 @@
-
+
+
+
diff --git a/src/views/crm/contract/components/ContractChangeLimit.vue b/src/views/crm/contract/components/ContractChangeLimit.vue
index c59d606c9..d3616093d 100644
--- a/src/views/crm/contract/components/ContractChangeLimit.vue
+++ b/src/views/crm/contract/components/ContractChangeLimit.vue
@@ -3,7 +3,7 @@
ref="formRef"
:model="formData"
:rules="formRules"
- label-width="130px"
+ label-width="142px"
v-loading="formLoading"
>
@@ -24,7 +24,7 @@
-
+
-
+
@@ -123,7 +123,7 @@
-
+
@@ -132,7 +132,7 @@
@@ -140,12 +140,12 @@
-
+
-
+
@@ -276,7 +276,7 @@ watch(
)
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) => {
@@ -385,7 +385,7 @@ const resetForm = () => {
}
// const route = useRoute();
-// onMounted(async () => {
+onMounted(async () => {
// console.log('%csrc/views/crm/quotation/QuotationForm.vue:596 route', 'color: #007acc;', route);
// formType.value = route.query.id;
@@ -404,10 +404,10 @@ const resetForm = () => {
// businessList.value = await BusinessApi.getSimpleBusinessList()
// // 获得部门树
// deptTree.value = handleTree(await DeptApi.getSimpleDeptList())
-// const org = await ContractApi.getOrg({
-// pageNo: 1,
-// pageSize: 1000
-// })
-// orgList.value = org.list
-// });
+ const org = await ContractApi.getOrg({
+ pageNo: 1,
+ pageSize: 1000
+ })
+ orgList.value = org.list
+});
\ No newline at end of file
diff --git a/src/views/crm/contract/detail/ContractDetail.vue b/src/views/crm/contract/detail/ContractDetail.vue
index b45d3939e..8cda5246d 100644
--- a/src/views/crm/contract/detail/ContractDetail.vue
+++ b/src/views/crm/contract/detail/ContractDetail.vue
@@ -94,14 +94,7 @@
-
-
-
+
@@ -268,7 +261,18 @@
-
+
+
+
diff --git a/src/views/crm/contract/index.vue b/src/views/crm/contract/index.vue
index d85007aae..63cd9bda0 100644
--- a/src/views/crm/contract/index.vue
+++ b/src/views/crm/contract/index.vue
@@ -283,7 +283,7 @@
command="handlePrint"
v-if="checkPermi(['crm:contract:print']) && scope.row.auditStatus === 2"
>
- 打印合同
+ 合同下载
-
+ width="180px" />
+
+
+
+ 预览
+
+ 无附件
+
+
-
+
@@ -88,6 +99,12 @@
@pagination="getList"
/>
+
@@ -110,7 +127,8 @@ const props = defineProps<{
const message = useMessage() // 消息弹窗
const { t } = useI18n() // 国际化
const userOptions = ref([]) // 用户列表
-
+const show = ref(false)
+const urlList = ref([])
const loading = ref(true) // 列表的加载中
const list = ref([]) // 列表的数据
const total = ref(0) // 列表的总页数
@@ -190,9 +208,17 @@ const handleExport = async () => {
exportLoading.value = false
}
}
+const router = useRouter() // 路由
+
+const previewPic = (val) => {
+ show.value = true
+ urlList.value = val.split(',')
+}
const previewFile = (fileUrls) => {
- // 假设 fileUrls 是一个字符串,包含文件的完整 URL
+
+
+ // // 假设 fileUrls 是一个字符串,包含文件的完整 URL
if (!fileUrls) {
message.error('没有附件');
return;
@@ -200,25 +226,13 @@ const previewFile = (fileUrls) => {
// 检查文件类型
const fileExtension = fileUrls.split('.').pop().toLowerCase();
- switch (fileExtension) {
- case 'pdf':
- // 预览 PDF 文件
- window.open(fileUrls, '_blank');
- break;
- case 'xlsx':
- case 'xls':
- // 预览 Excel 文件
- window.open(fileUrls, '_blank');
- break;
- case 'doc':
- case 'docx':
- // 预览 Word 文件
- window.open(fileUrls, '_blank');
- break;
- default:
- message.error('不支持的文件类型');
- break;
- }
+ router.push({
+ name: 'FileTemplatePreview',
+ query: {
+ src: encodeURIComponent(fileUrls),
+ type: fileExtension
+ }
+ })
};
const getName = (opt, val) => {
const arr = opt.filter(v => v.id == val)
diff --git a/src/views/crm/followup/index.vue b/src/views/crm/followup/index.vue
index 780e0bccd..dfd4db313 100644
--- a/src/views/crm/followup/index.vue
+++ b/src/views/crm/followup/index.vue
@@ -24,6 +24,32 @@
+
+
+
+ 预览
+
+ 无附件
+
+
+
+
+
+ 预览
+
+ 无附件
+
+
+
+
@@ -104,7 +138,8 @@ const props = defineProps<{
}>()
const message = useMessage() // 消息弹窗
const { t } = useI18n() // 国际化
-
+const show = ref(false)
+const urlList = ref([])
const loading = ref(true) // 列表的加载中
const list = ref([]) // 列表的数据
const total = ref(0) // 列表的总页数
@@ -127,6 +162,11 @@ const getList = async () => {
}
}
+const previewPic = (val) => {
+ show.value = true
+ urlList.value = val.split(',')
+}
+
/** 添加/修改操作 */
const formRef = ref>()
const openForm = () => {
@@ -146,6 +186,26 @@ const handleDelete = async (id: number) => {
} 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 openContactDetail = (id: number) => {
diff --git a/src/views/crm/quotation/QuotationForm.vue b/src/views/crm/quotation/QuotationForm.vue
index 98dd40f35..372d27bc8 100644
--- a/src/views/crm/quotation/QuotationForm.vue
+++ b/src/views/crm/quotation/QuotationForm.vue
@@ -47,7 +47,7 @@
-
+
-
+
{
if (formType.value) open(formType.value)
+ formData.value.pricingUserId = useUserStore().getUser.id;
+
+
// 获得客户列表
customerList.value = await CustomerApi.getSelfCustomerSimpleList()
// 获得用户列表
diff --git a/src/views/task/components/Bouns.vue b/src/views/task/components/Bouns.vue
index 911b4e030..cb5b5c3cd 100644
--- a/src/views/task/components/Bouns.vue
+++ b/src/views/task/components/Bouns.vue
@@ -4,7 +4,11 @@
-
+
+
+ {{getName(userOptions, scope.row.userId)}}
+
+
{{(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(() => {
getList()
diff --git a/src/views/task/components/Task.vue b/src/views/task/components/Task.vue
index 0b50d8f0c..33c5e6a6b 100644
--- a/src/views/task/components/Task.vue
+++ b/src/views/task/components/Task.vue
@@ -5,10 +5,10 @@
-
+
- {{Math.floor(scope.row.taskProgress * 100)}}
+ {{Math.floor(scope.row.taskProgress * 100) +'%'}}
diff --git a/src/views/task/project/index.vue b/src/views/task/project/index.vue
index 667be2520..3c7d2d442 100644
--- a/src/views/task/project/index.vue
+++ b/src/views/task/project/index.vue
@@ -122,7 +122,19 @@
-
+
+
+
+ 预览
+
+ 无附件
+
+
{{scope.row.bonusEvaluation ? '是' : '否'}}
@@ -248,8 +260,8 @@
-
-
+
+