Infsea.vue 7.35 KB
Newer Older
zhangliding committed
1 2 3 4 5 6 7
<template>
  <div class="eibs-tab">
    <!-- ----------左 ---------->
    <c-col :span="12" class="col-left">
	
	<c-col :span="24">
        <el-form-item label="保函文本用途" prop="atxcod">
zhouqian committed
8
            <c-select style="width: 100%"
zhangliding committed
9
                v-model="model.atxcod"
10
               placeholder="请选择保函文本用途"
zhangliding committed
11 12 13 14 15 16 17 18 19 20 21
                :code="getCodesByKey('atxcod')"
            >
            </c-select>
        </el-form-item>
    </c-col>
    </c-col>
  <c-col :span="12" class="col-right">
       <c-col :span="24">
        <el-form-item label="保函文本名" prop="nam">
            <c-input
                v-model="model.nam"
22
                placeholder="请输入保函文本名"
zhangliding committed
23 24 25 26 27 28 29 30 31 32 33
            >
            </c-input>
        </el-form-item>
    </c-col>

  </c-col>


    <c-col :span="12" v-if="(this.model.atxcod==`1`)" class="col-left">
    <c-col :span="24">
        <el-form-item label="出具目的" prop="gtxpurpos">
zhouqian committed
34
            <c-select style="width: 100%"
zhangliding committed
35
                v-model="model.gtxpurpos"
36
               placeholder="请选择出具目的"
hewei committed
37
                :code="getCodesByKey('gtxpurpos') "
zhangliding committed
38 39 40 41 42 43 44
            >
            </c-select>
        </el-form-item>
    </c-col>

    <c-col :span="24">
        <el-form-item label="保函包含类型" prop="gtxgartyp">
zhouqian committed
45
            <c-select style="width: 100%"
zhangliding committed
46
                v-model="model.gtxgartyp"
47
               placeholder="请选择保函包含类型"
zhangliding committed
48 49 50 51 52 53 54
                :code="getCodesByKey('gtxgartyp')"
            >
            </c-select>
        </el-form-item>
    </c-col>
	
	<c-col :span="24">
55
        <el-form-item label="保函格式" prop="gtxlegfrm">
zhouqian committed
56
             <c-select style="width: 100%"
zhangliding committed
57
                v-model="model.sealegfrm"
58
               placeholder="请选择保函格式"
zhangliding committed
59 60 61 62 63 64 65 66 67 68 69
                :code="getCodesByKey('gtxlegfrm')"
            >
            </c-select>
        </el-form-item>
    </c-col>
</c-col>

<!-- 右 -->
<c-col :span="12" v-if="(this.model.atxcod==`1`)" class="col-right">
	<c-col :span="24">
        <el-form-item label="语言" prop="gtxuil">
zhouqian committed
70
            <c-select style="width: 100%"
zhangliding committed
71
                v-model="model.gtxuil"
72
               placeholder="请选择语言"
zhangliding committed
73 74 75 76 77 78 79 80
                :code="getCodesByKey('gtxuil')"
            >
            </c-select>
        </el-form-item>
    </c-col>
	
	 <c-col :span="24">
        <el-form-item label="保函无责任担保标志" prop="gtxexpflg">
zhouqian committed
81
            <c-select style="width: 100%"
zhangliding committed
82
                v-model="model.gtxexpflg"
83
               placeholder="请选择保函无责任担保标志"
zhangliding committed
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
                :code="getCodesByKey('gtxexpflg')"
            >
            </c-select>
        </el-form-item>
    </c-col>
</c-col>
<c-col :span="12" v-if="(this.model.atxcod==`2`)" class="col-left">
    <c-col :span="24">
       <!--  -->
    </c-col>
</c-col>
<c-col :span="12" v-if="(this.model.atxcod==`2`)" class="col-right">
    <c-col :span="24">
       <!--  -->
    </c-col>
</c-col>

    <!-- 条件输入框下面的按钮 -->
    <c-col :span="24">
      <c-col :span="12" style="text-align: left">
        <el-button type="primary" size="small" @click="atxAdd">新增</el-button>
      </c-col>
      <c-col :span="12" style="text-align: right">
        <el-button size="small" @click="handleReset">重置</el-button>
        <el-button
          type="primary"
          icon="el-icon-search"
          size="small"
112
          @click="onSearch()"
zhangliding committed
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
          >查询
        </el-button>
      </c-col>
    </c-col>

    <!-- 查询结果展示区域 -->
    <c-col :span="24">
      <c-paging-table 
        :data="atxData"
        :columns="atxColumns"
        :pageNumber="model.pageNum"
        :pageSize="model.pageSize"
        :total="model.total"
        v-on:queryFunc="queryFunc"
        :border="true"
      >
        <c-table-column fixed="right" prop="op" label="操作" width="240px">
          <template slot-scope="{ scope }">
            <c-button
              style="margin-left: 0"
              size="small"
              @click="atxInfo(scope.$index, scope.row)"
              >详情</c-button
            >
            <c-button
              style="margin-left: 5px"
              size="small"
              type="primary"
              @click="atxEdit(scope.$index, scope.row)"
              >修改</c-button
            >
            <c-button
              size="small"
              style="margin-left: 5px"
              @click="atxDelete(scope.$index, scope.row)"
              >删除</c-button
            >
            <el-popover placement="top-start" width="50" trigger="click">
              <ul class="table-button-item-list">
                <li>
                  <c-button size="small" style="margin-left: 0">指派</c-button>
                </li>
                <li>
                  <c-button size="small" style="margin-left: 0">删除</c-button>
                </li>
              </ul>
              <a
                slot="reference"
                href="javascript:void(0)"
                style="margin-left: 5px"
              >
                <i class="el-icon-more"></i>
              </a>
            </el-popover>
          </template>
        </c-table-column>
      </c-paging-table>
    </c-col>
  </div>
</template>

<script>
import codes from "~/config/CodeTable";

import { queryByPage } from "~/service/test/atx.js";

export default {
  name: "",
  props: ["model"],
  inject: ["root"],
  data() {
    return {
      atxData: [],
      atxColumns: [
	      { label: '保函文本名', prop: 'nam', width: 'auto' },
	      { label: '保函用途', prop: 'atxcod', width: 'auto' },
	      { label: '语言', prop: 'uil', width: 'auto' },
	      { label: '保函格式', prop: 'gtxlegfrm', width: 'auto' },
	      { label: '保函无责任担保标志', prop: 'gtxexpflg', width: 'auto' },
	      { label: '保函包含类型', prop: 'gtxgartyp', width: 'auto' },
	      { label: '出具目的', prop: 'gtxpurpos', width: 'auto' },
			],
    };
  },
  computed: {
  },
  
  activated() {
    const { update } = this.$route.params
    if (update) {
      this.onInfatxSearch()
    }
  },
  methods: {
    handleReset() {
      this.root.$refs.modelForm.resetFields();
    },
210 211 212 213 214
    onSearch() {
      this.model.pageSize = 5;
      this.model.pageNum = 1;
      this.onInfatxSearch();
    },
zhangliding committed
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
    onInfatxSearch() {
			queryByPage(this.model).then(res => {
        /**
         * pageNumber: 0
         * pageSize:	0
         * total: 69
         * totalPage: 0
         */
        const list = res.list
        this.atxData = list
        this.model.pageNum = res.pageNumber
        this.model.pageSize = res.pageSize
        this.model.total = res.total
      }) 
		},
    queryFunc(pageNumber, pageSize) {
      this.model.pageNum = pageNumber
      this.model.pageSize = pageSize
      this.onInfatxSearch()
    },
    atxtypeChange(val) {
      this.model.atxtyp = val;
    },
    getCodesByKey(key) {
      return codes[key] ?? [];
    },
   atxAdd() {
			this.$router.push(`/statics/dbaatx`)
		},
    atxInfo(index, row) {
			this.$router.push(`/statics/dbiatx/${row.inr}`)
		},
    atxEdit(index, row) {
			this.$router.push(`/statics/dbeatx/${row.inr}`)
		},
    atxDelete(index, row) {
			this.$router.push(`/statics/dbdatx/${row.inr}`)
		},
  },
};
</script>

<style scoped>
.table-button-item-list {
  padding: 0;
  margin: 0;
}
.table-button-item-list li {
  list-style: none;
  padding: 5px 0;
  text-align: center;
  color: #606266;
  cursor: pointer;
}</style>