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
3db124bc
Commit
3db124bc
authored
Feb 20, 2020
by
吴学德
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
套餐管理
parent
fa4e80b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
20 deletions
+32
-20
src/views/school-center/product/product.vue
+32
-20
No files found.
src/views/school-center/product/product.vue
View file @
3db124bc
...
@@ -15,11 +15,10 @@
...
@@ -15,11 +15,10 @@
<a-input
placeholder=
"学校名称"
v-model=
"queryParam.productUniversity"
></a-input>
<a-input
placeholder=
"学校名称"
v-model=
"queryParam.productUniversity"
></a-input>
</a-form-item>
</a-form-item>
</a-col>
</a-col>
<a-col
:md=
"3"
:sm=
"12"
>
<a-col
:md=
"12"
:sm=
"12"
>
<a-button
@
click=
"search()"
type=
"primary"
>
查询
</a-button>
<a-button
@
click=
"search()"
type=
"primary"
>
查询
</a-button>
</a-col>
<a-divider
type=
"vertical"
/>
<a-col
:md=
"3"
:sm=
"12"
>
<a-button
@
click=
"modifyfunction()"
type=
"primary"
>
添加
</a-button>
<a-button
@
click=
"modifyfunction()"
type=
"primary"
>
添加
</a-button>
</a-col>
</a-col>
</a-row>
</a-row>
</a-form>
</a-form>
...
@@ -74,14 +73,24 @@
...
@@ -74,14 +73,24 @@
<a-input
placeholder=
"适用学校"
v-decorator=
"[ 'productUniversity', {rules: [{ required: true, message: '适用学校不能为空!' ,validator: 'click'}]} ]"
></a-input>
<a-input
placeholder=
"适用学校"
v-decorator=
"[ 'productUniversity', {rules: [{ required: true, message: '适用学校不能为空!' ,validator: 'click'}]} ]"
></a-input>
</a-form-item>
</a-form-item>
<a-form-item
:labelCol=
"{span: 5}"
:wrapperCol=
"{span: 9, offset: 1}"
label=
"套餐情况:"
>
<a-form-item
:labelCol=
"{span: 5}"
:wrapperCol=
"{span: 9, offset: 1}"
label=
"套餐情况:"
>
<a-textarea
:rows=
"10"
v-model=
"modelData.productMealPrice"
/>
<a-input
:rows=
"10"
v-model=
"modelData.productMealPrice"
/>
</a-form-item>
<a-form-item
:labelCol=
"{span: 5}"
:wrapperCol=
"{span: 9, offset: 1}"
label=
"产品情况:"
>
<a-textarea
:rows=
"10"
v-model=
"modelData.productIntroduction"
/>
</a-form-item>
<a-form-item
:labelCol=
"{span: 5}"
:wrapperCol=
"{span: 9, offset: 1}"
label=
"资费介绍:"
>
<a-textarea
:rows=
"10"
v-model=
"modelData.productSetMealIntroduction"
/>
</a-form-item>
</a-form-item>
<div
v-show=
"!add"
>
<a-form-item
:labelCol=
"{span: 5}"
:wrapperCol=
"{span: 9, offset: 1}"
label=
"状态"
>
<a-select
placeholder=
"状态"
v-decorator=
"[ 'productState']"
>
<a-select-option
key=
"0"
>
正常
</a-select-option>
<a-select-option
key=
"1"
>
下架
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
:labelCol=
"{span: 5}"
:wrapperCol=
"{span: 18, offset: 1}"
label=
"产品情况:"
>
<div
v-html=
"productIntroduction"
>
</div>
</a-form-item>
<a-form-item
:labelCol=
"{span: 5}"
:wrapperCol=
"{span: 18, offset: 1}"
label=
"资费介绍:"
>
<div
v-html=
"productSetMealIntroduction"
>
</div>
</a-form-item>
</div>
</a-form>
</a-form>
</a-modal>
</a-modal>
</div>
</div>
...
@@ -101,6 +110,8 @@
...
@@ -101,6 +110,8 @@
Formtable
:
this
.
$form
.
createForm
(
this
),
Formtable
:
this
.
$form
.
createForm
(
this
),
modifyvisible
:
false
,
modifyvisible
:
false
,
add
:
true
,
add
:
true
,
productIntroduction
:
""
,
productSetMealIntroduction
:
''
,
queryParam
:
{
queryParam
:
{
productUniversity
:
''
,
//适用学校
productUniversity
:
''
,
//适用学校
productRegion
:
''
,
// 区域
productRegion
:
''
,
// 区域
...
@@ -108,8 +119,6 @@
...
@@ -108,8 +119,6 @@
productState
:
''
// 宽带狀態
productState
:
''
// 宽带狀態
},
},
modelData
:{
modelData
:{
productIntroduction
:
''
,
productSetMealIntroduction
:
''
,
productMealPrice
:
''
,
productMealPrice
:
''
,
productMeal
:
''
,
productMeal
:
''
,
productTitle
:
''
,
productTitle
:
''
,
...
@@ -184,8 +193,8 @@
...
@@ -184,8 +193,8 @@
},
},
modifyfunction
(
data
){
modifyfunction
(
data
){
if
(
data
!=
undefined
){
if
(
data
!=
undefined
){
this
.
modelData
.
productIntroduction
=
data
.
productIntroduction
,
this
.
productIntroduction
=
data
.
productIntroduction
,
this
.
modelData
.
productSetMealIntroduction
=
data
.
productSetMealIntroduction
,
this
.
productSetMealIntroduction
=
data
.
productSetMealIntroduction
,
this
.
modelData
.
productMealPrice
=
data
.
productMealPrice
this
.
modelData
.
productMealPrice
=
data
.
productMealPrice
this
.
modelData
.
productId
=
data
.
productId
this
.
modelData
.
productId
=
data
.
productId
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -195,7 +204,8 @@
...
@@ -195,7 +204,8 @@
"productUniversity"
:
data
.
productUniversity
,
"productUniversity"
:
data
.
productUniversity
,
"productPrice"
:
data
.
productPrice
,
"productPrice"
:
data
.
productPrice
,
"productRegion"
:
data
.
productRegion
,
"productRegion"
:
data
.
productRegion
,
"productRate"
:
data
.
productRate
"productRate"
:
data
.
productRate
,
productState
:
data
.
productState
})
})
},
0
)
},
0
)
this
.
add
=
false
;
this
.
add
=
false
;
...
@@ -204,7 +214,7 @@
...
@@ -204,7 +214,7 @@
},
},
createfunctionOk
(){
createfunctionOk
(){
let
that
=
this
;
let
that
=
this
;
that
.
Formtable
.
validateFields
([
'productMeal'
,
'productTitle'
,
'productPrice'
,
'productUniversity'
,
'productRegion'
,
'productRate'
],
{
force
:
true
},
(
err
,
values
)
=>
{
that
.
Formtable
.
validateFields
([
'productMeal'
,
'productTitle'
,
'productPrice'
,
'productUniversity'
,
'productRegion'
,
'productRate'
,
'productState'
],
{
force
:
true
},
(
err
,
values
)
=>
{
if
(
err
)
{
if
(
err
)
{
return
;
return
;
}
}
...
@@ -214,9 +224,10 @@
...
@@ -214,9 +224,10 @@
that
.
modelData
.
productPrice
=
values
.
productPrice
that
.
modelData
.
productPrice
=
values
.
productPrice
that
.
modelData
.
productRegion
=
values
.
productRegion
that
.
modelData
.
productRegion
=
values
.
productRegion
that
.
modelData
.
productRate
=
values
.
productRate
that
.
modelData
.
productRate
=
values
.
productRate
that
.
modelData
.
productState
=
values
.
productState
if
(
this
.
add
){
if
(
this
.
add
){
let
obj
=
that
.
modelData
;
let
obj
=
that
.
modelData
;
delete
obj
.
productId
delete
obj
.
productId
let
product
=
JSON
.
stringify
(
obj
);
let
product
=
JSON
.
stringify
(
obj
);
productInsert
({
product
}).
then
((
res
)
=>
{
productInsert
({
product
}).
then
((
res
)
=>
{
this
.
modifyvisible
=
false
;
this
.
modifyvisible
=
false
;
...
@@ -259,7 +270,8 @@
...
@@ -259,7 +270,8 @@
productUniversity
:
''
,
productUniversity
:
''
,
productPrice
:
''
,
productPrice
:
''
,
productRegion
:
''
,
productRegion
:
''
,
productRate
:
''
productRate
:
''
,
productState
:
'0'
})
})
}
}
}
}
...
...
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