Regp.vue 7.06 KB
Newer Older
fukai committed
1 2
<template>
  <div class="eibs-tab">
WeiCong committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
    <c-col :span="24">
      <!-- ==================左边================ -->
      <c-col :span="12" style="padding-right: 20px">
        <c-col :span="24">
          <c-form-item label="业务编号" prop="fxdgrp.rec.ownref">
            <c-fullbox>
              <c-input
                v-model="model.fxdgrp.rec.ownref"
                maxlength="16"
                placeholder="请输入业务编号"
                disabled
              >
              </c-input>
              <template slot="footer">
                <c-button
                  style="margin: 0 0"
                  size="small"
                  type="primary"
xiaotong committed
21
                  :disabled="getOwnrefFlg"
WeiCong committed
22 23 24 25 26 27 28
                  @click="getOwnref"
                >
                  获取
                </c-button>
              </template>
            </c-fullbox>
          </c-form-item>
fukai committed
29
        </c-col>
WeiCong committed
30
        <c-col :span="24">
xiaotong committed
31 32
          <c-form-item label="业务负责人" prop="fxdgrp.rec.usr">
            <c-input v-model="model.fxdgrp.rec.usr" placeholder="请输入业务负责人" disabled></c-input>
WeiCong committed
33
          </c-form-item>
fukai committed
34
        </c-col>
WeiCong committed
35 36 37 38 39 40
        <c-col :span="24">
          <el-form-item label="平盘类型" prop="fxdgrp.rec.fxtyp">
            <c-select
              v-model="model.fxdgrp.rec.fxtyp"
              style="width: 100%"
              placeholder="请输入平盘类型"
41
              :code="codes.fxt_fxtyp"
xiaotong committed
42
              :filterKey="['LB', 'LS']"
WeiCong committed
43 44 45
            >
            </c-select>
          </el-form-item>
fukai committed
46
        </c-col>
WeiCong committed
47 48 49 50 51 52
        <c-col :span="24">
          <c-col :span="12">
            <el-form-item label="卖出金额" prop="fxdgrp.cbs.max.cur">
              <c-select-cur
                v-model="model.fxdgrp.cbs.max.cur"
                style="width: 100%"
xiaotong committed
53
                dbCode="curtxt"
54
                @change="onMaxcurChange"
WeiCong committed
55 56 57 58 59 60 61 62 63
              >
              </c-select-cur>
            </el-form-item>
          </c-col>
          <c-col :span="12">
            <el-form-item label-width="5px" prop="fxdgrp.cbs.max.amt">
              <c-input-currency
                :currency="model.fxdgrp.cbs.max.cur"
                v-model="model.fxdgrp.cbs.max.amt"
64
                @change="onMaxamtChange"
WeiCong committed
65 66 67 68 69 70 71 72 73 74
              ></c-input-currency>
            </el-form-item>
          </c-col>
        </c-col>
        <c-col :span="24">
          <c-col :span="12">
            <el-form-item label="买入金额" prop="fxdgrp.cbs.nom1.cur">
              <c-select-cur
                v-model="model.fxdgrp.cbs.nom1.cur"
                style="width: 100%"
75 76
                :code="codes.bopcur"
                disabled
77

WeiCong committed
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
              >
              </c-select-cur>
            </el-form-item>
          </c-col>
          <c-col :span="12">
            <el-form-item label-width="5px" prop="fxdgrp.cbs.nom1.amt">
              <c-input-currency
                disabled
                :currency="model.fxdgrp.cbs.nom1.cur"
                v-model="model.fxdgrp.cbs.nom1.amt"
              ></c-input-currency>
            </el-form-item>
          </c-col>
        </c-col>
        <c-col :span="24">
          <c-form-item label="平盘牌价" prop="fxdgrp.rec.rat">
            <c-input-currency
              v-model="model.fxdgrp.rec.rat"
96
              @change="onRatChange"
WeiCong committed
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
              style="width: 100%"
              :precision="6"
              placeholder="请输入平盘牌价"
            >
            </c-input-currency>
          </c-form-item>
        </c-col>
        <c-col :span="24">
          <c-form-item label="中间价" prop="fxdgrp.rec.midrat">
            <c-input-currency
              v-model="model.fxdgrp.rec.midrat"
              style="width: 100%"
              :precision="6"
              disabled
              placeholder="请输入中间价"
            >
            </c-input-currency>
          </c-form-item>
        </c-col>
116 117 118 119 120 121 122 123 124 125 126
        <c-col :span="24">
          <el-form-item label="成交日" prop="fxdgrp.rec.opndat">
            <c-date-picker
              type="date"
              v-model="model.fxdgrp.rec.opndat"
              style="width: 100%"
              placeholder="请输入成交日"
            >
            </c-date-picker>
          </el-form-item>
        </c-col>
WeiCong committed
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
        <c-col :span="24">
          <c-form-item label="备注" prop="fxdgrp.blk.remark">
            <c-input
              type="textarea"
              v-model="model.fxdgrp.blk.remark"
              maxlength="140"
              :rows="4"
              style="width: 100%"
              placeholder="请输入备注"
            >
            </c-input>
          </c-form-item>
        </c-col>
      </c-col>
      <!-- ==================右边================ -->
      <c-col :span="12" style="padding-right: 20px">
        <c-col :span="24">
144
			<c-form-item :label="$t('fxtlop.业务名称')" prop="fxdgrp.rec.nam">
xiaotong committed
145
				<c-input  v-model="defaultNam950" maxlength="40" disabled></c-input>
146 147 148
			</c-form-item>
		</c-col>
		<c-col :span="24">
WeiCong committed
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
          <el-card class="box-card">
            <c-ptap
              :model="model"
              :requiredExtkey="true"
              :disabledExtkey="false"
              :disabled="false"
              :isAdrblk="true"
              :haveAdrLabel="true"
              :isShowCard="false"
              :argadr="{ title: '平盘对手', grp: 'fxdgrp', rol: 'apl' }"
              :label="{
                labelExtkey: '平盘对手',
                labelNam: '名称',
                labelAdrblk: '地址',
              }"
              ptytyp="C"
            >
            </c-ptap>
          </el-card>
        </c-col>
        <c-col :span="24">
          <el-form-item label="起息日" prop="fxdgrp.rec.valdat">
            <c-date-picker
              type="date"
              v-model="model.fxdgrp.rec.valdat"
              style="width: 100%"
              placeholder="请输入起息日"
            >
            </c-date-picker>
          </el-form-item>
        </c-col>
      </c-col>
    </c-col>
fukai committed
182 183 184
  </div>
</template>
<script>
WeiCong committed
185
import Api from "~/service/Api";
fukai committed
186
import commonProcess from "~/mixin/commonProcess";
WeiCong committed
187 188
import CodeTable from "~/config/CodeTable";
import event from "../event";
fukai committed
189 190

export default {
WeiCong committed
191 192 193 194 195 196
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [commonProcess, event],
  data() {
    return {};
  },
xiaotong committed
197 198 199 200 201 202 203 204
  computed:{
    getOwnrefFlg: function () {
      let flg = this.model.fxdgrp.rec.fxtyp == '' || this.model.fxdgrp.apl.pts.ptainr == ''
          || this.model.fxdgrp.cbs.max.cur == '' || this.model.fxdgrp.rec.ownref != ''
      return flg;
    },
    defaultNam950: function () {
      let amount = this.moneyFormat(this.model.fxdgrp.cbs.max.amt, this.model.fxdgrp.cbs.max.cur)
205
      let nam=this.getCodelabel(this.model.fxdgrp.rec.fxtyp, "fxt_fxtyp") + ","
xiaotong committed
206
          + this.model.fxdgrp.cbs.max.cur + " " + amount;
207 208
      this.model.fxdgrp.rec.nam=nam;
      return nam;
xiaotong committed
209 210 211 212 213 214 215 216 217
    },
  },
  methods: {
    //获取码值
    getCodelabel(value, codenam) {
      const codeobj = this.codes[codenam].find(obj => obj.value === value)
      return codeobj ? codeobj.label : value;
    },
  },
WeiCong committed
218 219
  created: function () {},
};
fukai committed
220
</script>
WeiCong committed
221
<style></style>