|
|
@ -1,311 +1,191 @@ |
|
|
|
<!--计划管理信息页--> |
|
|
|
<template> |
|
|
|
<div class="cr-body-content"> |
|
|
|
<div ref="box"> |
|
|
|
<flexbox class="content-header" id="planControl-content-header"> |
|
|
|
<el-form |
|
|
|
:model="listQuery" |
|
|
|
ref="searchForm" |
|
|
|
v-show="showSearch" |
|
|
|
:inline="true"> |
|
|
|
<div ref="box"> |
|
|
|
<flexbox class="content-header" id="planControl-content-header"> |
|
|
|
<el-form :model="listQuery" ref="searchForm" v-show="showSearch" :inline="true"> |
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="底盘号" prop="vin" > |
|
|
|
<el-input |
|
|
|
v-model="listQuery.vin" |
|
|
|
clearable |
|
|
|
size="small" |
|
|
|
style="width: 120px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="底盘号" prop="vin"> |
|
|
|
<el-input v-model="listQuery.vin" clearable size="small" style="width: 120px" /> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="车型代码" prop="vehicleModelCode" > |
|
|
|
<el-input |
|
|
|
v-model="listQuery.vehicleModelCode" |
|
|
|
clearable |
|
|
|
size="small" |
|
|
|
style="width: 120px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="车型代码" prop="vehicleModelCode"> |
|
|
|
<el-input v-model="listQuery.vehicleModelCode" clearable size="small" style="width: 120px" /> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="车型名称" prop="vehicleModelName"> |
|
|
|
<el-input v-model="listQuery.vehicleModelName" clearable size="small" style="width: 120px" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="车型名称" prop="vehicleModelName"> |
|
|
|
<el-input v-model="listQuery.vehicleModelName" clearable size="small" style="width: 120px" /> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="涂装下线时间" prop="paintOfflineTimeBegin"> |
|
|
|
<el-date-picker |
|
|
|
v-model="listQuery.paintOfflineTimeBegin" |
|
|
|
size="small" |
|
|
|
style="width: 200px" |
|
|
|
type="datetime" |
|
|
|
></el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="-" prop="paintOfflineTimeEnd"> |
|
|
|
<el-date-picker |
|
|
|
v-model="listQuery.paintOfflineTimeEnd" |
|
|
|
size="small" |
|
|
|
style="width: 200px" |
|
|
|
type="datetime" |
|
|
|
></el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="涂装下线时间" prop="paintOfflineTimeBegin"> |
|
|
|
<el-date-picker v-model="listQuery.paintOfflineTimeBegin" size="small" style="width: 200px" type="datetime"></el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="-" prop="paintOfflineTimeEnd"> |
|
|
|
<el-date-picker v-model="listQuery.paintOfflineTimeEnd" size="small" style="width: 200px" type="datetime"></el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="总装上线时间" prop="onlineTimeBegin"> |
|
|
|
<el-date-picker |
|
|
|
v-model="listQuery.onlineTimeBegin" |
|
|
|
size="small" |
|
|
|
style="width: 200px" |
|
|
|
type="datetime" |
|
|
|
></el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="-" prop="onlineTimeEnd"> |
|
|
|
<el-date-picker |
|
|
|
v-model="listQuery.onlineTimeEnd" |
|
|
|
size="small" |
|
|
|
style="width: 200px" |
|
|
|
type="datetime" |
|
|
|
></el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="总装上线时间" prop="onlineTimeBegin"> |
|
|
|
<el-date-picker v-model="listQuery.onlineTimeBegin" size="small" style="width: 200px" type="datetime"></el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="-" prop="onlineTimeEnd"> |
|
|
|
<el-date-picker v-model="listQuery.onlineTimeEnd" size="small" style="width: 200px" type="datetime"></el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="序列号" prop="serialNumBegin"> |
|
|
|
<el-input |
|
|
|
v-model="listQuery.serialNumBegin" |
|
|
|
clearable |
|
|
|
size="small" |
|
|
|
style="width: 120px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="-" prop="serialNumEnd"> |
|
|
|
<el-input |
|
|
|
v-model="listQuery.serialNumEnd" |
|
|
|
clearable |
|
|
|
size="small" |
|
|
|
style="width: 120px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="序列号" prop="serialNumBegin"> |
|
|
|
<el-input v-model="listQuery.serialNumBegin" clearable size="small" style="width: 120px" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="-" prop="serialNumEnd"> |
|
|
|
<el-input v-model="listQuery.serialNumEnd" clearable size="small" style="width: 120px" /> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="物流配货顺序号" prop="hostSNBegin"> |
|
|
|
<el-input |
|
|
|
v-model="listQuery.hostSNBegin" |
|
|
|
clearable |
|
|
|
size="small" |
|
|
|
style="width: 120px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="-" prop="hostSNEnd"> |
|
|
|
<el-input |
|
|
|
v-model="listQuery.hostSNEnd" |
|
|
|
clearable |
|
|
|
size="small" |
|
|
|
style="width: 120px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="物流配货顺序号" prop="hostSNBegin"> |
|
|
|
<el-input v-model="listQuery.hostSNBegin" clearable size="small" style="width: 120px" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="-" prop="hostSNEnd"> |
|
|
|
<el-input v-model="listQuery.hostSNEnd" clearable size="small" style="width: 120px" /> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="创建时间" prop="createTimeBegin"> |
|
|
|
<el-date-picker |
|
|
|
v-model="listQuery.createTimeBegin" |
|
|
|
size="small" |
|
|
|
style="width: 200px" |
|
|
|
type="datetime" |
|
|
|
></el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="-" prop="createTimeEnd"> |
|
|
|
<el-date-picker |
|
|
|
v-model="listQuery.createTimeEnd" |
|
|
|
size="small" |
|
|
|
style="width: 200px" |
|
|
|
type="datetime" |
|
|
|
></el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="创建时间" prop="createTimeBegin"> |
|
|
|
<el-date-picker v-model="listQuery.createTimeBegin" size="small" style="width: 200px" type="datetime"></el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="-" prop="createTimeEnd"> |
|
|
|
<el-date-picker v-model="listQuery.createTimeEnd" size="small" style="width: 200px" type="datetime"></el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="导入时间" prop="importTimeBegin"> |
|
|
|
<el-date-picker |
|
|
|
v-model="listQuery.importTimeBegin" |
|
|
|
size="small" |
|
|
|
style="width: 200px" |
|
|
|
type="datetime" |
|
|
|
></el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="-" prop="importTimeEnd"> |
|
|
|
<el-date-picker |
|
|
|
v-model="listQuery.importTimeEnd" |
|
|
|
size="small" |
|
|
|
style="width: 200px" |
|
|
|
type="datetime" |
|
|
|
></el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="导入时间" prop="importTimeBegin"> |
|
|
|
<el-date-picker v-model="listQuery.importTimeBegin" size="small" style="width: 200px" type="datetime"></el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="-" prop="importTimeEnd"> |
|
|
|
<el-date-picker v-model="listQuery.importTimeEnd" size="small" style="width: 200px" type="datetime"></el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item> |
|
|
|
<el-button |
|
|
|
type="primary" |
|
|
|
icon="el-icon-search" |
|
|
|
size="mini" |
|
|
|
@click="handleFilter" |
|
|
|
>搜索</el-button |
|
|
|
> |
|
|
|
<el-button |
|
|
|
icon="el-icon-refresh" |
|
|
|
size="mini" |
|
|
|
@click="resetQuery('searchForm')" |
|
|
|
>重置</el-button |
|
|
|
> |
|
|
|
<el-button |
|
|
|
type="warning" |
|
|
|
plain |
|
|
|
icon="el-icon-download" |
|
|
|
size="mini" |
|
|
|
style="margin-left: 15px" |
|
|
|
@click="handleDownload()" |
|
|
|
>导出(Excel)查询信息 |
|
|
|
</el-button> |
|
|
|
<el-button |
|
|
|
class="filter-item" |
|
|
|
size="mini" |
|
|
|
type="success" |
|
|
|
icon="el-icon-plus" |
|
|
|
@click="handleImport" |
|
|
|
>导入 |
|
|
|
</el-button> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<div class="tipper" v-if="tipper != ''" v-html="tipper"></div> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</flexbox> |
|
|
|
</div> |
|
|
|
<div class="l-table"> |
|
|
|
<!--表格渲染--> |
|
|
|
<el-table |
|
|
|
ref="multipleTable" |
|
|
|
v-loading="listLoading" |
|
|
|
element-loading-text="拼命加载中..." |
|
|
|
element-loading-spinner="el-icon-loading" |
|
|
|
class="cr-table" |
|
|
|
:data="list" |
|
|
|
:height="tableHeight" |
|
|
|
size="small" |
|
|
|
stripe |
|
|
|
border |
|
|
|
highlight-current-row |
|
|
|
style="width: 100%" |
|
|
|
@sort-change="sortChange" |
|
|
|
@selection-change="handleSelectionChange" |
|
|
|
@row-click="handleRowClick" |
|
|
|
> |
|
|
|
<el-table-column |
|
|
|
v-for="(item, index) in getDefaultField" |
|
|
|
:key="index" |
|
|
|
:prop="item.prop" |
|
|
|
:label="item.label" |
|
|
|
:min-width="item.width" |
|
|
|
:formatter="fieldFormatter" |
|
|
|
sortable="custom" |
|
|
|
:gutter="0" |
|
|
|
> |
|
|
|
<template slot="header" slot-scope="scope"> |
|
|
|
{{ scope.column.label }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<!-- show-overflow-tooltip --> |
|
|
|
<el-form-item> |
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleFilter">搜索</el-button> |
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery('searchForm')">重置</el-button> |
|
|
|
<el-button type="warning" plain icon="el-icon-download" size="mini" style="margin-left: 15px" @click="handleDownload()">导出(Excel)查询信息 |
|
|
|
</el-button> |
|
|
|
<el-button class="filter-item" size="mini" type="success" icon="el-icon-plus" @click="handleImport">导入 |
|
|
|
</el-button> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<div class="tipper" v-if="tipper != ''" v-html="tipper"></div> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</flexbox> |
|
|
|
</div> |
|
|
|
<div class="l-table"> |
|
|
|
<!--表格渲染--> |
|
|
|
<el-table ref="multipleTable" v-loading="listLoading" element-loading-text="拼命加载中..." element-loading-spinner="el-icon-loading" |
|
|
|
class="cr-table" :data="list" :height="tableHeight" size="small" stripe border highlight-current-row style="width: 100%" |
|
|
|
@sort-change="sortChange" @selection-change="handleSelectionChange" @row-click="handleRowClick"> |
|
|
|
<el-table-column v-for="(item, index) in getDefaultField" :key="index" :prop="item.prop" :label="item.label" |
|
|
|
:min-width="item.width" :formatter="fieldFormatter" sortable="custom" :gutter="0"> |
|
|
|
<template slot="header" slot-scope="scope"> |
|
|
|
{{ scope.column.label }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<!-- show-overflow-tooltip --> |
|
|
|
|
|
|
|
<div class="table-footer"> |
|
|
|
<!-- 分页控件 style="margin-top: -25px;margin-bottom:-25px;float:right;"--> |
|
|
|
<pagination |
|
|
|
v-show="totalCount > 0" |
|
|
|
:total="totalCount" |
|
|
|
:page.sync="page" |
|
|
|
:limit.sync="listQuery.MaxResultCount" |
|
|
|
@pagination="getList" |
|
|
|
/> |
|
|
|
<!-- 导入Excel组件 --> |
|
|
|
<importExcel |
|
|
|
ref="importexcel" |
|
|
|
:show="showExcelImport" |
|
|
|
:importURL="importExcelURL" |
|
|
|
@close="importClose" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div class="table-footer"> |
|
|
|
<!-- 分页控件 style="margin-top: -25px;margin-bottom:-25px;float:right;"--> |
|
|
|
<pagination v-show="totalCount > 0" :total="totalCount" :page.sync="page" :limit.sync="listQuery.MaxResultCount" |
|
|
|
@pagination="getList" /> |
|
|
|
<!-- 导入Excel组件 --> |
|
|
|
<importExcel ref="importexcel" :show="showExcelImport" :importURL="importExcelURL" @close="importClose" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import Pagination from "@/components/Pagination"; |
|
|
|
import permission from "@/directive/permission/index.js"; |
|
|
|
import CRMTableHead from "../../components/CRMTableHead"; |
|
|
|
import importExcel from "@/components/ImportExcel-normal"; |
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
import Lockr from "lockr"; |
|
|
|
import moment from "moment"; |
|
|
|
import message_table from "../../components/mixins/message_table"; |
|
|
|
import { downloadFile } from "@/utils/crmindex.js"; |
|
|
|
<script> |
|
|
|
import Pagination from "@/components/Pagination"; |
|
|
|
import permission from "@/directive/permission/index.js"; |
|
|
|
import CRMTableHead from "../../components/CRMTableHead"; |
|
|
|
import importExcel from "@/components/ImportExcel-normal"; |
|
|
|
import { |
|
|
|
mapGetters |
|
|
|
} from "vuex"; |
|
|
|
import Lockr from "lockr"; |
|
|
|
import moment from "moment"; |
|
|
|
import message_table from "../../components/mixins/message_table"; |
|
|
|
import { |
|
|
|
downloadFile |
|
|
|
} from "@/utils/crmindex.js"; |
|
|
|
|
|
|
|
//组件计量单位 |
|
|
|
// const bomUnit = [ |
|
|
|
//组件计量单位 |
|
|
|
// const bomUnit = [ |
|
|
|
// { key: 0, display_name: "PC" }, |
|
|
|
// { key: 1, display_name: "TON" }, |
|
|
|
// { key: 2, display_name: "Other" }, |
|
|
|
// ]; |
|
|
|
// const projectTypeKeyValue = bomUnit.reduce((acc, cur) => { |
|
|
|
// ]; |
|
|
|
// const projectTypeKeyValue = bomUnit.reduce((acc, cur) => { |
|
|
|
// acc[cur.key] = cur.display_name; |
|
|
|
// return acc; |
|
|
|
// }, {}); |
|
|
|
// }, {}); |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "RepeatM100", |
|
|
|
components: { Pagination, CRMTableHead, importExcel }, |
|
|
|
directives: { permission }, |
|
|
|
mixins: [message_table], |
|
|
|
data() { |
|
|
|
return { |
|
|
|
importExcelURL:'/api/newjit/import-note/import', |
|
|
|
tipper:"", |
|
|
|
showExcelImport: false, |
|
|
|
form: {}, |
|
|
|
list: null, |
|
|
|
totalCount: 0, |
|
|
|
listLoading: true, |
|
|
|
listQuery: { |
|
|
|
factory:undefined, |
|
|
|
vin:undefined, |
|
|
|
vehicleModelCode:undefined, |
|
|
|
paintOfflineTimeBegin:undefined, |
|
|
|
paintOfflineTimeEnd:undefined, |
|
|
|
onlineTimeBegin:undefined, |
|
|
|
onlineTimeEnd:undefined, |
|
|
|
serialNumBegin:undefined, |
|
|
|
serialNumEnd:undefined, |
|
|
|
hostSNBegin:undefined, |
|
|
|
hostSNEnd:undefined, |
|
|
|
productLine:undefined, |
|
|
|
createTimeBegin:undefined, |
|
|
|
createTimeEnd:undefined, |
|
|
|
importTimeBegin:undefined, |
|
|
|
importTimeEnd:undefined, |
|
|
|
SkipCount: 0, |
|
|
|
MaxResultCount: 15, |
|
|
|
export default { |
|
|
|
name: "RepeatM100", |
|
|
|
components: { |
|
|
|
Pagination, |
|
|
|
CRMTableHead, |
|
|
|
importExcel |
|
|
|
}, |
|
|
|
page: 1, |
|
|
|
showSearch: true, |
|
|
|
//bomUnit, |
|
|
|
multipleSelection: [], |
|
|
|
tableHeight: document.documentElement.clientHeight - 260, |
|
|
|
}; |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.getTipper(); |
|
|
|
let timer = setInterval(() => { |
|
|
|
directives: { |
|
|
|
permission |
|
|
|
}, |
|
|
|
mixins: [message_table], |
|
|
|
data() { |
|
|
|
return { |
|
|
|
importExcelURL: '/api/newjit/import-note/import', |
|
|
|
tipper: "", |
|
|
|
showExcelImport: false, |
|
|
|
form: {}, |
|
|
|
list: null, |
|
|
|
totalCount: 0, |
|
|
|
listLoading: true, |
|
|
|
listQuery: { |
|
|
|
factory: undefined, |
|
|
|
vin: undefined, |
|
|
|
vehicleModelCode: undefined, |
|
|
|
paintOfflineTimeBegin: undefined, |
|
|
|
paintOfflineTimeEnd: undefined, |
|
|
|
onlineTimeBegin: undefined, |
|
|
|
onlineTimeEnd: undefined, |
|
|
|
serialNumBegin: undefined, |
|
|
|
serialNumEnd: undefined, |
|
|
|
hostSNBegin: undefined, |
|
|
|
hostSNEnd: undefined, |
|
|
|
productLine: undefined, |
|
|
|
createTimeBegin: undefined, |
|
|
|
createTimeEnd: undefined, |
|
|
|
importTimeBegin: undefined, |
|
|
|
importTimeEnd: undefined, |
|
|
|
SkipCount: 0, |
|
|
|
MaxResultCount: 15, |
|
|
|
}, |
|
|
|
page: 1, |
|
|
|
showSearch: true, |
|
|
|
//bomUnit, |
|
|
|
multipleSelection: [], |
|
|
|
tableHeight: document.documentElement.clientHeight - 260, |
|
|
|
}; |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.getTipper(); |
|
|
|
}, 60000); |
|
|
|
// var offsetHei = document.documentElement.clientHeight; |
|
|
|
// let boxH = this.$refs.box.offsetHeight; |
|
|
|
// this.tableHeight = offsetHei - boxH - 57 - 79;//57为footer高度,79为页面上部标签高度 |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getList(); |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
getDefaultField() { |
|
|
|
let timer = setInterval(() => { |
|
|
|
this.getTipper(); |
|
|
|
}, 60000); |
|
|
|
// var offsetHei = document.documentElement.clientHeight; |
|
|
|
// let boxH = this.$refs.box.offsetHeight; |
|
|
|
// this.tableHeight = offsetHei - boxH - 57 - 79;//57为footer高度,79为页面上部标签高度 |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getList(); |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
getDefaultField() { |
|
|
|
var tempsTabs = [{ |
|
|
|
label: "底盘号", |
|
|
|
prop: "vin", |
|
|
@ -402,213 +282,215 @@ |
|
|
|
width: 120 |
|
|
|
}, |
|
|
|
]; |
|
|
|
return tempsTabs; |
|
|
|
}, |
|
|
|
...mapGetters(["userInfo"]), //获取当前用户信息 |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
/** 导出功能 */ |
|
|
|
handleDownload() { |
|
|
|
this.listLoading = true; |
|
|
|
console.log("计划管理导出条件:" + JSON.stringify(this.listQuery)); |
|
|
|
this.$axios |
|
|
|
.posts("/api/newjit/import-note/export", this.listQuery) |
|
|
|
.then((res) => { |
|
|
|
let filename = res.item; |
|
|
|
this.$axios |
|
|
|
.BolbGets("/api/newjit/exclude-part-cfg/download/" + filename) |
|
|
|
.then((response) => { |
|
|
|
if (filename.indexOf("_") != -1) { |
|
|
|
let downName = |
|
|
|
filename.slice(0, filename.lastIndexOf("_")) + |
|
|
|
filename.slice(filename.lastIndexOf(".")); |
|
|
|
downloadFile(response, downName); |
|
|
|
this.$notify({ |
|
|
|
title: "成功", |
|
|
|
message: "数据-导出成功!", |
|
|
|
type: "success", |
|
|
|
duration: 2000, |
|
|
|
}); |
|
|
|
} else { |
|
|
|
downloadFile(response, filename); |
|
|
|
this.$notify({ |
|
|
|
title: "成功", |
|
|
|
message: "数据-导出成功!", |
|
|
|
type: "success", |
|
|
|
duration: 2000, |
|
|
|
}); |
|
|
|
} |
|
|
|
this.listLoading = false; |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.listLoading = false; |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
/** 重置按钮操作 */ |
|
|
|
resetQuery(refName) { |
|
|
|
this.$refs[refName].resetFields(); |
|
|
|
this.handleQuery(); |
|
|
|
}, |
|
|
|
/** 搜索按钮操作 */ |
|
|
|
handleQuery() { |
|
|
|
this.listQuery.SkipCount = 1; |
|
|
|
this.getList(); |
|
|
|
}, |
|
|
|
//关闭导入窗体时调用 |
|
|
|
importClose() { |
|
|
|
this.showExcelImport = false; |
|
|
|
}, |
|
|
|
// 导入后回调 |
|
|
|
importNormalCallback(res,fileuploadList){ |
|
|
|
// 导入功能,第一次调用时 ret.Status = true 并且 ret.Message 不为空时, 弹出确认对话框,显示ret.Message, |
|
|
|
// 如果选择是, 调用api/newjit/import-note/import,并且第二个参数forceExecute 传入true,选择否关闭 |
|
|
|
if(res.status && res.message && res.message.length > 0){ |
|
|
|
this.$confirm(`${res.message}, 是否确定继续导入`, '提示', { |
|
|
|
confirmButtonText: '继续导入', |
|
|
|
cancelButtonText: '取消导入', |
|
|
|
type: 'warning' |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
this.listLoading = true |
|
|
|
let fd = new FormData(); |
|
|
|
fileuploadList.forEach((file) => { |
|
|
|
fd.append("files", file); // 添加文件 |
|
|
|
}); |
|
|
|
fd.append("forceExecute", true); |
|
|
|
this.$axios.posts(this.importExcelURL, fd) |
|
|
|
.then(async (res) => { |
|
|
|
this.listLoading = false |
|
|
|
this.$message({ |
|
|
|
message: "导入成功!", |
|
|
|
type: "success", |
|
|
|
return tempsTabs; |
|
|
|
}, |
|
|
|
...mapGetters(["userInfo"]), //获取当前用户信息 |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
/** 导出功能 */ |
|
|
|
handleDownload() { |
|
|
|
this.listLoading = true; |
|
|
|
console.log("计划管理导出条件:" + JSON.stringify(this.listQuery)); |
|
|
|
this.$axios |
|
|
|
.posts("/api/newjit/import-note/export", this.listQuery) |
|
|
|
.then((res) => { |
|
|
|
let filename = res.item; |
|
|
|
this.$axios |
|
|
|
.BolbGets("/api/newjit/exclude-part-cfg/download/" + filename) |
|
|
|
.then((response) => { |
|
|
|
if (filename.indexOf("_") != -1) { |
|
|
|
let downName = |
|
|
|
filename.slice(0, filename.lastIndexOf("_")) + |
|
|
|
filename.slice(filename.lastIndexOf(".")); |
|
|
|
downloadFile(response, downName); |
|
|
|
this.$notify({ |
|
|
|
title: "成功", |
|
|
|
message: "数据-导出成功!", |
|
|
|
type: "success", |
|
|
|
duration: 2000, |
|
|
|
}); |
|
|
|
} else { |
|
|
|
downloadFile(response, filename); |
|
|
|
this.$notify({ |
|
|
|
title: "成功", |
|
|
|
message: "数据-导出成功!", |
|
|
|
type: "success", |
|
|
|
duration: 2000, |
|
|
|
}); |
|
|
|
} |
|
|
|
this.listLoading = false; |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.listLoading = false; |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
/** 重置按钮操作 */ |
|
|
|
resetQuery(refName) { |
|
|
|
this.$refs[refName].resetFields(); |
|
|
|
this.handleQuery(); |
|
|
|
}, |
|
|
|
/** 搜索按钮操作 */ |
|
|
|
handleQuery() { |
|
|
|
this.listQuery.SkipCount = 1; |
|
|
|
this.getList(); |
|
|
|
}, |
|
|
|
//关闭导入窗体时调用 |
|
|
|
importClose() { |
|
|
|
this.showExcelImport = false; |
|
|
|
}, |
|
|
|
// 导入后回调 |
|
|
|
importNormalCallback(res, fileuploadList) { |
|
|
|
// 导入功能,第一次调用时 ret.Status = true 并且 ret.Message 不为空时, 弹出确认对话框,显示ret.Message, |
|
|
|
// 如果选择是, 调用api/newjit/import-note/import,并且第二个参数forceExecute 传入true,选择否关闭 |
|
|
|
if (res.status && res.message && res.message.length > 0) { |
|
|
|
this.$confirm(`${res.message}, 是否确定继续导入`, '提示', { |
|
|
|
confirmButtonText: '继续导入', |
|
|
|
cancelButtonText: '取消导入', |
|
|
|
type: 'warning' |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
this.listLoading = true |
|
|
|
let fd = new FormData(); |
|
|
|
fileuploadList.forEach((file) => { |
|
|
|
fd.append("files", file); // 添加文件 |
|
|
|
}); |
|
|
|
fd.append("forceExecute", true); |
|
|
|
this.$axios.posts(this.importExcelURL, fd) |
|
|
|
.then(async (res) => { |
|
|
|
this.listLoading = false |
|
|
|
this.$message({ |
|
|
|
message: "导入成功!", |
|
|
|
type: "success", |
|
|
|
}); |
|
|
|
this.importClose() |
|
|
|
this.getList(); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.listLoading = false |
|
|
|
this.$message({ |
|
|
|
message: res.message, |
|
|
|
type: "error", |
|
|
|
showClose: true |
|
|
|
}); |
|
|
|
this.importClose() |
|
|
|
this.getList(); |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.importClose() |
|
|
|
this.getList(); |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.importClose() |
|
|
|
this.getList(); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.listLoading = false |
|
|
|
this.$message({ |
|
|
|
message: res.message, |
|
|
|
type: "error", |
|
|
|
showClose:true |
|
|
|
}); |
|
|
|
this.importClose() |
|
|
|
} |
|
|
|
}, |
|
|
|
/** 刷新列表 */ |
|
|
|
handleHandle(data) { |
|
|
|
if (data.type !== "edit") { |
|
|
|
this.getList(); |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.importClose() |
|
|
|
} |
|
|
|
}, |
|
|
|
/** 格式化字段 */ |
|
|
|
fieldFormatter(row, column) { |
|
|
|
return row[column.property] || "--"; |
|
|
|
}, |
|
|
|
getList(data) { |
|
|
|
this.listLoading = true; |
|
|
|
if (data != undefined) { |
|
|
|
this.listQuery.SkipCount = (this.page - 1) * data.limit; |
|
|
|
} else { |
|
|
|
this.listQuery.SkipCount = (this.page - 1) * this.listQuery.MaxResultCount; |
|
|
|
} |
|
|
|
this.$axios.gets("/api/newjit/import-note/list", this.listQuery) |
|
|
|
.then((response) => { |
|
|
|
this.list = response.items; |
|
|
|
this.totalCount = response.totalCount; |
|
|
|
setTimeout(() => { |
|
|
|
//大数据量加载时 |
|
|
|
this.listLoading = false; |
|
|
|
}, 500); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.listLoading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
handleFilter() { |
|
|
|
this.page = 1; |
|
|
|
this.getList(); |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
this.importClose() |
|
|
|
this.getList(); |
|
|
|
} |
|
|
|
}, |
|
|
|
/** 刷新列表 */ |
|
|
|
handleHandle(data) { |
|
|
|
if (data.type !== "edit") { |
|
|
|
this.getList(); |
|
|
|
} |
|
|
|
}, |
|
|
|
/** 格式化字段 */ |
|
|
|
fieldFormatter(row, column) { |
|
|
|
return row[column.property] || "--"; |
|
|
|
}, |
|
|
|
getList(data){ |
|
|
|
this.listLoading = true; |
|
|
|
if (data != undefined) { |
|
|
|
this.listQuery.SkipCount = (this.page - 1) * data.limit; |
|
|
|
} else { |
|
|
|
this.listQuery.SkipCount = (this.page - 1) * this.listQuery.MaxResultCount; |
|
|
|
} |
|
|
|
this.$axios.gets("/api/newjit/import-note/list", this.listQuery) |
|
|
|
.then((response) => { |
|
|
|
this.list = response.items; |
|
|
|
this.totalCount = response.totalCount; |
|
|
|
setTimeout(() => { |
|
|
|
//大数据量加载时 |
|
|
|
this.listLoading = false; |
|
|
|
}, 500); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.listLoading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
handleFilter() { |
|
|
|
this.page = 1; |
|
|
|
this.getList(); |
|
|
|
}, |
|
|
|
sortChange(data) { |
|
|
|
const { prop, order } = data; |
|
|
|
if (!prop || !order) { |
|
|
|
this.listQuery.Sorting = undefined |
|
|
|
this.handleFilter(); |
|
|
|
return; |
|
|
|
} |
|
|
|
this.listQuery.Sorting = prop + " " + order; |
|
|
|
this.handleFilter(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
sortChange(data) { |
|
|
|
const { |
|
|
|
prop, |
|
|
|
order |
|
|
|
} = data; |
|
|
|
if (!prop || !order) { |
|
|
|
this.listQuery.Sorting = undefined |
|
|
|
this.handleFilter(); |
|
|
|
return; |
|
|
|
} |
|
|
|
this.listQuery.Sorting = prop + " " + order; |
|
|
|
this.handleFilter(); |
|
|
|
}, |
|
|
|
|
|
|
|
handleSelectionChange(val) { |
|
|
|
this.multipleSelection = val; |
|
|
|
}, |
|
|
|
handleRowClick(row, column, event) { |
|
|
|
this.$refs.multipleTable.clearSelection(); |
|
|
|
this.$refs.multipleTable.toggleRowSelection(row); |
|
|
|
}, |
|
|
|
handleImport() { |
|
|
|
//导入 |
|
|
|
this.showExcelImport = true; |
|
|
|
}, |
|
|
|
// 更改主表格高度 |
|
|
|
changeMainTableHeight(){ |
|
|
|
this.$nextTick(()=>{ |
|
|
|
var offsetHei = document.documentElement.clientHeight; |
|
|
|
// let boxH = this.$refs.box.offsetHeight; |
|
|
|
let headerH = document.getElementById("planControl-content-header").clientHeight |
|
|
|
let footerH = this.totalCount > 0 ? 67 : 0 //footer高度 |
|
|
|
this.tableHeight = offsetHei - headerH - 67 - 79; //79为页面上部标签高度 |
|
|
|
//this.tableHeight = offsetHei -260 |
|
|
|
}) |
|
|
|
}, |
|
|
|
getTipper(){ |
|
|
|
if(this.$route.name != 'pg-planControl'){ |
|
|
|
return |
|
|
|
} |
|
|
|
this.$axios.posts( "/api/newjit/import-note/print-timeout-remind" ).then((res) => { |
|
|
|
this.tipper = "" |
|
|
|
let _item = "" |
|
|
|
let _style = "" |
|
|
|
if (res.timeoutMinutes >= res.configMinutes) { |
|
|
|
//写提示信息 |
|
|
|
_style = "color:red;font-weight:bold" |
|
|
|
} else { |
|
|
|
_style = "color:green" |
|
|
|
handleSelectionChange(val) { |
|
|
|
this.multipleSelection = val; |
|
|
|
}, |
|
|
|
handleRowClick(row, column, event) { |
|
|
|
this.$refs.multipleTable.clearSelection(); |
|
|
|
this.$refs.multipleTable.toggleRowSelection(row); |
|
|
|
}, |
|
|
|
handleImport() { |
|
|
|
//导入 |
|
|
|
this.showExcelImport = true; |
|
|
|
}, |
|
|
|
// 更改主表格高度 |
|
|
|
changeMainTableHeight() { |
|
|
|
this.$nextTick(() => { |
|
|
|
var offsetHei = document.documentElement.clientHeight; |
|
|
|
// let boxH = this.$refs.box.offsetHeight; |
|
|
|
let headerH = document.getElementById("planControl-content-header").clientHeight |
|
|
|
let footerH = this.totalCount > 0 ? 67 : 0 //footer高度 |
|
|
|
this.tableHeight = offsetHei - headerH - 67 - 79; //79为页面上部标签高度 |
|
|
|
//this.tableHeight = offsetHei -260 |
|
|
|
}) |
|
|
|
}, |
|
|
|
getTipper() { |
|
|
|
if (this.$route.name != 'pg-planControl') { |
|
|
|
return |
|
|
|
} |
|
|
|
this.$axios.posts("/api/newjit/import-note/print-timeout-remind").then((res) => { |
|
|
|
this.tipper = "" |
|
|
|
let _item = "" |
|
|
|
let _style = "" |
|
|
|
if (res.timeoutMinutes >= res.configMinutes) { |
|
|
|
//写提示信息 |
|
|
|
_style = "color:red;font-weight:bold" |
|
|
|
} else { |
|
|
|
_style = "color:green" |
|
|
|
} |
|
|
|
_item = `<span style=${_style}>已经${res.timeoutMinutes}分钟没有导入计划\xa0\xa0\xa0\xa0</span>` |
|
|
|
this.tipper += _item |
|
|
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
this.changeMainTableHeight() |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
_item = `<span style=${_style}>已经${res.timeoutMinutes}分钟没有导入计划\xa0\xa0\xa0\xa0</span>` |
|
|
|
this.tipper += _item |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
this.changeMainTableHeight() |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
@import "../../../pg-fis/styles/crmtable.scss"; |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
@import "../../../pg-fis/styles/crmtable.scss"; |
|
|
|
.tipper{ |
|
|
|
.tipper { |
|
|
|
border: solid 1px #ddd; |
|
|
|
border-radius: 5px; |
|
|
|
display: inline-block; |
|
|
|
padding: 10px; |
|
|
|
line-height: 20px; |
|
|
|
} |
|
|
|
</style> |
|
|
|
|
|
|
|
|
|
|
|
</style> |
|
|
|