Yptp.vue 7.99 KB
Newer Older
fukai committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197
<template>
  <div class="eibs-tab">
    <!-- ======================= 左边 ========================= -->
    <c-col :span="12" style="padding-right: 20px">
      <!-- S0001174 : 额度风险类型 -->
      <c-col :span="24">
        <el-form-item label="额度风险类型" prop="liaall.limmod.edfxlx">
          <c-input v-model="model.liaall.limmod.edfxlx" maxlength="40" placeholder="请输入额度风险类型"></c-input>
        </el-form-item>
      </c-col>
      <!-- S0001178 : 押品币种 -->

      <c-col :span="24">
        <el-form-item label="押品币种" prop="liaall.limmod.ypbz">
          <c-fullbox>
            <c-input v-model="model.liaall.limmod.ypbz" maxlength="3" placeholder="请输入押品币种"></c-input>
            <template slot="footer">
              <c-button size="small" type="primary">查押品信息</c-button>
            </template>
          </c-fullbox>
        </el-form-item>
      </c-col>
      <c-col :span="24">
        <!-- S0001180 : 押品起息日 -->
        <c-col :span="12">
          <el-form-item label="押品起息日" prop="liaall.limmod.ypqxr">
            <c-date-picker type="date" v-model="model.liaall.limmod.ypqxr" style="width:100%" placeholder="请输入押品起息日"></c-date-picker>
          </el-form-item>
        </c-col>
        <!-- S0001182 : 押品剩余期限 -->
        <c-col :span="12">
          <el-form-item label="押品剩余期限" prop="liaall.limmod.ypsyqx">
            <c-input v-model="model.liaall.limmod.ypsyqx" placeholder="请输入押品剩余期限"></c-input>
          </el-form-item>
        </c-col>
      </c-col>
    </c-col>
    <!-- ======================= 右边 ========================= -->
    <c-col :span="12" style="padding-left: 20px">
      <!-- S0001183 : 额度编号 -->
      <c-col :span="24">
        <el-form-item label="额度编号" prop="liaall.limmod.edbh">
          <c-fullbox>
            <c-input v-model="model.liaall.limmod.edbh" maxlength="40" placeholder="请输入额度编号"></c-input>
            <template slot="footer">
              <c-button size="small" type="primary">查押品号</c-button>
            </template>
          </c-fullbox>
        </el-form-item>
      </c-col>
      <!-- S0001179 : 押品所有人客户号 -->
      <c-col :span="24">
        <el-form-item label="押品所有人客户号" prop="liaall.limmod.ypkhh">
          <c-input v-model="model.liaall.limmod.ypkhh" maxlength="40" placeholder="请输入押品所有人客户号"></c-input>
        </el-form-item>
      </c-col>
      <!-- S0001181 : 押品金额 -->
      <c-col :span="24">
        <el-form-item label="押品金额" prop="liaall.limmod.ypje">
          <c-input-currency v-model="model.liaall.limmod.ypje" placeholder="请输入押品金额"></c-input-currency>
        </el-form-item>
      </c-col>
    </c-col>
    <c-col :span="24">
      <c-table style="text-align: center" highlight-current-row @row-click="handleYpgrdRowClick" :row-class-name="tableYpgrdRowClassName" :list="model.liaall.limmod.ypgrd" :paginationShow="true" :border="true" :total="model.liaall.limmod.ypgrd.length">
        <el-table-column label="押品统一编号" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'liaall.limmod.ypgrd.' + scope.$index + '.yptybh'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="币种" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'liaall.limmod.ypgrd.' + scope.$index + '.ypbz'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="所有人客户号" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'liaall.limmod.ypgrd.' + scope.$index + '.ypkhh'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="起息日" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'liaall.limmod.ypgrd.' + scope.$index + '.ypqxr'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="金额" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'liaall.limmod.ypgrd.' + scope.$index + '.ypje'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="剩余期限" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'liaall.limmod.ypgrd.' + scope.$index + '.ypsyqx'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="到期日" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'liaall.limmod.ypgrd.' + scope.$index + '.ypdqr'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="三级类型" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'liaall.limmod.ypgrd.' + scope.$index + '.yptype'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="三级类型说明" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'liaall.limmod.ypgrd.' + scope.$index + '.yptext'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="押品状态" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'liaall.limmod.ypgrd.' + scope.$index + '.ypzt'">
            </el-form-item>
          </template>
        </el-table-column>
        <el-table-column label="状态描述" width="185px">
          <template slot-scope="scope">
            <el-form-item label-width="0" :prop="'liaall.limmod.ypgrd.' + scope.$index + '.ypzttxt'">
            </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>
  </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.liaall.limmod.ypgrd) {
        start = this.model.liaall.limmod.ypgrd.length;
      }
      this.model.liaall.limmod.ypgrd.splice(start, 0, newRow);
    },
    removeRowZcinvlst() {
      console.log("选中的他行下标", this.currentZcinvlstIndex);
      if (this.currentZcinvlstIndex === -1) {
        this.$notify.error({
          title: "错误",
          message: "请选择一条数据删除!"
        });
        return;
      }
      this.model.liaall.limmod.ypgrd.splice(this.currentZcinvlstIndex, 1);
      this.currentZcinvlstIndex = -1;
      //this.processSetpan();
    },
    tableYpgrdRowClassName({ row, rowIndex }) {
      row.index = rowIndex;
    },
    handleYpgrdRowClick(row) {
      this.currentZcinvlstIndex = row.index;
    }
  },
  created: function() {}
};
</script>
<style>
</style>