<!--
  @description:  立项-项目基本信息-代理机构/采购人公用
  @Modifier: 肖文龙
  @routerPath: /bidding/bidProjectStep/bidProjectBase
  @date: 2019/10/26-12:56
-->
<template>
  <div>
    <!--bidProjectSystemSourceType false 显示新产品-->
    <bidProjectBaseXCPForm
      v-if="!bidProjectSystemSourceType && tenderMethodType==='00'"
      ref="bidProjectBase"
      :project-data="projectData"
    />
    <!--询比、谈判、单一来源方式项目信息组件-->
    <inquiryNegotiationBaseForm
      v-if="!bidProjectSystemSourceType && tenderMethodType!=='00'"
      ref="bidProjectBase"
      :project-data="projectData"
    />
    <!--bidProjectSystemSourceType true 显示hn-->
    <bidProjectBaseHNForm v-if="bidProjectSystemSourceType" ref="bidProjectBase" :project-data="projectData" />
    <!--保存按钮-->
    <div class="but_footer">
      <div class="but_footer-h">
        <div class="but_footer-but">
          <!--          <el-button @click="lastStep">
            上一步
          </el-button>-->
          <el-button :loading="confirmLoading" type="primary" @click="saveNextStep()">
            暂存，进入下一步
          </el-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
/* 组件*/
import bidProjectBaseXCPForm from './bidProjectBaseXCPForm'
import bidProjectBaseHNForm from './bidProjectBaseHNForm'
import inquiryNegotiationBaseForm from './inquiryNegotiationBaseForm'

import { bidProjectCommon } from '../mixins/bidProjectCommon' // mixins混入公共方法

export default {
  name: 'BidProjectBase',
  components: {
    bidProjectBaseXCPForm, // 国信新产品组件
    bidProjectBaseHNForm, // hn组件
    inquiryNegotiationBaseForm // 询比、谈判项目信息组件
  },
  mixins: [bidProjectCommon],
  data() {
    return {
      confirmLoading: false // 暂存Loding
    }
  },
  methods: {
    // 上一步
    lastStep() {
      this.$nextTick(function() {
        this.$refs.bidProjectBase.prevStep()
      })
    },
    // 暂存，进入下一步
    saveNextStep() {
      this.$nextTick(function() {
        this.$refs.bidProjectBase.nextStep()
      })
    }
  }
}
</script>

<style lang="less" scoped>

  /deep/.show-word-limit-padding{
    .el-input__inner{
      padding-right: 70px;
    }
  }
</style>
