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
21fcad83
Commit
21fcad83
authored
Nov 20, 2025
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 排单开关状态代码修改
parent
984e319f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
33 deletions
+28
-33
src/api/podUsSchedulingRules.ts
+1
-1
src/views/order/podUsSchedulingRules/index.vue
+27
-32
No files found.
src/api/podUsSchedulingRules.ts
View file @
21fcad83
...
@@ -24,7 +24,7 @@ export function updateRuleByIdApi(data: PostData) {
...
@@ -24,7 +24,7 @@ export function updateRuleByIdApi(data: PostData) {
}
}
// 规则开关
// 规则开关
export
function
ruleSwitchApi
(
data
:
PostData
)
{
export
function
ruleSwitchApi
(
data
:
{
id
:
number
;
status
:
string
}
)
{
return
axios
.
post
<
never
,
BasePaginationData
<
never
>>
(
return
axios
.
post
<
never
,
BasePaginationData
<
never
>>
(
'factory/podJomallOrderUsArrangeRule/ruleSwitch'
,
'factory/podJomallOrderUsArrangeRule/ruleSwitch'
,
data
,
data
,
...
...
src/views/order/podUsSchedulingRules/index.vue
View file @
21fcad83
...
@@ -18,13 +18,12 @@
...
@@ -18,13 +18,12 @@
<div
class=
"box"
>
每天
{{
getTime
(
item
)
}}
开始自动排单
</div>
<div
class=
"box"
>
每天
{{
getTime
(
item
)
}}
开始自动排单
</div>
</div>
</div>
<div
class=
"action"
>
<div
class=
"action"
>
<div
style=
"display: flex;
align-items: center;gap: 2px;
"
>
<div
style=
"display: flex;
align-items: center; gap: 2px
"
>
<div>
状态:
</div>
<div>
状态:
</div>
<el-switch
<el-switch
v-model=
"item.status"
v-model=
"item.status"
@
change=
"(val:string) => ruleSwitch(item.id || 0, val)"
active-value=
"ACTIVE"
active-value=
'ACTIVE'
inactive-value=
"INACTIVE"
inactive-value=
'INACTIVE'
active-text=
"开"
active-text=
"开"
inactive-text=
"关"
inactive-text=
"关"
inline-prompt
inline-prompt
...
@@ -33,8 +32,9 @@
...
@@ -33,8 +32,9 @@
--el-switch-on-color: #42b983;
--el-switch-on-color: #42b983;
--el-switch-off-color: #f56c6c;
--el-switch-off-color: #f56c6c;
"
"
@
change=
"(val:string) => ruleSwitch(item.id, val)"
/>
/>
</div>
</div>
<el-icon
<el-icon
size=
"24"
size=
"24"
title=
"编辑"
title=
"编辑"
...
@@ -197,22 +197,20 @@
...
@@ -197,22 +197,20 @@
/>
/>
</div>
</div>
<div
style=
"display: flex; align-items: center"
>
<div
style=
"display: flex; align-items: center"
>
<div
style=
"color: #606266; margin-right: 10px"
>
<div
style=
"color: #606266; margin-right: 10px"
>
状态:
</div>
状态:
<el-switch
</div>
v-model=
"editForm.status"
<el-switch
active-value=
"ACTIVE"
v-model=
"editForm.status"
inactive-value=
"INACTIVE"
active-value=
'ACTIVE'
active-text=
"开"
inactive-value=
'INACTIVE'
inactive-text=
"关"
active-text=
"开"
inline-prompt
inactive-text=
"关"
class=
"ml-2"
inline-prompt
style=
"
class=
"ml-2"
--el-switch-on-color: #42b983;
style=
"
--el-switch-off-color: #f56c6c;
--el-switch-on-color: #42b983;
"
--el-switch-off-color: #f56c6c;
/>
"
/>
</div>
</div>
<div
v-if=
"editForm.isAuto"
>
<div
v-if=
"editForm.isAuto"
>
<div
label=
"排版类型:"
>
<div
label=
"排版类型:"
>
...
@@ -469,19 +467,15 @@ const changeSwitch = () => {
...
@@ -469,19 +467,15 @@ const changeSwitch = () => {
editForm
.
value
.
templateWidth
=
undefined
editForm
.
value
.
templateWidth
=
undefined
}
}
const
ruleSwitch
=
async
(
id
:
number
,
status
:
string
)
=>
{
const
ruleSwitch
=
async
(
id
:
number
|
undefined
,
status
:
string
)
=>
{
if
(
id
===
0
)
{
if
(
!
id
)
{
return
return
}
}
try
{
try
{
const
res
=
await
ruleSwitchApi
({
const
params
=
{
id
,
id
:
id
,
status
,
status
:
status
,
})
}
const
res
=
await
ruleSwitchApi
({
...
params
,
})
ElMessage
({
ElMessage
({
message
:
res
.
message
,
message
:
res
.
message
,
type
:
'success'
,
type
:
'success'
,
...
@@ -489,6 +483,7 @@ const ruleSwitch = async (id: number, status: string) => {
...
@@ -489,6 +483,7 @@ const ruleSwitch = async (id: number, status: string) => {
})
})
getList
()
getList
()
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
error
(
e
)
}
}
}
}
...
...
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