Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
84de1e5a
Commit
84de1e5a
authored
Jul 21, 2023
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
地接供应商
parent
bcffc870
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
470 additions
and
0 deletions
+470
-0
index.vue
src/components/dmc/manager/GroundSupplier/index.vue
+465
-0
config.js
src/router/config.js
+5
-0
No files found.
src/components/dmc/manager/GroundSupplier/index.vue
0 → 100644
View file @
84de1e5a
<
style
scoped
>
/
deep
/
.el-table
th
.el-table__cell
{
background-color
:
#E6E6E6
;
}
/
deep
/
.msgbox
.el-upload
{
width
:
100%
!important
;
}
/
deep
/
.msgbox
.el-upload-dragger
{
width
:
100%
!important
;
height
:
auto
;
border
:
0
;
}
.button
{
padding
:
4px
;
}
.msgbox
{
width
:
50%
;
float
:
left
;
}
.msgbox.width100
{
width
:
100%
;
}
.img-box-form
{
display
:
flex
;
}
.img-box
{
width
:
40px
;
height
:
40px
;
margin-right
:
20px
;
}
._wenjian_P
{
font-size
:
21px
;
text-align
:
center
;
color
:
#41D2A1
;
}
</
style
>
<
template
>
<div
class=
"page_fnDm page_RecPayQuery"
>
<div
class=
"query-box"
>
<el-form
class=
"_info_box clearfix"
label-width=
"110px"
>
<el-row
style=
"padding:15px 20px 0 0;"
>
<el-col
:span=
"4"
>
<el-form-item
label=
"供应商信息:"
>
<el-input
placeholder=
""
v-model=
"msg.Name"
maxlength=
"-1"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
label=
"财务信息:"
>
<el-input
placeholder=
""
v-model=
"msg.FinanceMan"
maxlength=
"-1"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
label=
"分类:"
>
<el-select
filterable
v-model=
'msg.GroundingType'
class=
""
>
<el-option
key=
"0"
value=
"0"
label=
"不限"
></el-option>
<el-option
v-for=
"item in sortList"
:key=
"item.ID"
:value=
"item.ID"
:label=
"item.Name"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
label=
"线路:"
>
<el-select
filterable
v-model=
'msg.LineId'
class=
""
>
<el-option
key=
"0"
value=
"0"
label=
"不限"
></el-option>
<el-option
v-for=
"item in LineList"
:key=
"item.LineID"
:value=
"item.LineID"
:label=
"item.LineName"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<ul
class=
"clearfix"
>
<li
class=
"hight_query"
>
<button
class=
"hollowFixedBtn"
@
click=
"resetPageIndex()"
>
{{
$t
(
'pub.searchBtn'
)
}}
</button>
<button
class=
"normalBtn"
@
click=
"addShow()"
>
新增供应商
</button>
</li>
</ul>
</div>
<div
class=
"_fnDm_content"
v-loading=
'loading'
>
<el-table
ref=
"multipleTable"
:data=
"DataList"
tooltip-effect=
"dark"
style=
"width: 100%"
>
<el-table-column
prop=
""
label=
"线路"
>
<template
slot-scope=
"scope"
>
<span
v-for=
"(x,index) in scope.row.LineInfoList"
>
{{
x
.
LineName
}}
<span
v-if=
"scope.row.LineInfoList.length-1!=index"
>
、
</span>
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"GroundingTypeStr"
label=
"分类"
></el-table-column>
<el-table-column
prop=
"Name"
label=
"供应商名称"
></el-table-column>
<el-table-column
prop=
"Address"
label=
"供应商地址"
></el-table-column>
<el-table-column
prop=
"LinkMan"
label=
"供应商联系人"
></el-table-column>
<el-table-column
prop=
"LinkTel"
label=
"供应商电话"
></el-table-column>
<el-table-column
prop=
"LinkDuties"
label=
"供应商职务"
></el-table-column>
<el-table-column
prop=
"FinanceMan"
label=
"财务联系人"
></el-table-column>
<el-table-column
prop=
"FinanceTel"
label=
"财务电话"
></el-table-column>
<el-table-column
prop=
"FinanceDuties"
label=
"财务职务"
></el-table-column>
<el-table-column
prop=
""
label=
"合同"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"verificationFile(scope.row.ContractUrl,3)"
class=
"img-box"
>
<div
style=
"width:100%;height:100%;"
>
<el-image
style=
"width: 100%; height: 100%"
:src=
"scope.row.ContractUrl"
:preview-src-list=
"[scope.row.ContractUrl]"
>
</el-image>
</div>
</div>
<div
v-if=
"verificationFile(scope.row.ContractUrl,1)"
class=
"img-box"
>
<div
class=
"iconfont _wenjian_P"
:class=
"scope.row.ContractUrl.substring(scope.row.ContractUrl.lastIndexOf('.')+1,scope.row.ContractUrl.length).toUpperCase()=='PDF'? 'icon-pdf' : 'icon-excel'"
@
click=
"showUpLoadFile(scope.row.ContractUrl)"
>
</div>
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
""
label=
"操作人"
>
<
template
slot-scope=
"scope"
>
<p>
{{
scope
.
row
.
CreateByName
}}
</p>
<p>
{{
scope
.
row
.
CreateDate
}}
</p>
</
template
>
</el-table-column>
<el-table-column
prop=
""
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click=
"Edit(scope.row)"
class=
"button"
type=
"primary"
icon=
"el-icon-edit"
circle
>
</el-button>
<el-button
@
click=
"Delete(scope.row)"
class=
"button"
type=
"danger"
icon=
"el-icon-delete"
circle
></el-button>
</
template
>
</el-table-column>
</el-table>
<div
style=
"padding-bottom:15px"
>
<el-pagination
background
@
current-change=
"handleCurrentChanges"
layout=
"total,prev, pager, next, jumper"
:page-size=
"msg.pageSize"
:total=
'total'
>
</el-pagination>
</div>
</div>
<el-dialog
:title=
"`${titleName}供应商`"
:visible
.
sync=
"showVisible"
width=
"750px"
@
close=
"resetForm('form')"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"110px"
>
<div
class=
"msgbox"
>
<el-form-item
label=
"线路"
prop=
"LineId"
>
<el-select
v-model=
"form.LineId"
multiple
collapse-tags
style=
"width: 100%;"
placeholder=
"请选择"
>
<el-option
v-for=
"item in LineList"
:key=
"item.LineID"
:label=
"item.LineName"
:value=
"item.LineID"
>
</el-option>
</el-select>
</el-form-item>
</div>
<div
class=
"msgbox"
>
<el-form-item
label=
"供应商分类"
prop=
"GroundingType"
>
<el-select
filterable
v-model=
'form.GroundingType'
style=
"width: 100%;"
>
<el-option
v-for=
"item in sortList"
:key=
"item.ID"
:value=
"item.ID"
:label=
"item.Name"
>
</el-option>
</el-select>
</el-form-item>
</div>
<div
class=
"msgbox"
>
<el-form-item
label=
"供应商名称"
prop=
"Name"
>
<el-input
v-model=
"form.Name"
clearable
></el-input>
</el-form-item>
</div>
<div
class=
"msgbox"
>
<el-form-item
label=
"供应商地址"
prop=
"Address"
>
<el-input
v-model=
"form.Address"
clearable
></el-input>
</el-form-item>
</div>
<div
class=
"msgbox"
>
<el-form-item
label=
"供应商联系人"
prop=
"LinkMan"
>
<el-input
v-model=
"form.LinkMan"
clearable
></el-input>
</el-form-item>
</div>
<div
class=
"msgbox"
>
<el-form-item
label=
"供应商电话"
prop=
"LinkTel"
>
<el-input
v-model=
"form.LinkTel"
clearable
></el-input>
</el-form-item>
</div>
<div
class=
"msgbox"
>
<el-form-item
label=
"供应商职务"
prop=
"LinkDuties"
>
<el-input
v-model=
"form.LinkDuties"
clearable
></el-input>
</el-form-item>
</div>
<div
class=
"msgbox"
>
<el-form-item
label=
"财务联系人"
prop=
"FinanceMan"
>
<el-input
v-model=
"form.FinanceMan"
clearable
></el-input>
</el-form-item>
</div>
<div
class=
"msgbox"
>
<el-form-item
label=
"财务电话"
prop=
"FinanceTel"
>
<el-input
v-model=
"form.FinanceTel"
clearable
></el-input>
</el-form-item>
</div>
<div
class=
"msgbox"
>
<el-form-item
label=
"财务职务"
prop=
"FinanceDuties"
>
<el-input
v-model=
"form.FinanceDuties"
clearable
></el-input>
</el-form-item>
</div>
<div
class=
"msgbox width100"
>
<el-form-item
label=
"合同"
prop=
"ContractUrl"
>
<div
class=
"img-box-form"
>
<
template
v-if=
"form.ContractUrl"
>
<div
v-if=
"verificationFile(form.ContractUrl,3)"
class=
"img-box"
>
<div
style=
"width:100%;height:100%;"
>
<el-image
style=
"width: 100%; height: 100%"
:src=
"form.ContractUrl"
:preview-src-list=
"[form.ContractUrl]"
>
</el-image>
</div>
</div>
<div
v-if=
"verificationFile(form.ContractUrl,1)"
class=
"img-box"
>
<div
class=
"iconfont _wenjian_P"
:class=
"form.ContractUrl.substring(form.ContractUrl.lastIndexOf('.')+1,form.ContractUrl.length).toUpperCase()=='PDF'? 'icon-pdf' : 'icon-excel'"
@
click=
"showUpLoadFile(form.ContractUrl)"
>
</div>
</div>
</
template
>
<div>
<el-upload
drag
:http-request=
"uploadFileBtn"
:multiple=
"true"
:show-file-list=
"false"
action=
""
>
<el-button
type=
"primary"
size=
"mini"
>
点击上传
</el-button>
</el-upload>
</div>
</div>
</el-form-item>
</div>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"resetForm('form'),showVisible = false"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"danger"
@
click=
"submit('form')"
:loading=
"submitLoading"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
export
default
{
data
()
{
return
{
loading
:
false
,
DataList
:
[],
heightQueryBox
:
false
,
currentPage
:
1
,
total
:
0
,
msg
:{
pageIndex
:
1
,
pageSize
:
10
,
Name
:
''
,
FinanceMan
:
''
,
GroundingType
:
'0'
,
LineInfo
:
''
,
LineId
:
'0'
},
LineList
:[],
sortList
:
[],
showVisible
:
false
,
submitLoading
:
false
,
form
:{
Id
:
0
,
Name
:
''
,
Address
:
''
,
LinkMan
:
''
,
LinkTel
:
''
,
LinkDuties
:
''
,
FinanceMan
:
''
,
FinanceTel
:
''
,
FinanceDuties
:
''
,
GroundingType
:
''
,
ContractUrl
:
''
,
LineInfo
:
''
,
LineId
:
[],
},
rules
:{
Name
:
[{
required
:
true
,
message
:
'请输入供应商名称'
,
trigger
:
"blur"
}],
Address
:
[{
required
:
true
,
message
:
'请输入供应商地址'
,
trigger
:
"blur"
}],
LinkMan
:
[{
required
:
true
,
message
:
'请输入供应商联系人'
,
trigger
:
"blur"
}],
LinkTel
:
[{
required
:
true
,
message
:
'请输入供应商电话'
,
trigger
:
"blur"
}],
LinkDuties
:
[{
required
:
true
,
message
:
'请输入供应商职务'
,
trigger
:
"blur"
}],
FinanceMan
:
[{
required
:
true
,
message
:
'请输入财务联系人'
,
trigger
:
"blur"
}],
FinanceTel
:
[{
required
:
true
,
message
:
'请输入财务电话'
,
trigger
:
"blur"
}],
FinanceDuties
:
[{
required
:
true
,
message
:
'请输入财务职务'
,
trigger
:
"blur"
}],
GroundingType
:
[{
required
:
true
,
message
:
'请选择供应商类型'
,
trigger
:
"change"
}],
LineId
:
[{
required
:
true
,
message
:
'请选择路线'
,
trigger
:
"change"
}],
ContractUrl
:
[{
required
:
true
,
message
:
'请上传合同'
,
trigger
:
"buttom"
}],
},
titleName
:
'新增'
}
},
created
()
{
},
components
:
{
},
mounted
()
{
this
.
getPageList
()
this
.
GetSelectList
()
},
methods
:
{
addShow
(){
this
.
titleName
=
'新增'
this
.
showVisible
=
true
},
Edit
(
row
){
this
.
titleName
=
'编辑'
this
.
form
=
JSON
.
parse
(
JSON
.
stringify
(
row
))
this
.
form
.
LineId
=
row
.
LineInfo
.
split
(
','
).
map
(
x
=>
{
return
Number
(
x
)
})
this
.
showVisible
=
true
},
Delete
(
row
){
this
.
$confirm
(
"是否删除? 删除后不可恢复"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
})
.
then
(()
=>
{
this
.
apipost
(
'travel_get_DelGroundingSupplier'
,
{
Id
:
row
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Success
(
res
.
data
.
message
)
this
.
getPageList
()
}
else
{
this
.
Error
(
res
.
data
.
message
)
}
})
})
.
catch
(()
=>
{});
},
submit
(
formName
){
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
form
.
LineInfo
=
this
.
form
.
LineId
.
join
(
','
)
this
.
submitLoading
=
true
this
.
apipost
(
'travel_get_SetGroundingSupplier'
,
this
.
form
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
resetForm
(
'form'
)
this
.
getPageList
();
this
.
showVisible
=
false
;
this
.
submitLoading
=
false
this
.
Success
(
res
.
data
.
message
)
}
else
{
this
.
Error
(
res
.
data
.
message
)
}
},
err
=>
{}
)
}
});
},
// 初始化表单
resetForm
(
formName
)
{
this
.
form
=
{
Id
:
0
,
Name
:
''
,
Address
:
''
,
LinkMan
:
''
,
LinkTel
:
''
,
LinkDuties
:
''
,
FinanceMan
:
''
,
FinanceTel
:
''
,
FinanceDuties
:
''
,
GroundingType
:
''
,
ContractUrl
:
''
,
LineInfo
:
''
,
LineId
:
[],
}
this
.
$refs
[
formName
].
resetFields
();
},
uploadFileBtn
(
file
)
{
//上传
if
(
file
.
file
.
size
>
1024
*
1024
*
10
)
{
this
.
$message
.
warning
(
'文件大小不能超过10M!'
)
return
}
// 1 文档 2 数据 3 图片
let
typeArr
=
[{
stringArr
:
'GIF|JPG|JPEG|PNG|BMP'
,
type
:
3
},
{
stringArr
:
'DOCX|DOC|XLSX|XLS|PPT|PPTX|PDF'
,
type
:
1
},
]
let
ft
=
file
.
file
.
name
.
substring
(
file
.
file
.
name
.
lastIndexOf
(
'.'
)
+
1
,
file
.
file
.
name
.
length
).
toUpperCase
();
let
fileTypeNumber
=
2
;
let
typeOk
=
false
;
typeArr
.
forEach
(
x
=>
{
if
(
x
.
stringArr
.
indexOf
(
ft
)
!=
'-1'
)
{
fileTypeNumber
=
x
.
type
;
typeOk
=
true
;
}
});
if
(
!
typeOk
)
return
this
.
$message
.
error
(
'请上传图片、word、excel类型的文件!'
);
let
newArr
=
[];
newArr
.
push
(
file
.
file
)
let
path
=
"/Upload/Temporary/"
this
.
$message
.
info
(
'上传中...'
)
this
.
UploadSelfFileT
(
path
,
newArr
,
x
=>
{
let
fileSize
=
file
.
file
.
size
<
1024
?
file
.
file
.
size
:
(
file
.
file
.
size
/
1024
).
toFixed
(
0
);
this
.
form
.
ContractUrl
=
this
.
domainManager
().
ViittoFileUrl
+
x
.
data
.
FilePath
,
this
.
$message
.
success
(
'上传成功'
);
});
},
showUpLoadFile
(
i
)
{
// 预览上传文件
if
(
i
.
substring
(
i
.
lastIndexOf
(
'.'
)
+
1
,
i
.
length
).
toUpperCase
()
==
'PDF'
)
{
this
.
previewPDF
(
i
)
}
else
{
window
.
open
(
"https://view.officeapps.live.com/op/view.aspx?src="
+
i
)
}
},
resetPageIndex
()
{
// 重置页码
this
.
msg
.
pageIndex
=
1
;
this
.
currentPage
=
1
;
this
.
getPageList
()
},
handleCurrentChanges
(){
this
.
msg
.
pageIndex
=
val
;
this
.
getPageList
()
},
getPageList
(){
this
.
loading
=
true
this
.
apipost
(
"travel_get_GetGroundingSupplierPageList"
,
this
.
msg
,
(
res
)
=>
{
this
.
loading
=
false
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
DataList
=
res
.
data
.
data
.
pageData
;
this
.
total
=
res
.
data
.
data
.
count
;
}
else
{}},
err
=>
{});
},
GetSelectList
()
{
// 地接类型
this
.
apipost
(
'travel_get_GetGroundingTypeEnumList'
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
sortList
=
res
.
data
.
data
;
}
else
{}},
err
=>
{})
// 线路
this
.
apipost
(
"line_post_GetAllList_V2"
,
{
LineDirection
:
0
},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
LineList
=
res
.
data
.
data
;
}
else
{}},
err
=>
{});
},
}
}
</
script
>
src/router/config.js
View file @
84de1e5a
...
...
@@ -4864,6 +4864,11 @@ export default {
name
:
'groundOperation2'
,
component
:
resolve
=>
require
([
'@/components/dmc/manager/groundOperation2'
],
resolve
),
},
{
path
:
'/GroundSupplier'
,
// 地接供应商
name
:
'GroundSupplier'
,
component
:
resolve
=>
require
([
'@/components/dmc/manager/GroundSupplier/index'
],
resolve
),
},
{
path
:
'/newFeature'
,
name
:
'newFeature'
,
...
...
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