Commit b9777807 by 严立

竞价更新

parent 6755508d
...@@ -63,7 +63,6 @@ let output = { ...@@ -63,7 +63,6 @@ let output = {
if (funcDataType === 'object') { if (funcDataType === 'object') {
let funcResultData = JSON.parse(funcResult) let funcResultData = JSON.parse(funcResult)
switch (Number(funcResultData.code)) { switch (Number(funcResultData.code)) {
case 10001: case 10001:
console.log('token overdue') console.log('token overdue')
......
...@@ -58,6 +58,13 @@ let output = { ...@@ -58,6 +58,13 @@ let output = {
} else { } else {
iVue.$message.error(funcInterceptorsResponse.response.message) iVue.$message.error(funcInterceptorsResponse.response.message)
} }
} else {
let funcInterceptorsResponse = iInterceptors.response(funcConfigure, funcXMLHttpRequest.responseText)
if (funcInterceptorsResponse.state) {
funcResolve(funcInterceptorsResponse.response)
} else {
iVue.$message.error(funcInterceptorsResponse.response.message)
}
} }
} }
}).catch((funcError) => { }).catch((funcError) => {
...@@ -94,6 +101,13 @@ let output = { ...@@ -94,6 +101,13 @@ let output = {
} else { } else {
iVue.$message.error(funcInterceptorsResponse.response.message) iVue.$message.error(funcInterceptorsResponse.response.message)
} }
} else {
let funcInterceptorsResponse = iInterceptors.response(funcConfigure, funcXMLHttpRequest.responseText)
if (funcInterceptorsResponse.state) {
funcResolve(funcInterceptorsResponse.response)
} else {
iVue.$message.error(funcInterceptorsResponse.response.message)
}
} }
} }
}).catch((funcError) => { }).catch((funcError) => {
......
...@@ -37,6 +37,24 @@ ...@@ -37,6 +37,24 @@
} }
}, },
computed: {
areaSelection: function () {
return this.$store.state.areaSelection
},
},
watch: {
areaSelection: {
handler: function (funcNewValue, funcOldValue) {
if (funcNewValue.length > 0) {
this.initSelect()
}
},
deep: true,
immediate: true,
},
},
created: function () { created: function () {
this.setArea() this.setArea()
this.setCity() this.setCity()
......
...@@ -27,11 +27,11 @@ ...@@ -27,11 +27,11 @@
}, },
computed: { computed: {
componentSkill: function () { selectionSkill: function () {
return this.$store.state.componentSkill return this.$store.state.selectionSkill
}, },
componentSkillData: function () { dictionarySkill: function () {
return this.$store.state.componentSkillData return this.$store.state.dictionarySkill
} }
}, },
...@@ -43,21 +43,22 @@ ...@@ -43,21 +43,22 @@
deep: true, deep: true,
immediate: true, immediate: true,
}, },
componentSkill: { selectionSkill: {
handler: function (funcNewValue, funcOldValue) { handler: function (funcNewValue, funcOldValue) {
if (funcNewValue.length > 0 && this.skillAll.length > 0) { console.log('selectionSkill', funcNewValue)
if (funcNewValue.length > 0) {
this.selectionIndex = funcNewValue[this.identity] this.selectionIndex = funcNewValue[this.identity]
this.isReady() if (this.skillAll.length > 0) this.isReady()
} }
}, },
deep: true, deep: true,
immediate: true, immediate: true,
}, },
componentSkillData: { dictionarySkill: {
handler: function (funcNewValue, funcOldValue) { handler: function (funcNewValue, funcOldValue) {
if (funcNewValue.length > 0) { if (funcNewValue.length > 0) {
this.skillAll = funcNewValue this.skillAll = funcNewValue
this.isReady() if (this.selectionIndex && this.selectionIndex.length > 0) this.isReady()
} }
}, },
deep: true, deep: true,
...@@ -83,14 +84,9 @@ ...@@ -83,14 +84,9 @@
} }
funcList.push(funcItem) funcList.push(funcItem)
} }
// console.log('funcList', funcList)
// console.log('funcSelectionIndex', funcSelectionIndex)
funcSkillOption.push(funcList) funcSkillOption.push(funcList)
funcSkillItem.push(funcList[funcSelectionIndex]) funcSkillItem.push(funcList[funcSelectionIndex])
// console.log(funcSkillItem)
// 判断是否需要继续遍历 // 判断是否需要继续遍历
if (funcSkillItem[funcSkillItem.length - 1].isChildren) { if (funcSkillItem[funcSkillItem.length - 1].isChildren) {
let funcSelectionIndex = funcLevel let funcSelectionIndex = funcLevel
...@@ -119,9 +115,9 @@ ...@@ -119,9 +115,9 @@
}, },
saveSelection: function () { saveSelection: function () {
let funcSaveSelection = this.$store.getters.componentSkill let funcSaveSelection = this.$store.getters.selectionSkill
funcSaveSelection[this.identity] = this.selectionIndex funcSaveSelection[this.identity] = this.selectionIndex
this.$store.commit('componentSkill', funcSaveSelection) this.$store.commit('selectionSkill', funcSaveSelection)
}, },
returnSelectionId: function () { returnSelectionId: function () {
......
...@@ -22,8 +22,8 @@ export default new Vuex.Store({ ...@@ -22,8 +22,8 @@ export default new Vuex.Store({
contractSelection: {}, contractSelection: {},
// 专家注册组件 // 专家注册组件
componentSkill: [], selectionSkill: [], // 技能选择缓存
componentSkillData: [], dictionarySkill: [], // 技能数据字典
...@@ -94,11 +94,11 @@ export default new Vuex.Store({ ...@@ -94,11 +94,11 @@ export default new Vuex.Store({
state.contractSelection = value state.contractSelection = value
}, },
componentSkill: function (state, value) { selectionSkill: function (state, value) {
state.componentSkill = value state.selectionSkill = value
}, },
componentSkillData: function (state, value) { dictionarySkill: function (state, value) {
state.componentSkillData = value state.dictionarySkill = value
}, },
redirectPath: function (state, value) { redirectPath: function (state, value) {
...@@ -179,12 +179,12 @@ export default new Vuex.Store({ ...@@ -179,12 +179,12 @@ export default new Vuex.Store({
return state.contractSelection return state.contractSelection
}, },
componentSkill: function (state) { selectionSkill: function (state) {
return state.componentSkill return state.selectionSkill
}, },
componentSkillData: function (state) { dictionarySkill: function (state) {
return state.componentSkillData return state.dictionarySkill
}, },
......
...@@ -61,35 +61,21 @@ ...@@ -61,35 +61,21 @@
<!-- 合同列表 - 竞价 --> <!-- 合同列表 - 竞价 -->
<div v-if="[0].indexOf(noticeType) >= 0 && tableShow" class="info-item"> <div v-if="[0].indexOf(noticeType) >= 0 && tableShow" class="info-item">
<div v-for="(item, index) in componentContract" :key="index"> <el-table :data="componentContract" stripe :header-cell-style="tableHeaderStyle">
<el-table :data="[componentContract[index]]" stripe :show-header="!index" :header-cell-style="tableHeaderStyle"> <el-table-column type="index" label="合同包" width="80" align="center"></el-table-column>
<el-table-column label="合同包" width="80" align="center"> <el-table-column prop="object" label="标的"></el-table-column>
<template> <el-table-column prop="requirement" label="参数要求"></el-table-column>
<div class="global-cursor quote-record col"> <el-table-column prop="quantity" label="数量" align="center"></el-table-column>
<span>{{index + 1}}</span> <el-table-column prop="budget" label="限价(元)" align="center"></el-table-column>
</div> <el-table-column align="center">
</template> <template slot-scope="scope">
</el-table-column> <div class="global-cursor row">
<el-table-column prop="object" label="标的"></el-table-column> <span class="global-color-blue" @click="onQueryQuoteRecord(scope.row)">报价记录</span>
<el-table-column prop="requirement" label="参数要求"></el-table-column> <span v-if="scope.row.isWin" class="is-win global-color-green">中标</span>
<el-table-column prop="quantity" label="数量" align="center"></el-table-column> </div>
<el-table-column prop="budget" label="限价(元)" align="center"></el-table-column> </template>
<el-table-column align="center"> </el-table-column>
<template slot-scope="scope"> </el-table>
<div class="global-cursor row">
<span class="global-color-blue" @click="onQueryQuoteRecord(index, scope.row)">报价记录</span>
<span v-if="scope.row.isWin" class="is-win global-color-green">中标</span>
</div>
</template>
</el-table-column>
</el-table>
<div v-if="quoteRecordActive === index" class="quote-record-list">
<div v-for="(item, index) in quoteRecordList" :key="index" class="row">
<span>{{'报价时间:' + item.time}}</span>
<span>{{'报价价格:' + item.price + ' 元'}}</span>
</div>
</div>
</div>
</div> </div>
<!-- 竞价说明 --> <!-- 竞价说明 -->
...@@ -129,7 +115,7 @@ ...@@ -129,7 +115,7 @@
<!-- 竞价报价 --> <!-- 竞价报价 -->
<el-dialog title="我要报价" :visible.sync="winQuote" :lock-scroll="false" width="1000px" :close-on-click-modal="false"> <el-dialog title="我要报价" :visible.sync="winQuote" :lock-scroll="false" width="1000px" :close-on-click-modal="false">
<div v-if="winOfferSelect"> <div v-if="winQuoteSelection">
<div class="offer-progress row"> <div class="offer-progress row">
<div class="offer-progress-select offer-progress-active row con-c align-c"> <div class="offer-progress-select offer-progress-active row con-c align-c">
<span>选择合同包</span> <span>选择合同包</span>
...@@ -151,7 +137,7 @@ ...@@ -151,7 +137,7 @@
</span> </span>
</div> </div>
<div v-if="winOfferPrice"> <div v-if="winQuoteInput">
<div class="offer-progress row"> <div class="offer-progress row">
<div class="offer-progress-price row con-c align-c"> <div class="offer-progress-price row con-c align-c">
<span>选择合同包</span> <span>选择合同包</span>
...@@ -185,6 +171,15 @@ ...@@ -185,6 +171,15 @@
<!-- 竞价报价记录 -->
<el-dialog title="提示" :visible.sync="winQuoteRecord" :lock-scroll="false" width="400px" :close-on-click-modal="false">
<div class="row con-c">
<span>报价记录</span>
</div>
</el-dialog>
<!-- 下载标书 --> <!-- 下载标书 -->
<el-dialog title="下载标书" :visible.sync="winDocument" :lock-scroll="false" width="1000px" :close-on-click-modal="false"> <el-dialog title="下载标书" :visible.sync="winDocument" :lock-scroll="false" width="1000px" :close-on-click-modal="false">
<el-table :data="componentContract" stripe :header-cell-style="tableHeaderStyle" @selection-change="(selection) => onTableSelectionChange('document', selection)"> <el-table :data="componentContract" stripe :header-cell-style="tableHeaderStyle" @selection-change="(selection) => onTableSelectionChange('document', selection)">
...@@ -271,8 +266,9 @@ ...@@ -271,8 +266,9 @@
winContract: false, winContract: false,
winDocument: false, winDocument: false,
winQuote: false, winQuote: false,
winOfferSelect: false, winQuoteInput: false,
winOfferPrice: false, winQuoteRecord: false,
winQuoteSelection: false,
windowChangeTimer: 0, windowChangeTimer: 0,
} }
...@@ -433,32 +429,34 @@ ...@@ -433,32 +429,34 @@
}, },
onQueryQuoteRecord: function (funcIndex, funcItem) { onQueryQuoteRecord: function (funcItem) {
this.quoteRecordList = [] console.log(funcItem)
this.quoteRecordActive = funcIndex this.winQuoteRecord = true
// this.quoteRecordList = []
let funcParam = { // this.quoteRecordActive = funcIndex
'pageNo': 1,
'pageSize': 5, // let funcParam = {
'biddingPackageId': funcItem.id, // 'pageNo': 1,
} // 'pageSize': 5,
iRequest.request(iHost.base + 'bid/zBiddingPackageOffer/packageHaveBidLogs', funcParam, 'json', 'post') // 'biddingPackageId': funcItem.id,
.then((funcResponse) => { // }
let funcRawData = funcResponse.page.list // iRequest.request(iHost.base + 'bid/zBiddingPackageOffer/packageHaveBidLogs', funcParam, 'json', 'post')
let funcList = [] // .then((funcResponse) => {
for (let i = 0, len = funcRawData.length; i < len; i++) { // let funcRawData = funcResponse.page.list
let funcItem = { // let funcList = []
'time': funcRawData[i].createDate, // for (let i = 0, len = funcRawData.length; i < len; i++) {
'price': funcRawData[i].price, // let funcItem = {
} // 'time': funcRawData[i].createDate,
funcList.push(funcItem) // 'price': funcRawData[i].price,
} // }
this.quoteRecordList = funcList // funcList.push(funcItem)
// }
if (this.quoteRecordList.length === 0) { // this.quoteRecordList = funcList
this.quoteRecordList.push({ 'time': '暂无报价', 'price': 0 })
} // if (this.quoteRecordList.length === 0) {
}) // this.quoteRecordList.push({ 'time': '暂无报价', 'price': 0 })
// }
// })
}, },
onInterceptQuoteRecord: function () { onInterceptQuoteRecord: function () {
...@@ -595,16 +593,16 @@ ...@@ -595,16 +593,16 @@
*/ */
onQuote: function () { onQuote: function () {
this.winQuote = true this.winQuote = true
this.winOfferSelect = true this.winQuoteSelection = true
this.winOfferPrice = false this.winQuoteInput = false
this.tableSelection = [] this.tableSelection = []
this.tableQuote = [] this.tableQuote = []
this.tableQuoteBuffer = [] this.tableQuoteBuffer = []
}, },
onPricePrevious: function () { onPricePrevious: function () {
this.winOfferSelect = true this.winQuoteSelection = true
this.winOfferPrice = false this.winQuoteInput = false
this.tableSelection = [] this.tableSelection = []
this.tableQuote = [] this.tableQuote = []
this.tableQuoteBuffer = [] this.tableQuoteBuffer = []
...@@ -613,8 +611,8 @@ ...@@ -613,8 +611,8 @@
onPriceNext: function (funcType) { onPriceNext: function (funcType) {
switch (funcType) { switch (funcType) {
case 'offer': case 'offer':
this.winOfferSelect = false this.winQuoteSelection = false
this.winOfferPrice = true this.winQuoteInput = true
break break
case 'submit': case 'submit':
......
...@@ -73,13 +73,22 @@ let output = function (thisVue, id, type, isPreview) { ...@@ -73,13 +73,22 @@ let output = function (thisVue, id, type, isPreview) {
// 计算 a 的索引权重 // 计算 a 的索引权重
let funcIndex = a.index.toString().split('-') let funcIndex = a.index.toString().split('-')
let funcA = Number(funcIndex[0]) * funcMainWeight let funcA = Number(funcIndex[0]) * funcMainWeight
if (funcIndex[1]) funcA = funcA + Number(funcIndex[1]) if (funcIndex[1]) {
a.isChild = true
funcA = funcA + Number(funcIndex[1])
} else {
a.isChild = false
}
// 计算 b 的索引权重 // 计算 b 的索引权重
funcIndex = b.index.toString().split('-') funcIndex = b.index.toString().split('-')
let funcB = Number(funcIndex[0]) * funcMainWeight let funcB = Number(funcIndex[0]) * funcMainWeight
if (funcIndex[1]) funcB = funcB + Number(funcIndex[1]) if (funcIndex[1]) {
b.isChild = true
funcB = funcB + Number(funcIndex[1])
} else {
b.isChild = false
}
return funcA - funcB return funcA - funcB
}) })
...@@ -91,6 +100,16 @@ let output = function (thisVue, id, type, isPreview) { ...@@ -91,6 +100,16 @@ let output = function (thisVue, id, type, isPreview) {
'budget': funcRawData[i].fixedPrice, // 预算金额 'budget': funcRawData[i].fixedPrice, // 预算金额
'quantity': funcRawData[i].num, // 标的数量 'quantity': funcRawData[i].num, // 标的数量
'requirement': funcRawData[i].requirement, // 竞价参数要求 'requirement': funcRawData[i].requirement, // 竞价参数要求
'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)
} }
......
...@@ -146,8 +146,8 @@ ...@@ -146,8 +146,8 @@
</div> </div>
<!-- 竞价报价 --> <!-- 竞价报价 -->
<el-dialog title="我要报价" :visible.sync="winOffer" :lock-scroll="false" width="1200px" :close-on-click-modal="false"> <el-dialog title="我要报价" :visible.sync="winQuote" :lock-scroll="false" width="1000px" :close-on-click-modal="false">
<div v-if="winOfferSelect"> <div v-if="winQuoteSelection">
<div class="offer-progress row"> <div class="offer-progress row">
<div class="offer-progress-select offer-progress-active row con-c align-c"> <div class="offer-progress-select offer-progress-active row con-c align-c">
<span>选择合同包</span> <span>选择合同包</span>
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,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 prop="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>
...@@ -165,11 +165,11 @@ ...@@ -165,11 +165,11 @@
</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="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="onPriceNext('offer')">确 定</el-button> <el-button v-if="tableSelection.length >= 1" class="dialog-button" @click="onQuoteNext()">确 定</el-button>
</span> </span>
</div> </div>
<div v-if="winOfferPrice"> <div v-if="winQuoteInput">
<div class="offer-progress row"> <div class="offer-progress row">
<div class="offer-progress-price row con-c align-c"> <div class="offer-progress-price row con-c align-c">
<span>选择合同包</span> <span>选择合同包</span>
...@@ -178,34 +178,40 @@ ...@@ -178,34 +178,40 @@
<span>填写报价</span> <span>填写报价</span>
</div> </div>
</div> </div>
<el-table :data="tableQuoteBuffer" 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 prop="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="230"></el-table-column> <el-table-column prop="requirement" label="参数要求" min-width="200" 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) => { onQuoteInput(value, scope.$index, scope.row) }"></el-input> <el-input size="small" v-model="scope.row.price" maxlength="14" @change="(value) => { onQuoteInput(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="remark" label="备注" min-width="300" align="center"> <el-table-column prop="price" label="备注" min-width="30" 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> <i class="el-icon-edit-outline"></i>
<el-input size="small" v-model="scope.row.remark" maxlength="50" @change="(value) => { onQuoteInput(value, scope.$index, scope.row) }"></el-input> </div>
<span class="global-color-red">{{scope.row.tip}}</span> <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> </div>
</template> </template>
</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="onPricePrevious()">上一步</el-button> <el-button class="global-routine-button" @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="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>
...@@ -252,6 +258,14 @@ ...@@ -252,6 +258,14 @@
<el-button class="dialog-button" @click="winTip = false">确定</el-button> <el-button class="dialog-button" @click="winTip = false">确定</el-button>
</span> </span>
</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>
</div> </div>
</div> </div>
</template> </template>
...@@ -322,8 +336,9 @@ ...@@ -322,8 +336,9 @@
background: '#F2F2F2' background: '#F2F2F2'
}, },
maxQuote: 1000000000000, maxQuote: 1000000000000,
tableQuote: [], // 报价数据提交 tableQuote: [], // 竞价合同数据
tableQuoteBuffer: [], // 报价填写数据缓存 tableNote: '', // 竞价注释
tableNoteIndex: 0, // 竞价注释索引
isbuy: false, isbuy: false,
isSignIn: false, isSignIn: false,
...@@ -333,9 +348,10 @@ ...@@ -333,9 +348,10 @@
winTip: false, winTip: false,
winContract: false, winContract: false,
winDocument: false, winDocument: false,
winOffer: false, winQuote: false,
winOfferSelect: false, winQuoteInput: false,
winOfferPrice: false, winQuoteSelection: false, // 竞价合同选择
winQuoteNote: false, // 竞价 - 报价备注
} }
}, },
...@@ -368,8 +384,6 @@ ...@@ -368,8 +384,6 @@
this.componentFile = funcFile this.componentFile = funcFile
this.componentNotice = funcOther this.componentNotice = funcOther
console.log(JSON.stringify(this.componentContract))
// 竞价公告查询最新报价 // 竞价公告查询最新报价
if ([0].indexOf(funcProject.noticeType) >= 0) { if ([0].indexOf(funcProject.noticeType) >= 0) {
iRequest.request(iHost.base + 'bid/zBiddingProject/recentQuotation', { 'projectId': funcProject.projectId }, 'json', 'post') iRequest.request(iHost.base + 'bid/zBiddingProject/recentQuotation', { 'projectId': funcProject.projectId }, 'json', 'post')
...@@ -421,6 +435,14 @@ ...@@ -421,6 +435,14 @@
} }
}, },
setChildHide: function (funcRow, funcIndex) {
if (funcRow.row.isChild) {
return 'table-row-hide'
} else {
return ''
}
},
/** /**
* 报名 * 报名
* @function * @function
...@@ -550,8 +572,6 @@ ...@@ -550,8 +572,6 @@
* @returns * @returns
*/ */
onTableSelectionChange: function (funcType, funcSelection) { onTableSelectionChange: function (funcType, funcSelection) {
console.log(funcSelection)
switch (funcType) { switch (funcType) {
case 'contract': case 'contract':
let funcContractSelection = {} let funcContractSelection = {}
...@@ -573,28 +593,6 @@ ...@@ -573,28 +593,6 @@
case 'document': case 'document':
this.tableSelection = funcSelection this.tableSelection = funcSelection
break break
case 'offer':
this.tableSelection = funcSelection
this.tableQuoteBuffer = []
for (let i = 0, len = funcSelection.length; i < len; i++) {
let funcItem = {
'index': funcSelection[i].index,
'id': funcSelection[i].id,
'name': funcSelection[i].name,
'price': '',
'object': funcSelection[i].object,
'budget': funcSelection[i].budget,
'quantity': funcSelection[i].quantity,
'requirement': funcSelection[i].requirement,
'tip': '',
'remark': ''
}
this.tableQuoteBuffer.push(funcItem)
console.log(JSON.stringify(this.tableQuoteBuffer))
this.tableQuote[i] = { 'packageId': funcItem.id, 'price': '' }
}
break
} }
}, },
...@@ -629,66 +627,138 @@ ...@@ -629,66 +627,138 @@
// 供应身份而且通过审核 // 供应身份而且通过审核
if (this.$store.getters.info.identity === 2 && this.$store.getters.info.register === 1) { if (this.$store.getters.info.identity === 2 && this.$store.getters.info.register === 1) {
this.winOffer = true this.winQuote = true
this.winOfferSelect = true this.winQuoteInput = false
this.winOfferPrice = false this.winQuoteSelection = true
this.tableQuote = [] this.tableQuote = []
this.tableQuoteBuffer = []
this.tableSelection = [] this.tableSelection = []
} }
}, },
onPricePrevious: function () { /**
this.winOfferSelect = true * 竞价 - 填写报价窗口下一步
this.winOfferPrice = false * @function
* @returns
*/
onQuoteNext: function () {
this.winQuoteInput = true
this.winQuoteSelection = false
},
/**
* 竞价 - 填写报价窗口上一步
* @function
* @returns
*/
onQuotePrevious: function () {
this.winQuoteInput = false
this.winQuoteSelection = true
this.tableQuote = [] this.tableQuote = []
this.tableQuoteBuffer = []
this.tableSelection = [] this.tableSelection = []
}, },
onPriceNext: function (funcType) { /**
switch (funcType) { * 竞价 - 选择合同集合
case 'offer': * @function
this.winOfferSelect = false * @param {number} funcValue
this.winOfferPrice = true * @param {number} funcIndex
break * @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])
}
}
case 'submit': funcSelection = funcSelectionBuffer
if (this.tableQuote.length === 0) { funcSelectionBuffer = []
this.$message.error('请填写完整报价信息') // 勾选主包时添加子包
return 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
}
for (let i = 0, len = this.tableQuote.length; i < len; i++) { // 计算 b 的索引权重
if (!this.tableQuote[i]) { funcIndex = b.index.toString().split('-')
this.$message.error('请填写完整报价信息') let funcB = Number(funcIndex[0]) * funcMainWeight
return if (funcIndex[1]) {
} b.isChild = true
funcB = funcB + Number(funcIndex[1])
} else {
b.isChild = false
}
return funcA - funcB
})
if (this.tableQuote[i].price === '') { funcSelection = funcSelectionBuffer
this.$message.error('请输入报价金额') this.tableSelection = funcSelection
return this.tableQuote = []
} for (let i = 0, len = funcSelection.length; i < len; i++) {
} let funcItem = {
'index': funcSelection[i].index,
'id': funcSelection[i].id,
'name': funcSelection[i].name,
'price': '',
'object': funcSelection[i].object,
'budget': funcSelection[i].budget,
'quantity': funcSelection[i].quantity,
'requirement': funcSelection[i].requirement,
'tip': '',
'remark': '',
'isChild': funcSelection[i].isChild,
'haveChild': funcSelection[i].haveChild,
}
this.tableQuote.push(funcItem)
}
let funcParam = { console.log(JSON.stringify(funcSelection))
'biddingProjectId': this.componentProject.projectId, },
'biddingOffers': JSON.stringify(this.tableQuote)
}
let funcOther = iRequest.request(iHost.base + 'bid/zBiddingProject/biddingOffer', funcParam, 'json', 'post') onQuoteNote: function (funcItem, funcIndex) {
.then((funcResponse) => { this.winQuoteNote = true
this.winOffer = false this.tableNoteIndex = funcIndex
this.$message({ message: '报价成功!', type: 'success' }) this.tableNote = this.tableQuote[this.tableNoteIndex].remark
})
.catch((funcError) => {
this.$message.error(funcError.message)
})
break
}
}, },
onQuoteNoteSubmit: function () {
this.tableQuote[this.tableNoteIndex].remark = this.tableNote
this.winQuoteNote = false
},
/**
* 竞价 - 填写报价
* @function
* @param {number} funcValue
* @param {number} funcIndex
* @param {object} funcItem
* @returns
*/
onQuoteInput: function (funcValue, funcIndex, funcItem) { onQuoteInput: function (funcValue, funcIndex, funcItem) {
// 校验输入数值
if (!iRuleAtom.isMoney(funcValue)) { if (!iRuleAtom.isMoney(funcValue)) {
funcItem.tip = '请输入正确金额格式' funcItem.tip = '请输入正确金额格式'
this.tableQuote[funcIndex] = undefined this.tableQuote[funcIndex] = undefined
...@@ -712,7 +782,90 @@ ...@@ -712,7 +782,90 @@
this.tableQuote[funcIndex] = undefined this.tableQuote[funcIndex] = undefined
return return
} }
this.tableQuote[funcIndex] = { 'packageId': funcItem.id, 'price': funcValue }
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)
console.log(JSON.stringify(this.tableQuote))
}
},
/**
* 竞价 - 提交报价
* @function
* @returns
*/
onQuoteSubmit: function () {
if (this.tableQuote.length === 0) {
this.$message.error('请填写完整报价信息')
return
}
for (let i = 0, len = this.tableQuote.length; i < len; i++) {
if (!this.tableQuote[i]) {
this.$message.error('请填写完整报价信息')
return
}
if (this.tableQuote[i].price === '') {
this.$message.error('请输入报价金额')
return
}
}
console.log(JSON.parse(JSON.stringify(this.tableQuote)))
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)
}
}
console.log(JSON.stringify(funcQuoteData))
let funcParam = {
'biddingProjectId': this.componentProject.projectId,
'biddingOffers': JSON.stringify(funcQuoteData)
}
let funcOther = iRequest.request(iHost.base + 'bid/zBiddingProject/biddingOffer', funcParam, 'json', 'post')
.then((funcResponse) => {
this.winQuote = false
this.$message({ message: '报价成功!', type: 'success' })
})
.catch((funcError) => {
this.$message.error(funcError.message)
})
}, },
} }
} }
...@@ -726,6 +879,10 @@ ...@@ -726,6 +879,10 @@
background: @colorWhite; background: @colorWhite;
box-shadow:0px 0px 20px 0px rgba(41,41,41,0.05); box-shadow:0px 0px 20px 0px rgba(41,41,41,0.05);
.table-row-hide {
display: none;
}
.dialog-button { .dialog-button {
width: 160px; width: 160px;
height: 52px; height: 52px;
......
...@@ -450,14 +450,14 @@ ...@@ -450,14 +450,14 @@
// 重置区域选择数据 // 重置区域选择数据
this.$store.commit('areaSelection', []) this.$store.commit('areaSelection', [])
this.$store.commit('componentSkill', []) this.$store.commit('selectionSkill', [])
this.$store.commit('componentSkillData', [])
}, },
init: function () { init: function () {
console.log('init')
iRequest.request(iHost.base + 'bid/common/getApiProjectTypeOptions', {}, 'json', 'get') iRequest.request(iHost.base + 'bid/common/getApiProjectTypeOptions', {}, 'json', 'get')
.then((funcResponse) => { .then((funcResponse) => {
this.$store.commit('componentSkillData', funcResponse) this.$store.commit('dictionarySkill', funcResponse)
}) })
}, },
...@@ -638,8 +638,9 @@ ...@@ -638,8 +638,9 @@
funcParam.multipleStatement = funcOfficial.join('|') funcParam.multipleStatement = funcOfficial.join('|')
// 设置职称证书 // 设置职称证书
// 以实际存在的技能组件数量为准
let funcSkillId = [] let funcSkillId = []
for (let i = 0, len = this.formRegister.skillId.length; i < len; i++) { for (let i = 0, len = this.skillQuantity; i < len; i++) {
funcSkillId.push(this.formRegister.skillId[i].join(',')) funcSkillId.push(this.formRegister.skillId[i].join(','))
} }
funcParam.projectTypeIds = funcSkillId.join('|') funcParam.projectTypeIds = funcSkillId.join('|')
...@@ -781,10 +782,12 @@ ...@@ -781,10 +782,12 @@
* @returns * @returns
*/ */
onSkillInsert: function () { onSkillInsert: function () {
if (this.skillQuantity < 5) this.skillQuantity = this.skillQuantity + 1 if (this.skillQuantity < 5) {
let funcComponentSkill = this.$store.getters.componentSkill this.skillQuantity = this.skillQuantity + 1
funcComponentSkill.push([0, 0, 0, 0, 0]) let funcSelectionSkill = this.$store.getters.selectionSkill
this.$store.commit('componentSkill', funcComponentSkill) funcSelectionSkill.push([0, 0, 0, 0, 0])
this.$store.commit('selectionSkill', funcSelectionSkill)
}
}, },
/** /**
......
...@@ -365,6 +365,7 @@ ...@@ -365,6 +365,7 @@
// 设置区域标识 // 设置区域标识
this.formRegister.areaArray = funcResponse.area.split(',') this.formRegister.areaArray = funcResponse.area.split(',')
this.$store.commit('areaSelection', this.formRegister.areaArray) this.$store.commit('areaSelection', this.formRegister.areaArray)
console.log(JSON.stringify(this.formRegister.areaArray))
let funImageUrl let funImageUrl
// 设置入库声明图片 // 设置入库声明图片
...@@ -431,7 +432,7 @@ ...@@ -431,7 +432,7 @@
let funcSkillDictionary = iRequest.request(iHost.base + 'bid/common/getApiProjectTypeOptions', {}, 'json', 'get') let funcSkillDictionary = iRequest.request(iHost.base + 'bid/common/getApiProjectTypeOptions', {}, 'json', 'get')
.then((funcResponse) => { .then((funcResponse) => {
this.skillAll = funcResponse this.skillAll = funcResponse
this.$store.commit('componentSkillData', this.skillAll) if (!this.$store.state.dictionarySkill.length) this.$store.commit('dictionarySkill', this.skillAll)
}) })
Promise.all([ funcInfo, funcSkillDictionary ]) Promise.all([ funcInfo, funcSkillDictionary ])
...@@ -481,8 +482,7 @@ ...@@ -481,8 +482,7 @@
// 重置区域选择数据 // 重置区域选择数据
this.$store.commit('areaSelection', []) this.$store.commit('areaSelection', [])
this.$store.commit('componentSkill', []) this.$store.commit('selectionSkill', [])
this.$store.commit('componentSkillData', {})
}, },
setSelectionSkill: function () { setSelectionSkill: function () {
...@@ -518,9 +518,7 @@ ...@@ -518,9 +518,7 @@
funcSelectionIndex[i].push(0) funcSelectionIndex[i].push(0)
} }
} }
this.$store.commit('selectionSkill', funcSelectionIndex)
console.log(JSON.stringify(funcSelectionIndex))
this.$store.commit('componentSkill', funcSelectionIndex)
}, },
/** /**
...@@ -566,11 +564,10 @@ ...@@ -566,11 +564,10 @@
// 设置职称证书 // 设置职称证书
let funcSkillId = [] let funcSkillId = []
for (let i = 0, len = this.formRegister.skillId.length; i < len; i++) { for (let i = 0, len = this.skillQuantity; i < len; i++) {
funcSkillId.push(this.formRegister.skillId[i].join(',')) funcSkillId.push(this.formRegister.skillId[i].join(','))
} }
funcParam.projectTypeIds = funcSkillId.join('|') funcParam.projectTypeIds = funcSkillId.join('|')
console.log(JSON.stringify(funcParam))
iRequest.request(iHost.base + 'bid/zUserExpert/saveUserInfo', funcParam, 'json', 'post') iRequest.request(iHost.base + 'bid/zUserExpert/saveUserInfo', funcParam, 'json', 'post')
.then((funcResponse) => { .then((funcResponse) => {
this.$message({ message: '修改已提交,请等待审核', type: 'success' }) this.$message({ message: '修改已提交,请等待审核', type: 'success' })
...@@ -646,10 +643,12 @@ ...@@ -646,10 +643,12 @@
* @returns * @returns
*/ */
onSkillInsert: function () { onSkillInsert: function () {
if (this.skillQuantity < 5) this.skillQuantity = this.skillQuantity + 1 if (this.skillQuantity < 5) {
let funcComponentSkill = this.$store.getters.componentSkill this.skillQuantity = this.skillQuantity + 1
funcComponentSkill.push([]) let funcSelectionSkill = this.$store.getters.selectionSkill
this.$store.commit('componentSkill', funcComponentSkill) funcSelectionSkill.push([0, 0, 0, 0, 0])
this.$store.commit('selectionSkill', funcSelectionSkill)
}
}, },
/** /**
......
...@@ -292,7 +292,7 @@ ...@@ -292,7 +292,7 @@
let funcSkillDictionary = iRequest.request(iHost.base + 'bid/common/getApiProjectTypeOptions', {}, 'json', 'get') let funcSkillDictionary = iRequest.request(iHost.base + 'bid/common/getApiProjectTypeOptions', {}, 'json', 'get')
.then((funcResponse) => { .then((funcResponse) => {
this.skillRawData = funcResponse this.skillRawData = funcResponse
this.$store.commit('componentSkillData', this.skillRawData) if (!this.$store.state.dictionarySkill.length) this.$store.commit('dictionarySkill', this.skillRawData)
}) })
Promise.all([ funcInfo, funcSkillDictionary ]) Promise.all([ funcInfo, funcSkillDictionary ])
...@@ -355,7 +355,7 @@ ...@@ -355,7 +355,7 @@
funcSkillIndexArray.push(funcSkillIndex) funcSkillIndexArray.push(funcSkillIndex)
} }
this.$store.commit('componentSkill', funcSkillIndexArray) this.$store.commit('selectionSkill', funcSkillIndexArray)
for (let i = 0, l = funcSkillItemArray.length; i < l; i++) { for (let i = 0, l = funcSkillItemArray.length; i < l; i++) {
let funcSkillText = [] let funcSkillText = []
for (let ii = 0, ll = funcSkillItemArray[i].length; ii < ll; ii++) { for (let ii = 0, ll = funcSkillItemArray[i].length; ii < ll; ii++) {
...@@ -370,6 +370,7 @@ ...@@ -370,6 +370,7 @@
}, },
onChange: function () { onChange: function () {
this.$router.push('/specialist/infochange') this.$router.push('/specialist/infochange')
}, },
onChangeRecord: function () { onChangeRecord: function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment