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 64383881
authored
Aug 30, 2018
by
谢明辉
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
a
1 parent
2c4365cf
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
259 additions
and
100 deletions
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/nav.vue
code/finance_web/src/components/search.vue
code/finance_web/src/components/user.vue
code/finance_web/src/main.js
code/finance_web/static/disparch.js
code/finance_web/src/components/contract.vue
View file @
6438388
...
@@ -39,13 +39,13 @@
...
@@ -39,13 +39,13 @@
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"客户名称"
prop=
"customer_unid"
>
<el-form-item
label=
"客户名称"
prop=
"customer_unid"
>
<el-select
:disabled=
"disabled_list[0]==1"
class=
"width-220"
v-model=
"form.customer_unid"
clearable
filterable
placeholder=
"客户名称"
>
<el-select
:disabled=
"disabled_list[0]==1"
class=
"width-220"
v-model=
"form.customer_unid"
clearable
filterable
placeholder=
"客户名称"
>
<el-option
v-for=
"(item
,index
) in customer_unid_selected_data"
:key=
"item.customer_unid"
:label=
"item.customer_name"
:value=
"item.customer_unid"
>
<el-option
v-for=
"(item) in customer_unid_selected_data"
:key=
"item.customer_unid"
:label=
"item.customer_name"
:value=
"item.customer_unid"
>
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"项目所在地"
prop=
"province_value"
>
<el-form-item
id=
"province"
label=
"项目所在地"
prop=
"province_value"
>
<el-select
:disabled=
"disabled_list[0]==1"
style=
"width:108px"
v-model=
"form.province_value"
clearable
placeholder=
"省"
@
change=
"get_cities()"
>
<el-select
:disabled=
"disabled_list[0]==1"
style=
"width:108px"
v-model=
"form.province_value"
clearable
placeholder=
"省"
@
change=
"get_cities()"
>
<el-option
v-for=
"(item,index) in provinces"
:key=
"index"
:label=
"item.name"
:value=
"item.province_unid + '#' + item.name"
>
<el-option
v-for=
"(item,index) in provinces"
:key=
"index"
:label=
"item.name"
:value=
"item.province_unid + '#' + item.name"
>
</el-option>
</el-option>
...
@@ -218,7 +218,7 @@
...
@@ -218,7 +218,7 @@
<el-row
style=
"text-align:left"
>
<el-row
style=
"text-align:left"
>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"维保服务期"
prop=
"guarantee_date"
>
<el-form-item
label=
"维保服务期"
prop=
"guarantee_date"
>
<el-date-picker
:disabled=
"disabled_list[0]==1"
style=
"width:
30
0px"
v-model=
"guarantee_date"
type=
"daterange"
range-separator=
"-"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd"
:unlink-panels=
"true"
>
<el-date-picker
:disabled=
"disabled_list[0]==1"
style=
"width:
220px;padding:0 0 0 1
0px"
v-model=
"guarantee_date"
type=
"daterange"
range-separator=
"-"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd"
:unlink-panels=
"true"
>
</el-date-picker>
</el-date-picker>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -238,7 +238,7 @@
...
@@ -238,7 +238,7 @@
<el-row
style=
"text-align:left"
>
<el-row
style=
"text-align:left"
>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"备注"
prop=
"contract_note"
>
<el-form-item
label=
"备注"
prop=
"contract_note"
>
<el-input
:disabled=
"disabled_list[0]==1"
v-model=
"form.contract_note"
type=
"textarea"
:rows=
"5"
style=
"width:
30
0px"
></el-input>
<el-input
:disabled=
"disabled_list[0]==1"
v-model=
"form.contract_note"
type=
"textarea"
:rows=
"5"
style=
"width:
22
0px"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"9"
>
<el-col
:span=
"9"
>
...
@@ -390,7 +390,6 @@
...
@@ -390,7 +390,6 @@
</el-form-item>
</el-form-item>
</el-row>
</el-row>
</el-form>
</el-form>
</el-form>
<el-form
:inline=
"true"
:model=
"final_acceptancs_form"
class=
"demo-form-inline"
label-width=
"100px"
:rules=
"acceptanc_form_rules2"
ref=
"final_acceptancs_form"
:disabled=
"disabled_list[3]==1"
>
<el-form
:inline=
"true"
:model=
"final_acceptancs_form"
class=
"demo-form-inline"
label-width=
"100px"
:rules=
"acceptanc_form_rules2"
ref=
"final_acceptancs_form"
:disabled=
"disabled_list[3]==1"
>
<el-row>
<el-row>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
...
@@ -640,12 +639,12 @@
...
@@ -640,12 +639,12 @@
</div>
</div>
</template>
</template>
<
script
>
<
script
>
const
twodecimalrule
=
{
const
twodecimalrule
=
{
pattern
:
/
((
^
[
1-9
]\d
*
)
|^0
)(\.\d{2})
$/
,
pattern
:
/
((
^
[
1-9
]\d
*
)
|^0
)(\.\d{2})
$/
,
message
:
"请输入数字并保留两位小数"
,
message
:
"请输入数字并保留两位小数"
,
trigger
:
"blur"
trigger
:
"blur"
};
};
export
default
{
export
default
{
name
:
"contract_information"
,
name
:
"contract_information"
,
data
()
{
data
()
{
return
{
return
{
...
@@ -656,9 +655,9 @@ export default {
...
@@ -656,9 +655,9 @@ export default {
acceptancs_appendix_list
:
[],
acceptancs_appendix_list
:
[],
first_acceptancs_appendix_list
:
[],
first_acceptancs_appendix_list
:
[],
operate_type
:
[
0
,
0
,
0
,
0
,
0
,
0
],
//整个页面的操作类型,一共6个表单,0表示新增,1表示修改
operate_type
:
[
0
,
0
,
0
,
0
,
0
,
0
],
//整个页面的操作类型,一共6个表单,0表示新增,1表示修改
code_base_url
:
disparch_data
.
code_base_url
,
code_base_url
:
this
.
$
disparch_data
.
code_base_url
,
contract_base_url
:
disparch_data
.
contract_base_url
,
contract_base_url
:
this
.
$
disparch_data
.
contract_base_url
,
auth_base_url
:
disparch_data
.
auth_base_url
,
auth_base_url
:
this
.
$
disparch_data
.
auth_base_url
,
contract_unid_selected_data
:
[],
//合同编号数据数组
contract_unid_selected_data
:
[],
//合同编号数据数组
salesperson_unid_selected_data
:
[],
//销售人员数据数组
salesperson_unid_selected_data
:
[],
//销售人员数据数组
project_unid_selected_data
:
[],
//项目名称数据数组
project_unid_selected_data
:
[],
//项目名称数据数组
...
@@ -1139,8 +1138,6 @@ export default {
...
@@ -1139,8 +1138,6 @@ export default {
// methods++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// methods++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
methods
:
{
methods
:
{
download_file
(
f
)
{
download_file
(
f
)
{
console
.
log
(
f
);
window
.
open
(
f
.
url
);
window
.
open
(
f
.
url
);
},
},
// upload+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// upload+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
...
@@ -1602,8 +1599,6 @@ export default {
...
@@ -1602,8 +1599,6 @@ export default {
appendUrl
,
appendUrl
,
data
:
a
data
:
a
}).
then
(
res
=>
{
}).
then
(
res
=>
{
console
.
log
(
data
[
index
]);
if
(
res
.
data
.
ecode
==
"200"
)
{
if
(
res
.
data
.
ecode
==
"200"
)
{
this
.
$message
({
this
.
$message
({
duration
:
1000
,
duration
:
1000
,
...
@@ -1639,7 +1634,6 @@ export default {
...
@@ -1639,7 +1634,6 @@ export default {
)
{
)
{
this
.
payment_type_tag
=
0
;
this
.
payment_type_tag
=
0
;
}
}
debugger
;
data
.
splice
(
index
,
1
);
data
.
splice
(
index
,
1
);
if
(
appendUrl
==
"delivers"
)
{
if
(
appendUrl
==
"delivers"
)
{
this
.
delivers_form
=
{
this
.
delivers_form
=
{
...
@@ -2111,6 +2105,16 @@ export default {
...
@@ -2111,6 +2105,16 @@ export default {
"province_value"
,
"province_value"
,
response
.
data
.
province
+
"#"
+
response
.
data
.
province_name
response
.
data
.
province
+
"#"
+
response
.
data
.
province_name
);
);
}
else
if
(
response
.
data
.
province_name
)
{
this
.
provinces
.
forEach
(
e
=>
{
if
(
e
.
name
===
response
.
data
.
province_name
)
{
this
.
$set
(
this
.
form
,
"province_value"
,
e
.
province_unid
+
"#"
+
response
.
data
.
province_name
);
}
});
}
}
if
(
response
.
data
.
city
)
{
if
(
response
.
data
.
city
)
{
this
.
get_cities
();
this
.
get_cities
();
...
@@ -2119,6 +2123,30 @@ export default {
...
@@ -2119,6 +2123,30 @@ export default {
"city_value"
,
"city_value"
,
response
.
data
.
city
+
"#"
+
response
.
data
.
city_name
response
.
data
.
city
+
"#"
+
response
.
data
.
city_name
);
);
}
else
if
(
response
.
data
.
city_name
&&
this
.
form
.
province_value
)
{
this
.
$Axios
({
method
:
"get"
,
url
:
this
.
code_base_url
+
"countries/0E229CD043/provinces/"
+
this
.
get_province_unid
+
"/cities"
})
.
then
(
r
=>
{
this
.
cities
=
r
.
data
.
list_data
;
this
.
cities
.
forEach
(
e
=>
{
if
(
e
.
name
===
response
.
data
.
city_name
)
{
this
.
$set
(
this
.
form
,
"city_value"
,
e
.
city_unid
+
"#"
+
response
.
data
.
city_name
);
}
});
})
.
catch
(
err
=>
{
console
.
log
(
err
.
message
);
});
}
}
// if (response.data.county) {
// if (response.data.county) {
// this.get_counties();
// this.get_counties();
...
@@ -2268,7 +2296,6 @@ export default {
...
@@ -2268,7 +2296,6 @@ export default {
response
.
data
.
bad_amount
.
toFixed
(
2
)
response
.
data
.
bad_amount
.
toFixed
(
2
)
);
);
}
}
debugger
;
this
.
contract_appendix_list
=
[];
this
.
contract_appendix_list
=
[];
if
(
response
.
data
.
appendix_list
)
{
if
(
response
.
data
.
appendix_list
)
{
for
(
let
i
=
0
;
i
<
response
.
data
.
appendix_list
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
response
.
data
.
appendix_list
.
length
;
i
++
)
{
...
@@ -2857,8 +2884,6 @@ export default {
...
@@ -2857,8 +2884,6 @@ export default {
watch
:
{
watch
:
{
//点击合同编号后对路由进行push,但不会刷新当前页面,需要通过watch 路由变化进行刷新
//点击合同编号后对路由进行push,但不会刷新当前页面,需要通过watch 路由变化进行刷新
$route
(
to
,
from
)
{
$route
(
to
,
from
)
{
console
.
log
(
1
);
this
.
payments_data
=
[];
this
.
payments_data
=
[];
this
.
rebacks_data
=
[];
this
.
rebacks_data
=
[];
this
.
receipts_data
=
[];
this
.
receipts_data
=
[];
...
@@ -2873,7 +2898,7 @@ export default {
...
@@ -2873,7 +2898,7 @@ export default {
}
}
}
}
}
}
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.add_button
{
.add_button
{
...
@@ -2941,4 +2966,7 @@ span:hover {
...
@@ -2941,4 +2966,7 @@ span:hover {
#contract_info
>>>
thead
>
tr
>
th
{
#contract_info
>>>
thead
>
tr
>
th
{
background-color
:
lightgray
;
background-color
:
lightgray
;
}
}
#province
{
margin-right
:
0
;
}
</
style
>
</
style
>
code/finance_web/src/components/login.vue
View file @
6438388
<
template
>
<
template
>
<div
id=
"login_box"
@
click
.
ctrl
.
meta
.
alt=
"manager"
>
<div
id=
"login_box"
@
click
.
ctrl
.
meta
.
alt=
"manager"
>
<el-row
type=
"flex"
justify=
"center"
align=
"middle"
style=
"height:80%"
>
<el-row
type=
"flex"
justify=
"center"
align=
"middle"
style=
"height:80%"
>
<el-card
class=
"box-card"
shadow=
"hover"
style=
"width:25%"
>
<el-card
class=
"box-card"
shadow=
"hover"
style=
"
min-
width:25%"
>
<div
slot=
"header"
style=
"text-align:center"
class=
"clearfix"
>
<div
slot=
"header"
style=
"text-align:center"
class=
"clearfix"
>
<span
style=
"font-size:24px"
>
合同管理系统
</span>
<span
style=
"font-size:24px"
>
合同管理系统
</span>
</div>
</div>
...
@@ -33,15 +33,15 @@
...
@@ -33,15 +33,15 @@
</template>
</template>
<
script
>
<
script
>
export
default
{
export
default
{
name
:
"login"
,
name
:
"login"
,
data
()
{
data
()
{
return
{
return
{
password_type
:
"password"
,
password_type
:
"password"
,
view_password
:
"icon i-password-not-view"
,
view_password
:
"icon i-password-not-view"
,
contract_base_url
:
disparch_data
.
contract_base_url
,
contract_base_url
:
this
.
$
disparch_data
.
contract_base_url
,
code_base_url
:
disparch_data
.
code_base_url
,
code_base_url
:
this
.
$
disparch_data
.
code_base_url
,
auth_base_url
:
disparch_data
.
auth_base_url
,
auth_base_url
:
this
.
$
disparch_data
.
auth_base_url
,
net_error
:
false
,
net_error
:
false
,
form
:
{
form
:
{
username
:
""
,
username
:
""
,
...
@@ -86,11 +86,14 @@ export default {
...
@@ -86,11 +86,14 @@ export default {
});
});
}
else
{
}
else
{
window
.
localStorage
.
setItem
(
"username"
,
this
.
form
.
username
);
window
.
localStorage
.
setItem
(
"username"
,
this
.
form
.
username
);
sessionStorage
.
setItem
(
"login_check"
,
true
)
sessionStorage
.
setItem
(
"login_check"
,
true
);
sessionStorage
.
setItem
(
"user_unid"
,
res
.
data
.
user_unid
)
sessionStorage
.
setItem
(
"user_unid"
,
res
.
data
.
user_unid
);
sessionStorage
.
setItem
(
"rtoken"
,
res
.
data
.
rtoken
)
sessionStorage
.
setItem
(
"rtoken"
,
res
.
data
.
rtoken
);
sessionStorage
.
setItem
(
"user_roles"
,
JSON
.
stringify
(
res
.
data
.
roles
));
sessionStorage
.
setItem
(
sessionStorage
.
setItem
(
"user_name"
,
res
.
data
.
user_name
)
"user_roles"
,
JSON
.
stringify
(
res
.
data
.
roles
)
);
sessionStorage
.
setItem
(
"user_name"
,
res
.
data
.
user_name
);
this
.
get_provinces
();
this
.
get_provinces
();
this
.
get_contract_state_data
();
this
.
get_contract_state_data
();
this
.
get_contract_type_data
();
this
.
get_contract_type_data
();
...
@@ -309,8 +312,8 @@ export default {
...
@@ -309,8 +312,8 @@ export default {
});
});
},
},
manager
()
{
manager
()
{
sessionStorage
.
setItem
(
'manager'
,
'1'
)
sessionStorage
.
setItem
(
"manager"
,
"1"
);
sessionStorage
.
setItem
(
'login_check'
,
'1'
)
sessionStorage
.
setItem
(
"login_check"
,
"1"
);
this
.
get_provinces
();
this
.
get_provinces
();
this
.
get_contract_state_data
();
this
.
get_contract_state_data
();
this
.
get_contract_type_data
();
this
.
get_contract_type_data
();
...
@@ -344,14 +347,14 @@ export default {
...
@@ -344,14 +347,14 @@ export default {
mounted
()
{
mounted
()
{
this
.
form
.
username
=
localStorage
.
getItem
(
"username"
);
this
.
form
.
username
=
localStorage
.
getItem
(
"username"
);
}
}
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
#login_box
{
#login_box
{
height
:
100%
;
height
:
100%
;
}
}
#fankui
{
#fankui
{
text-align
:
center
;
text-align
:
center
;
margin-top
:
0
;
margin-top
:
0
;
}
}
...
...
code/finance_web/src/components/manage.vue
View file @
6438388
...
@@ -22,12 +22,25 @@
...
@@ -22,12 +22,25 @@
<el-button
type=
"primary"
@
click=
"project_name_add"
>
添加
</el-button>
<el-button
type=
"primary"
@
click=
"project_name_add"
>
添加
</el-button>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
style=
"border-bottom:1px solid rgb(235, 238, 245);padding-bottom:18px"
>
<el-col
:span=
"6"
>
<el-button
class=
"add_button"
type=
"primary"
@
click=
"add_login_user"
>
添加登录用户
</el-button>
</el-col>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"6"
>
<el-col
:span=
"6"
>
<el-button
class=
"add_button"
type=
"primary"
@
click=
"login_user_dialog_show = true"
>
添加登录用户
</el-button>
<el-button
class=
"add_button"
type=
"primary"
@
click=
"product_line_type"
>
产品线类型
</el-button>
</el-col>
<el-col
:span=
"6"
>
<el-button
class=
"add_button"
type=
"primary"
@
click=
"contract_statu"
>
合同状态
</el-button>
</el-col>
<el-col
:span=
"6"
>
<el-button
class=
"add_button"
type=
"primary"
@
click=
"contract_type"
>
合同性质
</el-button>
</el-col>
<el-col
:span=
"6"
>
<el-button
class=
"add_button"
type=
"primary"
@
click=
"amount_statu"
>
账款状态
</el-button>
</el-col>
</el-col>
</el-row>
</el-row>
<el-dialog
id=
"login_user_dialog"
title=
"添加登录户"
:visible
.
sync=
"login_user_dialog_show"
width=
"30%"
:show-close=
"false"
>
<el-dialog
id=
"login_user_dialog"
title=
"添加登录户"
:visible
.
sync=
"login_user_dialog_show"
width=
"30%"
:show-close=
"false"
>
<el-form
:model=
"login_user_form"
label-width=
"100px"
label-position=
"left"
:rules=
"login_user_form_rules"
ref=
"login_user_form"
>
<el-form
:model=
"login_user_form"
label-width=
"100px"
label-position=
"left"
:rules=
"login_user_form_rules"
ref=
"login_user_form"
>
<el-form-item
label=
"用户类型"
prop=
"role_unid"
>
<el-form-item
label=
"用户类型"
prop=
"role_unid"
>
...
@@ -43,30 +56,53 @@
...
@@ -43,30 +56,53 @@
<el-input
v-model=
"login_user_form.name"
placeholder=
"姓名"
style=
"width:100%"
></el-input>
<el-input
v-model=
"login_user_form.name"
placeholder=
"姓名"
style=
"width:100%"
></el-input>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"login_user_dialog_cancel()"
>
取 消
</el-button>
<el-button
@
click=
"login_user_dialog_cancel()"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"login_user_dialog_confirm()"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"login_user_dialog_confirm()"
>
确 定
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
<el-dialog
:visible
.
sync=
"add_dialog_show"
width=
"30%"
:show-close=
"false"
style=
"max-height:800px"
>
<el-input
v-model=
"add_data.text"
></el-input>
<el-button
type=
"primary"
style=
"width:100%;margin-bottom:20px;margin-top:5px"
@
click=
"add_to_database"
>
添加
</el-button>
<el-table
:data=
"add_data.data"
highlight-current-row
border
>
<el-table-column
label=
"名称"
prop=
"name"
min-width=
"30%"
align=
"center"
>
</el-table-column>
<el-table-column
label=
"码"
prop=
"code"
min-width=
"30%"
align=
"center"
>
</el-table-column>
<el-table-column
label=
"操作"
min-width=
"20%"
align=
"center"
fixed=
"right"
>
<template
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"delete_code(scope.row)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
</el-dialog>
</el-card>
</el-card>
</template>
</template>
<
script
>
<
script
>
export
default
{
export
default
{
name
:
"manage"
,
name
:
"manage"
,
data
()
{
data
()
{
return
{
return
{
add_dialog_show
:
false
,
login_user_dialog_show
:
false
,
login_user_dialog_show
:
false
,
code_base_url
:
disparch_data
.
code_base_url
,
code_base_url
:
this
.
$
disparch_data
.
code_base_url
,
contract_base_url
:
disparch_data
.
contract_base_url
,
contract_base_url
:
this
.
$
disparch_data
.
contract_base_url
,
auth_base_url
:
disparch_data
.
auth_base_url
,
auth_base_url
:
this
.
$
disparch_data
.
auth_base_url
,
contract_unid
:
null
,
contract_unid
:
null
,
customer_name
:
null
,
customer_name
:
null
,
salesperson
:
null
,
salesperson
:
null
,
project_name
:
null
,
project_name
:
null
,
add_data
:
{
text
:
null
,
data
:
[],
url
:
null
},
roles
:
[],
roles
:
[],
login_user_form
:
{
login_user_form
:
{
role_unid
:
""
,
role_unid
:
""
,
...
@@ -97,6 +133,66 @@ export default {
...
@@ -97,6 +133,66 @@ export default {
};
};
},
},
methods
:
{
methods
:
{
// -----------------------
product_line_type
()
{
this
.
add_data
.
url
=
this
.
code_base_url
+
"custom/cates/4FC51AD3C9/codes"
;
this
.
get_data
(
this
.
add_data
.
url
);
},
contract_statu
()
{
this
.
add_data
.
url
=
this
.
code_base_url
+
"custom/cates/13BEFACBCF/codes"
;
this
.
get_data
(
this
.
add_data
.
url
);
},
contract_type
()
{
this
.
add_data
.
url
=
this
.
code_base_url
+
"custom/cates/8EC31D08A0/codes"
;
this
.
get_data
(
this
.
add_data
.
url
);
},
amount_statu
()
{
this
.
add_data
.
url
=
this
.
code_base_url
+
"custom/cates/42407C5EF2/codes"
;
this
.
get_data
(
this
.
add_data
.
url
);
},
delete_code
(
data
)
{
this
.
$Axios
({
method
:
'delete'
,
url
:
this
.
add_data
.
url
+
'/'
+
data
.
unid
}).
then
(
res
=>
{
this
.
show_message
(
'删除成功'
,
'success'
)
this
.
get_data
(
this
.
add_data
.
url
)
})
},
get_data
(
url
)
{
this
.
$Axios
.
get
(
url
).
then
(
res
=>
{
if
(
res
.
data
.
list_data
)
{
this
.
add_data
.
data
=
res
.
data
.
list_data
;
this
.
add_dialog_show
=
true
;
}
});
},
add_to_database
()
{
var
code
=
0
;
this
.
add_data
.
data
.
forEach
(
e
=>
{
if
(
e
.
code
>
code
)
{
code
=
e
.
code
;
}
});
code
++
;
this
.
$Axios
({
method
:
"post"
,
url
:
this
.
add_data
.
url
,
data
:
{
name
:
this
.
add_data
.
text
,
note
:
this
.
add_data
.
text
,
code
:
code
}
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
code
)
{
this
.
show_message
(
"添加成功"
,
"success"
);
this
.
add_data
.
text
=
null
;
this
.
get_data
(
this
.
add_data
.
url
);
}
});
},
// -----------------------
contract_unid_add
()
{
contract_unid_add
()
{
if
(
this
.
contract_unid
)
{
if
(
this
.
contract_unid
)
{
this
.
$Axios
({
this
.
$Axios
({
...
@@ -211,7 +307,7 @@ export default {
...
@@ -211,7 +307,7 @@ export default {
duration
:
3000
duration
:
3000
});
});
},
},
get_roles
()
{
add_login_user
()
{
this
.
$Axios
({
this
.
$Axios
({
method
:
"get"
,
method
:
"get"
,
url
:
this
.
auth_base_url
+
"roles"
url
:
this
.
auth_base_url
+
"roles"
...
@@ -219,9 +315,13 @@ export default {
...
@@ -219,9 +315,13 @@ export default {
.
then
(
response
=>
{
.
then
(
response
=>
{
if
(
response
.
data
.
list_data
)
{
if
(
response
.
data
.
list_data
)
{
this
.
roles
=
response
.
data
.
list_data
;
this
.
roles
=
response
.
data
.
list_data
;
this
.
login_user_dialog_show
=
true
;
}
else
{
this
.
show_message
(
"失败"
,
"error"
);
}
}
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
this
.
show_message
(
"失败"
,
"error"
);
console
.
log
(
err
.
message
);
console
.
log
(
err
.
message
);
});
});
},
},
...
@@ -273,10 +373,8 @@ export default {
...
@@ -273,10 +373,8 @@ export default {
});
});
}
}
},
},
created
()
{
created
()
{}
this
.
get_roles
();
};
}
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
@@ -289,7 +387,8 @@ export default {
...
@@ -289,7 +387,8 @@ export default {
.add_button
{
.add_button
{
display
:
inline-block
;
display
:
inline-block
;
font-size
:
18px
;
font-size
:
18px
;
width
:
80%
;
width
:
75%
;
min-width
:
200px
;
margin-top
:
20px
;
margin-top
:
20px
;
}
}
...
...
code/finance_web/src/components/nav.vue
View file @
6438388
...
@@ -14,14 +14,14 @@
...
@@ -14,14 +14,14 @@
<i
class=
"icon i-file"
></i>
<i
class=
"icon i-file"
></i>
<span
slot=
"title"
>
合同信息
</span>
<span
slot=
"title"
>
合同信息
</span>
</el-menu-item>
</el-menu-item>
<el-menu-item
index=
"/nav/manage"
v-show=
"management"
>
<i
class=
"icon i-setting"
></i>
<span
slot=
"title"
>
后台管理
</span>
</el-menu-item>
<el-menu-item
index=
"/nav/user"
>
<el-menu-item
index=
"/nav/user"
>
<i
class=
"icon i-user"
></i>
<i
class=
"icon i-user"
></i>
<span
slot=
"title"
>
个人管理
</span>
<span
slot=
"title"
>
个人管理
</span>
</el-menu-item>
</el-menu-item>
<el-menu-item
index=
"/nav/manage"
v-show=
"management"
>
<i
class=
"icon i-setting"
></i>
<span
slot=
"title"
>
后台管理
</span>
</el-menu-item>
<el-menu-item
index=
""
@
click=
"exit"
>
<el-menu-item
index=
""
@
click=
"exit"
>
<i
class=
"icon i-login"
></i>
<i
class=
"icon i-login"
></i>
<span
slot=
"title"
>
退出
</span>
<span
slot=
"title"
>
退出
</span>
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
name
:
"HelloWorld"
,
name
:
"HelloWorld"
,
data
()
{
data
()
{
return
{
return
{
...
@@ -47,7 +47,7 @@ export default {
...
@@ -47,7 +47,7 @@ export default {
username
:
""
,
username
:
""
,
department
:
""
,
department
:
""
,
collapse
:
true
,
collapse
:
true
,
contract_show
:
true
,
contract_show
:
true
};
};
},
},
...
@@ -77,27 +77,33 @@ export default {
...
@@ -77,27 +77,33 @@ export default {
}
}
},
},
created
()
{
created
()
{
if
(
sessionStorage
.
getItem
(
"user_roles"
)
!=
"null"
&&
sessionStorage
.
getItem
(
"user_roles"
))
{
if
(
sessionStorage
.
getItem
(
"user_roles"
)
!=
"null"
&&
sessionStorage
.
getItem
(
"user_roles"
)
)
{
var
roles
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"user_roles"
));
var
roles
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"user_roles"
));
for
(
let
i
=
0
;
i
<
roles
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
roles
.
length
;
i
++
)
{
const
e
=
roles
[
i
];
const
e
=
roles
[
i
];
if
(
e
.
role_unid
==
"91d5185d47e3bad099e17570b0dd0ed2"
)
{
if
(
e
.
role_unid
==
"91d5185d47e3bad099e17570b0dd0ed2"
)
{
this
.
management
=
true
;
}
}
}
}
}
else
{
}
else
{
this
.
contract_show
=
false
;
this
.
contract_show
=
false
;
}
}
if
(
sessionStorage
.
getItem
(
"user_name"
)
===
"Admin"
)
{
this
.
management
=
true
;
}
if
(
sessionStorage
.
getItem
(
"manager"
))
{
if
(
sessionStorage
.
getItem
(
"manager"
))
{
this
.
management
=
true
;
this
.
management
=
true
;
this
.
contract_show
=
true
;
this
.
contract_show
=
true
;
}
}
}
}
};
};
</
script
>
</
script
>
<
style
>
<
style
>
.el-container
>
.el-main
{
.el-container
>
.el-main
{
min-width
:
1120px
;
text-align
:
center
;
text-align
:
center
;
padding-top
:
0
;
padding-top
:
0
;
padding-left
:
0
;
padding-left
:
0
;
...
@@ -106,10 +112,10 @@ export default {
...
@@ -106,10 +112,10 @@ export default {
}
}
.el-container
,
.el-container
,
.el-aside
{
.el-aside
{
min-width
:
167px
;
height
:
100%
;
height
:
100%
;
}
}
.el-aside
>
.el-menu
{
.el-aside
>
.el-menu
{
height
:
100%
;
height
:
100%
;
}
}
</
style
>
</
style
>
code/finance_web/src/components/search.vue
View file @
6438388
...
@@ -316,12 +316,12 @@
...
@@ -316,12 +316,12 @@
</template>
</template>
<
script
>
<
script
>
const
twodecimalrule
=
{
const
twodecimalrule
=
{
pattern
:
/
((
^
[
1-9
]\d
*
)
|^0
)(\.\d{2})
$/
,
pattern
:
/
((
^
[
1-9
]\d
*
)
|^0
)(\.\d{2})
$/
,
message
:
"请输入数字并保留两位小数"
,
message
:
"请输入数字并保留两位小数"
,
trigger
:
"blur"
trigger
:
"blur"
};
};
export
default
{
export
default
{
name
:
"search"
,
name
:
"search"
,
data
()
{
data
()
{
return
{
return
{
...
@@ -330,8 +330,8 @@ export default {
...
@@ -330,8 +330,8 @@ export default {
provinces
:
[],
provinces
:
[],
cities
:
[],
cities
:
[],
counties
:
[],
counties
:
[],
code_base_url
:
disparch_data
.
code_base_url
,
code_base_url
:
this
.
$
disparch_data
.
code_base_url
,
contract_base_url
:
disparch_data
.
contract_base_url
,
contract_base_url
:
this
.
$
disparch_data
.
contract_base_url
,
month_list
:
[
month_list
:
[
"01"
,
"01"
,
"02"
,
"02"
,
...
@@ -405,8 +405,9 @@ export default {
...
@@ -405,8 +405,9 @@ export default {
},
},
computed
:
{
computed
:
{
year_list
:
function
()
{
year_list
:
function
()
{
var
a
=
new
Date
().
getFullYear
();
var
arr
=
[];
var
arr
=
[];
for
(
let
i
=
2000
;
i
<
2041
;
i
++
)
{
for
(
let
i
=
a
;
i
>=
2000
;
i
--
)
{
arr
.
push
(
i
);
arr
.
push
(
i
);
}
}
return
arr
;
return
arr
;
...
@@ -565,27 +566,27 @@ export default {
...
@@ -565,27 +566,27 @@ export default {
});
});
}
}
},
},
get_counties
()
{
//
get_counties() {
// this.search_form.county = "";
//
//
this.search_form.county = "";
if
(
this
.
search_form
.
province
&&
this
.
search_form
.
city
)
{
//
if (this.search_form.province && this.search_form.city) {
this
.
$Axios
({
//
this.$Axios({
method
:
"get"
,
//
method: "get",
url
:
//
url:
this
.
code_base_url
+
//
this.code_base_url +
"countries/0E229CD043/provinces/"
+
//
"countries/0E229CD043/provinces/" +
this
.
search_form
.
province
+
//
this.search_form.province +
"/cities/"
+
//
"/cities/" +
this
.
search_form
.
city
+
//
this.search_form.city +
"/counties"
//
"/counties"
})
//
})
.
then
(
response
=>
{
//
.then(response => {
this
.
counties
=
response
.
data
.
list_data
;
//
this.counties = response.data.list_data;
})
//
})
.
catch
(
err
=>
{
//
.catch(err => {
console
.
log
(
err
.
message
);
//
console.log(err.message);
});
//
});
}
//
}
},
//
},
get_list_data
()
{
get_list_data
()
{
var
a
=
this
.
search_form
;
var
a
=
this
.
search_form
;
a
.
offset
=
this
.
offset
;
a
.
offset
=
this
.
offset
;
...
@@ -643,12 +644,21 @@ export default {
...
@@ -643,12 +644,21 @@ export default {
},
},
commit
()
{
commit
()
{
this
.
$refs
[
"search_form"
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
current_page
=
1
;
this
.
current_page
=
1
;
sessionStorage
.
setItem
(
sessionStorage
.
setItem
(
"search_condition"
,
"search_condition"
,
JSON
.
stringify
(
this
.
search_form
)
JSON
.
stringify
(
this
.
search_form
)
);
);
this
.
get_list_data
();
this
.
get_list_data
();
}
else
{
this
.
$message
({
type
:
'warning'
,
message
:
'请检查数据格式是否正确'
})
}
});
},
},
page_change
(
val
)
{
page_change
(
val
)
{
this
.
search_form
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"search_condition"
));
this
.
search_form
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"search_condition"
));
...
@@ -727,7 +737,7 @@ export default {
...
@@ -727,7 +737,7 @@ export default {
this
.
get_product_line_type_data
();
this
.
get_product_line_type_data
();
}
}
}
}
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
code/finance_web/src/components/user.vue
View file @
6438388
...
@@ -24,15 +24,17 @@
...
@@ -24,15 +24,17 @@
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button-group>
<el-button
type=
"primary"
@
click=
"submitForm('password_form')"
>
提交
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm('password_form')"
>
提交
</el-button>
<el-button
@
click=
"resetForm('password_form')"
>
重置
</el-button>
<el-button
type=
"warning"
@
click=
"resetForm('password_form')"
>
重置
</el-button>
</el-button-group>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</el-card>
</el-card>
</template>
</template>
<
script
>
<
script
>
export
default
{
export
default
{
name
:
"user"
,
name
:
"user"
,
data
()
{
data
()
{
return
{
return
{
...
@@ -42,7 +44,7 @@ export default {
...
@@ -42,7 +44,7 @@ export default {
odd_password_view
:
"icon i-password-not-view"
,
odd_password_view
:
"icon i-password-not-view"
,
rtoken
:
""
,
rtoken
:
""
,
user_unid
:
""
,
user_unid
:
""
,
auth_base_url
:
disparch_data
.
auth_base_url
,
auth_base_url
:
this
.
$
disparch_data
.
auth_base_url
,
password_form
:
{
password_form
:
{
odd_password
:
""
,
odd_password
:
""
,
new_password
:
""
,
new_password
:
""
,
...
@@ -56,8 +58,8 @@ export default {
...
@@ -56,8 +58,8 @@ export default {
},
},
new_password
:
[
new_password
:
[
{
{
pattern
:
/^
[
A-Za-z
\d]{6,
}
$/
,
pattern
:
/^
[
A-Za-z0-9
\x
20-
\x
7f
]{6,16
}
$/
,
message
:
"密码至少
6位"
,
message
:
"密码至少6位,至多1
6位"
,
trigger
:
"blur"
trigger
:
"blur"
},
},
{
{
...
@@ -76,8 +78,8 @@ export default {
...
@@ -76,8 +78,8 @@ export default {
],
],
check_password
:
[
check_password
:
[
{
{
pattern
:
/^
[
A-Za-z
\d]{6,
}
$/
,
pattern
:
/^
[
A-Za-z0-9
\x
20-
\x
7f
]{6,16
}
$/
,
message
:
"密码至少
6位"
,
message
:
"密码至少6位,至多1
6位"
,
trigger
:
"blur"
trigger
:
"blur"
},
},
{
{
...
@@ -156,7 +158,7 @@ export default {
...
@@ -156,7 +158,7 @@ export default {
this
.
user_unid
=
sessionStorage
.
getItem
(
"user_unid"
);
this
.
user_unid
=
sessionStorage
.
getItem
(
"user_unid"
);
}
}
}
}
};
};
</
script
>
</
script
>
...
...
code/finance_web/src/main.js
View file @
6438388
...
@@ -9,7 +9,6 @@ import CollapseTransition from 'element-ui/lib/transitions/collapse-transition';
...
@@ -9,7 +9,6 @@ import CollapseTransition from 'element-ui/lib/transitions/collapse-transition';
import
'element-ui/lib/theme-chalk/index.css'
import
'element-ui/lib/theme-chalk/index.css'
import
'../static/city-data'
import
'../static/city-data'
// import "./mock"
// import "./mock"
import
'../static/disparch'
import
'./assets/icons/iconfont.css'
import
'./assets/icons/iconfont.css'
import
'babel-polyfill'
import
'babel-polyfill'
...
@@ -76,6 +75,23 @@ Axios.interceptors.response.use((response) => {
...
@@ -76,6 +75,23 @@ Axios.interceptors.response.use((response) => {
return
Promise
.
reject
(
err
);
return
Promise
.
reject
(
err
);
});
});
{
if
(
window
.
location
.
host
==
'localhost:8089'
)
{
Vue
.
prototype
.
$disparch_data
=
{
code_base_url
:
"http://192.168.9.162:20080/api/v1/codes/"
,
contract_base_url
:
"http://192.168.9.162:20080/api/v1/financial/contracts/"
,
auth_base_url
:
"http://192.168.9.162:20080/api/v1/auth/"
}
}
else
{
var
url
=
window
.
location
.
host
;
Vue
.
prototype
.
$disparch_data
=
{
code_base_url
:
"http://"
+
url
+
"/api/v1/codes/"
,
contract_base_url
:
"http://"
+
url
+
"/api/v1/financial/contracts/"
,
auth_base_url
:
"http://"
+
url
+
"/api/v1/auth/"
}
}
}
new
Vue
({
new
Vue
({
...
...
code/finance_web/static/disparch.js
deleted
100644 → 0
View file @
2c4365c
disparch_data
=
{
code_base_url
:
"http://192.168.9.162:20080/api/v1/codes/"
,
contract_base_url
:
"http://192.168.9.162:20080/api/v1/financial/contracts/"
,
auth_base_url
:
"http://192.168.9.162:20080/api/v1/auth/"
}
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