Doxp.vue 3.64 KB
Newer Older
zhengxiaokui committed
1 2 3 4 5
<template>
  <c-row>
    <c-blkTextarea :model="model" v-bind="blk"> </c-blkTextarea>
    <br />
    <c-col v-if="dtyp === 'dogp'" :span="12">
zhengxiaokui committed
6
      <el-form-item label="Goods code" :prop="`${rec}grp.rec.stagod`">
zhengxiaokui committed
7
        <c-select
zhengxiaokui committed
8
          v-model="model[`${rec}grp`].rec.stagod"
zhengxiaokui committed
9 10 11 12 13 14 15
          style="width: 100%"
          placeholder="请选择Goods code"
          :code="codes.godcod"
        >
        </c-select>
      </el-form-item>
    </c-col>
zhengxiaokui committed
16
    <template v-else-if="dtyp === 'adcp'">
zhengxiaokui committed
17
      <c-col :span="20" class="letopn_adcp_cheak">
zhengxiaokui committed
18
        <c-checkbox v-model="model[`${rec}grp`].rec.spcbenflg"
zhengxiaokui committed
19 20 21 22 23
          >Special payment conditions for beneficiary</c-checkbox
        >
      </c-col>

      <c-col :span="20" class="letopn_adcp_cheak">
zhengxiaokui committed
24
        <c-checkbox v-model="model[`${rec}grp`].rec.spcrcbflg">
zhengxiaokui committed
25 26 27 28 29
          Special payment conditions for receiving bank</c-checkbox
        >
      </c-col>

      <c-col :span="20" class="letopn_adcp_cheak">
zhengxiaokui committed
30
        <c-checkbox v-model="model[`${rec}grp`].rec.redclsflg"
zhengxiaokui committed
31 32 33 34 35 36 37 38 39
          >Red/Green Clause</c-checkbox
        >
      </c-col>
      <c-blkTextarea :model="model" v-bind="blk1"> </c-blkTextarea>
    </template>
  </c-row>
</template>
<script>
import Api from "~/service/Api";
wangren committed
40
import commonProcess from "~/mixin/commonProcess";
zhengxiaokui committed
41 42 43 44 45
import BlkTextarea from "./BlkTextarea";

export default {
  inject: ["root"],
  // dtyp=>dogp:货物描述;dorp:单据要求;adcp:附加条款;spcbenp:受益人特殊付款条款;spcrcvp:收款银行特殊付款条款
zhengxiaokui committed
46
  props: ["model", "codes", "dtyp", "rec"],
zhengxiaokui committed
47
  components: { "c-blkTextarea": BlkTextarea },
wangren committed
48
  mixins: [commonProcess],
zhengxiaokui committed
49 50
  data() {
    return {
zhengxiaokui committed
51
      blk: this.getBlk(this.dtyp, this.rec),
zhengxiaokui committed
52 53 54
      blk1: {
        blkMsg: {
          title: "Instructions to Pay.,Accept.,Negot.bank",
zhengxiaokui committed
55
          dataUrl: `${this.rec}grp.blk.insbnk`, //字段所在model路劲
zhengxiaokui committed
56 57 58
          rows: 6,
          maxlength: 2000,
        },
zhengxiaokui committed
59
        rulePath: `${this.rec.slice(0, 2)}tp.insbnk.buttxmsel`,
zhengxiaokui committed
60 61 62 63
      },
    };
  },
  methods: {
zhengxiaokui committed
64
    getBlk(dtyp, rec) {
zhengxiaokui committed
65
      let blk = { blkMsg: {}, rulePath: "" };
zhengxiaokui committed
66 67
      let tp = rec.slice(0, 2);
      console.log('tp is :',tp);
zhengxiaokui committed
68 69 70 71
      switch (dtyp) {
        case "dogp":
          blk.blkMsg = {
            title: "Description of Goods",
zhengxiaokui committed
72
            dataUrl: `${rec}grp.blk.lcrgod`, //字段所在model路劲
zhengxiaokui committed
73 74
            rows: 20,
          };
zhengxiaokui committed
75
          blk.rulePath = `${tp}tp.lcrgod.buttxmsel`;
zhengxiaokui committed
76 77 78 79
          break;
        case "dorp":
          blk.blkMsg = {
            title: "Documents Required",
zhengxiaokui committed
80
            dataUrl: `${rec}grp.blk.lcrdoc`, //字段所在model路劲
zhengxiaokui committed
81 82
            rows: 20,
          };
zhengxiaokui committed
83
          blk.rulePath = `${tp}tp.lcrdoc.buttxmsel`;
zhengxiaokui committed
84 85 86 87
          break;
        case "adcp":
          blk.blkMsg = {
            title: "Additional Conditions",
zhengxiaokui committed
88 89
            dataUrl: `${rec}grp.blk.adlcnd`, //字段所在model路劲
            rows: 14,
zhengxiaokui committed
90
          };
zhengxiaokui committed
91
          blk.rulePath = `${tp}tp.adlcnd.buttxmsel`;
zhengxiaokui committed
92 93 94 95
          break;
        case "spcbenp":
          blk.blkMsg = {
            title: "Special payment conditions for beneficiary",
zhengxiaokui committed
96
            dataUrl: `${rec}grp.blk.spcben`, //字段所在model路劲
zhengxiaokui committed
97 98
            rows: 20,
          };
zhengxiaokui committed
99
          blk.rulePath = `${tp}tp.spcben.buttxmsel`;
zhengxiaokui committed
100 101 102 103
          break;
        case "spcrcvp":
          blk.blkMsg = {
            title: "Special payment conditions for receiving bank",
zhengxiaokui committed
104
            dataUrl: `${rec}grp.blk.spcrcb`, //字段所在model路劲
zhengxiaokui committed
105 106
            rows: 20,
          };
zhengxiaokui committed
107
          blk.rulePath = `${tp}tp.spcrcb.buttxmsel`;
zhengxiaokui committed
108 109 110 111 112 113 114 115 116 117 118 119 120 121
          break;
      }
      return blk;
    },
  },
  computed: {},
  created: function () {},
};
</script>
<style>
.letopn_adcp_cheak {
  margin: 0px 0 10px 150px;
}
</style>