11
This commit is contained in:
parent
58c4836c5d
commit
40f256bce7
@ -1,15 +1,49 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20" type='flex'>
|
||||
<el-col :span="5" :xs="5">
|
||||
<div class="head-container">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="15" :xs="15">
|
||||
<el-input
|
||||
v-model="countryName"
|
||||
placeholder="国家名称"
|
||||
clearable
|
||||
size="small"
|
||||
prefix-icon="el-icon-search"
|
||||
style="margin-bottom: 20px"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-tree
|
||||
ref="tree"
|
||||
class="filter-tree tree"
|
||||
:data="countryTree"
|
||||
:props="defaultProps"
|
||||
:expand-on-click-node="false"
|
||||
:filter-node-method="filterNode"
|
||||
node-key="id"
|
||||
highlight-current
|
||||
default-expand-all
|
||||
@node-click="handleNodeClick"
|
||||
>
|
||||
</el-tree>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="20" :xs="20">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
|
||||
<el-form-item label="" prop="country">
|
||||
<el-input
|
||||
v-model="queryParams.country"
|
||||
placeholder="所属国家"
|
||||
placeholder="名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!--
|
||||
<el-form-item label="" prop="noCalcDay">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.noCalcDay"
|
||||
@ -18,6 +52,7 @@
|
||||
placeholder="请选择不计时效日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
-->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@ -73,7 +108,7 @@
|
||||
|
||||
<el-table v-loading="loading" :data="emisNotCalcAgingList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="不计时效日期" align="left" prop="noCalcDay" min-width="180">
|
||||
<el-table-column label="日期" align="left" prop="noCalcDay" min-width="180">
|
||||
<template slot-scope="scope">
|
||||
<div class="link-type" @click="handleUpdate(scope.row)">{{scope.row.noCalcDay}}</div>
|
||||
</template>
|
||||
@ -89,7 +124,7 @@
|
||||
></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" min-width="100" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" min-width="100" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -114,15 +149,10 @@
|
||||
/>
|
||||
|
||||
<!-- 添加或修改不计时效维护对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" :close-on-click-modal="false" append-to-body>
|
||||
<el-dialog :title="title" :visible.sync="open" width="700px" :close-on-click-modal="false" append-to-body>
|
||||
<el-row :gutter="0">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="所属国家" prop="country">
|
||||
<el-input v-model="form.country" placeholder="请输入所属国家,可能多个国家,逗号隔开" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="不计时效日期" prop="noCalcDay">
|
||||
<el-date-picker clearable
|
||||
v-model="form.noCalcDay"
|
||||
@ -132,19 +162,41 @@
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属国家" prop="country">
|
||||
<el-select v-model="form.country" multiple placeholder="请输入所属国家,可能多个国家,逗号隔开" >
|
||||
<el-option
|
||||
v-for="item in countryIdsOptions"
|
||||
:key="item.label"
|
||||
:label="item.label"
|
||||
:value="item.label"
|
||||
:disabled="item.status == 1"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="是否启用" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!--
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!--
|
||||
<el-col :span="24" v-show="moreInputVisible" > </el-col>
|
||||
<el-col :span="24">
|
||||
<el-divider content-position="right" @click="handleShowMoreInput" >更多信息[+]</el-divider>
|
||||
</el-col>
|
||||
-->
|
||||
|
||||
</el-form>
|
||||
</el-row>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@ -162,12 +214,14 @@
|
||||
<el-dialog :title="titleView" :visible.sync="openView" width="60%" :close-on-click-modal="false" append-to-body>
|
||||
<emisNotCalcAgingView :id="id" ></EmisNotCalcAgingView>
|
||||
</el-dialog>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEmisNotCalcAging, getEmisNotCalcAging, delEmisNotCalcAging, addEmisNotCalcAging, updateEmisNotCalcAging } from "@/api/emis/emisNotCalcAging";
|
||||
import { listEmisNotCalcAging, getEmisNotCalcAging, delEmisNotCalcAging, addEmisNotCalcAging, updateEmisNotCalcAging,changeCalcStatus } from "@/api/emis/emisNotCalcAging";
|
||||
import { listEmisCountry, getEmisCountry, delEmisCountry, addEmisCountry, updateEmisCountry } from "@/api/emis/emisCountry";
|
||||
import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
|
||||
import emisNotCalcAgingView from '@/views/emis/emisNotCalcAging/emisNotCalcAgingView';
|
||||
import emisNotCalcAgingForm from '@/views/emis/emisNotCalcAging/emisNotCalcAgingForm';
|
||||
@ -182,6 +236,7 @@ export default {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
currentId:null,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
@ -196,6 +251,8 @@ export default {
|
||||
total: 0,
|
||||
// 不计时效维护表格数据
|
||||
emisNotCalcAgingList: [],
|
||||
countryTree:[],
|
||||
countryIdsOptions:[],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
@ -212,6 +269,10 @@ export default {
|
||||
|
||||
// 弹出展示层
|
||||
id:null,
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "label"
|
||||
},
|
||||
titleView:"",
|
||||
openView: false,
|
||||
// 备注时间范围
|
||||
@ -229,6 +290,7 @@ export default {
|
||||
status: null,
|
||||
remark: null,
|
||||
},
|
||||
countryName:null,
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
@ -245,10 +307,28 @@ export default {
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 根据名称筛选部门树
|
||||
countryName(val) {
|
||||
this.$refs.tree.filter(val);
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getCountryList();
|
||||
},
|
||||
methods: {
|
||||
handleStatusChange(row) {
|
||||
let text = row.status === "0" ? "启用" : "停用";
|
||||
this.$modal.confirm('确认要"' + text + '不计算时效吗?').then(function() {
|
||||
//改变线路的启用状态
|
||||
return changeCalcStatus(row.id, row.status);
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess(text + "成功");
|
||||
}).catch(function() {
|
||||
row.status = row.status === "0" ? "1" : "0";
|
||||
});
|
||||
},
|
||||
/** 查询不计时效维护列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
@ -271,6 +351,45 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
getCountryList() {
|
||||
this.loading = true;
|
||||
listEmisCountry(this.queryParams).then(response => {
|
||||
this.loading = false;
|
||||
this.countryTree = [];
|
||||
this.countryIdsOptions = [];
|
||||
var cTree={"id":"","label":"国家列表","children":[]};
|
||||
cTree.children.push({"id":40,"label":"中国"});
|
||||
this.countryIdsOptions.push({"value":40,"label":"中国"})
|
||||
//var lastContinentId = -1;
|
||||
response.rows.forEach(item =>{
|
||||
if(item.id != 40){
|
||||
var optItem={value:item.id,label:item.name};
|
||||
this.countryIdsOptions.push(optItem)
|
||||
|
||||
var treeItem={"id":item.id,"label":item.name};
|
||||
cTree.children.push(treeItem);
|
||||
}
|
||||
//lastContinentId = item.id;
|
||||
});
|
||||
this.queryParams.countryId = this.currentCountryId;
|
||||
this.countryTree.push(cTree);
|
||||
//this.getAreaList();
|
||||
});
|
||||
},
|
||||
// 筛选节点
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.label.indexOf(value) !== -1;
|
||||
},
|
||||
// 节点单击事件
|
||||
handleNodeClick(data) {
|
||||
if(data.label=="国家列表"){
|
||||
this.queryParams.country = null;
|
||||
}else{
|
||||
this.queryParams.country = data.label;
|
||||
}
|
||||
this.handleQuery();
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user