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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
18 deletions
+13
-18
src/api/podUsSchedulingRules.ts
+1
-1
src/views/order/podUsSchedulingRules/index.vue
+12
-17
No files found.
src/api/podUsSchedulingRules.ts
View file @
21fcad83
...
...
@@ -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
>>
(
'factory/podJomallOrderUsArrangeRule/ruleSwitch'
,
data
,
...
...
src/views/order/podUsSchedulingRules/index.vue
View file @
21fcad83
...
...
@@ -18,13 +18,12 @@
<div
class=
"box"
>
每天
{{
getTime
(
item
)
}}
开始自动排单
</div>
</div>
<div
class=
"action"
>
<div
style=
"display: flex;
align-items: center;gap: 2px;
"
>
<div
style=
"display: flex;
align-items: center; gap: 2px
"
>
<div>
状态:
</div>
<el-switch
v-model=
"item.status"
@
change=
"(val:string) => ruleSwitch(item.id || 0, val)"
active-value=
'ACTIVE'
inactive-value=
'INACTIVE'
active-value=
"ACTIVE"
inactive-value=
"INACTIVE"
active-text=
"开"
inactive-text=
"关"
inline-prompt
...
...
@@ -33,6 +32,7 @@
--el-switch-on-color: #42b983;
--el-switch-off-color: #f56c6c;
"
@
change=
"(val:string) => ruleSwitch(item.id, val)"
/>
</div>
<el-icon
...
...
@@ -197,13 +197,11 @@
/>
</div>
<div
style=
"display: flex; align-items: center"
>
<div
style=
"color: #606266; margin-right: 10px"
>
状态:
</div>
<div
style=
"color: #606266; margin-right: 10px"
>
状态:
</div>
<el-switch
v-model=
"editForm.status"
active-value=
'ACTIVE'
inactive-value=
'INACTIVE'
active-value=
"ACTIVE"
inactive-value=
"INACTIVE"
active-text=
"开"
inactive-text=
"关"
inline-prompt
...
...
@@ -469,18 +467,14 @@ const changeSwitch = () => {
editForm
.
value
.
templateWidth
=
undefined
}
const
ruleSwitch
=
async
(
id
:
number
,
status
:
string
)
=>
{
if
(
id
===
0
)
{
const
ruleSwitch
=
async
(
id
:
number
|
undefined
,
status
:
string
)
=>
{
if
(
!
id
)
{
return
}
try
{
const
params
=
{
id
:
id
,
status
:
status
,
}
const
res
=
await
ruleSwitchApi
({
...
params
,
id
,
status
,
})
ElMessage
({
message
:
res
.
message
,
...
...
@@ -489,6 +483,7 @@ const ruleSwitch = async (id: number, status: string) => {
})
getList
()
}
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