Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dwsproject
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
dws
dwsproject
Commits
ab49a5f5
Commit
ab49a5f5
authored
Jun 10, 2025
by
guibin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.rokedata.com/dws/dwsproject
parents
bbf327f5
852cd7dc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
roke_product_income_expense/controller/main.py
+6
-0
roke_product_income_expense/static/src/js/index.html
+9
-5
No files found.
roke_product_income_expense/controller/main.py
View file @
ab49a5f5
...
...
@@ -59,6 +59,7 @@ class ProductIncomeExpenseIframe(http.Controller):
type_str
=
_self
.
jsonrequest
.
get
(
"type_str"
,
False
)
# income收入/expenditure支出
machinery_type
=
_self
.
jsonrequest
.
get
(
"machinery_type"
,
False
)
customer
=
_self
.
jsonrequest
.
get
(
"customer"
,
False
)
abstract
=
_self
.
jsonrequest
.
get
(
"abstract"
,
False
)
domain
=
[]
if
start_date
and
end_date
:
domain
.
append
((
"business_date"
,
">="
,
start_date
))
...
...
@@ -69,6 +70,8 @@ class ProductIncomeExpenseIframe(http.Controller):
domain
.
append
((
"machinery_type"
,
"="
,
machinery_type
))
if
customer
:
domain
.
append
((
"customer"
,
"ilike"
,
customer
))
if
abstract
:
domain
.
append
((
"abstract"
,
"ilike"
,
abstract
))
data_list
=
_self
.
env
[
"roke.product.income.expense"
]
.
sudo
()
.
search
(
domain
,
limit
=
limit
,
offset
=
(
page
-
1
)
*
limit
,
order
=
"business_date desc, create_date desc"
)
...
...
@@ -109,6 +112,7 @@ class ProductIncomeExpenseIframe(http.Controller):
type_str
=
kwargs
.
get
(
"type_str"
,
False
)
# income收入/expenditure支出
machinery_type
=
kwargs
.
get
(
"machinery_type"
,
False
)
customer
=
kwargs
.
get
(
"customer"
,
False
)
abstract
=
kwargs
.
get
(
"abstract"
,
False
)
domain
=
[]
if
start_date
and
end_date
:
domain
.
append
((
"business_date"
,
">="
,
start_date
))
...
...
@@ -119,6 +123,8 @@ class ProductIncomeExpenseIframe(http.Controller):
domain
.
append
((
"machinery_type"
,
"="
,
machinery_type
))
if
customer
:
domain
.
append
((
"customer"
,
"ilike"
,
customer
))
if
abstract
:
domain
.
append
((
"abstract"
,
"ilike"
,
abstract
))
data_list
=
_self
.
env
[
"roke.product.income.expense"
]
.
sudo
()
.
search
(
domain
,
order
=
"business_date desc, create_date desc"
)
data
=
[]
for
v
in
data_list
:
...
...
roke_product_income_expense/static/src/js/index.html
View file @
ab49a5f5
...
...
@@ -77,6 +77,8 @@
<div
style=
"display: flex;justify-content: flex-end; text-align: right; margin-bottom: 5px;"
>
<el-input
style=
"width: 15%;"
v-model=
"abstract_value"
placeholder=
"请填写摘要信息"
@
change=
"select_change"
></el-input>
<el-select
v-model=
"select_value"
clearable
placeholder=
"请选择收支类型"
@
change=
"select_change"
>
<el-option
v-for=
"item in select_options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
...
...
@@ -89,12 +91,10 @@
</el-option>
</el-select>
<el-input
style=
"width: 15%;"
v-model=
"customer_value"
placeholder=
"请填写客户名称"
@
change=
"select_change"
></el-input>
<el-input
style=
"width: 15%;"
v-model=
"customer_value"
placeholder=
"请填写客户名称"
@
change=
"select_change"
></el-input>
<el-date-picker
class=
"margin_sty"
v-model=
"datePickerValue"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd"
@
change=
"datePickerChange"
>
<el-date-picker
class=
"margin_sty"
v-model=
"datePickerValue"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd"
@
change=
"datePickerChange"
>
</el-date-picker>
<el-button
type=
"primary"
@
click=
"export_click"
>
导出
</el-button>
...
...
@@ -249,6 +249,7 @@
select_value
:
''
,
machinery_type_value
:
''
,
customer_value
:
''
,
abstract_value
:
''
,
edit_state
:
false
,
edit_list
:
[]
};
...
...
@@ -379,6 +380,7 @@
end_date
:
this
.
datePickerValue
[
1
],
type_str
:
this
.
select_value
,
machinery_type
:
this
.
machinery_type_value
,
abstract
:
this
.
abstract_value
,
customer
:
this
.
customer_value
}
axios
.
request
({
...
...
@@ -469,6 +471,7 @@
formData
.
append
(
"end_date"
,
this
.
datePickerValue
[
1
]);
formData
.
append
(
"type_str"
,
this
.
select_value
);
formData
.
append
(
"machinery_type"
,
this
.
machinery_type_value
);
formData
.
append
(
"abstract"
,
this
.
abstract_value
);
formData
.
append
(
"customer"
,
this
.
customer_value
);
axios
.
post
(
"/roke/product/product_income_expense/export"
,
formData
,
...
...
@@ -540,6 +543,7 @@
this
.
select_value
=
''
this
.
machinery_type_value
=
''
this
.
customer_value
=
''
this
.
abstract_value
=
''
this
.
datePickerValue
=
''
this
.
getDataList
()
}
else
{
...
...
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