<template>
  <div class="eibs-tab">
    <!-- Left -->
    <c-col :span="11">
      <c-col :span="24">
        <el-form-item
          label="不符点"
          prop="bfdgrp.blk.docdis"
          style="width: 100%"
        >
          <c-fullbox>
            <c-input
              type="textarea"
              v-model="model.bfdgrp.blk.docdis"
              maxlength="50"
              show-word-limit
              placeholder="请输入不符点"
              :disabled="!docdisflg"
            ></c-input>
            <template slot="footer">
              <c-button
                style="margin-left: 10px; padding: 0 10px"
                size="small"
                type="primary"
                :disabled="!docdisflg"
              >
                ...
              </c-button>
            </template>
          </c-fullbox>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item
          label="内部不符点"
          prop="bfdgrp.blk.intdis"
          style="width: 100%"
        >
          <c-fullbox>
            <c-input
              type="textarea"
              v-model="model.bfdgrp.blk.intdis"
              maxlength="65"
              show-word-limit
              placeholder="请输入内部不符点"
            ></c-input>
            <template slot="footer">
              <c-button
                style="margin-left: 10px; padding: 0 10px"
                size="small"
                type="primary"
              >
                ...
              </c-button>
            </template>
          </c-fullbox>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="快递单号" prop="bfdgrp.rec.expmno">
          <c-input
            type="textarea"
            v-model="model.bfdgrp.rec.expmno"
            maxlength="60"
            show-word-limit
            placeholder="请输入快递单号"
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="扣减佣金" prop="bfdgrp.rec.lescom">
          <c-input
            v-model="model.bfdgrp.rec.lescom"
            placeholder="请输入扣减佣金"
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="参考号" prop="dedgrp.rec.kzref">
          <c-input
            v-model="model.dedgrp.rec.kzref"
            maxlength="35"
            placeholder="请输入参考号"
          ></c-input>
        </el-form-item>
      </c-col>
    </c-col>

    <!-- Right -->
    <c-col :span="11" :offset="1"> 
      <c-col :span="24">
        <el-form-item label="寄单状态" prop="bftp.folwupopt">
          <c-fullbox>
            <c-select
              v-model="model.bftp.folwupopt"
              style="width: 100%"
              placeholder="请选择寄单状态"
            >
              <el-option
                v-for="item in codes.folwupopt"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </c-select>
            <template slot="footer">
              <c-checkbox v-model="docdisflg" style="margin-left: 10px"
                >录入不符点</c-checkbox
              >
            </template>
          </c-fullbox>
        </el-form-item>
      </c-col>
      <c-col :span="24">
        <el-form-item label="付款人" prop="bfdgrp.rec.payrol">
          <c-select
            v-model="model.bfdgrp.rec.payrol"
            style="width: 100%"
            placeholder="请选择付款人"
          >
            <el-option
              v-for="item in codes.payrol"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </c-select>
        </el-form-item>
      </c-col>
      <c-col :span="24">
        <c-ptap
          :model="model"
          :argadr="{
            title: '',
            grp: 'bfdgrp',
            rol: 'oth',
          }"
          :disabled="true"
          :noRef="true"
          :isAdrblk="false"
        >
        </c-ptap>
      </c-col>
    </c-col>

    <c-docpre
      :model="model"
      :argadr="{
        path: 'bfdgrp.blk.prsdoc',
        grp: 'bftp',
        code: 'prsdoc',
      }"
    >
    </c-docpre>

    <!-- <c-col :span="24" style="height: 24px; margin-top: -10px">
      <el-form-item :label="model.bftp.docgrdm.docdsclab" class="messageLabel">
        <c-button style="float: right" @click="addTableValue" type="primary"
          >新增单据</c-button
        >
      </el-form-item>
    </c-col>
    <c-col :span="24" style="height: 0px">
      <el-divider></el-divider>
    </c-col>
    <c-col :span="24" style="margin-bottom: 30px;">
      <c-table
        height="200px"
        style="text-align: center"
        :list="this.model.bftp.docgrdm.docgrd || []"
        :paginationShow="false"
        :border="true"
      >
        <el-table-column
          label="1st"
          width="auto"
        >
        <template slot-scope="scope"> 
          <c-input
            v-model="scope.row.cmail1"
          ></c-input>
        </template>
        
        </el-table-column>
        <el-table-column
          label="2st"
          width="auto"
        >
        <template slot-scope="scope">
          <c-input
            v-model="scope.row.cmail2"
          ></c-input>
        </template>
        </el-table-column>
        <el-table-column label="Document" prop="docnam" width="auto">
          <template slot-scope="scope">
            <c-select
              style="width: 100%"
              placeholder="请选择"
              v-model="scope.row.docnam"
            >
              <el-option
                v-for="item in codeTable"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </c-select>
          </template>
        </el-table-column>
        <el-table-column label="操作" width="170px" fixed="right">
          <template slot-scope="scope">
            <c-button @click="deleteTable(scope.$index)" type="primary"
              >删除</c-button
            >
          </template>
        </el-table-column>
      </c-table>
    </c-col> -->
  </div>
</template>
<script>
import Api from "~/service/Api";
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Detdrv/Event";
import Ptap from "~/views/Public/Ptap";
import Utils from "~/utils";
import Docpre from "~/views/Public/Docpre";

export default {
  name:'Docpre',
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [commonProcess],
  components: {
    "c-ptap": Ptap,
    "c-docpre": Docpre
  },
  data() {
    return {
    };
  },
  computed: {
    docdisflg: {
      get() {
        return this.model.bfdgrp.blk.docdisflg != "";
      },
      set(val) {
        this.model.bfdgrp.blk.docdisflg = val ? "X" : "";
      },
    },
  },
  methods: {
    ...Event,
  },
  created: function () {},
};
</script>
<style>
</style>
