|
|
@@ -1,78 +1,28 @@
|
|
|
<template>
|
|
|
<!--布局容器-->
|
|
|
<div class="container" style="width: 99%; margin-top: 0px">
|
|
|
- <!-- 顶部查询 -->
|
|
|
- <el-row class="top">
|
|
|
- <el-form v-model="queryFrom" label-width="95px" class="form">
|
|
|
- <el-row>
|
|
|
- <el-col :span="7">
|
|
|
- <el-form-item label="导入日期:">
|
|
|
- <el-date-picker
|
|
|
- style="width:20vw"
|
|
|
- v-model="queryFrom.importTime"
|
|
|
- size="small"
|
|
|
- type="datetimerange"
|
|
|
- range-separator="至"
|
|
|
- start-placeholder="起导入日期"
|
|
|
- end-placeholder="止导入日期"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- ></el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="4">
|
|
|
- <el-form-item label=" " prop="importStatus">
|
|
|
- <el-radio-group v-model="queryFrom.importStatus" style="width:165px">
|
|
|
- <el-radio :label="1">已导入</el-radio>
|
|
|
- <el-radio :label="0">未导入</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- <!-- <el-checkbox-group v-model="queryFrom.importStatus">
|
|
|
- <el-checkbox label="已导入">已导入</el-checkbox>
|
|
|
- <el-checkbox label="未导入">未导入</el-checkbox>
|
|
|
- </el-checkbox-group>-->
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label-width="95px">
|
|
|
- <el-button type="primary" size="small">模板下载</el-button>
|
|
|
- <el-button type="primary" size="small" @click="importFun">excel导入</el-button>
|
|
|
- <el-button type="primary" size="small" @click="queryStaffInfo">查询</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
- </el-row>
|
|
|
-
|
|
|
- <!-- 表格 -->
|
|
|
- <el-table
|
|
|
- size="small"
|
|
|
+ <templateTable
|
|
|
+ :formList="formList"
|
|
|
+ :searchData.sync="searchData"
|
|
|
+ :tableConfig="tableConfig"
|
|
|
+ :btnGroup="btnGroup"
|
|
|
:data="tableData"
|
|
|
- height="590"
|
|
|
- border
|
|
|
- v-loading="loading"
|
|
|
- highlight-current-row
|
|
|
- stripe
|
|
|
- ref="expandTable"
|
|
|
- :header-cell-style="{ background: '#F2F7FC', fontWeight: '700', color: '#606266' }"
|
|
|
+ @getList="getList"
|
|
|
+ @handleSearchList="handleSearchList"
|
|
|
+ :pagination="queryFrom"
|
|
|
>
|
|
|
- <el-table-column prop="id" label="批次号" align="center">
|
|
|
+ <el-table-column slot="id" label="批次号" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<span class="batchStyle" @click="redirectDetail(scope.row)">{{ scope.row.id }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="insCompanyName" label="保险公司" align="center"></el-table-column>
|
|
|
- <el-table-column prop="mlifta" label="交强险保费" align="center"></el-table-column>
|
|
|
- <el-table-column prop="vavt" label="车船税" align="center"></el-table-column>
|
|
|
- <el-table-column prop="other" label="其他保费" align="center"></el-table-column>
|
|
|
- <el-table-column prop="inventoryQuantity" label="清单数量" align="center"></el-table-column>
|
|
|
- <el-table-column prop="createTime" label="导入日期" align="center"></el-table-column>
|
|
|
- <el-table-column prop="createBy" label="操作人" align="center" width="80" ></el-table-column>
|
|
|
- <el-table-column prop="importStatus" label="导入状态" align="center" width="80">
|
|
|
+ <el-table-column slot="importStatus" label="导入状态" align="center" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.importStatus == 1" style="color: green;">成功</span>
|
|
|
<span v-if="scope.row.importStatus == 0" style="color: red;">失败</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="错误信息" label="错误信息" align="center">
|
|
|
+ <el-table-column slot="error" label="错误信息" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<el-popover
|
|
|
placement="bottom"
|
|
|
@@ -85,9 +35,9 @@
|
|
|
</el-popover>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" align="center" min-width="100">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button
|
|
|
+
|
|
|
+ <template slot="operate" slot-scope="scope">
|
|
|
+ <el-button
|
|
|
v-if="scope.row.importStatus == 1"
|
|
|
size="mini"
|
|
|
type="primary"
|
|
|
@@ -118,24 +68,8 @@
|
|
|
>重新导入</el-button>
|
|
|
</el-upload>
|
|
|
</div>
|
|
|
-
|
|
|
- <!-- <el-button v-if="scope.row.importStatus == 0" size="mini" type="primary"
|
|
|
- @click="reImportFun(scope.row)">重新导入</el-button>-->
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <!-- 分页功能 -->
|
|
|
- <div class="block">
|
|
|
- <el-pagination
|
|
|
- @size-change="tablePageChange"
|
|
|
- @current-change="tableCurrentChange"
|
|
|
- :current-page="queryFrom.pageNum"
|
|
|
- :page-size="queryFrom.pageSize"
|
|
|
- :page-sizes="[20, 30, 50, 100]"
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
- :total="queryFrom.totalSize"
|
|
|
- ></el-pagination>
|
|
|
- </div>
|
|
|
+ </template>
|
|
|
+ </templateTable>
|
|
|
<el-dialog
|
|
|
v-dialogDrag
|
|
|
title="修改"
|
|
|
@@ -308,10 +242,14 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import batchDialog from './components/batchDialog.vue'
|
|
|
+import templateTable from '../../../components/TemplateTable/index.vue'
|
|
|
+import { mapState } from 'vuex'
|
|
|
+
|
|
|
export default {
|
|
|
name: "baosi",
|
|
|
- components: { batchDialog },
|
|
|
+ components: { batchDialog,templateTable },
|
|
|
created() {
|
|
|
+ console.log(this.perms,1111111111)
|
|
|
this.$api.cost.gainTopList().then(res => {
|
|
|
if (res.data) {
|
|
|
this.InsCompanyList = res.data;
|
|
|
@@ -319,21 +257,99 @@ export default {
|
|
|
});
|
|
|
this.getList();
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapState({
|
|
|
+ perms: state =>state.user.perms
|
|
|
+ })
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
+ formList:[
|
|
|
+ {
|
|
|
+ label: "导入日期:",
|
|
|
+ prop: "importTime",
|
|
|
+ type: "datePicker",
|
|
|
+ dateType:'daterange'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: " ",
|
|
|
+ prop: "importStatus",
|
|
|
+ type: "radio",
|
|
|
+ radioList:[
|
|
|
+ {
|
|
|
+ value: "1",
|
|
|
+ label: "已导入",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "0",
|
|
|
+ label: "未导入",
|
|
|
+ },
|
|
|
+
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ searchData:{},
|
|
|
+ tableConfig:{
|
|
|
+ columns:[
|
|
|
+ {
|
|
|
+ type:'slot',
|
|
|
+ name:'id',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop:'insCompanyName',label:'保险公司',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop:'mlifta',label:'交强险保费',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop:'vavt',label:'车船税',
|
|
|
+ }, {
|
|
|
+ prop:'other',label:'其他保费',
|
|
|
+ },{
|
|
|
+ prop:'inventoryQuantity',label:'清单数量',
|
|
|
+ },{
|
|
|
+ prop:'createTime',label:'导入日期',
|
|
|
+ },{
|
|
|
+ prop:'createBy',label:'操作人',
|
|
|
+ },{
|
|
|
+ type:'slot',
|
|
|
+ name:'importStatus',
|
|
|
+ },{
|
|
|
+ type:'slot',
|
|
|
+ name:'error',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ loading:true,
|
|
|
+ operateShow:true,
|
|
|
+ isPaginationShow:true
|
|
|
+ // optBtns:[
|
|
|
+ // {
|
|
|
+ // type:'primary',
|
|
|
+ // label:'修改',
|
|
|
+ // hide:(row) => {
|
|
|
+ // return row.importStatus == 1?true:false
|
|
|
+ // },
|
|
|
+ // click:(row, index) => {return this.modifyFun(row)},
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ },
|
|
|
+ btnGroup:[{
|
|
|
+ name:'模板下载',
|
|
|
+ click: "changs",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name:'excel导入',
|
|
|
+ click: () => {return this.importFun()}
|
|
|
+ }],
|
|
|
InsCompanyList: [],
|
|
|
queryFrom: {
|
|
|
- importTime: "",
|
|
|
- importStartTime: "",
|
|
|
- importEndTime: "",
|
|
|
- importStatus: "",
|
|
|
pageNum: 1,
|
|
|
- pageSize: 20,
|
|
|
+ pageSize: 10,
|
|
|
totalSize: 0
|
|
|
},
|
|
|
queryBatchFrom: {
|
|
|
pageNum: 1,
|
|
|
- pageSize: 20,
|
|
|
+ pageSize: 10,
|
|
|
totalSize: 0
|
|
|
},
|
|
|
batchNum: 0,
|
|
|
@@ -399,6 +415,23 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ changs(index){
|
|
|
+ console.log(index,1111111)
|
|
|
+ },
|
|
|
+ handleSearchList(data){
|
|
|
+ if (
|
|
|
+ data.importTime == undefined ||
|
|
|
+ data.importTime == null ||
|
|
|
+ data.importTime == ""
|
|
|
+ ) {
|
|
|
+ (data.importStartTime = ""),
|
|
|
+ (data.importEndTime = "");
|
|
|
+ } else {
|
|
|
+ data.importStartTime = data.importTime[0];
|
|
|
+ data.importEndTime =data.importTime[1];
|
|
|
+ }
|
|
|
+ this.getList(data)
|
|
|
+ },
|
|
|
// 查询
|
|
|
queryStaffInfo() {
|
|
|
if (
|
|
|
@@ -415,17 +448,18 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
//列表数据
|
|
|
- getList() {
|
|
|
- this.loading = true;
|
|
|
- this.$api.cost.getQueryPage({ ...this.queryFrom, flag: 1 }).then(res => {
|
|
|
+ getList(data) {
|
|
|
+ this.tableConfig.loading = true;
|
|
|
+ this.$api.cost.getQueryPage({ ...data,...this.queryFrom, flag: 1 }).then(res => {
|
|
|
if (res.data) {
|
|
|
this.tableData = res.data.content;
|
|
|
this.queryFrom.pageNum = res.data.pageNum;
|
|
|
this.queryFrom.pageSize = res.data.pageSize;
|
|
|
this.queryFrom.totalSize = res.data.totalSize;
|
|
|
- this.loading = false;
|
|
|
+ this.tableConfig.loading = false;
|
|
|
+
|
|
|
} else {
|
|
|
- this.loading = false;
|
|
|
+ this.tableConfig.loading = false;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
@@ -523,10 +557,6 @@ export default {
|
|
|
handleTableDetail() {
|
|
|
this.dialogBVatchVisible = true;
|
|
|
},
|
|
|
- // 选中保险公司
|
|
|
- InsCompanychange(e) {
|
|
|
- console.log(e);
|
|
|
- },
|
|
|
importFun() {
|
|
|
this.dialogImport = true;
|
|
|
this.InsCompany = "";
|