Detp.vue 12.6 KB
Newer Older
zhengxiaokui committed
1
<template>
LiRui committed
2
  <div class="eibs">
zhengxiaokui committed
3
    <c-row>
4
      <!-- =========================================左边============================================= -->
LiRui committed
5
      <c-col :span="12" style="padding-right: 20px;">
6
        <!-- Available with指定银行 -->
zhengxiaokui committed
7
        <c-col :span="24">
jianglong committed
8
          <el-form-item label="可用银行" prop="ledgrp.rec.avbwth">
zhengxiaokui committed
9 10 11
            <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>
jianglong committed
51
       
zhengxiaokui committed
52

53
            <!--Available by 兑付方式 -->
zhengxiaokui committed
54
        <c-col :span="24">
jianglong committed
55
          <el-form-item label="兑付方式" prop="ledgrp.rec.avbby">
zhengxiaokui committed
56 57 58
            <c-select
              v-model="model.ledgrp.rec.avbby"
              style="width: 100%"
59 60 61
              placeholder="请选择兑付方式"
              :code="codes.avbby0"
              @change="avbbykeyEvent"
zhengxiaokui committed
62 63 64
            >
            </c-select>
          </el-form-item>
zhengxiaokui committed
65
        </c-col>
zhengxiaokui committed
66

jianglong committed
67
        <!-- 远期付款指示 延期付款指示-->
zhengxiaokui committed
68
        <c-col :span="24">
jianglong committed
69
          <el-form-item label="议付/延期付款指示" prop="ledgrp.blk.defdet">
zhengxiaokui committed
70 71 72 73
            <c-input
              type="textarea"
              :rows="3"
              v-model="model.ledgrp.blk.defdet"
74
              maxlength="140"
zhengxiaokui committed
75
              show-word-limit
jianglong committed
76
              placeholder="请输入指示内容"
77
              :disabled="defdetFlag"
zhengxiaokui committed
78 79
            ></c-input>
          </el-form-item>
zhengxiaokui committed
80
        </c-col>
zhengxiaokui committed
81

82
        <!-- Drafts at 汇票期限 -->
zhengxiaokui committed
83
        <c-col :span="24">
jianglong committed
84
          <el-form-item label="汇票期限" prop="ledgrp.blk.dftat">
85 86 87 88 89 90 91 92 93 94 95
            <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">
96
                <!-- @click="onLcrdftatButtxmsel" -->
97 98 99 100
                <c-button
                  size="small"
                  type="primary"
                  icon="el-icon-search"
101
                  @click="showGridPromptDialog('letp.lcrdftat.buttxmsel', null, null,{TXT: 'ledgrp.blk.dftat'}, {TXT: false},'doxpDialog')"
102 103 104 105 106
                  :disabled="blkDftatFlag"
                >
                </c-button>
              </template>
            </c-fullbox>
zhengxiaokui committed
107
          </el-form-item>
zhengxiaokui committed
108
        </c-col>
zhengxiaokui committed
109

110
            <!--Drawee 付款人 -->
zhengxiaokui committed
111 112 113 114
        <c-col :span="24">
          <c-ptap
            :model="model"
            :argadr="{
jianglong committed
115
              title: '汇票付款人',
zhengxiaokui committed
116 117 118 119
              grp: 'ledgrp',
              rol: 'drw',
            }"
            :noRef="true"
120 121 122
            :onlySearch="false"
            :isAdrblk="false"
            :haveAdrLabel="false"
zhengxiaokui committed
123 124
            @onSeainf="onSeainf"
            @onAplpDet="onDrwpDet"
125
            :disabled="blkDftatFlag"
zhengxiaokui committed
126 127
          >
          </c-ptap>
zhengxiaokui committed
128
        </c-col>
zhengxiaokui committed
129

130
        <!-- Dispatch from   货物转运地(港) -->
zhengxiaokui committed
131
        <c-col :span="24">
jianglong committed
132
          <el-form-item label="装船/发运地" prop="ledgrp.rec.shpfro">
zhengxiaokui committed
133 134 135
            <c-input
              type="textarea"
              show-word-limit
136 137
              v-model="model.ledgrp.rec.shpfro"
              maxlength="65"
jianglong committed
138
              placeholder="请输入地址"
zhengxiaokui committed
139 140
            ></c-input>
          </el-form-item>
zhengxiaokui committed
141
        </c-col>
zhengxiaokui committed
142

143
        <!-- Air-/Port of Departure 始发航空站/港口-->
zhengxiaokui committed
144
        <c-col :span="24">
145
          <el-form-item label="始发(航空)站" prop="ledgrp.rec.porloa">
zhengxiaokui committed
146
            <c-input
147 148 149 150 151
              type="textarea"
              v-model="model.ledgrp.rec.porloa"
              maxlength="65"
              show-word-limit
              placeholder="请输入"
zhengxiaokui committed
152 153
            ></c-input>
          </el-form-item>
zhengxiaokui committed
154
        </c-col>
zhengxiaokui committed
155

156
        <!-- Air-/Port of Destination 目的航空站/港口-->
zhengxiaokui committed
157
        <c-col :span="24">
158
          <el-form-item label="终点(航空)站" prop="ledgrp.rec.pordis">
zhengxiaokui committed
159 160
            <c-input
              type="textarea"
161 162
              v-model="model.ledgrp.rec.pordis"
              maxlength="65"
zhengxiaokui committed
163
              show-word-limit
164
              placeholder="请输入"
zhengxiaokui committed
165 166
            ></c-input>
          </el-form-item>
zhengxiaokui committed
167
        </c-col>
zhengxiaokui committed
168

jianglong committed
169
        <!-- 最终目的地 最终目的地-->
zhengxiaokui committed
170
        <c-col :span="24">
jianglong committed
171
          <el-form-item label="最终目的地" prop="ledgrp.rec.shpto">
zhengxiaokui committed
172 173
            <c-input
              type="textarea"
174 175 176 177 178 179 180 181 182 183
              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">
jianglong committed
184
          <el-form-item label="装运期限" prop="ledgrp.blk.shpper">
185 186 187 188
            <c-input
              type="textarea"
              v-model="model.ledgrp.blk.shpper"
              maxlength="65"
zhengxiaokui committed
189
              show-word-limit
190 191 192 193 194 195 196 197
              placeholder="请输入装运期"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
      </c-col>

      <!-- =========================================右边============================================= -->
LiRui committed
198
      <c-col :span="12" style="padding-left: 20px;">
199 200
        <!-- Mixed Payment Details混合付款指示 -->
        <c-col :span="24">
jianglong committed
201
          <el-form-item label="混合付款指示" prop="ledgrp.blk.mixdet">
202 203 204 205 206 207 208 209 210 211 212 213 214
            <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>


jianglong committed
215
   
216 217 218

        <!-- 交单期限 Days of presentation period-->
        <c-col :span="24">
jianglong committed
219
          <el-form-item label="交单期限" prop="ledgrp.rec.prepers18">
220 221 222
            <c-fullbox>
              <c-input
                v-model="model.ledgrp.rec.prepers18"
jianglong committed
223
                placeholder="请输入交单期限(天)"
224 225
              ></c-input>
              <template slot="footer">
226
                <!-- @click="onPreperButtxmsel" -->
227 228 229 230
                <c-button
                  size="small"
                  type="primary"
                  icon="el-icon-search"
231 232
                  @click="showGridPromptDialog('letp.preper.buttxmsel', null, null,{TXT: 'ledgrp.rec.prepers18'}, {TXT: false},'doxpDialog')"
                  disabled
233 234 235 236 237 238 239 240 241 242 243 244 245
                >
                </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"
wangna committed
246
              placeholder="请输入"
zhengxiaokui committed
247 248
            ></c-input>
          </el-form-item>
zhengxiaokui committed
249
        </c-col>
zhengxiaokui committed
250

251 252
        <!-- 附加收费详情 Additional Details to  Charges  -->
        <c-col :span="24">
jianglong committed
253
          <el-form-item label="附加收费详情" prop="ledgrp.blk.feetxt">
254 255 256 257 258 259 260 261 262 263
            <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">
264
                <!-- @click="onChariaButtxmsel" -->
265 266 267
                <c-button
                  size="small"
                  type="primary"
LiRui committed
268
                  icon="el-icon-more"
269
                  @click="showGridPromptDialog('letp.charia.buttxmsel', null, null,{TXT: 'ledgrp.blk.feetxt'}, {TXT: false},'doxpDialog')"
270 271 272 273 274 275 276 277 278
                >
                </c-button>
              </template>
            </c-fullbox>
          </el-form-item>
        </c-col>

        <!-- Own Charges Borne by费用状况 -->
        <c-col :span="24">
jianglong committed
279
          <el-form-item label="收费条款" prop="ledgrp.rec.chato">
zhengxiaokui committed
280 281 282
            <c-select
              v-model="model.ledgrp.rec.chato"
              style="width: 100%"
283 284
              placeholder="请选择"
              :code="codes.chadet"
zhengxiaokui committed
285 286 287
            >
            </c-select>
          </el-form-item>
zhengxiaokui committed
288
        </c-col>
zhengxiaokui committed
289

290 291
        <!-- Country or region code 国家或地区代码-->
        <c-col :span="24">
jianglong committed
292
          <el-form-item label="国家地区代码" prop="ledgrp.rec.stacty">
zhengxiaokui committed
293 294 295
            <c-select
              v-model="model.ledgrp.rec.stacty"
              style="width: 100%"
296 297
              placeholder="请选择国家或地区代码"
              :code="codes.ctytxt"
zhengxiaokui committed
298 299 300
            >
            </c-select>
          </el-form-item>
zhengxiaokui committed
301
        </c-col>
zhengxiaokui committed
302

303 304
        <!-- 付款期限 Maxinum Tenor-->
        <c-col :span="24">
LiRui committed
305
          <el-form-item label="远期最大期限(天)" prop="ledgrp.rec.tenmaxday">
zhengxiaokui committed
306
            <c-input
307
              v-model.number="model.ledgrp.rec.tenmaxday"
jianglong committed
308
              placeholder="请输入内容"
309 310
              :disabled="model.ledgrp.rec.avbby == 'P'"
              maxlength="4"
311
              @keyup.enter.native="$event.target.blur()"
zhengxiaokui committed
312 313
            ></c-input>
          </el-form-item>
zhengxiaokui committed
314
        </c-col>
zhengxiaokui committed
315 316
      </c-col>
    </c-row>
zhengxiaokui committed
317 318 319
  </div>
</template>
<script>
320 321 322 323 324
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
325 326

export default {
327 328 329
  inject: ['root'],
  components: { 'c-ptap': Ptap },
  props: ['model', 'codes'],
wangren committed
330
  mixins: [commonProcess],
zhengxiaokui committed
331
  data() {
332 333 334 335
    return {}
  },
  methods: { 
    ...Event,
336 337 338 339 340 341
    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 = ''
      }
    },
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361
    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
362 363
  },
  created: function () {},
364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394
  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
395
  watch: {
396
    'model.ledgrp.avb.pts.adrblk': {
zhengxiaokui committed
397
      handler(val, oldVal) {
398
        this.model.ledgrp.blk.avbwthtxt = val
zhengxiaokui committed
399 400
      },
      immediate: true,
zhengxiaokui committed
401
    },
zhengxiaokui committed
402
  },
403
}
zhengxiaokui committed
404
</script>
405 406 407 408 409 410 411 412
<style>
  .letame_rec_tenmaxday {
    margin-left: 10px;
    height: 16px;
    color: #606266;
    line-height: 16px;
    font-size: 12px;
  }</style>