Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
weiqiao-vue
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
0
Merge Requests
0
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
金民
weiqiao-vue
Commits
9581fa71
Commit
9581fa71
authored
Feb 05, 2026
by
胡鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处理盈亏字段颜色区分
parent
d6bb46db
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
xjrsoft-vue3/src/views/ckgl/kcpd/components/config.ts
+2
-2
xjrsoft-vue3/src/views/ckgl/kcyk/index.vue
+15
-1
No files found.
xjrsoft-vue3/src/views/ckgl/kcpd/components/config.ts
View file @
9581fa71
...
@@ -2,6 +2,7 @@ import { FormProps, FormSchema } from '/@/components/Form';
...
@@ -2,6 +2,7 @@ import { FormProps, FormSchema } from '/@/components/Form';
import
{
BasicColumn
}
from
'/@/components/Table'
;
import
{
BasicColumn
}
from
'/@/components/Table'
;
import
{
getInventoryByFilter
}
from
'/@/api/ckgl/kcpd'
;
import
{
getInventoryByFilter
}
from
'/@/api/ckgl/kcpd'
;
import
type
{
InventoryFilterParams
,
InventoryItem
}
from
'/@/api/ckgl/kcpd/model/KcpdModel'
;
import
type
{
InventoryFilterParams
,
InventoryItem
}
from
'/@/api/ckgl/kcpd/model/KcpdModel'
;
import
{
log
}
from
'console'
;
const
parseSelectValueToArray
=
(
value
:
unknown
):
string
[]
=>
{
const
parseSelectValueToArray
=
(
value
:
unknown
):
string
[]
=>
{
if
(
Array
.
isArray
(
value
))
return
value
.
filter
(
Boolean
)
as
string
[];
if
(
Array
.
isArray
(
value
))
return
value
.
filter
(
Boolean
)
as
string
[];
...
@@ -77,9 +78,8 @@ async function handleProfitLoss(_schema, formModel, formActionType) {
...
@@ -77,9 +78,8 @@ async function handleProfitLoss(_schema, formModel, formActionType) {
data
:
inventoryDetails
,
data
:
inventoryDetails
,
headers
:
{
Authorization
:
localStorage
.
getItem
(
'token'
)
}
headers
:
{
Authorization
:
localStorage
.
getItem
(
'token'
)
}
});
});
console
.
log
(
formActionType
);
formActionType
?.
showMessage
?.(
'盈亏处理成功!'
,
{
type
:
'success'
});
formActionType
?.
showMessage
?.(
'盈亏处理成功!'
,
{
type
:
'success'
});
// Close the modal by emitting an event to parent component
if
(
window
.
parent
&&
window
.
parent
.
postMessage
)
{
if
(
window
.
parent
&&
window
.
parent
.
postMessage
)
{
window
.
parent
.
postMessage
({
type
:
'CLOSE_MODAL'
},
'*'
);
window
.
parent
.
postMessage
({
type
:
'CLOSE_MODAL'
},
'*'
);
}
}
...
...
xjrsoft-vue3/src/views/ckgl/kcyk/index.vue
View file @
9581fa71
...
@@ -238,8 +238,22 @@
...
@@ -238,8 +238,22 @@
}
}
function
customRow
(
record
:
Recordable
)
{
function
customRow
(
record
:
Recordable
)
{
console
.
log
(
record
);
// 强制根据盈亏状态设置行背景色
let
rowStyle
=
{};
if
(
record
.
ykzt
==
'亏'
)
{
// 亏损状态 - 红色背景
rowStyle
=
{
'color'
:
'red'
};
}
else
if
(
record
.
ykzt
==
'盈'
)
{
// 盈利状态 - 绿色背景
rowStyle
=
{
'color'
:
'green'
};
}
return
{
return
{
style
:
rowStyle
,
onClick
:
()
=>
{
onClick
:
()
=>
{
let
selectedRowKeys
=
[...
selectedKeys
.
value
];
let
selectedRowKeys
=
[...
selectedKeys
.
value
];
if
(
selectedRowKeys
.
indexOf
(
record
.
id
)
>=
0
)
{
if
(
selectedRowKeys
.
indexOf
(
record
.
id
)
>=
0
)
{
...
...
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