zhanbo.xu

添加订单申报通道

......@@ -68,6 +68,10 @@ export default {
type: Boolean,
default: false,
},
rules: {
type: Array,
default: () => [],
},
},
data() {
return {
......
import router from './router'
import store from './store'
import { Message, MessageBox } from 'element-ui'
import { getToken, getLoginType } from '@/utils/auth'
import router from "./router";
import store from "./store";
import { Message, MessageBox } from "element-ui";
import { getToken, getLoginType } from "@/utils/auth";
import { alertWarningMsg, alertSuccessMsg, alertErrorMsg } from "@/utils/index";
import { getParamsObj } from '@/utils/parseUrlParams'
const whiteList = ['/login', '/auth-redirect', '/bind', '/register', '/relogin']
import { getParamsObj } from "@/utils/parseUrlParams";
const whiteList = [
"/login",
"/auth-redirect",
"/bind",
"/register",
"/relogin",
];
router.beforeEach((to, from, next) => {
if (to.path == '/relogin') {
next()
if (to.path == "/relogin") {
next();
} else {
if (getToken()) {
let path = ''
let path = "";
/* has token*/
if (to.path === '/login') {
next({ path: path })
if (to.path === "/login") {
next({ path: path });
} else {
if (store.getters.userData == null) {
// 判断当前用户是否已拉取完user_info信息
store.dispatch('GetInfo').then((res) => {
store
.dispatch("GetInfo")
.then((res) => {
// if (res.success) {
store.dispatch('GenerateRoutes').then(accessRoutes => {
store.dispatch("GetDict", ['DECLARE_F_FLAG', 'MEASUREMENT_UNIT','TEMPLATE_TYPE','PACKAGE_TYPE_CODE', 'RECEIPT_STATUS', 'DECLARE_APPTYPE', 'CURRENCY','COUNTRY_REGION_CODE', 'DECLARE_STATISTICS_FLAG', 'ORDER_DECLARATION_PARTY','APP_STATUS','METHOD_OF_SIGNATURE','METHOD_OF_SIGNATURE']);
store.dispatch("GenerateRoutes").then((accessRoutes) => {
store.dispatch("GetDict", [
"DECLARE_F_FLAG",
"MEASUREMENT_UNIT",
"TEMPLATE_TYPE",
"PACKAGE_TYPE_CODE",
"RECEIPT_STATUS",
"DECLARE_APPTYPE",
"CURRENCY",
"COUNTRY_REGION_CODE",
"DECLARE_STATISTICS_FLAG",
"ORDER_DECLARATION_PARTY",
"APP_STATUS",
"METHOD_OF_SIGNATURE",
"ORDER_DECLARE_CHANNEL",
]);
// 根据roles权限生成可访问的路由表
router.addRoutes(accessRoutes) // 动态添加可访问路由表
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
})
router.addRoutes(accessRoutes); // 动态添加可访问路由表
next({ ...to, replace: true }); // hack方法 确保addRoutes已完成
});
// }
}).catch(err => {
})
.catch((err) => {
if (err != undefined) {
store.dispatch('FedLogOut')
store.dispatch("FedLogOut");
}
})
});
} else {
next()
next();
}
}
} else {
// 没有token
if (whiteList.indexOf(to.path) !== -1) {
// 在免登录白名单,直接进入
next()
next();
} else {
if (to.path === '/reportingData') {
const userToken = getParamsObj(location.href).token
store.dispatch('LoginWithoutPassword', userToken).then(()=>{
next(`/reportingData`)
})
if (to.path === "/reportingData") {
const userToken = getParamsObj(location.href).token;
store.dispatch("LoginWithoutPassword", userToken).then(() => {
next(`/reportingData`);
});
} else {
next(`/login`) // 否则全部重定向到登录页
next(`/login`); // 否则全部重定向到登录页
}
}
}
}
})
});
router.afterEach(() => {
})
router.afterEach(() => {});
......
......@@ -9,7 +9,10 @@
v-loading="loadings.dialogLoading"
@close="close"
>
<div class="modelItem">
<div
class="modelItem"
style="max-height: 65vh; overflow-x: hidden; overflow-y: auto"
>
<el-form
class="fedexFormStyle"
ref="formData"
......@@ -335,6 +338,31 @@
</el-select>
</Formitem>
</el-col>
<!-- 订单申报通道 orderDeclareChannel -->
<el-col :span="8">
<Formitem
label="订单申报通道"
prop="orderDeclareChannel"
type="edit"
>
<el-select
type="text"
id="inputInner-edit-orderDeclareChannel"
v-model="portConfig.TAO.orderDeclareChannel"
clearable
maxlength="4"
placeholder=""
>
<el-option
v-for="(item, index) in $store.getters.dict
.ORDER_DECLARE_CHANNEL"
:key="index"
:label="item.itemChineseName"
:value="item.itemValue"
></el-option>
</el-select>
</Formitem>
</el-col>
<el-col :span="16" style="padding-right: 5px">
<div class="uploadItem">
......@@ -831,6 +859,7 @@ export default {
certificateName: "",
certificateBase64: "",
methodOfSignature: "",
orderDeclareChannel: "",
},
CAN: {
clientId: "", // 申报企业电子口岸备案号
......@@ -887,6 +916,7 @@ export default {
message: "订单申报方不能为空!",
},
],
// methodOfSignature: [
// {
// required: true,
......@@ -949,6 +979,7 @@ export default {
qingdaoFileList: [],
gzFileList: [],
gzRivateKeyFileList: [],
orderDeclareChannelList: [],
};
},
watch: {
......