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
c0b47847
Commit
c0b47847
authored
Mar 18, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
c0a4946e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
116 additions
and
18 deletions
+116
-18
supplier-form.vue
src/components/studyAbroad/supplier-form.vue
+60
-15
supplier.vue
src/pages/studyAbroad/supplier.vue
+56
-3
No files found.
src/components/studyAbroad/supplier-form.vue
View file @
c0b47847
...
...
@@ -2,18 +2,21 @@
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 800px;max-width:900px;"
>
<q-card-section>
<!--
<div
class=
"text-h6"
>
{{
objOption
.
CateId
==
0
?
'新增供应商'
:
'修改供应商'
}}
</div>
-->
<div
class=
"text-h6"
>
新增供应商
</div>
<div
class=
"text-h6"
>
{{
addMsg
.
Id
==
0
?
'新增供应商'
:
'修改供应商'
}}
</div>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div
class=
"text-caption q-mb-lg q-px-md text-grey-6"
>
供应商信息
</div>
<div
class=
"row wrap"
>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
v-model=
"addMsg.Type"
ref=
"Type"
:options=
"supplierList"
label=
"供应商类型"
:dense=
"false"
class=
"col-6 q-pb-lg q-pr-lg"
emit-value
map-options
/>
<q-input
filled
stack-label
maxlength=
"5"
:dense=
"false"
v-model=
"addMsg.Name"
ref=
"Name"
<q-input
filled
stack-label
maxlength=
"25"
:dense=
"false"
v-model=
"addMsg.Name"
ref=
"Name"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"供应商名称"
/>
</div>
<q-input
filled
stack-label
maxlength=
"25"
:dense=
"false"
v-model=
"addMsg.LinkMan"
ref=
"LinkMan"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"联系人"
/>
<q-input
filled
stack-label
maxlength=
"25"
:dense=
"false"
v-model=
"addMsg.LinkTel"
ref=
"LinkTel"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"联系电话"
/>
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"addMsg.LinkAddress"
ref=
"LinkAddress"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"地址"
/>
<q-input
filled
stack-label
maxlength=
"200"
:dense=
"false"
v-model=
"addMsg.Remark"
ref=
"Remark"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"备注"
/>
</div>
</q-card-section>
<q-separator
/>
...
...
@@ -27,8 +30,9 @@
</
template
>
<
script
>
import
{
saveCourseCategoryInfo
}
from
'../../api/course/index'
saveSupplier
,
querySupplierInfo
}
from
'../../api/studyabroad/index'
export
default
{
props
:
{
saveObj
:
{
...
...
@@ -41,10 +45,14 @@
persistent
:
true
,
saveLoading
:
false
,
addMsg
:
{
Id
:
0
,
//编号
Type
:
0
,
//供应商类型
Name
:
''
,
//供应商名称
LinkMan
:
""
,
//联系人
LinkTel
:
""
,
//联系电话
LinkAddress
:
""
,
//地址
Remark
:
""
,
//备注
},
supplierList
:[],
//供应商下拉数据
}
},
mounted
()
{
...
...
@@ -53,16 +61,53 @@
methods
:
{
//初始化表单
initObj
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
Id
>
0
)
{
querySupplierInfo
({
Id
:
this
.
saveObj
.
Id
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
var
tempObj
=
res
.
Data
;
if
(
tempObj
)
{
this
.
addMsg
.
Id
=
tempObj
.
Id
;
this
.
addMsg
.
Type
=
tempObj
.
Type
;
this
.
addMsg
.
Name
=
tempObj
.
Name
;
this
.
addMsg
.
LinkMan
=
tempObj
.
LinkMan
;
this
.
addMsg
.
LinkTel
=
tempObj
.
LinkTel
;
this
.
addMsg
.
LinkAddress
=
tempObj
.
LinkAddress
;
this
.
addMsg
.
Remark
=
tempObj
.
Remark
;
}
}
})
}
else
{
this
.
addMsg
.
Id
=
0
;
this
.
addMsg
.
Type
=
0
;
this
.
addMsg
.
Name
=
""
;
this
.
addMsg
.
LinkMan
=
""
;
this
.
addMsg
.
LinkTel
=
""
;
this
.
addMsg
.
LinkAddress
=
""
;
this
.
addMsg
.
Remark
=
""
;
}
},
//关闭弹窗
closeSaveForm
()
{
this
.
$emit
(
'close'
)
this
.
persistent
=
false
this
.
$emit
(
'close'
)
;
this
.
persistent
=
false
;
},
//保存
菜单
//保存
供应商
saveInfo
()
{
this
.
saveLoading
=
true
;
saveSupplier
(
this
.
addMsg
).
then
(
res
=>
{
this
.
saveLoading
=
false
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
})
this
.
$emit
(
"success"
);
this
.
closeSaveForm
();
})
}
}
}
...
...
src/pages/studyAbroad/supplier.vue
View file @
c0b47847
...
...
@@ -21,6 +21,15 @@
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"新增供应商"
@
click=
"EditSupplier(null)"
/>
</div>
</
template
>
<
template
v-slot:body-cell-Id=
"props"
>
<q-td
:props=
"props"
>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
@
click=
"EditSupplier(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"delete"
color=
"negative"
style=
"font-weight:400;"
label=
"删除"
@
click=
"removeSupplier(props.row)"
/>
</q-td>
</
template
>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
color=
"primary"
:max=
"PageCount"
:input=
"true"
@
input=
"changePage"
/>
...
...
@@ -34,7 +43,8 @@
<
script
>
import
{
querySupplierPage
querySupplierPage
,
deleteSupplier
}
from
'../../api/studyabroad/index'
import
supplierForm
from
'../../components/studyAbroad/supplier-form'
...
...
@@ -89,9 +99,21 @@
field
:
'Remark'
},
{
name
:
'CateId'
,
name
:
'CreateByName'
,
label
:
'创建人'
,
align
:
'left'
,
field
:
'CreateByName'
},
{
name
:
'CreateTimeStr'
,
label
:
'创建时间'
,
align
:
'left'
,
field
:
'CreateTimeStr'
},
{
name
:
'Id'
,
label
:
'操作'
,
field
:
'
Cate
Id'
field
:
'Id'
}
],
}
...
...
@@ -130,6 +152,37 @@
//关闭弹窗
closeSupplierForm
()
{
this
.
isShowSupplier
=
false
},
//删除供应商
removeSupplier
(
item
)
{
let
delMsg
=
{
Id
:
item
.
Id
,
Status
:
1
};
var
str
=
'是否确定删除【'
+
item
.
Name
+
'】供应商?'
;
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
str
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
deleteSupplier
(
delMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'删除成功!'
,
position
:
'top'
})
this
.
refreshPage
();
}
})
}).
onCancel
(()
=>
{
});
}
}
}
...
...
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