Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-operator-master
Commits
d67389a0
Commit
d67389a0
authored
Oct 02, 2022
by
huhaiqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下载功能开发
parent
9e71f942
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
157 additions
and
17 deletions
+157
-17
box.js
src/api/ecw/box.js
+53
-3
indexSea.vue
src/views/ecw/box/indexSea.vue
+31
-5
index.vue
src/views/ecw/box/ladingBill/index.vue
+24
-4
query.vue
src/views/ecw/box/query.vue
+27
-3
cusDeclaration.vue
src/views/ecw/box/shippingSea/nodePage/cusDeclaration.vue
+11
-1
utils.js
src/views/ecw/box/shippingSea/utils.js
+11
-1
No files found.
src/api/ecw/box.js
View file @
d67389a0
...
...
@@ -215,8 +215,8 @@ export function downloadByOrderId(orderId) {
return
request
({
url
:
"
/shipment/make-bill-of-lading/downloadByOrderId
"
,
method
:
"
get
"
,
params
:
{
orderId
},
responseType
:
'
arraybuffer
'
params
:
{
orderId
},
responseType
:
"
arraybuffer
"
,
});
}
...
...
@@ -228,3 +228,53 @@ export function getBoxApproval(params) {
params
,
});
}
// 下载清关文件
export
function
downloadClearanceFiles
(
params
)
{
return
request
({
url
:
"
/ecw/box-preload-goods/downloadClearanceFiles
"
,
responseType
:
"
arraybuffer
"
,
method
:
"
get
"
,
params
,
});
}
// 下载报关单
export
function
downloadCustomFiles
(
params
)
{
return
request
({
url
:
"
/ecw/box-preload-goods/downloadCustomFiles
"
,
responseType
:
"
arraybuffer
"
,
method
:
"
get
"
,
params
,
});
}
// 下载已装单
export
function
downloadLoadGoodsList
(
params
)
{
return
request
({
url
:
"
/ecw/box-preload-goods/downloadLoadGoodsList
"
,
responseType
:
"
arraybuffer
"
,
method
:
"
get
"
,
params
,
});
}
// 下载预装单
export
function
downloadPreloadGoodsList
(
params
)
{
return
request
({
url
:
"
/ecw/box-preload-goods/downloadPreloadGoodsList
"
,
responseType
:
"
arraybuffer
"
,
method
:
"
get
"
,
params
,
});
}
// 下载应收汇总
export
function
downloadReceivableList
(
params
)
{
return
request
({
url
:
"
/ecw/box-preload-goods/downloadReceivableList
"
,
responseType
:
"
arraybuffer
"
,
method
:
"
get
"
,
params
,
});
}
src/views/ecw/box/indexSea.vue
View file @
d67389a0
...
...
@@ -127,16 +127,16 @@
<el-dropdown-item
v-if=
"scope.row.ldStatus==47"
command=
"editLadingBill"
>
编辑提货单
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-dropdown
trigger=
"click"
>
<el-dropdown
trigger=
"click"
@
command=
"(command)=>handleCommand(scope.row, command)"
>
<el-button
type=
"primary"
>
下载
<i
class=
"el-icon-arrow-down el-icon--right"
></i>
</el-button>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
command=
""
>
预装单
</el-dropdown-item>
<el-dropdown-item
command=
""
>
已装单
</el-dropdown-item>
<el-dropdown-item
command=
""
>
应收汇总表
</el-dropdown-item>
<el-dropdown-item
command=
"
downloadPreloadGoodsList
"
>
预装单
</el-dropdown-item>
<el-dropdown-item
command=
"
downloadLoadGoodsList
"
>
已装单
</el-dropdown-item>
<el-dropdown-item
command=
"
downloadReceivableList
"
>
应收汇总表
</el-dropdown-item>
<el-dropdown-item
command=
""
>
agent list
</el-dropdown-item>
<el-dropdown-item
command=
""
>
son
cap
</el-dropdown-item>
<el-dropdown-item
command=
""
>
soncap
</el-dropdown-item>
<el-dropdown-item
command=
""
>
提货单
</el-dropdown-item>
<el-dropdown-item
command=
""
>
提单Copy
</el-dropdown-item>
</el-dropdown-menu>
...
...
@@ -167,6 +167,7 @@
<
script
>
import
{
deletebox
,
getbox
,
getboxPage
,
exportboxExcel
}
from
"
@/api/ecw/box
"
;
import
{
downloadFile
}
from
"
./shippingSea/utils
"
;
import
{
getCabinetPage
}
from
"
@/api/ecw/cabinet
"
;
import
{
getWarehouseList
}
from
"
@/api/ecw/warehouse
"
;
import
{
getListTree
}
from
"
@/api/ecw/region
"
;
...
...
@@ -389,6 +390,31 @@ export default {
case "error":
this.$set(this.dialogCfg, "title", "异常登记");
break;
case "downloadPreloadGoodsList":
downloadFile(
command,
{ shipmentId: row.id },
`
预装单
(
$
{
row
.
selfNo
}).
xlsx
`,
"xlsx"
);
break;
case "downloadLoadGoodsList":
downloadFile(
command,
{ shipmentId: row.id },
`
已装单
(
$
{
row
.
selfNo
}).
xlsx
`,
"xlsx"
);
break;
case "downloadReceivableList":
downloadFile(
command,
{ shipmentId: row.id },
`
应收汇总表
(
$
{
row
.
selfNo
}).
xlsx
`,
"xlsx"
);
break;
}
if (["editLadingBill", "cost", "error"].includes(command)) {
...
...
src/views/ecw/box/ladingBill/index.vue
View file @
d67389a0
...
...
@@ -2,8 +2,8 @@
<el-row
class=
"shipping-ladingBill"
>
<el-row
class=
"oper-button"
>
<el-button
type=
"primary"
@
click=
"clickZipDownload"
>
打包下载
</el-button>
<el-button
type=
"primary"
>
应收汇总单
</el-button>
<el-button
type=
"primary"
>
下载已装单
</el-button>
<el-button
type=
"primary"
@
click=
"handleCommand('downloadReceivableList')"
>
应收汇总表
</el-button>
<el-button
type=
"primary"
@
click=
"handleCommand('downloadLoadGoodsList')"
>
下载已装单
</el-button>
</el-row>
<el-row
style=
"margin-top:15px"
>
...
...
@@ -91,7 +91,11 @@ import {
deleteBillService
,
zipDownload
,
}
from
"
@/api/ecw/box
"
;
import
{
getTotlContent
,
getCapacity
}
from
"
../shippingSea/utils
"
;
import
{
getTotlContent
,
getCapacity
,
downloadFile
,
}
from
"
../shippingSea/utils
"
;
import
makeLadingBill
from
"
./makeLadingBill.vue
"
;
import
previewBill
from
"
./previewBill.vue
"
;
import
FileSaver
from
"
file-saver
"
;
...
...
@@ -169,6 +173,22 @@ export default {
}
});
break;
case "downloadLoadGoodsList":
downloadFile(
type,
{ shipmentId: this.shipmentObj.id },
`
已装单
(
$
{
this
.
shipmentObj
.
selfNo
}).
xlsx
`,
"xlsx"
);
return;
case "downloadReceivableList":
downloadFile(
type,
{ shipmentId: this.shipmentObj.id },
`
应收汇总表
(
$
{
this
.
shipmentObj
.
selfNo
}).
xlsx
`,
"xlsx"
);
return;
}
this.currRow = row;
this.$set(this.dialogCfg, "type", type);
...
...
@@ -178,7 +198,7 @@ export default {
// TODO zgDate需要返回
makeBillService({
orderId: row.orderId,
zgDate:
'2022-09-27'
,
zgDate:
"2022-09-27"
,
// zgDate: bookSeaInfo.sailTime,
}).then((res) => {
const { data } = res;
...
...
src/views/ecw/box/query.vue
View file @
d67389a0
...
...
@@ -157,9 +157,14 @@
</el-table>
</el-tab-pane>
<el-tab-pane
label=
"表单"
name=
"download"
>
<el-table
:data=
"[]"
style=
"width: 50%"
>
<el-table-column
prop=
""
label=
"文件类型"
>
</el-table-column>
<el-table-column
prop=
""
label=
"下载链接"
>
</el-table-column>
<el-table
:data=
"downloadList"
style=
"width: 50%"
>
<el-table-column
prop=
"title"
label=
"文件类型"
></el-table-column>
<el-table-column
prop=
""
label=
"下载链接"
>
<
template
slot-scope=
"scope"
>
<a
v-if=
"scope.row.serviceName"
href=
"javascript:void(0)"
@
click=
"downloadDetailFile(scope.row)"
>
下载
</a>
<div
v-else
>
未完成
</div>
</
template
>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
...
...
@@ -199,6 +204,7 @@ import {
getTotlContent
,
formatDate
,
serviceMsg
,
downloadFile
,
}
from
"
./shippingSea/utils
"
;
import
{
getSectionList
,
boxGoodsDetail
}
from
"
@/api/ecw/boxSea
"
;
import
{
getSupplierPage
}
from
"
@/api/ecw/supplier
"
;
...
...
@@ -264,6 +270,16 @@ export default {
transportTypes
:
[],
// 费用详情
costDetail
:
{},
// 下载
downloadList
:
[
{
title
:
"
预装单
"
,
serviceName
:
"
downloadPreloadGoodsList
"
},
{
title
:
"
已装单
"
,
serviceName
:
"
downloadLoadGoodsList
"
},
{
title
:
"
应收汇总表
"
,
serviceName
:
"
downloadReceivableList
"
},
{
title
:
"
提货单
"
,
serviceName
:
""
},
{
title
:
"
agent list
"
,
serviceName
:
""
},
{
title
:
"
soncap
"
,
serviceName
:
""
},
{
title
:
"
提单Copy
"
,
serviceName
:
""
},
],
};
},
methods
:
{
...
...
@@ -427,6 +443,14 @@ export default {
}
},
formatDate
,
downloadDetailFile
(
row
)
{
downloadFile
(
row
.
serviceName
,
{
shipmentId
:
this
.
shipmentId
},
`
${
row
.
title
}
(
${
this
.
shipmentObj
.
selfNo
}
).xlsx`
,
"
xlsx
"
);
},
},
computed
:
{
visitedViews
()
{
...
...
src/views/ecw/box/shippingSea/nodePage/cusDeclaration.vue
View file @
d67389a0
...
...
@@ -69,7 +69,7 @@
<el-button type="primary">下载装箱单</el-button>
</el-form-item> -->
<el-form-item
label=
"报关单"
>
<el-button
type=
"primary"
>
下载所有报关单
</el-button>
<el-button
type=
"primary"
@
click=
"downloadCusFile"
>
下载所有报关单
</el-button>
</el-form-item>
</el-form>
...
...
@@ -153,6 +153,7 @@ import {
formatDateStr
,
serviceMsg
,
toReviewDetail
,
downloadFile
,
}
from
"
../utils
"
;
import
ImageUpload
from
"
@/components/ImageUpload
"
;
...
...
@@ -443,6 +444,15 @@ export default {
}
return
false
;
},
/* 下载报关单 */
downloadCusFile
()
{
downloadFile
(
"
downloadCustomFiles
"
,
{
shipmentId
:
this
.
shipmentObj
.
id
},
`报关单(
${
this
.
shipmentObj
.
selfNo
}
).xlsx`
,
"
xlsx
"
);
},
},
watch
:
{
"
cusDeclarationObj.dcBoxWgt
"
(
dcBoxWgt
)
{
...
...
src/views/ecw/box/shippingSea/utils.js
View file @
d67389a0
import
dayjs
from
"
dayjs
"
;
import
*
as
_BOX
from
"
@/api/ecw/box
"
;
import
FileSaver
from
"
file-saver
"
;
/**
* 节点状态值
...
...
@@ -442,7 +444,7 @@ function seaBaseData() {
*
* @return {*}
*/
function
seaAirBaseData
()
{
function
seaAirBaseData
()
{
return
[
[
{
...
...
@@ -1492,6 +1494,13 @@ function toReviewDetail(bpmProcessId) {
});
}
function downloadFile(funName, params, fileName, fileFormat) {
_BOX[funName](params).then((res) => {
let blob = new Blob([res], { type: `
application
/
$
{
fileFormat
}
` });
FileSaver.saveAs(blob, fileName);
});
}
export {
getStatusName,
getColmnMapping,
...
...
@@ -1508,4 +1517,5 @@ export {
sumStatistics,
serviceMsg,
toReviewDetail,
downloadFile,
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment