jinhui.wang

单据查询,附件上传页面增加

...@@ -17,7 +17,7 @@ export function getwaybillData(data) { ...@@ -17,7 +17,7 @@ export function getwaybillData(data) {
17 }); 17 });
18 } 18 }
19 19
20 -// 运单详情查询 20 +// 运单数据详情查询
21 /** 21 /**
22 * @param consignmentId * 运单id 22 * @param consignmentId * 运单id
23 */ 23 */
...@@ -29,13 +29,39 @@ export function getWaybillDetail(data) { ...@@ -29,13 +29,39 @@ export function getWaybillDetail(data) {
29 }); 29 });
30 } 30 }
31 31
32 +// 运单附件详情查询
33 +/**
34 + * @param consignmentId * 运单id
35 + */
36 +export function getWaybillFileList(data) {
37 + return request({
38 + url: "biz-customer/attachment/query/queryInfo/" + data.consignmentId,
39 + method: "post",
40 + data: data
41 + });
42 +}
43 +
32 // 运单提交历史查询 44 // 运单提交历史查询
33 /** 45 /**
34 * @param consignmentId * 运单id 46 * @param consignmentId * 运单id
47 + * @param page *
48 + * @param size *
35 */ 49 */
36 export function getWaybillSubmitHistory(data) { 50 export function getWaybillSubmitHistory(data) {
37 return request({ 51 return request({
38 - url: "/biz-customer/attachment/query/queryInfo/" + data.consignmentId, 52 + url: "biz-customer/uploadRecord/queryHistoryList",
53 + method: "post",
54 + data: data
55 + });
56 +}
57 +
58 +// 历史详情查询
59 +/**
60 + * @param recordId id *
61 + */
62 +export function getWaybillSubmitHistoryDetail(data) {
63 + return request({
64 + url: "biz-customer/attachment/query/queryByRecord/" + data.recordId,
39 method: "post", 65 method: "post",
40 data: data 66 data: data
41 }); 67 });
......
...@@ -358,7 +358,7 @@ input:disabled { ...@@ -358,7 +358,7 @@ input:disabled {
358 line-height: normal; 358 line-height: normal;
359 359
360 .el-input, 360 .el-input,
361 - // .el-select, 361 + .el-select,
362 .el-date-editor, 362 .el-date-editor,
363 .el-range-editor, 363 .el-range-editor,
364 .el-checkbox, 364 .el-checkbox,
...@@ -398,7 +398,7 @@ input:disabled { ...@@ -398,7 +398,7 @@ input:disabled {
398 height: 100% !important; 398 height: 100% !important;
399 border: none !important; 399 border: none !important;
400 background-color: transparent; 400 background-color: transparent;
401 - margin-bottom: 4%; 401 + // margin-bottom: 4%;
402 padding-top: 1.15rem; 402 padding-top: 1.15rem;
403 // padding-right: 1.15rem; 403 // padding-right: 1.15rem;
404 padding-left: calc(0.6rem + 0.1875rem); 404 padding-left: calc(0.6rem + 0.1875rem);
...@@ -1167,3 +1167,13 @@ input:disabled { ...@@ -1167,3 +1167,13 @@ input:disabled {
1167 font-weight: 600; 1167 font-weight: 600;
1168 text-decoration-line: underline 1168 text-decoration-line: underline
1169 } 1169 }
1170 +
1171 +.el-popover {
1172 + .el-popconfirm {
1173 + .el-popconfirm__action {
1174 + .el-button--primary {
1175 + color: $fedexBottonColor;
1176 + }
1177 + }
1178 + }
1179 +}
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -43,6 +43,7 @@ import tableHeaders from "@/assets/languages/tableHeaders"; ...@@ -43,6 +43,7 @@ import tableHeaders from "@/assets/languages/tableHeaders";
43 import dictLabels from "@/assets/languages/dictLabels.js"; 43 import dictLabels from "@/assets/languages/dictLabels.js";
44 import settings from "./settings.js"; 44 import settings from "./settings.js";
45 import * as filters from "./utils/filters.js"; 45 import * as filters from "./utils/filters.js";
46 +import * as zipdownload from './utils/zipdownload.js'
46 import { toHead, numberRound, base64ConvertFile, b64ToBlob, titleCase, formatDate, alertWarningMsg, alertSuccessMsg, alertErrorMsg, alertInfoMsg } from "@/utils/index"; 47 import { toHead, numberRound, base64ConvertFile, b64ToBlob, titleCase, formatDate, alertWarningMsg, alertSuccessMsg, alertErrorMsg, alertInfoMsg } from "@/utils/index";
47 48
48 // 全局方法挂载 49 // 全局方法挂载
...@@ -71,6 +72,7 @@ Vue.prototype.alertWarningMsg = alertWarningMsg ...@@ -71,6 +72,7 @@ Vue.prototype.alertWarningMsg = alertWarningMsg
71 Vue.prototype.alertSuccessMsg = alertSuccessMsg 72 Vue.prototype.alertSuccessMsg = alertSuccessMsg
72 Vue.prototype.alertErrorMsg = alertErrorMsg 73 Vue.prototype.alertErrorMsg = alertErrorMsg
73 Vue.prototype.alertInfoMsg = alertInfoMsg 74 Vue.prototype.alertInfoMsg = alertInfoMsg
75 +Vue.prototype.zipdownload = zipdownload
74 Vue.prototype.msgSuccess = function (msg) { 76 Vue.prototype.msgSuccess = function (msg) {
75 this.$message({ showClose: true, message: msg, type: "success" }); 77 this.$message({ showClose: true, message: msg, type: "success" });
76 }; 78 };
......
...@@ -608,6 +608,7 @@ export function base64ConvertFile(urlData, filename) { ...@@ -608,6 +608,7 @@ export function base64ConvertFile(urlData, filename) {
608 608
609 // 将Base64字符串转换为Blob对象 609 // 将Base64字符串转换为Blob对象
610 export function b64ToBlob(b64data) { 610 export function b64ToBlob(b64data) {
611 + if (b64data.split(';base64,').length > 1) {
611 let parts = b64data.split(';base64,'); 612 let parts = b64data.split(';base64,');
612 let contentType = parts[0].split(':')[1]; 613 let contentType = parts[0].split(':')[1];
613 let raw = window.atob(parts[1]); 614 let raw = window.atob(parts[1]);
...@@ -617,6 +618,9 @@ export function b64ToBlob(b64data) { ...@@ -617,6 +618,9 @@ export function b64ToBlob(b64data) {
617 uInt8Array[i] = raw.charCodeAt(i); 618 uInt8Array[i] = raw.charCodeAt(i);
618 } 619 }
619 return new Blob([uInt8Array], { type: contentType }); 620 return new Blob([uInt8Array], { type: contentType });
621 + } else {
622 + return false
623 + }
620 } 624 }
621 625
622 //提示语公共方法 626 //提示语公共方法
......
...@@ -23,20 +23,39 @@ const mimeMap = { ...@@ -23,20 +23,39 @@ const mimeMap = {
23 } 23 }
24 const baseUrl = process.env.VUE_APP_BASE_API; //接口地址 24 const baseUrl = process.env.VUE_APP_BASE_API; //接口地址
25 25
26 -export function downLoadZip(str, data, filename) { 26 +export function downLoadZip(str, data, filename, type) {
27 var url = baseUrl + str; 27 var url = baseUrl + str;
28 return new Promise((resolve, reject) => { 28 return new Promise((resolve, reject) => {
29 axios({ 29 axios({
30 method: "get", 30 method: "get",
31 url: url, 31 url: url,
32 - params: { 32 + params: data,
33 - cusFileId: data,
34 - },
35 responseType: "blob", 33 responseType: "blob",
36 headers: { Authorization: getToken() }, 34 headers: { Authorization: getToken() },
37 }) 35 })
38 .then((res) => { 36 .then((res) => {
39 - resolveBlob(res, mimeMap.zip, filename); 37 + let fileType = ''
38 + let fileName = ''
39 + if (filename != '') {
40 + fileName = filename
41 + } else {
42 + if (res.headers['content-disposition']) {
43 + var patt = new RegExp('filename=([^;]+\\.[^\\.;]+);*')
44 + var contentDisposition = decodeURI(res.headers['content-disposition'])
45 + var result = patt.exec(contentDisposition)
46 + fileName = result[0].split('=')[1]
47 + } else {
48 + fileName = 'errorFile'
49 + }
50 + }
51 + if (type != '') {
52 + fileType = mimeMap[type]
53 + } else {
54 + if (res.headers['content-type']) {
55 + fileType = res.headers['content-type']
56 + }
57 + }
58 + resolveBlob(res, fileType, fileName);
40 resolve(res); 59 resolve(res);
41 }) 60 })
42 .catch((err) => { 61 .catch((err) => {
...@@ -61,16 +80,16 @@ export function downLoadViewPdf(str, id, title) { ...@@ -61,16 +80,16 @@ export function downLoadViewPdf(str, id, title) {
61 type: "application/pdf", 80 type: "application/pdf",
62 }); 81 });
63 let url = window.URL.createObjectURL(blob); 82 let url = window.URL.createObjectURL(blob);
64 - var win= window.open(url, "_blank"); // 打开新的标签页 83 + var win = window.open(url, "_blank"); // 打开新的标签页
65 84
66 - var setTitle= setInterval(() => { 85 + var setTitle = setInterval(() => {
67 - if (win.document.title!=""){ 86 + if (win.document.title != "") {
68 clearInterval("setTitle"); 87 clearInterval("setTitle");
69 - }else{ 88 + } else {
70 win.document.title = title; 89 win.document.title = title;
71 } 90 }
72 91
73 - },500); 92 + }, 500);
74 // var fileURL = URL.createObjectURL(blob); 93 // var fileURL = URL.createObjectURL(blob);
75 // var win = window.open(); 94 // var win = window.open();
76 // win.document.write('<iframe name="' + title + '" src="' + fileURL + '" frameborder="0" style="border:0; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%;" allowfullscreen></iframe>'); 95 // win.document.write('<iframe name="' + title + '" src="' + fileURL + '" frameborder="0" style="border:0; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%;" allowfullscreen></iframe>');
......
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 +<template>
2 + <el-dialog
3 + class="uploadHistoryDialog"
4 + :visible.sync="dialogVisible"
5 + width="35%"
6 + :show-close="true"
7 + :close-on-click-modal="false"
8 + center
9 + >
10 + <template slot="title">
11 + <div class="dialogTitle el-icon-warning"></div>
12 + </template>
13 + <div class="content">
14 + <div class="content-Item" v-html="tipcontent"></div>
15 + <div class="content-option">
16 + <el-checkbox v-model="checked" @change="checkChange">
17 + No more prompts in the future for the same situation
18 + </el-checkbox>
19 + </div>
20 + </div>
21 + <div align="center" style="margin-bottom: 20px">
22 + <el-button
23 + class="entrySaveButton entrySaveButton-background"
24 + @click="confirm"
25 + >
26 + CONFIRM
27 + </el-button>
28 + <el-button class="entrySaveButton" @click="cancel">CANCEL</el-button>
29 + </div>
30 + </el-dialog>
31 +</template>
32 +
33 +<script>
34 +import { uploadUserTipFlag } from "@/api/system/user.js";
35 +export default {
36 + props: {
37 + dialogVisible: {
38 + type: Boolean,
39 + default: false,
40 + },
41 + tipcontent: {
42 + type: String,
43 + default: "",
44 + },
45 + typeStatus: {
46 + type: Number,
47 + default: 1,
48 + },
49 + },
50 + data() {
51 + return {
52 + checked: false,
53 + };
54 + },
55 + watch: {
56 + dialogVisible(val) {
57 + if (val) {
58 + if (typeStatus == 1) {
59 + this.checked =
60 + this.$store.getters.userData.addflag1 == 1 ? false : true;
61 + } else if (typeStatus == 2) {
62 + this.checked =
63 + this.$store.getters.userData.addflag2 == 1 ? false : true;
64 + }
65 + }
66 + },
67 + },
68 + methods: {
69 + checkChange(val) {
70 + let obj = {
71 + addFlag1: this.$store.getters.userData.addflag1,
72 + addFlag2: this.$store.getters.userData.addflag1,
73 + };
74 + if (typeStatus == 1) {
75 + obj.addFlag1 = val ? 2 : 1;
76 + } else if (typeStatus == 2) {
77 + obj.addFlag2 = val ? 2 : 1;
78 + }
79 + uploadUserTipFlag(obj)
80 + .then((res) => {
81 + if (res.code === 200) {
82 + } else {
83 + // this.alertWarningMsg(res.msg)
84 + }
85 + })
86 + .catch((err) => {
87 + console.log(err);
88 + });
89 + },
90 + confirm() {
91 + this.$emit("cancel", true);
92 + },
93 + cancel() {
94 + this.$emit("cancel", false);
95 + },
96 + },
97 +};
98 +</script>
99 +
100 +<style lang="scss" scoped>
101 +@import "@/assets/styles/variables.scss";
102 +.dialogTitle {
103 + font-size: 36px;
104 + color: $fedexBottonColor;
105 +}
106 +.content {
107 + text-align: center;
108 + .content-Item {
109 + font-size: 16px;
110 + font-weight: 500;
111 + color: #333;
112 + line-height: 20px;
113 + margin-bottom: 20px;
114 + }
115 +
116 + .content-option {
117 + margin-bottom: 24px;
118 + .el-checkbox {
119 + .el-checkbox__label {
120 + color: $fedexButton !important;
121 + }
122 + }
123 + }
124 +}
125 +</style>
This diff is collapsed. Click to expand it.