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
feiyue.teng
2025-01-03 10:21:51 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a93ffe2e5b30c805fb3892dac8294fdde308dff5
a93ffe2e
1 parent
77826c02
出口撤销单回执日志与登录功能的开发
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
101 additions
and
32 deletions
package.json
src/api/exportRevokeBill-api.js
src/api/login.js
src/permission.js
src/store/modules/user.js
src/utils/parseUrlParams.js
src/views/exportRevokeBillQuery/index.vue
src/views/reportingData/index.vue
package.json
View file @
a93ffe2
...
...
@@ -42,6 +42,7 @@
"dependencies"
:
{
"axios"
:
"0.21.1"
,
"core-js"
:
"3.8.3"
,
"crypto-js"
:
"^4.2.0"
,
"docx-preview"
:
"^0.1.20"
,
"element-ui"
:
"^2.15.14"
,
"vue"
:
"2.6.14"
,
...
...
@@ -56,7 +57,7 @@
"babel-eslint"
:
"10.1.0"
,
"chalk"
:
"4.1.1"
,
"connect"
:
"3.6.6"
,
"eslint"
:
"
7.30
.0"
,
"eslint"
:
"
^6.8
.0"
,
"eslint-plugin-vue"
:
"7.12.1"
,
"lint-staged"
:
"10.5.4"
,
"runjs"
:
"4.4.2"
,
...
...
src/api/exportRevokeBill-api.js
View file @
a93ffe2
...
...
@@ -16,3 +16,13 @@ export function getAllCancellation(data) {
data
:
data
,
})
}
//出口撤销单回执
/**
* @param copNo * 清单总分单号
*/
export
function
getExportCancellationReceiptData
(
data
)
{
return
request
({
url
:
'/bus-customer/exportCancellation/receipt/'
+
data
.
copNo
,
method
:
'get'
,
})
}
\ No newline at end of file
...
...
src/api/login.js
View file @
a93ffe2
import
request
from
'@/utils/request'
// 登录方法
export
function
login
(
loginName
,
password
,
rememberMe
,
equipmentType
,
userAgent
,
selectedLocale
)
{
// const data = {
// loginName,
// password,
// rememberMe
// }
const
data
=
{
"email"
:
"247908967@qq.com"
,
"name"
:
"测试用户"
,
"phone"
:
18221643976
,
"port"
:
"TSN"
,
"purpleId"
:
'测试用户'
,
"role"
:
170
}
return
request
({
url
:
'/bus-customer/login'
,
method
:
'post'
,
data
:
data
})
// const data = {
// "loginName":loginName,
// "password":password,
// "email": "247908967@qq.com",
// "name": "测试用户",
// "phone": 18221643976,
// "port": "TSN",
// "purpleId": '测试用户',
// "role": 170
// }
// return request({
//
url: '/bus-customer/customerL
ogin',
//
url: '/bus-customer/l
ogin',
// method: 'post',
// data: data
// })
const
data
=
{
"loginName"
:
loginName
,
"password"
:
password
,
}
return
request
({
url
:
'/bus-customer/customerLogin'
,
method
:
'post'
,
data
:
data
})
}
// 退出方法
...
...
src/permission.js
View file @
a93ffe2
...
...
@@ -3,11 +3,12 @@ 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'
]
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
if
(
to
.
path
==
'/relogin'
)
{
next
()
}
else
{
...
...
@@ -44,10 +45,17 @@ router.beforeEach((to, from, next) => {
// 在免登录白名单,直接进入
next
()
}
else
{
if
(
to
.
path
===
'/reportingData'
)
{
const
userToken
=
getParamsObj
(
location
.
href
).
token
store
.
dispatch
(
'LoginWithoutPassword'
,
userToken
).
then
(()
=>
{
next
(
`/reportingData`
)
})
}
else
{
next
(
`/login`
)
// 否则全部重定向到登录页
}
}
}
}
})
router
.
afterEach
(()
=>
{
...
...
src/store/modules/user.js
View file @
a93ffe2
...
...
@@ -2,6 +2,7 @@ import { login, logout } from '@/api/login'
import
{
getInfo
}
from
'@/api/system/user.js'
import
{
getLogisticsCodeLis
,
getDictData
}
from
'@/api/system/dict-api.js'
import
{
getToken
,
setToken
,
removeToken
,
removeUserId
,
removeTime
}
from
'@/utils/auth'
import
{
getParamsObj
}
from
'@/utils/parseUrlParams'
import
{
alertWarningMsg
}
from
'@/utils/index.js'
const
user
=
{
...
...
@@ -77,6 +78,18 @@ const user = {
})
})
},
//非账号密码登录
LoginWithoutPassword
({
commit
},
token
)
{
return
new
Promise
((
resolve
)
=>
{
if
(
!
getToken
())
{
setToken
(
token
)
commit
(
'SET_TOKEN'
,
token
)
resolve
(
token
)
}
else
{
resolve
(
token
)
}
})
},
// 获取用户信息
async
GetInfo
({
commit
,
state
})
{
...
...
src/utils/parseUrlParams.js
0 → 100644
View file @
a93ffe2
export
const
getParamsObj
=
(
url
)
=>
{
const
params
=
new
URLSearchParams
(
url
.
split
(
'?'
)[
1
]);
const
paramObj
=
{};
for
(
const
[
key
,
value
]
of
params
)
{
paramObj
[
key
]
=
value
;
}
return
paramObj
;
}
\ No newline at end of file
src/views/exportRevokeBillQuery/index.vue
View file @
a93ffe2
...
...
@@ -116,12 +116,32 @@
:selectFixed="false"
:rowSelectDataType="false"
>
<template v-slot:returnStatus="scope">
<TablePopover
ref="returnStatusPopover"
dataKey="returnStatus"
:parentDom="$refs.entryTable"
:receiptDataHead="receiptDataHead"
:rowData="scope.row"
:tableData="tableData"
@popoverChange="popoverChange"
@popoverClose="popoverClose"
>
<div slot="title">
<span style="font-weight: 700; color: #515a6e">运单编号:</span
>{{ scope.row.logisticsNo }}
</div>
<div slot="buttonLabel">
{{ scope.row.returnStatus }}
</div>
</TablePopover>
</template>
</Table>
</div>
</template>
<script>
import { getAllCancellation } from "@/api/exportRevokeBill-api.js";
import { getAllCancellation
, getExportCancellationReceiptData
} from "@/api/exportRevokeBill-api.js";
export default {
name: "ExportRevokeBillQuery",
...
...
@@ -144,6 +164,7 @@ export default {
value: "returnStatus",
width: "",
align: "left",
slot: true,
},
{
name: "提运单号",
...
...
@@ -191,19 +212,19 @@ export default {
receiptDataHead: [
{
name: "回执状态",
value: "re
ceipt
Status",
value: "re
turn
Status",
width: "",
align: "left",
},
{
name: "状态时间",
value: "
status
Time",
value: "
return
Time",
width: "",
align: "left",
},
{
name: "回执描述",
value: "re
ceiptDescription
",
value: "re
turnInfo
",
width: "",
align: "left",
},
...
...
@@ -290,7 +311,7 @@ export default {
popoverChange(val) {
console.log(val);
this.tableData = val.tableData;
this.receiptApi(val.data.
declareId
, val.status)
this.receiptApi(val.data.
copNo
, val.status)
.then((res) => {
val.tableData.forEach((item) => {
if (item.declareId == val.data.declareId) {
...
...
@@ -306,10 +327,21 @@ export default {
});
},
//查询回执
receiptApi(id
, type
) {
receiptApi(id) {
return new Promise((resolve, reject) => {
let obj = { declareId: id };
resolve();
let obj = { copNo: id };
getExportCancellationReceiptData(obj)
.then((res) => {
if (res.code === "200") {
resolve(res.data);
} else {
reject();
}
})
.catch((err) => {
console.log(err);
reject();
});
});
},
popoverClose(val) {
...
...
src/views/reportingData/index.vue
View file @
a93ffe2
...
...
@@ -571,6 +571,8 @@ export default {
}
},
//申报
declareData() {
if (this.selected.length > 0) {
...
...
Please
register
or
login
to post a comment