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
xingru.liu
2024-12-27 14:23:23 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4bc94778d87dbd3d4430bec941c6f7303f087645
4bc94778
1 parent
c507fa7b
Bug修复
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
513 additions
and
234 deletions
src/api/menu.js
src/api/system/customer-ai.js
src/api/system/port-api.js
src/api/system/user.js
src/router/index.js
src/store/modules/permission.js
src/views/cipherMachineConfig/index.vue
src/views/customerConfig/dialog.vue
src/views/customerConfig/index.vue
src/views/exportBillQuery/index.vue
src/views/exportListDetail/index.vue
src/views/exportListQuery/index.vue
src/views/exportRevokeBillQuery/index.vue
src/views/exportTransportBillQuery/index.vue
src/views/exportTransportDetail/index.vue
src/views/listBranchQuery/index.vue
src/views/logisticsExitQuery/index.vue
src/views/portConfig/index.vue
src/views/reportingData/index.vue
src/views/roleConfig/dialog.vue
src/views/userRoleConfig/index.vue
src/api/menu.js
View file @
4bc9477
import
request
from
'@/utils/request'
// 获取路由
// 获取路由
所有路由
export
const
getRouters
=
()
=>
{
return
request
({
url
:
'/bus-customer/menu/selectMenu'
,
...
...
@@ -8,3 +8,10 @@ export const getRouters = () => {
})
}
//获取用户可访问的路由
export
const
getUserRouters
=
()
=>
{
return
request
({
url
:
'/bus-customer/obtainUserRights'
,
method
:
'post'
})
}
...
...
src/api/system/customer-ai.js
View file @
4bc9477
import
request
from
'@/utils/request'
import
axios
from
"axios"
;
const
baseUrl
=
process
.
env
.
VUE_APP_BASE_API
;
//接口地址
// 查询客户数据
/**
...
...
@@ -56,18 +59,65 @@ export function addCustomerData(data) {
//上传证书
export
function
uploadCertificate
(
ecomEntCode
,
certificate
)
{
const
formData
=
new
FormData
();
formData
.
append
(
'certificate'
,
certificate
.
multipartFile
);
formData
.
append
(
'certificate'
,
certificate
);
formData
.
append
(
'ecomEntCode'
,
ecomEntCode
);
return
request
({
url
:
'/bus-customer/customers/uploadCertificate
?ecomEntCode='
+
ecomEntCode
,
url
:
'/bus-customer/customers/uploadCertificate
'
,
method
:
'post'
,
data
:
formData
,
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
});
}
//删除证书
export
function
delCertificate
(
id
,
certificate
)
{
return
request
({
url
:
'/bus-customer/customers/deleteCertificate'
,
method
:
'post'
,
params
:
{
id
:
id
,
certificate
:
certificate
},
});
}
//下载证书
export
function
downloadCertificate
(
id
,
filename
)
{
// return request({
// url: '/bus-customer/customers/getCertificate/' + id,
// method: 'get',
// responseType: 'blob', // 确保响应类型为 blob
// // data: formData,
// });
console
.
log
(
"fileName"
+
filename
);
return
new
Promise
((
resolve
,
reject
)
=>
{
// axios({
// method: "get",
// url: '/bus-customer/customers/getCertificate/' + id,
// responseType: "blob",
// })
var
url
=
baseUrl
+
'/bus-customer/customers/getCertificate/'
+
id
;
request
({
url
:
url
,
method
:
'get'
,
responseType
:
'blob'
,
// 确保响应类型为 blob
params
:
id
,
})
.
then
((
res
)
=>
{
console
.
log
(
"aaaaaa"
+
res
);
const
aLink
=
document
.
createElement
(
"a"
);
aLink
.
href
=
URL
.
createObjectURL
(
res
);
aLink
.
setAttribute
(
"download"
,
filename
);
// 设置下载文件名称
document
.
body
.
appendChild
(
aLink
);
aLink
.
click
();
document
.
body
.
removeChild
(
aLink
);
resolve
(
res
);
})
.
catch
((
err
)
=>
{
reject
(
err
);
});
});
}
// 修改客户数据
/**
* @param id *
...
...
@@ -98,7 +148,7 @@ export function updateCustomerData(data) {
// formData.append("qingdaoUserId", data.qingdaoUserId);
return
request
({
url
:
'/bus-customer/customers/update'
,
method
:
'p
os
t'
,
method
:
'p
u
t'
,
data
:
data
})
}
\ No newline at end of file
...
...
src/api/system/port-api.js
View file @
4bc9477
...
...
@@ -50,4 +50,16 @@ export function updatePortData(data) {
method
:
'put'
,
data
:
data
})
}
\ No newline at end of file
}
// 获取口岸字典
/**
* @param
*/
export
function
getPortCodeList
()
{
return
request
({
url
:
'/bus-customer/portInfo/getPortCodeList'
,
method
:
'get'
,
// params: data
})
}
\ No newline at end of file
...
...
src/api/system/user.js
View file @
4bc9477
...
...
@@ -119,13 +119,13 @@ export function updateUserData(data) {
*/
export
function
updateUserRoleChange
(
data
)
{
return
request
({
url
:
'/bus-customer/user/
updateUser
'
,
url
:
'/bus-customer/user/
roleEditing
'
,
method
:
'put'
,
data
:
data
})
}
// 获取口岸字典
// 获取
用户
口岸字典
/**
* @param
*/
...
...
@@ -159,4 +159,16 @@ export function getUserRoleType(data) {
method
:
'get'
,
params
:
data
})
}
\ No newline at end of file
}
/**
* 获取role已绑定的Menue
* @param {} roleId
* @returns
*/
export
function
getMenuByRoleId
(
roleId
)
{
return
request
({
url
:
'/bus-customer/role/selectMenu?roleId='
+
roleId
,
method
:
'get'
,
// params: data
})
}
...
...
src/router/index.js
View file @
4bc9477
...
...
@@ -72,6 +72,13 @@ export const constantRoutes = [
// name: '首页',
// meta: { title: '首页', icon: 'dashboard' }
// },
// {
// path: '/customerConfig',
// component: (resolve) => require(['@/views/customerConfig/index'], resolve),
// hidden: false,
// name: 'CustomerConfig',
// meta: { title: '客户管理', icon: '' }
// },
// ]
// },
{
...
...
@@ -86,7 +93,8 @@ export const constantRoutes = [
hidden
:
false
,
name
:
'ReportingData'
,
meta
:
{
title
:
'申报数据管理'
,
icon
:
'upload'
}
}
},
]
},
{
...
...
@@ -95,13 +103,13 @@ export const constantRoutes = [
hidden
:
false
,
meta
:
{
title
:
'查询管理'
,
icon
:
'fedexExportIcon'
},
children
:
[
{
path
:
'/exportBillQuery'
,
component
:
(
resolve
)
=>
require
([
'@/views/exportBillQuery/index'
],
resolve
),
hidden
:
false
,
name
:
'ExportBillQuery'
,
meta
:
{
title
:
'出口订单查询'
,
icon
:
''
},
},
//
{
//
path: '/exportBillQuery',
//
component: (resolve) => require(['@/views/exportBillQuery/index'], resolve),
//
hidden: false,
//
name: 'ExportBillQuery',
//
meta: { title: '出口订单查询', icon: '' },
//
},
{
path
:
'/exportBillDetail'
,
component
:
(
resolve
)
=>
require
([
'@/views/exportBillDetail/index'
],
resolve
),
...
...
@@ -123,27 +131,27 @@ export const constantRoutes = [
name
:
'ExportListDetail'
,
meta
:
{
title
:
'出口清单详情'
,
icon
:
''
},
},
{
path
:
'/exportTransportBillQuery'
,
component
:
(
resolve
)
=>
require
([
'@/views/exportTransportBillQuery/index'
],
resolve
),
hidden
:
false
,
name
:
'ExportTransportBillQuery'
,
meta
:
{
title
:
'出口运单查询'
,
icon
:
''
},
},
{
path
:
'/exportListQuery'
,
component
:
(
resolve
)
=>
require
([
'@/views/exportListQuery/index'
],
resolve
),
name
:
'首页'
,
name
:
'ExportListQuery'
,
meta
:
{
title
:
'出口清单查询'
,
icon
:
''
}
},
{
path
:
'/listBranchQuery'
,
component
:
(
resolve
)
=>
require
([
'@/views/listBranchQuery/index'
],
resolve
),
name
:
'ListBranchQuery'
,
hidden
:
false
,
meta
:
{
title
:
'清单总分单查询'
,
icon
:
''
}
},
//
{
//
path: '/exportTransportBillQuery',
//
component: (resolve) => require(['@/views/exportTransportBillQuery/index'], resolve),
//
hidden: false,
//
name: 'ExportTransportBillQuery',
//
meta: { title: '出口运单查询', icon: '' },
//
},
//
{
//
path: '/exportListQuery',
//
component: (resolve) => require(['@/views/exportListQuery/index'], resolve),
//
name: '首页',
//
name: 'ExportListQuery',
//
meta: { title: '出口清单查询', icon: '' }
//
},
//
{
//
path: '/listBranchQuery',
//
component: (resolve) => require(['@/views/listBranchQuery/index'], resolve),
//
name: 'ListBranchQuery',
//
hidden: false,
//
meta: { title: '清单总分单查询', icon: '' }
//
},
{
path
:
'/listBranchDetail'
,
component
:
(
resolve
)
=>
require
([
'@/views/listBranchDetail/index'
],
resolve
),
...
...
@@ -158,85 +166,85 @@ export const constantRoutes = [
hidden
:
true
,
meta
:
{
title
:
'物流离境单详情'
,
icon
:
''
}
},
{
path
:
'/logisticsExitQuery'
,
component
:
(
resolve
)
=>
require
([
'@/views/logisticsExitQuery/index'
],
resolve
),
name
:
'LogisticsExitQuery'
,
meta
:
{
title
:
'物流离境单查询'
,
icon
:
''
}
},
{
path
:
'exportRevokeBillQuery'
,
component
:
(
resolve
)
=>
require
([
'@/views/exportRevokeBillQuery/index'
],
resolve
),
name
:
'ExportRevokeBillQuery'
,
meta
:
{
title
:
'出口撤销单查询'
,
icon
:
''
}
}
]
},
{
path
:
'/summary'
,
component
:
Layout
,
hidden
:
false
,
meta
:
{
title
:
'汇总申报'
,
icon
:
'fedexSummary'
},
children
:
[
{
path
:
'/summary'
,
component
:
(
resolve
)
=>
require
([
'@/views/summaryEdit/index'
],
resolve
),
hidden
:
false
,
name
:
'Summary'
,
meta
:
{
title
:
'汇总申报'
,
icon
:
''
}
},
{
path
:
'/summaryDataSearch'
,
component
:
(
resolve
)
=>
require
([
'@/views/summaryDataSearch/index'
],
resolve
),
hidden
:
false
,
name
:
'SummaryDataSearch'
,
meta
:
{
title
:
'汇总申请单查询'
,
icon
:
''
}
}
]
},
{
path
:
'/system'
,
component
:
Layout
,
hidden
:
false
,
meta
:
{
title
:
'系统管理'
,
icon
:
'fedexQueue'
},
children
:
[
{
path
:
'/portConfig'
,
component
:
(
resolve
)
=>
require
([
'@/views/portConfig/index'
],
resolve
),
hidden
:
false
,
name
:
'PortConfig'
,
meta
:
{
title
:
'口岸信息管理'
,
icon
:
''
}
},
{
path
:
'/customerConfig'
,
component
:
(
resolve
)
=>
require
([
'@/views/customerConfig/index'
],
resolve
),
hidden
:
false
,
name
:
'CustomerConfig'
,
meta
:
{
title
:
'客户管理'
,
icon
:
''
}
},
{
path
:
'/cipherMachineConfig'
,
component
:
(
resolve
)
=>
require
([
'@/views/cipherMachineConfig/index'
],
resolve
),
hidden
:
false
,
name
:
'CipherMachineConfig'
,
meta
:
{
title
:
'密码机管理'
,
icon
:
''
}
},
{
path
:
'/userRoleConfig'
,
component
:
(
resolve
)
=>
require
([
'@/views/userRoleConfig/index'
],
resolve
),
hidden
:
false
,
name
:
'UserRoleConfig'
,
meta
:
{
title
:
'用户管理权限'
,
icon
:
''
}
},
{
path
:
'/roleConfig'
,
component
:
(
resolve
)
=>
require
([
'@/views/roleConfig/index'
],
resolve
),
hidden
:
false
,
name
:
'RoleConfig'
,
meta
:
{
title
:
'角色管理权限'
,
icon
:
''
}
},
// {
// path: '/logisticsExitQuery',
// component: (resolve) => require(['@/views/logisticsExitQuery/index'], resolve),
// name: 'LogisticsExitQuery',
// meta: { title: '物流离境单查询', icon: '' }
// },
// {
// path: 'exportRevokeBillQuery',
// component: (resolve) => require(['@/views/exportRevokeBillQuery/index'], resolve),
// name: 'ExportRevokeBillQuery',
// meta: { title: '出口撤销单查询', icon: '' }
// }
]
},
// {
// path: '/summary',
// component: Layout,
// hidden: false,
// meta: { title: '汇总申报', icon: 'fedexSummary' },
// children: [
// {
// path: '/summary',
// component: (resolve) => require(['@/views/summaryEdit/index'], resolve),
// hidden: false,
// name: 'Summary',
// meta: { title: '汇总申报', icon: '' }
// },
// {
// path: '/summaryDataSearch',
// component: (resolve) => require(['@/views/summaryDataSearch/index'], resolve),
// hidden: false,
// name: 'SummaryDataSearch',
// meta: { title: '汇总申请单查询', icon: '' }
// }
// ]
// },
// {
// path: '/system',
// component: Layout,
// hidden: false,
// meta: { title: '系统管理', icon: 'fedexQueue' },
// children: [
// {
// path: '/portConfig',
// component: (resolve) => require(['@/views/portConfig/index'], resolve),
// hidden: false,
// name: 'PortConfig',
// meta: { title: '口岸信息管理', icon: '' }
// },
// {
// path: '/customerConfig',
// component: (resolve) => require(['@/views/customerConfig/index'], resolve),
// hidden: false,
// name: 'CustomerConfig',
// meta: { title: '客户管理', icon: '' }
// },
// {
// path: '/cipherMachineConfig',
// component: (resolve) => require(['@/views/cipherMachineConfig/index'], resolve),
// hidden: false,
// name: 'CipherMachineConfig',
// meta: { title: '密码机管理', icon: '' }
// },
// {
// path: '/userRoleConfig',
// component: (resolve) => require(['@/views/userRoleConfig/index'], resolve),
// hidden: false,
// name: 'UserRoleConfig',
// meta: { title: '用户管理权限', icon: '' }
// },
// {
// path: '/roleConfig',
// component: (resolve) => require(['@/views/roleConfig/index'], resolve),
// hidden: false,
// name: 'RoleConfig',
// meta: { title: '角色管理权限', icon: '' }
// },
// ]
// },
]
export
default
new
Router
({
...
...
src/store/modules/permission.js
View file @
4bc9477
import
{
constantRoutes
}
from
'@/router'
import
{
getRouters
}
from
'@/api/menu'
import
{
getRouters
,
getUserRouters
}
from
'@/api/menu'
import
Layout
from
'@/layout/index'
import
ParentView
from
'@/components/ParentView'
;
import
{
titleCase
}
from
'@/utils/index.js'
...
...
@@ -16,7 +16,7 @@ const permission = {
mutations
:
{
SET_ROUTES
:
(
state
,
routes
)
=>
{
state
.
addRoutes
=
routes
//
state.routes = constantRoutes.concat(routes)
state
.
routes
=
constantRoutes
.
concat
(
routes
)
},
SET_DEFAULT_ROUTES
:
(
state
,
routes
)
=>
{
state
.
defaultRoutes
=
constantRoutes
.
concat
(
routes
)
...
...
@@ -38,9 +38,9 @@ const permission = {
async
GenerateRoutes
({
commit
})
{
return
new
Promise
(
resolve
=>
{
// 向后端请求路由数据
getRouters
().
then
(
res
=>
{
const
sdata
=
constantRoutes
const
rdata
=
constantRoutes
get
User
Routers
().
then
(
res
=>
{
const
sdata
=
JSON
.
parse
(
JSON
.
stringify
(
routeItemInfo
(
res
.
data
)))
const
rdata
=
JSON
.
parse
(
JSON
.
stringify
(
routeItemInfo
(
res
.
data
)))
const
sidebarRoutes
=
filterAsyncRouter
(
sdata
)
const
rewriteRoutes
=
filterAsyncRouter
(
rdata
,
false
,
true
)
rewriteRoutes
.
push
({
path
:
'*'
,
redirect
:
'/reportingData'
,
hidden
:
true
})
...
...
@@ -137,47 +137,76 @@ function setRoute(route, childrens) {
return
route
}
//针对出口数据结构特殊处理
function
routeItemInfo
(
val
)
{
let
arr
=
val
let
router
=
[]
let
childrens
=
[]
let
url
=
location
.
origin
+
'/Emp/#login?token='
+
getToken
()
arr
.
forEach
(
item
=>
{
let
obj
=
{}
if
(
item
.
xtype
!=
'Emp'
)
{
obj
=
{
children
:
[],
component
:
item
.
id
==
'999999'
?
'Layout'
:
`/
${
item
.
xtype
}
`
,
hidden
:
item
.
id
==
'999999'
?
true
:
false
,
id
:
Number
(
item
.
number
),
meta
:
{
title
:
item
.
text
,
icon
:
item
.
icon
,
},
name
:
item
.
xtype
!=
null
&&
item
.
xtype
!=
''
?
item
.
xtype
.
indexOf
(
'/'
)
>=
0
?
titleCase
(
item
.
xtype
.
split
(
'/'
)[
1
])
:
titleCase
(
item
.
xtype
)
:
''
,
parentId
:
!
item
.
parentId
?
0
:
Number
(
item
.
parentId
),
path
:
item
.
id
==
'999999'
?
''
:
!
item
.
parentId
?
`/
${
item
.
id
}
`
:
`
${
item
.
id
}
`
,
// title: item.text,
// icon: item.icon
}
if
(
obj
.
path
==
'system_appSystemConfigCenter_env'
||
obj
.
path
==
'system_appSystemConfigCenter_detail'
)
{
obj
.
hidden
=
true
}
}
else
{
obj
=
{
component
:
'Link'
,
path
:
url
,
meta
:
{
title
:
item
.
text
,
icon
:
item
.
icon
,
},
}
function
routeItemInfo
(
data
)
{
const
routes
=
[
{
path
:
'/redirect'
,
component
:
Layout
,
hidden
:
true
,
children
:
[
{
path
:
'/redirect/:path(.*)'
,
component
:
(
resolve
)
=>
require
([
'@/views/redirect'
],
resolve
)
}
]
},
{
path
:
'/404'
,
component
:
(
resolve
)
=>
require
([
'@/views/error/404'
],
resolve
),
hidden
:
true
},
{
path
:
'/401'
,
component
:
(
resolve
)
=>
require
([
'@/views/error/401'
],
resolve
),
hidden
:
true
},
{
path
:
'/login'
,
component
:
(
resolve
)
=>
require
([
'@/views/login'
],
resolve
),
hidden
:
true
,
meta
:
{
noCache
:
true
}
},
{
path
:
'/relogin'
,
component
:
(
resolve
)
=>
require
([
'@/views/redjrectLogin'
],
resolve
),
hidden
:
true
,
meta
:
{
noCache
:
true
,
breadcrumb
:
false
}
}
item
.
parentId
?
childrens
.
push
(
obj
)
:
router
.
push
(
obj
)
})
return
setRoute
(
router
,
childrens
)
];
data
.
forEach
(
item
=>
{
const
isParent
=
item
.
parentId
==
0
&&
item
.
children
.
length
==
0
;
const
route
=
{
path
:
item
.
path
,
component
:
"Layout"
,
alwaysShow
:
true
,
hidden
:
false
,
meta
:
{
title
:
item
.
name
,
icon
:
item
.
icon
},
children
:
!
isParent
?
item
.
children
.
map
(
child
=>
({
path
:
child
.
path
,
component
:
`
${
child
.
path
}
`
,
hidden
:
false
,
name
:
child
.
name
,
meta
:
{
title
:
child
.
name
,
icon
:
child
.
icon
||
''
}
}))
:
[
{
path
:
item
.
path
,
component
:
`
${
item
.
path
}
`
,
hidden
:
false
,
name
:
item
.
name
,
meta
:
{
title
:
item
.
name
,
icon
:
item
.
icon
||
''
}
}
]
};
routes
.
push
(
route
);
});
console
.
log
(
routes
);
return
routes
;
}
export
const
loadView
=
(
view
)
=>
{
// 路由懒加载
...
...
src/views/cipherMachineConfig/index.vue
View file @
4bc9477
...
...
@@ -48,6 +48,19 @@
></el-button>
</el-form-item>
</el-col>
<el-col :span="2">
<!-- 清空查询条件-->
<el-form-item class="textLeft textCenter">
<el-button
type="text"
size="small"
icon="el-icon-refresh"
@click="clear"
>
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="optionButton">
...
...
@@ -191,8 +204,8 @@ export default {
obj.endCreationTime = "";
obj.startCreationTime = "";
if (obj.creationTime.length > 0) {
obj.endCreationTime = obj.creationTime[
0
];
obj.startCreationTime = obj.creationTime[
1
];
obj.endCreationTime = obj.creationTime[
1
];
obj.startCreationTime = obj.creationTime[
0
];
}
getCipherMachineList(obj)
.then((res) => {
...
...
@@ -247,6 +260,12 @@ export default {
});
}
},
clear() {
this.sreachFormData={
cipherMachineNumber: "",
creationTime: [],
};
}
},
};
</script>
...
...
src/views/customerConfig/dialog.vue
View file @
4bc9477
...
...
@@ -44,7 +44,6 @@
resize="none"
v-model="formData.ecomEntName"
clearable
maxlength="4"
placeholder=""
></el-input>
</Formitem>
...
...
@@ -74,26 +73,33 @@
id="inputInner-edit-orderRequester"
v-model="formData.orderRequester"
clearable
maxlength="4"
placeholder=""
>
<el-option
<
!-- <
el-option
v-for="(item, index) in dict.orderRequester"
:key="index"
:label="item.name"
:value="item.value"
></el-option>
></el-option> -->
<el-option
v-for="(item, index) in $store.getters.dict.ORDER_DECLARATION_PARTY"
:key="index"
:label="item.itemChineseName"
:value="item.itemValue"
></el-option>
</el-select>
</Formitem>
</el-col>
<!-- DXPID -->
<el-col :span="8">
<Formitem label="DXPID" prop="
qingdaoDanyiUserD
xpid" type="edit">
<Formitem label="DXPID" prop="
d
xpid" type="edit">
<el-input
type="text"
class="inputShadow"
id="inputInner-edit-
qingdaoDanyiUserD
xpid"
id="inputInner-edit-
d
xpid"
resize="none"
v-model="formData.
qingdaoDanyiUserD
xpid"
v-model="formData.
d
xpid"
clearable
placeholder=""
></el-input>
...
...
@@ -102,7 +108,7 @@
</el-row>
<div v-if="formData.orderRequester=='2'">
<div class="checkTitle">
<el-checkbox v-model="formData.qdCheck"></el-checkbox>青岛
<el-checkbox v-model="formData.qdCheck"
@change="changeQDCheckBox()"
></el-checkbox>青岛
</div>
<el-row :gutter="5">
<!-- User ID -->
...
...
@@ -135,6 +141,21 @@
></el-input>
</Formitem>
</el-col>
<!-- DXPID -->
<el-col :span="8">
<Formitem label="单一DXPID" prop="qingdaoDanyiUserDxpid" type="edit">
<el-input
type="text"
class="inputShadow"
id="inputInner-edit-qingdaoDanyiUserDxpid"
resize="none"
v-model="formData.qingdaoDanyiUserDxpid"
clearable
placeholder=""
:disabled="!formData.qdCheck"
></el-input>
</Formitem>
</el-col>
<!-- Key -->
<el-col :span="8">
<Formitem label="Key" prop="qingdaoKey" type="edit">
...
...
@@ -152,7 +173,7 @@
</el-col>
</el-row>
<div class="checkTitle">
<el-checkbox v-model="formData.bjCheck"></el-checkbox>北京
<el-checkbox v-model="formData.bjCheck"
@change="changeBJCheckBox()"
></el-checkbox>北京
</div>
<el-row :gutter="5">
<!-- DXPID -->
...
...
@@ -197,17 +218,18 @@
>
</el-upload>
</div>
<div class="fileList" v-if="formData.file != null">
<!-- 1{{ formData.file }} -->
<div class="fileList" v-if="formData.file != null || formData.certificare">
<div class="fileList-item">
<div class="uploadbox-fileName">
<div class="uploadbox-fileName"
>
<svg-icon
class="el-icon-user-solid"
icon-class="exl"
style="font-size: 18px; color: #de002e"
/>
<Tooltip
:content="formData.file
.nam
e"
:refName="formData.file
.nam
e"
:content="formData.file
? formData.file.name : formData.certificar
e"
:refName="formData.file
? formData.file.name : formData.certificar
e"
/>
</div>
<div class="uploadbox-option">
...
...
@@ -248,6 +270,7 @@ import {
addCustomerData,
uploadCertificate,
updateCustomerData,
delCertificate
} from "@/api/system/customer-ai.js";
export default {
props: {
...
...
@@ -267,12 +290,12 @@ export default {
type: Object,
default: null,
},
dict: {
type: Array,
default() {
return [];
},
},
//
dict: {
//
type: Array,
//
default() {
//
return [];
//
},
//
},
},
data() {
return {
...
...
@@ -285,12 +308,14 @@ export default {
ecomEntEmail: "",
ecomEntName: "",
orderRequester: "",
qingdaoDanyiUserD
xpid: "",
d
xpid: "",
qingdaoKey: "",
qingdaoUserDxpid: "",
qingdaoDanyiUserDxpid:"",
qingdaoUserId: "",
qdCheck: false,
bjCheck: false,
checkboxState:"",//后端要求 北京 和青岛 用这种方式传 第一个是青岛 第二个是北京
file: null,
},
rules: {
...
...
@@ -307,6 +332,14 @@ export default {
trigger: "blur",
message: "电商企业名称不能为空!",
},
],
orderRequester: [
{
required: true,
trigger: "change",
message: "订单申报方不能为空!",
},
],
// declarationUnit18: [
// {
...
...
@@ -365,11 +398,31 @@ export default {
this.loadings.dialogLoading = false;
if (this.type == "update") {
this.formData = this.active;
// this.formData.file=null;
this.parseCheckboxState(this.active.checkboxState);
}else{
this.formData.orderRequester="1";
}
}
},
},
methods: {
changeQDCheckBox(){
this.$forceUpdate()
if(!this.formData.qdCheck){
this.formData.qingdaoDanyiUserDxpid="";
this.formData.qingdaoKey="";
this.formData.qingdaoUserDxpid="";
this.formData.qingdaoUserId="";
}
},
changeBJCheckBox(){
this.$forceUpdate()
if(!this.formData.bjCheck){
this.formData.beijingDxpid="";
this.formData.changeBJCheckBox="";
}
},
uploadFile() {
this.$refs.uploadFile.$refs["upload-inner"].handleClick();
},
...
...
@@ -386,16 +439,18 @@ export default {
// }
},
fileUpload({ file }) {
if (!(file instanceof File)) {
console.error('The provided file is not a valid File object.');
return;
}
console.log(file);
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = (e) => {
this.formData.file = file;
console.log(e);
let obj = {
file: e.target.result,
name:file.name,
};
this.formData.file = obj;
};
},
fileChange(val) {},
handleSuccess() {},
...
...
@@ -405,7 +460,27 @@ export default {
},
//删除文件
delTypeDFile() {
this.formData.file = null;
this.delCertificate();
},
//删除证书
delCertificate(){
if(this.formData.id && this.formData.certificare){
delCertificate(this.formData.id,this.formData.certificare).then((res)=>{
if(res.code==200){
this.formData.file = null;
this.formData.certificare="";
// this.msgSuccess("证书删除成功!");
}else{
this.alertErrorMsg("证书删除失败,请联系管理员!");
}
}).catch((err)=>{
console.log(err);
this.alertErrorMsg("证书删除失败,请联系管理员!");
})
}else{
this.formData.file = null;
this.formData.certificare="";
}
},
//查询用户信息详情
searchUserData(id) {
...
...
@@ -428,6 +503,7 @@ export default {
submit() {
this.loadings.dialogLoading = true;
let obj = {};
this.formData.checkboxState=this.checkboxState();
if (this.type == "add") {
this.$refs.formData.validate((valid) => {
if (valid) {
...
...
@@ -441,7 +517,11 @@ export default {
this.$refs.formData.validate((valid) => {
if (valid) {
obj = this.formData;
this.clearData(); //清除值
this.updateapi(obj);
if(this.formData.orderRequester==1){
this.delCertificate(); //删除证书
}
} else {
this.loadings.dialogLoading = false;
}
...
...
@@ -453,11 +533,11 @@ export default {
.then((res) => {
if (res.code === "200") {
if (this.formData.file) {
this.uploadCertificate(val.ecomEntCode,
this.formData.file
);
}
else {
this.msgSuccess("客户添加成功!");
this.close();
}
this.uploadCertificate(val.ecomEntCode,
this.base64ConvertFile(this.formData.file.file,this.formData.file.name)
);
}
this.msgSuccess("客户添加成功!");
this.close();
} else {
this.alertWarningMsg(res.message);
this.loadings.dialogLoading = false;
...
...
@@ -469,10 +549,11 @@ export default {
});
},
uploadCertificate(ecomEntCode, file) {
uploadCertificate(ecomEntCode, file)
.then((uploadRes) => {
if (uploadRes.code === "200") {
this.msgSuccess("客户添加和证书上传成功!");
//
this.msgSuccess("客户添加和证书上传成功!");
this.close();
} else {
this.alertWarningMsg(uploadRes.message);
...
...
@@ -492,11 +573,11 @@ export default {
// this.msgSuccess(res.message);
// this.close();
if (this.formData.file) {
this.uploadCertificate(val.ecomEntCode, this.formData.file);
} else {
this.msgSuccess("客户修改成功!");
this.close();
this.uploadCertificate(val.ecomEntCode, this.base64ConvertFile(this.formData.file.file,this.formData.file.name));
}
this.msgSuccess("客户修改成功!");
this.close();
} else {
this.alertWarningMsg(res.message);
this.loadings.dialogLoading = false;
...
...
@@ -507,6 +588,20 @@ export default {
this.loadings.dialogLoading = false;
});
},
//后端要求的
checkboxState() {
return `${this.formData.qdCheck},${this.formData.bjCheck}`;
},
//后端要求的
parseCheckboxState(checkboxStateString) {
if(checkboxStateString){
let checkboxStateArray = checkboxStateString.split(',');
let checkboxStateBooleans = checkboxStateArray.map(value => value === 'true');
this.formData.qdCheck=checkboxStateBooleans[0];
this.formData.bjCheck=checkboxStateBooleans[1];
}
},
close() {
this.formData = {
id: null,
...
...
@@ -517,9 +612,10 @@ export default {
ecomEntEmail: "",
ecomEntName: "",
orderRequester: "",
qingdaoDanyiUserD
xpid: "",
d
xpid: "",
qingdaoKey: "",
qingdaoUserDxpid: "",
qingdaoDanyiUserDxpid:"",
qingdaoUserId: "",
qdCheck: false,
bjCheck: false,
...
...
@@ -528,6 +624,20 @@ export default {
this.handleRemove();
this.$emit("close");
},
clearData(){
if(this.formData.orderRequester==1){
this.formData.beijingDxpid="";
this.formData.bjCheck="";
this.formData.checkboxState="";
this.formData.qingdaoKey="";
this.formData.qingdaoUserDxpid="";
this.formData.qingdaoDanyiUserDxpid="";
this.formData.qingdaoUserId="";
this.formData.qdCheck="";
this.formData.file=null;
// this.delCertificate(); //删除证书
}
}
},
};
</script>
...
...
src/views/customerConfig/index.vue
View file @
4bc9477
...
...
@@ -144,7 +144,7 @@
<template slot="optionColumn">
<el-table-column align="left" label="操作" width="150">
<template slot-scope="scope">
<el-button type="text" @click="downloadFile(scope.row)">
<el-button type="text" @click="downloadFile(scope.row)"
:disabled="!scope.row.certificare"
>
下载证书
</el-button>
<el-button type="text" @click="update(scope.row)"> 修改 </el-button>
...
...
@@ -157,14 +157,13 @@
:title="dialogTitle"
:type="editType"
:active="activeData"
:dict="dict"
@close="dialogClose"
/>
</div>
</template>
<script>
import { getCustomerList } from "@/api/system/customer-ai.js";
import { getCustomerList
,downloadCertificate
} from "@/api/system/customer-ai.js";
import { getPortList } from "@/api/system/user.js";
import DialogVue from "./dialog.vue";
export default {
...
...
@@ -244,12 +243,12 @@ export default {
align: "left",
},
],
dict: {
orderRequester: [
{ name: "企业", code: "ENTERPRISE_DECLARATION", value: "1" },
{ name: "FEDEX", code: "FEDEX_DECLARATION", value: "2" },
],
},
//
dict: {
//
orderRequester: [
//
{ name: "企业", code: "ENTERPRISE_DECLARATION", value: "1" },
//
{ name: "FEDEX", code: "FEDEX_DECLARATION", value: "2" },
//
],
//
},
loadings: {
searchLoading: false,
},
...
...
@@ -319,17 +318,28 @@ export default {
};
},
//下载证书
downloadFile(val) {},
downloadFile(val) {
downloadCertificate(val.id,val.certificare).then((res)=>{
}).catch((err)=>{
console.log(err);
this.alertErrorMsg("证书下载失败,请联系管理员!");
})
},
addCustomer() {
this.dialogTitle = "新增客户";
this.editType = "add";
this.outerVisible = true;
},
update(val) {
let data={
...val,
file:null
}
this.dialogTitle = "修改客户";
this.editType = "update";
this.outerVisible = true;
this.activeData =
val
;
this.activeData =
data
;
console.log(this.activeData);
},
dialogClose() {
...
...
src/views/exportBillQuery/index.vue
View file @
4bc9477
...
...
@@ -46,7 +46,7 @@
v-for="(item, index) in $store.getters.dict.RECEIPT_STATUS"
:key="index"
:label="item.itemChineseName"
:value="item.item
Cod
e"
:value="item.item
Valu
e"
></el-option>
</el-select>
</Formitem>
...
...
src/views/exportListDetail/index.vue
View file @
4bc9477
...
...
@@ -661,13 +661,13 @@
</el-col>
<!-- 申报时间 -->
<el-col :span="3">
<Formitem label="报送时间" prop="appTime
Str
">
<Formitem label="报送时间" prop="appTime">
<el-input
type="text"
class="inputShadow"
id="inputInner--appTime
Str
"
id="inputInner--appTime"
resize="none"
v-model="formData.appTime
Str
"
v-model="formData.appTime"
clearable
placeholder=""
></el-input>
...
...
src/views/exportListQuery/index.vue
View file @
4bc9477
...
...
@@ -125,7 +125,7 @@
v-for="(item, index) in $store.getters.dict.RECEIPT_STATUS"
:key="index"
:label="item.itemChineseName"
:value="item.item
Cod
e"
:value="item.item
Valu
e"
></el-option>
</el-select>
</Formitem>
...
...
src/views/exportRevokeBillQuery/index.vue
View file @
4bc9477
...
...
@@ -41,7 +41,7 @@
v-for="(item, index) in $store.getters.dict.RECEIPT_STATUS"
:key="index"
:label="item.itemChineseName"
:value="item.item
Cod
e"
:value="item.item
Valu
e"
></el-option>
</el-select>
</Formitem>
...
...
@@ -171,7 +171,7 @@ export default {
},
{
name: "创建时间",
value: "createTime
Str
",
value: "createTime",
width: "",
align: "left",
},
...
...
src/views/exportTransportBillQuery/index.vue
View file @
4bc9477
...
...
@@ -46,7 +46,7 @@
v-for="(item, index) in $store.getters.dict.RECEIPT_STATUS"
:key="index"
:label="item.itemChineseName"
:value="item.item
Cod
e"
:value="item.item
Valu
e"
></el-option>
</el-select>
</Formitem>
...
...
@@ -207,7 +207,7 @@ export default {
},
{
name: "创建时间",
value: "createTime
Str
",
value: "createTime",
width: "",
align: "left",
},
...
...
src/views/exportTransportDetail/index.vue
View file @
4bc9477
...
...
@@ -210,13 +210,13 @@
</Formitem>
</el-col> -->
<el-col :span="3">
<Formitem label="报送时间" prop="createTime
Str
">
<Formitem label="报送时间" prop="createTime">
<el-input
type="text"
class="inputShadow"
id="inputInner--createTime
Str
"
id="inputInner--createTime"
resize="none"
v-model="formData.createTime
Str
"
v-model="formData.createTime"
clearable
placeholder=""
></el-input>
...
...
src/views/listBranchQuery/index.vue
View file @
4bc9477
...
...
@@ -41,7 +41,7 @@
v-for="(item, index) in $store.getters.dict.RECEIPT_STATUS"
:key="index"
:label="item.itemChineseName"
:value="item.item
Cod
e"
:value="item.item
Valu
e"
></el-option>
</el-select>
</Formitem>
...
...
src/views/logisticsExitQuery/index.vue
View file @
4bc9477
...
...
@@ -41,7 +41,7 @@
v-for="(item, index) in $store.getters.dict.RECEIPT_STATUS"
:key="index"
:label="item.itemChineseName"
:value="item.item
Cod
e"
:value="item.item
Valu
e"
></el-option>
</el-select>
</Formitem>
...
...
src/views/portConfig/index.vue
View file @
4bc9477
...
...
@@ -128,8 +128,8 @@
</template>
<script>
import { getPortConfigList } from "@/api/system/port-api.js";
import { getPortList } from "@/api/system/user.js";
import { getPortConfigList
,getPortCodeList
} from "@/api/system/port-api.js";
//
import { getPortList } from "@/api/system/user.js";
import DialogVue from "./dialog.vue";
export default {
name: "PortConfig",
...
...
@@ -236,7 +236,7 @@ export default {
},
//获取口岸子字典
searchPortDictData() {
getPortList()
getPort
Code
List()
.then((res) => {
if (res.code === "200") {
this.dict.port = res.data;
...
...
src/views/reportingData/index.vue
View file @
4bc9477
...
...
@@ -102,7 +102,7 @@
v-for="(item, index) in $store.getters.dict.RECEIPT_STATUS"
:key="index"
:label="item.itemChineseName"
:value="item.item
Cod
e"
:value="item.item
Valu
e"
></el-option>
</el-select>
</Formitem>
...
...
@@ -186,7 +186,7 @@
ref="entryTable"
:data="tableData"
:headerData="headerData"
:
maxHeight="tableMaxheight
"
:
height="430
"
:border="true"
:pagination="true"
:order="false"
...
...
@@ -349,7 +349,7 @@ export default {
},
{
name: "电商企业",
value: "e
bccod
e",
value: "e
comEntNam
e",
width: "",
align: "left",
},
...
...
src/views/roleConfig/dialog.vue
View file @
4bc9477
...
...
@@ -6,6 +6,7 @@
:show-close="false"
width="25%"
:close-on-click-modal="false"
:destroy-on-close="true"
v-loading="loadings.dialogLoading"
@close="close"
>
...
...
@@ -67,6 +68,7 @@ import {
addRoleData,
updateRoleData,
updateRoleMenuData,
getMenuByRoleId,
} from "@/api/system/user.js";
import { getRouters } from "@/api/menu";
export default {
...
...
@@ -134,6 +136,7 @@ export default {
} else if (this.type == "menuChange") {
this.formData = this.active;
this.searchTreeData();
this.loadCheckedKeys();//加载已绑定的菜单
}
}
},
...
...
@@ -284,8 +287,27 @@ export default {
this.formData = {
roleName: "",
};
this.checkedKeys = []
this.$emit("close");
},
// 加载已绑定的菜单
loadCheckedKeys() {
if (this.formData.roleId) {
getMenuByRoleId(this.formData.roleId)
.then((res) => {
if (res.code === "200") {
this.checkedKeys = res.data.filter(item => item.isBinding && (item.parentMenuId!=0 ) ).map(item => item.menuId);
console.log(this.checkedKeys);
} else {
this.alertWarningMsg(res.message);
}
})
.catch((err) => {
console.log(err);
});
}
},
},
};
</script>
...
...
src/views/userRoleConfig/index.vue
View file @
4bc9477
...
...
@@ -270,7 +270,7 @@ export default {
getRoleDict()
.then((res) => {
if (res.code === "200") {
this.dict.roleList = res.data
.value
;
this.dict.roleList = res.data;
}
})
.catch((err) => {
...
...
Please
register
or
login
to post a comment