Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
factory_front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinjianhui
factory_front
Commits
3aa86aa1
Commit
3aa86aa1
authored
Apr 01, 2024
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 用户管理优化
parent
b36fbba0
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
56 additions
and
16 deletions
+56
-16
src/api/auth.ts
+9
-0
src/api/order.ts
+5
-5
src/types/api/order.ts
+1
-0
src/views/Login.vue
+1
-1
src/views/UserPage.vue
+15
-0
src/views/order/ProductInfo.vue
+21
-2
src/views/order/index.vue
+4
-8
No files found.
src/api/auth.ts
View file @
3aa86aa1
...
@@ -60,3 +60,12 @@ export function getDetailsByIdApi(id: number) {
...
@@ -60,3 +60,12 @@ export function getDetailsByIdApi(id: number) {
},
},
)
)
}
}
// 切换用户状态
export
function
changeUserStatusApi
(
status
:
number
,
id
:
number
)
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
'factory/factoryUser/enableDisable'
,{
params
:
{
status
,
id
}
})
}
src/api/order.ts
View file @
3aa86aa1
...
@@ -35,10 +35,10 @@ export function confirmProductionOrder(ids: number[]) {
...
@@ -35,10 +35,10 @@ export function confirmProductionOrder(ids: number[]) {
}
}
// 下载稿件
// 下载稿件
export
function
downloadOrder
(
id
s
:
number
[]
)
{
export
function
downloadOrder
(
id
:
number
)
{
return
axios
.
pos
t
<
never
,
BaseRespData
<
never
>>
(
return
axios
.
ge
t
<
never
,
BaseRespData
<
never
>>
(
'factory/customJomallOrder/downloadMaterial'
,
'factory/customJomallOrder/downloadMaterial'
,
ids
,
{
params
:
{
id
}
}
,
)
)
}
}
...
@@ -110,8 +110,8 @@ export function getOrderDetail(id: number) {
...
@@ -110,8 +110,8 @@ export function getOrderDetail(id: number) {
{
{
params
:
{
params
:
{
id
,
id
,
}
}
,
}
}
,
)
)
}
}
...
...
src/types/api/order.ts
View file @
3aa86aa1
...
@@ -38,6 +38,7 @@ export interface OrderData {
...
@@ -38,6 +38,7 @@ export interface OrderData {
finishTime
?:
string
finishTime
?:
string
paymentTime
?:
string
paymentTime
?:
string
remark
?:
string
remark
?:
string
manuscriptUrl
?:
string
startStockingTime
?:
string
startStockingTime
?:
string
source
?:
string
source
?:
string
substrateAreaCode
?:
string
substrateAreaCode
?:
string
...
...
src/views/Login.vue
View file @
3aa86aa1
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
<el-button
v-
loading=
"loading"
:
loading=
"loading"
style=
"width: 100%"
style=
"width: 100%"
size=
"large"
size=
"large"
type=
"primary"
type=
"primary"
...
...
src/views/UserPage.vue
View file @
3aa86aa1
...
@@ -98,6 +98,7 @@
...
@@ -98,6 +98,7 @@
v-model=
"scope.row.status"
v-model=
"scope.row.status"
:active-value=
"1"
:active-value=
"1"
:inactive-value=
"0"
:inactive-value=
"0"
@
change=
"(e:number) => onChangeStatus(e, scope.row)"
></ElSwitch>
></ElSwitch>
</el-tooltip>
</el-tooltip>
</
template
>
</
template
>
...
@@ -200,6 +201,7 @@ import {
...
@@ -200,6 +201,7 @@ import {
updateUserApi
,
updateUserApi
,
deleteUserApi
,
deleteUserApi
,
getDetailsByIdApi
,
getDetailsByIdApi
,
changeUserStatusApi
,
}
from
'@/api/auth'
}
from
'@/api/auth'
import
Icon
from
'@/components/Icon.vue'
import
Icon
from
'@/components/Icon.vue'
import
{
UserEditForm
,
userData
,
userSearchForm
}
from
'@/types/api/user'
import
{
UserEditForm
,
userData
,
userSearchForm
}
from
'@/types/api/user'
...
@@ -331,6 +333,19 @@ const onOpenedUserForm = async () => {
...
@@ -331,6 +333,19 @@ const onOpenedUserForm = async () => {
const
handleSelectionChange
=
(
s
:
userData
[])
=>
{
const
handleSelectionChange
=
(
s
:
userData
[])
=>
{
selection
.
value
=
s
selection
.
value
=
s
}
}
const
onChangeStatus
=
async
(
value
:
number
,
item
:
userData
)
=>
{
try
{
const
res
=
await
changeUserStatusApi
(
value
,
item
.
id
)
ElMessage
({
message
:
res
.
message
,
type
:
'success'
,
offset
:
window
.
innerHeight
/
2
,
})
search
()
}
catch
(
e
)
{
showError
(
e
)
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/order/ProductInfo.vue
View file @
3aa86aa1
...
@@ -86,11 +86,22 @@
...
@@ -86,11 +86,22 @@
(
item
.
num
||
0
)
-
(
item
.
shipmentNum
||
0
)
(
item
.
num
||
0
)
-
(
item
.
shipmentNum
||
0
)
}}
</span>
}}
</span>
</div>
</div>
<div
class=
"order-list-expand_item_info_title"
>
<el-button
type=
"success"
size=
"small"
@
click=
"downloadManuscriptBySubOrder(item)"
>
下载稿件
</el-button
>
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
OrderData
}
from
'@/types/api/order'
import
{
filePath
}
from
'@/api/axios'
import
{
downloadOrder
}
from
'@/api/order'
import
{
OrderData
,
ProductList
}
from
'@/types/api/order'
import
{
showError
}
from
'@/utils/ui'
import
{
PropType
}
from
'vue'
import
{
PropType
}
from
'vue'
defineProps
({
defineProps
({
...
@@ -101,8 +112,16 @@ defineProps({
...
@@ -101,8 +112,16 @@ defineProps({
isDetail
:
{
isDetail
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
default
:
false
,
}
}
,
})
})
const
downloadManuscriptBySubOrder
=
async
(
item
:
ProductList
)
=>
{
try
{
const
res
=
await
downloadOrder
(
item
.
id
)
window
.
open
(
filePath
+
res
.
message
)
}
catch
(
e
)
{
showError
(
e
)
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.order-list-expand_item
{
.order-list-expand_item
{
...
...
src/views/order/index.vue
View file @
3aa86aa1
...
@@ -460,7 +460,6 @@ import {
...
@@ -460,7 +460,6 @@ import {
getOrderList
,
getOrderList
,
getOrderTabData
,
getOrderTabData
,
confirmProductionOrder
,
confirmProductionOrder
,
downloadOrder
,
printOrder
,
printOrder
,
addInternalTagApi
,
addInternalTagApi
,
loadSendOutList
,
loadSendOutList
,
...
@@ -645,7 +644,7 @@ const downloadManuscript = async () => {
...
@@ -645,7 +644,7 @@ const downloadManuscript = async () => {
offset
:
window
.
innerHeight
/
2
,
offset
:
window
.
innerHeight
/
2
,
}
)
}
)
}
}
const
ids
=
selection
.
value
.
map
((
item
)
=>
item
.
id
)
const
manuscriptUrl
=
selection
.
value
.
map
((
item
)
=>
item
.
manuscriptUrl
)
try
{
try
{
await
showConfirm
(
'是否确认下载'
,
{
await
showConfirm
(
'是否确认下载'
,
{
confirmButtonText
:
'确认'
,
confirmButtonText
:
'确认'
,
...
@@ -655,12 +654,9 @@ const downloadManuscript = async () => {
...
@@ -655,12 +654,9 @@ const downloadManuscript = async () => {
}
catch
{
}
catch
{
return
return
}
}
try
{
manuscriptUrl
.
forEach
((
path
)
=>
{
const
res
=
await
downloadOrder
(
ids
)
window
.
open
(
filePath
+
path
)
window
.
open
(
filePath
+
res
.
message
)
}
)
}
catch
(
e
)
{
showError
(
e
)
}
}
}
// 打印生产单
// 打印生产单
const
printManuscript
=
async
()
=>
{
const
printManuscript
=
async
()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment