Opnp1.vue 10.9 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 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262
<template>
  <div class="eibs-tab">
    <c-col :span="24">
      <!-- ======================= 左边 ========================= -->
      <c-col :span="12" style="padding-right: 20px">
        <!-- 处理方式 -->
        <c-col :span="24">
          <el-form-item label="处理方式" prop="cpdgrp.rec.accmod">
            <c-select :disabled="this.model.cpdgrp.rec.accmod=='G'" v-model="model.cpdgrp.rec.accmod" style="width:100%" placeholder="请输入处理方式" :code="codes.cptmod" :filterKey="this.model.cpdgrp.rec.accmod=='G'?['G']:['0','2']">
            </c-select>
          </el-form-item>
        </c-col>
        <!-- S0000367 : 业务编号 -->
        <c-col :span="24">
          <el-form-item label="业务编号(20)" prop="cpdgrp.rec.ownref">
            <c-fullbox>
              <c-input v-model="model.cpdgrp.rec.ownref" maxlength="16" placeholder="请输入业务编号" disabled></c-input>
              <template slot="footer">
                <c-button style="margin: 0 10px 0 10px; padding: 0 12px; height: 32px" size="small" type="primary" icon="el-icon-search">
                </c-button>
                <c-button style="margin: 0 0" size="small" type="primary" :disabled="model.cpdgrp.rec.ownref!=''" @click="getOwnref()">
                  获取
                </c-button>
              </template>
            </c-fullbox>
          </el-form-item>
        </c-col>
        <!-- SG000398 : 清算编号 -->
        <c-col :span="24">
          <el-form-item label="清算编号(IM)" prop="cpdgrp.rec.sysno">
            <c-input v-model="model.cpdgrp.rec.sysno" maxlength="21" placeholder="请输入清算编号"></c-input>
          </el-form-item>
        </c-col>

        <!-- S0000372 : 汇款金额 -->
        <c-col :span="24">
          <c-col :span="12">
            <el-form-item label="汇款金额(32a)" prop="cpdgrp.cbs.nom1.cur">
              <c-select-cur v-model="model.cpdgrp.cbs.nom1.cur" style="width:100%" placeholder="请选择币种" dbCode="curtxt" sort="SRT" :expKey="['CNY']" :isShowKeyAndLabel="true">
              </c-select-cur>
            </el-form-item>
          </c-col>
          <c-col :span="12">
            <el-form-item label-width="5px" prop="cpdgrp.cbs.nom1.amt">
              <c-input-currency :currency="model.cpdgrp.cbs.nom1.cur" v-model="model.cpdgrp.cbs.nom1.amt" placeholder=""></c-input-currency>
            </el-form-item>
          </c-col>
        </c-col>
        <c-col :span="24">
          <el-form-item label="汇款语种" prop="cptp.payuil">
            <c-select v-model="model.cptp.payuil" style="width:100%" placeholder="请输入汇款语种" dbCode="PAYUIL">
            </c-select>
          </el-form-item>
        </c-col>
        <c-col :span="24" v-if="model.cpdgrp.rec.swftyp=='103'">
          <!-- SG000415 : 原始金额 -->
          <c-col :span="12">
            <el-form-item label="原始金额(33b)" prop="cpdgrp.rec.curf33b">
              <c-select-cur v-model="model.cpdgrp.rec.curf33b" style="width:100%" placeholder="请输入原始币种" dbCode="curtxt" sort="SRT" :expKey="['CNY']" :isShowKeyAndLabel="true">
              </c-select-cur>
            </el-form-item>
          </c-col>
          <c-col :span="12">
            <el-form-item label-width="5px" prop="cpdgrp.rec.amtf33b">
              <c-input-currency :currency="model.cpdgrp.rec.curf33b" v-model="model.cpdgrp.rec.amtf33b" placeholder="请输入原始金额"></c-input-currency>
            </el-form-item>
          </c-col>
        </c-col>
        <c-col :span="24"  v-if="model.cpdgrp.rec.swftyp=='103'">
          <!-- SG000417 : 发报行扣费金额 -->
          <c-col :span="12">
            <el-form-item label="发报行扣费金额(71f)" prop="cpdgrp.rec.cur71f">
              <c-select-cur :disabled="this.model.cpdgrp.rec.detchgcod == 'OUR'" v-model="model.cpdgrp.rec.cur71f" style="width:100%" placeholder="请输入发报行扣费金额" dbCode="curtxt" sort="SRT" :expKey="['CNY']" :isShowKeyAndLabel="true">
              </c-select-cur>
            </el-form-item>
          </c-col>
          <c-col :span="12">
            <el-form-item label-width="5px" prop="cpdgrp.rec.amt71f">
              <c-input-currency :disabled="this.model.cpdgrp.rec.detchgcod == 'OUR'" :currency="model.cpdgrp.rec.cur71f" v-model="model.cpdgrp.rec.amt71f" placeholder="请输入"></c-input-currency>
            </el-form-item>
          </c-col>
        </c-col>
      </c-col>
      <!-- ======================= 右边 ========================= -->
      <c-col :span="12" style="padding-left: 20px">
        <!-- SG000405 : 汇款性质 -->
        <c-col :span="24">
          <el-form-item label="汇款性质" prop="cpdgrp.rec.trntyp">
            <c-select v-model="model.cpdgrp.rec.trntyp" style="width:100%" :isShowKeyAndLabel="true" placeholder="请输入汇款性质" dbCode="CTRTYE" uil="CN" sort="SRT" :filterKey="['01','02','03','04','05','06','07','08','09','10']">
            </c-select>
          </el-form-item>
        </c-col>
        <!-- SG000818 : Uetr -->
        <c-col :span="24" v-if="model.cpdgrp.rec.swftyp!='OTH'">
          <el-form-item label="Uetr(121)" prop="cpdgrp.rec.uetr">
            <c-fullbox>
              <c-input disabled v-model="model.cpdgrp.rec.uetr" maxlength="40" placeholder="请输入Uetr"></c-input>
              <template slot="footer">
                <c-button size="small" type="primary" @click="getUetr">
                  获取
                </c-button>
              </template>
            </c-fullbox>
          </el-form-item>
        </c-col>

        <c-col :span="24">
          <el-form-item label="解付日期" prop="cpdgrp.rec.paydat">
            <c-date-picker type="date" v-model="model.cpdgrp.rec.paydat" style="width:100%" placeholder="请输入解付日期"></c-date-picker>
          </el-form-item>
        </c-col>
        <c-col :span="24">
          <el-form-item label="起息日(37)" prop="cpdgrp.rec.valdat">
            <c-date-picker type="date" v-model="model.cpdgrp.rec.valdat" style="width:100%" placeholder="请输入起息日"></c-date-picker>
          </el-form-item>
        </c-col>
        <c-col :span="24">
          <el-form-item label="费用承担方(71a)" prop="cpdgrp.rec.detchgcod">
            <c-select placeholder="请输入费用类型" style="width:100%" v-model="model.cpdgrp.rec.detchgcod" dbCode="FEECOD" uil="CN" :filterKey="['SHA','BEN','OUR']" @change="feetypChange" :isShowKeyAndLabel="true">
            </c-select>
          </el-form-item>
        </c-col>
        <c-col :span="24" v-if="model.cpdgrp.rec.swftyp=='103'">
          <el-form-item label="汇率(36)" prop="cpdgrp.rec.f36">
            <c-input-currency :disabled="this.model.cpdgrp.rec.detchgcod != 'BEN'" :precision='6' v-model="model.cpdgrp.rec.f36" placeholder="请输入汇率"></c-input-currency>
          </el-form-item>
        </c-col>

        <c-col :span="24">
          <el-form-item label="同名划转" prop="cpdgrp.rec.tsnflg" class="checkbox-left">
            <c-checkbox v-model="model.cpdgrp.rec.tsnflg" true-label="X" false-label=""></c-checkbox>
          </el-form-item>
        </c-col>
      </c-col>
    </c-col>
  </div>
</template>
<script>
import event from "../../event";
import Default from "../../model/default";
import BigNumber from "bignumber.js";

export default {
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [event, Default],
  data() {
    return {};
  },
  methods: {},
  created() {},
  watch: {
    "model.cpdgrp.cbs.nom1.cur": {
      immediate: true,
      handler(newVal) {
        if (newVal) {
          this.model.cpdgrp.cbs.max.cur = newVal;
          // if (
          //   this.model.cpdgrp.cbs.nom1.cur &&
          //   this.model.cpdgrp.rec.curf33b &&
          //   this.model.cpdgrp.rec.cur71f &&
          //   this.model.cpdgrp.cbs.nom1.cur == this.model.cpdgrp.rec.curf33b &&
          //   this.model.cpdgrp.rec.curf33b == this.model.cpdgrp.rec.cur71f
          // ) {
          //   this.model.cpdgrp.rec.amtf33b = new BigNumber(
          //     this.model.cpdgrp.rec.amt71f
          //   ).plus(new BigNumber(this.model.cpdgrp.cbs.nom1.amt));
          // }
        }
      }
    },
    "model.cpdgrp.cbs.nom1.amt": {
      immediate: true,
      handler(newVal) {
        if (newVal) {
          this.model.cpdgrp.cbs.max.amt = newVal;
          // if (
          //   this.model.cpdgrp.cbs.nom1.cur &&
          //   this.model.cpdgrp.rec.curf33b &&
          //   this.model.cpdgrp.rec.cur71f &&
          //   this.model.cpdgrp.cbs.nom1.cur == this.model.cpdgrp.rec.curf33b &&
          //   this.model.cpdgrp.rec.curf33b == this.model.cpdgrp.rec.cur71f
          // ) {
          //   this.model.cpdgrp.rec.amtf33b = new BigNumber(newVal).plus(
          //     new BigNumber(this.model.cpdgrp.rec.amt71f)
          //   );
          // }
        }
      }
    },
    // "model.cpdgrp.rec.amt71f": {
    //   immediate: true,
    //   handler(newVal) {
    //     if (newVal) {
    //       if (
    //         this.model.cpdgrp.cbs.nom1.cur &&
    //         this.model.cpdgrp.rec.curf33b &&
    //         this.model.cpdgrp.rec.cur71f &&
    //         this.model.cpdgrp.cbs.nom1.cur == this.model.cpdgrp.rec.curf33b &&
    //         this.model.cpdgrp.rec.curf33b == this.model.cpdgrp.rec.cur71f
    //       ) {
    //         this.model.cpdgrp.rec.amtf33b = new BigNumber(newVal).plus(
    //           new BigNumber(this.model.cpdgrp.cbs.nom1.amt)
    //         );
    //       }
    //     }
    //   }
    // },
    // "model.cpdgrp.rec.curf33b": {
    //   immediate: true,
    //   handler(newVal) {
    //     if (newVal) {
    //       if (
    //         this.model.cpdgrp.cbs.nom1.cur &&
    //         newVal &&
    //         this.model.cpdgrp.rec.cur71f &&
    //         this.model.cpdgrp.cbs.nom1.cur == newVal &&
    //         newVal == this.model.cpdgrp.rec.cur71f
    //       ) {
    //         this.model.cpdgrp.rec.amtf33b = new BigNumber(
    //           this.model.cpdgrp.rec.amt71f
    //         ).plus(new BigNumber(this.model.cpdgrp.cbs.nom1.amt));
    //       }
    //     }
    //   }
    // },
    // "model.cpdgrp.rec.cur71f": {
    //   immediate: true,
    //   handler(newVal) {
    //     if (newVal) {
    //       if (
    //         this.model.cpdgrp.cbs.nom1.cur &&
    //         this.model.cpdgrp.rec.curf33b &&
    //         newVal &&
    //         this.model.cpdgrp.cbs.nom1.cur == this.model.cpdgrp.rec.curf33b &&
    //         this.model.cpdgrp.rec.curf33b == newVal
    //       ) {
    //         this.model.cpdgrp.rec.amtf33b = new BigNumber(
    //           this.model.cpdgrp.rec.amt71f
    //         ).plus(new BigNumber(this.model.cpdgrp.cbs.nom1.amt));
    //       }
    //     }
    //   }
    // }
  }
};
</script>
<style scoped lang="less">
.box-card {
  margin-bottom: 10px;
  /deep/ .el-form-item--mini.el-form-item,
  .el-form-item--small.el-form-item {
    margin-bottom: 10px;
  }
  /deep/ .el-card__body {
    padding: 10px 10px 10px 0px;
  }
}
.el-textarea .el-textarea__inner {
  height: 100px;
}
</style>