Detp.vue 14.2 KB
Newer Older
zhengxiaokui committed
1 2
<template>
  <div class="eibs-tab">
zhengxiaokui committed
3
    <c-row>
4
      <!-- =========================================左边============================================= -->
zhengxiaokui committed
5
      <c-col :span="11">
6
        <!-- Available with指定银行 -->
zhengxiaokui committed
7 8 9 10 11
        <c-col :span="24">
          <el-form-item label="Available with" prop="ledgrp.rec.avbwth">
            <c-select
              v-model="model.ledgrp.rec.avbwth"
              style="width: 100%"
12 13
              placeholder="请选择指定银行"
              :code="codes.avbwth"
14
              @change="avbwthEvent"
zhengxiaokui committed
15 16 17
            >
            </c-select>
          </el-form-item>
zhengxiaokui committed
18
        </c-col>
zhengxiaokui committed
19 20 21

        <c-col :span="24">
          <c-ptap
22
            v-if="model.ledgrp.rec.avbwth!='O'"
zhengxiaokui committed
23 24
            :model="model"
            :argadr="{
25
              title: '',
zhengxiaokui committed
26 27 28 29 30 31 32
              grp: 'ledgrp',
              rol: 'avb',
            }"
            :noRef="true"
            :onlySearch="true"
            @onSeainf="onSeainf"
            @onAplpDet="onAvbpDet"
33
            :disabledExtkey="!avbFlag"
zhengxiaokui committed
34 35
          >
          </c-ptap>
zhengxiaokui committed
36
        </c-col>
zhengxiaokui committed
37 38

        <c-col :span="24">
39
          <el-form-item label="" prop="ledgrp.blk.avbwthtxt">
zhengxiaokui committed
40 41 42 43
            <c-input
              type="textarea"
              :rows="3"
              v-model="model.ledgrp.blk.avbwthtxt"
44
              maxlength="140"
zhengxiaokui committed
45 46
              show-word-limit
              placeholder="请输入名称地址"
47
              :disabled="model.ledgrp.rec.avbwth!='O'"
zhengxiaokui committed
48 49
            ></c-input>
          </el-form-item>
zhengxiaokui committed
50
        </c-col>
zhengxiaokui committed
51 52 53 54 55 56 57 58 59 60 61 62
        <!-- <c-col :span="12">
      <el-form-item label="Address Block" prop="ledgrp.avb.pts.adrblk">
        <c-input
          type="textarea"
          v-model="model.ledgrp.avb.pts.adrblk"
          maxlength="35"
          show-word-limit
          placeholder="请输入Address Block"
        ></c-input>
      </el-form-item>
    </c-col> -->

63
            <!--Available by 兑付方式 -->
zhengxiaokui committed
64 65 66 67 68
        <c-col :span="24">
          <el-form-item label="Available by" prop="ledgrp.rec.avbby">
            <c-select
              v-model="model.ledgrp.rec.avbby"
              style="width: 100%"
69 70 71
              placeholder="请选择兑付方式"
              :code="codes.avbby0"
              @change="avbbykeyEvent"
zhengxiaokui committed
72 73 74
            >
            </c-select>
          </el-form-item>
zhengxiaokui committed
75
        </c-col>
zhengxiaokui committed
76

77
        <!-- 远期付款指示 Deferred Payment Details-->
zhengxiaokui committed
78
        <c-col :span="24">
79
          <el-form-item label="Negotiation/Deferred Payment Details" prop="ledgrp.blk.defdet">
zhengxiaokui committed
80 81 82 83
            <c-input
              type="textarea"
              :rows="3"
              v-model="model.ledgrp.blk.defdet"
84
              maxlength="140"
zhengxiaokui committed
85
              show-word-limit
86 87
              placeholder="请输入远期付款指示"
              :disabled="defdetFlag"
zhengxiaokui committed
88 89
            ></c-input>
          </el-form-item>
zhengxiaokui committed
90
        </c-col>
zhengxiaokui committed
91

92
        <!-- Drafts at 汇票期限 -->
zhengxiaokui committed
93 94
        <c-col :span="24">
          <el-form-item label="Drafts at" prop="ledgrp.blk.dftat">
95 96 97 98 99 100 101 102 103 104 105
            <c-fullbox>
              <c-input
                type="textarea"
                :rows="3"
                v-model="model.ledgrp.blk.dftat"
                maxlength="105"
                show-word-limit
                placeholder="请输入汇票期限"
                :disabled="blkDftatFlag"
              ></c-input>
              <template slot="footer">
106
                <!-- @click="onLcrdftatButtxmsel" -->
107 108 109 110
                <c-button
                  size="small"
                  type="primary"
                  icon="el-icon-search"
111
                  @click="showGridPromptDialog('letp.lcrdftat.buttxmsel', null, null,{TXT: 'ledgrp.blk.dftat'}, {TXT: false},'doxpDialog')"
112 113 114 115 116 117
                  :disabled="blkDftatFlag"
                >
                  ...
                </c-button>
              </template>
            </c-fullbox>
zhengxiaokui committed
118
          </el-form-item>
zhengxiaokui committed
119
        </c-col>
zhengxiaokui committed
120

121
            <!--Drawee 付款人 -->
zhengxiaokui committed
122 123 124 125
        <c-col :span="24">
          <c-ptap
            :model="model"
            :argadr="{
126
              title: 'Drawee',
zhengxiaokui committed
127 128 129 130
              grp: 'ledgrp',
              rol: 'drw',
            }"
            :noRef="true"
131 132 133
            :onlySearch="false"
            :isAdrblk="false"
            :haveAdrLabel="false"
zhengxiaokui committed
134 135
            @onSeainf="onSeainf"
            @onAplpDet="onDrwpDet"
136
            :disabled="blkDftatFlag"
zhengxiaokui committed
137 138
          >
          </c-ptap>
zhengxiaokui committed
139
        </c-col>
zhengxiaokui committed
140

141
        <!-- Dispatch from   货物转运地(港) -->
zhengxiaokui committed
142
        <c-col :span="24">
143
          <el-form-item label="Dispatch from" prop="ledgrp.rec.shpfro">
zhengxiaokui committed
144 145 146
            <c-input
              type="textarea"
              show-word-limit
147 148 149
              v-model="model.ledgrp.rec.shpfro"
              maxlength="65"
              placeholder="请输入"
zhengxiaokui committed
150 151
            ></c-input>
          </el-form-item>
zhengxiaokui committed
152
        </c-col>
zhengxiaokui committed
153

154
        <!-- Air-/Port of Departure 始发航空站/港口-->
zhengxiaokui committed
155
        <c-col :span="24">
156
          <el-form-item label="Air-/Port of Departure" prop="ledgrp.rec.porloa">
zhengxiaokui committed
157
            <c-input
158 159 160 161 162
              type="textarea"
              v-model="model.ledgrp.rec.porloa"
              maxlength="65"
              show-word-limit
              placeholder="请输入"
zhengxiaokui committed
163 164
            ></c-input>
          </el-form-item>
zhengxiaokui committed
165
        </c-col>
zhengxiaokui committed
166

167
        <!-- Air-/Port of Destination 目的航空站/港口-->
zhengxiaokui committed
168
        <c-col :span="24">
169
          <el-form-item label="Air-/Port of Destination" prop="ledgrp.rec.pordis">
zhengxiaokui committed
170 171
            <c-input
              type="textarea"
172 173
              v-model="model.ledgrp.rec.pordis"
              maxlength="65"
zhengxiaokui committed
174
              show-word-limit
175
              placeholder="请输入"
zhengxiaokui committed
176 177
            ></c-input>
          </el-form-item>
zhengxiaokui committed
178
        </c-col>
zhengxiaokui committed
179

180
        <!-- Final Destination 最终目的地-->
zhengxiaokui committed
181
        <c-col :span="24">
182
          <el-form-item label="Final Destination" prop="ledgrp.rec.shpto">
zhengxiaokui committed
183 184
            <c-input
              type="textarea"
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
              v-model="model.ledgrp.rec.shpto"
              maxlength="65"
              show-word-limit
              placeholder="最终目的地"
            ></c-input>
          </el-form-item>
        </c-col>

        <!-- Shipment Period 装运期-->
        <c-col :span="24">
          <el-form-item label="Shipment Period" prop="ledgrp.blk.shpper">
            <c-input
              type="textarea"
              v-model="model.ledgrp.blk.shpper"
              maxlength="65"
zhengxiaokui committed
200
              show-word-limit
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 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283
              placeholder="请输入装运期"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
      </c-col>

      <!-- =========================================右边============================================= -->
      <c-col :span="11" :offset="1">
        <!-- Mixed Payment Details混合付款指示 -->
        <c-col :span="24">
          <el-form-item label="Mixed Payment Details" prop="ledgrp.blk.mixdet">
            <c-input
              type="textarea"
              :rows="4"
              v-model="model.ledgrp.blk.mixdet"
              maxlength="140"
              show-word-limit
              placeholder="混合付款指示"
              :disabled="model.ledgrp.rec.avbby != 'M'"
            ></c-input>
          </el-form-item>
        </c-col>


    <!-- <c-col :span="12">
      <el-form-item label="Presentation Period" prop="ledgrp.blk.preper">
        <c-input
          type="textarea"
          v-model="model.ledgrp.blk.preper"
          maxlength="35"
          show-word-limit
          placeholder="请输入Presentation Period"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item
        label="Days of presentation period"
        prop="ledgrp.rec.prepers18"
      >
        <c-input
          v-model="model.ledgrp.rec.prepers18"
          placeholder="请输入Days of presentation period"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <c-button
        size="small"
        type="primary"
        icon="el-icon-search"
        @click="onPreperButtxmsel"
      >
        ...
      </c-button>
    </c-col> 
    
        <c-col :span="12">
      <el-form-item
        label="Presentation period text"
        prop="ledgrp.rec.prepertxts18"
      >
        <c-input
          v-model="model.ledgrp.rec.prepertxts18"
          maxlength="35"
          placeholder="请输入Presentation period text"
        ></c-input>
      </el-form-item>
    </c-col>-->


        <!-- 交单期限 Days of presentation period-->
        <c-col :span="24">
          <el-form-item label="Presentation Period" prop="ledgrp.rec.prepers18">
            <c-fullbox>
              <c-input
                v-model="model.ledgrp.rec.prepers18"
                placeholder="请输入Days of presentation period"
              ></c-input>
              <template slot="footer">
284
                <!-- @click="onPreperButtxmsel" -->
285 286 287 288
                <c-button
                  size="small"
                  type="primary"
                  icon="el-icon-search"
289 290
                  @click="showGridPromptDialog('letp.preper.buttxmsel', null, null,{TXT: 'ledgrp.rec.prepers18'}, {TXT: false},'doxpDialog')"
                  disabled
291 292 293 294 295 296 297 298 299 300 301 302 303 304 305
                >
                  ...
                </c-button>
              </template>
            </c-fullbox>
          </el-form-item>
        </c-col>

        <!-- Days of presentation period -->
        <c-col :span="24">
          <el-form-item label="" prop="ledgrp.rec.prepertxts18">
            <c-input
              v-model="model.ledgrp.rec.prepertxts18"
              maxlength="35"
              placeholder="请输入交单期天数"
zhengxiaokui committed
306 307
            ></c-input>
          </el-form-item>
zhengxiaokui committed
308
        </c-col>
zhengxiaokui committed
309

310 311 312 313 314 315 316 317 318 319 320 321 322
        <!-- 附加收费详情 Additional Details to  Charges  -->
        <c-col :span="24">
          <el-form-item label="Additional Details to Charges" prop="ledgrp.blk.feetxt">
            <c-fullbox>
              <c-input
                type="textarea"
                :rows="6"
                v-model="model.ledgrp.blk.feetxt"
                maxlength="210"
                show-word-limit
                placeholder="请输入附加收费详情"
              ></c-input>
              <template slot="footer">
323
                <!-- @click="onChariaButtxmsel" -->
324 325 326 327
                <c-button
                  size="small"
                  type="primary"
                  icon="el-icon-search"
328
                  @click="showGridPromptDialog('letp.charia.buttxmsel', null, null,{TXT: 'ledgrp.blk.feetxt'}, {TXT: false},'doxpDialog')"
329 330 331 332 333 334 335 336 337 338 339
                >
                  ...
                </c-button>
              </template>
            </c-fullbox>
          </el-form-item>
        </c-col>

        <!-- Own Charges Borne by费用状况 -->
        <c-col :span="24">
          <el-form-item label="Charges Condition" prop="ledgrp.rec.chato">
zhengxiaokui committed
340 341 342
            <c-select
              v-model="model.ledgrp.rec.chato"
              style="width: 100%"
343 344
              placeholder="请选择"
              :code="codes.chadet"
zhengxiaokui committed
345 346 347
            >
            </c-select>
          </el-form-item>
zhengxiaokui committed
348
        </c-col>
zhengxiaokui committed
349

350 351 352
        <!-- Country or region code 国家或地区代码-->
        <c-col :span="24">
          <el-form-item label="Country or region code" prop="ledgrp.rec.stacty">
zhengxiaokui committed
353 354 355
            <c-select
              v-model="model.ledgrp.rec.stacty"
              style="width: 100%"
356 357
              placeholder="请选择国家或地区代码"
              :code="codes.ctytxt"
zhengxiaokui committed
358 359 360
            >
            </c-select>
          </el-form-item>
zhengxiaokui committed
361
        </c-col>
zhengxiaokui committed
362

363 364
        <!-- 付款期限 Maxinum Tenor-->
        <c-col :span="24">
zhengxiaokui committed
365 366
          <el-form-item label="Maximum Tenor" prop="ledgrp.rec.tenmaxday">
            <c-input
367 368 369 370 371 372 373 374 375 376
              v-model.number="model.ledgrp.rec.tenmaxday"
              placeholder="请输入"
              :disabled="model.ledgrp.rec.avbby == 'P'"
              maxlength="4"
              @keyup.enter.native="
                defaultFunction(
                  'ledgrp.rec.tenmaxday',
                  model.ledgrp.rec.tenmaxday
                )
              "
zhengxiaokui committed
377 378
            ></c-input>
          </el-form-item>
zhengxiaokui committed
379
        </c-col>
zhengxiaokui committed
380 381
      </c-col>
    </c-row>
zhengxiaokui committed
382 383 384
  </div>
</template>
<script>
385 386 387 388 389
import Api from '~/service/Api'
import commonProcess from '~/mixin/commonProcess'
import CodeTable from '~/config/CodeTable'
import Event from '~/model/Letame/Event'
import Ptap from '~/views/Public/Ptap'
zhengxiaokui committed
390 391

export default {
392 393 394
  inject: ['root'],
  components: { 'c-ptap': Ptap },
  props: ['model', 'codes'],
wangren committed
395
  mixins: [commonProcess],
zhengxiaokui committed
396
  data() {
397 398 399 400
    return {}
  },
  methods: { 
    ...Event,
401 402 403 404 405 406
    avbwthEvent(){
      if (this.model.ledgrp.rec.avbwth != 'A'||this.model.ledgrp.rec.avbwth != 'O') {
        this.model.ledgrp.avb.pts.extkey = ''
        this.model.ledgrp.blk.avbwthtxt = ''
      }
    },
407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426
    onSeainf(){},
    avbbykeyEvent() {
      if (this.model.ledgrp.rec.avbby == 'P') {
        this.model.ledgrp.rec.tenmaxday = 0
        this.model.ledgrp.blk.defdet = ''
      }
      if (this.model.ledgrp.rec.avbby == 'D'||this.model.ledgrp.rec.avbby =='M') {
        
        this.model.ledgrp.blk.defdet = '' //汇票期限置空
        this.model.ledgrp.drw.pts.extkey = ''//付款人置空
        this.model.ledgrp.drw.pts.adrblk = ''  //名称地址置空.pts.adrblk

      }
      this.executeCheck('ledgrp.rec.avbby').then((res) => {
        if (res.respCode == SUCCESS) {
          Utils.copyValueFromVO(this.model, res.data)
        }
      })
    },
  
zhengxiaokui committed
427 428
  },
  created: function () {},
429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459
  computed: {
    avbFlag: {
      get() {
        return (
          this.model.ledgrp.rec.avbwth == 'A' ||
          this.model.ledgrp.rec.avbwth == 'S' 
        )
      },
    },
    defdetFlag: {
      get() {
        return (
          // this.model.ledgrp.rec.avbby == 'A' ||
          // this.model.ledgrp.rec.avbby == 'P' ||
          // this.model.ledgrp.rec.avbby == 'M' ||
          // this.model.ledgrp.rec.avbby == ''
          this.model.ledgrp.rec.avbby != 'D' &&
          this.model.ledgrp.rec.avbby != 'N'
        )
      },
    },
    blkDftatFlag: {
      get() {
        return (
          this.model.ledgrp.rec.avbby == 'D' ||
          this.model.ledgrp.rec.avbby == 'M' ||
          this.model.ledgrp.rec.avbby == ''
        )
      },
    },
  },
zhengxiaokui committed
460
  watch: {
461
    'model.ledgrp.avb.pts.adrblk': {
zhengxiaokui committed
462
      handler(val, oldVal) {
463
        this.model.ledgrp.blk.avbwthtxt = val
zhengxiaokui committed
464 465
      },
      immediate: true,
zhengxiaokui committed
466
    },
zhengxiaokui committed
467
  },
468
}
zhengxiaokui committed
469
</script>
470
<style></style>