10.17沟通调整
计划收款信息增加复制操作 上传合同调整为:上传合同、上传PI、上传水单(均为必传,且支持多文件操作与下载)
This commit is contained in:
@@ -83,44 +83,19 @@
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<OrderDetailContent :orderData="orderDialog.orderData" />
|
||||
<!-- 合同文件 -->
|
||||
<div class="boxshadow">
|
||||
<div class="form-title">
|
||||
<!-- <span class="border"></span> -->
|
||||
<span class="title">合同</span>
|
||||
</div>
|
||||
<div class="file-preview">
|
||||
<div v-if="contractFile" class="contract-file">
|
||||
<div v-if="isImageFile(contractFile)" class="image-preview">
|
||||
<img
|
||||
:src="contractFile.url"
|
||||
:alt="contractFile.name"
|
||||
class="preview-image"
|
||||
@click="previewImage(contractFile)"
|
||||
/>
|
||||
<div class="file-info">
|
||||
<span class="file-name">{{ contractFile.name }}</span>
|
||||
<el-button type="text" size="small" @click="previewImage(contractFile)">
|
||||
预览
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="document-preview">
|
||||
<div class="file-icon">
|
||||
<i class="iconfont-sys"></i>
|
||||
</div>
|
||||
<div class="file-info">
|
||||
<span class="file-name">{{ contractFile.name }}</span>
|
||||
<el-button type="primary" size="small" @click="downloadFile(contractFile)">
|
||||
下载
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="no-file">
|
||||
<i class="iconfont-sys"></i>
|
||||
<span>暂无合同文件</span>
|
||||
</div>
|
||||
</div>
|
||||
<FilePreview title="合同文件" :files="contractFiles" empty-text="暂无合同文件" />
|
||||
</div>
|
||||
|
||||
<!-- PI文件 -->
|
||||
<div class="boxshadow">
|
||||
<FilePreview title="PI文件" :files="piFiles" empty-text="暂无PI文件" />
|
||||
</div>
|
||||
|
||||
<!-- 水单文件 -->
|
||||
<div class="boxshadow">
|
||||
<FilePreview title="水单文件" :files="waterBillFiles" empty-text="暂无水单文件" />
|
||||
</div>
|
||||
<template #footer>
|
||||
<div style="display: flex; justify-content: flex-end; gap: 8px">
|
||||
@@ -138,7 +113,7 @@
|
||||
>
|
||||
<div style="max-height: 70vh; display: flex; flex-direction: column; gap: 12px">
|
||||
<div style="display: flex; justify-content: flex-end; gap: 8px">
|
||||
<el-button @click="download">下载</el-button>
|
||||
<el-button @click="download" v-if="isFinites">下载</el-button>
|
||||
</div>
|
||||
<div
|
||||
v-if="pdf.images.length"
|
||||
@@ -184,8 +159,10 @@
|
||||
import ApprovalTimeline from '@/components/custom/ApprovalTimeline.vue'
|
||||
import type { OrderData } from '@/composables/useOrderDetailDialog'
|
||||
import { usePdfPreview } from '@/composables/usePdfPreview'
|
||||
import FilePreview from '@/components/custom/FilePreview.vue'
|
||||
const timelineDialogVisible = ref(false)
|
||||
const approvalRecords = ref<any[]>([])
|
||||
const isFinites = ref(false)
|
||||
// PDF 预览/打印(公共)
|
||||
const { pdf, frameRef, openWithResponse, download, print, preparePreview, prepareImages } = usePdfPreview()
|
||||
defineOptions({ name: 'AdminFinalListPage' })
|
||||
@@ -248,6 +225,11 @@
|
||||
}
|
||||
//打印
|
||||
const printfn = (row: any) => {
|
||||
if (row.approval_status == 2) {
|
||||
isFinites.value = true
|
||||
} else {
|
||||
isFinites.value = false
|
||||
}
|
||||
manageService
|
||||
.printStock({ id: row.id })
|
||||
.then((res) => {
|
||||
@@ -261,16 +243,42 @@
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
// 文件数据
|
||||
const contractFiles = ref<Array<{ name: string; url: string; file_name: string }>>([])
|
||||
const piFiles = ref<Array<{ name: string; url: string; file_name: string }>>([])
|
||||
const waterBillFiles = ref<Array<{ name: string; url: string; file_name: string }>>([])
|
||||
|
||||
const contractFile = ref<{ name: string; url: string; file_name: string } | null>(null)
|
||||
// 处理文件数据
|
||||
const processFiles = (files: any[], type: string) => {
|
||||
if (!files || !Array.isArray(files)) return []
|
||||
return files.map((file: any) => ({
|
||||
name: `${type}文件`,
|
||||
url: file.file_full_url || file.file_url,
|
||||
file_name: file.file_url
|
||||
}))
|
||||
}
|
||||
const handleView1 = async (row: any) => {
|
||||
const res = await manageService.checkStock({ id: row.object_id })
|
||||
if (res?.contract) {
|
||||
contractFile.value = {
|
||||
name: '合同文件',
|
||||
url: res.contract_url || res.contract,
|
||||
file_name: res.contract
|
||||
}
|
||||
// 处理合同文件
|
||||
const file_list = res?.file_list
|
||||
if (file_list?.contract) {
|
||||
contractFiles.value = processFiles(file_list.contract, '合同')
|
||||
} else {
|
||||
contractFiles.value = []
|
||||
}
|
||||
|
||||
// 处理PI文件
|
||||
if (file_list?.pi_doc) {
|
||||
piFiles.value = processFiles(file_list.pi_doc, 'PI')
|
||||
} else {
|
||||
piFiles.value = []
|
||||
}
|
||||
|
||||
// 处理水单文件
|
||||
if (file_list?.transaction_slip) {
|
||||
waterBillFiles.value = processFiles(file_list.transaction_slip, '水单')
|
||||
} else {
|
||||
waterBillFiles.value = []
|
||||
}
|
||||
if (res) {
|
||||
// 获取订单详情成功
|
||||
|
||||
Reference in New Issue
Block a user