Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
EcomWeb
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
zhanbo.xu
2025-03-18 16:34:28 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5fac17617988c383b95a3c9f55b2560de11e8fb6
5fac1761
1 parent
47f7adcc
添加订单申报通道
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
118 additions
and
63 deletions
src/components/Formitem/index.vue
src/permission.js
src/views/customerConfig/dialog.vue
src/components/Formitem/index.vue
View file @
5fac176
<template>
<!-- <div> -->
<el-form-item
class="fedexFormItem"
:label="itemLabel"
:prop="prop"
:required="required"
:error="error"
:id="'inputOuter-' + type + '-' + prop"
style="pointer-events: auto"
@click="formItemClick"
<el-form-item
class="fedexFormItem"
:label="itemLabel"
:prop="prop"
:required="required"
:error="error"
:id="'inputOuter-' + type + '-' + prop"
style="pointer-events: auto"
@click="formItemClick"
>
<slot name="title" slot="label"></slot>
<el-tooltip
v-if="toolyipShow"
class="item"
effect="dark"
:content="content"
:disabled="tooltipDisabled"
placement="top"
>
<slot name="title" slot="label"></slot>
<el-tooltip
v-if="toolyipShow"
class="item"
effect="dark"
:content="content"
:disabled="tooltipDisabled"
placement="top"
>
<slot></slot>
</el-tooltip>
<slot v-else></slot>
<template v-slot:error="scoped">
<div class="formError">{{ scoped.error }}</div>
</template>
</el-form-item>
<slot></slot>
</el-tooltip>
<slot v-else></slot>
<template v-slot:error="scoped">
<div class="formError">{{ scoped.error }}</div>
</template>
</el-form-item>
<!-- </div> -->
</template>
...
...
@@ -68,6 +68,10 @@ export default {
type: Boolean,
default: false,
},
rules: {
type: Array,
default: () => [],
},
},
data() {
return {
...
...
src/permission.js
View file @
5fac176
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
)
=>
{
// 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'
]);
// 根据roles权限生成可访问的路由表
router
.
addRoutes
(
accessRoutes
)
// 动态添加可访问路由表
next
({
...
to
,
replace
:
true
})
// hack方法 确保addRoutes已完成
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"
,
"ORDER_DECLARE_CHANNEL"
,
]);
// 根据roles权限生成可访问的路由表
router
.
addRoutes
(
accessRoutes
);
// 动态添加可访问路由表
next
({
...
to
,
replace
:
true
});
// hack方法 确保addRoutes已完成
});
// }
})
// }
}).
catch
(
err
=>
{
if
(
err
!=
undefined
)
{
store
.
dispatch
(
'FedLogOut'
)
}
})
.
catch
((
err
)
=>
{
if
(
err
!=
undefined
)
{
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
(()
=>
{});
...
...
src/views/customerConfig/dialog.vue
View file @
5fac176
...
...
@@ -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: {
...
...
Please
register
or
login
to post a comment