Commit b9777807 by 严立

竞价更新

parent 6755508d
......@@ -63,7 +63,6 @@ let output = {
if (funcDataType === 'object') {
let funcResultData = JSON.parse(funcResult)
switch (Number(funcResultData.code)) {
case 10001:
console.log('token overdue')
......
......@@ -58,6 +58,13 @@ let output = {
} else {
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) => {
......@@ -94,6 +101,13 @@ let output = {
} else {
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) => {
......
......@@ -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 () {
this.setArea()
this.setCity()
......
......@@ -27,11 +27,11 @@
},
computed: {
componentSkill: function () {
return this.$store.state.componentSkill
selectionSkill: function () {
return this.$store.state.selectionSkill
},
componentSkillData: function () {
return this.$store.state.componentSkillData
dictionarySkill: function () {
return this.$store.state.dictionarySkill
}
},
......@@ -43,21 +43,22 @@
deep: true,
immediate: true,
},
componentSkill: {
selectionSkill: {
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.isReady()
if (this.skillAll.length > 0) this.isReady()
}
},
deep: true,
immediate: true,
},
componentSkillData: {
dictionarySkill: {
handler: function (funcNewValue, funcOldValue) {
if (funcNewValue.length > 0) {
this.skillAll = funcNewValue
this.isReady()
if (this.selectionIndex && this.selectionIndex.length > 0) this.isReady()
}
},
deep: true,
......@@ -83,14 +84,9 @@
}
funcList.push(funcItem)
}
// console.log('funcList', funcList)
// console.log('funcSelectionIndex', funcSelectionIndex)
funcSkillOption.push(funcList)
funcSkillItem.push(funcList[funcSelectionIndex])
// console.log(funcSkillItem)
// 判断是否需要继续遍历
if (funcSkillItem[funcSkillItem.length - 1].isChildren) {
let funcSelectionIndex = funcLevel
......@@ -119,9 +115,9 @@
},
saveSelection: function () {
let funcSaveSelection = this.$store.getters.componentSkill
let funcSaveSelection = this.$store.getters.selectionSkill
funcSaveSelection[this.identity] = this.selectionIndex
this.$store.commit('componentSkill', funcSaveSelection)
this.$store.commit('selectionSkill', funcSaveSelection)
},
returnSelectionId: function () {
......
......@@ -22,8 +22,8 @@ export default new Vuex.Store({
contractSelection: {},
// 专家注册组件
componentSkill: [],
componentSkillData: [],
selectionSkill: [], // 技能选择缓存
dictionarySkill: [], // 技能数据字典
......@@ -94,11 +94,11 @@ export default new Vuex.Store({
state.contractSelection = value
},
componentSkill: function (state, value) {
state.componentSkill = value
selectionSkill: function (state, value) {
state.selectionSkill = value
},
componentSkillData: function (state, value) {
state.componentSkillData = value
dictionarySkill: function (state, value) {
state.dictionarySkill = value
},
redirectPath: function (state, value) {
......@@ -179,12 +179,12 @@ export default new Vuex.Store({
return state.contractSelection
},
componentSkill: function (state) {
return state.componentSkill
selectionSkill: function (state) {
return state.selectionSkill
},
componentSkillData: function (state) {
return state.componentSkillData
dictionarySkill: function (state) {
return state.dictionarySkill
},
......
......@@ -61,15 +61,8 @@
<!-- 合同列表 - 竞价 -->
<div v-if="[0].indexOf(noticeType) >= 0 && tableShow" class="info-item">
<div v-for="(item, index) in componentContract" :key="index">
<el-table :data="[componentContract[index]]" stripe :show-header="!index" :header-cell-style="tableHeaderStyle">
<el-table-column label="合同包" width="80" align="center">
<template>
<div class="global-cursor quote-record col">
<span>{{index + 1}}</span>
</div>
</template>
</el-table-column>
<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="object" label="标的"></el-table-column>
<el-table-column prop="requirement" label="参数要求"></el-table-column>
<el-table-column prop="quantity" label="数量" align="center"></el-table-column>
......@@ -77,19 +70,12 @@
<el-table-column align="center">
<template slot-scope="scope">
<div class="global-cursor row">
<span class="global-color-blue" @click="onQueryQuoteRecord(index, scope.row)">报价记录</span>
<span class="global-color-blue" @click="onQueryQuoteRecord(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>
<!-- 竞价说明 -->
......@@ -129,7 +115,7 @@
<!-- 竞价报价 -->
<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-select offer-progress-active row con-c align-c">
<span>选择合同包</span>
......@@ -151,7 +137,7 @@
</span>
</div>
<div v-if="winOfferPrice">
<div v-if="winQuoteInput">
<div class="offer-progress row">
<div class="offer-progress-price row con-c align-c">
<span>选择合同包</span>
......@@ -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-table :data="componentContract" stripe :header-cell-style="tableHeaderStyle" @selection-change="(selection) => onTableSelectionChange('document', selection)">
......@@ -271,8 +266,9 @@
winContract: false,
winDocument: false,
winQuote: false,
winOfferSelect: false,
winOfferPrice: false,
winQuoteInput: false,
winQuoteRecord: false,
winQuoteSelection: false,
windowChangeTimer: 0,
}
......@@ -433,32 +429,34 @@
},
onQueryQuoteRecord: function (funcIndex, funcItem) {
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 })
}
})
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 () {
......@@ -595,16 +593,16 @@
*/
onQuote: function () {
this.winQuote = true
this.winOfferSelect = true
this.winOfferPrice = false
this.winQuoteSelection = true
this.winQuoteInput = false
this.tableSelection = []
this.tableQuote = []
this.tableQuoteBuffer = []
},
onPricePrevious: function () {
this.winOfferSelect = true
this.winOfferPrice = false
this.winQuoteSelection = true
this.winQuoteInput = false
this.tableSelection = []
this.tableQuote = []
this.tableQuoteBuffer = []
......@@ -613,8 +611,8 @@
onPriceNext: function (funcType) {
switch (funcType) {
case 'offer':
this.winOfferSelect = false
this.winOfferPrice = true
this.winQuoteSelection = false
this.winQuoteInput = true
break
case 'submit':
......
......@@ -73,13 +73,22 @@ let output = function (thisVue, id, type, isPreview) {
// 计算 a 的索引权重
let funcIndex = a.index.toString().split('-')
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 的索引权重
funcIndex = b.index.toString().split('-')
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
})
......@@ -91,6 +100,16 @@ let output = function (thisVue, id, type, isPreview) {
'budget': funcRawData[i].fixedPrice, // 预算金额
'quantity': funcRawData[i].num, // 标的数量
'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)
}
......
......@@ -450,14 +450,14 @@
// 重置区域选择数据
this.$store.commit('areaSelection', [])
this.$store.commit('componentSkill', [])
this.$store.commit('componentSkillData', [])
this.$store.commit('selectionSkill', [])
},
init: function () {
console.log('init')
iRequest.request(iHost.base + 'bid/common/getApiProjectTypeOptions', {}, 'json', 'get')
.then((funcResponse) => {
this.$store.commit('componentSkillData', funcResponse)
this.$store.commit('dictionarySkill', funcResponse)
})
},
......@@ -638,8 +638,9 @@
funcParam.multipleStatement = funcOfficial.join('|')
// 设置职称证书
// 以实际存在的技能组件数量为准
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(','))
}
funcParam.projectTypeIds = funcSkillId.join('|')
......@@ -781,10 +782,12 @@
* @returns
*/
onSkillInsert: function () {
if (this.skillQuantity < 5) this.skillQuantity = this.skillQuantity + 1
let funcComponentSkill = this.$store.getters.componentSkill
funcComponentSkill.push([0, 0, 0, 0, 0])
this.$store.commit('componentSkill', funcComponentSkill)
if (this.skillQuantity < 5) {
this.skillQuantity = this.skillQuantity + 1
let funcSelectionSkill = this.$store.getters.selectionSkill
funcSelectionSkill.push([0, 0, 0, 0, 0])
this.$store.commit('selectionSkill', funcSelectionSkill)
}
},
/**
......
......@@ -365,6 +365,7 @@
// 设置区域标识
this.formRegister.areaArray = funcResponse.area.split(',')
this.$store.commit('areaSelection', this.formRegister.areaArray)
console.log(JSON.stringify(this.formRegister.areaArray))
let funImageUrl
// 设置入库声明图片
......@@ -431,7 +432,7 @@
let funcSkillDictionary = iRequest.request(iHost.base + 'bid/common/getApiProjectTypeOptions', {}, 'json', 'get')
.then((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 ])
......@@ -481,8 +482,7 @@
// 重置区域选择数据
this.$store.commit('areaSelection', [])
this.$store.commit('componentSkill', [])
this.$store.commit('componentSkillData', {})
this.$store.commit('selectionSkill', [])
},
setSelectionSkill: function () {
......@@ -518,9 +518,7 @@
funcSelectionIndex[i].push(0)
}
}
console.log(JSON.stringify(funcSelectionIndex))
this.$store.commit('componentSkill', funcSelectionIndex)
this.$store.commit('selectionSkill', funcSelectionIndex)
},
/**
......@@ -566,11 +564,10 @@
// 设置职称证书
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(','))
}
funcParam.projectTypeIds = funcSkillId.join('|')
console.log(JSON.stringify(funcParam))
iRequest.request(iHost.base + 'bid/zUserExpert/saveUserInfo', funcParam, 'json', 'post')
.then((funcResponse) => {
this.$message({ message: '修改已提交,请等待审核', type: 'success' })
......@@ -646,10 +643,12 @@
* @returns
*/
onSkillInsert: function () {
if (this.skillQuantity < 5) this.skillQuantity = this.skillQuantity + 1
let funcComponentSkill = this.$store.getters.componentSkill
funcComponentSkill.push([])
this.$store.commit('componentSkill', funcComponentSkill)
if (this.skillQuantity < 5) {
this.skillQuantity = this.skillQuantity + 1
let funcSelectionSkill = this.$store.getters.selectionSkill
funcSelectionSkill.push([0, 0, 0, 0, 0])
this.$store.commit('selectionSkill', funcSelectionSkill)
}
},
/**
......
......@@ -292,7 +292,7 @@
let funcSkillDictionary = iRequest.request(iHost.base + 'bid/common/getApiProjectTypeOptions', {}, 'json', 'get')
.then((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 ])
......@@ -355,7 +355,7 @@
funcSkillIndexArray.push(funcSkillIndex)
}
this.$store.commit('componentSkill', funcSkillIndexArray)
this.$store.commit('selectionSkill', funcSkillIndexArray)
for (let i = 0, l = funcSkillItemArray.length; i < l; i++) {
let funcSkillText = []
for (let ii = 0, ll = funcSkillItemArray[i].length; ii < ll; ii++) {
......@@ -370,6 +370,7 @@
},
onChange: function () {
this.$router.push('/specialist/infochange')
},
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