<template>
  <div style="width: 100%">
        <div partial style="padding: 10px">
          <div class="row app-row">
            <div class="col-xs-4">
              <label class="font text-left">客户名称：</label>
            </div>
            <div class="col-xs-8">
              <input class="search_input input-font" v-model=model.data[0].f_user_name />
            </div>
          </div>
          <div class="row app-row">
            <div class="col-xs-4">
              <label class="font text-left">电&emsp;&emsp;话：</label>
            </div>
            <div class="col-xs-8">
              <input class="search_input input-font" v-model=model.data[0].f_phone />
            </div>
          </div>
          <div class="row app-row">
            <div class="col-xs-4">
              <label class="font text-left">工程编号：</label>
            </div>
            <div class="col-xs-8">
              <input class="search_input input-font" v-model=model.data[0].f_apply_num />
            </div>
          </div>
          <div class="row app-row">
            <div class="col-xs-4">
              <label class="font text-left">合同编号：</label>
            </div>
            <div class="col-xs-8">
              <input class="search_input input-font" v-model=model.data[0].f_contract_number />
            </div>
          </div>
          <div class="row app-row">
            <div class="col-xs-4">
              <label class="font text-left">报建类型：</label>
            </div>
            <div class="col-xs-8">
              <input class="search_input input-font" v-model=model.data[0].f_apply_type />
            </div>
          </div>
          <div class="row app-row">
            <div class="col-xs-4">
              <label class="font text-left">客户编号：</label>
            </div>
            <div class="col-xs-8">
              <input class="search_input input-font" v-model=model.data[0].f_userinfo_code />
            </div>
          </div>
          <div class="row app-row">
            <div class="col-xs-4">
              <label class="font text-left">办理环节：</label>
            </div>
            <div class="col-xs-8">
              <input class="search_input input-font" v-model=model.data[0].defname />
            </div>
          </div>
          <div class="row app-row">
            <div class="col-xs-4">
              <label class="font text-left">地&emsp;&emsp;址：</label>
            </div>
            <div class="col-xs-8">
              <input class="search_input input-font" v-model=model.data[0].f_address />
            </div>
          </div>
          <div class="row app-row">
            <div class="col-xs-4">
              <label class="font text-left">施工备注：</label>
            </div>
            <div class="col-xs-8">
              <input class="search_input input-font" v-model=model.data[0].f_construction_remarks />
            </div>
          </div>
          <div class="row app-row">
            <div class="col-xs-4">
              <label class="font text-left">报建日期：</label>
            </div>
            <div class="col-xs-8">
              <input class="search_input input-font" v-model=model.data[0].f_apply_date />
            </div>
          </div>
          <div class="row app-row">
            <div class="col-xs-4">
              <label class="font text-left">工程报价：</label>
            </div>
            <div class="col-xs-8">
              <input class="search_input input-font" v-model=model.f_price_number />
            </div>
          </div>
          <div class="row app-row">
            <div class="col-xs-4">
              <label class="font text-left">报价意见：</label>
            </div>
            <div class="col-xs-8">
              <input class="search_input input-font" v-model=model.f_price_idea />
            </div>
          </div>
          <div class="row app-row">
            <button class="btn btn-default button_spacing" style="min-width:100px;"
                    @click="click(row)">保存</button>
            <button class="btn btn-default button_spacing" style="min-width:100px;"
                    @click="click(row)">提交</button>
          </div>
        </div>
  </div>
</template>
<script>
import Vue from 'vue'
import {PagedList, HttpResetClass} from 'vue-client'

export default {
  title: '工程报价',
  data () {
    return {
      model: null,
      criteriaShow: false
    }
  },
  ready () {
    this.search()
  },
  methods: {
    clear () {
      Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
        this.$refs.cp.$refs.cri.model[key] = null
      })
    },
    // 查询
    async search () {
      let http = new HttpResetClass()
      let res = await http.load(
        'POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/supervisory`, {
          data: {
            condition: '1=1',
            data: {
              id: Vue.user.id,
              f_filiale: "榆林."+Vue.user.orgs
              // id: this.$login.f.id,
              // f_filiale: this.$login.f.f_fengongsi
            }
          }
        }, {
          resolveMsg: null,
          rejectMsg: `查询失败`
        })
      this.model = res
      console.log('当前数据', this.model)
      console.log('当前数据', this.model.data[0].f_user_name)
    },
    click (row) {
      let _this = this
      this.$dispatch('gotoson', {
        _this: _this,
        title: '详情信息',
        safe: true
      })
      this.$goto('detailed-data', {selectdata: row}, 'self', _this.search)
    }
  },
  events: {},
  watch: {}
}
</script>
<style scoped>
.app-row {
  height: auto;
  background-color: white;
  padding: 10px 10px 0 10px;
  border-bottom: 1px solid rgba(235, 235, 235, 0.5);
}

.search_input {
  border: 0;
  outline: none;
}

.input-font {
  font: 15px PingFang-SC-Medium;
  color: #333333;
}

.app-text {
  font-size: 12px;
}

.panel-self {
  border-radius: 10px;
  border: 1px solid #499EDF;
  background-color: #F8F8F8;
}

.font {
  font: 15px PingFang-SC-Medium;
  color: #666666;
}

.input-font {
  font: 15px PingFang-SC-Medium;
  color: #333333;
}

.button_shrink_top {
  width: 34px;
  height: 34px;
  border: solid 1px #6aa6e2;
  background-size: 100%;
  background-image: url("../../../../static/newStyle/stretch_top.png")
}
.button_shrink_bottom {
  width: 34px;
  height: 34px;
  border: solid 1px #6aa6e2;
  background-size: 100%;
  background-image: url("../../../../static/newStyle/stretch_bottom.png")
}
</style>
