Docpre.vue 7.37 KB
Newer Older
fukai committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 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 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 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 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216
<template>
  <div class="eibs-tab">

    <!-- ==================左边================ -->
    <c-col :span="24">
      <c-col :span="15">
        <el-form-item label-width="0">
          <c-ptap-commons :requiredExtkey="model.bddgrp.blk.docdisflg=='X'" :disabled="model.bddgrp.blk.docdisflg!='X'" :disabledButton="model.bddgrp.blk.docdisflg!='X'" :cols="50" :rows="70" :minRows="8" :maxRows="8" :model="model" :extCodes="['bddgrp','blk']" lastModel="docdis" title="不符点"></c-ptap-commons>
          <!-- <c-input :disabled="model.bddgrp.blk.docdisflg!='X'" type="textarea" :rows="8" v-model="model.bddgrp.blk.docdis" maxlength="3500" show-word-limit></c-input> -->
        </el-form-item>
      </c-col>
      <c-col :span="4" style="padding-left: 20px">
        <div style="display: flex;align-items: flex-start;flex-direction:column;">
          <div>
            <el-form-item label-width="0" prop="bddgrp.rec.igndisflg">
              <c-checkbox true-label="X" false-label="" v-model="model.bddgrp.rec.igndisflg" class="checkbox-left">忽略不符点</c-checkbox>
            </el-form-item>
          </div>
          <div style="margin-top:10px;">
            <el-form-item label-width="0" prop="bddgrp.blk.docdisflg">
              <c-checkbox true-label="X" false-label="" v-model="model.bddgrp.blk.docdisflg" class="checkbox-left">录入不符点</c-checkbox>
            </el-form-item>
          </div>
          <div style="margin-top:10px;">
            <el-form-item label-width="0" prop="bddgrp.rec.approvcod">
              <c-checkbox true-label="X" false-label="" v-model="model.bddgrp.rec.approvcod" class="checkbox-left">议付行担保议付</c-checkbox>
            </el-form-item>
          </div>
        </div>
      </c-col>
    </c-col>
    <c-col :span="24" v-show="false">
      <el-form-item label="不符点">
        <c-input type="textarea" :rows="8" v-model="docdistxt" maxlength="3500" show-word-limit></c-input>
      </el-form-item>
    </c-col>
    <c-col :span="24">
      <c-col :span="15">
        <el-form-item label="注释和结论" prop="bddgrp.blk.comcon">
          <div style="display:inline-block;width: calc(100% - 40px);">
            <c-input type="textarea" :rows="8" v-model="model.bddgrp.blk.comcon" maxlength="1950" show-word-limit></c-input>
          </div>
        </el-form-item>
      </c-col>
    </c-col>
    <c-col :span="24">
      <c-col :span="15">
        <el-form-item label="到期付款确认备注" prop="bddgrp.blk.accrmk">
          <div style="display:inline-block;width: calc(100% - 40px);">
            <c-input type="textarea" :rows="8" v-model="model.bddgrp.blk.accrmk" maxlength="1625" show-word-limit></c-input>
          </div>
        </el-form-item>
      </c-col>
    </c-col>
    <c-col :span="24">
      <c-col :span="15">
        <el-form-item label="发票信息/单据号" prop="bddgrp.rec.invref">
          <div style="display:inline-block;width: calc(100% - 40px);">
            <c-input type="textarea" :rows="8" v-model="model.bddgrp.rec.invref" maxlength="210" show-word-limit></c-input>
          </div>
        </el-form-item>
      </c-col>
    </c-col>

    <!-- 已交单据   表格 -->
    <c-col :span="24">
      <c-col :span="15">
        <el-form-item label="已交单据">
          <div style="display:inline-block;width: calc(100% - 40px);">
            <c-table-doc :model="model" xxtp='bdtp' :isLeft="true"></c-table-doc>
          </div>
        </el-form-item>
      </c-col>
    </c-col>

  </div>
</template>
<script>
import event from "../event";
import moment from "moment";
import BigNumber from "bignumber.js";

export default {
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [event],
  data() {
    return {};
  },
  methods: {},
  created() {},
  computed: {
    docdistxt: {
      get() {
        let descr = "";
        let cr = "\n";
        if (this.isInDisplay) {
          return this.model.bddgrp.blk.docdis;
        }
        if (this.model.spt && this.model.spt.channel!= "") {
          return this.model.bddgrp.blk.docdis;
        }
        if (
          this.model.bddgrp.blk.modifySet &&
          this.model.bddgrp.blk.modifySet.includes("docdis")
        ) {
          return this.model.bddgrp.blk.docdis;
        }
        if (
          this.model.bddgrp.rec.shpdat != null &&
          this.model.bddgrp.rec.shpdat != "" &&
          this.model.didgrp.rec.shpdat != null &&
          this.model.didgrp.rec.shpdat != ""
        ) {
          if (
            moment(this.model.bddgrp.rec.shpdat).diff(
              moment(this.model.didgrp.rec.shpdat),
              "days"
            ) > 0
          ) {
            descr = descr + "Late shipment." + cr;
          }
        }
        if (
          this.model.bddgrp.rec.predat != null &&
          this.model.bddgrp.rec.predat != "" &&
          this.model.didgrp.rec.expdat != null &&
          this.model.didgrp.rec.expdat != ""
        ) {
          if (
            moment(this.model.bddgrp.rec.predat).diff(
              moment(this.model.didgrp.rec.expdat),
              "days"
            ) > 0
          ) {
            descr = descr + "Documents presented after expiry of the LC." + cr;
          }
        }
        if (
          new BigNumber(this.model.bddgrp.cbs.max.amt).comparedTo(
            new BigNumber(this.model.didgrp.cbs.opn1.amt)
          ) > 0
        ) {
          descr =
            descr +
            "The LC is overdrawn by " +
            this.model.bddgrp.cbs.max.cur +
            " " +
            new BigNumber(this.model.bddgrp.cbs.max.amt).minus(
              new BigNumber(this.model.didgrp.cbs.opn1.amt)
            ) +
            cr;
        }
        if (
          this.model.didgrp.rec.shppar == "NALW" &&
          this.model.didgrp.rec.utlnbr >= 1
        ) {
          descr = descr + "Partial shipment effected." + cr;
        }
        if (this.model.bddgrp.rec.docflg == "P") {
          if (
            this.model.didgrp.rec.avbby == "A" ||
            this.model.didgrp.rec.avbby == "D"
          ) {
            descr = descr + "Sight documents presented instead of usance." + cr;
          }
          if (this.model.didgrp.rec.avbby == "M") {
            descr =
              descr +
              "Only Sight documents presented instead of mixed payment." +
              cr;
          }
        }
        if (
          this.model.bddgrp.rec.docflg == "A" ||
          this.model.bddgrp.rec.docflg == "D"
        ) {
          if (this.model.didgrp.rec.avbby == "P") {
            descr = descr + "Usance documents presented instead of sight." + cr;
          }
          if (this.model.didgrp.rec.avbby == "M") {
            descr =
              descr +
              "Only Usance documents presented instead of mixed payment." +
              cr;
          }
        }
        if (this.model.bddgrp.rec.docflg == "M") {
          if (this.model.didgrp.rec.avbby == "P") {
            descr =
              descr +
              "Mixed payment documents presented instead of sight." +
              cr;
          }
          if (
            this.model.didgrp.rec.avbby == "A" ||
            this.model.didgrp.rec.avbby == "D"
          ) {
            descr =
              descr +
              "Mixed payment documents presented instead of usance." +
              cr;
          }
        }
        this.model.bddgrp.blk.docdis = descr;
        return descr;
      },
      set(newVal) {
        return newVal;
      }
    }
  }
};
</script>
<style>
</style>