zhanbo.xu

添加订单申报通道

...@@ -68,6 +68,10 @@ export default { ...@@ -68,6 +68,10 @@ export default {
68 type: Boolean, 68 type: Boolean,
69 default: false, 69 default: false,
70 }, 70 },
71 + rules: {
72 + type: Array,
73 + default: () => [],
74 + },
71 }, 75 },
72 data() { 76 data() {
73 return { 77 return {
......
1 -import router from './router' 1 +import router from "./router";
2 -import store from './store' 2 +import store from "./store";
3 -import { Message, MessageBox } from 'element-ui' 3 +import { Message, MessageBox } from "element-ui";
4 -import { getToken, getLoginType } from '@/utils/auth' 4 +import { getToken, getLoginType } from "@/utils/auth";
5 import { alertWarningMsg, alertSuccessMsg, alertErrorMsg } from "@/utils/index"; 5 import { alertWarningMsg, alertSuccessMsg, alertErrorMsg } from "@/utils/index";
6 -import { getParamsObj } from '@/utils/parseUrlParams' 6 +import { getParamsObj } from "@/utils/parseUrlParams";
7 -const whiteList = ['/login', '/auth-redirect', '/bind', '/register', '/relogin'] 7 +const whiteList = [
8 - 8 + "/login",
9 + "/auth-redirect",
10 + "/bind",
11 + "/register",
12 + "/relogin",
13 +];
9 14
10 router.beforeEach((to, from, next) => { 15 router.beforeEach((to, from, next) => {
11 - 16 + if (to.path == "/relogin") {
12 - if (to.path == '/relogin') { 17 + next();
13 - next()
14 } else { 18 } else {
15 if (getToken()) { 19 if (getToken()) {
16 - let path = '' 20 + let path = "";
17 /* has token*/ 21 /* has token*/
18 22
19 - if (to.path === '/login') { 23 + if (to.path === "/login") {
20 - next({ path: path }) 24 + next({ path: path });
21 } else { 25 } else {
22 if (store.getters.userData == null) { 26 if (store.getters.userData == null) {
23 // 判断当前用户是否已拉取完user_info信息 27 // 判断当前用户是否已拉取完user_info信息
24 - store.dispatch('GetInfo').then((res) => { 28 + store
29 + .dispatch("GetInfo")
30 + .then((res) => {
25 // if (res.success) { 31 // if (res.success) {
26 - store.dispatch('GenerateRoutes').then(accessRoutes => { 32 + store.dispatch("GenerateRoutes").then((accessRoutes) => {
27 - 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']); 33 + store.dispatch("GetDict", [
34 + "DECLARE_F_FLAG",
35 + "MEASUREMENT_UNIT",
36 + "TEMPLATE_TYPE",
37 + "PACKAGE_TYPE_CODE",
38 + "RECEIPT_STATUS",
39 + "DECLARE_APPTYPE",
40 + "CURRENCY",
41 + "COUNTRY_REGION_CODE",
42 + "DECLARE_STATISTICS_FLAG",
43 + "ORDER_DECLARATION_PARTY",
44 + "APP_STATUS",
45 + "METHOD_OF_SIGNATURE",
46 + "ORDER_DECLARE_CHANNEL",
47 + ]);
28 // 根据roles权限生成可访问的路由表 48 // 根据roles权限生成可访问的路由表
29 - router.addRoutes(accessRoutes) // 动态添加可访问路由表 49 + router.addRoutes(accessRoutes); // 动态添加可访问路由表
30 - next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 50 + next({ ...to, replace: true }); // hack方法 确保addRoutes已完成
31 - }) 51 + });
32 // } 52 // }
33 - }).catch(err => { 53 + })
54 + .catch((err) => {
34 if (err != undefined) { 55 if (err != undefined) {
35 - store.dispatch('FedLogOut') 56 + store.dispatch("FedLogOut");
36 } 57 }
37 - }) 58 + });
38 } else { 59 } else {
39 - next() 60 + next();
40 } 61 }
41 } 62 }
42 } else { 63 } else {
43 // 没有token 64 // 没有token
44 if (whiteList.indexOf(to.path) !== -1) { 65 if (whiteList.indexOf(to.path) !== -1) {
45 // 在免登录白名单,直接进入 66 // 在免登录白名单,直接进入
46 - next() 67 + next();
47 } else { 68 } else {
48 - if (to.path === '/reportingData') { 69 + if (to.path === "/reportingData") {
49 - const userToken = getParamsObj(location.href).token 70 + const userToken = getParamsObj(location.href).token;
50 - store.dispatch('LoginWithoutPassword', userToken).then(()=>{ 71 + store.dispatch("LoginWithoutPassword", userToken).then(() => {
51 - next(`/reportingData`) 72 + next(`/reportingData`);
52 - }) 73 + });
53 } else { 74 } else {
54 - next(`/login`) // 否则全部重定向到登录页 75 + next(`/login`); // 否则全部重定向到登录页
55 } 76 }
56 } 77 }
57 } 78 }
58 } 79 }
59 -}) 80 +});
60 81
61 -router.afterEach(() => { 82 +router.afterEach(() => {});
62 -})
......
...@@ -9,7 +9,10 @@ ...@@ -9,7 +9,10 @@
9 v-loading="loadings.dialogLoading" 9 v-loading="loadings.dialogLoading"
10 @close="close" 10 @close="close"
11 > 11 >
12 - <div class="modelItem"> 12 + <div
13 + class="modelItem"
14 + style="max-height: 65vh; overflow-x: hidden; overflow-y: auto"
15 + >
13 <el-form 16 <el-form
14 class="fedexFormStyle" 17 class="fedexFormStyle"
15 ref="formData" 18 ref="formData"
...@@ -335,6 +338,31 @@ ...@@ -335,6 +338,31 @@
335 </el-select> 338 </el-select>
336 </Formitem> 339 </Formitem>
337 </el-col> 340 </el-col>
341 + <!-- 订单申报通道 orderDeclareChannel -->
342 + <el-col :span="8">
343 + <Formitem
344 + label="订单申报通道"
345 + prop="orderDeclareChannel"
346 + type="edit"
347 + >
348 + <el-select
349 + type="text"
350 + id="inputInner-edit-orderDeclareChannel"
351 + v-model="portConfig.TAO.orderDeclareChannel"
352 + clearable
353 + maxlength="4"
354 + placeholder=""
355 + >
356 + <el-option
357 + v-for="(item, index) in $store.getters.dict
358 + .ORDER_DECLARE_CHANNEL"
359 + :key="index"
360 + :label="item.itemChineseName"
361 + :value="item.itemValue"
362 + ></el-option>
363 + </el-select>
364 + </Formitem>
365 + </el-col>
338 366
339 <el-col :span="16" style="padding-right: 5px"> 367 <el-col :span="16" style="padding-right: 5px">
340 <div class="uploadItem"> 368 <div class="uploadItem">
...@@ -831,6 +859,7 @@ export default { ...@@ -831,6 +859,7 @@ export default {
831 certificateName: "", 859 certificateName: "",
832 certificateBase64: "", 860 certificateBase64: "",
833 methodOfSignature: "", 861 methodOfSignature: "",
862 + orderDeclareChannel: "",
834 }, 863 },
835 CAN: { 864 CAN: {
836 clientId: "", // 申报企业电子口岸备案号 865 clientId: "", // 申报企业电子口岸备案号
...@@ -887,6 +916,7 @@ export default { ...@@ -887,6 +916,7 @@ export default {
887 message: "订单申报方不能为空!", 916 message: "订单申报方不能为空!",
888 }, 917 },
889 ], 918 ],
919 +
890 // methodOfSignature: [ 920 // methodOfSignature: [
891 // { 921 // {
892 // required: true, 922 // required: true,
...@@ -949,6 +979,7 @@ export default { ...@@ -949,6 +979,7 @@ export default {
949 qingdaoFileList: [], 979 qingdaoFileList: [],
950 gzFileList: [], 980 gzFileList: [],
951 gzRivateKeyFileList: [], 981 gzRivateKeyFileList: [],
982 + orderDeclareChannelList: [],
952 }; 983 };
953 }, 984 },
954 watch: { 985 watch: {
......