<template>
  <div class="app-container">
    <div class="tab-header webtop">
      <!--标题-->
      <div>查看盘库报告</div>
      <!--start 添加修改按钮-->
      <div>
        <el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
      </div>
    </div>
    <div class="listconadd">
      <div class="titwu"><span>盘库报告</span></div>
      <el-form ref="form_obj" :model="formobj" class="formadd">
        <el-row style="border-top: 1px solid #E0E3EB">
          <el-col :span="4" class="tleftb">
            <span>接收人</span>
          </el-col>
          <el-col :span="8">
            <el-form-item>
              <span>{{ formobj.recipient }}</span>
            </el-form-item>
          </el-col>
          <el-col :span="4" class="tleftb">
            <span>发送时间</span>
          </el-col>
          <el-col :span="8">
            <el-form-item>
              <span>{{ formobj.date }}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="4" class="tleftb">
            <span>本次盘库</span>
          </el-col>
          <el-col :span="20">
            <el-form-item>
              <span>应盘{{ formobj.totalNumber }}台,实盘{{ formobj.actualNumber }}台,未盘{{ formobj.surplusNumber }}台,盘盈{{ formobj.profitNumber }}台,盘损{{ formobj.damageNumber }}台,盘亏{{ formobj.lossNumber }}台</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row v-show="formobj.surplusNumber !== '0'">
          <el-col :span="4" class="tleftb">
            <span>未盘原因</span>
          </el-col>
          <el-col :span="20">
            <el-form-item><el-input v-model="formobj.reason" clearable placeholder="因存在未盘记录,请填写未盘原因" /></el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="4" class="tleftb">
            <span>具体情况</span>
          </el-col>
          <el-col :span="20">
            <el-form-item>
              <el-form-item>
                <span></span>
              </el-form-item>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="4" class="tleftb">
            <span>盘盈情况</span>
          </el-col>
          <el-col :span="20">
            <el-form-item>
              <span>{{ formobj.profitRemarks }}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="4" class="tleftb">
            <span>盘损情况</span>
          </el-col>
          <el-col :span="20">
            <el-form-item>
              <span>{{ formobj.damageRemarks }}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="4" class="tleftb">
            <span>盘亏情况</span>
          </el-col>
          <el-col :span="20">
            <el-form-item>
              <span>{{ formobj.lossRemarks }}</span>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>
  </div>
</template>

<script>
import req from '@/api/kucunguanli/panku'

export default {
  name: 'pankubaogaoInfo',
  data() {
    return {
      formobj: {}
    }
  },
  methods: {
    showInfo(row) {
      this.$nextTick(() => {
        this.$refs['form_obj'].clearValidate()
      })
      req.getCarInventoryReport(row.sid, window.sessionStorage.getItem('userSid')).then((resp) => {
        if (resp.success) {
          this.formobj = resp.data
        }
      })
    },
    handleReturn() {
      this.$refs['form_obj'].resetFields()
      this.$emit('doback')
    }
  }
}
</script>

<style scoped>
</style>
