Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
严立
/
cd-bid
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5de8dc13
authored
Jul 13, 2020
by
严立
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
v1.0.1 - 测试版本
parent
b9777807
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
493 additions
and
136 deletions
src/common/js/host.js
src/view/personal/supplier-notice.js
src/view/personal/supplier-notice.vue
src/view/public/bid-notice.vue
src/common/js/host.js
View file @
5de8dc13
let
output
=
{
let
output
=
{
// 开发路径
// 开发路径
base
:
'http://bid-server.meiqicloud.com/'
,
//
base: 'http://bid-server.meiqicloud.com/',
resources
:
'http://bid-web.meiqicloud.com/'
,
//
resources: 'http://bid-web.meiqicloud.com/',
agentSignIn
:
'http://bid-vue.meiqicloud.com/'
//
agentSignIn: 'http://bid-vue.meiqicloud.com/'
// 正式路径
// 正式路径
//
base: '/Api/',
base
:
'/Api/'
,
//
resources: 'http://bid-web.meiqicloud.com',
resources
:
'http://bid-web.meiqicloud.com'
,
//
agentSignIn: 'http://bid-vue.meiqicloud.com/'
agentSignIn
:
'http://bid-vue.meiqicloud.com/'
}
}
output
.
uploadFile
=
output
.
base
+
'bid/common/webupload/upload'
output
.
uploadFile
=
output
.
base
+
'bid/common/webupload/upload'
...
...
src/view/personal/supplier-notice.js
View file @
5de8dc13
...
@@ -61,16 +61,50 @@ let output = function (thisVue, id, type) {
...
@@ -61,16 +61,50 @@ let output = function (thisVue, id, type) {
// 竞价表格
// 竞价表格
let
funcRawData
=
funcResponse
.
package
let
funcRawData
=
funcResponse
.
packageAll
funcRawData
.
sort
(
function
(
a
,
b
)
{
let
funcMainWeight
=
1000
// 计算 a 的索引权重
let
funcIndex
=
a
.
index
.
toString
().
split
(
'-'
)
let
funcA
=
Number
(
funcIndex
[
0
])
*
funcMainWeight
if
(
funcIndex
[
1
])
{
a
.
isChild
=
true
funcA
=
funcA
+
Number
(
funcIndex
[
1
])
}
else
{
a
.
isChild
=
false
}
// 计算 b 的索引权重
funcIndex
=
b
.
index
.
toString
().
split
(
'-'
)
let
funcB
=
Number
(
funcIndex
[
0
])
*
funcMainWeight
if
(
funcIndex
[
1
])
{
b
.
isChild
=
true
funcB
=
funcB
+
Number
(
funcIndex
[
1
])
}
else
{
b
.
isChild
=
false
}
return
funcA
-
funcB
})
for
(
let
i
=
0
,
len
=
funcRawData
.
length
;
i
<
len
;
i
++
)
{
for
(
let
i
=
0
,
len
=
funcRawData
.
length
;
i
<
len
;
i
++
)
{
let
funcItem
=
{
let
funcItem
=
{
'index'
:
i
+
1
,
// 序号
'index'
:
funcRawData
[
i
].
index
.
toString
(),
// 序号
'id'
:
funcRawData
[
i
].
biddingPackageId
,
// 标识
'id'
:
funcRawData
[
i
].
biddingPackageId
,
// 标识
'object'
:
funcRawData
[
i
].
name
?
funcRawData
[
i
].
name
:
''
,
// 标的
'object'
:
funcRawData
[
i
].
name
?
funcRawData
[
i
].
name
:
''
,
// 标的
'budget'
:
funcRawData
[
i
].
fixedPrice
,
// 预算金额
'budget'
:
funcRawData
[
i
].
fixedPrice
,
// 预算金额
'quantity'
:
funcRawData
[
i
].
num
,
// 标的数量
'quantity'
:
funcRawData
[
i
].
num
,
// 标的数量
'requirement'
:
funcRawData
[
i
].
requirement
,
// 竞价参数要求
'requirement'
:
funcRawData
[
i
].
requirement
,
// 竞价参数要求
'isWin'
:
funcRawData
[
i
].
selected
'isChild'
:
funcRawData
[
i
].
isChild
,
}
if
(
!
funcItem
.
isChild
)
{
if
(
funcRawData
[
i
+
1
]
&&
funcRawData
[
i
+
1
].
isChild
)
{
funcItem
.
haveChild
=
true
}
else
{
funcItem
.
haveChild
=
false
}
}
else
{
funcItem
.
haveChild
=
false
}
}
funcPackage
.
push
(
funcItem
)
funcPackage
.
push
(
funcItem
)
}
}
...
...
src/view/personal/supplier-notice.vue
View file @
5de8dc13
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
<!-- 合同列表 - 竞价 -->
<!-- 合同列表 - 竞价 -->
<div
v-if=
"[0].indexOf(noticeType) >= 0 && tableShow"
class=
"info-item"
>
<div
v-if=
"[0].indexOf(noticeType) >= 0 && tableShow"
class=
"info-item"
>
<el-table
:data=
"componentContract"
stripe
:header-cell-style=
"tableHeaderStyle"
>
<el-table
:data=
"componentContract"
stripe
:header-cell-style=
"tableHeaderStyle"
>
<el-table-column
type
=
"index"
label=
"合同包"
width=
"80"
align=
"center"
></el-table-column>
<el-table-column
prop
=
"index"
label=
"合同包"
width=
"80"
align=
"center"
></el-table-column>
<el-table-column
prop=
"object"
label=
"标的"
></el-table-column>
<el-table-column
prop=
"object"
label=
"标的"
></el-table-column>
<el-table-column
prop=
"requirement"
label=
"参数要求"
></el-table-column>
<el-table-column
prop=
"requirement"
label=
"参数要求"
></el-table-column>
<el-table-column
prop=
"quantity"
label=
"数量"
align=
"center"
></el-table-column>
<el-table-column
prop=
"quantity"
label=
"数量"
align=
"center"
></el-table-column>
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
<el-table-column
align=
"center"
>
<el-table-column
align=
"center"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<div
class=
"global-cursor row"
>
<div
class=
"global-cursor row"
>
<span
class=
"global-color-blue"
@
click=
"onQueryQuoteRecord(scope.row
)"
>
报价记录
</span>
<span
v-if=
"!scope.row.isChild"
class=
"global-color-blue"
@
click=
"onQueryQuoteRecord(scope.row, scope.$index
)"
>
报价记录
</span>
<span
v-if=
"scope.row.isWin"
class=
"is-win global-color-green"
>
中标
</span>
<span
v-if=
"scope.row.isWin"
class=
"is-win global-color-green"
>
中标
</span>
</div>
</div>
</
template
>
</
template
>
...
@@ -124,7 +124,7 @@
...
@@ -124,7 +124,7 @@
<span>
填写报价
</span>
<span>
填写报价
</span>
</div>
</div>
</div>
</div>
<el-table
:data=
"componentContract"
key=
"select"
stripe
:header-cell-style=
"tableHeaderStyle"
@
selection-change=
"(selection) => onTableSelectionChange('offer', selection)
"
>
<el-table
:data=
"componentContract"
key=
"select"
stripe
:header-cell-style=
"tableHeaderStyle"
:row-class-name=
"setChildHide"
@
selection-change=
"selectionQuote
"
>
<el-table-column
type=
"selection"
width=
"60"
align=
"center"
:selectable=
"onTableUnableSelection"
></el-table-column>
<el-table-column
type=
"selection"
width=
"60"
align=
"center"
:selectable=
"onTableUnableSelection"
></el-table-column>
<el-table-column
type=
"index"
label=
"合同包"
width=
"120"
align=
"center"
></el-table-column>
<el-table-column
type=
"index"
label=
"合同包"
width=
"120"
align=
"center"
></el-table-column>
<el-table-column
prop=
"object"
label=
"标的"
min-width=
"100"
></el-table-column>
<el-table-column
prop=
"object"
label=
"标的"
min-width=
"100"
></el-table-column>
...
@@ -133,7 +133,7 @@
...
@@ -133,7 +133,7 @@
</el-table>
</el-table>
<span
slot=
"footer"
class=
"dialog-footer row con-c align-c"
>
<span
slot=
"footer"
class=
"dialog-footer row con-c align-c"
>
<el-button
v-if=
"tableSelection.length === 0"
disable
class=
"global-disable-button"
>
确 定
</el-button>
<el-button
v-if=
"tableSelection.length === 0"
disable
class=
"global-disable-button"
>
确 定
</el-button>
<el-button
v-if=
"tableSelection.length >= 1"
class=
"global-enable-button"
@
click=
"on
PriceNext('offer'
)"
>
确 定
</el-button>
<el-button
v-if=
"tableSelection.length >= 1"
class=
"global-enable-button"
@
click=
"on
QuoteNext(
)"
>
确 定
</el-button>
</span>
</span>
</div>
</div>
...
@@ -146,35 +146,94 @@
...
@@ -146,35 +146,94 @@
<span>
填写报价
</span>
<span>
填写报价
</span>
</div>
</div>
</div>
</div>
<el-table
:data=
"tableQuote
Buffer"
key=
"offer"
stripe
:header-cell-style=
"tableHeaderStyle"
@
selection-change=
"(selection) => onTableSelectionChange('price', selection)
"
>
<el-table
:data=
"tableQuote
"
key=
"offer"
stripe
:header-cell-style=
"tableHeaderStyle"
@
selection-change=
"selectionQuote
"
>
<el-table-column
type
=
"index"
label=
"合同包"
width=
"120"
align=
"center"
></el-table-column>
<el-table-column
prop
=
"index"
label=
"合同包"
width=
"120"
align=
"center"
></el-table-column>
<el-table-column
prop=
"object"
label=
"标的"
min-width=
"100"
></el-table-column>
<el-table-column
prop=
"object"
label=
"标的"
min-width=
"100"
></el-table-column>
<el-table-column
prop=
"requirement"
label=
"参数要求"
min-width=
"2
30
"
></el-table-column>
<el-table-column
prop=
"requirement"
label=
"参数要求"
min-width=
"2
00"
align=
"center
"
></el-table-column>
<el-table-column
prop=
"quantity"
label=
"数量"
width=
"120"
align=
"center"
></el-table-column>
<el-table-column
prop=
"quantity"
label=
"数量"
width=
"120"
align=
"center"
></el-table-column>
<el-table-column
prop=
"price"
label=
"报价金额(元)"
min-width=
"100"
align=
"center"
>
<el-table-column
prop=
"price"
label=
"报价金额(元)"
min-width=
"100"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<div
class=
"quote-table col"
>
<div
v-if=
"Boolean(scope.row.haveChild)"
class=
"quote-table col"
>
<span>
</span>
<span
>
{{
scope
.
row
.
price
}}
</span>
<span
class=
"global-color-red"
>
{{
scope
.
row
.
tip
}}
</span>
</div>
<div
v-if=
"!Boolean(scope.row.haveChild)"
class=
"quote-table col"
>
<span>
</span>
<span>
</span>
<el-input
size=
"small"
v-model=
"scope.row.price"
maxlength=
"14"
@
change=
"(value) =>
{ on
Offer
Input(value, scope.$index, scope.row) }">
</el-input>
<el-input
size=
"small"
v-model=
"scope.row.price"
maxlength=
"14"
@
change=
"(value) =>
{ on
Quote
Input(value, scope.$index, scope.row) }">
</el-input>
<span
class=
"global-color-red"
>
{{
scope
.
row
.
tip
}}
</span>
<span
class=
"global-color-red"
>
{{
scope
.
row
.
tip
}}
</span>
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"price"
label=
"备注"
min-width=
"30"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"Boolean(scope.row.haveChild)"
class=
"quote-table col"
>
<!--
<i
class=
"el-icon-edit-outline"
></i>
-->
</div>
<div
v-if=
"!Boolean(scope.row.haveChild)"
class=
"quote-table col"
>
<i
class=
"el-icon-edit-outline"
@
click=
"onQuoteNote(scope.row, scope.$index)"
></i>
</div>
</
template
>
</el-table-column>
</el-table>
</el-table>
<span
slot=
"footer"
class=
"dialog-footer row con-c align-c"
>
<span
slot=
"footer"
class=
"dialog-footer row con-c align-c"
>
<el-button
class=
"global-routine-button"
@
click=
"on
Pric
ePrevious()"
>
上一步
</el-button>
<el-button
class=
"global-routine-button"
@
click=
"on
Quot
ePrevious()"
>
上一步
</el-button>
<el-button
v-if=
"tableSelection.length === 0"
disable
class=
"
global
-disable-button"
>
提交报价
</el-button>
<el-button
v-if=
"tableSelection.length === 0"
disable
class=
"
dialog
-disable-button"
>
提交报价
</el-button>
<el-button
v-if=
"tableSelection.length >= 1"
class=
"
global-enable-button"
@
click=
"onPriceNext('submit'
)"
>
提交报价
</el-button>
<el-button
v-if=
"tableSelection.length >= 1"
class=
"
dialog-button"
@
click=
"onQuoteSubmit(
)"
>
提交报价
</el-button>
</span>
</span>
</div>
</div>
</el-dialog>
</el-dialog>
<el-dialog
title=
"填写报价备注"
:visible
.
sync=
"winQuoteNote"
:lock-scroll=
"false"
width=
"400px"
:close-on-click-modal=
"false"
>
<el-input
type=
"textarea"
v-model=
"tableNote"
maxlength=
"500"
:autosize=
"{ minRows: 4 }"
show-word-limit
></el-input>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"winQuoteNote = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"onQuoteNoteSubmit()"
>
确 定
</el-button>
</span>
</el-dialog>
<el-dialog
title=
"报价记录"
:visible
.
sync=
"winQuoteRecord"
:lock-scroll=
"false"
width=
"1000px"
:close-on-click-modal=
"false"
>
<!-- 附属合同样式 -->
<div
v-if=
"quoteRecordHaveChild"
class=
"col"
>
<div
v-for=
"(item, index) in quoteRecord"
:key=
"index"
class=
"col"
>
<div>
<el-table
:data=
"item"
stripe
:header-cell-style=
"tableHeaderStyle"
>
<el-table-column
prop=
"time"
label=
"报价时间"
width=
"480"
></el-table-column>
<el-table-column
prop=
"price"
label=
"报价金额(元)"
width=
"480"
></el-table-column>
</el-table>
</div>
<div>
<el-table
:data=
"item[0].child"
stripe
:header-cell-style=
"tableHeaderStyle"
>
<el-table-column
prop=
"index"
label=
"分包"
width=
"80"
></el-table-column>
<el-table-column
prop=
"requirement"
label=
"参数要求"
min-width=
"300"
></el-table-column>
<el-table-column
prop=
"quantity"
label=
"数量"
width=
"120"
></el-table-column>
<el-table-column
prop=
"price"
label=
"报价金额(元)"
min-width=
"120"
></el-table-column>
<el-table-column
prop=
"remark"
label=
"备注"
min-width=
"200"
></el-table-column>
</el-table>
</div>
<span>
</span>
<span>
</span>
</div>
</div>
<!-- 竞价报价记录 -->
<div
v-if=
"!quoteRecordHaveChild"
class=
"row con-c"
>
<el-dialog
title=
"提示"
:visible
.
sync=
"winQuoteRecord"
:lock-scroll=
"false"
width=
"400px"
:close-on-click-modal=
"false"
>
<div
class=
"col"
>
<div
class=
"row con-c"
>
<div>
<span>
报价记录
</span>
<el-table
:data=
"quoteRecord"
stripe
:header-cell-style=
"tableHeaderStyle"
>
<el-table-column
prop=
"index"
label=
"合同包"
width=
"120"
></el-table-column>
<el-table-column
prop=
"object"
label=
"标的"
min-width=
"200"
></el-table-column>
<el-table-column
prop=
"requirement"
label=
"参数要求"
min-width=
"300"
></el-table-column>
<el-table-column
prop=
"quantity"
label=
"数量"
width=
"120"
></el-table-column>
<el-table-column
prop=
"budget"
label=
"限价(元)"
min-width=
"100"
></el-table-column>
</el-table>
</div>
<div>
<el-table
:data=
"quoteRecord.length > 0 ? quoteRecord[0].list : []"
stripe
:header-cell-style=
"tableHeaderStyle"
>
<el-table-column
prop=
"time"
label=
"报价时间"
></el-table-column>
<el-table-column
prop=
"price"
label=
"报价金额(元)"
></el-table-column>
</el-table>
</div>
</div>
</div>
</div>
</el-dialog>
</el-dialog>
...
@@ -244,8 +303,11 @@
...
@@ -244,8 +303,11 @@
background
:
'#F2F2F2'
background
:
'#F2F2F2'
},
},
maxQuote
:
1000000000000
,
maxQuote
:
1000000000000
,
tableQuote
:
[],
// 报价数据提交
tableQuote
:
[],
// 竞价 - 合同数据
tableQuoteBuffer
:
[],
// 报价填写数据缓存
tableNote
:
''
,
// 竞价 - 注释
tableNoteIndex
:
0
,
// 竞价 - 注释索引
quoteRecord
:
[],
// 竞价 - 记录数据
quoteRecordHaveChild
:
false
,
// 竞价 - 记录类型
// element-ui table 自适应宽度渲染错误修复
// element-ui table 自适应宽度渲染错误修复
tableShow
:
false
,
tableShow
:
false
,
...
@@ -253,9 +315,6 @@
...
@@ -253,9 +315,6 @@
tableWidthPercentage
:
[
20
,
20
,
20
,
20
,
20
],
tableWidthPercentage
:
[
20
,
20
,
20
,
20
,
20
],
tableQuoteRecordTimer
:
0
,
tableQuoteRecordTimer
:
0
,
quoteRecordActive
:
-
1
,
quoteRecordList
:
[],
identityState
:
0
,
identityState
:
0
,
isbuy
:
false
,
isbuy
:
false
,
...
@@ -263,12 +322,13 @@
...
@@ -263,12 +322,13 @@
tipText
:
''
,
tipText
:
''
,
winTip
:
false
,
winTip
:
false
,
winContract
:
false
,
winContract
:
false
,
// 采购 - 合同选择
winDocument
:
false
,
winDocument
:
false
,
// 采购 - 标书下载
winQuote
:
false
,
winQuote
:
false
,
// 竞价 - 操作窗口
winQuoteInput
:
false
,
winQuoteNote
:
false
,
// 竞价 - 报价备注
winQuoteRecord
:
false
,
winQuoteInput
:
false
,
// 竞价 - 报价输入
winQuoteSelection
:
false
,
winQuoteRecord
:
false
,
// 竞价 - 报价记录
winQuoteSelection
:
false
,
// 竞价 - 合同选择
windowChangeTimer
:
0
,
windowChangeTimer
:
0
,
}
}
...
@@ -332,8 +392,6 @@
...
@@ -332,8 +392,6 @@
this
.
componentContract
=
funcPackage
this
.
componentContract
=
funcPackage
this
.
componentNotice
=
funcOther
this
.
componentNotice
=
funcOther
console
.
log
(
this
.
componentContract
)
// 公告状态设置
// 公告状态设置
let
funcIndex
=
0
let
funcIndex
=
0
for
(
funcIndex
;
funcIndex
<
this
.
componentProgress
.
timestamp
.
length
;
funcIndex
++
)
{
for
(
funcIndex
;
funcIndex
<
this
.
componentProgress
.
timestamp
.
length
;
funcIndex
++
)
{
...
@@ -429,35 +487,6 @@
...
@@ -429,35 +487,6 @@
},
},
onQueryQuoteRecord
:
function
(
funcItem
)
{
console
.
log
(
funcItem
)
this
.
winQuoteRecord
=
true
// this.quoteRecordList = []
// this.quoteRecordActive = funcIndex
// let funcParam = {
// 'pageNo': 1,
// 'pageSize': 5,
// 'biddingPackageId': funcItem.id,
// }
// iRequest.request(iHost.base + 'bid/zBiddingPackageOffer/packageHaveBidLogs', funcParam, 'json', 'post')
// .then((funcResponse) => {
// let funcRawData = funcResponse.page.list
// let funcList = []
// for (let i = 0, len = funcRawData.length; i
<
len
;
i
++
)
{
// let funcItem = {
// 'time': funcRawData[i].createDate,
// 'price': funcRawData[i].price,
// }
// funcList.push(funcItem)
// }
// this.quoteRecordList = funcList
// if (this.quoteRecordList.length === 0) {
// this.quoteRecordList.push({ 'time': '暂无报价', 'price': 0 })
// }
// })
},
onInterceptQuoteRecord
:
function
()
{
onInterceptQuoteRecord
:
function
()
{
clearTimeout
(
this
.
tableQuoteRecordTimer
)
clearTimeout
(
this
.
tableQuoteRecordTimer
)
...
@@ -560,13 +589,146 @@
...
@@ -560,13 +589,146 @@
case
'document'
:
case
'document'
:
this
.
tableSelection
=
funcSelection
this
.
tableSelection
=
funcSelection
break
break
}
},
/**
* 竞价报价
* @function
* @returns
*/
onQuote
:
function
()
{
// 未登录的全部跳转登录界面
if
(
!
this
.
$store
.
getters
.
isSignIn
)
{
this
.
$store
.
commit
(
'redirectPath'
,
this
.
$route
.
fullPath
)
this
.
$router
.
push
(
'/signIn'
)
return
}
// 专家身份不能下载
if
(
this
.
$store
.
getters
.
info
.
identity
===
1
)
{
this
.
tipText
=
'您不是供应商,不能报价。'
this
.
winTip
=
true
return
}
// 供应身份但未通过审核不能下载
if
(
this
.
$store
.
getters
.
info
.
identity
===
2
&&
this
.
$store
.
getters
.
info
.
register
!==
1
)
{
this
.
tipText
=
'您的注册信息尚未审核通过,暂不能报价。'
this
.
winTip
=
true
return
}
// 供应身份而且通过审核
if
(
this
.
$store
.
getters
.
info
.
identity
===
2
&&
this
.
$store
.
getters
.
info
.
register
===
1
)
{
this
.
winQuote
=
true
this
.
winQuoteInput
=
false
this
.
winQuoteSelection
=
true
this
.
tableQuote
=
[]
this
.
tableSelection
=
[]
}
},
case
'offer'
:
/**
* 竞价 - 隐藏合同选择界面附属合同
* @function
* @returns
*/
setChildHide
:
function
(
funcRow
,
funcIndex
)
{
if
(
funcRow
.
row
.
isChild
)
{
return
'table-row-hide'
}
else
{
return
''
}
},
/**
* 竞价 - 填写报价窗口下一步
* @function
* @returns
*/
onQuoteNext
:
function
()
{
this
.
winQuoteInput
=
true
this
.
winQuoteSelection
=
false
},
/**
* 竞价 - 填写报价窗口上一步
* @function
* @returns
*/
onQuotePrevious
:
function
()
{
this
.
winQuoteInput
=
false
this
.
winQuoteSelection
=
true
this
.
tableQuote
=
[]
this
.
tableSelection
=
[]
},
/**
* 竞价 - 选择合同集合
* @function
* @param {number} funcValue
* @param {number} funcIndex
* @param {object} funcItem
* @returns
*/
selectionQuote
:
function
(
funcSelection
)
{
if
(
funcSelection
.
length
===
0
)
return
let
funcSelectionBuffer
=
[]
// 点击全选时删除子包
for
(
let
i
=
0
,
l
=
funcSelection
.
length
;
i
<
l
;
i
++
)
{
let
funcRegExp
=
new
RegExp
(
'^[0-9]+$'
,
'g'
)
if
(
funcRegExp
.
test
(
funcSelection
[
i
].
index
))
{
funcSelectionBuffer
.
push
(
funcSelection
[
i
])
}
}
funcSelection
=
funcSelectionBuffer
funcSelectionBuffer
=
[]
// 勾选主包时添加子包
for
(
let
i
=
0
,
l
=
funcSelection
.
length
;
i
<
l
;
i
++
)
{
for
(
let
ii
=
0
,
ll
=
this
.
componentContract
.
length
;
ii
<
ll
;
ii
++
)
{
if
(
funcSelection
[
i
].
index
===
this
.
componentContract
[
ii
].
index
||
this
.
componentContract
[
ii
].
index
.
indexOf
(
funcSelection
[
i
].
index
+
'-'
)
>=
0
)
{
funcSelectionBuffer
.
push
(
this
.
componentContract
[
ii
])
}
}
}
// 重新按照索引排序
funcSelectionBuffer
.
sort
(
function
(
a
,
b
)
{
let
funcMainWeight
=
1000
// 计算 a 的索引权重
let
funcIndex
=
a
.
index
.
toString
().
split
(
'-'
)
let
funcA
=
Number
(
funcIndex
[
0
])
*
funcMainWeight
if
(
funcIndex
[
1
])
{
a
.
isChild
=
true
funcA
=
funcA
+
Number
(
funcIndex
[
1
])
}
else
{
a
.
isChild
=
false
}
// 计算 b 的索引权重
funcIndex
=
b
.
index
.
toString
().
split
(
'-'
)
let
funcB
=
Number
(
funcIndex
[
0
])
*
funcMainWeight
if
(
funcIndex
[
1
])
{
b
.
isChild
=
true
funcB
=
funcB
+
Number
(
funcIndex
[
1
])
}
else
{
b
.
isChild
=
false
}
return
funcA
-
funcB
})
funcSelection
=
funcSelectionBuffer
this
.
tableSelection
=
funcSelection
this
.
tableSelection
=
funcSelection
this
.
tableQuoteBuffer
=
[]
this
.
tableQuote
=
[]
for
(
let
i
=
0
,
len
=
funcSelection
.
length
;
i
<
len
;
i
++
)
{
for
(
let
i
=
0
,
len
=
funcSelection
.
length
;
i
<
len
;
i
++
)
{
let
funcItem
=
{
let
funcItem
=
{
'index'
:
i
,
'index'
:
funcSelection
[
i
].
index
,
'id'
:
funcSelection
[
i
].
id
,
'id'
:
funcSelection
[
i
].
id
,
'name'
:
funcSelection
[
i
].
name
,
'name'
:
funcSelection
[
i
].
name
,
'price'
:
''
,
'price'
:
''
,
...
@@ -574,48 +736,99 @@
...
@@ -574,48 +736,99 @@
'budget'
:
funcSelection
[
i
].
budget
,
'budget'
:
funcSelection
[
i
].
budget
,
'quantity'
:
funcSelection
[
i
].
quantity
,
'quantity'
:
funcSelection
[
i
].
quantity
,
'requirement'
:
funcSelection
[
i
].
requirement
,
'requirement'
:
funcSelection
[
i
].
requirement
,
'tip'
:
''
'tip'
:
''
,
}
'remark'
:
''
,
'isChild'
:
funcSelection
[
i
].
isChild
,
this
.
tableQuoteBuffer
.
push
(
funcItem
)
'haveChild'
:
funcSelection
[
i
].
haveChild
,
this
.
tableQuote
[
i
]
=
{
'packageId'
:
funcItem
.
id
,
'price'
:
''
}
}
}
break
this
.
tableQuote
.
push
(
funcItem
)
}
}
},
},
/**
/**
* 竞价
报价
* 竞价
- 备注填写
* @function
* @function
* @param {object} funcItem
* @param {number} funcIndex
* @returns
* @returns
*/
*/
onQuote
:
function
()
{
onQuoteNote
:
function
(
funcItem
,
funcIndex
)
{
this
.
winQuote
=
true
this
.
winQuoteNote
=
true
this
.
winQuoteSelection
=
true
this
.
tableNoteIndex
=
funcIndex
this
.
winQuoteInput
=
false
this
.
tableNote
=
this
.
tableQuote
[
this
.
tableNoteIndex
].
remark
this
.
tableSelection
=
[]
this
.
tableQuote
=
[]
this
.
tableQuoteBuffer
=
[]
},
},
onPricePrevious
:
function
()
{
/**
this
.
winQuoteSelection
=
true
* 竞价 - 备注提交
this
.
winQuoteInput
=
false
* @function
this
.
tableSelection
=
[]
* @returns
this
.
tableQuote
=
[]
*/
this
.
tableQuoteBuffer
=
[]
onQuoteNoteSubmit
:
function
()
{
this
.
tableQuote
[
this
.
tableNoteIndex
].
remark
=
this
.
tableNote
this
.
winQuoteNote
=
false
},
},
onPriceNext
:
function
(
funcType
)
{
/**
switch
(
funcType
)
{
* 竞价 - 填写报价
case
'offer'
:
* @function
this
.
winQuoteSelection
=
false
* @param {number} funcValue
this
.
winQuoteInput
=
true
* @param {number} funcIndex
break
* @param {object} funcItem
* @returns
*/
onQuoteInput
:
function
(
funcValue
,
funcIndex
,
funcItem
)
{
// 校验输入数值
if
(
!
iRuleAtom
.
isMoney
(
funcValue
))
{
funcItem
.
tip
=
'请输入正确金额格式'
this
.
tableQuote
[
funcIndex
]
=
undefined
return
}
if
(
funcValue
===
''
)
{
funcItem
.
tip
=
'请输入报价金额'
this
.
tableQuote
[
funcIndex
]
=
undefined
return
}
if
(
funcValue
>
funcItem
.
budget
&&
funcItem
.
budget
!==
0
)
{
funcItem
.
tip
=
'超过 '
+
funcItem
.
budget
+
' 元限价'
}
else
{
funcItem
.
tip
=
''
}
if
(
funcValue
>
this
.
maxQuote
)
{
funcItem
.
tip
=
'不能超过一百亿元'
this
.
tableQuote
[
funcIndex
]
=
undefined
return
}
if
(
funcItem
.
isChild
)
{
// 计算主包价格
let
funcPrice
=
0
let
funcChildStart
=
funcIndex
-
1
let
funcChildEnd
=
funcIndex
+
1
while
(
this
.
tableQuote
[
funcChildStart
].
isChild
)
{
if
(
this
.
tableQuote
[
funcChildStart
].
price
)
{
funcPrice
=
funcPrice
+
Number
(
this
.
tableQuote
[
funcChildStart
].
price
)
}
funcChildStart
=
funcChildStart
-
1
}
while
(
this
.
tableQuote
[
funcChildEnd
]
&&
this
.
tableQuote
[
funcChildEnd
].
isChild
)
{
if
(
this
.
tableQuote
[
funcChildEnd
].
price
)
{
funcPrice
=
funcPrice
+
Number
(
this
.
tableQuote
[
funcChildEnd
].
price
)
}
funcChildEnd
=
funcChildEnd
+
1
}
this
.
tableQuote
[
funcChildStart
].
price
=
Number
(
funcPrice
)
+
Number
(
funcItem
.
price
)
}
},
case
'submit'
:
/**
* 竞价 - 提交报价
* @function
* @returns
*/
onQuoteSubmit
:
function
()
{
if
(
this
.
tableQuote
.
length
===
0
)
{
if
(
this
.
tableQuote
.
length
===
0
)
{
this
.
$message
.
error
(
'请填写完整报价信息'
)
this
.
$message
.
error
(
'请填写完整报价信息'
)
return
return
...
@@ -633,9 +846,32 @@
...
@@ -633,9 +846,32 @@
}
}
}
}
let
funcQuoteData
=
[]
let
funcMainContract
=
-
1
for
(
let
i
=
0
,
l
=
this
.
tableQuote
.
length
;
i
<
l
;
i
++
)
{
if
(
!
this
.
tableQuote
[
i
].
isChild
)
{
let
funcItem
=
{
'packageId'
:
this
.
tableQuote
[
i
].
id
,
'price'
:
Number
(
this
.
tableQuote
[
i
].
price
),
'subpackageOffers'
:
[]
}
funcQuoteData
.
push
(
funcItem
)
funcMainContract
=
funcMainContract
+
1
}
else
{
let
funcItem
=
{
'packageId'
:
this
.
tableQuote
[
i
].
id
,
'price'
:
Number
(
this
.
tableQuote
[
i
].
price
),
'remark'
:
this
.
tableQuote
[
i
].
remark
,
}
funcQuoteData
[
funcMainContract
].
subpackageOffers
.
push
(
funcItem
)
}
}
let
funcParam
=
{
let
funcParam
=
{
'biddingProjectId'
:
this
.
componentProject
.
projectId
,
'biddingProjectId'
:
this
.
componentProject
.
projectId
,
'biddingOffers'
:
JSON
.
stringify
(
this
.
tableQuote
)
'biddingOffers'
:
JSON
.
stringify
(
funcQuoteData
)
}
}
let
funcOther
=
iRequest
.
request
(
iHost
.
base
+
'bid/zBiddingProject/biddingOffer'
,
funcParam
,
'json'
,
'post'
)
let
funcOther
=
iRequest
.
request
(
iHost
.
base
+
'bid/zBiddingProject/biddingOffer'
,
funcParam
,
'json'
,
'post'
)
...
@@ -646,35 +882,73 @@
...
@@ -646,35 +882,73 @@
.
catch
((
funcError
)
=>
{
.
catch
((
funcError
)
=>
{
this
.
$message
.
error
(
funcError
.
message
)
this
.
$message
.
error
(
funcError
.
message
)
})
})
break
}
},
},
onOfferInput
:
function
(
funcValue
,
funcIndex
,
funcItem
)
{
/**
if
(
!
iRuleAtom
.
isMoney
(
funcValue
))
{
* 竞价 - 报价记录
funcItem
.
tip
=
'请输入正确金额格式'
* @function
this
.
tableQuote
[
funcIndex
]
=
undefined
* @param {object} funcItem
return
* @returns
*/
onQueryQuoteRecord
:
function
(
funcItem
,
funcIndex
)
{
this
.
quoteRecord
=
[]
this
.
quoteRecordHaveChild
=
funcItem
.
haveChild
let
funcParam
=
{
'pageNo'
:
1
,
'pageSize'
:
5
,
'biddingPackageId'
:
funcItem
.
id
,
}
}
i
f
(
funcValue
===
''
)
{
i
Request
.
request
(
iHost
.
base
+
'bid/zBiddingPackageOffer/packageHaveBidLogs'
,
funcParam
,
'json'
,
'post'
)
funcItem
.
tip
=
'请输入报价金额'
.
then
((
funcResponse
)
=>
{
this
.
tableQuote
[
funcIndex
]
=
undefined
// jisuan
return
if
(
this
.
quoteRecordHaveChild
)
{
}
let
funcChild
=
[]
if
(
funcValue
>
funcItem
.
budget
&&
funcItem
.
budget
!==
0
)
{
for
(
let
i
=
funcIndex
+
1
,
l
=
this
.
componentContract
.
length
;
i
<
l
;
i
++
)
{
funcItem
.
tip
=
'超过 '
+
funcItem
.
budget
+
' 元限价'
if
(
this
.
componentContract
[
i
].
isChild
)
{
funcChild
.
push
(
this
.
componentContract
[
i
])
}
else
{
}
else
{
funcItem
.
tip
=
''
break
}
}
}
if
(
funcValue
>
this
.
maxQuote
)
{
let
funcList
=
[]
funcItem
.
tip
=
'不能超过一百亿元'
let
funcRawData
=
funcResponse
.
page
.
list
this
.
tableQuote
[
funcIndex
]
=
undefined
for
(
let
i
=
0
,
l
=
funcRawData
.
length
;
i
<
l
;
i
++
)
{
return
let
funcContract
=
[{
'time'
:
funcRawData
[
i
].
createDate
,
'price'
:
funcRawData
[
i
].
price
,
'child'
:
JSON
.
parse
(
JSON
.
stringify
(
funcChild
))
}]
for
(
let
ii
=
0
,
ll
=
funcContract
[
0
].
child
.
length
;
ii
<
ll
;
ii
++
)
{
for
(
let
iii
=
0
,
lll
=
funcRawData
[
i
].
subpackageOffers
.
length
;
iii
<
lll
;
iii
++
)
{
if
(
funcContract
[
0
].
child
[
ii
].
id
===
funcRawData
[
i
].
subpackageOffers
[
iii
].
packageId
)
{
funcContract
[
0
].
child
[
ii
].
price
=
funcRawData
[
i
].
subpackageOffers
[
iii
].
price
funcContract
[
0
].
child
[
ii
].
remark
=
funcRawData
[
i
].
subpackageOffers
[
iii
].
remark
}
}
}
funcList
.
push
(
funcContract
)
}
this
.
quoteRecord
=
funcList
}
else
{
let
funcContract
=
funcItem
let
funcList
=
[]
let
funcRawData
=
funcResponse
.
page
.
list
for
(
let
i
=
0
,
l
=
funcRawData
.
length
;
i
<
l
;
i
++
)
{
let
funcRecord
=
{
'time'
:
funcRawData
[
i
].
createDate
,
'price'
:
funcRawData
[
i
].
price
,
}
}
this
.
tableQuote
[
funcIndex
]
=
{
'packageId'
:
funcItem
.
id
,
'price'
:
funcValue
}
funcList
.
push
(
funcRecord
)
}
funcContract
.
list
=
funcList
this
.
quoteRecord
=
[
funcContract
]
}
this
.
winQuoteRecord
=
true
})
},
},
}
}
}
}
...
@@ -685,6 +959,44 @@
...
@@ -685,6 +959,44 @@
width
:
100%
;
width
:
100%
;
max-width
:
1140px
;
max-width
:
1140px
;
.table-row-hide
{
display
:
none
;
}
.dialog-button
{
width
:
160px
;
height
:
52px
;
margin
:
0
40px
!important
;
border-radius
:
26px
;
border
:
1px
@
colorBlue
solid
!important
;
color
:
@
colorWhite
!important
;
background
:
@
colorBlue
!important
;
}
.dialog-button
:focus
,
.dialog-button
:hover
{
border
:
1px
@
colorBlue
solid
!important
;
color
:
@
colorWhite
!important
;
background
:
@
colorBlue
!important
;
}
.dialog-disable-button
{
width
:
160px
;
height
:
52px
;
margin
:
0
40px
!important
;
border-radius
:
26px
;
border
:
1px
@
colorGrey50
solid
!important
;
color
:
@
colorWhite
!important
;
background
:
@
colorGrey50
!important
;
}
.dialog-disable-button
:focus
,
.dialog-disable-button
:hover
{
border
:
1px
@
colorGrey50
solid
!important
;
color
:
@
colorWhite
!important
;
background
:
@
colorGrey50
!important
;
}
.info-map
{
.info-map
{
height
:
66px
;
height
:
66px
;
border-bottom
:
1px
#EFEFEF
solid
;
border-bottom
:
1px
#EFEFEF
solid
;
...
...
src/view/public/bid-notice.vue
View file @
5de8dc13
...
@@ -200,7 +200,7 @@
...
@@ -200,7 +200,7 @@
<el-table-column
prop=
"price"
label=
"备注"
min-width=
"30"
align=
"center"
>
<el-table-column
prop=
"price"
label=
"备注"
min-width=
"30"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"Boolean(scope.row.haveChild)"
class=
"quote-table col"
>
<div
v-if=
"Boolean(scope.row.haveChild)"
class=
"quote-table col"
>
<
i
class=
"el-icon-edit-outline"
></i
>
<
!--
<i
class=
"el-icon-edit-outline"
></i>
--
>
</div>
</div>
<div
v-if=
"!Boolean(scope.row.haveChild)"
class=
"quote-table col"
>
<div
v-if=
"!Boolean(scope.row.haveChild)"
class=
"quote-table col"
>
<i
class=
"el-icon-edit-outline"
@
click=
"onQuoteNote(scope.row, scope.$index)"
></i>
<i
class=
"el-icon-edit-outline"
@
click=
"onQuoteNote(scope.row, scope.$index)"
></i>
...
@@ -209,7 +209,7 @@
...
@@ -209,7 +209,7 @@
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<span
slot=
"footer"
class=
"dialog-footer row con-c align-c"
>
<span
slot=
"footer"
class=
"dialog-footer row con-c align-c"
>
<el-button
class=
"
global-routine-button
"
@
click=
"onQuotePrevious()"
>
上一步
</el-button>
<el-button
class=
"
dialog-button-prev
"
@
click=
"onQuotePrevious()"
>
上一步
</el-button>
<el-button
v-if=
"tableSelection.length === 0"
disable
class=
"dialog-disable-button"
>
提交报价
</el-button>
<el-button
v-if=
"tableSelection.length === 0"
disable
class=
"dialog-disable-button"
>
提交报价
</el-button>
<el-button
v-if=
"tableSelection.length >= 1"
class=
"dialog-button"
@
click=
"onQuoteSubmit()"
>
提交报价
</el-button>
<el-button
v-if=
"tableSelection.length >= 1"
class=
"dialog-button"
@
click=
"onQuoteSubmit()"
>
提交报价
</el-button>
</span>
</span>
...
@@ -435,14 +435,6 @@
...
@@ -435,14 +435,6 @@
}
}
},
},
setChildHide
:
function
(
funcRow
,
funcIndex
)
{
if
(
funcRow
.
row
.
isChild
)
{
return
'table-row-hide'
}
else
{
return
''
}
},
/**
/**
* 报名
* 报名
* @function
* @function
...
@@ -636,6 +628,19 @@
...
@@ -636,6 +628,19 @@
},
},
/**
/**
* 竞价 - 隐藏合同选择界面附属合同
* @function
* @returns
*/
setChildHide
:
function
(
funcRow
,
funcIndex
)
{
if
(
funcRow
.
row
.
isChild
)
{
return
'table-row-hide'
}
else
{
return
''
}
},
/**
* 竞价 - 填写报价窗口下一步
* 竞价 - 填写报价窗口下一步
* @function
* @function
* @returns
* @returns
...
@@ -735,7 +740,7 @@
...
@@ -735,7 +740,7 @@
this
.
tableQuote
.
push
(
funcItem
)
this
.
tableQuote
.
push
(
funcItem
)
}
}
console
.
log
(
JSON
.
stringify
(
funcSelection
))
//
console.log(JSON.stringify(funcSelection))
},
},
onQuoteNote
:
function
(
funcItem
,
funcIndex
)
{
onQuoteNote
:
function
(
funcItem
,
funcIndex
)
{
...
@@ -801,7 +806,7 @@
...
@@ -801,7 +806,7 @@
funcChildEnd
=
funcChildEnd
+
1
funcChildEnd
=
funcChildEnd
+
1
}
}
this
.
tableQuote
[
funcChildStart
].
price
=
Number
(
funcPrice
)
+
Number
(
funcItem
.
price
)
this
.
tableQuote
[
funcChildStart
].
price
=
Number
(
funcPrice
)
+
Number
(
funcItem
.
price
)
console
.
log
(
JSON
.
stringify
(
this
.
tableQuote
))
//
console.log(JSON.stringify(this.tableQuote))
}
}
},
},
...
@@ -828,7 +833,6 @@
...
@@ -828,7 +833,6 @@
}
}
}
}
console
.
log
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
tableQuote
)))
let
funcQuoteData
=
[]
let
funcQuoteData
=
[]
let
funcMainContract
=
-
1
let
funcMainContract
=
-
1
for
(
let
i
=
0
,
l
=
this
.
tableQuote
.
length
;
i
<
l
;
i
++
)
{
for
(
let
i
=
0
,
l
=
this
.
tableQuote
.
length
;
i
<
l
;
i
++
)
{
...
@@ -850,9 +854,6 @@
...
@@ -850,9 +854,6 @@
}
}
}
}
console
.
log
(
JSON
.
stringify
(
funcQuoteData
))
let
funcParam
=
{
let
funcParam
=
{
'biddingProjectId'
:
this
.
componentProject
.
projectId
,
'biddingProjectId'
:
this
.
componentProject
.
projectId
,
'biddingOffers'
:
JSON
.
stringify
(
funcQuoteData
)
'biddingOffers'
:
JSON
.
stringify
(
funcQuoteData
)
...
@@ -883,6 +884,16 @@
...
@@ -883,6 +884,16 @@
display
:
none
;
display
:
none
;
}
}
.dialog-button-prev
{
width
:
160px
;
height
:
52px
;
margin
:
0
40px
!important
;
border-radius
:
26px
;
border
:
1px
@
colorBlue
solid
!important
;
color
:
@
colorBlue
!important
;
background
:
@
colorWhite
!important
;
}
.dialog-button
{
.dialog-button
{
width
:
160px
;
width
:
160px
;
height
:
52px
;
height
:
52px
;
...
...
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