| | |
| | | <el-table-column label="销售订单" prop="salesContractNo" show-overflow-tooltip /> |
| | | <el-table-column label="发货订单号" prop="shippingNo" show-overflow-tooltip /> |
| | | <el-table-column label="客户名称" prop="customerName" show-overflow-tooltip /> |
| | | <el-table-column label="产品名称" prop="productName" show-overflow-tooltip /> |
| | | <el-table-column label="规格型号" prop="specificationModel" show-overflow-tooltip /> |
| | | <el-table-column label="厚度(mm)" prop="thickness" show-overflow-tooltip /> |
| | | <el-table-column label="发货时间" prop="shippingDate" show-overflow-tooltip /> |
| | | <el-table-column label="发货车牌号" prop="shippingCarNumber" show-overflow-tooltip /> |
| | | <el-table-column label="快递公司" prop="expressCompany" show-overflow-tooltip /> |
| | |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" width="200" align="center"> |
| | | <el-table-column fixed="right" label="操作" width="220" align="center"> |
| | | <template #default="scope"> |
| | | <el-button |
| | | link |
| | | type="primary" |
| | | size="small" |
| | | type="primary" |
| | | :disabled="!isApproved(scope.row.status)" |
| | | @click="openForm('edit', scope.row)">补充发货信息</el-button> |
| | | <el-button |
| | | link |
| | | type="primary" |
| | | size="small" |
| | | style="color: #67C23A" |
| | | @click="openDetail(scope.row)" |
| | | >详情</el-button> |
| | | <el-button |
| | | link |
| | | type="danger" |
| | | size="small" |
| | | type="danger" |
| | | :disabled="isApproving(scope.row.status)" |
| | | @click="handleDeleteSingle(scope.row)">删除</el-button> |
| | | </template> |
| | |
| | | <el-descriptions-item label="销售订单">{{ detailRow.salesContractNo || '--' }}</el-descriptions-item> |
| | | <el-descriptions-item label="发货订单号">{{ detailRow.shippingNo || '--' }}</el-descriptions-item> |
| | | <el-descriptions-item label="客户名称">{{ detailRow.customerName || '--' }}</el-descriptions-item> |
| | | <el-descriptions-item label="产品名称">{{ detailRow.productName || '--' }}</el-descriptions-item> |
| | | <el-descriptions-item label="规格型号">{{ detailRow.specificationModel || '--' }}</el-descriptions-item> |
| | | <el-descriptions-item label="发货类型">{{ detailRow.type || '--' }}</el-descriptions-item> |
| | | <el-descriptions-item label="发货日期">{{ detailRow.shippingDate || '--' }}</el-descriptions-item> |
| | | <el-descriptions-item label="审核状态">{{ getApprovalStatusText(detailRow.status) }}</el-descriptions-item> |
| | |
| | | const detailRow = ref(null); |
| | | const detailImages = ref([]); |
| | | |
| | | const getFileAccessUrl = (file = {}) => { |
| | | if (file?.link) { |
| | | if (String(file.link).startsWith('http')) return file.link; |
| | | return normalizeFileUrl(file.link); |
| | | } |
| | | return normalizeFileUrl(file?.url || ''); |
| | | }; |
| | | |
| | | const normalizeFileUrl = (rawUrl = '') => { |
| | | let fileUrl = rawUrl || ''; |
| | | // Windows 路径转 URL |
| | | |
| | | if (fileUrl && fileUrl.indexOf('\\') > -1) { |
| | | const uploadsIndex = fileUrl.toLowerCase().indexOf('uploads'); |
| | | if (uploadsIndex > -1) { |
| | | const relativePath = fileUrl.substring(uploadsIndex).replace(/\\/g, '/'); |
| | | fileUrl = '/' + relativePath; |
| | | } else { |
| | | const parts = fileUrl.split('\\'); |
| | | const fileName = parts[parts.length - 1]; |
| | | fileUrl = '/uploads/' + fileName; |
| | | } |
| | | fileUrl = fileUrl.replace(/\\/g, '/'); |
| | | } |
| | | |
| | | const lowerPath = fileUrl.toLowerCase(); |
| | | |
| | | const uploadPathIndex = lowerPath.indexOf('/uploadpath/'); |
| | | if (uploadPathIndex > -1) { |
| | | fileUrl = '/profile' + fileUrl.substring(uploadPathIndex + '/uploadpath'.length); |
| | | } |
| | | |
| | | const fileRootIndex = fileUrl.toLowerCase().indexOf('/file/'); |
| | | if (!fileUrl.startsWith('/profile/') && fileRootIndex > -1) { |
| | | fileUrl = '/profile' + fileUrl.substring(fileRootIndex + '/file'.length); |
| | | } |
| | | |
| | | if (!fileUrl.startsWith('http') && fileUrl.toLowerCase().startsWith('profile/')) { |
| | | fileUrl = '/' + fileUrl; |
| | | } |
| | | |
| | | if (fileUrl && !fileUrl.startsWith('http')) { |
| | | if (!fileUrl.startsWith('/')) fileUrl = '/' + fileUrl; |
| | | fileUrl = javaApi + fileUrl; |
| | |
| | | id: null, |
| | | salesContractNo: "", |
| | | customerName: "", |
| | | specificationModel: "", |
| | | productName: "", |
| | | type: "货车", // 货车, 快递 |
| | | shippingDate: "", |
| | | shippingCarNumber: "", |
| | |
| | | // 如果有图片,将 commonFileList 转换为文件列表格式 |
| | | if (row.commonFileList && Array.isArray(row.commonFileList) && row.commonFileList.length > 0) { |
| | | deliveryFileList.value = row.commonFileList.map((file, index) => { |
| | | const fileUrl = normalizeFileUrl(file.url || ''); |
| | | const fileUrl = getFileAccessUrl(file); |
| | | |
| | | return { |
| | | uid: file.id || Date.now() + index, |
| | |
| | | detailRow.value = row || null; |
| | | const list = Array.isArray(row?.commonFileList) ? row.commonFileList : []; |
| | | detailImages.value = list |
| | | .map((f) => ({ url: normalizeFileUrl(f?.url || '') })) |
| | | .map((f) => ({ url: getFileAccessUrl(f) })) |
| | | .filter((i) => !!i.url); |
| | | detailDialogVisible.value = true; |
| | | }; |
| | |
| | | '审核中': '审核中', |
| | | '审核拒绝': '审核拒绝', |
| | | '审核通过': '审核通过', |
| | | '已发货': '已发货', |
| | | '0': '待审核', |
| | | '1': '审核中', |
| | | '2': '审核拒绝', |
| | |
| | | '审核中': 'warning', |
| | | '审核拒绝': 'danger', |
| | | '审核通过': 'success', |
| | | '已发货': 'success', |
| | | '0': 'info', |
| | | '1': 'warning', |
| | | '2': 'danger', |