Ovwp.vue 19.2 KB
Newer Older
jxl committed
1
<template>
2 3 4 5
  <c-row>
    <!-- =================顶部====================== -->
    <c-col :span="24">
      <c-col :span="11">
jxl committed
6
        <c-col :span="20">
7 8 9
          <el-form-item label="Reference" prop="bodgrp.rec.ownref" style="width: 100%">
            <c-input v-model="model.bodgrp.rec.ownref" maxlength="16" placeholder="请输入Reference" style="width: 95%"
              disabled></c-input>
jxl committed
10 11
          </el-form-item>
        </c-col>
12 13 14
        <c-col :span="1">
        </c-col>
        <c-col :span="3" style="text-align: right">
huangxin committed
15
          <c-button style="margin:0 0" size="small" type="primary" :disabled="this.model.bodgrp.drr.pts.extkey==''" @click="onBotpButgetref">
16 17 18 19 20
            获取
          </c-button>
        </c-col>
      </c-col>
      <c-col :span="11" :offset="1">
jxl committed
21
        <el-form-item label="摘要" prop="bodgrp.rec.nam">
22 23
          <c-input text-align="middle" v-model="model.bodgrp.rec.nam" maxlength="40" disabled
            placeholder="请输入Externally Displayed Name to Identify the Contract"></c-input>
jxl committed
24
        </el-form-item>
25
      </c-col>
jxl committed
26
    </c-col>
27 28 29
    <!-- ====================左边======================= -->
    <c-col :span="11">
      <c-col :span="24">
jxl committed
30
        <c-col :span="12">
31
          <el-form-item label="Responsible User" prop="ditp.usr.extkey" style="width: 100%">
wangyanjiao committed
32 33 34 35 36 37 38 39 40 41
            <c-row>
              <c-col :span="20">
                <c-input style="width: 95%" v-model="model.botp.usr.extkey" maxlength="8" placeholder="请输入User ID"
                  disabled></c-input>
              </c-col>
              <c-col :span="4">
                <c-button style="margin:0 10px 0 0;padding: 0 10px;" size="small" icon="el-icon-search" type="primary">
                </c-button>
              </c-col>
            </c-row>
wangna committed
42
          
43
          </el-form-item>
jxl committed
44
        </c-col>
wangyanjiao committed
45 46 47 48
        <c-col :span="12">
          <el-form-item label="" prop="bodgrp.rec.dircolflg">
            <c-checkbox v-model="model.bodgrp.rec.dircolflg">Direct Collection</c-checkbox>
          </el-form-item>
jxl committed
49
        </c-col>
50
      </c-col>
jxl committed
51 52
      <c-col :span="12">
        <el-form-item label="Document Amount" prop="bodgrp.cbs.max.cur">
53
          <c-select v-model="model.bodgrp.cbs.max.cur" style="width: 100%" placeholder="请选择Currency"  @change="changeCur">
huangxin committed
54
            <el-option v-for="item in codes.curtxt1" :key="item.value" :label="item.label" :value="item.value">
jxl committed
55 56 57 58
            </el-option>
          </c-select>
        </el-form-item>
      </c-col>
59 60 61
      <c-col :span="12">
        <el-form-item style="text-align: left" label-width="20px" prop="bodgrp.cbs.max.amt">
          <c-input-currency v-model="model.bodgrp.cbs.max.amt" style="text-align: left; width: 100%"
jxl committed
62
            placeholder="请输入Document Amount"
63
            @keyup.enter.native="defaultFunction('bodgrp.cbs.max.amt', model.bodgrp.cbs.max.amt)"></c-input-currency>
jxl committed
64 65
        </el-form-item>
      </c-col>
66
      <c-col :span="12">
67
        <el-form-item label="Open Amount" prop="bodgrp.cbs.opn1.cur">
68 69
          <c-select disabled v-model="model.bodgrp.cbs.opn1.cur" style="width: 100%" placeholder="请选择Currency">
            <el-option v-for="item in codes.cur" :key="item.value" :label="item.label" :value="item.value">
jxl committed
70 71 72 73
            </el-option>
          </c-select>
        </el-form-item>
      </c-col>
74 75 76
      <c-col :span="12">
        <el-form-item style="text-align: left" label-width="20px" prop="bodgrp.cbs.opn1.amt">
          <c-input-currency v-model="model.bodgrp.cbs.opn1.amt" style="text-align: left; width: 100%"
77
            placeholder="请输入" :disabled="true"
78
            @keyup.enter.native="defaultFunction('bodgrp.cbs.opn1.amt', model.bodgrp.cbs.opn1.amt)"></c-input-currency>
jxl committed
79 80 81 82
        </el-form-item>
      </c-col>
      <c-col :span="12">
        <el-form-item label="Order Date" prop="bodgrp.rec.rcvdat">
83 84
          <c-date-picker type="date" v-model="model.bodgrp.rec.rcvdat" style="width:100%" placeholder="请选择Order Date">
          </c-date-picker>
jxl committed
85
        </el-form-item>
86 87
      </c-col>
      <c-col :span="12">
jxl committed
88
        <el-form-item label="Shipment date" prop="bodgrp.rec.shpdat">
89 90
          <c-date-picker type="date" v-model="model.bodgrp.rec.shpdat" style="width:100%"
            placeholder="请选择Shipment date"></c-date-picker>
jxl committed
91
        </el-form-item>
92 93 94
      </c-col>

      <c-col :span="12">
jxl committed
95
        <el-form-item label="Presentation Date" prop="bodgrp.rec.predat">
96 97
          <c-date-picker type="date" v-model="model.bodgrp.rec.predat" style="width:100%"
            placeholder="请选择Presentation Date"></c-date-picker>
jxl committed
98
        </el-form-item>
99 100 101
      </c-col>

      <c-col :span="12">
jxl committed
102
        <el-form-item label="Dispatched on" prop="bodgrp.rec.advdat">
103 104
          <c-date-picker type="date" v-model="model.bodgrp.rec.advdat" style="width:100%" :disabled="true"
            placeholder="请选择Dispatched on"></c-date-picker>
jxl committed
105
        </el-form-item>
106
      </c-col>
jxl committed
107

108
      <c-col :span="24">
jxl committed
109
        <el-form-item label="Collection Condition" prop="bodgrp.rec.doctypcod">
110 111 112
          <c-select v-model="model.bodgrp.rec.doctypcod" style="width:100%" placeholder="请选择Collection Condition"
            :code="codes.doctypcod">
          </c-select>
jxl committed
113
        </el-form-item>
114
      </c-col>
jxl committed
115

116
      <c-col :span="12">
jxl committed
117
        <el-form-item label="Maturity Date" prop="bodgrp.rec.matdat">
118 119
          <c-date-picker type="date" v-model="model.bodgrp.rec.matdat" style="width:100%"
            :disabled="model.bodgrp.rec.doctypcod === 'P'" placeholder="请选择Maturity Date"></c-date-picker>
jxl committed
120
        </el-form-item>
121 122 123
      </c-col>

      <c-col :span="12">
jxl committed
124
        <el-form-item label="发票类型" prop="bodgrp.rec.invtyp">
125
          <c-select v-model="model.bodgrp.rec.invtyp" style="width:100%" :code="invtyp">
126
          </c-select>
jxl committed
127
        </el-form-item>
128 129 130
      </c-col>

      <c-col :span="12">
jxl committed
131
        <el-form-item label="Tenor Specification" prop="bodgrp.rec.matpercnt">
132 133
          <c-input v-model.number="model.bodgrp.rec.matpercnt" placeholder="请输入Tenor Specification"
            onkeyup="value=value.replace(/[^\d]/g,' ')" :disabled="model.bodgrp.rec.doctypcod === 'P'"></c-input>
jxl committed
134
        </el-form-item>
135
      </c-col>
huangxin committed
136 137 138
      <c-col  :span="1" style="margin-left:-10px">
        <el-form-item label="Days"> </el-form-item>
      </c-col>
jxl committed
139

140
      <c-col :span="24">
jxl committed
141
        <el-form-item label="Starting from" prop="bodgrp.rec.matperbeg">
142
          <c-select v-model="model.bodgrp.rec.matperbeg" style="width:100%" placeholder="请选择Starting from"
143
            :code="codes.matperbeg" :disabled="model.bodgrp.rec.doctypcod === 'P'">
144
          </c-select>
jxl committed
145
        </el-form-item>
146
      </c-col>
jxl committed
147

148
      <c-col :span="24">
jxl committed
149
        <el-form-item label="Tenor Details Text" prop="bodgrp.blk.bogdet">
150 151
          <c-input type="textarea" v-model="model.bodgrp.blk.bogdet" maxlength="43" show-word-limit
            :disabled="model.bodgrp.rec.doctypcod === 'P'" placeholder="请输入Tenor Details Text"></c-input>
jxl committed
152
        </el-form-item>
153 154
      </c-col>

huangxin committed
155
      
wangyanjiao committed
156

wangyanjiao committed
157
      <c-docpre :model="model" :argadr="{
wangyanjiao committed
158
          path: 'SEMFLG',
159 160 161
          grp: 'botp',
          code: 'docpre'
        }"></c-docpre>
162 163 164 165

    </c-col>
    <!-- ====================右边======================= -->
    <c-col :span="11" :offset="1">
huangxin committed
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 198 199 200 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 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 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 340 341 342 343 344 345 346 347 348 349 350 351 352
    <!-- <c-col :span="24">
        <el-form-item
          label="Drawer参考号"
          prop="bodgrp.drr.pts.ref"
        >
          <c-input
            v-model="model.bodgrp.drr.pts.ref"
            maxlength="16"
            style="width: 100%"
            placeholder="请输入Application Ref"
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="Drawer" prop="bodgrp.drr.pts.extkey">
            <c-fullbox>
          <c-input
            v-model="model.bodgrp.drr.pts.extkey"
            maxlength="50"
            placeholder="请输入External Key of Address"
            @keyup.enter.native="showGridPromptDialog('bodgrp.drr.pts.extkey')"
          ></c-input>
            <template slot="footer">
                <c-button
                style="margin:0 10px 0 10px;padding: 0 12px;"
                  size="small"
                  type="primary"
                  icon="el-icon-search"
                 
                >
                
                </c-button>
                <c-button
                style="margin:0 0"
                  size="small"
                  type="primary"
                  @click="onAplpDet"
                >
                  详情
                </c-button>
              </template>
            </c-fullbox>
        </el-form-item>

    </c-col>

      <c-col :span="24">
        <el-form-item label="地址名称" prop="bodgrp.drr.pts.adrblk">
          <c-input
            type="textarea"
            :rows="4"
            v-model="model.bodgrp.drr.pts.adrblk"
            maxlength="50"
            :disabled="this.flag1"
            show-word-limit
            placeholder="请输入Address Block"
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item
          label="Collecting Bank参考号"
          prop="bodgrp.col.pts.ref"
        >
          <c-input
            v-model="model.bodgrp.col.pts.ref"
            maxlength="16"
            style="width: 100%"
            placeholder="请输入Application Ref"
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="Collecting Bank" prop="bodgrp.col.pts.extkey">
            <c-fullbox>
          <c-input
            v-model="model.bodgrp.col.pts.extkey"
            maxlength="50"
            placeholder="请输入External Key of Address"
            @keyup.enter.native="showGridPromptDialog('bodgrp.col.pts.extkey')"
          ></c-input>
            <template slot="footer">
                <c-button
                style="margin:0 10px 0 10px;padding: 0 12px;"
                  size="small"
                  type="primary"
                  icon="el-icon-search"
                 
                >
                
                </c-button>
                <c-button
                style="margin:0 0"
                  size="small"
                  type="primary"
                  @click="onAplpDet"
                >
                  详情
                </c-button>
              </template>
            </c-fullbox>
        </el-form-item>

    </c-col>

      <c-col :span="24">
        <el-form-item label="地址名称" prop="bodgrp.col.pts.adrblk">
          <c-input
            type="textarea"
            :rows="4"
            v-model="model.bodgrp.col.pts.adrblk"
            maxlength="50"
            :disabled="this.flag2"
            show-word-limit
            placeholder="请输入Address Block"
          ></c-input>
        </el-form-item>
      </c-col>

    <c-col :span="24">
        <el-form-item
          label="Drawee参考号"
          prop="bodgrp.dre.pts.ref"
        >
          <c-input
            v-model="model.bodgrp.dre.pts.ref"
            maxlength="16"
            style="width: 100%"
            placeholder="请输入Application Ref"
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="Drawee" prop="bodgrp.dre.pts.extkey">
            <c-fullbox>
          <c-input
            v-model="model.bodgrp.dre.pts.extkey"
            maxlength="50"
            placeholder="请输入External Key of Address"
            @keyup.enter.native="showGridPromptDialog('bodgrp.dre.pts.extkey')"
          ></c-input>
            <template slot="footer">
                <c-button
                style="margin:0 10px 0 10px;padding: 0 12px;"
                  size="small"
                  type="primary"
                  icon="el-icon-search"
                 
                >
                
                </c-button>
                <c-button
                style="margin:0 0"
                  size="small"
                  type="primary"
                  @click="onAplpDet"
                >
                  详情
                </c-button>
              </template>
            </c-fullbox>
        </el-form-item>

    </c-col>

      <c-col :span="24">
        <el-form-item label="地址名称" prop="bodgrp.dre.pts.adrblk">
          <c-input
            type="textarea"
            :rows="4"
            v-model="model.bodgrp.dre.pts.adrblk"
            maxlength="50"
            :disabled="this.flag3"
            show-word-limit
            placeholder="请输入Address Block"
          ></c-input>
        </el-form-item>
      </c-col> -->





353 354
      <c-ptap :model="model" :argadr="{
        title: 'Drawer',
jxl committed
355 356
        grp: 'bodgrp',
        rol: 'drr',
huangxin committed
357
      }" :isAdrblk="true" :disabled="this.flag1">
358 359 360
      </c-ptap>
      <c-ptap :model="model" :argadr="{
        title: 'Collecting Bank',
jxl committed
361 362
        grp: 'bodgrp',
        rol: 'col',
huangxin committed
363
      }" :disabled="this.flag2">
364 365 366
      </c-ptap>
      <c-ptap :model="model" :argadr="{
        title: 'Drawee',
jxl committed
367 368
        grp: 'bodgrp',
        rol: 'dre',
huangxin committed
369
      }" :disabled="this.flag3">
370 371
      </c-ptap>
      <c-col :span="24">
huangxin committed
372
        <el-form-item label="Country or region Code" prop="bodgrp.rec.stacty">
373 374 375 376 377 378 379 380 381 382 383
          <c-select v-model="model.bodgrp.rec.stacty" style="width:100%" placeholder="请选择Country Code Risk Country!"
            :code="codes.stacty">
          </c-select>
        </el-form-item>
      </c-col>
      <c-col :span="24">
        <el-form-item label="Goods Code" prop="bodgrp.rec.stagod">
          <c-select v-model="model.bodgrp.rec.stagod" style="width:100%" placeholder="请选择Goods Code" :code="codeTable2">
          </c-select>
        </el-form-item>
      </c-col>
jxl committed
384
    </c-col>
385
  </c-row>
jxl committed
386 387
</template>
<script>
wangyanjiao committed
388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404
  import Api from "~/service/Api"
  import commonProcess from "~/mixin/commonProcess";
  import CodeTable from "~/config/CodeTable"
  import Event from "~/model/Botdav/Event"
  import Utils from "~/utils";
  import Ptap from "~/views/Public/Ptap";
  import Docpre from "~/views/Public/Docpre";
  export default {
    components: {
      "c-ptap": Ptap,
      "c-docpre": Docpre,
    },
    inject: ["root"],
    props: ["model", "codes"],
    mixins: [commonProcess],
    data() {
      return {
huangxin committed
405 406 407
        flag1:false,
        flag2:false,
        flag3:false,
wangyanjiao committed
408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 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 460 461 462 463 464 465 466 467 468 469 470 471
        codeTable2: [
          { label: "金(含金饰品)", value: "001" },
          { label: "银(含银饰品)", value: "002" },
          { label: "铜(含电解铜、铜制品及铜精矿)", value: "003" },
          { label: "铝(含电解铝、铝矾土及铝制品)", value: "004" },
          { label: "锌(含电解锌、锌精矿)", value: "005" },
          { label: "铁砂矿(含精矿)", value: "006" },
          { label: "其他金属", value: "007" },
          { label: "大豆", value: "008" },
          { label: "玉米", value: "009" },
          { label: "原油", value: "010" },
          { label: "食用油(含棕榈油)", value: "011" },
          { label: "煤", value: "013" },
          { label: "其他", value: "099" },
        ],
        columns: ['0 0 "lst1" 100 ', '1 1 "lst2" 100', '2 2 "document" 200'],
        codeTable: [
          { label: "Airway Bills", value: "Airway Bills" },
          { label: "Beneficiary's Declaration", value: "Beneficiary's Declaration" },
          { label: "Bill of Lading Copies", value: "Bill of Lading Copies" },
          { label: "Bill of Lading Originals", value: "Bill of Lading Originals" },
          { label: "Certificate", value: "Certificate" },
          { label: "Certificate of Analysis", value: "Certificate of Analysis" },
          { label: "Certificate of Origin", value: "Certificate of Origin" },
          { label: "Certificate of Quality", value: "Certificate of Quality" },
          { label: "Certificate of Quantity", value: "Certificate of Quantity" },
          { label: "Commercial Invoice", value: "Commercial Invoice" },
          { label: "Courier Receipt", value: "Courier Receipt" },
          { label: "Draft", value: "Draft" },
          { label: "Export Licence", value: "Export Licence" },
          { label: "Fax Report", value: "Fax Report" },
          { label: "Inspection Cert", value: "Inspection Cert" },
          { label: "Insurance Policy", value: "Insurance Policy" },
          { label: "Packing List", value: "Packing List" },
          { label: "Shipment Advice", value: "Shipment Advice" },
          { label: "Weight List", value: "Weight List" },
        ],
        // TableValue: [
        //   {
        //     id: 0,
        //     cmail1: "",
        //     cmail2: "",
        //     docnam: "",
        //     description: "",
        //     serialNum: "",
        //     tableName: "",
        //     tcddoc: "",
        //   },
        // ],
        newValue: {
          id: 0,
          cmail1: "",
          cmail2: "",
          docnam: "",
          description: "",
          serialNum: "",
          tableName: "",
          tcddoc: "",
        },
        invtyp: [
          { label: "type1", value: "1" }
        ],
      };
    },
huangxin committed
472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504

  watch:{
    "model.bodgrp.drr.pts.extkey" :{
      immediate:true,
        handler(val ,oldVal){
          if(this.model.bodgrp.drr.pts.extkey!=''){
            this.flag1=true;
          }else{
            this.flag1=false;
          }
        }
      },
      "model.bodgrp.col.pts.extkey" :{
        immediate:true,
        handler(val ,oldVal){
          if(this.model.bodgrp.col.pts.extkey!=''){
            this.flag2=true;
          }else{
            this.flag2=false;
          }
        }
      },
      "model.bodgrp.dre.pts.extkey" :{
        immediate:true,
        handler(val ,oldVal){
          if(this.model.bodgrp.dre.pts.extkey!=''){
            this.flag3=true;
          }else{
            this.flag3=false;
          }
        }
      },
  },
wangyanjiao committed
505 506
    methods: {
      ...Event,
507
      changeCur(){
508
        this.executeDefault("cnybop.libflg").then((res) => {
509 510 511 512 513
        if ((res.respCode == SUCCESS)) {
          Utils.copyValueFromVO(this.model, res.data);
        }
      });
      },
wangyanjiao committed
514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545
      addTableValue(index) {
        var newTableValue = Object.assign({}, this.newValue);
        const serial = Utils.generateUUID();
        newTableValue.serialNum = serial;
        this.model.botp.docgrdm.docgrd.splice(index - 1, 0, newTableValue);
        // var index = this.TableValue.length;

        // if (index > 0) {
        //   newTableValue.id = this.TableValue[index - 1].id + 1;
        // }
        // this.TableValue.push(newTableValue);
      },
      deleteTable(index) {
        this.model.botp.docgrdm.docgrd.splice(index, 1);
        // console.log(row)
        // console.log(this.TableValue)
        // for (let i = 0; i < this.TableValue.length; i++) {
        //   if (this.TableValue[i].id == row.id) {
        //     this.TableValue.splice(i, 1);
        //     break;
        //   }
        // }
      },
      async docpre() {
        let rtnmsg = await this.executeDefault('bodgrp.blk.docpre')
        if (rtnmsg.respCode == SUCCESS) {
          //TODO 处理数据逻辑
          this.updateModel(rtnmsg.data)
        }
        else {
          this.$notify.error({ title: '错误', message: '服务请求失败!' });
        }
546 547 548
      },

    },
wangyanjiao committed
549 550 551 552
    computed: {
      flag() {
        return this.model.bodgrp.drr.pts.adrelc == "";
      },
553
    },
wangyanjiao committed
554 555
    created: function () {
      console.log(this.root);
556
    },
wangyanjiao committed
557
  }
jxl committed
558 559
</script>
<style>
wangyanjiao committed
560 561 562 563 564
  .messageLabel>>>.el-form-item__label {
    text-align: left;
    font-weight: bold;
    font-size: 12px;
  }
jxl committed
565
</style>