doctor-admin-components 1.0.14-beta.10 → 1.0.14-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -32,18 +32,35 @@ export function batchAsZip(fileList, zipName) {
|
|
|
32
32
|
background: "rgba(0, 0, 0, 0.7)",
|
|
33
33
|
});
|
|
34
34
|
const zip = new JSZip();
|
|
35
|
-
const promises = [];
|
|
36
|
-
const cache = {};
|
|
35
|
+
// const promises = [];
|
|
36
|
+
// const cache = {};
|
|
37
37
|
console.log(fileList);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
38
|
+
const usedFileNames = {} // 用于跟踪已使用的文件名
|
|
39
|
+
// fileList.forEach((item) => {
|
|
40
|
+
// const promise = getFile(item.url).then((data) => {
|
|
41
|
+
// // 下载文件, 并存成ArrayBuffer对象
|
|
42
|
+
// // const file_name = item.realName // 获取文件名
|
|
43
|
+
// zip.file(item.fileName, data, { binary: true });
|
|
44
|
+
// cache[item.fileName] = data;
|
|
45
|
+
// });
|
|
46
|
+
// promises.push(promise);
|
|
47
|
+
// });
|
|
48
|
+
const promises = fileList.map((item) => {
|
|
49
|
+
return getFile(item.url).then((data) => {
|
|
50
|
+
let fileName = item.fileName
|
|
51
|
+
let count = 1
|
|
52
|
+
|
|
53
|
+
// 如果文件名已存在,则添加递增的数字后缀
|
|
54
|
+
while (usedFileNames[fileName]) {
|
|
55
|
+
fileName = `${count}_${item.fileName}`
|
|
56
|
+
count++
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
usedFileNames[fileName] = true
|
|
60
|
+
|
|
61
|
+
zip.file(fileName, data, { binary: true })
|
|
62
|
+
})
|
|
63
|
+
})
|
|
47
64
|
Promise.all(promises)
|
|
48
65
|
.then(() => {
|
|
49
66
|
zip.generateAsync({ type: "blob" }).then((f) => {
|
|
@@ -57,6 +74,7 @@ export function batchAsZip(fileList, zipName) {
|
|
|
57
74
|
})
|
|
58
75
|
.catch((res) => {
|
|
59
76
|
Message.error("下载文件出现错误,请联系管理员!");
|
|
77
|
+
console.log(res)
|
|
60
78
|
downloadLoadingInstance.close();
|
|
61
79
|
});
|
|
62
80
|
}
|
|
@@ -56,12 +56,13 @@
|
|
|
56
56
|
"
|
|
57
57
|
/>
|
|
58
58
|
</div>
|
|
59
|
-
<div class="file-list">
|
|
59
|
+
<div class="file-list" style="width: 100%;min-height: 1px;">
|
|
60
60
|
<file-show
|
|
61
61
|
:hiddenOperation="channel == 'official-website'"
|
|
62
62
|
@refresh="handleRefresh" @checked="handleChecked" @uncheck="handleUncheck" :selectFileListProp="selectFileList" :file-info="item"
|
|
63
63
|
v-for="(item, i) in fileInfo.personalBillFileInfo" :key="i" />
|
|
64
64
|
<contract-file-drag-upload
|
|
65
|
+
v-if="contract.contractType == 'sale'"
|
|
65
66
|
v-show="(!fileInfo.personalBillFileInfo || fileInfo.personalBillFileInfo.length == 0) && channel !== 'official-website'"
|
|
66
67
|
@upload="
|
|
67
68
|
handleUpload(
|
|
@@ -390,7 +391,7 @@
|
|
|
390
391
|
<div v-else>
|
|
391
392
|
<SectionSlot @updateOpen="handleShippingUpdateOpen" :infoPro="shipProgressInfo" v-for="(
|
|
392
393
|
shipmentFileInfo, shipmentIndex
|
|
393
|
-
) in contractFileInfo.shipmentFileInfoList" :key="shipmentIndex" v-if="shipmentIndex == shipBillNo">
|
|
394
|
+
) in contractFileInfo.shipmentFileInfoList" :key="'shipment'+shipmentIndex" v-if="shipmentIndex == shipBillNo">
|
|
394
395
|
<template v-slot:header>
|
|
395
396
|
<div style="position:relative">
|
|
396
397
|
<ProgressDetail :infoPro="shipProgressInfo"></ProgressDetail>
|
|
@@ -515,7 +516,7 @@
|
|
|
515
516
|
bgTime: contract.contractType == 'purchase' ? shipmentFileInfo.purchasePersonalPackingList && timeFormate(shipmentFileInfo.purchasePersonalPackingList) : shipmentFileInfo.packingList && timeFormate(shipmentFileInfo.packingList),
|
|
516
517
|
bgcolor: shipProgressInfo.bgcolor
|
|
517
518
|
}"></ContentTitle>
|
|
518
|
-
<span class="bg-history" @click="handleHistory('purchase_personal_shipment_packing_list', shipmentFileInfo.shipmentId)">{{ $t('contractDetail.view_history') }}</span>
|
|
519
|
+
<span class="bg-history" @click="handleHistory(contract.contractType == 'purchase' ? 'purchase_personal_shipment_packing_list' : 'shipment_packing_list', shipmentFileInfo.shipmentId)">{{ $t('contractDetail.view_history') }}</span>
|
|
519
520
|
<div class="sub-title" style="margin-bottom: 0;" v-if="contract.contractType == 'purchase'">
|
|
520
521
|
<span style="color: #1890ff; cursor: pointer" v-if="shipmentFileInfo &&
|
|
521
522
|
shipmentFileInfo.purchasePersonalPackingList &&
|
|
@@ -1120,7 +1121,7 @@
|
|
|
1120
1121
|
ref="SectionReceiving"
|
|
1121
1122
|
:infoPro="getGoodsProgressInfo" v-for="(
|
|
1122
1123
|
shipmentFileInfo, shipmentIndex
|
|
1123
|
-
) in contractFileInfo.shipmentFileInfoList" :key="shipmentIndex" v-if="shipmentIndex == shipBillNo"
|
|
1124
|
+
) in contractFileInfo.shipmentFileInfoList" :key="'receiving'+shipmentIndex" v-if="shipmentIndex == shipBillNo"
|
|
1124
1125
|
>
|
|
1125
1126
|
<template v-slot:header>
|
|
1126
1127
|
<div>
|
|
@@ -1177,7 +1178,7 @@
|
|
|
1177
1178
|
:infoPro="claimProgressInfo"
|
|
1178
1179
|
v-for="(
|
|
1179
1180
|
shipmentFileInfo, shipmentIndex
|
|
1180
|
-
) in contractFileInfo.shipmentFileInfoList" :key="shipmentIndex"
|
|
1181
|
+
) in contractFileInfo.shipmentFileInfoList" :key="'claim'+shipmentIndex"
|
|
1181
1182
|
v-if="shipmentIndex == shipBillNo"
|
|
1182
1183
|
>
|
|
1183
1184
|
<template v-slot:header>
|
|
@@ -1590,6 +1591,7 @@ export default {
|
|
|
1590
1591
|
const ids = this.selectFileList.map((item) => item.fileId)
|
|
1591
1592
|
delBizFileInfo(ids).then(() => {
|
|
1592
1593
|
this.$message.success('删除成功')
|
|
1594
|
+
this.selectFileList = []
|
|
1593
1595
|
this.handleRefresh()
|
|
1594
1596
|
})
|
|
1595
1597
|
})
|
|
@@ -1626,8 +1628,10 @@ export default {
|
|
|
1626
1628
|
return this.$refs['container_packing_photo_' + containerId][0].clickSelectAll()
|
|
1627
1629
|
},
|
|
1628
1630
|
|
|
1629
|
-
hasSelectAllContainer(containerId) {
|
|
1630
|
-
|
|
1631
|
+
hasSelectAllContainer(containerId) {
|
|
1632
|
+
setTimeout(() => {
|
|
1633
|
+
return this.$refs['container_packing_photo_' + containerId] && this.$refs['container_packing_photo_' + containerId][0]?.hasSelectAll()
|
|
1634
|
+
}, 1000);
|
|
1631
1635
|
},
|
|
1632
1636
|
|
|
1633
1637
|
changeShipBillNo(index) {
|