1、调整导入运单
2、调整对账
This commit is contained in:
@@ -1949,18 +1949,61 @@
|
||||
label="批量补录"
|
||||
name="batchSupplement"
|
||||
>
|
||||
<div
|
||||
v-if="waybillVoucherFolderView"
|
||||
class="waybill-manage-page__voucher-folder-toolbar"
|
||||
>
|
||||
<el-button text type="primary" @click="backToWaybillVoucherFolders">
|
||||
返回文件夹
|
||||
</el-button>
|
||||
<span>{{ waybillVoucherFolderName(waybillVoucherFolder) }}</span>
|
||||
</div>
|
||||
<div
|
||||
v-loading="waybillVoucherImagesLoading"
|
||||
class="waybill-manage-page__voucher-image-grid"
|
||||
>
|
||||
<div
|
||||
v-for="(image, index) in waybillVoucherImages"
|
||||
:key="image.id || image.objectKey || index"
|
||||
class="waybill-manage-page__voucher-image-item"
|
||||
:title="image.imageName"
|
||||
@click="previewWaybillVoucherImage(index)"
|
||||
:key="
|
||||
image.id ||
|
||||
image.objectKey ||
|
||||
(isWaybillVoucherFolder(image)
|
||||
? `${image.voucherId || 'folder'}-${image.folderName || image.name || index}`
|
||||
: index)
|
||||
"
|
||||
:class="[
|
||||
'waybill-manage-page__voucher-image-item',
|
||||
{
|
||||
'waybill-manage-page__voucher-image-item--folder':
|
||||
isWaybillVoucherFolder(image),
|
||||
},
|
||||
]"
|
||||
:title="
|
||||
isWaybillVoucherFolder(image)
|
||||
? waybillVoucherFolderName(image)
|
||||
: image.imageName || image.name
|
||||
"
|
||||
@click="
|
||||
isWaybillVoucherFolder(image)
|
||||
? openWaybillVoucherFolder(image)
|
||||
: previewWaybillVoucherImage(index)
|
||||
"
|
||||
>
|
||||
<el-image :src="image.url" fit="cover" lazy />
|
||||
<el-image
|
||||
:src="
|
||||
isWaybillVoucherFolder(image)
|
||||
? image.icon || '/img/文件夹.png'
|
||||
: image.url
|
||||
"
|
||||
:fit="isWaybillVoucherFolder(image) ? 'contain' : 'cover'"
|
||||
lazy
|
||||
/>
|
||||
<div
|
||||
v-if="isWaybillVoucherFolder(image)"
|
||||
class="waybill-manage-page__voucher-folder-name"
|
||||
>
|
||||
{{ waybillVoucherFolderName(image) }}
|
||||
</div>
|
||||
</div>
|
||||
<el-empty
|
||||
v-if="!waybillVoucherImagesLoading && !waybillVoucherImages.length"
|
||||
@@ -3039,6 +3082,9 @@ export default {
|
||||
waybillProcessDetailTab: 'punch',
|
||||
waybillHasRelatedVoucher: false,
|
||||
waybillVoucherImages: [],
|
||||
waybillVoucherFolders: [],
|
||||
waybillVoucherFolder: null,
|
||||
waybillVoucherFolderView: false,
|
||||
waybillVoucherImagesLoading: false,
|
||||
waybillVoucherImagesLoaded: false,
|
||||
waybillRouteChangeBox: false,
|
||||
@@ -4118,6 +4164,9 @@ export default {
|
||||
this.waybillProcessDetailTab = 'punch';
|
||||
this.waybillHasRelatedVoucher = false;
|
||||
this.waybillVoucherImages = [];
|
||||
this.waybillVoucherFolders = [];
|
||||
this.waybillVoucherFolder = null;
|
||||
this.waybillVoucherFolderView = false;
|
||||
this.waybillVoucherImagesLoaded = false;
|
||||
const request =
|
||||
typeof this.api.getDetail === 'function'
|
||||
@@ -4222,6 +4271,11 @@ export default {
|
||||
getProcessConfigVoucherImages(this.detailRow.id)
|
||||
.then(res => {
|
||||
this.waybillVoucherImages = extractRecords(res);
|
||||
this.waybillVoucherFolders = this.waybillVoucherImages.filter(item =>
|
||||
this.isWaybillVoucherFolder(item)
|
||||
);
|
||||
this.waybillVoucherFolder = null;
|
||||
this.waybillVoucherFolderView = false;
|
||||
if (this.waybillVoucherImages.length) this.waybillHasRelatedVoucher = true;
|
||||
this.waybillVoucherImagesLoaded = true;
|
||||
})
|
||||
@@ -4229,11 +4283,49 @@ export default {
|
||||
this.waybillVoucherImagesLoading = false;
|
||||
});
|
||||
},
|
||||
isWaybillVoucherFolder(item) {
|
||||
return Boolean(item && (item.isFolder === true || item.type === 'folder'));
|
||||
},
|
||||
waybillVoucherFolderName(folder) {
|
||||
return folder?.folderName || folder?.name || folder?.plateNo || '凭证文件夹';
|
||||
},
|
||||
openWaybillVoucherFolder(folder) {
|
||||
if (!this.detailRow.id || !this.isWaybillVoucherFolder(folder)) return;
|
||||
if (!folder.voucherId || !folder.folderName) {
|
||||
this.$message.warning('凭证文件夹信息不完整');
|
||||
return;
|
||||
}
|
||||
this.waybillVoucherImagesLoading = true;
|
||||
getProcessConfigVoucherImages(this.detailRow.id, {
|
||||
voucherId: folder.voucherId,
|
||||
folderName: folder.folderName,
|
||||
})
|
||||
.then(res => {
|
||||
this.waybillVoucherFolder = folder;
|
||||
this.waybillVoucherImages = extractRecords(res).filter(
|
||||
item => !this.isWaybillVoucherFolder(item)
|
||||
);
|
||||
this.waybillVoucherFolderView = true;
|
||||
})
|
||||
.finally(() => {
|
||||
this.waybillVoucherImagesLoading = false;
|
||||
});
|
||||
},
|
||||
backToWaybillVoucherFolders() {
|
||||
this.waybillVoucherImages = [...this.waybillVoucherFolders];
|
||||
this.waybillVoucherFolder = null;
|
||||
this.waybillVoucherFolderView = false;
|
||||
},
|
||||
previewWaybillVoucherImage(index) {
|
||||
this.attachmentImagePreviewUrls = this.waybillVoucherImages
|
||||
const imageRows = this.waybillVoucherImages.filter(
|
||||
image => !this.isWaybillVoucherFolder(image)
|
||||
);
|
||||
const currentImage = this.waybillVoucherImages[index];
|
||||
const imageIndex = imageRows.findIndex(image => image === currentImage);
|
||||
this.attachmentImagePreviewUrls = imageRows
|
||||
.map(image => image.url)
|
||||
.filter(Boolean);
|
||||
this.attachmentImagePreviewIndex = index;
|
||||
this.attachmentImagePreviewIndex = imageIndex >= 0 ? imageIndex : 0;
|
||||
this.attachmentImagePreviewVisible = this.attachmentImagePreviewUrls.length > 0;
|
||||
},
|
||||
buildWaybillRouteNodes(rows = []) {
|
||||
@@ -8984,6 +9076,7 @@ export default {
|
||||
}
|
||||
|
||||
&__voucher-image-item {
|
||||
position: relative;
|
||||
aspect-ratio: 1;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
@@ -8995,6 +9088,42 @@ export default {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
&--folder {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
padding: 12px;
|
||||
background: #fff;
|
||||
|
||||
.el-image {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
flex: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__voucher-folder-toolbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
min-height: 32px;
|
||||
margin-bottom: 8px;
|
||||
color: #606266;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
&__voucher-folder-name {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
color: #606266;
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&__route-change-dialog {
|
||||
|
||||
Reference in New Issue
Block a user