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

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

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

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

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

lianyang committed
93
        <!-- drafts at 汇票期限 -->
hpj committed
94 95
        <c-col :span="24">
          <el-form-item label="汇票期限" prop="ledgrp.blk.dftat">
lianyang committed
96 97 98 99 100 101 102 103 104 105 106
            <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">
107
                <!-- @click="onLcrdftatButtxmsel" -->
lianyang committed
108 109 110 111
                <c-button
                  size="small"
                  type="primary"
                  icon="el-icon-search"
112
                  @click="showGridPromptDialog('letp.lcrdftat.buttxmsel', null, null,{TXT: 'ledgrp.blk.dftat'}, {TXT: false},'doxpDialog')"
lianyang committed
113 114 115 116 117 118
                  :disabled="blkDftatFlag"
                >
                  ...
                </c-button>
              </template>
            </c-fullbox>
hpj committed
119 120 121 122 123 124 125
          </el-form-item>
        </c-col>

        <c-col :span="24">
          <c-ptap
            :model="model"
            :argadr="{
lianyang committed
126
              title: '付款人',
hpj committed
127 128 129 130
              grp: 'ledgrp',
              rol: 'drw',
            }"
            :noRef="true"
lianyang committed
131
            :onlySearch="false"
hpj committed
132 133
            @onSeainf="onSeainf"
            @onAplpDet="onDrwpDet"
lianyang committed
134
            :disabled="blkDftatFlag"
hpj committed
135 136 137 138
          >
          </c-ptap>
        </c-col>

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

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

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

lianyang committed
178
        <!-- Final Destination -->
hpj committed
179
        <c-col :span="24">
lianyang committed
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
          <el-form-item label="最终目的地" prop="ledgrp.rec.shpto">
            <c-input
              type="textarea"
              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="装运期" prop="ledgrp.blk.shpper">
            <c-input
              type="textarea"
              v-model="model.ledgrp.blk.shpper"
197
              maxlength="65"
lianyang committed
198 199 200 201 202 203 204 205 206 207 208 209
              show-word-limit
              placeholder="请输入装运期"
            ></c-input>
          </el-form-item>
        </c-col>
      </c-col>

      <!-- =========================================右边============================================= -->
      <!-- Mixed Payment Details -->
      <c-col :span="11" :offset="1">
        <c-col :span="24">
          <el-form-item label="混合付款指示" prop="ledgrp.blk.mixdet">
hpj committed
210 211
            <c-input
              type="textarea"
lianyang committed
212 213 214
              :rows="4"
              v-model="model.ledgrp.blk.mixdet"
              maxlength="140"
hpj committed
215
              show-word-limit
lianyang committed
216 217 218 219 220 221
              placeholder="混合付款指示"
              :disabled="model.ledgrp.rec.avbby != 'M'"
            ></c-input>
          </el-form-item>
        </c-col>

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
        <!-- <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-->
lianyang committed
272
        <c-col :span="24">
273
          <el-form-item label="交单期限" prop="ledgrp.rec.prepers18">
lianyang committed
274 275
            <c-fullbox>
              <c-input
276 277
                v-model="model.ledgrp.rec.prepers18"
                placeholder="请输入Days of presentation period"
lianyang committed
278 279
              ></c-input>
              <template slot="footer">
280
                <!-- @click="onPreperButtxmsel" -->
lianyang committed
281 282 283 284
                <c-button
                  size="small"
                  type="primary"
                  icon="el-icon-search"
285 286
                  @click="showGridPromptDialog('letp.preper.buttxmsel', null, null,{TXT: 'ledgrp.rec.prepers18'}, {TXT: false},'doxpDialog')"
                  disabled
lianyang committed
287 288 289 290 291 292 293 294 295 296
                >
                  ...
                </c-button>
              </template>
            </c-fullbox>
          </el-form-item>
        </c-col>

        <!-- Days of presentation period -->
        <c-col :span="24">
297
          <el-form-item label="" prop="ledgrp.rec.prepertxts18">
lianyang committed
298
            <c-input
299
              v-model.number="model.ledgrp.rec.prepertxts18"
lianyang committed
300
              placeholder="请输入交单期天数"
hpj committed
301 302 303 304
            ></c-input>
          </el-form-item>
        </c-col>

lianyang committed
305 306 307 308 309 310 311 312 313 314 315 316 317
        <!-- Additional Details to  Charges  -->
        <c-col :span="24">
          <el-form-item label="附加收费详情" 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">
318
                <!-- @click="onChariaButtxmsel" -->
lianyang committed
319 320 321 322
                <c-button
                  size="small"
                  type="primary"
                  icon="el-icon-search"
323
                  @click="showGridPromptDialog('letp.charia.buttxmsel', null, null,{TXT: 'ledgrp.blk.feetxt'}, {TXT: false},'doxpDialog')"
lianyang committed
324 325 326 327 328 329 330 331
                >
                  ...
                </c-button>
              </template>
            </c-fullbox>
          </el-form-item>
        </c-col>

hpj committed
332
        <!-- Own Charges Borne by -->
lianyang committed
333
        <c-col :span="24">
lianyang committed
334
          <el-form-item label="费用状况" prop="ledgrp.rec.chato">
hpj committed
335 336 337 338
            <c-select
              v-model="model.ledgrp.rec.chato"
              style="width: 100%"
              placeholder="请选择"
lianyang committed
339
              :code="codes.chadet"
hpj committed
340 341 342 343 344
            >
            </c-select>
          </el-form-item>
        </c-col>

lianyang committed
345
        <!-- country or region code -->
lianyang committed
346
        <c-col :span="24">
lianyang committed
347
          <el-form-item label="国家或地区代码" prop="ledgrp.rec.stacty">
hpj committed
348 349 350
            <c-select
              v-model="model.ledgrp.rec.stacty"
              style="width: 100%"
lianyang committed
351
              placeholder="请选择国家或地区代码"
lianyang committed
352
              :code="codes.ctytxt"
hpj committed
353 354 355 356
            >
            </c-select>
          </el-form-item>
        </c-col>
lianyang committed
357
        <!-- 付款期限 Maxinum Tenor-->
lianyang committed
358
        <c-col :span="24">
lianyang committed
359
          <el-form-item label="付款期限(天)" prop="ledgrp.rec.tenmaxday">
hpj committed
360
            <c-input
lianyang committed
361
              v-model.number="model.ledgrp.rec.tenmaxday"
lianyang committed
362 363 364 365 366 367 368 369 370
              placeholder="请输入"
              :disabled="model.ledgrp.rec.avbby == 'P'"
              maxlength="4"
              @keyup.enter.native="
                defaultFunction(
                  'ledgrp.rec.tenmaxday',
                  model.ledgrp.rec.tenmaxday
                )
              "
hpj committed
371 372 373 374 375 376 377 378
            ></c-input>
          </el-form-item>
        </c-col>
      </c-col>
    </c-row>
  </div>
</template>
<script>
lianyang committed
379 380 381 382 383
import Api from '~/service/Api'
import commonProcess from '~/mixin/commonProcess'
import CodeTable from '~/config/CodeTable'
import Event from '~/model/Letnot/Event'
import Ptap from '~/views/Public/Ptap'
hpj committed
384 385

export default {
lianyang committed
386 387
  components: {
    // "c-ptap1": Ptap1,
lianyang committed
388
    'c-ptap': Ptap,
lianyang committed
389 390
    // "c-ptsmsg": Ptsmsg,
  },
lianyang committed
391 392
  inject: ['root'],
  props: ['model', 'codes'],
393
  mixins: [commonProcess],
hpj committed
394
  data() {
lianyang committed
395 396 397 398
    return {}
  },
  methods: {
    ...Event,
399 400 401 402 403 404
    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 = ''
      }
    },
lianyang committed
405 406 407 408 409
    avbbykeyEvent() {
      if (this.model.ledgrp.rec.avbby == 'P') {
        this.model.ledgrp.rec.tenmaxday = 0
        this.model.ledgrp.blk.defdet = ''
      }
410 411 412 413 414 415 416
      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

      }
lianyang committed
417 418 419 420 421 422
      this.executeCheck('ledgrp.rec.avbby').then((res) => {
        if (res.respCode == SUCCESS) {
          Utils.copyValueFromVO(this.model, res.data)
        }
      })
    },
hpj committed
423 424
  },
  created: function () {},
lianyang committed
425
  computed: {
426 427 428 429 430 431 432 433
    avbFlag: {
      get() {
        return (
          this.model.ledgrp.rec.avbwth == 'A' ||
          this.model.ledgrp.rec.avbwth == 'S' 
        )
      },
    },
lianyang committed
434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455
    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 == ''
        )
      },
    },
  },
hpj committed
456
  watch: {
lianyang committed
457
    'model.ledgrp.avb.pts.adrblk': {
hpj committed
458
      handler(val, oldVal) {
lianyang committed
459
        this.model.ledgrp.blk.avbwthtxt = val
hpj committed
460 461 462 463
      },
      immediate: true,
    },
  },
lianyang committed
464
}
hpj committed
465
</script>
lianyang committed
466
<style></style>