jinhui.wang

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

......@@ -17,7 +17,7 @@ export function getwaybillData(data) {
});
}
// 运单详情查询
// 运单数据详情查询
/**
* @param consignmentId * 运单id
*/
......@@ -29,13 +29,39 @@ export function getWaybillDetail(data) {
});
}
// 运单附件详情查询
/**
* @param consignmentId * 运单id
*/
export function getWaybillFileList(data) {
return request({
url: "biz-customer/attachment/query/queryInfo/" + data.consignmentId,
method: "post",
data: data
});
}
// 运单提交历史查询
/**
* @param consignmentId * 运单id
* @param page *
* @param size *
*/
export function getWaybillSubmitHistory(data) {
return request({
url: "/biz-customer/attachment/query/queryInfo/" + data.consignmentId,
url: "biz-customer/uploadRecord/queryHistoryList",
method: "post",
data: data
});
}
// 历史详情查询
/**
* @param recordId id *
*/
export function getWaybillSubmitHistoryDetail(data) {
return request({
url: "biz-customer/attachment/query/queryByRecord/" + data.recordId,
method: "post",
data: data
});
......
......@@ -358,7 +358,7 @@ input:disabled {
line-height: normal;
.el-input,
// .el-select,
.el-select,
.el-date-editor,
.el-range-editor,
.el-checkbox,
......@@ -398,7 +398,7 @@ input:disabled {
height: 100% !important;
border: none !important;
background-color: transparent;
margin-bottom: 4%;
// margin-bottom: 4%;
padding-top: 1.15rem;
// padding-right: 1.15rem;
padding-left: calc(0.6rem + 0.1875rem);
......@@ -1167,3 +1167,13 @@ input:disabled {
font-weight: 600;
text-decoration-line: underline
}
.el-popover {
.el-popconfirm {
.el-popconfirm__action {
.el-button--primary {
color: $fedexBottonColor;
}
}
}
}
\ No newline at end of file
......
......@@ -43,6 +43,7 @@ import tableHeaders from "@/assets/languages/tableHeaders";
import dictLabels from "@/assets/languages/dictLabels.js";
import settings from "./settings.js";
import * as filters from "./utils/filters.js";
import * as zipdownload from './utils/zipdownload.js'
import { toHead, numberRound, base64ConvertFile, b64ToBlob, titleCase, formatDate, alertWarningMsg, alertSuccessMsg, alertErrorMsg, alertInfoMsg } from "@/utils/index";
// 全局方法挂载
......@@ -71,6 +72,7 @@ Vue.prototype.alertWarningMsg = alertWarningMsg
Vue.prototype.alertSuccessMsg = alertSuccessMsg
Vue.prototype.alertErrorMsg = alertErrorMsg
Vue.prototype.alertInfoMsg = alertInfoMsg
Vue.prototype.zipdownload = zipdownload
Vue.prototype.msgSuccess = function (msg) {
this.$message({ showClose: true, message: msg, type: "success" });
};
......
......@@ -608,6 +608,7 @@ export function base64ConvertFile(urlData, filename) {
// 将Base64字符串转换为Blob对象
export function b64ToBlob(b64data) {
if (b64data.split(';base64,').length > 1) {
let parts = b64data.split(';base64,');
let contentType = parts[0].split(':')[1];
let raw = window.atob(parts[1]);
......@@ -617,6 +618,9 @@ export function b64ToBlob(b64data) {
uInt8Array[i] = raw.charCodeAt(i);
}
return new Blob([uInt8Array], { type: contentType });
} else {
return false
}
}
//提示语公共方法
......
......@@ -23,20 +23,39 @@ const mimeMap = {
}
const baseUrl = process.env.VUE_APP_BASE_API; //接口地址
export function downLoadZip(str, data, filename) {
export function downLoadZip(str, data, filename, type) {
var url = baseUrl + str;
return new Promise((resolve, reject) => {
axios({
method: "get",
url: url,
params: {
cusFileId: data,
},
params: data,
responseType: "blob",
headers: { Authorization: getToken() },
})
.then((res) => {
resolveBlob(res, mimeMap.zip, filename);
let fileType = ''
let fileName = ''
if (filename != '') {
fileName = filename
} else {
if (res.headers['content-disposition']) {
var patt = new RegExp('filename=([^;]+\\.[^\\.;]+);*')
var contentDisposition = decodeURI(res.headers['content-disposition'])
var result = patt.exec(contentDisposition)
fileName = result[0].split('=')[1]
} else {
fileName = 'errorFile'
}
}
if (type != '') {
fileType = mimeMap[type]
} else {
if (res.headers['content-type']) {
fileType = res.headers['content-type']
}
}
resolveBlob(res, fileType, fileName);
resolve(res);
})
.catch((err) => {
......@@ -61,16 +80,16 @@ export function downLoadViewPdf(str, id, title) {
type: "application/pdf",
});
let url = window.URL.createObjectURL(blob);
var win= window.open(url, "_blank"); // 打开新的标签页
var win = window.open(url, "_blank"); // 打开新的标签页
var setTitle= setInterval(() => {
if (win.document.title!=""){
var setTitle = setInterval(() => {
if (win.document.title != "") {
clearInterval("setTitle");
}else{
} else {
win.document.title = title;
}
},500);
}, 500);
// var fileURL = URL.createObjectURL(blob);
// var win = window.open();
// 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.
<template>
<el-dialog
class="uploadHistoryDialog"
:visible.sync="dialogVisible"
width="35%"
:show-close="true"
:close-on-click-modal="false"
center
>
<template slot="title">
<div class="dialogTitle el-icon-warning"></div>
</template>
<div class="content">
<div class="content-Item" v-html="tipcontent"></div>
<div class="content-option">
<el-checkbox v-model="checked" @change="checkChange">
No more prompts in the future for the same situation
</el-checkbox>
</div>
</div>
<div align="center" style="margin-bottom: 20px">
<el-button
class="entrySaveButton entrySaveButton-background"
@click="confirm"
>
CONFIRM
</el-button>
<el-button class="entrySaveButton" @click="cancel">CANCEL</el-button>
</div>
</el-dialog>
</template>
<script>
import { uploadUserTipFlag } from "@/api/system/user.js";
export default {
props: {
dialogVisible: {
type: Boolean,
default: false,
},
tipcontent: {
type: String,
default: "",
},
typeStatus: {
type: Number,
default: 1,
},
},
data() {
return {
checked: false,
};
},
watch: {
dialogVisible(val) {
if (val) {
if (typeStatus == 1) {
this.checked =
this.$store.getters.userData.addflag1 == 1 ? false : true;
} else if (typeStatus == 2) {
this.checked =
this.$store.getters.userData.addflag2 == 1 ? false : true;
}
}
},
},
methods: {
checkChange(val) {
let obj = {
addFlag1: this.$store.getters.userData.addflag1,
addFlag2: this.$store.getters.userData.addflag1,
};
if (typeStatus == 1) {
obj.addFlag1 = val ? 2 : 1;
} else if (typeStatus == 2) {
obj.addFlag2 = val ? 2 : 1;
}
uploadUserTipFlag(obj)
.then((res) => {
if (res.code === 200) {
} else {
// this.alertWarningMsg(res.msg)
}
})
.catch((err) => {
console.log(err);
});
},
confirm() {
this.$emit("cancel", true);
},
cancel() {
this.$emit("cancel", false);
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/styles/variables.scss";
.dialogTitle {
font-size: 36px;
color: $fedexBottonColor;
}
.content {
text-align: center;
.content-Item {
font-size: 16px;
font-weight: 500;
color: #333;
line-height: 20px;
margin-bottom: 20px;
}
.content-option {
margin-bottom: 24px;
.el-checkbox {
.el-checkbox__label {
color: $fedexButton !important;
}
}
}
}
</style>
This diff is collapsed. Click to expand it.