Detp.vue 11.3 KB
Newer Older
孟冬雪 committed
1
<template>
2
  <div class="eibs-tab">
Wuyuqiu committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16
       <!-- left -->
      <c-col :span="11">
        <!-- Available with -->
        <c-col :span="24">
          <el-form-item label="Available with" prop="ltdgrp.rec.avbwth">
            <c-select
              v-model="model.ltdgrp.rec.avbwth"
              style="width: 100%"
              placeholder="Please select Available with"
              :code="codes.avbwth"
              @change="avbwthEvent"
            >
            </c-select>
          </el-form-item>
17
        </c-col>
Wuyuqiu committed
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44

        <c-col :span="24">
          <c-ptap
            v-if="model.ltdgrp.rec.avbwth!='O'"
            :model="model"
            :argadr="{
              title: '',
              grp: 'ltdgrp',
              rol: 'avt',
            }"
            :noRef="true"
            :onlySearch="true"
            @onSeainf="onSeainf"
            @onAplpDet="onAvbpDet"
          >
          </c-ptap>
        </c-col>

        <c-col :span="24">
          <el-form-item label="名称地址" prop="ltdgrp.blk.avbwthtxt">
            <c-input
              type="textarea"
              :rows="3"
              v-model="model.ltdgrp.blk.avbwthtxt"
              maxlength="140"
              show-word-limit
              placeholder="请输入名称地址"
Wuyuqiu committed
45
              :disabled="model.ltdgrp.rec.avbwth == 'I'||model.ltdgrp.rec.avbwth == 'C'"
Wuyuqiu committed
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
            ></c-input>
          </el-form-item>
        </c-col>

        <c-col :span="24">
          <el-form-item label="Available by" prop="ltdgrp.rec.avbby">
            <c-select
              v-model="model.ltdgrp.rec.avbby"
              style="width: 100%"
              placeholder="Please select Available by"
              :code="codes.avbby"
              @change="avbbykeyEvent"
            >
            </c-select>
          </el-form-item>
        </c-col>

        <c-col :span="24">
          <el-form-item
jianglong committed
65
            label="Negotiation/延期付款指示"
Wuyuqiu committed
66 67 68 69 70 71 72 73
            prop="ltdgrp.blk.defdet"
          >
            <c-input
              type="textarea"
              :rows="3"
              v-model="model.ltdgrp.blk.defdet"
              maxlength="35"
              show-word-limit
jianglong committed
74
              placeholder="Please input 延期付款指示"
Wuyuqiu committed
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
              :disabled="defdetFlag"
            ></c-input>
          </el-form-item>
        </c-col>

        <c-col :span="24">
          <el-form-item
            label="Drafts at"
            prop="ltdgrp.blk.dftat"
          >
            <c-input
              type="textarea"
              :rows="3"
              v-model="model.ltdgrp.blk.dftat"
              maxlength="35"
              show-word-limit
              placeholder="Please input Drafts at"
              :disabled="blkDftatFlag"
            ></c-input>
          </el-form-item>
        </c-col>

        <c-col :span="24">
          <c-ptap
            :model="model"
            :argadr="{
              title: 'Drawee',
              grp: 'ltdgrp',
              rol: 'drw',
            }"
            :noRef="true"
            :onlySearch="false"
            @onSeainf="onSeainf"
            @onAplpDet="onDrwpDet"
            :disabled="blkDftatFlag"
Wuyuqiu committed
110
            :disabledExtkey="blkDftatFlag"
Wuyuqiu committed
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
          >
          </c-ptap>
        </c-col>
        <!-- Dispatch from -->
        <c-col :span="24">
          <el-form-item label="Dispatch from" prop="ltdgrp.rec.shpfro">
            <c-input
              type="textarea"
              show-word-limit
              v-model="model.ltdgrp.rec.shpfro"
              maxlength="65"
              placeholder="Please input Dispatch from"
            ></c-input>
          </el-form-item>
        </c-col>

        <c-col :span="24">
128
          <el-form-item label="始发(航空)站" prop="ltdgrp.rec.porloa">
Wuyuqiu committed
129 130 131 132 133
            <c-input
              type="textarea"
              v-model="model.ltdgrp.rec.porloa"
              maxlength="65"
              show-word-limit
134
              placeholder="Please input 始发(航空)站"
Wuyuqiu committed
135 136 137 138 139 140
            ></c-input>
          </el-form-item>
        </c-col>

        <c-col :span="24">
          <el-form-item
141
            label="终点(航空)站"
Wuyuqiu committed
142 143 144 145 146 147 148
            prop="ltdgrp.rec.pordis"
          >
            <c-input
              type="textarea"
              v-model="model.ltdgrp.rec.pordis"
              maxlength="65"
              show-word-limit
149
              placeholder="Please input 终点(航空)站"
Wuyuqiu committed
150 151 152
            ></c-input>
          </el-form-item>
        </c-col>
jianglong committed
153
        <!-- 最终目的地 -->
Wuyuqiu committed
154
        <c-col :span="24">
jianglong committed
155
          <el-form-item label="最终目的地" prop="ltdgrp.rec.shpto">
Wuyuqiu committed
156 157 158 159 160
            <c-input
              type="textarea"
              v-model="model.ltdgrp.rec.shpto"
              maxlength="65"
              show-word-limit
jianglong committed
161
              placeholder="Please input 最终目的地"
Wuyuqiu committed
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197
            ></c-input>
          </el-form-item>
        </c-col>

        <!-- Shipment Period -->
        <c-col :span="24">
          <el-form-item label="Shipment Period" prop="ltdgrp.blk.shpper">
            <c-input
              type="textarea"
              v-model="model.ltdgrp.blk.shpper"
              maxlength="65"
              show-word-limit
              placeholder="Please input Shipment Period"
            ></c-input>
          </el-form-item>
        </c-col>
      </c-col>

      <!-- right -->
      <c-col :span="11" :offset="1">
        <c-col :span="24">
          <el-form-item label="Mixed Payment Details" prop="ltdgrp.blk.mixdet">
            <c-input
              type="textarea"
              :rows="4"
              v-model="model.ltdgrp.blk.mixdet"
              maxlength="140"
              show-word-limit
              placeholder="Please input Mixed Payment Details"
              :disabled="model.ltdgrp.rec.avbby != 'M'"
            ></c-input>
          </el-form-item>
        </c-col>

        <!-- Days of presentation period -->
        <c-col :span="24">
Wuyuqiu committed
198
          <el-form-item label="Presentation Period" prop="ltdgrp.rec.prepertxts18">
Wuyuqiu committed
199 200
            <c-fullbox>
              <c-input
Wuyuqiu committed
201
                v-model.number="model.ltdgrp.rec.prepertxts18"
Wuyuqiu committed
202 203 204 205 206 207 208
                placeholder="Please input Presentation Period"
              ></c-input>
              <template slot="footer">
                <c-button
                  size="small"
                  type="primary"
                  disabled
Wuyuqiu committed
209 210
                  @click="showGridPromptDialog('lttp.detp', null, null,{TXT:
'ltdgrp.rec.prepertxts18'}, {TXT: false},'doxpDialog')"
Wuyuqiu committed
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
                >
                  ...
                </c-button>
              </template>
            </c-fullbox>
          </el-form-item>
        </c-col>

        <c-col :span="24">
          <el-form-item label="" prop="ltdgrp.rec.prepertxts18">
            <c-input
              v-model="model.ltdgrp.rec.prepertxts18"
              placeholder="Please input Presentation period text"
            ></c-input>
          </el-form-item>
        </c-col>

        <c-col :span="24">
          <el-form-item
            label="Details of Charges"
            prop="ltdgrp.blk.feetxt"
          >
            <c-fullbox>
              <c-input
                type="textarea"
                :rows="6"
                v-model="model.ltdgrp.blk.feetxt"
                maxlength="210"
                show-word-limit
                placeholder="Please input Details of Charges"
              ></c-input>
              <template slot="footer">
                <c-button
                  size="small"
                  type="primary"
Wuyuqiu committed
246 247
                  @click="showGridPromptDialog('lttp.charia.buttxmsel', null, null,{TXT:
'ltdgrp.blk.feetxt'}, {TXT: false},'doxpDialog')"
Wuyuqiu committed
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 284 285 286 287 288 289 290 291 292 293 294 295 296
                >
                  ...
                </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="ltdgrp.rec.chato">
            <c-select
              v-model="model.ltdgrp.rec.chato"
              style="width: 100%"
              placeholder="Please select Charges Condition"
              :code="codes.chadet"
            >
            </c-select>
          </el-form-item>
        </c-col>

        <c-col :span="24">
          <el-form-item label="Country Code" prop="ltdgrp.rec.stacty">
            <c-select
              v-model="model.ltdgrp.rec.stacty"
              style="width: 100%"
              placeholder="请选择Country Code"
              :code="codes.ctytxt"
            >
            </c-select>
          </el-form-item>
        </c-col>

        <c-col :span="24">
            <el-form-item label="tenor days" prop="ltdgrp.rec.tenmaxday">
              <c-input
                v-model.number="model.ltdgrp.rec.tenmaxday"
                placeholder="Please input tenor days"
                :disabled="model.ltdgrp.rec.avbby == 'P'"
                @keyup.enter.native="
                  defaultFunction(
                    'ltdgrp.rec.tenmaxday',
                    model.ltdgrp.rec.tenmaxday
                  )
                "
              ></c-input>
            </el-form-item>
        </c-col>
      </c-col>
297
  </div>
孟冬雪 committed
298 299
</template>
<script>
300
import Api from "~/service/Api"
wangren committed
301
import commonProcess from "~/mixin/commonProcess";
302 303
import CodeTable from "~/config/CodeTable"
import Event from "~/model/Lttopn/Event"
Wuyuqiu committed
304
import Ptap from "~/views/Public/Ptap";
孟冬雪 committed
305 306

export default {
Wuyuqiu committed
307
    components: { "c-ptap": Ptap },
308 309 310 311 312 313 314 315
    inject: ['root'],
    props:["model","codes"],
    mixins: [commonProcess],
    data(){
        return {

        }
    },
Wuyuqiu committed
316
    methods: {
Wuyuqiu committed
317
    ...Event, 
Wuyuqiu committed
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355
    avbwthEvent(){
      if (this.model.ltdgrp.rec.avbwth != 'A'||this.model.ltdgrp.rec.avbwth != 'O') {
        this.model.ltdgrp.avb.pts.extkey = ''
        this.model.ltdgrp.blk.avbwthtxt = ''
      }
    },
    avbbykeyEvent() {
      if (this.model.ltdgrp.rec.avbby == 'P') {
        this.model.ltdgrp.rec.tenmaxday = 0;
        this.model.ltdgrp.blk.defdet = '';
      }
      if (
        this.model.ltdgrp.rec.avbby == 'D'||
        this.model.ltdgrp.rec.avbby == 'M'
      ) {
        this.model.ltdgrp.blk.defdet = ''; //汇票期限置空
        this.model.ltdgrp.drw.pts.extkey = ''; //付款人置空
        this.model.ltdgrp.drw.pts.adrblk = ''; //名称地址置空.pts.adrblk
      }
      this.executeCheck("ltdgrp.rec.avbby").then((res) => {
        if (res.respCode == SUCCESS) {
          Utils.copyValueFromVO(this.model, res.data);
        }
      });
    },
  },
  computed: {
    // avbFlag: {
    //   get() {
    //     return (
    //       this.model.ltdgrp.rec.avbwth == 'A' ||
    //       this.model.ltdgrp.rec.avbwth == 'S' 
    //     )
    //   },
    // },
    defdetFlag: {
      get() {
        return (
Wuyuqiu committed
356 357 358
          this.model.ltdgrp.rec.avbby == 'A' ||
          this.model.ltdgrp.rec.avbby == 'P' ||
          this.model.ltdgrp.rec.avbby == 'M' 
Wuyuqiu committed
359
          // this.model.ltdgrp.rec.avbby == ''
Wuyuqiu committed
360 361
          // this.model.ltdgrp.rec.avbby != 'D' &&
          // this.model.ltdgrp.rec.avbby != 'N'
Wuyuqiu committed
362 363 364 365 366 367
        )
      },
    },
    blkDftatFlag: {
      get() {
        return (
Wuyuqiu committed
368 369
          this.model.ltdgrp.rec.avbby == 'M' ||
          this.model.ltdgrp.rec.avbby == 'D' 
Wuyuqiu committed
370 371 372 373 374 375
        )
      },
    },
  },
  created: function () {},
  watch: {
Wuyuqiu committed
376
    "model.ltdgrp.avt.pts.adrblk": {
Wuyuqiu committed
377 378 379 380 381 382
      handler(val, oldVal) {
        this.model.ltdgrp.blk.avbwthtxt = val;
      },
      immediate: true,
    },
  },
383
}
孟冬雪 committed
384 385
</script>
<style>
386

孟冬雪 committed
387
</style>