jinhui.wang

基础配置修改,无用代码删除

......@@ -81,10 +81,10 @@ export default {
// 全局入口页
layout: {
register: "Login",
fedexLogin: "fedex.com user log in",
fedexLogin: "Fedex.com user account login",
fedexRegister: "Employee log in",
onlineDeclare: "線上申報平臺帳號登錄",
registerNumber: "註冊線上申報平臺帳號",
registerNumber: "Register a Fedex.com account",
userInfo: "用戶信息維護",
logOut: "log out",
logOutDia: "Are you sure to log out and exit the system?",
......@@ -108,7 +108,7 @@ export default {
selectTem: "選擇使用者",
insterTem: "新增使用者",
updateTem: "修改使用者",
number: "提單號碼",
number: "Waybill inquiry",
contacts: "聯絡人",
exporterNum: "貨物輸出統一編號",
email: "聯絡人 e-mail",
......
......@@ -72,6 +72,11 @@
{{ $t("layout.fedexRegister") }}
</span>
</el-dropdown-item>
<el-dropdown-item>
<span>
{{ $t("layout.registerNumber") }}
</span>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<!-- <el-select
......@@ -156,7 +161,7 @@ export default {
type: "warning",
}).then(() => {
this.$store.dispatch("LogOut").then(() => {
location.href = "/IcTw";
location.href = "/ImpPer";
});
});
},
......
<template>
<div class="view-option">
<div class="menu-info">
<span class="info" v-if="activeRoute.name == 'declarationInput'">
{{ $t("fillIn.number") }}:&nbsp;{{ deliveryNo || "" }}
<span
class="info"
v-if="
activeRoute.name == 'WaybillInquiry' ||
activeRoute.name == 'UploadDetail'
"
>
{{ $t("fillIn.number") }}
<!-- :&nbsp;{{ deliveryNo || "" }} -->
</span>
<span class="info" v-else>
{{ activeRoute.meta.title }}
......@@ -54,10 +61,10 @@ export default {
font-size: 0.88rem;
border-bottom: 1px solid $fedexBorder;
background-color: #fff;
margin-left: 231px;
margin-left: 230px;
.info {
font-weight: 500;
font-weight: 600;
}
}
</style>
......
......@@ -60,20 +60,20 @@ service.interceptors.response.use(
const msg = errorCode[code] || res.data.msg || errorCode["default"];
if (code === 301) {
MessageBox.confirm(
"登錄狀態已過期,您可以繼續留在該頁面,或者重新登錄",
"系統提示",
"The login status has expired. You can continue to stay on this page or log in again.",
"System prompt",
{
confirmButtonText: "重新登錄",
cancelButtonText: "取消",
confirmButtonText: "Login again",
cancelButtonText: "Close",
type: "warning",
}
).then(() => {
store.dispatch("FedLogOut").then(() => {
location.href = "/IcTw";
location.href = "/ImpPer";
});
});
} else if (code === 500) {
MessageBox.alert(msg, "註意", {
MessageBox.alert(msg, "Attention", {
dangerouslyUseHTMLString: true,
});
return Promise.reject(new Error(msg));
......@@ -87,11 +87,11 @@ service.interceptors.response.use(
console.log("err" + error);
let { message } = error;
if (message == "Network Error") {
message = "系統異常,請聯繫清關部門";
message = "System exception, please contact the customs clearance department";
} else if (message.includes("timeout")) {
message = "請求超時,請聯繫清關部門";
message = "Request timeout, please contact the customs clearance department";
} else if (message.includes("Request failed with status code")) {
message = "系統接口" + message.substr(message.length - 3) + "異常,請聯繫清關部門";
message = "System interface abnormality" + message.substr(message.length - 3) + ",please contact the customs clearance department";
}
Message({
message: message,
......
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
<template>
<div class="fill-step">
<!-- <div
v-for="(item, index) in steps"
:key="index"
:class="
item.state1 == curStep
? 'edit-color'
: stepStates.includes(item.state2)
? setSelectIndex==2 && item.state1==2 ? 'cur-color':'finish-color'
: 'cur-color'
"
>
<div>
<i
class="el-icon-success"
v-if="stepStates.includes(item.state2) && item.state1 != curStep "
></i>
<i class="el-icon-success" v-else></i>
<span> {{ item.label }}</span>
</div>
<div v-if="setSelectIndex==2 && item.state1==2"></div>
<el-button
type="text"
v-else-if="stepStates.includes(item.state2) && item.state1 != curStep"
@click="editStepBtn(item)"
:loading="editLoading && curClickStep == item.state1"
>編輯</el-button
>
</div> -->
<div
v-for="(item, index) in steps"
:key="index"
:class="item.state1 == curStep
? 'edit-color'
: stepStates.includes(item.state2)
? setSelectIndex == 2 && item.state1 == 2 ? 'cur-color' : 'finish-color'
: 'cur-color'
"
>
<div>
<i
class="el-icon-success"
v-if="stepStates.includes(item.state2) && item.state1 != curStep"
></i>
<i class="el-icon-success" v-else></i>
<span> {{ item.label }}</span>
</div>
<div v-if="setSelectIndex == 2 && item.state1 == 2"></div>
<el-button
type="text"
v-else-if="stepEdit.includes(item.state2) && item.state1 != curStep"
@click="editStepBtn(item)"
:loading="editLoading && curClickStep == item.state1"
:disabled="editDisabled"
>編輯</el-button
>
</div>
</div>
</template>
<script>
import { mapGetters } from "vuex";
export default {
props: {
curStep: {
type: Number,
default() {
return 1;
},
},
//控制颜色
stepStates: {
type: Array,
default() {
return [];
},
},
//控制编辑按钮显示
stepEdit: {
type: Array,
default() {
return [];
},
},
editLoading: {
type: Boolean,
default() {
return false;
},
},
editDisabled: {
type: Boolean,
default() {
return false;
},
},
setSelectIndex: {
type: Number,
},
},
data() {
return {
curClickStep: null,
};
},
created() {},
computed: {
steps() {
return [
{
label: this.$t("fillIn.step1"),
state1: 1,
state2: "finish1",
},
{
label: this.$t("fillIn.step2"),
state1: 2,
state2: "finish2",
},
{
label: this.$t("fillIn.step3"),
state1: 3,
state2: "finish3",
},
];
},
},
methods: {
editStepBtn(val) {
this.curClickStep = val.state1;
let filtStep = this.stepStates.filter((item) => item != val.state2);
this.$emit("setStepStates", [...new Set(filtStep)]);
this.$emit("editNextStep", {
curStep: val.state1,
leaveStep: this.curStep,
});
},
},
};
</script>
<style lang="scss" scoped>
.fill-step {
padding: 16px 16px;
line-height: 40px;
// display: flex;
// flex-direction: column
.cur-color {
display: flex;
justify-content: space-between;
color: #919191;
}
.edit-color {
display: flex;
justify-content: space-between;
color: #4d148c;
}
.finish-color {
display: flex;
justify-content: space-between;
font-weight: 500;
font-size: 14px;
color: #008a00;
}
}
</style>
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.
This diff is collapsed. Click to expand it.
<template>
<el-dialog
title="下載附件"
:visible.sync="dialogVisible"
width="50%"
:show-close="true"
class="detail-dialog"
>
<Table
class="fedexDetialTable mt20"
:data="tableData"
:headerData="headerData"
:selection="false"
height="400px"
:order="false"
:border="false"
:pagination="false"
:selectFixed="false"
:pageSizes="[20, 30, 50, 100]"
@selectionChange="handleSelectionChange"
:loading="tableLodaing"
>
<template v-slot:name="scope">
<p> {{ scope.row.name }}{{ scope.row.type }}</p>
</template>
<template v-slot:down="scope">
<el-button
class="plain"
size="mini"
@click.native.stop="downLoadOneFile(scope.row)"
:loading="scope.row.downloadLoading"
>下載</el-button
>
</template>
</Table>
<div class="width-btn-box">
<el-button
class="entrySaveButton entrySaveButton-background"
@click="batchDownloadBtn"
style="margin-right: 30px;width: 110px;"
:loading="allDownload"
:disabled="this.tableData<=0"
>
下載全部
</el-button>
<el-button class="entrySaveButton" style="width: 110px;" @click="closeDialog">取消</el-button>
</div>
</el-dialog>
</template>
<script>
import { getFindSysByDeclareId } from "@/api/fillForm.js";
import { downLoadZip,downLoadFile } from "@/utils/zipdownload";
export default {
components: {},
props: {},
data() {
return {
tableLodaing:false,
allDownload:false,
dialogVisible: false,
declareId: null,
tableData: [],
headerData: [
{
name: "附件名稱",
value: "name",
width: "",
align: "left",
slot: true,
},
{
name: "操作",
value: "down",
width: "100",
align: "center",
slot: true,
},
],
selectCheckList: [],
customsFileId: null,
};
},
methods: {
// 打开弹窗
openDialog(row) {
this.dialogVisible = true;
this.declareId = row.id;
this.customsFileId = row.customsFileId;
this.getUploadFileList();
},
// 关闭弹窗
closeDialog() {
this.dialogVisible = false;
},
// 选择下载的附件
handleSelectionChange(val) {
this.selectCheckList = val;
},
// 下载
downLoadOneFile(fileRow) {
fileRow.downloadLoading=true;
downLoadFile(
"/icleartw/cusFile/downLoadFile",
fileRow.id,
fileRow.name+ fileRow.type
).then(() => {
this.$message.success("下載成功");
this.exportLoading = false;
})
.catch(() => {
this.exportLoading = false;
}).finally(()=>{
fileRow.downloadLoading = false;
})
},
// 批量下载
batchDownloadBtn() {
this.allDownload=true;
downLoadZip(
"/icleartw/cusFile/downLoadCusFileAll",
this.customsFileId,
"附件"
)
.then(() => {
this.allDownload = false;
this.exportLoading = false;
})
.catch(() => {
this.exportLoading = false;
});
},
// 获取文件列表
getUploadFileList() {
this.tableData=[];
this.tableLodaing=true;
getFindSysByDeclareId(this.declareId).then((res) => {
if (res.code == 200) {
this.tableData = res.data;
if (this.tableData != null) {
this.tableData = this.tableData.map(item => {
return {
...item,
downloadLoading: false
};
});
}
}else{
this.$message.error(res.msg);
}
}).catch((res)=>{
this.$message.error(res.msg);
}).finally(()=>{
this.tableLodaing = false;
})
},
},
};
</script>
<style lang="scss" scoped>
.detail-dialog {
.title-box {
font-size: 16px;
font-weight: 600;
// line-height: 22px;
color: #000000;
display: flex;
justify-content: space-between;
.el-button {
padding: 0;
font-size: 12px;
}
}
.content {
color: #333;
font-size: 12px;
.small-title {
margin: 12px 0 4px 0;
font-size: 14px;
}
.info-box {
width: 100%;
height: 50px;
line-height: 17px;
background: #f2f2f2;
padding: 8px;
margin-bottom: 4px;
}
}
.download {
.el-button {
padding: 0;
font-size: 12px;
}
img {
vertical-align: -4px;
}
}
::v-deep .el-dialog {
padding: 20px 100px;
}
::v-deep .el-dialog__header {
text-align: center;
}
.width-btn-box {
width: 100%;
text-align: center;
margin-top: 16px;
.el-button {
width: 100px;
}
}
::v-deep .el-table__body-wrapper .el-table__body tbody tr {
height: 50px;
}
}
</style>
This diff is collapsed. Click to expand it.
export const tableHeaderKeys = [
{
label: "提單號碼",
prop: "deliveryNo",
width: 150,
align: "left",
sort: false,
},
{
label: "報單類別",
prop: "customsDeclarationType",
width: 150,
align: "left",
sort: false,
},
{
label: "操作狀態/時間",
prop: "operStatusAndTime1",
width: 150,
align: "left",
tem: "operStatusAndTime1",
sort: "custom",
},
{
label: "傳送狀態/時間",
prop: "delStatus",
width: 150,
align: "left",
tem: "delStatus",
sort: "custom",
},
{
label: "是否適用在目的地進口清關",
prop: "isClear",
width: 150,
align: "left",
tem: "isClear",
sort: false,
},
{
label: "操作",
prop: "opt",
width: 150,
align: "center",
tem: "opt",
sort: false,
},
];