Ovwp.vue 13.4 KB
Newer Older
lianyang committed
1 2
<template>
  <div class="eibs-tab">
3 4 5 6
    <c-row>
      <!-- ====================================顶部================================= -->
      <c-col :span="24">
        <c-col :span="11">
jianglong committed
7
          <el-form-item label="出口信用证编号" prop="ledgrp.rec.ownref" style="width: 100%">
8
            <c-fullbox>
jianglong committed
9
              <c-input v-model="model.ledgrp.rec.ownref" maxlength="16" placeholder="请输入编号" style="width: 95%" :disabled="true">
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
              </c-input>
              <template slot="footer">
                <c-button style="margin: 0 10px 0 0; padding: 0 12px" size="small" type="primary" @click="onSeainf">
                  <span style="font-size: 15px; font-family: '宋体'; font-weight: bold">i</span>
                </c-button>
                <c-button style="margin: 0 0" size="small" type="primary"
                  :disabled="model.ledgrp.ben.pts.adrblk && !model.ledgrp.rec.ownref ? false : true"
                  @click="onLetpButgetref">
                  获取
                </c-button>
              </template>
            </c-fullbox>
          </el-form-item>
        </c-col>
        <c-col :span="11" :offset="1">
jianglong committed
25
          <el-form-item label="简略信息" prop="ledgrp.rec.nam">
26 27 28 29 30 31 32 33 34
            <c-input text-align="middle" v-model="model.ledgrp.rec.nam" maxlength="40" placeholder="请输入" disabled>
            </c-input>
          </el-form-item>
        </c-col>
      </c-col>

      <!-- ================================左边================================= -->
      <c-col :span="11">
        <c-col :span="24">
jianglong committed
35 36
          <el-form-item label="信用证类型" prop="ledgrp.rec.lcrtyp">
            <c-select v-model="model.ledgrp.rec.lcrtyp" style="width:100%" placeholder="请选择类型" :code="codes.lcrtyp">
37 38 39 40
            </c-select>
          </el-form-item>
        </c-col>

41
            <!-- Responsible user -->
42
      <c-col :span="24">
jianglong committed
43
        <el-form-item label="客户经理" prop="letp.usr.extkey">
44 45 46 47 48 49 50 51 52 53 54 55 56 57
          <c-fullbox>
            <c-input v-model="model.letp.usr.extkey" maxlength="8" placeholder="请输入" disabled></c-input>
            <template slot="footer">
              <c-button style="margin-left:10px;padding: 0 10px;" size="small" icon="el-icon-search" type="primary"
              @click="onExtkey"></c-button>
              <c-checkbox :disabled="true" style="margin-left:5px;" v-model="model.ledgrp.rec.collflg">Collateralized L/C</c-checkbox>  
            </template>
          </c-fullbox>
        </el-form-item>
      </c-col> 

              <!-- nominal amount -->
      <c-col :span="24">
        <c-col :span="12">
jianglong committed
58
          <el-form-item label="信用证金额" prop="ledgrp.cbs.nom1.cur">
59
            <c-select v-model="model.ledgrp.cbs.nom1.cur" style="width: 100%" placeholder="请选择币种" 
60
              :code="codes.curtxt1">
61 62 63 64 65 66
            </c-select>
          </el-form-item>
        </c-col>
        <c-col :span="7">
          <el-form-item label="" label-width="5px" prop="ledgrp.cbs.nom1.amt">
            <c-input-currency v-model="model.ledgrp.cbs.nom1.amt" style="text-align: left; width: 95%"
67 68
              placeholder="请输入Nominal Amount" @keyup.enter.native="$event.target.blur()" ></c-input-currency>
                <!-- @keyup.enter.native="$event.target.blur()" :回车触发失去焦点发生的事件 -->
69 70 71 72 73
            <!-- <c-input-currency v-model="model.ledgrp.cbs.nom1.amt" style="text-align: left; width: 100%"
              placeholder="请输入Nominal Amount"></c-input-currency> -->
          </el-form-item>
        </c-col>
        <c-col :span="5">
jianglong committed
74
          <c-checkbox v-model="addamtflg" style="margin-left:-1px;" @change="openAddAmount">附加金额</c-checkbox>
75 76 77 78 79
        </c-col>
      </c-col>

      <c-col :span="24">
        <c-col :span="12">
jianglong committed
80
          <c-form-item label="溢短装" prop="ledgrp.rec.nomtop">
81
            <c-input v-model.number="model.ledgrp.rec.nomtop" maxlength="2" style="width: 100%"
jianglong committed
82
              placeholder="请输入上浮比例"
83
              @keyup.enter.native="$event.target.blur()"
84 85 86 87 88
              class="m-input-currency"></c-input>
          </c-form-item>
        </c-col>
        <c-col :span="7">
          <el-form-item label="" label-width="5px" prop="ledgrp.rec.nomton">
89
            <c-input v-model.number="model.ledgrp.rec.nomton" maxlength="2" style="width: 95%"
jianglong committed
90
              placeholder="请输入下浮比例"
91
              @keyup.enter.native="$event.target.blur()"
92 93 94 95 96 97 98 99 100 101
              class="m-input-currency"></c-input>
          </el-form-item>
        </c-col>
        <c-col :span="5">
          <!-- <c-checkbox v-model="model.ledgrp.preadvflg" style="margin-left:10px;">预先通知</c-checkbox> -->
        </c-col>
      </c-col>

      <c-col :span="24">
        <c-col :span="19">
jianglong committed
102
          <el-form-item label="金额限额表述" prop="ledgrp.rec.nomspc">
103 104 105 106 107 108 109 110 111 112 113 114 115
            <c-select v-model="model.ledgrp.rec.nomspc" style="width: 97%" placeholder="请选择适用金额规范"
              :code="codes.nomspc" disabled>
            </c-select>
          </el-form-item>
        </c-col>
        <!-- Incoming Transfer -->
        <c-col :span="5">
          <c-checkbox v-model="model.ledgrp.rec.inctrf" style="margin-left:-1px;" disabled>Incoming Transfer</c-checkbox>
        </c-col>
      </c-col>

      <!-- Maximum Amount -->
      <c-col :span="12">
jianglong committed
116
        <el-form-item label="最大金额" prop="ledgrp.cbs.max.cur">
117 118 119 120 121 122 123 124 125 126 127 128 129 130
          <c-select v-model="model.ledgrp.cbs.max.cur" style="width: 100%" placeholder="请选择币种" :code="codes.curtxt1"
            disabled>
          </c-select>
        </el-form-item>
      </c-col>
      <c-col :span="12">
        <el-form-item label="" label-width="5px" prop="ledgrp.cbs.max.amt">
          <c-input disabled v-model="model.ledgrp.cbs.max.amt" placeholder="请输入最大金额"
          class="m-input-currency"></c-input>
        </el-form-item>
      </c-col>

      <!-- Issued on -->
      <c-col :span="12">
jianglong committed
131
        <el-form-item label="开证日期" prop="ledgrp.rec.opndat">
132 133 134 135 136 137
          <c-date-picker type="date" v-model="model.ledgrp.rec.opndat" style="width: 100%" value-format="yyyy-MM-dd"
            placeholder="请选择开证日期">
          </c-date-picker>
        </el-form-item>
      </c-col>
      <c-col :span="11" :offset="1">
jianglong committed
138
        <el-form-item label="预通知日期" label-width="120px" prop="ledgrp.rec.preadvdt">
139 140 141 142 143 144
          <c-date-picker type="date" v-model="model.ledgrp.rec.preadvdt" style="width: 100%"  value-format="yyyy-MM-dd" placeholder="请选择日期" disabled>
          </c-date-picker>
        </el-form-item>
      </c-col>
      <!-- shipment date -->
      <c-col :span="12">
jianglong committed
145
        <el-form-item label="装运日期" prop="ledgrp.rec.shpdat">
146 147 148 149 150
          <c-date-picker type="date" v-model="model.ledgrp.rec.shpdat" style="width: 100%" placeholder="请选择装运日期" value-format="yyyy-MM-dd">
          </c-date-picker>
        </el-form-item>
      </c-col>
      <c-col :span="11" :offset="1">
jianglong committed
151
        <el-form-item label="复核日期" label-width="120px" prop="ledgrp.rec.advdat">
152 153 154 155 156 157 158
          <c-date-picker disabled type="date" v-model="model.ledgrp.rec.advdat" style="width: 100%" placeholder="请选择通知日期" value-format="yyyy-MM-dd">
          </c-date-picker>
        </el-form-item>
      </c-col>

      <!-- expiring on -->
      <c-col :span="24">
jianglong committed
159
        <el-form-item label="生效日期" prop="ledgrp.rec.expdat">
160 161 162 163 164 165 166
          <c-date-picker type="date" v-model="model.ledgrp.rec.expdat" style="width: 100%" value-format="yyyy-MM-dd"
            placeholder="请选择到期日">
          </c-date-picker>
        </el-form-item>
      </c-col>
      <!-- in (place)/counters of -->
      <c-col :span="24">
jianglong committed
167
        <el-form-item label="生效地点" prop="ledgrp.rec.expplc">
168 169 170 171 172
          <c-input v-model="model.ledgrp.rec.expplc" maxlength="29" placeholder="有效地点"></c-input>
        </el-form-item>
      </c-col>
      <!-- Confirmation Instruct.Received -->
      <c-col :span="24">
jianglong committed
173
        <el-form-item label="保兑指示" prop="ledgrp.rec.cnfdet">
174 175 176 177 178 179 180
          <c-select v-model="model.ledgrp.rec.cnfdet" style="width: 100%" placeholder="请选择确认接收指示"
            :code="codes.cnfflg1">
          </c-select>
        </el-form-item>
      </c-col>
      <!-- Applicable rules -->
      <c-col :span="24">
jianglong committed
181
        <el-form-item label="适用规则" prop="ledgrp.rec.apprul">
182
          <c-select v-model="model.ledgrp.rec.apprul" style="width: 100%" placeholder="请选择适用规则"
183
            :code="codes.apprul" @change="apprulChange">
184 185 186 187 188
          </c-select>
        </el-form-item>
      </c-col>
      <!-- Other Applicable rules -->
      <c-col :span="24">
jianglong committed
189
        <el-form-item label="其他适用规则" prop="ledgrp.rec.apprultxt">
190 191
          <c-input v-model="model.ledgrp.rec.apprultxt" maxlength="35" placeholder="请输入其他规则"
          :disabled="model.ledgrp.rec.apprul === 'OTHR' ? false : true"></c-input>
192 193 194 195
        </el-form-item>
      </c-col>
      <!-- Partial shipment -->
      <c-col :span="24">
jianglong committed
196
        <el-form-item label="分批装运" prop="ledgrp.rec.shppar">
197 198 199 200 201 202 203
          <c-select v-model="model.ledgrp.rec.shppar" style="width: 100%" placeholder="请选择分批装运"
            :code="codes.shptrss18">
          </c-select>
        </el-form-item>
      </c-col>
      <!-- Transshipment -->
      <c-col :span="24">
jianglong committed
204 205
        <el-form-item label="转运" prop="ledgrp.rec.shptrs">
          <c-select v-model="model.ledgrp.rec.shptrs" style="width:100%" placeholder="请选择"
206 207 208 209 210 211 212
            :code="codes.shptrss18">
          </c-select>
        </el-form-item>
      </c-col>

      </c-col>
        
jianglong committed
213
      
214 215 216 217
      

      <!-- ========================右边======================= -->
      <c-col :span="11" :offset="1">
jianglong committed
218
       
219 220 221

        <c-col :span="24">
          <c-ptap :model="model" :argadr="{
jianglong committed
222
            title: '受益人',
223 224 225 226 227 228 229 230 231 232
            grp: 'ledgrp',
            rol: 'ben',
          }" :disabled="true" @onSeainf="onSeainf" @onAplpDet="onBenpDet"
          disabledRef
          disabledExtkey>
          </c-ptap>
        </c-col>

        <c-col :span="24">
            <c-ptap :model="model" :argadr="{
jianglong committed
233
              title: '开证行',
234 235 236 237 238 239 240 241 242 243
              grp: 'ledgrp',
              rol: 'iss',
            }" :disabled="true" @onSeainf="onSeainf" @onAplpDet="onIsspDet"
            disabledRef
            disabledExtkey>
            </c-ptap>
          </c-col>

          <c-col :span="24">
            <c-ptap :model="model" :argadr="{
jianglong committed
244
              title: '申请人',
245 246 247 248 249 250 251 252 253 254
              grp: 'ledgrp',
              rol: 'apl',
            }" :disabled="true" @onSeainf="onSeainf" @onAplpDet="onAplpDet"
            disabledRef
            disabledExtkey>
            </c-ptap>
          </c-col>

                <!-- Revolving Flag -->
          <c-col :span="12" class="centerLable marginLable">
jianglong committed
255
            <c-checkbox v-model="model.ledgrp.rec.revflg">循环信用证</c-checkbox>
256 257 258
          </c-col>
                    <!-- Authorization to Debit 借记授权书-->
          <c-col :span="12" class="centerLable marginLable">
jianglong committed
259
            <c-checkbox v-model="model.ledgrp.rec.dbtflg">借记授权</c-checkbox>
260 261 262 263
          </c-col>

          <!-- Non-Bank Issuer  非银行发行人-->
          <c-col :span="24" class="centerLable marginLable">
jianglong committed
264
            <c-checkbox v-model="model.ledgrp.rec.nonban">非银行发行人</c-checkbox>
265 266 267 268
          </c-col>

          <!-- Test Key Unconfirmity -->
          <c-col :span="24" class="centerLable marginLable">
jianglong committed
269
            <c-checkbox v-model="model.ledgrp.rec.teskeyunc">测试密钥不确定</c-checkbox>
270 271 272 273
          </c-col>

      </c-col>

jianglong committed
274
      
275
    </c-row>
lianyang committed
276 277 278 279 280 281 282
  </div>
</template>
<script>
import Api from "~/service/Api"
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable"
import Event from "~/model/Letamc/Event"
283 284
import Utils from "~/utils";
import Ptap from "~/views/Public/Ptap";
lianyang committed
285 286

export default {
287
  components: { "c-ptap": Ptap },
288 289 290 291 292
  inject: ['root'],
  props: ["model", "codes"],
  mixins: [commonProcess],
  data() {
    return {
lianyang committed
293

294 295 296 297 298 299
    }
  },
  computed: {
    addamtflg: {
      get() {
        return this.model.letp.aamp.aammod.addamtflg != ''
lianyang committed
300
      },
301 302 303
      set(val) {
        this.model.letp.aamp.aammod.addamtflg = val ? "X" : ""
      }
lianyang committed
304
    },
305
  },
306
  methods: { ...Event,
307
    apprulChange(v) {
308 309 310
      if (v !== "OTHR") {
        this.model.ledgrp.rec.apprultxt = "";
      }
311
    },
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339
    openAddAmount(val){
      if(val ==='' && !(this.model.ledgrp.cbs.max2.amt =='0.000'&& this.model.ledgrp.blk.addamtcov === '') ){
        this.$confirm('Do you really want to delete the additional amount of this contract?','提示',{
            confirmButtonText: 'Yes',
            cancelButtonText: 'No',
            type: 'warning',
            showClose:false
          }).then(() => {//yes的执行在这里写
            this.executeRule('letp.aamp.aammod.addamtflg').then(res => {
                if (res.respCode == SUCCESS) {
                    this.updateModel(res.data)
                }
            })
            // this.model.ledgrp.cbs.max2.amt ='0.000';
            // this.model.ledgrp.blk.addamtcov = '';
            // this.$message({
            //       type: 'success',
            //       message: '删除成功!'
            // });
          }).catch(() => {//No的功能在这里写
            this.model.letp.aamp.aammod.addamtflg ='X'
                // this.$message({
                //   type: 'info',
                //   message: '已取消'
                // });  
          }); 
      }
    },
340
  },
341
  created: function () {
lianyang committed
342

343
  }
lianyang committed
344 345 346
}
</script>
<style>
347 348 349 350

.marginLable {
  padding-left: 150px;
}
lianyang committed
351
</style>