Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
platform
/
finance_serv
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d538929a
authored
Sep 14, 2018
by
谢明辉
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加注释
1 parent
12e3d367
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
98 additions
and
50 deletions
code/finance_web/.gitignore
code/finance_web/index.html
code/finance_web/src/components/contract.vue
code/finance_web/src/components/login.vue
code/finance_web/src/components/manage.vue
code/finance_web/src/components/search.vue
code/finance_web/.gitignore
View file @
d538929
.DS_Store
node_modules/
/dist/
npm-debug.log*
yarn-debug.log*
...
...
code/finance_web/index.html
View file @
d538929
...
...
@@ -18,7 +18,6 @@
<body
style=
"height: 100%;margin: 0"
>
<div
id=
"app"
></div>
<audio
src=
"./static/"
autoplay=
"autoplay"
></audio>
<!-- built files will be auto injected -->
</body>
...
...
code/finance_web/src/components/contract.vue
View file @
d538929
This diff is collapsed.
Click to expand it.
code/finance_web/src/components/login.vue
View file @
d538929
...
...
@@ -94,6 +94,9 @@
JSON
.
stringify
(
res
.
data
.
roles
)
);
sessionStorage
.
setItem
(
"user_name"
,
res
.
data
.
user_name
);
/**
* 这里应该用axios.all()
*/
this
.
get_provinces
();
this
.
get_contract_state_data
();
this
.
get_contract_type_data
();
...
...
code/finance_web/src/components/manage.vue
View file @
d538929
...
...
@@ -196,6 +196,11 @@
},
methods
:
{
//search
/**
* 可以在新增前四个选项是弹出提示框,
* 列出已存在的,当键入已存在合同就会出现。
* 没什么用处啊。。。
*/
search_contract_unid
(
queryString
,
cb
)
{
var
contract_unid_data
=
this
.
contract_unid_data
;
var
results
=
queryString
...
...
@@ -342,6 +347,9 @@
})
.
catch
(()
=>
{});
},
/**
* 更新数据统一调用的方法,add_data是自定义的对象
*/
get_data
(
url
)
{
this
.
$Axios
.
get
(
url
).
then
(
res
=>
{
if
(
res
.
data
.
list_data
)
{
...
...
code/finance_web/src/components/search.vue
View file @
d538929
...
...
@@ -31,15 +31,23 @@
</el-col>
</el-row>
<el-row
style=
"text-align:left"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"应收账款余额"
prop=
"leave_amount_start_point"
>
<el-input
v-model=
"search_form.leave_amount_start_point"
placeholder=
"不填默认为0"
></el-input>
<el-col
:span=
"6"
>
<el-form-item
label=
"所属年份"
prop=
"year"
>
<el-select
v-model=
"search_form.year"
clearable
>
<el-option
v-for=
"n in year_list"
:key=
"n"
:label=
"n"
:value=
"n"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
prop=
"leave_amount_end_point"
>
<el-input
v-model=
"search_form.leave_amount_end_point"
placeholder=
"不填则无上限"
></el-input>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
label=
"所属月份"
prop=
"month"
>
<el-select
v-model=
"search_form.month"
clearable
>
<el-option
v-for=
"n in month_list"
:key=
"n"
:label=
"n"
:value=
"n"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"
12
"
>
<el-col
:span=
"
6
"
>
<el-form-item
label=
"销售员"
v-if=
"sales"
>
<el-input
style=
"width:217px"
:readonly=
"true"
v-model=
"salesperson_name"
></el-input>
</el-form-item>
...
...
@@ -47,6 +55,24 @@
<el-input
style=
"width:217px"
v-model=
"search_form.salesperson_name__like"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
label=
"合同状态"
prop=
"contract_state_list"
>
<el-select
v-model=
"search_form.contract_state_list"
multiple
>
<el-option
v-for=
"item in contract_state_data"
:key=
"item.code"
:label=
"item.name"
:value=
"item.code"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row
style=
"text-align:left"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"应收账款余额"
prop=
"leave_amount_start_point"
>
<el-input
v-model=
"search_form.leave_amount_start_point"
placeholder=
"不填默认为0"
></el-input>
</el-form-item>
<el-form-item
prop=
"leave_amount_end_point"
>
<el-input
v-model=
"search_form.leave_amount_end_point"
placeholder=
"不填则无上限"
></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- hide -->
<el-row
style=
"margin-bottom:10px"
>
...
...
@@ -57,36 +83,35 @@
<el-collapse-transition>
<div
id=
"hide"
v-show=
"!hide_search_item"
>
<el-row
style=
"text-align:left"
>
<el-col
:span=
"6"
>
<el-form-item
label=
"合同
状态"
prop=
"contract_state_list
"
>
<el-select
v-model=
"search_form.contract_
state_list"
multip
le
>
<el-option
v-for=
"item in contract_
stat
e_data"
:key=
"item.code"
:label=
"item.name"
:value=
"item.code"
>
<el-form-item
label=
"合同
性质"
prop=
"contract_type
"
>
<el-select
v-model=
"search_form.contract_
type"
clearab
le
>
<el-option
v-for=
"item in contract_
typ
e_data"
:key=
"item.code"
:label=
"item.name"
:value=
"item.code"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
label=
"
所属年份"
prop=
"year
"
>
<el-select
v-model=
"search_form.year"
clearable
>
<el-option
v-for=
"
n in year_list"
:key=
"n"
:label=
"n"
:value=
"n
"
>
<el-col
:span=
"6"
style=
"text-align:left"
>
<el-form-item
label=
"
省"
prop=
"province
"
>
<el-select
style=
"width:217px"
v-model=
"search_form.province"
filterable
clearable
placeholder=
"省"
@
change=
"get_cities()"
>
<el-option
v-for=
"
(item,index) in provinces"
:key=
"index"
:label=
"item.name"
:value=
"item.province_unid
"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
label=
"
所属月份"
prop=
"month
"
>
<el-select
v-model=
"search_form.month"
clearable
>
<el-option
v-for=
"
n in month_list"
:key=
"n"
:label=
"n"
:value=
"n
"
>
<el-col
:span=
"6"
style=
"text-align:left"
>
<el-form-item
label=
"
市"
prop=
"city
"
>
<el-select
style=
"width:217px"
v-model=
"search_form.city"
filterable
clearable
placeholder=
"市"
>
<el-option
v-for=
"
(item,index) in cities"
:key=
"index"
:label=
"item.name"
:value=
"item.city_unid
"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
label=
"合同性质"
prop=
"contract_type"
>
<el-select
v-model=
"search_form.contract_type"
clearable
>
<el-option
v-for=
"item in contract_type_data"
:key=
"item.code"
:label=
"item.name"
:value=
"item.code"
>
</el-option>
<el-form-item
label=
"质保周期(月)"
prop=
"guarantee_period"
>
<el-select
v-model=
"search_form.guarantee_period"
clearable
>
<el-option
v-for=
"n in guarantee_period_list"
:key=
"n"
:label=
"n"
:value=
"n"
></el-option>
</el-select>
</el-form-item>
</el-col>
...
...
@@ -124,31 +149,8 @@
</el-form-item>
</el-col>
</el-row>
<el-row
style=
"text-align:left"
>
<el-col
:span=
"6"
>
<el-form-item
label=
"质保周期(月)"
prop=
"guarantee_period"
>
<el-select
v-model=
"search_form.guarantee_period"
clearable
>
<el-option
v-for=
"n in guarantee_period_list"
:key=
"n"
:label=
"n"
:value=
"n"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"6"
style=
"text-align:left"
>
<el-form-item
label=
"省"
prop=
"province"
>
<el-select
style=
"width:217px"
v-model=
"search_form.province"
filterable
clearable
placeholder=
"省"
@
change=
"get_cities()"
>
<el-option
v-for=
"(item,index) in provinces"
:key=
"index"
:label=
"item.name"
:value=
"item.province_unid"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"6"
style=
"text-align:left"
>
<el-form-item
label=
"市"
prop=
"city"
>
<el-select
style=
"width:217px"
v-model=
"search_form.city"
filterable
clearable
placeholder=
"市"
>
<el-option
v-for=
"(item,index) in cities"
:key=
"index"
:label=
"item.name"
:value=
"item.city_unid"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<!--
<el-row
style=
"text-align:left"
>
</el-row>
-->
<el-row
style=
"text-align:left"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"签订日期"
prop=
"start_date"
>
...
...
@@ -556,6 +558,9 @@
};
},
computed
:
{
/**
* 年份选择列表
*/
year_list
:
function
()
{
var
a
=
new
Date
().
getFullYear
();
var
arr
=
[];
...
...
@@ -564,6 +569,9 @@
}
return
arr
;
},
/**
* 字面意思
*/
offset
()
{
return
(
this
.
current_page
-
1
)
*
this
.
limit
;
},
...
...
@@ -628,6 +636,9 @@
});
});
},
/**
* 全选
*/
check_all_item
(
val
)
{
if
(
val
)
{
this
.
display_item_list
.
forEach
(
e
=>
{
...
...
@@ -644,6 +655,9 @@
this
.
is_indeterminate
=
checkedCount
>
0
&&
checkedCount
<
this
.
display_item_list
.
length
;
},
/**
* 自定义排序规则
*/
project_name_sort
(
a
,
b
)
{
if
(
a
.
project_name
&&
b
.
project_name
)
{
return
a
.
project_name
.
trim
().
localeCompare
(
b
.
project_name
.
trim
());
...
...
@@ -712,7 +726,11 @@
?
(
this
.
hide_icon
=
"icon i-arrowdown-copy"
)
:
(
this
.
hide_icon
=
"icon i-arrowup"
);
},
/**
* 点击导入按钮,弹出文件选择栏,当选择文件后
* type为file的input的文件列表会改变
* 检测到这种改变后,调用import_contract方法
*/
import_click
()
{
document
.
getElementById
(
"import_unview"
).
click
();
},
...
...
@@ -852,10 +870,15 @@
});
}
},
/**
* 获取检索结果
*/
get_list_data
()
{
var
a
=
this
.
search_form
;
if
(
a
.
contract_state_list
.
length
>
0
)
{
a
.
contract_states
=
a
.
contract_state_list
.
join
(
","
);
}
else
{
a
.
contract_states
=
""
;
}
Object
.
keys
(
a
).
forEach
(
key
=>
{
if
(
a
[
key
]
&&
typeof
a
[
key
]
==
"string"
)
{
...
...
@@ -934,6 +957,9 @@
}
});
},
/**
* page控件的一些操作
*/
handle_size_change
(
val
)
{
this
.
limit
=
val
;
if
(
this
.
list_data
.
length
!=
0
)
{
...
...
@@ -946,6 +972,9 @@
console
.
log
(
this
.
current_page
);
this
.
get_list_data
();
},
/**
* 导出合同的excel表格
*/
export_contract
()
{
if
(
this
.
checked_item_list
.
length
>
0
)
{
this
.
search_form
.
columns
=
this
.
checked_item_list
.
join
(
","
);
...
...
@@ -983,10 +1012,16 @@
console
.
log
(
err
.
message
);
});
},
/**
* 点击详情后进度contract页面
*/
go_to
(
id
)
{
sessionStorage
.
setItem
(
"modify"
,
"1"
);
this
.
$router
.
push
(
"/nav/contract/"
+
id
);
},
/**
* 改变dialog背景颜色
*/
change_dialog
()
{
if
(
localStorage
.
getItem
(
"style"
))
{
var
style
=
JSON
.
parse
(
localStorage
.
getItem
(
"style"
));
...
...
@@ -1038,7 +1073,9 @@
}
else
{
this
.
get_product_line_type_data
();
}
/**
*Admin具有删除合同的权限
*/
if
(
sessionStorage
.
getItem
(
"user_name"
)
===
"Admin"
)
{
this
.
management
=
true
;
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment