|
@@ -0,0 +1,617 @@
|
|
|
+var bidTemp = `
|
|
|
+ <div class='bid_component j-container'>
|
|
|
+ <div class="popupTime-header j-header">
|
|
|
+ <div class="header-title">
|
|
|
+ <span style="line-height: .56rem">已参标,请更新投标状态</span>
|
|
|
+ <span style="line-height: .36rem;margin-top: .04rem" class="label-tip">可前往“我的参标项目”查看已参标项目</span>
|
|
|
+ </div>
|
|
|
+ <div class="header-close" @click="$emit('cancel-update')">
|
|
|
+ <span class="j-icon base-icon icon-delete-gray"></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="j-main">
|
|
|
+ <div class="view-result-tip">
|
|
|
+ <span>想知道谁最有可能参标吗?</span>
|
|
|
+ <span @click="linkAnalysis" style="color:#2ABED1">点这里查看分析结果</span>
|
|
|
+ </div>
|
|
|
+ <van-form @submit="onSubmit">
|
|
|
+ <van-field
|
|
|
+ @click="bidTypePopup = true"
|
|
|
+ required
|
|
|
+ readonly
|
|
|
+ is-link
|
|
|
+ v-model="bidParams.bidType"
|
|
|
+ name="bidType"
|
|
|
+ label="投标类型"
|
|
|
+ placeholder="请选择投标类型"
|
|
|
+ ></van-field>
|
|
|
+ <van-field
|
|
|
+ @click="bidProject = true"
|
|
|
+ is-link
|
|
|
+ v-model="bidParams.bidStage"
|
|
|
+ name="bidStage"
|
|
|
+ readonly
|
|
|
+ :rows="rownum"
|
|
|
+ autosize
|
|
|
+ type="textarea"
|
|
|
+ label="投标项目阶段"
|
|
|
+ placeholder="请选择投标项目阶段"
|
|
|
+ ></van-field>
|
|
|
+ <van-field
|
|
|
+ @click="isBidPopup = true"
|
|
|
+ is-link
|
|
|
+ placeholder="请选择是否中标"
|
|
|
+ readonly
|
|
|
+ v-model="bidParams.isWin"
|
|
|
+ name="isWin"
|
|
|
+ :label="showChannel? '渠道是否中标':'是否中标'"
|
|
|
+ ></van-field>
|
|
|
+ <div class="channel_module" v-if="showChannel">
|
|
|
+ <div class="acc-input-group">
|
|
|
+ <van-field type="textarea" autosize :rows="rownum" placeholder="请输入渠道名称" v-model.trim="bidParams.channelName" name="channelName" label="渠道名称"></van-field>
|
|
|
+ <div class="popover-acc-input-group" v-show="showAccEntList">
|
|
|
+ <div class="popover-acc-input-group--item" v-for="(item, index) in accEntList" v-bind:key="index" @click="doSelectEnt(item)">{{item.value}}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <van-field type="textarea" autosize :rows="rownum" placeholder="请输入联系人姓名" v-model.trim="bidParams.channelPerson" name="channelPerson" label="联系人"></van-field>
|
|
|
+ <van-field maxlength="11" type="tel" placeholder="请输入联系电话" v-model.trim="bidParams.channelPhone" name="channelPhone" label="联系电话"></van-field>
|
|
|
+ <van-field type="textarea" autosize :rows="rownum" placeholder="请输入中标单位名称" v-model.trim="bidParams.winner" name="winner" label="中标单位"></van-field>
|
|
|
+ </div>
|
|
|
+ </van-form>
|
|
|
+ </div>
|
|
|
+ <div class="j-footer">
|
|
|
+ <div class="j-button-group">
|
|
|
+ <button class="j-button-cancel" @click="$emit('cancel-update')">取消</button>
|
|
|
+ <button round type="primary" :disabled="showDisbaled" class="j-button-confirm submitBtn" @click="onSubmit()">确认</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <van-popup class="popupTime j-container" v-model="bidTypePopup" round position="bottom">
|
|
|
+ <div class="popupTime-header">
|
|
|
+ <div class="header-title">选择投标类型</div>
|
|
|
+ <div class="header-close" @click="bidTypePopupClose()">
|
|
|
+ <span class="j-icon base-icon icon-delete-gray"></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="popupTime-main j-main">
|
|
|
+ <ul class="bid_ul">
|
|
|
+ <li class="bid_select" @click="selectBidType(1)">
|
|
|
+ <span>直接投标</span>
|
|
|
+ <img v-show="copyBidParams.bidType == 1" src="/common-module/bidstatus-update/image/right.png" alt="" />
|
|
|
+ </li>
|
|
|
+ <li class="bid_select" @click="selectBidType(2)">
|
|
|
+ <span>渠道投标</span>
|
|
|
+ <img v-show="copyBidParams.bidType == 2" src="/common-module/bidstatus-update/image/right.png" alt="" />
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <div class="j-footer">
|
|
|
+ <div class="j-button-group">
|
|
|
+ <div class="j-button-confirm" @click="saveStatus('0')">确认</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </van-popup>
|
|
|
+ <van-popup class="popupTime j-container popupIsBid" v-model="isBidPopup" round position="bottom">
|
|
|
+ <div class="popupTime-header">
|
|
|
+ <div class="header-title">
|
|
|
+ <span>是否中标</span>
|
|
|
+ <span @click="cancelSelect()" class="cancel_select">取消选择</span>
|
|
|
+ </div>
|
|
|
+ <div class="header-close" @click="isBidPopupClose()">
|
|
|
+ <span class="j-icon base-icon icon-delete-gray"></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="popupTime-main j-main">
|
|
|
+ <ul class="bid_ul">
|
|
|
+ <li class="bid_select" @click="selectBidStatus(1)">
|
|
|
+ <span>是</span>
|
|
|
+ <img v-if="copyBidParams.isWin === 1" src="/common-module/bidstatus-update/image/right.png" alt="" />
|
|
|
+ </li>
|
|
|
+ <li class="bid_select" @click="selectBidStatus(2)">
|
|
|
+ <span>否</span>
|
|
|
+ <img v-if="copyBidParams.isWin === 2" src="/common-module/bidstatus-update/image/right.png" alt="" />
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <div class="j-footer">
|
|
|
+ <div class="j-button-group">
|
|
|
+ <div class="j-button-confirm" @click="saveStatus('2')">确认</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </van-popup>
|
|
|
+ <van-popup class="popupTime j-container" v-model="bidProject" round position="bottom">
|
|
|
+ <div class="popupTime-header">
|
|
|
+ <div class="header-title">投标项目阶段</div>
|
|
|
+ <div class="header-close" @click="BidProjectPopupClose()">
|
|
|
+ <span class="j-icon base-icon icon-delete-gray"></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="popupTime-main j-main">
|
|
|
+ <van-cell-group>
|
|
|
+ <van-cell
|
|
|
+ :class="{'cell_checked': item.checked}"
|
|
|
+ v-for="item in bidStageOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :title="item.label"
|
|
|
+ :label-align="labelAlign"
|
|
|
+ icon-size="16px"
|
|
|
+ @click="onCellClick(item)"
|
|
|
+ >
|
|
|
+ <template #right-icon>
|
|
|
+ <van-checkbox v-model="item.checked" :name="item.value" />
|
|
|
+ </template>
|
|
|
+ </van-cell>
|
|
|
+ </van-cell-group>
|
|
|
+ </div>
|
|
|
+ <div class="j-footer">
|
|
|
+ <div class="j-button-group">
|
|
|
+ <div class="j-button-cancel" @click="cancelBidStage()">重置</div>
|
|
|
+ <div class="j-button-confirm" @click="saveStatus('1')">确认</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </van-popup>
|
|
|
+ </div>
|
|
|
+`
|
|
|
+
|
|
|
+var bidStatusNode = {
|
|
|
+ name: 'bid_component',
|
|
|
+ template: bidTemp,
|
|
|
+ props: {
|
|
|
+ projectCellInfo: {
|
|
|
+ type: Object,
|
|
|
+ default: {}
|
|
|
+ },
|
|
|
+ showBidStatus: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ cbInfo: {
|
|
|
+ isShowRefer: false,
|
|
|
+ canBiaoInfo: {
|
|
|
+ showStopParticipate: false
|
|
|
+ },
|
|
|
+ setTime: '',
|
|
|
+ countdownTimer: null
|
|
|
+ },
|
|
|
+ bidTypePopup: false,
|
|
|
+ isBidPopup: false,
|
|
|
+ bidProject: false,
|
|
|
+ showBidType: true,
|
|
|
+ showChannel: false,
|
|
|
+ copyBidParams: {
|
|
|
+ bidType: '',
|
|
|
+ bidStage: '',
|
|
|
+ isWin: '',
|
|
|
+ channelName: '',
|
|
|
+ channelPerson: '',
|
|
|
+ channelPhone: '',
|
|
|
+ winner: '',
|
|
|
+ sid: ''
|
|
|
+ },
|
|
|
+ bidParams: {
|
|
|
+ bidType: '',
|
|
|
+ bidStage: '',
|
|
|
+ isWin: '',
|
|
|
+ channelName: '',
|
|
|
+ channelPerson: '',
|
|
|
+ channelPhone: '',
|
|
|
+ winner: '',
|
|
|
+ sid: ''
|
|
|
+ },
|
|
|
+ isWinBid: false,
|
|
|
+ checkedList: [],
|
|
|
+ formSchemaOptions: {
|
|
|
+ bidStage: [],
|
|
|
+ 'bidStage-1': [],
|
|
|
+ checkedListMap: {
|
|
|
+ 1: [],
|
|
|
+ 2: []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ showAccEntList: false,
|
|
|
+ accEntList: [],
|
|
|
+ labelAlign: 'left',
|
|
|
+ editBtnStatus: {
|
|
|
+ show: false,
|
|
|
+ status: 0
|
|
|
+ },
|
|
|
+ rownum: 1,
|
|
|
+ proParams: {},
|
|
|
+ prodetail: {}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ bidStageOptions: function () {
|
|
|
+ const result = this.formSchemaOptions['bidStage' + (this.copyBidParams.bidType == 1 ? '-1' : '')].map(option => ({
|
|
|
+ checked: this.checkedList.includes(option),
|
|
|
+ value: option,
|
|
|
+ label: option
|
|
|
+ }))
|
|
|
+ return result
|
|
|
+ },
|
|
|
+ showDisbaled: function () {
|
|
|
+ return this.bidParams.bidType === ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ projectCellInfo: {
|
|
|
+ handler (newval) {
|
|
|
+ this.resetUpdate()
|
|
|
+ this.getProDetail()
|
|
|
+ },
|
|
|
+ immediate: true
|
|
|
+ },
|
|
|
+ showBidStatus: {
|
|
|
+ handler (newval) {
|
|
|
+ this.resetUpdate()
|
|
|
+ this.getBidContent()
|
|
|
+ },
|
|
|
+ immediate: true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created: function () {
|
|
|
+ this.getOptionsInfo()
|
|
|
+ },
|
|
|
+ mounted: function() {
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ onSubmit: function() {
|
|
|
+ // 在这里处理表单提交逻辑
|
|
|
+ const _this = this
|
|
|
+ this.copyBidParams.bidType = parseInt(this.copyBidParams.bidType)
|
|
|
+ this.copyBidParams.isWin = this.copyBidParams.isWin ? parseInt(this.copyBidParams.isWin) : 0
|
|
|
+ // this.bidParams.winner = this.prodetail.s_winner
|
|
|
+ this.bidParams.sid = this.prodetail.sid
|
|
|
+ const {channelName, channelPerson, channelPhone, winner, sid, bidStage, isWin } = this.bidParams
|
|
|
+ let tranWin = 0
|
|
|
+ if (isWin === '是') {
|
|
|
+ tranWin = 1
|
|
|
+ } else if (isWin === '否') {
|
|
|
+ tranWin = 2
|
|
|
+ } else {
|
|
|
+ tranWin = 0
|
|
|
+ }
|
|
|
+ const ajaxParams = {
|
|
|
+ bidType: parseInt(this.copyBidParams.bidType),
|
|
|
+ bidStage: bidStage ? bidStage.split('、') : [],
|
|
|
+ isWin: tranWin,
|
|
|
+ channelName: channelName,
|
|
|
+ channelPerson: channelPerson,
|
|
|
+ channelPhone: channelPhone,
|
|
|
+ winner: winner,
|
|
|
+ sid: sid
|
|
|
+ }
|
|
|
+ $.ajax({
|
|
|
+ type: 'POST',
|
|
|
+ url: '/jyapi/jybx/core/participate/updateBidStatus',
|
|
|
+ contentType: 'application/json',
|
|
|
+ data: JSON.stringify(ajaxParams),
|
|
|
+ success: function(res) {
|
|
|
+ if(res.error_code === 0) {
|
|
|
+ _this.$toast('保存成功')
|
|
|
+ _this.editBtnStatus.show = true
|
|
|
+ _this.editBtnStatus.status = 1
|
|
|
+ _this.$emit('save-success')
|
|
|
+ } else {
|
|
|
+ _this.$toast(res.error_msg)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 获取项目详情
|
|
|
+ getProDetail: function () {
|
|
|
+ var _this = this
|
|
|
+ $.ajax({
|
|
|
+ type: 'POST',
|
|
|
+ url: '/bigmember/follow/project/detail',
|
|
|
+ data: {
|
|
|
+ sid: _this.projectCellInfo.sid || _this.projectCellInfo.id || _this.projectCellInfo._id,
|
|
|
+ // fid: _this.fid
|
|
|
+ },
|
|
|
+ success: function (res) {
|
|
|
+ if (res.error_code == 0) {
|
|
|
+ _this.prodetail = res.data
|
|
|
+ } else {
|
|
|
+ _this.$toast(res.error_msg)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function (err) {
|
|
|
+ console.log(err)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 获取选项
|
|
|
+ getOptionsInfo () {
|
|
|
+ const _this = this
|
|
|
+ $.ajax({
|
|
|
+ type: 'POST',
|
|
|
+ url: '/jyapi/jybx/core/participate/setUpInfo',
|
|
|
+ contentType: 'application/json',
|
|
|
+ data: JSON.stringify({
|
|
|
+ sid: _this.sid
|
|
|
+ }),
|
|
|
+ success: function (res) {
|
|
|
+ if (res.error_code === 0) {
|
|
|
+ const data = res.data || {}
|
|
|
+ if (data.bidType) {
|
|
|
+ _this.formSchemaOptions.bidStage = data.bidType.find(v => v.name === '渠道投标').content || []
|
|
|
+ _this.formSchemaOptions['bidStage-1'] = data.bidType.find(v => v.name === '直接投标').content || []
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ linkAnalysis () {
|
|
|
+ if (utils.$envs.inApp || utils.$envs.inH5) {
|
|
|
+ location.href = '/jyapp/big/page/analysis_result'
|
|
|
+ } else {
|
|
|
+ location.href = '/big/wx/page/analysis_search?source=wx_analysis_ProjectDetails'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ doQueryAccEntName (str) {
|
|
|
+ // TODO 需添加防抖
|
|
|
+ this.showAccEntList = false
|
|
|
+ this.fetchChannelNameList(str, list => {
|
|
|
+ this.showAccEntList = list.length > 0
|
|
|
+ this.accEntList = list
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 重置投标阶段变更
|
|
|
+ cancelBidStage () {
|
|
|
+ const resetList = (this.formSchemaOptions.checkedListMap[this.copyBidParams.bidType] || []).map(v => v)
|
|
|
+ this.checkedList = resetList
|
|
|
+ },
|
|
|
+ // 重置投标状态
|
|
|
+ resetUpdate: function () {
|
|
|
+ this.bidParams = {
|
|
|
+ bidType: '',
|
|
|
+ bidStage: '',
|
|
|
+ isWin: '',
|
|
|
+ channelName: '',
|
|
|
+ channelPerson: '',
|
|
|
+ channelPhone: '',
|
|
|
+ winner: '',
|
|
|
+ sid: ''
|
|
|
+ }
|
|
|
+ this.copyBidParams = {
|
|
|
+ bidType: 0,
|
|
|
+ bidStage: '',
|
|
|
+ isWin: '',
|
|
|
+ channelName: '',
|
|
|
+ channelPerson: '',
|
|
|
+ channelPhone: '',
|
|
|
+ winner: '',
|
|
|
+ sid: ''
|
|
|
+ }
|
|
|
+ this.showChannel = false
|
|
|
+ },
|
|
|
+ saveStatus: function (str) {
|
|
|
+ switch (str) {
|
|
|
+ case '0':
|
|
|
+ if(this.bidParams.bidType) {
|
|
|
+ if (!((this.bidParams.bidType.indexOf('直接') !== -1 && parseInt(this.copyBidParams.bidType) === 1) || (this.bidParams.bidType.indexOf('渠道') !== -1 && parseInt(this.copyBidParams.bidType) === 2))) {
|
|
|
+ this.bidParams = {
|
|
|
+ bidType: this.copyBidParams.bidType,
|
|
|
+ bidStage: '',
|
|
|
+ isWin: '',
|
|
|
+ channelName: '',
|
|
|
+ channelPerson: '',
|
|
|
+ channelPhone: '',
|
|
|
+ winner: '',
|
|
|
+ sid: ''
|
|
|
+ }
|
|
|
+ this.copyBidParams = {
|
|
|
+ bidType: this.copyBidParams.bidType,
|
|
|
+ bidStage: '',
|
|
|
+ isWin: '',
|
|
|
+ channelName: '',
|
|
|
+ channelPerson: '',
|
|
|
+ channelPhone: '',
|
|
|
+ winner: '',
|
|
|
+ sid: ''
|
|
|
+ }
|
|
|
+ this.checkedList = []
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$emit('set-height', this.copyBidParams.bidType)
|
|
|
+ break;
|
|
|
+ case '1':
|
|
|
+ if (this.checkedList.length > 0) {
|
|
|
+ this.copyBidParams.bidStage = this.checkedList.join('、')
|
|
|
+ } else {
|
|
|
+ this.copyBidParams.bidStage = ''
|
|
|
+ }
|
|
|
+ break
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ const { channelName, channelPhone, channelPerson, winner } = this.bidParams || {};
|
|
|
+ this.copyBidParams.channelName = channelName || ''
|
|
|
+ this.copyBidParams.channelPhone = channelPhone || ''
|
|
|
+ this.copyBidParams.channelPerson = channelPerson || ''
|
|
|
+ this.copyBidParams.winner = winner || ''
|
|
|
+
|
|
|
+ Object.assign(this.bidParams, this.copyBidParams)
|
|
|
+ if (this.copyBidParams.bidType == 1) {
|
|
|
+ this.bidParams.bidType = '直接投标'
|
|
|
+ this.showChannel = false
|
|
|
+ } else if (this.copyBidParams.bidType == 2) {
|
|
|
+ this.bidParams.bidType = '渠道投标'
|
|
|
+ this.showChannel = true
|
|
|
+ } else {
|
|
|
+ this.bidParams.bidType = ''
|
|
|
+ this.showChannel = false
|
|
|
+ }
|
|
|
+ // 带出中标单位
|
|
|
+ if (this.bidParams.isWin == 1) {
|
|
|
+ this.bidParams.isWin = '是'
|
|
|
+ const sWin = this.prodetail.projectInfo.s_winner || ''
|
|
|
+ if (sWin && !winner) {
|
|
|
+ this.bidParams.winner = sWin
|
|
|
+ }
|
|
|
+ } else if (this.bidParams.isWin == 2) {
|
|
|
+ this.bidParams.isWin = '否'
|
|
|
+ this.bidParams.winner = ''
|
|
|
+ } else {
|
|
|
+ this.bidParams.isWin = ''
|
|
|
+ this.bidParams.winner = ''
|
|
|
+ }
|
|
|
+ this.bidTypePopupClose()
|
|
|
+ this.BidProjectPopupClose()
|
|
|
+ this.isBidPopupClose()
|
|
|
+ },
|
|
|
+ // 选择是否中标
|
|
|
+ selectBidStatus: function(data) {
|
|
|
+ this.copyBidParams.isWin = data
|
|
|
+ },
|
|
|
+ // 是否中标取消选择
|
|
|
+ cancelSelect () {
|
|
|
+ this.bidParams.isWin = ''
|
|
|
+ this.copyBidParams.isWin = ''
|
|
|
+ this.bidParams.winner = ''
|
|
|
+ this.copyBidParams.winner = ''
|
|
|
+ this.isBidPopupClose()
|
|
|
+ },
|
|
|
+ doSelectEnt (item) {
|
|
|
+ this.setParams(this.bidParams, item)
|
|
|
+ this.setParams(this.copyBidParams, item)
|
|
|
+ this.showAccEntList = false
|
|
|
+ },
|
|
|
+ setParams(params, item) {
|
|
|
+ const { value, company_phone, legal_person } = item || {};
|
|
|
+ params.channelName = value || ''
|
|
|
+ // params.channelPhone = company_phone || ''
|
|
|
+ // params.channelPerson = legal_person || ''
|
|
|
+ },
|
|
|
+ // 选择投标类型
|
|
|
+ selectBidType: function(data) {
|
|
|
+ this.copyBidParams.bidType = data
|
|
|
+ // checkedList 切换时清空
|
|
|
+ if (data != this.copyBidParams.bidType) {
|
|
|
+ this.checkedList = []
|
|
|
+ this.copyBidParams.isWin = 0
|
|
|
+ this.bidParams.isWin = ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 获取投标状态信息
|
|
|
+ getBidContent: function () {
|
|
|
+ const _this = this
|
|
|
+ const params = {
|
|
|
+ sid: _this.projectCellInfo.sid || _this.projectCellInfo.id || _this.projectCellInfo._id,
|
|
|
+ }
|
|
|
+ $.ajax({
|
|
|
+ type: 'POST',
|
|
|
+ url: '/jyapi/jybx/core/participate/content',
|
|
|
+ contentType: 'application/json',
|
|
|
+ data: JSON.stringify(params),
|
|
|
+ success: function(res) {
|
|
|
+ if(res.error_code === 0 && res.data) {
|
|
|
+ if (Object.keys(res.data).length > 0) {
|
|
|
+ _this.editBtnStatus.show = true
|
|
|
+ _this.editBtnStatus.status = 1
|
|
|
+ const { bidStage, bidType, channelName, channelPerson, channelPhone, isWin, winner} = res.data
|
|
|
+ let getParams = {
|
|
|
+ bidType: '',
|
|
|
+ bidStage: '',
|
|
|
+ isWin: '',
|
|
|
+ channelName: channelName,
|
|
|
+ channelPerson: channelPerson,
|
|
|
+ channelPhone: channelPhone,
|
|
|
+ winner: winner
|
|
|
+ }
|
|
|
+ if (bidStage && bidStage.length > 0) {
|
|
|
+ _this.checkedList = bidStage
|
|
|
+ getParams.bidStage = bidStage.join('、')
|
|
|
+ }
|
|
|
+ if (isWin == 1) {
|
|
|
+ getParams.isWin = '是'
|
|
|
+ } else if(isWin == 2) {
|
|
|
+ getParams.isWin = '否'
|
|
|
+ } else {
|
|
|
+ getParams.isWin = ''
|
|
|
+ }
|
|
|
+ if(bidType == 1) {
|
|
|
+ getParams.bidType = '直接投标'
|
|
|
+ _this.showChannel = false
|
|
|
+ _this.formSchemaOptions.checkedListMap[1] = [].concat(bidStage || [])
|
|
|
+ } else {
|
|
|
+ getParams.bidType = '渠道投标'
|
|
|
+ _this.showChannel = true
|
|
|
+ _this.formSchemaOptions.checkedListMap[2] = [].concat(bidStage || [])
|
|
|
+ }
|
|
|
+ if (res.data) {
|
|
|
+ Object.assign(_this.copyBidParams, res.data)
|
|
|
+ }
|
|
|
+ _this.bidParams = getParams
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 获取参标状态
|
|
|
+ getCanBiaoInfo: function() {
|
|
|
+ const _this = this
|
|
|
+ const param = {
|
|
|
+ sid: this.sid
|
|
|
+ }
|
|
|
+ $.ajax({
|
|
|
+ type: 'POST',
|
|
|
+ url: '/jyapi/jybx/core/participate/info',
|
|
|
+ contentType: 'application/json',
|
|
|
+ data: JSON.stringify(param),
|
|
|
+ success: function(res) {
|
|
|
+ if(res.error_code == 0) {
|
|
|
+ const data = res.data;
|
|
|
+ if (Object.keys(data).length > 0) {
|
|
|
+ _this.cbInfo.canBiaoInfo = data
|
|
|
+ _this.cbInfo.countdownTimer = setInterval(_this.updateCountdown, 1000);
|
|
|
+ if (data.userName) {
|
|
|
+ const newList = data.userName.split(',').map(item => item.trim()).filter(item => item)
|
|
|
+ const userNameString = newList.length > 1 ? newList.slice(0,1).join(',') + '等' : newList.join(',')
|
|
|
+ data.userName = userNameString
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onCellClick(data) {
|
|
|
+ if (this.checkedList.includes(data.value)) {
|
|
|
+ this.checkedList = this.checkedList.filter(v => v !== data.value)
|
|
|
+ } else {
|
|
|
+ this.checkedList.push(data.value)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 编辑投标状态
|
|
|
+ setBidInfo: function () {
|
|
|
+ if (this.editBtnStatus.status == 1) {
|
|
|
+ this.editBtnStatus.status = 2
|
|
|
+ } else if (this.editBtnStatus.status == 2) {
|
|
|
+ this.editBtnStatus.status = 1
|
|
|
+ this.getBidContent()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getShareParams () {
|
|
|
+ var params = location.href.indexOf('?') > -1 ? '&fid=' + this.fid + '&sid=' + this.sid : '?fid=' + this.fid + '&sid=' + this.sid
|
|
|
+ this.proParams = {
|
|
|
+ type: '2',
|
|
|
+ id: this.sid,
|
|
|
+ referer: location.href + params
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 关闭投标类型弹窗
|
|
|
+ bidTypePopupClose: function () {
|
|
|
+ this.bidTypePopup = false
|
|
|
+ },
|
|
|
+ // 关闭是否中标弹窗
|
|
|
+ isBidPopupClose: function () {
|
|
|
+ this.isBidPopup = false
|
|
|
+ },
|
|
|
+ // 关闭投标项目阶段弹窗
|
|
|
+ BidProjectPopupClose: function () {
|
|
|
+ this.bidProject = false
|
|
|
+ },
|
|
|
+ }
|
|
|
+}
|