Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gdtel-gztel-school-center-ui
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
吴学德
gdtel-gztel-school-center-ui
Commits
c4c9a22c
Commit
c4c9a22c
authored
May 28, 2020
by
董有沛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
冲突修改
parent
cda52d02
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
700 additions
and
0 deletions
+700
-0
src/views/school-center/salesOrders/salesOrder.vue
+425
-0
src/views/school-center/schoolOther/schoolAllocation.vue
+275
-0
No files found.
src/views/school-center/salesOrders/salesOrder.vue
0 → 100644
View file @
c4c9a22c
<
template
>
<div
class=
"flex-container"
>
<!-- 查询区域 -->
<div
class=
"table-page-search-wrapper"
>
<!-- 搜索区域 -->
<a-form
layout=
"inline"
>
<a-row
:gutter=
"24"
>
<a-col
:md=
"4"
:sm=
"4"
>
<a-form-item
label=
"放号人"
>
<a-input
placeholder=
""
v-model=
"queryParam.name"
></a-input>
</a-form-item>
</a-col>
<a-col
:md=
"4"
:sm=
"10"
>
<a-form-item
label=
"放号账号"
>
<a-input
placeholder=
""
v-model=
"queryParam.account"
></a-input>
</a-form-item>
</a-col>
<a-col
:md=
"4"
:sm=
"2"
>
<a-form-item
label=
"县分"
>
<a-select
v-model=
"queryParam.salesSubst"
@
change=
"getSchoolNames"
>
<a-select-option
key=
""
>
--全部--
</a-select-option>
<a-select-option
v-for=
"d in subNames"
:key=
"d.value"
:value=
"d.value"
>
{{
d
.
text
}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
:md=
"6"
:sm=
"12"
>
<a-form-item
label=
"学校"
>
<a-select
v-model=
"queryParam.salesSchool"
style=
"width: 15rem;"
>
<a-select-option
key=
""
>
--全部--
</a-select-option>
<a-select-option
v-for=
"d in schoolNames"
:key=
"d.value"
:value=
"d.value"
>
{{
d
.
text
}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
:md=
"4"
:sm=
"8"
>
<a-form-item
:labelCol=
"
{span: 5}" :wrapperCol="{span: 18, offset: 1}" label="职位">
<a-select
placeholder=
"--全部--"
v-model=
"queryParam.position"
>
<a-select-option
key=
""
>
--全部--
</a-select-option>
<a-select-option
key=
"总经理"
>
总经理
</a-select-option>
<a-select-option
key=
"楼长"
>
楼长
</a-select-option>
<a-select-option
key=
"成员"
>
成员
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
:md=
"4"
:sm=
"12"
>
<a-form-item
label=
"上级领导"
>
<a-input
placeholder=
""
v-model=
"queryParam.leader"
></a-input>
</a-form-item>
</a-col>
<a-col
:md=
"4"
:sm=
"12"
>
<a-form-item
label=
"上级总经理"
>
<a-input
placeholder=
""
v-model=
"queryParam.president"
></a-input>
</a-form-item>
</a-col>
<a-col
:md=
"6"
:sm=
"12"
>
<a-form-item
label=
"激活时间"
>
<a-range-picker
:placeholder=
"['开始月份', '结束月份']"
format=
"YYYYMM"
:value=
"queryParam.activateTime"
:mode=
"tempMode"
@
panelChange=
"handlePanelChange"
@
change=
"handleChange"
style=
"width: 16rem;"
/>
</a-form-item>
</a-col>
<span
class=
"table-page-search-submitButtons"
style=
"float: left; overflow: hidden;"
>
<a-col
:md=
"6"
:sm=
"24"
>
<a-button
@
click=
"search()"
type=
"primary"
>
查询
</a-button>
<a-divider
type=
"vertical"
/>
<a-button
@
click=
"exportList()"
type=
"primary"
>
导出所有数据
</a-button>
<a-dropdown
>
<a-button
v-show=
"false"
style=
"margin-left: 8px"
>
导入
<a-icon
type=
"down"
/>
<a-menu
slot=
"overlay"
@
click=
"handleMenuClick"
>
<a-menu-item
key=
"1"
>
<a-icon
type=
"arrow-up"
/>
放号上传
</a-menu-item>
<a-menu-item
key=
"2"
>
<a-icon
type=
"arrow-up"
/>
充值审核
</a-menu-item>
<a-menu-item
key=
"3"
>
<a-icon
type=
"arrow-up"
/>
累计充值导入
</a-menu-item>
</a-menu>
</a-button>
</a-dropdown>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!--列表-->
<s-table
:locale=
"emptyText"
:columns=
"columns"
:data=
"rowdata"
bordered
ref=
"table"
size=
"small"
class=
"flex-filling"
>
<!--拦截器-->
<template
slot=
"createTime"
slot-scope=
"text"
>
{{
text
|
dayjs
}}
</
template
>
<!--拦截器-->
<
template
slot=
"activateTime"
slot-scope=
"text"
>
{{
text
|
dayjs
}}
</
template
>
<
template
slot=
"operation"
slot-scope=
"text,record"
>
<!--
<a
@
click=
"modifyfunction(record)"
>
编辑
</a>
-->
<a-divider
type=
"vertical"
/>
<a-popconfirm
title=
"是否要删除此行?"
@
confirm=
"deleteOrder(record.id)"
>
<a>
删除
</a>
</a-popconfirm>
<a-divider
type=
"vertical"
/>
</
template
>
</s-table>
<a-modal
title=
"批量导入"
:visible=
"modifyvisible"
@
ok=
"createfunctionOk"
@
cancel=
"createfunctionCancel"
html-type=
"submit"
width=
"400px"
>
<a-row
:gutter=
"24"
>
<a-col
:md=
"24"
:sm=
"12"
>
<p
style=
"text-align:center"
>
{{ importTile }}
</p>
</a-col>
</a-row>
<import-btn
:url=
"importUrl"
:responseFun=
"doPush"
>
<a-tooltip
placement=
"topLeft"
title=
"导入文件"
arrowPointAtCenter
>
<a-row
:gutter=
"24"
>
<a-col
:md=
"24"
:sm=
"12"
>
<p>
选择文件:
<a-button
type=
"primary"
>
选择文件
</a-button>
</p>
</a-col>
</a-row>
</a-tooltip>
</import-btn>
<a-row
:gutter=
"24"
>
<a-col
:md=
"24"
:sm=
"12"
>
<p
v-show=
"FHTemplate"
>
模板下载:
<a-button
type=
"primary"
@
click=
"downloadTemplateFH"
>
放号上传模板
</a-button>
</p>
<p
v-show=
"CZTemplate"
>
模板下载:
<a-button
type=
"primary"
@
click=
"downloadTemplateCZ"
>
充值审核模板
</a-button>
</p>
<!-- <p v-show="LJTemplate">-->
<!-- 模板下载:-->
<!-- <a-button type="primary" @click="downloadTemplateLJ">累计审核模板</a-button>-->
<!-- </p>-->
</a-col>
</a-row>
</a-modal>
</div>
</template>
<
script
>
import
STable
from
'@/components/table'
;
import
{}
from
"@/api/school-center/salesOrder"
;
import
{
getSchoolNames
,
initSubstName
,
getList
,
deleteOrder
,
downloadTemplateFH
,
downloadTemplateCZ
,
downloadResult
,
exportOut
}
from
"../../../api/school-center/salesOrderAPI"
;
import
{
cloneObject
,
exportFile
}
from
'@/utils/util'
;
import
ImportBtn
from
"../../../components/sysmanage/ImportBtn"
;
import
Vue
from
'vue'
;
import
moment
from
"moment"
;
import
{
DatetimePicker
}
from
'vant'
;
Vue
.
use
(
DatetimePicker
);
export
default
{
name
:
"salesOrder"
,
components
:
{
STable
,
ImportBtn
},
data
:
function
()
{
return
{
emptyText
:
{
emptyText
:
'暂无数据'
},
previewVisible
:
false
,
previewImage
:
''
,
fileList
:
[
],
apis
:
''
,
fileid
:{},
brackgroundurl
:
"manager/ciop/school/schoolManagement/qrcodeUpload"
,
// form
Formtable
:
this
.
$form
.
createForm
(
this
,
{
name
:
'Formtable'
}),
FHTemplate
:
false
,
CZTemplate
:
false
,
importUrl
:
""
,
importTile
:
""
,
modifyvisible
:
false
,
modifyForm
:
{
id
:
''
,
title
:
''
,
desc
:
''
,
integral
:
''
,
activityType
:
''
,
subclass
:
''
,
imageUrl
:
''
,
range
:
''
,
sort
:
''
,
},
packageName
:[],
chosePages
:[],
products
:[],
//输入框列表
queryParam
:
{
name
:
''
,
account
:
''
,
salesSubst
:
''
,
salesSchool
:
''
,
activateTime
:
''
,
president
:
''
,
position
:
''
,
leader
:
''
,
},
tempMode
:[
'month'
,
'month'
],
schoolNames
:
[],
subNames
:
[],
columns
:
[
{
dataIndex
:
'orderPhone'
,
width
:
25
,
title
:
'放号号码'
,
align
:
"center"
},
{
dataIndex
:
'salesSchool'
,
width
:
30
,
title
:
'放号学校'
,
align
:
"center"
},
{
dataIndex
:
'salesSubst'
,
width
:
15
,
title
:
'放号县分'
,
align
:
"center"
},
{
dataIndex
:
'name'
,
width
:
25
,
title
:
'放号人'
,
align
:
"center"
},
{
dataIndex
:
'account'
,
width
:
30
,
title
:
'放号人账号'
,
align
:
"center"
},
{
dataIndex
:
'position'
,
width
:
30
,
title
:
'职位'
,
align
:
"center"
},
{
dataIndex
:
'leader'
,
width
:
30
,
title
:
'上级领导'
,
align
:
"center"
},
{
dataIndex
:
'president'
,
width
:
30
,
title
:
'总经理'
,
align
:
"center"
},
{
dataIndex
:
'createTime'
,
width
:
30
,
title
:
'上传时间'
,
align
:
"center"
,
scopedSlots
:
{
customRender
:
"createTime"
}},
{
dataIndex
:
'activateTime'
,
width
:
30
,
title
:
'激活时间'
,
align
:
"center"
,
scopedSlots
:
{
customRender
:
"activateTime"
}},
/*{
dataIndex: 'operation',
width: 200,
title: '操作',
align: "center",
scopedSlots: {customRender: 'operation'},
fixed: "right"
}*/
]
,
rowdata
:
parameter
=>
{
/*const env = process.env.NODE_ENV; //获取当前环境
if(env === 'development'){ //测试环境默认添加前缀
this.apis = '/api/';
}*/
let
params
=
{
pageNo
:
parameter
.
pageNo
,
pageSize
:
parameter
.
pageSize
}
//表示
let
obj
=
cloneObject
(
this
.
queryParam
)
return
getList
(
Object
.
assign
(
params
,
obj
)).
then
(
res
=>
{
let
data
=
{}
if
(
res
.
state
!==
'success'
)
{
this
.
$message
.
error
(
"查询失败!"
,
5
);
this
.
emptyText
.
emptyText
=
'查询失败!'
data
=
{
data
:
[],
pageSize
:
parameter
.
pageSize
,
pageNo
:
1
,
totalCount
:
0
}
}
else
{
data
=
{
data
:
res
.
data
.
records
,
pageSize
:
parameter
.
pageSize
,
pageNo
:
parameter
.
pageNo
,
totalCount
:
res
.
data
.
total
}
}
return
data
})
}
}
},
methods
:{
moment
,
handlePanelChange
(
value
,
mode
)
{
this
.
queryParam
.
activateTime
=
value
;
this
.
tempMode
=
[
mode
[
0
]
===
'date'
?
'month'
:
mode
[
0
],
mode
[
1
]
===
'date'
?
'month'
:
mode
[
1
]];
//console.log("this.tempMode=================="+this.tempMode);
},
handleChange
(
value
)
{
this
.
queryParam
.
activateTime
=
[]
console
.
log
(
value
)
},
search
()
{
this
.
$refs
.
table
.
refresh
({
search
:
true
})
},
handleMenuClick
(
e
)
{
if
(
e
.
key
==
"1"
)
{
this
.
handleSubmit1
();
}
if
(
e
.
key
==
"2"
)
{
this
.
handleSubmit2
();
}
},
handleSubmit1
()
{
this
.
importTile
=
"放号上传"
;
this
.
FHTemplate
=
true
;
this
.
importUrl
=
"manager/ciop/salesOrders/importOrder"
;
this
.
modifyvisible
=
true
;
},
handleSubmit2
()
{
this
.
importTile
=
"充值审核"
;
this
.
CZTemplate
=
true
;
this
.
importUrl
=
"manager/ciop/salesOrders/importRechargeData"
;
this
.
modifyvisible
=
true
;
},
downloadTemplateFH
:
function
()
{
exportFile
(
downloadTemplateFH
(),
"放号上传清单.xlsx"
);
},
downloadTemplateCZ
:
function
()
{
exportFile
(
downloadTemplateCZ
(),
"充值审核清单.xlsx"
);
},
// downloadTemplateLJ: function() {
// exportFile(downloadMoBanKD(), "累计充值审核清单.xlsx");
// },
createfunctionOk
()
{
this
.
modifyvisible
=
false
;
this
.
clearmodel
();
},
createfunctionCancel
()
{
this
.
modifyvisible
=
false
;
this
.
clearmodel
();
},
clearmodel
()
{
this
.
importTile
=
""
;
this
.
FHTemplate
=
false
;
this
.
CZTemplate
=
false
;
this
.
importUrl
=
""
;
},
// 执行上传
doPush
(
res
)
{
console
.
log
(
res
);
if
(
!
res
||
!
res
.
response
)
{
this
.
$message
.
error
(
"上传文件出错!"
,
10
);
return
false
;
}
const
response
=
res
.
response
;
if
(
response
.
state
!==
"success"
)
{
this
.
$message
.
error
(
response
.
msg
?
response
.
msg
:
"上传文件出错!"
,
5
);
return
false
;
}
this
.
$message
.
success
(
"上传成功!"
+
response
.
data
,
5
);
if
(
response
.
data
.
indexOf
(
"返回导入结果清单"
)
>
-
1
){
exportFile
(
downloadResult
(),
"导入结果清单.xlsx"
);
}
this
.
createfunctionCancel
();
this
.
search
();
},
deleteOrder
(
id
){
let
params
=
{};
params
.
id
=
id
;
deleteOrder
(
params
).
then
(
res
=>
{
if
(
res
.
state
==
"success"
){
this
.
$message
.
success
(
res
.
data
?
res
.
data
:
'删除成功'
,
5
)
this
.
search
();
return
null
;
}
this
.
$message
.
success
(
res
.
data
?
res
.
data
:
'删除失败'
,
5
);
})
},
exportList
(){
let
obj
=
cloneObject
(
this
.
queryParam
)
let
nowdate
=
moment
().
format
(
"YYYY-MM-DD"
);
//导出
exportFile
(
exportOut
(
Object
.
assign
(
obj
)),
"放号充值达标清单"
+
nowdate
+
".xlsx"
,
);
},
getSchoolNames
()
{
this
.
queryParam
.
schoolName
=
''
getSchoolNames
({
"substName"
:
this
.
queryParam
.
salesSubst
}).
then
((
res
)
=>
{
if
(
res
.
state
==
"success"
)
{
const
result
=
res
.
data
result
.
forEach
((
r
)
=>
{
if
(
r
.
schoolName
===
'null'
)
return
;
this
.
schoolNames
.
push
({
value
:
r
.
schoolName
,
text
:
r
.
schoolName
})
})
}
})
},
initSubstName
()
{
initSubstName
().
then
((
res
)
=>
{
if
(
res
.
state
==
"success"
)
{
const
result
=
res
.
data
result
.
forEach
((
r
)
=>
{
if
(
r
.
subName
===
'null'
)
return
;
this
.
subNames
.
push
({
value
:
r
.
subName
,
text
:
r
.
subName
})
})
}
})
}
},
mounted
()
{
this
.
initSubstName
();
this
.
getSchoolNames
();
}
}
</
script
>
<
style
scoped
>
</
style
>
src/views/school-center/schoolOther/schoolAllocation.vue
0 → 100644
View file @
c4c9a22c
<
template
>
<div
class=
"flex-container"
>
<!-- 查询区域 -->
<div
class=
"table-page-search-wrapper"
>
<!-- 搜索区域 -->
<a-form
layout=
"inline"
>
<a-row
:gutter=
"24"
>
<a-col
:md=
"4"
:sm=
"12"
>
<a-form-item
label=
"姓名"
>
<a-input
placeholder=
"姓名"
v-model=
"queryParam.name"
></a-input>
</a-form-item>
</a-col>
<a-col
:md=
"4"
:sm=
"12"
>
<a-form-item
label=
"姓名1"
>
<a-input
placeholder=
"姓名1"
v-model=
"nam1"
></a-input>
</a-form-item>
</a-col>
<a-col
:md=
"4"
:sm=
"12"
>
<a-form-item
label=
"县分"
>
<a-input
placeholder=
"县分"
v-model=
"queryParam.substName"
></a-input>
</a-form-item>
</a-col>
<a-col
:md=
"4"
:sm=
"12"
>
<a-form-item
label=
"学校"
>
<a-input
placeholder=
"学校"
v-model=
"queryParam.schoolName"
></a-input>
</a-form-item>
</a-col>
<span
class=
"table-page-search-submitButtons"
style=
"float: left; overflow: hidden;"
>
<a-col
:md=
"6"
:sm=
"24"
>
<a-button
@
click=
"search()"
type=
"primary"
>
查询1
</a-button>
<a-button
@
click=
"openAllocation()"
style=
"margin-left: 8px"
icon=
"plus"
type=
"primary"
>
新增
</a-button>
</a-col>
</span>
</a-row>
</a-form>
<!--列表-->
<s-table
:columns=
"columns"
:data=
"rowdata"
bordered
ref=
"table"
size=
"small"
class=
"flex-filling"
:locale=
"emptyText"
>
<template
slot=
"operation"
slot-scope=
"text, record"
>
<a-divider
type=
"vertical"
/>
<a-popconfirm
title=
"是否要删除此行?"
@
confirm=
"deleteAllocation(record.id)"
>
<a>
删除
</a>
</a-popconfirm>
<a-divider
type=
"vertical"
/>
</
template
>
</s-table>
<!--编辑----弹框-->
<a-modal
:title=
"titleName"
:visible=
"modifyvisible"
@
ok=
"createfunctionOk"
@
cancel=
"createfunctionCancel"
html-type=
"submit"
width=
"720px"
>
<a-form
:form=
"Formtable"
>
<a-form-item
:labelCol=
"{span: 6}"
:wrapperCol=
"{span: 8, offset: 1}"
label=
"账号"
>
<a-input
placeholder=
"账号"
v-decorator=
"[ 'account', {rules: [{ required: true, message: '账号不能为空!' ,whitespace:true}]} ]"
></a-input>
</a-form-item>
<a-form-item
:labelCol=
"{span: 6}"
:wrapperCol=
"{span: 8, offset: 1}"
label=
"县分"
>
<a-select
placeholder=
"请选择"
@
change=
"changeSubst()"
v-model=
"modifyForm.subName"
>
<a-select-option
key=
""
>
请选择
</a-select-option>
<a-select-option
v-for=
"data in subNameList"
:value=
"data"
>
{{ data}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
:labelCol=
"{span: 6}"
:wrapperCol=
"{span: 8, offset: 1}"
label=
"学校名称"
>
<a-select
placeholder=
"请选择"
v-model=
"modifyForm.schoolId"
>
<a-select-option
key=
""
>
请选择
</a-select-option>
<a-select-option
v-for=
"data in schoolList"
:value=
"data.id"
>
{{ data.school_name}}
</a-select-option>
</a-select>
</a-form-item>
</a-form>
</a-modal>
</div>
</div>
</template>
<
script
>
import
STable
from
'@/components/table'
;
import
{
getList
,
addAllocation
,
deleteAllocation
,
getSubstList
,
getSchoolList
}
from
"@/api/school-center/schoolAllocationAPI"
import
{
cloneObject
}
from
'@/utils/util'
import
treecheck
from
'@/components/sysmanage/treeCheck'
import
treeList
from
'@/components/sysmanage/treeList'
export
default
{
name
:
"schoolAllocation"
,
components
:
{
STable
,
treeList
,
treecheck
,
},
data
:
function
()
{
return
{
emptyText
:
{
emptyText
:
'暂无数据'
},
Formtable
:
this
.
$form
.
createForm
(
this
,
{
name
:
'Formtable'
}),
queryParam
:
{
account
:
''
,
name
:
''
,
substName
:
''
,
schoolName
:
''
},
titleName
:
''
,
modifyvisible
:
false
,
modifyForm
:
{
id
:
''
,
account
:
''
,
schoolId
:
''
,
},
autoCompleteResult
:[],
subNameList
:
[],
schoolList
:[],
addSubName
:
''
,
columns
:
[
{
dataIndex
:
'name'
,
width
:
100
,
title
:
'姓名 '
,
align
:
"center"
},
{
dataIndex
:
'account'
,
width
:
100
,
title
:
'账号'
,
align
:
"center"
},
{
dataIndex
:
'substName'
,
width
:
100
,
title
:
'管辖学校所属县分 '
,
align
:
"center"
},
{
dataIndex
:
'schoolName'
,
width
:
200
,
title
:
'管辖学校 '
,
align
:
"center"
},
{
dataIndex
:
'operation'
,
width
:
100
,
title
:
'操作'
,
align
:
"center"
,
scopedSlots
:
{
customRender
:
'operation'
},
fixed
:
"right"
}]
,
rowdata
:
parameter
=>
{
let
params
=
{
pageNo
:
parameter
.
pageNo
,
pageSize
:
parameter
.
pageSize
}
//表示
let
obj
=
cloneObject
(
this
.
queryParam
)
this
.
subNameList
=
[];
// 获取县分下拉清单
getSubstList
(
Object
.
assign
(
params
,
obj
)).
then
(
res
=>
{
if
(
res
.
state
==
'success'
)
{
res
.
data
.
forEach
((
key
)
=>
{
this
.
subNameList
.
push
(
key
.
sub_name
)
})
}
})
return
getList
(
Object
.
assign
(
params
,
obj
)).
then
(
res
=>
{
let
data
=
{}
if
(
res
.
state
!==
'success'
)
{
this
.
$message
.
error
(
"查询失败!"
,
5
);
this
.
emptyText
.
emptyText
=
'查询失败!'
data
=
{
data
:
[],
pageSize
:
parameter
.
pageSize
,
pageNo
:
1
,
totalCount
:
0
}
}
else
{
data
=
{
data
:
res
.
data
.
records
,
pageSize
:
parameter
.
pageSize
,
pageNo
:
parameter
.
pageNo
,
totalCount
:
res
.
data
.
total
}
}
return
data
})
},
keyRecord
:
''
,
recordId
:
''
,
addUser
:
false
,
}
},
methods
:{
onLoad
(){
let
params
=
[];
params
.
substName
=
""
;
// 获取县分下拉清单
getSubstList
(
params
).
then
(
res
=>
{
if
(
res
.
state
==
'success'
)
{
res
.
data
.
forEach
((
key
)
=>
{
this
.
subNameList
.
push
(
key
.
sub_name
)
})
}
})
},
search
()
{
this
.
$refs
.
table
.
refresh
({
search
:
true
})
},
openAllocation
()
{
this
.
titleName
=
"添加学校2323分配"
;
this
.
modifyvisible
=
true
;
},
//提交表单
createfunctionOk
(){
this
.
Formtable
.
validateFields
([
"account"
],
{
force
:
true
},
(
err
,
values
)
=>
{
if
(
!
err
){
this
.
modifyForm
.
account
=
values
.
account
addAllocation
(
this
.
modifyForm
).
then
(
res
=>
{
if
(
res
.
state
==
"success"
)
{
this
.
$message
.
success
(
res
.
data
?
res
.
data
:
'添加成功!'
,
5
);
this
.
search
();
this
.
modifyvisible
=
false
;
return
null
;
}
this
.
$message
.
error
(
res
.
data
?
res
.
data
:
'添加失败!'
,
5
);
})
}
})
},
createfunctionCancel
(){
this
.
modifyvisible
=
false
this
.
autoCompleteResult
=
[]
this
.
Formtable
.
setFieldsValue
({
account
:
''
})
this
.
addForm
.
subName
=
''
;
},
deleteAllocation
(
id
){
let
params
=
{};
params
.
id
=
id
;
deleteAllocation
(
params
).
then
(
res
=>
{
if
(
res
.
state
==
"success"
)
{
this
.
$message
.
success
(
res
.
data
?
res
.
data
:
'删除成功!'
,
5
);
this
.
search
();
this
.
modifyvisible
=
false
;
return
null
;
}
this
.
$message
.
error
(
res
.
data
?
res
.
data
:
'删除失败!'
,
5
);
})
},
changeSubst
(){
let
schoolParams
=
{};
schoolParams
.
substName
=
this
.
modifyForm
.
subName
;
this
.
schoolList
=
[];
getSchoolList
(
schoolParams
).
then
(
res
=>
{
if
(
res
.
state
==
'success'
)
{
res
.
data
.
forEach
((
key
)
=>
{
this
.
schoolList
.
push
(
key
)
})
}
})
},
changeSchool
(
schoolId
){
let
schoolParams
=
{};
schoolParams
.
substName
=
this
.
modifyForm
.
subName
;
this
.
schoolList
=
[];
getSchoolList
(
schoolParams
).
then
(
res
=>
{
if
(
res
.
state
==
'success'
)
{
res
.
data
.
forEach
((
key
)
=>
{
this
.
schoolList
.
push
(
key
)
})
this
.
modifyForm
.
schoolId
=
schoolId
;
}
})
},
}
}
</
script
>
<
style
scoped
>
</
style
>
\ 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