Infsea.vue 7.75 KB
Newer Older
tianxinyu committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
<template>
  <div class="eibs-tab">
  
    <c-col :span="24" class="col-left">
      <c-col :span="12">
        <el-form-item label="费用代码" prop="codfee">
            <c-input
                v-model="model.codFee"
                placeholder="请输入 费用代码"
                style="width: 100%"
            >
            </c-input>
        </el-form-item>
    </c-col>
    </c-col>

      
      <c-col :span="24" class="col-left">
        <c-col :span="12">
tianxinyu committed
20
          <el-form-item label="收费条件类型" prop="feepri">
tianxinyu committed
21 22 23
            <c-select
              v-model="model.feepri"
              style="width: 100%"
tianxinyu committed
24
              placeholder="请选择收费类型"
tianxinyu committed
25 26 27 28 29 30 31
              :code="getCodesByKey('feepri')"
            ></c-select>
          </el-form-item>
        </c-col>
        </c-col>

<!-- bus.sector -->
32
   <!-- <c-col :span="24" v-if="(this.model.feepri==`$`)" class="col-left">
tianxinyu committed
33 34 35 36 37 38 39 40 41 42
      <c-col :span="12">
        <el-form-item label="sector" prop="objtyp">
            <c-input
                v-model="model.objtyp"
                placeholder="请输入 sector"
                :disabled="true"
            >
            </c-input>
        </el-form-item>
    </c-col>
43
    </c-col> -->
tianxinyu committed
44 45
   
    <!-- entity -->
46
    <!-- <c-col :span="24" v-if="(this.model.feepri==`*`)" class="col-left">
tianxinyu committed
47 48 49 50 51 52 53 54 55 56
      <c-col :span="12">
        <el-form-item label="实体" prop="objtyp">
            <c-input
                v-model="model.objtyp"
                placeholder="请输入实体"
                :disabled="true"
            >
            </c-input>
        </el-form-item>
    </c-col>
57
    </c-col> -->
tianxinyu committed
58 59

    <!-- region -->
60
    <!-- <c-col :span="24" v-if="(this.model.feepri==1)" class="col-left">
tianxinyu committed
61 62 63 64 65 66 67 68 69 70
      <c-col :span="12">
        <el-form-item label="区域" prop="objtyp">
            <c-input
                v-model="model.objtyp"
                placeholder="请输入区域"
                :disabled="true"
            >
            </c-input>
        </el-form-item>
    </c-col>
71
    </c-col> -->
tianxinyu committed
72 73

    <!-- country -->
74
     <!-- <c-col :span="24" v-if="(this.model.feepri==2)" class="col-left">
tianxinyu committed
75 76 77 78 79 80 81 82 83 84
      <c-col :span="12">
        <el-form-item label="国家" prop="objtyp">
            <c-input
                v-model="model.objtyp"
                placeholder="请输入国家"
                :disabled="true"
            >
            </c-input>
        </el-form-item>
    </c-col>
85
    </c-col> -->
tianxinyu committed
86 87

     <!-- group -->
88
     <!-- <c-col :span="24" v-if="(this.model.feepri==3)" class="col-left">
tianxinyu committed
89 90 91 92 93 94 95 96 97 98
      <c-col :span="12">
        <el-form-item label="组" prop="objtyp">
            <c-input
                v-model="model.objtyp"
                placeholder="请输入组"
                :disabled="true"
            >
            </c-input>
        </el-form-item>
    </c-col>
99
    </c-col> -->
tianxinyu committed
100 101

     <!-- party -->
102
     <!-- <c-col :span="24" v-if="(this.model.feepri==4)" class="col-left">
tianxinyu committed
103 104 105 106 107 108 109 110 111 112
      <c-col :span="12">
        <el-form-item label="当事人" prop="objtyp">
            <c-input
                v-model="model.objtyp"
                placeholder="请输入当事人"
                :disabled="true"
            >
            </c-input>
        </el-form-item>
    </c-col>
113
    </c-col> -->
tianxinyu committed
114 115 116 117 118 119 120 121 122 123
    <c-col :span="24">
      <c-col :span="12" style="text-align: left">
        <el-button type="primary" size="small" @click="fecAdd">新增</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"
124
          @click="onSearch()"
tianxinyu committed
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
          >查询
        </el-button>
      </c-col>
    </c-col>
    <c-col :span="24">
      <c-paging-table 
        :data="fecData"
        :columns="fecColumns"
        :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="fecInfo(scope.$index, scope.row)"
              >详情</c-button
            >
            <c-button
              style="margin-left: 5px"
              size="small"
              type="primary"
              @click="fecEdit(scope.$index, scope.row)"
              >修改</c-button
            >
            <c-button
              size="small"
              style="margin-left: 5px"
              @click="fecDelete(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/fec.js";

export default {
  name: "",
  props: ["model"],
  inject: ["root"],
  data() {
    return {
      fecData: [],
      fecColumns: [
				{ label: '费用代码', prop: 'codFee', width: '120' },
tianxinyu committed
198
        { label: 'Description', prop: '', width: '120' },
tianxinyu committed
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222
				{ label: '收费条件类型', prop: 'feepri', width: '120' },
				{ label: '最小金额币种', prop: 'maxcur', width: '120' },
				{ label: '费用最小金额', prop: 'lowamt', width: '120' },
				{ label: '费用最大金额', prop: 'highamt', width: '120' },
				{ label: '起始日期', prop: 'begdat', width: '120' },
				{ label: '终止日期', prop: 'enddat', width: '120' },
				{ label: '计算规则', prop: 'calrul', width: '120' },
				{ label: '每份的费用金额', prop: 'untamt', width: '150' },
				{ label: '计算费率', prop: 'ratcal', width: '120' },
			],
    };
  },
  computed: {
  },
  activated() {
    const { update } = this.$route.params
    if (update) {
      this.onInffecSearch()
    }
  },
  methods: {
    handleReset() {
      this.root.$refs.modelForm.resetFields();
    },
223 224 225 226 227
    onSearch(){
        this.model.pageNum = 1;
        this.model.pageSize = 5;
        this.onInffecSearch();
    },
tianxinyu committed
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
    onInffecSearch() {
			queryByPage(this.model).then(res => {
        /**
         * pageNumber: 0
         * pageSize:	0
         * total: 69
         * totalPage: 0
         */
        const list = res.list
        this.fecData = 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.onInffecSearch()
    },
    fectypeChange(val) {
      this.model.fectyp = val;
    },
    getCodesByKey(key) {
      return codes[key] ?? [];
    },
    fecAdd() {
			this.$router.push(`/statics/dbafec`)
		},
    fecInfo(index, row) {
			this.$router.push(`/statics/dbifec/${row.inr}`)
		},
    fecEdit(index, row) {
			this.$router.push(`/statics/dbefec/${row.inr}`)
		},
    fecDelete(index, row) {
			this.$router.push(`/statics/dbdfec/${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>