Ptap.vue 3.89 KB
Newer Older
zhengxiaokui committed
1 2
<template>
  <div class="eibs-tab">
zhengxiaokui committed
3
    <c-col v-if="!noRef" :span="24">
zhengxiaokui committed
4 5 6 7 8 9 10 11 12 13 14
      <el-form-item
        :label="`${argadr.title}参考号`"
        :prop="`${argadr.grp}.${argadr.rol}.pts.ref`"
      >
        <c-input
          v-model="model[argadr.grp][argadr.rol].pts.ref"
          :placeholder="'请输入' + argadr.title + '参考号'"
        ></c-input>
      </el-form-item>
    </c-col>

zhengxiaokui committed
15
    <c-col :span="16">
zhengxiaokui committed
16
      <el-form-item
zhengxiaokui committed
17
        :label="`${argadr.title}编号`"
zhengxiaokui committed
18
        :prop="`${argadr.grp}.${argadr.rol}.pts.extkey`"
zhengxiaokui committed
19 20
      >
        <c-input
zhengxiaokui committed
21
          v-model="model[argadr.grp][argadr.rol].pts.extkey"
zhengxiaokui committed
22
          :placeholder="'请输入' + argadr.title + 'Extkey'"
zhengxiaokui committed
23 24 25
          @keyup.enter.native="
            showGridPromptDialog(`${argadr.grp}.${argadr.rol}.pts.extkey`)
          "
zhengxiaokui committed
26
          @change="valueChange"
zhengxiaokui committed
27 28 29 30
        ></c-input>
      </el-form-item>
    </c-col>

zhengxiaokui committed
31
    <c-col :span="8">
zhengxiaokui committed
32 33 34 35
      <el-form-item label="" label-width="15px">
        <c-button
          size="small"
          type="primary;width:10%"
zhengxiaokui committed
36
          @click="onSeainf(`${argadr.grp}.${argadr.rol}.pts.extkey`)"
zhengxiaokui committed
37 38 39 40 41 42 43 44
          >i</c-button
        >
        <c-button size="small" type="primary" @click="onAplpDet">
          Details
        </c-button>
      </el-form-item>
    </c-col>

zhengxiaokui committed
45 46
    <template v-if="!onlySearch">
      <c-col v-if="isAdrblk" :span="24">
zhengxiaokui committed
47
        <el-form-item
zhengxiaokui committed
48 49
          label="名称地址"
          :prop="`${argadr.grp}.${argadr.rol}.pts.adrblk`"
zhengxiaokui committed
50 51
        >
          <c-input
zhengxiaokui committed
52
            type="textarea"
zhengxiaokui committed
53
            :rows="4"
zhengxiaokui committed
54 55 56 57
            v-model="model[argadr.grp][argadr.rol].pts.adrblk"
            maxlength="35"
            show-word-limit
            placeholder="请输入名称地址"
zhengxiaokui committed
58
            :disabled="disabled"
zhengxiaokui committed
59 60 61
          ></c-input>
        </el-form-item>
      </c-col>
zhengxiaokui committed
62 63 64 65 66 67 68 69 70 71 72 73 74
      <template v-else>
        <c-col :span="24">
          <el-form-item
            label="名称"
            :prop="`${argadr.grp}.${argadr.rol}.pts.namelc`"
          >
            <c-input
              v-model="model[argadr.grp][argadr.rol].pts.namelc"
              :placeholder="'请输入' + argadr.title + '名称'"
              :disabled="disabled"
            ></c-input>
          </el-form-item>
        </c-col>
zhengxiaokui committed
75

zhengxiaokui committed
76 77 78 79 80 81 82 83 84 85 86 87 88
        <c-col :span="24">
          <el-form-item
            label="地址"
            :prop="`${argadr.grp}.${argadr.rol}.pts.adrelc`"
          >
            <c-input
              v-model="model[argadr.grp][argadr.rol].pts.adrelc"
              :placeholder="'请输入' + argadr.title + '地址'"
              :disabled="disabled"
            ></c-input>
          </el-form-item>
        </c-col>
      </template>
zhengxiaokui committed
89
    </template>
zhengxiaokui committed
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
  </div>
</template>
<script>
import Api from "~/service/Api";
import CommonProcess from "~/mixin/CommonProcess";
// 机构信息模块
export default {
  inject: ["root"],
  mixins: [CommonProcess],

  props: {
    model: {
      type: Object,
      default: undefined,
    },
    argadr: {
      type: Object,
      default: function () {
        return {
          title: "", //角色名称
          rol: "", //角色
          grp: "", //所属模块
        };
      },
    },
    disabled: {
zhengxiaokui committed
116
      //名称地址是否灰显
zhengxiaokui committed
117 118 119
      type: Boolean,
      default: false,
    },
zhengxiaokui committed
120 121 122 123 124 125

    isAdrblk: {
      //名称地址是否为大字段
      type: Boolean,
      default: true,
    },
zhengxiaokui committed
126 127 128 129 130 131 132 133 134 135
    onlySearch: {
      //是否只展示extkey
      type: Boolean,
      default: false,
    },
    noRef: {
      //无需参考号
      type: Boolean,
      default: false,
    },
zhengxiaokui committed
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
  },
  data() {
    return {
      data: [],
    };
  },
  watch: {},
  methods: {
    onSeainf(data) {
      this.$emit("onSeainf", data);
    },

    onAplpDet() {
      this.$emit("onAplpDet");
    },
zhengxiaokui committed
151

zhengxiaokui committed
152
    valueChange() {
zhengxiaokui committed
153 154 155 156 157
      if (this.onlySearch) return;
      this.showGridPromptDialog(
        `${this.argadr.grp}.${this.argadr.rol}.pts.extkey`
      );
    },
zhengxiaokui committed
158
  },
zhengxiaokui committed
159

zhengxiaokui committed
160 161 162 163 164
  created: function () {},
};
</script>
<style>
</style>