Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
confucius
Commits
432e927d
Commit
432e927d
authored
Dec 22, 2020
by
Mac
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/luochao/confucius
parents
33e91b19
c39b56ca
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
648 additions
and
671 deletions
+648
-671
common.js
src/api/common/common.js
+3
-18
paymentDetail.vue
src/pages/course/paymentDetail.vue
+411
-408
rewardDetailed.vue
src/pages/course/rewardDetailed.vue
+44
-35
erpindex.js
src/utils/erpindex.js
+190
-168
index.js
src/utils/index.js
+0
-42
No files found.
src/api/common/common.js
View file @
432e927d
...
@@ -104,22 +104,7 @@ export function getFileExt(filename) {
...
@@ -104,22 +104,7 @@ export function getFileExt(filename) {
*/
*/
export
function
EduDownLoad
(
cmd
,
msg
,
fileName
)
{
export
function
EduDownLoad
(
cmd
,
msg
,
fileName
)
{
return
request
({
url
:
cmd
,
method
:
'post'
,
data
:
msg
,
headers
:{
responseType
:
'arraybuffer'
}
}).
then
(
res
=>
{
let
blob
=
new
Blob
([
res
.
data
],
{
type
:
"application/vnd.ms-excel;charset=utf-8"
})
let
url
=
URL
.
createObjectURL
(
blob
);
let
link
=
document
.
createElement
(
'a'
);
link
.
href
=
url
;
link
.
setAttribute
(
"download"
,
fileName
);
document
.
body
.
appendChild
(
link
);
link
.
click
();
})
}
}
\ No newline at end of file
src/pages/course/paymentDetail.vue
View file @
432e927d
<
style
>
<
style
>
.paymentDetail
.p_title
{
.paymentDetail
.p_title
{
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#000000
;
color
:
#000000
;
font-size
:
14px
;
font-size
:
14px
;
margin-bottom
:
20px
;
margin-bottom
:
20px
;
}
}
.paymentDetail
.paymentList
{
.paymentDetail
.paymentList
{
height
:
170px
;
height
:
170px
;
border-radius
:
3px
;
border-radius
:
3px
;
box-shadow
:
0
0
5px
#d1d1d1
;
box-shadow
:
0
0
5px
#d1d1d1
;
margin-right
:
10px
;
margin-right
:
10px
;
padding
:
12px
;
padding
:
12px
;
}
}
.paymentDetail
.paymentList
:last-child
{
.paymentDetail
.paymentList
:last-child
{
margin-right
:
0
;
margin-right
:
0
;
}
}
.paymentDetail
.pay_topList
{
.paymentDetail
.pay_topList
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
}
}
.paymentDetail
.pay_Title
{
.paymentDetail
.pay_Title
{
margin-left
:
5px
;
margin-left
:
5px
;
color
:
#111111
;
color
:
#111111
;
font-size
:
13px
;
font-size
:
13px
;
font-weight
:
bold
;
font-weight
:
bold
;
}
}
.paymentDetail
.pay_ListMent
{
.paymentDetail
.pay_ListMent
{
display
:
flex
;
display
:
flex
;
font-size
:
12px
;
font-size
:
12px
;
margin-bottom
:
6px
;
margin-bottom
:
6px
;
}
}
.paymentDetail
.pay_ListOne
{
.paymentDetail
.pay_ListOne
{
width
:
50px
;
width
:
50px
;
color
:
#999999
;
color
:
#999999
;
text-align
:
left
;
text-align
:
left
;
}
}
.paymentDetail
.pay_Inner
{
.paymentDetail
.pay_Inner
{
margin-left
:
10px
;
margin-left
:
10px
;
color
:
#111111
;
color
:
#111111
;
font-weight
:
bold
;
font-weight
:
bold
;
}
}
.paymentDetail
.orangeStyle
{
.paymentDetail
.orangeStyle
{
color
:
#F28C1D
;
color
:
#F28C1D
;
}
}
.paymentDetail
.pay_ListTwo
{
.paymentDetail
.pay_ListTwo
{
width
:
25px
;
width
:
25px
;
color
:
#999999
;
color
:
#999999
;
text-align
:
left
;
text-align
:
left
;
}
}
.paymentDetail
.pay_InorOut
{
.paymentDetail
.pay_InorOut
{
margin-top
:
20px
;
margin-top
:
20px
;
}
}
.paymentDetail
.Pay_Line
{
.paymentDetail
.Pay_Line
{
width
:
3px
;
width
:
3px
;
height
:
11px
;
height
:
11px
;
margin-right
:
10px
;
margin-right
:
10px
;
background-color
:
#3FC4FF
;
background-color
:
#3FC4FF
;
display
:
inline-block
;
display
:
inline-block
;
}
}
.paymentDetail
.pay_TopTitle
{
.paymentDetail
.pay_TopTitle
{
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#000000
;
color
:
#000000
;
font-size
:
13px
;
font-size
:
13px
;
}
}
.paymentDetail
.payTable
{
.paymentDetail
.payTable
{
width
:
100%
;
width
:
100%
;
border-collapse
:
collapse
;
border-collapse
:
collapse
;
}
}
.paymentDetail
.payTable
tr
th
{
.paymentDetail
.payTable
tr
th
{
background
:
#fff
;
background
:
#fff
;
height
:
40px
;
height
:
40px
;
font-size
:
12px
;
font-size
:
12px
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#2D2D2D
;
color
:
#2D2D2D
;
background
:
#DDDEE0
;
background
:
#DDDEE0
;
}
}
.paymentDetail
.payTable
tr
{
.paymentDetail
.payTable
tr
{
background
:
#fff
;
background
:
#fff
;
text-align
:
center
;
text-align
:
center
;
height
:
40px
;
height
:
40px
;
}
}
.paymentDetail
.payTable
tr
td
{
.paymentDetail
.payTable
tr
td
{
font-size
:
13px
;
font-size
:
13px
;
text-align
:
center
;
text-align
:
center
;
color
:
#2D2D2D
;
color
:
#2D2D2D
;
padding
:
10px
0
;
padding
:
10px
0
;
font-weight
:
bold
;
font-weight
:
bold
;
border-bottom
:
1px
solid
#E5E5E5
;
border-bottom
:
1px
solid
#E5E5E5
;
}
}
.paymentDetail
.finince_Order
{
.paymentDetail
.finince_Order
{
color
:
#2961FE
;
color
:
#2961FE
;
text-decoration
:
underline
;
text-decoration
:
underline
;
cursor
:
pointer
;
cursor
:
pointer
;
font-weight
:
bold
;
font-weight
:
bold
;
}
}
.paymentDetail
.finice_pass
{
.paymentDetail
.finice_pass
{
display
:
inline-block
;
display
:
inline-block
;
width
:
50px
;
width
:
50px
;
height
:
25px
;
height
:
25px
;
...
@@ -121,24 +121,26 @@
...
@@ -121,24 +121,26 @@
background
:
#ccf3eb
;
background
:
#ccf3eb
;
color
:
#02C499
;
color
:
#02C499
;
border-radius
:
2px
;
border-radius
:
2px
;
}
}
.paymentDetail
.financeYing
{
.paymentDetail
.financeYing
{
width
:
110px
;
width
:
110px
;
text-align
:
left
;
text-align
:
left
;
margin
:
auto
;
margin
:
auto
;
}
}
.p_titleList
{
.p_titleList
{
position
:
relative
;
position
:
relative
;
}
}
</
style
>
</
style
>
<
template
>
<
template
>
<div
class=
"page-body paymentDetail"
>
<div
class=
"page-body paymentDetail"
>
<div
class=
"page-search items-center"
>
<div
class=
"page-search items-center"
>
<div
class=
"p_titleList"
>
<div
class=
"p_titleList"
>
<div
class=
"p_title"
>
班级收支明细
</div>
<div
class=
"p_title"
>
班级收支明细
</div>
<q-btn
label=
"导出"
color=
"accent q-px-md"
size=
"sm"
style=
"font-weight:400 !important;position:absolute;right:0;top:0"
@
click=
"exportOrder"
/>
<q-btn
label=
"导出"
color=
"accent q-px-md"
size=
"sm"
style=
"font-weight:400 !important;position:absolute;right:0;top:0"
@
click=
"exportOrder"
/>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col paymentList"
v-if=
"dataList&&dataList.ClassInfo"
>
<div
class=
"col paymentList"
v-if=
"dataList&&dataList.ClassInfo"
>
...
@@ -271,7 +273,8 @@
...
@@ -271,7 +273,8 @@
<div
class=
"pay_InorOut"
>
<div
class=
"pay_InorOut"
>
<div
class=
"pay_TopTitle"
style=
"display:flex;justify-content: space-between;align-items:center;"
>
<div
class=
"pay_TopTitle"
style=
"display:flex;justify-content: space-between;align-items:center;"
>
<div><span
class=
"Pay_Line"
></span>
收入
</div>
<div><span
class=
"Pay_Line"
></span>
收入
</div>
<q-btn
label=
"新增收款"
color=
"accent q-px-md"
size=
"sm"
style=
"font-weight:400 !important;"
@
click=
"goShoukuan(1)"
/>
<q-btn
label=
"新增收款"
color=
"accent q-px-md"
size=
"sm"
style=
"font-weight:400 !important;"
@
click=
"goShoukuan(1)"
/>
</div>
</div>
<div
class=
"pay_TopTitle"
style=
"margin:15px 0 15px 20px;font-size:12px;"
>
<div
class=
"pay_TopTitle"
style=
"margin:15px 0 15px 20px;font-size:12px;"
>
<span
class=
"Pay_Line"
style=
"background-color:#02C499;"
></span>
学费收入
<span
class=
"Pay_Line"
style=
"background-color:#02C499;"
></span>
学费收入
...
@@ -375,9 +378,11 @@
...
@@ -375,9 +378,11 @@
</td>
</td>
</tr>
</tr>
</table>
</table>
<div
class=
"pay_TopTitle"
style=
"margin-top:30px;display:flex;justify-content: space-between;align-items:center;"
>
<div
class=
"pay_TopTitle"
style=
"margin-top:30px;display:flex;justify-content: space-between;align-items:center;"
>
<div><span
class=
"Pay_Line"
style=
"background:#F72E52;"
></span>
支出
</div>
<div><span
class=
"Pay_Line"
style=
"background:#F72E52;"
></span>
支出
</div>
<q-btn
label=
"新增付款"
color=
"accent q-px-md"
size=
"sm"
style=
"font-weight:400 !important;"
@
click=
"goShoukuan(2)"
/>
<q-btn
label=
"新增付款"
color=
"accent q-px-md"
size=
"sm"
style=
"font-weight:400 !important;"
@
click=
"goShoukuan(2)"
/>
</div>
</div>
<div
class=
"pay_TopTitle"
style=
"margin:15px 0 15px 20px;font-size:12px;"
>
<div
class=
"pay_TopTitle"
style=
"margin:15px 0 15px 20px;font-size:12px;"
>
<span
class=
"Pay_Line"
style=
"background-color:#F28C1D;"
></span>
其他支出
<span
class=
"Pay_Line"
style=
"background-color:#F28C1D;"
></span>
其他支出
...
@@ -432,18 +437,15 @@
...
@@ -432,18 +437,15 @@
</table>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
import
{
GetClassBalanceSheet
,
GetClassBalanceSheet
,
GetClassBalanceSheetToExcel
}
from
'../../api/finance/index'
;
}
from
'../../api/finance/index'
;
import
{
export
default
{
EduDownLoad
,
}
from
'../../api/common/common'
;
export
default
{
props
:
{},
props
:
{},
components
:
{},
components
:
{},
data
()
{
data
()
{
...
@@ -493,7 +495,7 @@ export default {
...
@@ -493,7 +495,7 @@ export default {
//导出单据
//导出单据
exportOrder
()
{
exportOrder
()
{
var
msg
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
msg
));
var
msg
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
msg
));
EduDownLoad
(
"/Finance/GetClassBalanceSheetToExcel"
,
msg
,
"收支明细.xls"
)
this
.
Get
EduDownLoad
(
"/Finance/GetClassBalanceSheetToExcel"
,
msg
,
"收支明细.xls"
)
},
},
//跳转到收款单
//跳转到收款单
goShoukuan
(
type
)
{
goShoukuan
(
type
)
{
...
@@ -520,7 +522,8 @@ export default {
...
@@ -520,7 +522,8 @@ export default {
}
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"sass"
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass');
@import
url('~assets/css/table.sass');
...
...
src/pages/course/rewardDetailed.vue
View file @
432e927d
...
@@ -19,20 +19,20 @@
...
@@ -19,20 +19,20 @@
<div
class=
"col-2 q-table__title"
>
教师课时费明细
</div>
<div
class=
"col-2 q-table__title"
>
教师课时费明细
</div>
<q-space
/>
<q-space
/>
<div
class=
"page-option"
>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
size=
"sm"
label=
"导出"
/>
<q-btn
color=
"accent"
size=
"sm"
label=
"导出"
@
click=
"Export"
/>
</div>
</div>
</
template
>
</
template
>
<
template
v-slot:body-cell-Type=
"props"
>
<
template
v-slot:body-cell-Type=
"props"
>
<q-td
:props=
"props"
>
<q-td
:props=
"props"
>
<span
>
{{
props
.
row
.
Type
==
1
?
'带班'
:
'代课'
}}
</span>
<span>
{{
props
.
row
.
Type
==
1
?
'带班'
:
'代课'
}}
</span>
</q-td>
</q-td>
</
template
>
</
template
>
<
template
v-slot:bottom
>
<
template
v-slot:bottom
>
</
template
>
</
template
>
</q-table>
</q-table>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-tow-column-table"
style=
"margin-top: 30px"
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-tow-column-table"
separator=
"vertical"
:data=
"data.Statistics"
:columns=
"columnsZ"
row-key=
"name"
>
style=
"margin-top: 30px"
separator=
"vertical"
:data=
"data.Statistics"
:columns=
"columnsZ"
row-key=
"name"
>
<
template
v-slot:top=
"props"
>
<
template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
教师课时费汇总
</div>
<div
class=
"col-2 q-table__title"
>
教师课时费汇总
</div>
<q-space
/>
<q-space
/>
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
</
template
>
</
template
>
<
template
v-slot:body-cell-Type=
"props"
>
<
template
v-slot:body-cell-Type=
"props"
>
<q-td
:props=
"props"
>
<q-td
:props=
"props"
>
<span
>
{{
props
.
row
.
Type
==
1
?
'带班'
:
'代课'
}}
</span>
<span>
{{
props
.
row
.
Type
==
1
?
'带班'
:
'代课'
}}
</span>
</q-td>
</q-td>
</
template
>
</
template
>
<
template
v-slot:bottom
>
<
template
v-slot:bottom
>
...
@@ -54,15 +54,15 @@
...
@@ -54,15 +54,15 @@
<
script
>
<
script
>
import
{
import
{
getTeachingBonusDetailList
,
//明细详情
getTeachingBonusDetailList
,
//明细详情
}
from
'../../api/course/class'
}
from
'../../api/course/class'
import
{
import
{
getTeacherDropDownList
,
getTeacherDropDownList
,
}
from
'../../api/school/index'
;
}
from
'../../api/school/index'
;
export
default
{
export
default
{
name
:
"rewardDetailed"
,
name
:
"rewardDetailed"
,
data
(){
data
()
{
return
{
return
{
columns
:
[{
columns
:
[{
name
:
'Date'
,
name
:
'Date'
,
label
:
'日期'
,
label
:
'日期'
,
...
@@ -115,8 +115,7 @@
...
@@ -115,8 +115,7 @@
},
},
],
],
columnsZ
:[
columnsZ
:
[{
{
name
:
'TeacherName'
,
name
:
'TeacherName'
,
label
:
'教师姓名'
,
label
:
'教师姓名'
,
field
:
'TeacherName'
,
field
:
'TeacherName'
,
...
@@ -153,29 +152,39 @@
...
@@ -153,29 +152,39 @@
data
:
[],
data
:
[],
loading
:
true
,
loading
:
true
,
msg
:
{
msg
:
{
rowsPerPage
:
999
,
rowsPerPage
:
999
,
BonusId
:
0
,
BonusId
:
0
,
TeacherId
:
0
,
TeacherId
:
0
,
Type
:
0
Type
:
0
},
},
TeacherList
:
[],
//关联教师下拉数据
TeacherList
:
[],
//关联教师下拉数据
TypeList
:[
TypeList
:
[{
{
Id
:
0
,
Name
:
'不限'
},
Id
:
0
,
{
Id
:
1
,
Name
:
'带班'
},
Name
:
'不限'
{
Id
:
2
,
Name
:
'代课'
},
},
{
Id
:
1
,
Name
:
'带班'
},
{
Id
:
2
,
Name
:
'代课'
},
]
]
}
}
},
},
created
()
{
created
()
{
if
(
this
.
$route
.
query
)
{
if
(
this
.
$route
.
query
)
{
this
.
msg
.
BonusId
=
this
.
$route
.
query
.
Id
;
this
.
msg
.
BonusId
=
this
.
$route
.
query
.
Id
;
this
.
msg
.
TeacherId
=
Number
(
this
.
$route
.
query
.
TeacherId
);
this
.
msg
.
TeacherId
=
Number
(
this
.
$route
.
query
.
TeacherId
);
}
}
this
.
getList
();
this
.
getList
();
this
.
GetTeacherList
()
this
.
GetTeacherList
()
},
},
methods
:{
methods
:
{
Export
()
{
this
.
GetEduDownLoad
(
"/TeachingRewards/GetTeachingBonusDetailToExcel"
,
this
.
msg
,
"课时奖励.xls"
);
},
//获取教师下拉
//获取教师下拉
GetTeacherList
()
{
GetTeacherList
()
{
getTeacherDropDownList
({}).
then
(
res
=>
{
getTeacherDropDownList
({}).
then
(
res
=>
{
...
@@ -185,11 +194,10 @@
...
@@ -185,11 +194,10 @@
TId
:
0
,
TId
:
0
,
TeacherName
:
"不限"
TeacherName
:
"不限"
})
})
}
}
})
})
},
},
getList
(){
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
getTeachingBonusDetailList
(
this
.
msg
).
then
(
res
=>
{
getTeachingBonusDetailList
(
this
.
msg
).
then
(
res
=>
{
this
.
loading
=
false
this
.
loading
=
false
...
@@ -198,11 +206,12 @@
...
@@ -198,11 +206,12 @@
this
.
loading
=
false
this
.
loading
=
false
})
})
},
},
goreturn
(){
goreturn
()
{
this
.
$router
.
go
(
-
1
)
this
.
$router
.
go
(
-
1
)
},
},
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
src/utils/erpindex.js
View file @
432e927d
...
@@ -2,12 +2,12 @@ import md5 from 'js-md5'
...
@@ -2,12 +2,12 @@ import md5 from 'js-md5'
import
co
from
'co'
import
co
from
'co'
import
MsgBus
from
'../utils/msgBus'
import
MsgBus
from
'../utils/msgBus'
export
default
{
export
default
{
data
:{
data
:
{
loginUser
:
{},
loginUser
:
{},
apiurl
:
''
apiurl
:
''
},
},
install
(
Vue
,
options
){
install
(
Vue
,
options
)
{
Vue
.
prototype
.
MsgBus
=
MsgBus
;
Vue
.
prototype
.
MsgBus
=
MsgBus
;
//消息成功提示
//消息成功提示
Vue
.
prototype
.
Success
=
function
(
msg
)
{
Vue
.
prototype
.
Success
=
function
(
msg
)
{
...
@@ -132,13 +132,13 @@ export default{
...
@@ -132,13 +132,13 @@ export default{
};
};
return
obj
;
return
obj
;
},
},
//下载文件
//ERP系统文件下载
Vue
.
prototype
.
GetLocalFile
=
function
(
cmd
,
msg
,
fileName
,
successCall
)
{
Vue
.
prototype
.
GetLocalFile
=
function
(
cmd
,
msg
,
fileName
,
successCall
)
{
var
apiurl
=
this
.
domainManager
().
LocalFileStreamDownLoadUrl
;
var
apiurl
=
this
.
domainManager
().
LocalFileStreamDownLoadUrl
;
var
timestamp
=
(
new
Date
()).
valueOf
();
var
timestamp
=
(
new
Date
()).
valueOf
();
var
token
=
""
;
var
token
=
""
;
var
key
=
""
;
var
key
=
""
;
var
tokenData
=
{};
var
tokenData
=
{};
var
localStorage
=
window
.
localStorage
[
"loginUserInfo"
];
var
localStorage
=
window
.
localStorage
[
"loginUserInfo"
];
if
(
localStorage
!==
undefined
&&
localStorage
!=
'undefined'
)
{
if
(
localStorage
!==
undefined
&&
localStorage
!=
'undefined'
)
{
tokenData
=
JSON
.
parse
(
localStorage
);
tokenData
=
JSON
.
parse
(
localStorage
);
...
@@ -152,8 +152,8 @@ export default{
...
@@ -152,8 +152,8 @@ export default{
"timestamp"
:
timestamp
,
"timestamp"
:
timestamp
,
"token"
:
token
,
"token"
:
token
,
"sign"
:
md5Str
,
"sign"
:
md5Str
,
"groupId"
:
tokenData
.
data
.
Group_Id
,
"groupId"
:
tokenData
.
data
.
Group_Id
,
"requestFrom"
:
6
"requestFrom"
:
6
}
}
this
.
$http
.
post
(
apiurl
,
postData
,
{
this
.
$http
.
post
(
apiurl
,
postData
,
{
responseType
:
'arraybuffer'
responseType
:
'arraybuffer'
...
@@ -177,7 +177,7 @@ export default{
...
@@ -177,7 +177,7 @@ export default{
}
}
var
token
=
""
;
var
token
=
""
;
var
key
=
""
;
var
key
=
""
;
var
tokenData
=
{};
var
tokenData
=
{};
var
localStorage
=
window
.
localStorage
[
"loginUserInfo"
];
var
localStorage
=
window
.
localStorage
[
"loginUserInfo"
];
if
(
localStorage
!==
undefined
&&
localStorage
!=
'undefined'
)
{
if
(
localStorage
!==
undefined
&&
localStorage
!=
'undefined'
)
{
tokenData
=
JSON
.
parse
(
localStorage
);
tokenData
=
JSON
.
parse
(
localStorage
);
...
@@ -203,12 +203,12 @@ export default{
...
@@ -203,12 +203,12 @@ export default{
"timestamp"
:
timestamp
,
"timestamp"
:
timestamp
,
"token"
:
token
,
"token"
:
token
,
"sign"
:
md5Str
,
"sign"
:
md5Str
,
"branchId"
:
branchId
,
//公司id
"branchId"
:
branchId
,
//公司id
"departmentId"
:
departmentId
,
//部门id
"departmentId"
:
departmentId
,
//部门id
"groupName"
:
groupName
,
//集团名称
"groupName"
:
groupName
,
//集团名称
"branchName"
:
branchName
,
//公司名称
"branchName"
:
branchName
,
//公司名称
"departmentName"
:
departmentName
,
//部门名称
"departmentName"
:
departmentName
,
//部门名称
"uName"
:
uName
//用户名称
"uName"
:
uName
//用户名称
}
}
this
.
$http
.
post
(
apiurl
,
postData
,
{
this
.
$http
.
post
(
apiurl
,
postData
,
{
headers
:
{
headers
:
{
...
@@ -228,8 +228,8 @@ export default{
...
@@ -228,8 +228,8 @@ export default{
}
}
},
faildCall
)
},
faildCall
)
},
},
Vue
.
prototype
.
uploadFile
=
function
(
path
,
files
,
successCall
)
{
Vue
.
prototype
.
uploadFile
=
function
(
path
,
files
,
successCall
)
{
if
(
files
&&
files
.
length
>
0
)
{
if
(
files
&&
files
.
length
>
0
)
{
let
nameList
=
new
Array
()
let
nameList
=
new
Array
()
for
(
let
index
=
0
;
index
<
files
.
length
;
index
++
)
{
for
(
let
index
=
0
;
index
<
files
.
length
;
index
++
)
{
...
@@ -285,6 +285,7 @@ export default{
...
@@ -285,6 +285,7 @@ export default{
}
}
item
[
filed
]
=
value
;
item
[
filed
]
=
value
;
},
},
//验证只能输入2位小数【负数:isMinus传true】
//验证只能输入2位小数【负数:isMinus传true】
Vue
.
prototype
.
checkPrice
=
function
(
item
,
filed
,
isMinus
)
{
Vue
.
prototype
.
checkPrice
=
function
(
item
,
filed
,
isMinus
)
{
var
value
=
""
+
item
[
filed
];
//转字符串
var
value
=
""
+
item
[
filed
];
//转字符串
...
@@ -392,5 +393,26 @@ export default{
...
@@ -392,5 +393,26 @@ export default{
window
.
open
(
url
);
window
.
open
(
url
);
}
}
//教育文件下载
Vue
.
prototype
.
GetEduDownLoad
=
function
(
cmd
,
msg
,
fileName
,
successCall
)
{
var
apiurl
=
process
.
env
.
API
+
cmd
;
var
postData
=
{
Msg
:
msg
};
this
.
$http
.
post
(
apiurl
,
postData
,
{
responseType
:
'arraybuffer'
}).
then
((
res
)
=>
{
let
blob
=
new
Blob
([
res
.
data
],
{
type
:
"application/vnd.ms-excel"
})
let
url
=
URL
.
createObjectURL
(
blob
);
let
link
=
document
.
createElement
(
'a'
);
link
.
href
=
url
;
link
.
setAttribute
(
"download"
,
fileName
);
document
.
body
.
appendChild
(
link
);
link
.
click
();
successCall
(
res
);
}).
catch
(
function
(
res
)
{});
}
}
}
}
}
src/utils/index.js
View file @
432e927d
...
@@ -476,45 +476,3 @@ export function getLocalStorage(){
...
@@ -476,45 +476,3 @@ export function getLocalStorage(){
return
null
;
return
null
;
}
}
}
}
export
function
apipost
(
cmd
,
msg
,
successCall
,
faildCall
,
isOnline
){
var
timestamp
=
(
new
Date
()).
valueOf
();
var
encodeMsg
=
encodeURIComponent
(
JSON
.
stringify
(
msg
)).
toLowerCase
();
var
token
=
""
;
var
key
=
""
;
if
(
this
.
getLocalStorage
()
!=
null
)
{
token
=
this
.
getLocalStorage
().
Token
;
key
=
this
.
getLocalStorage
().
SecretKey
;
}
var
md5Str
=
md5
(
`cmd=
${
cmd
}
&msg=
${
encodeMsg
}
×tamp=
${
timestamp
}
&token=
${
token
}
&key=
${
key
}
`
);
var
postData
=
{
"msg"
:
msg
,
"cmd"
:
cmd
,
"timestamp"
:
timestamp
,
"token"
:
token
,
"sign"
:
md5Str
,
"languageId"
:
tempLanguage
}
// return reuest({
// method:'post',
// })
this
.
$http
.
post
(
apiurl
,
postData
,
{
headers
:
{
'Content-Type'
:
'application/json'
,
'Referer-Viitto'
:
this
.
$route
.
path
}
})
.
then
(
res
=>
{
if
(
res
.
data
.
resultCode
==
10000
||
res
.
data
.
resultCode
==
10001
)
{
}
else
if
(
res
.
resultCode
==
10005
)
{
}
else
{
successCall
(
res
);
}
},
faildCall
)
}
\ No newline at end of file
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