<template>

  <div>
    <el-card class="box-card noborder">
      <div class="cardtitles">基本信息</div>
      <div class="baseinfo" style="padding-bottom: 8px">
        <div class="row">
          <div class="con">
            <span>总投资额（万元） ：</span>
            <div class="inputxt">
              <div class="flex" v-if="nowedit == 1">
                <el-input placeholder="待添加" v-model="money" @input="number"></el-input>
                <div class="flex">
                  <div class="btnsmall btn_primary h28" style="width: 56px">确定</div>
                  <div class="cancels h28" @click="nowedit = -1" style="">取消</div>
                </div>
              </div>
              <span class="txt" v-else @click="nowedit = 1">待添加</span>
            </div>
          </div>
          <div class="con i">
            <span>资金来源 ：</span>
            <div class="inputxt">
              <div class="flex" v-if="nowedit == 2">
                <el-input placeholder="待添加"></el-input>
                <div class="flex">
                  <div class="btnsmall btn_primary h28" style="width: 56px">确定</div>
                  <div class="cancels h28" @click="nowedit = -1" style="">取消</div>
                </div>
              </div>
              <span class="txt" v-else @click="nowedit = 2">待添加</span>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="con">
            <span>建设性质 ：</span>
            <div class="inputxt">
              <div class="flex" v-if="nowedit == 3">
                <el-input placeholder="待添加"></el-input>
                <div class="flex">
                  <div class="btnsmall btn_primary h28" style="width: 56px">确定</div>
                  <div class="cancels h28" @click="nowedit = -1" style="">取消</div>
                </div>
              </div>
              <span class="txt" v-else @click="nowedit = 3">待添加</span>
            </div>
          </div>
          <div class="con i">
            <span>计划招标 ：</span>
            <div class="inputime">
              <div class="flex" style="opacity: 0;height: 0">
                <el-date-picker v-if="nowedit == 11" showWordLimit="true"
                                v-model="value1"
                                type="date"
                                value-format="yyyy-MM-dd"
                                placeholder="待添加" @change="nowedit = -1">
                </el-date-picker>
              </div>
              <span :class="{'txt':!value1}" @click="nowedit = 11">{{value1||"待添加"}}<i class="el-icon-caret-bottom"></i></span>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="con">
            <span>计划开工 ：</span>
            <div class="inputime">
              <div class="flex" style="opacity: 0;height: 0">
                <el-date-picker v-if="nowedit == 12" showWordLimit="true"
                                v-model="value1"
                                type="date"
                                value-format="yyyy-MM-dd"
                                placeholder="待添加" @change="nowedit = -1">
                </el-date-picker>
              </div>
              <span :class="{'txt':!value1}" @click="nowedit = 12">{{value1||"待添加"}}<i class="el-icon-caret-bottom"></i></span>
            </div>
          </div>
          <div class="con i">
            <span>计划竣工 ：</span>
            <div class="inputime">
              <div class="flex" style="opacity: 0;height: 0">
                <el-date-picker v-if="nowedit == 13" showWordLimit="true"
                  v-model="value1"
                  type="date"
                  value-format="yyyy-MM-dd"
                  placeholder="待添加" @change="nowedit = -1">
                </el-date-picker>
              </div>
              <span :class="{'txt':!value1}" @click="nowedit = 13">{{value1||"待添加"}}<i class="el-icon-caret-bottom"></i></span>
            </div>
          </div>
        </div>
      </div>
    </el-card>
    <el-card class="box-card noborder">
      <div class="cardtitles">项目概况与建设规模</div>
      <div class="baseinfo">
        <el-input  v-model="textarea" @focus="nowedit = 9" class="textarea" type="textarea" placeholder="请输入项目概况与建设规模详细信息"  maxlength="500" show-word-limit="true" ></el-input>
        <div class="flex btns" v-if="nowedit == 9">
          <div class="flex">
            <div class="btnsmall btn_primary h28" style="width: 56px">确定</div>
            <div class="cancels h28" @click="nowedit = -1" style="">取消</div>
          </div>
        </div>
      </div>
    </el-card>
    <el-card class="box-card noborder">
      <div class="cardtitles">招标信息</div>
      <div class="baseinfo" style="padding-bottom: 8px">
        <div class="row">
          <div class="con">
            <span>评标办法 ：</span>
            <div class="inputxt">
              <div class="flex" v-if="nowedit == 4">
                <el-input placeholder="待添加"></el-input>
                <div class="flex">
                  <div class="btnsmall btn_primary h28" style="width: 56px">确定</div>
                  <div class="cancels h28" @click="nowedit = -1" style="">取消</div>
                </div>
              </div>
              <span class="txt" v-else @click="nowedit = 4">待添加</span>
            </div>
          </div>
          <div class="con i">
            <span>开标时间 ：</span>
            <div class="inputime">
              <div class="flex" style="opacity: 0;height: 0">
                <el-date-picker v-if="nowedit == 14" showWordLimit="true"
                                v-model="value1"
                                type="date"
                                value-format="yyyy-MM-dd"
                                placeholder="待添加" @change="nowedit = -1">
                </el-date-picker>
              </div>
              <span :class="{'txt':!value1}" @click="nowedit = 14">{{value1||"待添加"}}<i class="el-icon-caret-bottom"></i></span>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="con">
            <span>保证金缴纳 ：</span>
            <div class="inputxt">
              <div class="flex" v-if="nowedit == 5">
                <el-input placeholder="待添加"></el-input>
                <div class="flex">
                  <div class="btnsmall btn_primary h28" style="width: 56px">确定</div>
                  <div class="cancels h28" @click="nowedit = -1" style="">取消</div>
                </div>
              </div>
              <span class="txt" v-else @click="nowedit = 5">待添加</span>
            </div>
          </div>
          <div class="con i">
            <span>保证金金额（万元） ：</span>
            <div class="inputxt">
              <div class="flex" v-if="nowedit == 6">
                <el-input placeholder="待添加"></el-input>
                <div class="flex">
                  <div class="btnsmall btn_primary h28" style="width: 56px">确定</div>
                  <div class="cancels h28" @click="nowedit = -1" style="">取消</div>
                </div>
              </div>
              <span class="txt" v-else @click="nowedit = 6">待添加</span>
            </div>
          </div>
        </div>
        <div class="row">
        <div class="con">
          <span>开标地点 ：</span>
          <div class="inputxt">
            <div class="flex" v-if="nowedit == 7">
              <el-input placeholder="待添加"></el-input>
              <div class="flex">
                <div class="btnsmall btn_primary h28" style="width: 56px">确定</div>
                <div class="cancels h28" @click="nowedit = -1" style="">取消</div>
              </div>
            </div>
            <span class="txt" v-else @click="nowedit = 7">待添加</span>
          </div>
        </div>
        <div class="con i">
          <span>评标委员会 ：</span>
          <div class="inputxt">
            <div class="flex" v-if="nowedit == 8">
              <el-input placeholder="待添加"></el-input>
              <div class="flex">
                <div class="btnsmall btn_primary h28" style="width: 56px">确定</div>
                <div class="cancels h28" @click="nowedit = -1" style="">取消</div>
              </div>
            </div>
            <span class="txt" v-else @click="nowedit = 8">待添加</span>
          </div>
        </div>
      </div>
      </div>
    </el-card>
  </div>
</template>

<script>
  import "@/assets/styles/project.scss"
  export default {
    name: 'jsnr',
    data(){
      return{
        textarea:"",
        nowedit:-1,//当前正在编辑的文本
        value1:'',
        money:'',
      }
    },
    watch:{
      // nowedit(oldvalue,newvalue){
      //   if (newvalue == 13){
      //     this.$ref.newvalue13.=true
      //   }
      // }
    },
    methods:{
      //输入数字
      number(value){
        console.log(value)
        this.money = value.replace(/^\D*(\d*(?:\.\d{0,6})?).*$/g, '$1')//输入6位小数
      },
    }
  }
</script>

<style scoped>

</style>
