Invchkpan.vue 11.3 KB
<template>
  <div class="eibs-tab">
    <c-col :span="24">
      <!-- ======================= 左边 ========================= -->
      <c-col :span="8" style="padding-right: 200px">
        <c-col :span="24">
          <el-form-item label="CSV文件获取数据" label-width="150px">
            <c-button size="small" type="primary">获取</c-button>
          </el-form-item>
        </c-col>
        <c-col :span="24">
          <el-form-item label="发票影像界面获取" label-width="150px">
            <c-button size="small" type="primary">获取</c-button>
          </el-form-item>
        </c-col>
        <c-col :span="24">
          <el-form-item label="电证来报中获取" label-width="150px">
            <c-button size="small" type="primary">获取</c-button>
          </el-form-item>
        </c-col>
      </c-col>
      <!-- ======================= 右边 ========================= -->
      <c-col :span="16" style="padding-left: 20px">
        <c-col :span="24">
          <el-form-item label="点击核验前,请检查发票号码和发票代码前是否有0未导入进来。" label-width="550px"></el-form-item>
        </c-col>
        <c-col :span="24">
          <el-form-item label="普通、电子发票:校验码后六位必输;专票、全电发票:非税金额/税价合计必输。" label-width="550px"></el-form-item>
        </c-col>
        <c-col :span="24">
          <el-form-item label="全电发票:非税金额/税价合计栏位请录入价税合计金额。" label-width="550px"></el-form-item>
        </c-col>
        <c-col :span="24">
          <el-form-item label="全电发票:发票代码可不录入;其他类型发票:发票代码必须录入。" label-width="550px"></el-form-item>
        </c-col>
        <c-col :span="24">
          <el-checkbox v-model="model.invchk.skipped">跳过核验</el-checkbox>
        </c-col>
        <!-- S0000069 : 跳过理由 -->
        <c-col :span="24">
          <el-form-item label="跳过理由" prop="invchk.skpreason">
            <c-input type="textarea" v-model="model.invchk.skpreason" maxlength="40" show-word-limit placeholder="请输入跳过理由"></c-input>
          </el-form-item>
        </c-col>
      </c-col>
    </c-col>

    <c-col :span="24">
      <el-form-item label="" label-width="50px">
        <c-button size="small" type="primary">核验</c-button>
        <c-button size="small" type="primary">ADD</c-button>
        <c-button size="small" type="primary">Del</c-button>
        <c-button size="small" type="primary">Clear</c-button>
      </el-form-item>
    </c-col>
    <c-col :span="24">
      <c-table style="text-align: center" highlight-current-row @row-click="handleInvrepRowClick" :row-class-name="tableInvrepRowClassName" :list="model.invchk.invrep.zcinvlst" :paginationShow="true" :border="true" :total="model.invchk.invrep.zcinvlst.length">
        <el-table-column label="批次号" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'invchk.invrep.zcinvlst.' + scope.$index + '.seqnum'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="发票代码" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'invchk.invrep.zcinvlst.' + scope.$index + '.invoicecode'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="发票号码" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'invchk.invrep.zcinvlst.' + scope.$index + '.invoicenumber'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="开票日期" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'invchk.invrep.zcinvlst.' + scope.$index + '.billingdate'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="校验码后六位" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'invchk.invrep.zcinvlst.' + scope.$index + '.checkcode'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="非税金额/税价合计(全电发票)" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'invchk.invrep.zcinvlst.' + scope.$index + '.totalamount'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="发票占用金额" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'invchk.invrep.zcinvlst.' + scope.$index + '.amountin'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="" prop="det" width="150px" fixed="right">
          <template slot-scope="scope" slot="header">
            <c-button circle style="padding: 4px" class="el-icon-plus" size="mini" @click="addRowZcinvlst(scope)">
            </c-button>
            <c-button style="padding: 4px" circle class="el-icon-minus" size="mini" @click="removeRowZcinvlst(scope)">
            </c-button>
          </template>
          <template slot-scope="scoped">
            <c-button style="margin-left: 0" size="small" type="primary" icon="el-icon-info" @click="detailForeignDialog(scoped.$index, scoped.row)"></c-button>
          </template>
        </el-table-column>
      </c-table>
    </c-col>
    <!-- S0000045 : 占用总金额 -->
    <c-col :span="12">
      <el-form-item label="占用总金额" prop="invchk.totalamountin">
        <c-input v-model="model.invchk.totalamountin" placeholder=""></c-input>
      </el-form-item>
    </c-col>
    <c-col :span="24">
      <el-form-item label="" label-width="50px">
        <c-button size="small" type="primary">发票明细</c-button>
        <c-button size="small" type="primary">更新状态</c-button>
      </el-form-item>
    </c-col>
    <c-col :span="24">
      <c-table style="text-align: center" highlight-current-row @row-click="handleInvrepRowClick" :row-class-name="tableInvrepRowClassName" :list="model.invchk.invrep.zcinvlst" :paginationShow="true" :border="true" :total="model.invchk.invrep.zcinvlst.length">
        <el-table-column label="发票代码" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'invchk.invrep.zcinvlst.' + scope.$index + '.invoicecode'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="发票号码" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'invchk.invrep.zcinvlst.' + scope.$index + '.invoicenumber'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="发票状态" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'invchk.invrep.zcinvlst.' + scope.$index + '.state'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="核验次数" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'invchk.invrep.zcinvlst.' + scope.$index + '.checktotal'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="本机构核验次数" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'invchk.invrep.zcinvlst.' + scope.$index + '.checkown'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="其他机构核验次数" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'invchk.invrep.zcinvlst.' + scope.$index + '.checkother'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="价税合计" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'invchk.invrep.zcinvlst.' + scope.$index + '.amounttax'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="发票占用金额" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'invchk.invrep.zcinvlst.' + scope.$index + '.amountin'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="发票剩余金额" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'invchk.invrep.zcinvlst.' + scope.$index + '.balance'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="失败原因" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'invchk.invrep.zcinvlst.' + scope.$index + '.reason'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="" prop="det" width="150px" fixed="right">
          <template slot-scope="scope" slot="header">
            <c-button circle style="padding: 4px" class="el-icon-plus" size="mini" @click="addRowZcinvlst(scope)">
            </c-button>
            <c-button style="padding: 4px" circle class="el-icon-minus" size="mini" @click="removeRowZcinvlst(scope)">
            </c-button>
          </template>
          <template slot-scope="scoped">
            <c-button style="margin-left: 0" size="small" type="primary" icon="el-icon-info" @click="detailForeignDialog(scoped.$index, scoped.row)"></c-button>
          </template>
        </el-table-column>
      </c-table>
    </c-col>
    <!-- S0000063 : 价税合计总金额 -->
    <c-col :span="12">
      <el-form-item label="价税合计总金额" prop="invchk.totalamounttax">
        <c-input v-model="model.invchk.totalamounttax" placeholder=""></c-input>
      </el-form-item>
    </c-col>

  </div>
</template>
<script>
import Event from "../event";

export default {
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [Event],
  data() {
    return {
      currentZcinvlstIndex: -1
    };
  },
  methods: {
    //第一个表格
    addRowZcinvlst(row) {
      let newRow = {
        repflg: "",
        invoicecode: "",
        invoicenumber: "",
        monstatus: "",
        hantyp: "",
        handat: ""
      };
      let start = 0;
      if (this.model.invchk.invrep.zcinvlst) {
        start = this.model.invchk.invrep.zcinvlst.length;
      }
      this.model.invchk.invrep.zcinvlst.splice(start, 0, newRow);
    },
    removeRowZcinvlst() {
      console.log("选中的他行下标", this.currentZcinvlstIndex);
      if (this.currentZcinvlstIndex === -1) {
        this.$notify.error({
          title: "错误",
          message: "请选择一条数据删除!"
        });
        return;
      }
      this.model.invchk.invrep.zcinvlst.splice(this.currentZcinvlstIndex, 1);
      this.currentZcinvlstIndex = -1;
      //this.processSetpan();
    },
    tableInvrepRowClassName({ row, rowIndex }) {
      row.index = rowIndex;
    },
    handleInvrepRowClick(row) {
      this.currentZcinvlstIndex = row.index;
    }
  },
  created: function() {}
};
</script>
<style>
</style>