Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
contractmanage
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
张伯涛
contractmanage
Commits
7ef41b9d
Commit
7ef41b9d
authored
May 12, 2022
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
中标主体单位字段,调整为多值,只可选择往来单位的行政往来
parent
d60173d8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
180 additions
and
53 deletions
+180
-53
CompanyDialog.vue
src/views/list/CompanyDialog.vue
+115
-36
addProject.vue
src/views/projectInfo/addProject.vue
+65
-17
No files found.
src/views/list/CompanyDialog.vue
View file @
7ef41b9d
...
...
@@ -96,11 +96,21 @@ export default {
type
:
Boolean
,
default
:
false
},
fatherType
:
{
type
:
String
,
default
:
undefined
},
// 区分是哪个模块点击进来的
companyType
:
{
type
:
String
,
default
:
undefined
},
selectionList
:
{
type
:
Array
,
default
()
{
return
[]
}
},
codeList
:
{
type
:
Array
,
default
()
{
...
...
@@ -110,6 +120,8 @@ export default {
},
data
()
{
return
{
projectComList
:
[],
// 给项目模块的中标主体单位传值的list
finalList
:
[],
companyName
:
''
,
companyCode
:
''
,
saveCompanyCode
:
''
,
...
...
@@ -129,6 +141,16 @@ export default {
this
.
getList
()
},
methods
:
{
/** 父组件把反显的数据(已选的)显示在列表上*/
toggleSelection
(
rows
)
{
if
(
rows
)
{
rows
.
forEach
(
row
=>
{
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
row
,
true
)
})
}
else
{
this
.
$refs
.
multipleTable
.
clearSelection
()
}
},
/** 查看按钮 */
checkDetails
(
row
)
{
this
.
$router
.
push
({
...
...
@@ -140,18 +162,29 @@ export default {
// this.unitOpen = true
},
handleSelectionChange
(
val
)
{
this
.
companyName
=
val
[
0
].
ZBPNAME_ZH
this
.
companyCode
=
val
[
0
].
ZBP
console
.
log
(
'val'
,
val
)
if
(
this
.
fatherType
===
'project'
)
{
this
.
projectComList
=
val
}
else
{
this
.
companyName
=
val
[
0
].
ZBPNAME_ZH
this
.
companyCode
=
val
[
0
].
ZBP
}
},
select
(
selection
,
row
)
{
if
(
selection
.
length
>
1
)
{
const
del_row
=
selection
.
shift
()
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
del_row
,
false
)
console
.
log
(
'选择的select'
,
selection
)
if
(
this
.
fatherType
!==
'project'
)
{
if
(
selection
.
length
>
1
)
{
const
del_row
=
selection
.
shift
()
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
del_row
,
false
)
}
}
},
selectAll
(
selection
)
{
if
(
selection
.
length
>
1
)
{
selection
.
length
=
1
console
.
log
(
'选择的'
,
selection
)
if
(
this
.
fatherType
!==
'project'
)
{
if
(
selection
.
length
>
1
)
{
selection
.
length
=
1
}
}
},
/** 查询按钮*/
...
...
@@ -161,16 +194,43 @@ export default {
},
/** 获取查询列表接口*/
getList
()
{
getIntercourseCompanyList
(
Object
.
assign
(
this
.
serchForm
,
{
page
:
this
.
page
,
rows
:
this
.
rows
},
)).
then
(
res
=>
{
this
.
dataList
=
res
.
data
.
records
this
.
total
=
res
.
data
.
total
})
if
(
this
.
fatherType
===
'project'
)
{
getIntercourseCompanyList
(
Object
.
assign
(
this
.
serchForm
,
{
page
:
this
.
page
,
rows
:
this
.
rows
,
ZORG
:
'1'
},
)).
then
(
res
=>
{
this
.
dataList
=
res
.
data
.
records
this
.
total
=
res
.
data
.
total
})
console
.
log
(
'反显的list'
,
this
.
selectionList
)
if
(
this
.
selectionList
.
length
>=
1
)
{
const
arr
=
[]
this
.
dataList
.
forEach
(
item
=>
{
this
.
selectionList
.
forEach
(
selectItem
=>
{
if
(
selectItem
.
ZBP
===
item
.
ZBP
)
{
arr
.
push
(
item
)
}
})
})
console
.
log
(
'arr'
,
arr
)
this
.
toggleSelection
(
arr
)
}
}
else
{
getIntercourseCompanyList
(
Object
.
assign
(
this
.
serchForm
,
{
page
:
this
.
page
,
rows
:
this
.
rows
},
)).
then
(
res
=>
{
this
.
dataList
=
res
.
data
.
records
this
.
total
=
res
.
data
.
total
})
}
},
/** 关闭dialog*/
closeDialog
()
{
...
...
@@ -180,35 +240,54 @@ export default {
},
/** dialog确定按钮*/
determine
()
{
console
.
log
(
'aaa'
,
this
.
codeList
)
console
.
log
(
'单位'
,
this
.
companyType
)
if
(
this
.
codeList
)
{
if
(
this
.
companyType
===
'0'
&&
this
.
codeList
.
includes
(
this
.
companyCode
))
{
if
(
this
.
fatherType
===
'project'
)
{
if
(
this
.
projectComList
.
length
===
0
)
{
this
.
$message
({
type
:
'warning'
,
message
:
'
该往来单位已选择
'
message
:
'
请选择往来单位
'
})
}
else
{
this
.
saveCompanyCode
=
this
.
companyCode
this
.
$emit
(
'getValue'
,
this
.
companyName
,
this
.
companyCode
)
for
(
let
i
=
0
,
l
=
this
.
projectComList
.
length
;
i
<
l
;
i
++
)
{
const
list
=
{
ZBPNAME_ZH
:
this
.
projectComList
[
i
].
ZBPNAME_ZH
,
ZBP
:
this
.
projectComList
[
i
].
ZBP
}
this
.
finalList
.
push
(
list
)
}
this
.
$emit
(
'getValue'
,
this
.
finalList
)
this
.
$emit
(
'funClose'
,
false
)
}
}
else
if
(
this
.
companyName
)
{
if
(
this
.
companyType
===
'0'
&&
this
.
saveCompanyCode
===
this
.
companyCode
)
{
}
else
{
console
.
log
(
'aaa'
,
this
.
codeList
)
console
.
log
(
'单位'
,
this
.
companyType
)
if
(
this
.
codeList
)
{
if
(
this
.
companyType
===
'0'
&&
this
.
codeList
.
includes
(
this
.
companyCode
))
{
this
.
$message
({
type
:
'warning'
,
message
:
'该往来单位已选择'
})
}
else
{
this
.
saveCompanyCode
=
this
.
companyCode
this
.
$emit
(
'getValue'
,
this
.
companyName
,
this
.
companyCode
)
this
.
$emit
(
'funClose'
,
false
)
}
}
else
if
(
this
.
companyName
)
{
if
(
this
.
companyType
===
'0'
&&
this
.
saveCompanyCode
===
this
.
companyCode
)
{
this
.
$message
({
type
:
'warning'
,
message
:
'该往来单位已选择'
})
}
else
{
this
.
saveCompanyCode
=
this
.
companyCode
this
.
$emit
(
'getValue'
,
this
.
companyName
,
this
.
companyCode
)
this
.
$emit
(
'funClose'
,
false
)
}
}
else
{
this
.
$message
({
type
:
'warning'
,
message
:
'
该往来单位已选择
'
message
:
'
请选择往来单位
'
})
}
else
{
this
.
saveCompanyCode
=
this
.
companyCode
this
.
$emit
(
'getValue'
,
this
.
companyName
,
this
.
companyCode
)
this
.
$emit
(
'funClose'
,
false
)
}
}
else
{
this
.
$message
({
type
:
'warning'
,
message
:
'请选择往来单位'
})
}
},
/** page分页*/
...
...
src/views/projectInfo/addProject.vue
View file @
7ef41b9d
...
...
@@ -286,17 +286,19 @@
/>
</el-form-item>
<el-form-item
v-if=
"number === '02' || number === '03'"
label=
"中标主体单位"
maxlength=
"20"
prop=
"ZAWARDMAINAME"
>
<el-form-item
v-if=
"number === '02' || number === '03'"
label=
"中标主体单位"
maxlength=
"20"
prop=
"ZAWARDMAINAME"
>
<!--
<el-input
v-model=
"form.ZAWARDMAI"
style=
"display: none"
/>
-->
<el-input
v-model
.
trim=
"form.ZAWARDMAINAME"
clearable
placeholder=
"请选择中标主体单位"
readonly
@
click
.
native=
"handleSelect('ZAWARDMAI')"
/>
<div
v-for=
"(item, index) in ZBZTList"
:key=
"index"
>
<span>
{{
item
.
ZBPNAME_ZH
}}
</span>
<el-button
type=
"text"
@
click=
"delZBZT(index)"
>
删除
</el-button>
</div>
<el-button
type=
"primary"
style=
"margin-left: 100px;margin-bottom: 20px"
@
click=
"clickCompanyName"
>
新增
</el-button>
</el-form-item>
<el-form-item
v-if=
"number === '04'"
label=
"操盘情况"
prop=
"ZTRADER"
>
<el-select
v-model=
"form.ZTRADER"
style=
"width: 100%"
clearable
placeholder=
"请选择操盘情况"
>
<el-option
...
...
@@ -543,9 +545,9 @@
<el-link
type=
"primary"
@
click
.
stop=
"proCheckDetails(row)"
>
{{
row
.
ZBPNAME_ZH
}}
</el-link>
</
template
>
</el-table-column>
<el-table-column
label=
"核算组织编码"
prop=
"ZACORGNO"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"单位编码"
prop=
"ZBP"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"公司/个人"
prop=
"ZBPTYPENAME"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"核算组织编码"
prop=
"ZACORGNO"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"单位编码"
prop=
"ZBP"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"公司/个人"
prop=
"ZBPTYPENAME"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"统一社会信用代码(境外注册号)/证件号码"
prop=
"ZUSCC"
width=
"300"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"是否集团内单位"
prop=
"ZINCLIENT"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"{ row }"
>
...
...
@@ -656,10 +658,20 @@
@
funClose=
"ZPOSCloseVisible"
@
getValue=
"ZPOSHandlegetName"
/>
<!-- //往来单位弹窗-->
<CompanyDialog
ref=
"companyQueryList"
:visible
.
sync=
"companyDialogVisible"
:selection-list=
"ZBZTList"
:father-type=
"'project'"
@
funClose=
"companyCloseVisible"
@
getValue=
"handleCompanygetName"
/>
</div>
</template>
<
script
>
import
CompanyDialog
from
'@/views/list/CompanyDialog'
import
{
proGetCompany
,
projectAdd
,
projectEdit
,
getDictAll
,
projectBYID
,
projectQuery
,
ServerTime
}
from
'@/views/projectInfo/api'
import
{
Store
}
from
'@/utils/storage'
import
{
storeKey
}
from
'@/utils/auth'
...
...
@@ -678,6 +690,7 @@ export default {
ZprojtypeDialog
,
deptCommonDialog
,
regionDialog
,
CompanyDialog
,
HandlerDialog
},
data
()
{
...
...
@@ -761,6 +774,8 @@ export default {
zprojTypeDialogVisible
:
false
,
busTypeDialogVisible
:
false
,
ZPOSDialogVisible
:
false
,
companyDialogVisible
:
false
,
// 往来单位弹窗
ZBZTList
:
[],
// 中标主体单位List
form
:
{
fatherNum
:
this
.
$route
.
query
.
number
,
ZFUNDNAME
:
''
,
...
...
@@ -1477,6 +1492,30 @@ export default {
ZPOSCloseVisible
(
data
)
{
this
.
ZPOSDialogVisible
=
data
},
/** 往来单位关闭dialog(子给父传值)*/
companyCloseVisible
(
data
)
{
this
.
companyDialogVisible
=
data
},
/** 中标主体单位子组件给父组件赋值*/
handleCompanygetName
(
list
)
{
console
.
log
(
'list'
,
list
)
this
.
ZBZTList
=
JSON
.
parse
(
JSON
.
stringify
(
list
))
this
.
form
.
ZAWARDMAINAME
=
this
.
ZBZTList
.
map
(
item
=>
item
.
ZBPNAME_ZH
).
join
(
','
)
this
.
form
.
ZAWARDMAI
=
this
.
ZBZTList
.
map
(
item
=>
item
.
ZBP
).
join
(
','
)
this
.
$refs
[
'form'
].
validateField
(
'ZAWARDMAINAME'
)
},
/** 中标主体单位点击触发*/
clickCompanyName
()
{
this
.
companyDialogVisible
=
true
this
.
$refs
.
companyQueryList
.
getList
()
// 项目名称点击时调用子组件列表查询方法
},
/** 中标主体单位删除*/
delZBZT
(
i
)
{
this
.
ZBZTList
.
splice
(
i
,
1
)
this
.
form
.
ZAWARDMAINAME
=
this
.
ZBZTList
.
map
(
item
=>
item
.
ZBPNAME_ZH
).
join
(
','
)
this
.
form
.
ZAWARDMAI
=
this
.
ZBZTList
.
map
(
item
=>
item
.
ZBP
).
join
(
','
)
this
.
$refs
[
'form'
].
validateField
(
'ZAWARDMAINAME'
)
},
/** 项目类型点击*/
clickZprojtype
()
{
this
.
zprojTypeDialogVisible
=
true
...
...
@@ -1527,6 +1566,13 @@ export default {
}
projectBYID
(
queryID
).
then
(
res
=>
{
const
formList
=
res
.
data
for
(
let
i
=
0
,
l
=
formList
.
ZAWARDMAI
.
split
(
','
).
length
;
i
<
l
;
i
++
)
{
const
ZBP
=
formList
.
ZAWARDMAI
.
split
(
','
)[
i
]
const
ZBPNAME_ZH
=
formList
.
ZAWARDMAINAME
.
split
(
','
)[
i
]
const
list
=
{
ZBP
,
ZBPNAME_ZH
}
console
.
log
(
'获取详情'
,
list
)
this
.
ZBZTList
.
push
(
list
)
}
this
.
form
=
{
BUSINESSID
:
formList
.
BUSINESSID
,
ZFUNDNAME
:
formList
.
ZFUNDNAME
,
...
...
@@ -1714,6 +1760,8 @@ export default {
this
.
$refs
[
'form'
].
validate
((
valide
,
object
)
=>
{
if
(
valide
)
{
this
.
addLoading
=
true
this
.
form
.
ZAWARDMAINAME
=
this
.
ZBZTList
.
map
(
item
=>
item
.
ZBPNAME_ZH
).
join
(
','
)
this
.
form
.
ZAWARDMAI
=
this
.
ZBZTList
.
map
(
item
=>
item
.
ZBP
).
join
(
','
)
const
formList
=
this
.
form
// form 表单截取部分数据 以便新增或修改
this
.
form
=
{
...
...
@@ -1922,11 +1970,11 @@ export default {
this
.
form
.
ZPRO_ORG
=
code
this
.
unitOpen
=
false
break
case
'ZAWARDMAI'
:
// 中标主体单位
this
.
form
.
ZAWARDMAINAME
=
name
this
.
form
.
ZAWARDMAI
=
code
this
.
unitOpen
=
false
break
//
case 'ZAWARDMAI': // 中标主体单位
//
this.form.ZAWARDMAINAME = name
//
this.form.ZAWARDMAI = code
//
this.unitOpen = false
//
break
case
'ZINSURED'
:
// 投保人
this
.
form
.
ZINSUREDNAME
=
name
this
.
form
.
ZINSURED
=
code
...
...
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