Administrator
3 years ago
7 changed files with 1707 additions and 66 deletions
@ -0,0 +1,481 @@ |
|||||
|
<!--系统日志信息页--> |
||||
|
<template> |
||||
|
<div class="cr-body-content"> |
||||
|
<div ref="box"> |
||||
|
<flexbox class="content-header"> |
||||
|
<el-form |
||||
|
:model="listQuery" |
||||
|
ref="queryForm" |
||||
|
v-show="showSearch" |
||||
|
:inline="true" |
||||
|
> |
||||
|
<el-form-item label="日志标题" prop="LogTitle"> |
||||
|
<el-input |
||||
|
v-model="listQuery.LogTitle" |
||||
|
placeholder="请输入日志标题" |
||||
|
clearable |
||||
|
size="small" |
||||
|
style="width: 150px" |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="日志类别" prop="LogType"> |
||||
|
<el-select |
||||
|
v-model="listQuery.LogType" |
||||
|
placeholder="请选择" |
||||
|
style="width: 200px" |
||||
|
> |
||||
|
<el-option label="报文传输异常" :value="1"></el-option> |
||||
|
<el-option label="报文转换异常" :value="2"></el-option> |
||||
|
<el-option label="报文解析、校验异常" :value="3"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="严重程度" prop="SeriousLevel"> |
||||
|
<el-select |
||||
|
v-model="listQuery.SeriousLevel" |
||||
|
placeholder="请选择" |
||||
|
style="width: 200px" |
||||
|
> |
||||
|
<el-option label="轻微" :value="1"></el-option> |
||||
|
<el-option label="一般" :value="2"></el-option> |
||||
|
<el-option label="严重" :value="3"></el-option> |
||||
|
</el-select> |
||||
|
</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('queryForm')" |
||||
|
>重置</el-button |
||||
|
> |
||||
|
<el-button |
||||
|
type="warning" |
||||
|
plain |
||||
|
icon="el-icon-download" |
||||
|
size="mini" |
||||
|
style="margin-left: 15px" |
||||
|
@click="handleDownload()" |
||||
|
>导出(Excel)查询信息 |
||||
|
</el-button> |
||||
|
</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" |
||||
|
:cell-style="cellStyle" |
||||
|
:header-cell-style="headerRowStyle" |
||||
|
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" |
||||
|
show-overflow-tooltip |
||||
|
:gutter="0" |
||||
|
> |
||||
|
<template slot="header" slot-scope="scope"> |
||||
|
{{ scope.column.label }} |
||||
|
</template> |
||||
|
</el-table-column > |
||||
|
<el-table-column |
||||
|
label="操作" |
||||
|
width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button @click="handleEdit(scope.row)" type="primary" size="small">处理</el-button><!-- type="text" --> |
||||
|
<el-button @click="handleIgnore(scope.row)" type="primary" size="small">忽略</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</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" |
||||
|
:crmType="crmType" |
||||
|
@close="importExcelData" |
||||
|
/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import Pagination from "@/components/Pagination"; |
||||
|
import permission from "@/directive/permission/index.js"; |
||||
|
import CRMTableHead from "../../components/CRMTableHead"; |
||||
|
import importExcel from "@/components/ImportExcel-vw"; |
||||
|
import Lockr from "lockr"; |
||||
|
import moment from "moment"; |
||||
|
import { mapGetters } from "vuex"; |
||||
|
import { downloadFile } from "@/utils/crmindex.js"; |
||||
|
|
||||
|
//组件计量单位 |
||||
|
const bomUnit = [ |
||||
|
{ key: 0, display_name: "PC" }, |
||||
|
{ key: 1, display_name: "TON" }, |
||||
|
{ key: 2, display_name: "Other" }, |
||||
|
]; |
||||
|
const projectTypeKeyValue = bomUnit.reduce((acc, cur) => { |
||||
|
acc[cur.key] = cur.display_name; |
||||
|
return acc; |
||||
|
}, {}); |
||||
|
|
||||
|
export default { |
||||
|
name: "BillM100", |
||||
|
components: { Pagination, CRMTableHead, importExcel }, |
||||
|
directives: { permission }, |
||||
|
filters: { |
||||
|
IsCustomerSignFilter(status) { |
||||
|
//翻译是否签字 |
||||
|
const statusMap = { |
||||
|
true: "是", |
||||
|
false: "否", |
||||
|
}; |
||||
|
return statusMap[status]; |
||||
|
}, |
||||
|
}, |
||||
|
props: { |
||||
|
customerInfos: { |
||||
|
type: Array, |
||||
|
default: () => { |
||||
|
return []; |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
crmType: "bomdatabase", |
||||
|
versionValue: "", |
||||
|
versionList: [], //版本列表 |
||||
|
searchContent: "", // 输入内容 |
||||
|
showExcelImport: false, |
||||
|
form: {}, |
||||
|
drawer: false, |
||||
|
list: null, |
||||
|
totalCount: 0, |
||||
|
listLoading: true, |
||||
|
customerInfo: { |
||||
|
bomId: "", |
||||
|
}, |
||||
|
// 高级搜索 |
||||
|
filterObj: { |
||||
|
type: Object, |
||||
|
default: () => { |
||||
|
return {}; |
||||
|
}, |
||||
|
}, |
||||
|
listQuery: { |
||||
|
SkipCount: 0, |
||||
|
MaxResultCount: 15, |
||||
|
LogTitle: undefined, |
||||
|
LogType: undefined, |
||||
|
SeriousLevel: undefined, |
||||
|
}, |
||||
|
operationQuery:{ |
||||
|
id:undefined, |
||||
|
}, |
||||
|
page: 1, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
bomUnit, |
||||
|
multipleSelection: [], |
||||
|
drawer: false, |
||||
|
tableHeight: document.documentElement.clientHeight - 260, |
||||
|
}; |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.$nextTick(() => { |
||||
|
var offsetHei = document.documentElement.clientHeight; |
||||
|
//console.log(offsetHei); |
||||
|
let boxH = this.$refs.box.offsetHeight; |
||||
|
this.tableHeight = offsetHei - boxH - 57 - 79;//57为footer高度,79为页面上部标签高度 |
||||
|
}); |
||||
|
}, |
||||
|
created() { |
||||
|
this.getList(); |
||||
|
}, |
||||
|
computed: { |
||||
|
...mapGetters(["messageNum"]), |
||||
|
getDefaultField() { |
||||
|
var tempsTabs = []; |
||||
|
tempsTabs.push({ label: "日志类别", prop: "logType", width: 120 }); |
||||
|
tempsTabs.push({ label: "日志标题", prop: "logTitle", width: 150 }); |
||||
|
tempsTabs.push({ |
||||
|
label: "严重程度", |
||||
|
prop: "seriousLevel", |
||||
|
width: 100, |
||||
|
}); |
||||
|
tempsTabs.push({ label: "创建日期", prop: "creationTime", width: 120 }); |
||||
|
tempsTabs.push({ |
||||
|
label: "日志描述", |
||||
|
prop: "logDesc", |
||||
|
width: 400, |
||||
|
}); |
||||
|
|
||||
|
return tempsTabs; |
||||
|
}, |
||||
|
}, |
||||
|
methods: { |
||||
|
/** 导出功能 */ |
||||
|
handleDownload() { |
||||
|
this.listLoading = true; |
||||
|
console.log("系统日志导出条件:"+JSON.stringify(this.listQuery)) |
||||
|
this.$axios |
||||
|
.posts("/api/newjit/log-remind/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; |
||||
|
}); |
||||
|
}); |
||||
|
}, |
||||
|
/** 重置按钮操作 */ |
||||
|
resetQuery(refName) { |
||||
|
this.$refs[refName].resetFields(); |
||||
|
this.handleQuery(); |
||||
|
}, |
||||
|
/** 搜索按钮操作 */ |
||||
|
handleQuery() { |
||||
|
this.listQuery.SkipCount = 1; |
||||
|
this.getList(); |
||||
|
}, |
||||
|
selectValue(params) { |
||||
|
//版本下拉选择 |
||||
|
this.versionValue = params.value; |
||||
|
this.getList(); |
||||
|
}, |
||||
|
|
||||
|
selectOptionsChange(item) { |
||||
|
this.getList(); |
||||
|
}, |
||||
|
importExcelData() { |
||||
|
//关闭导入窗体时调用 |
||||
|
this.showExcelImport = false; |
||||
|
//this.getList(); |
||||
|
}, |
||||
|
|
||||
|
/** 刷新列表 */ |
||||
|
handleHandle(data) { |
||||
|
if (data.type !== "edit") { |
||||
|
this.getList(); |
||||
|
} |
||||
|
}, |
||||
|
/** 格式化字段 */ |
||||
|
fieldFormatter(row, column) { |
||||
|
if (column.property === "seriousLevel") { |
||||
|
return { 1: "轻微", 2: "一般", 3: "严重" }[row[column.property]]; |
||||
|
} |
||||
|
if (column.property === "logType") { |
||||
|
return { |
||||
|
1: "报文传输异常", |
||||
|
2: "报文转换异常", |
||||
|
3: "报文解析、校验异常", |
||||
|
}[row[column.property]]; |
||||
|
} |
||||
|
if (column.property == "creationTime") { |
||||
|
var date = row[column.property]; |
||||
|
if (date == undefined) { |
||||
|
return ""; |
||||
|
} |
||||
|
return moment(date).format("YYYY-MM-DD HH:mm:ss"); |
||||
|
} |
||||
|
return row[column.property] || "--"; |
||||
|
}, |
||||
|
roleFilter(type) { |
||||
|
return projectTypeKeyValue[type]; |
||||
|
}, |
||||
|
getList() { |
||||
|
this.listLoading = true; |
||||
|
this.listQuery.SkipCount = (this.page - 1) * 10; |
||||
|
this.$axios |
||||
|
.gets("/api/newjit/log-remind/list", this.listQuery) |
||||
|
.then((response) => { |
||||
|
this.list = response.items; |
||||
|
this.totalCount = response.totalCount; |
||||
|
this.$store.commit("SET_MESSAGENUM", this.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.handleFilter(); |
||||
|
return; |
||||
|
} |
||||
|
this.listQuery.Sorting = prop + " " + order; |
||||
|
this.handleFilter(); |
||||
|
}, |
||||
|
handleSelectionChange(val) { |
||||
|
this.multipleSelection = val; |
||||
|
}, |
||||
|
/** 通过回调控制style */ |
||||
|
cellStyle({ row, column, rowIndex, columnIndex }) { |
||||
|
if (column.property === "qty") { |
||||
|
return { textAlign: "right" }; |
||||
|
} else { |
||||
|
return { textAlign: "left" }; |
||||
|
} |
||||
|
}, |
||||
|
/** 通过回调控制表头style */ |
||||
|
headerRowStyle({ row, column, rowIndex, columnIndex }) { |
||||
|
if (column.property === "qty") { |
||||
|
return { textAlign: "right", background: "#FAFAFA" }; |
||||
|
} else { |
||||
|
return { textAlign: "left", background: "#FAFAFA" }; |
||||
|
} |
||||
|
}, |
||||
|
handleRowClick(row, column, event) { |
||||
|
this.$refs.multipleTable.clearSelection(); |
||||
|
this.$refs.multipleTable.toggleRowSelection(row); |
||||
|
}, |
||||
|
handleEdit(row) |
||||
|
{ |
||||
|
this.operationQuery.id = row.id; |
||||
|
this.$axios |
||||
|
.posts("/api/newjit/log-remind/do-process", this.operationQuery) |
||||
|
.then((response) => { |
||||
|
if(response.status === "true") |
||||
|
{ |
||||
|
this.$notify({ |
||||
|
title: "成功", |
||||
|
message: "处理成功!", |
||||
|
type: "success", |
||||
|
duration: 2000, |
||||
|
}); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
this.$notify({ |
||||
|
title: "失败", |
||||
|
message: "处理失败!", |
||||
|
type: "success", |
||||
|
duration: 2000, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
this.$notify({ |
||||
|
title: "失败", |
||||
|
message: "处理失败!", |
||||
|
type: "warning", |
||||
|
duration: 2000, |
||||
|
}); |
||||
|
}); |
||||
|
}, |
||||
|
handleIgnore(row) |
||||
|
{ |
||||
|
this.operationQuery.id = row.id; |
||||
|
this.$axios |
||||
|
.posts("/api/newjit/log-remind/do-ignore", this.operationQuery) |
||||
|
.then((response) => { |
||||
|
if(response.status === "true") |
||||
|
{ |
||||
|
this.$notify({ |
||||
|
title: "成功", |
||||
|
message: "忽略成功!", |
||||
|
type: "success", |
||||
|
duration: 2000, |
||||
|
}); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
this.$notify({ |
||||
|
title: "失败", |
||||
|
message: "忽略失败!", |
||||
|
type: "success", |
||||
|
duration: 2000, |
||||
|
}); |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
this.$notify({ |
||||
|
title: "失败", |
||||
|
message: "忽略失败!", |
||||
|
type: "warning", |
||||
|
duration: 2000, |
||||
|
}); |
||||
|
}); |
||||
|
} |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
@import "../../../pg-fis/styles/crmtable.scss"; |
||||
|
</style> |
||||
|
|
@ -0,0 +1,285 @@ |
|||||
|
<!--重复报文查询-明细数据--> |
||||
|
<template> |
||||
|
<div class="cr-body-content"> |
||||
|
<!--表格渲染--> |
||||
|
<el-table |
||||
|
ref="multipleTable" |
||||
|
v-loading="listLoading" |
||||
|
element-loading-text="拼命加载中..." |
||||
|
element-loading-spinner="el-icon-loading" |
||||
|
class="cr-table" |
||||
|
:data="list" |
||||
|
:height="tableHeight" |
||||
|
:cell-style="cellStyle" |
||||
|
:header-cell-style="headerRowStyle" |
||||
|
size="small" |
||||
|
stripe |
||||
|
border |
||||
|
highlight-current-row |
||||
|
style="width: 100%" |
||||
|
@sort-change="sortChange" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
@row-click="handleRowClick" |
||||
|
:row-key="getRowKeys" |
||||
|
:expand-row-keys="expands" |
||||
|
@expand-change="exChange" |
||||
|
> |
||||
|
<el-table-column prop="partCode" label="客户零件代码"></el-table-column> |
||||
|
<el-table-column prop="partNum" label="客户零件数量"></el-table-column> |
||||
|
<el-table-column prop="description" label="描述"></el-table-column> |
||||
|
</el-table> |
||||
|
<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" |
||||
|
/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination |
||||
|
import permission from "@/directive/permission/index.js"; |
||||
|
import CRMTableHead from "../../components/CRMTableHead"; |
||||
|
import { downloadFile } from "@/utils/crmindex.js"; |
||||
|
import Detail from "./detail"; |
||||
|
|
||||
|
export default { |
||||
|
name: "sendUnsettledDiffReport", |
||||
|
components: { Pagination, CRMTableHead, Detail }, |
||||
|
directives: { permission }, |
||||
|
filters: { |
||||
|
IsCustomerSignFilter(status) { |
||||
|
//翻译是否签字 |
||||
|
const statusMap = { |
||||
|
true: "是", |
||||
|
false: "否", |
||||
|
}; |
||||
|
return statusMap[status]; |
||||
|
}, |
||||
|
}, |
||||
|
props: { |
||||
|
customerInfos: { |
||||
|
type: Array, |
||||
|
default: () => { |
||||
|
return []; |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
crmType: "stockFisDiffReport", |
||||
|
rules: { |
||||
|
//前端定义的规则,后端也有验证 |
||||
|
erpMaterialCode: [ |
||||
|
{ required: true, message: "必须输入!", trigger: "blur" }, |
||||
|
], |
||||
|
}, |
||||
|
expands: [], //只展开一行放入当前行id |
||||
|
getRowKeys: (row) => { |
||||
|
return row.id; //这里看这一行中需要根据哪个属性值是id |
||||
|
}, |
||||
|
searchContent: "", // 输入内容 |
||||
|
customerInfo: { |
||||
|
parentId: "", |
||||
|
}, |
||||
|
form: { |
||||
|
dicDetailID: "", |
||||
|
customerId: "", |
||||
|
projectId: "", |
||||
|
}, |
||||
|
list: null, |
||||
|
totalCount: 0, |
||||
|
listLoading: true, |
||||
|
formLoading: false, |
||||
|
// 高级搜索 |
||||
|
filterObj: { |
||||
|
type: Object, |
||||
|
default: () => { |
||||
|
return {}; |
||||
|
}, |
||||
|
}, |
||||
|
listQuery: { |
||||
|
Filters: [ |
||||
|
{ |
||||
|
logic: 0, |
||||
|
column: "Enabled", |
||||
|
action: 0, |
||||
|
value: "true", |
||||
|
}, //默认查询可用的 |
||||
|
], |
||||
|
SkipCount: 0, |
||||
|
MaxResultCount: 15, |
||||
|
id: "", |
||||
|
}, |
||||
|
page: 1, |
||||
|
dialogFormVisible: false, |
||||
|
multipleSelection: [], |
||||
|
formTitle: "", |
||||
|
drawer: false, |
||||
|
showExcelImport: false, |
||||
|
tableHeight: document.documentElement.clientHeight - 260, |
||||
|
isEdit: false, |
||||
|
}; |
||||
|
}, |
||||
|
mounted() { |
||||
|
var self = this; |
||||
|
window.onresize = function () { |
||||
|
var offsetHei = document.documentElement.clientHeight; |
||||
|
self.tableHeight = offsetHei - 190; |
||||
|
}; |
||||
|
}, |
||||
|
created() { |
||||
|
this.getList(); |
||||
|
}, |
||||
|
watch: { |
||||
|
customerInfos: { |
||||
|
handler(newVal) { |
||||
|
if (newVal == "" || newVal == "undefined") { |
||||
|
//TODO |
||||
|
} else { |
||||
|
newVal.forEach((element) => { |
||||
|
this.customerInfo.parentId = element.ParentId; |
||||
|
}); |
||||
|
if (this.customerInfo.parentId != "") { |
||||
|
this.getList(); |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
immediate: true, |
||||
|
}, |
||||
|
}, |
||||
|
computed: { |
||||
|
/** 列表字段 */ |
||||
|
getDefaultField() { |
||||
|
var tempsTabs = []; |
||||
|
tempsTabs.push({ |
||||
|
label: "总成名称", |
||||
|
prop: "erpAssemblyName", |
||||
|
width: 160, |
||||
|
}); |
||||
|
// tempsTabs.push({ |
||||
|
// label: "总成版本号", |
||||
|
// prop: "erpAssemblyName", |
||||
|
// width: 160, |
||||
|
// }); |
||||
|
return tempsTabs; |
||||
|
}, |
||||
|
}, |
||||
|
methods: { |
||||
|
exChange(row, rowList) { |
||||
|
this.loading = true; |
||||
|
|
||||
|
var that = this; |
||||
|
if (rowList.length) { |
||||
|
that.expands = []; |
||||
|
if (row) { |
||||
|
that.expands.push(row.id); // 只展开当前行id |
||||
|
} |
||||
|
} else { |
||||
|
that.expands = []; |
||||
|
} |
||||
|
}, |
||||
|
/** 刷新列表 */ |
||||
|
handleHandle(data) { |
||||
|
if (data.type !== "edit") { |
||||
|
this.getList(); |
||||
|
} |
||||
|
}, |
||||
|
/** 格式化字段 */ |
||||
|
fieldFormatter(row, column) { |
||||
|
return row[column.property] || "--"; |
||||
|
}, |
||||
|
importExcelData() { |
||||
|
//关闭导入窗体时调用 |
||||
|
this.showExcelImport = false; |
||||
|
this.getList(); |
||||
|
}, |
||||
|
getList() { |
||||
|
this.listLoading = true; |
||||
|
console.log("详表条件:" + JSON.stringify(this.customerInfo.parentId)); |
||||
|
this.$axios |
||||
|
.gets("/api/newjit/repeat-m100/" + this.customerInfo.parentId) |
||||
|
.then((response) => { |
||||
|
this.list = response.item.m100RepeatParts; |
||||
|
setTimeout(() => { |
||||
|
//大数据量加载时 |
||||
|
this.listLoading = false; |
||||
|
}, 500); |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
this.listLoading = false; |
||||
|
}); |
||||
|
}, |
||||
|
/** 筛选操作 */ |
||||
|
handleFilter() { |
||||
|
this.page = 1; |
||||
|
this.getList(); |
||||
|
this.listQuery.Filters = []; |
||||
|
if (this.searchContent != "") { |
||||
|
var column = "partCode"; |
||||
|
let filter = { |
||||
|
logic: 0, |
||||
|
column: column, |
||||
|
action: 6, |
||||
|
value: this.searchContent, |
||||
|
}; |
||||
|
this.listQuery.Filters.push(filter); |
||||
|
} |
||||
|
this.getList(); |
||||
|
}, |
||||
|
resetQuery() {}, |
||||
|
|
||||
|
sortChange(data) { |
||||
|
const { prop, order } = data; |
||||
|
if (!prop || !order) { |
||||
|
this.handleFilter(); |
||||
|
return; |
||||
|
} |
||||
|
this.listQuery.Sorting = prop + " " + order; |
||||
|
this.handleFilter(); |
||||
|
}, |
||||
|
handleSelectionChange(val) { |
||||
|
this.multipleSelection = val; |
||||
|
}, |
||||
|
/** 通过回调控制style */ |
||||
|
cellStyle({ row, column, rowIndex, columnIndex }) { |
||||
|
if ( |
||||
|
column.property === "fisQty" || |
||||
|
column.property === "diffQty" || |
||||
|
column.property === "stockQty" |
||||
|
) { |
||||
|
return { textAlign: "right" }; |
||||
|
} else { |
||||
|
return { textAlign: "left" }; |
||||
|
} |
||||
|
}, |
||||
|
/** 通过回调控制表头style */ |
||||
|
headerRowStyle({ row, column, rowIndex, columnIndex }) { |
||||
|
if ( |
||||
|
column.property === "fisQty" || |
||||
|
column.property === "diffQty" || |
||||
|
column.property === "stockQty" |
||||
|
) { |
||||
|
return { textAlign: "right", background: "#FAFAFA" }; |
||||
|
} else { |
||||
|
return { textAlign: "left", background: "#FAFAFA" }; |
||||
|
} |
||||
|
}, |
||||
|
handleRowClick(row, column, event) { |
||||
|
this.$refs.multipleTable.clearSelection(); |
||||
|
this.$refs.multipleTable.toggleRowSelection(row); |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
@import "../../../pg-fis/styles/crmtable.scss"; |
||||
|
</style> |
||||
|
|
@ -0,0 +1,567 @@ |
|||||
|
<!--重复报文信息页--> |
||||
|
<template> |
||||
|
<div class="cr-body-content"> |
||||
|
<div ref="box"> |
||||
|
<flexbox class="content-header"> |
||||
|
<el-form |
||||
|
:model="listQuery" |
||||
|
ref="queryForm" |
||||
|
v-show="showSearch" |
||||
|
:inline="true" |
||||
|
> |
||||
|
<el-form-item label="起始顺序号" prop="HostSNBegin"> |
||||
|
<el-input |
||||
|
v-model="listQuery.HostSNBegin" |
||||
|
placeholder="起始顺序号" |
||||
|
clearable |
||||
|
size="small" |
||||
|
style="width: 120px" |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="结束顺序号" prop="HostSNEnd"> |
||||
|
<el-input |
||||
|
v-model="listQuery.HostSNEnd" |
||||
|
placeholder="结束顺序号" |
||||
|
clearable |
||||
|
size="small" |
||||
|
style="width: 120px" |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="KNR" prop="KNR"> |
||||
|
<el-input |
||||
|
v-model="listQuery.KNR" |
||||
|
placeholder="请输入KNR号" |
||||
|
clearable |
||||
|
size="small" |
||||
|
style="width: 240px" |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="底盘号" prop="VIN"> |
||||
|
<el-input |
||||
|
v-model="listQuery.VIN" |
||||
|
placeholder="请输入底盘号" |
||||
|
clearable |
||||
|
size="small" |
||||
|
style="width: 240px" |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="车型代码" prop="VehicleModelCode"> |
||||
|
<el-input |
||||
|
v-model="listQuery.VehicleModelCode" |
||||
|
placeholder="请输入总成名称" |
||||
|
clearable |
||||
|
size="small" |
||||
|
style="width: 240px" |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="版本" prop="Version"> |
||||
|
<el-input |
||||
|
v-model="listQuery.Version" |
||||
|
placeholder="请输入总成名称" |
||||
|
clearable |
||||
|
size="small" |
||||
|
style="width: 240px" |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="上线日期"> |
||||
|
<el-date-picker |
||||
|
v-model="OnlineTimeVale" |
||||
|
size="small" |
||||
|
style="width: 240px" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
type="daterange" |
||||
|
range-separator="-" |
||||
|
start-placeholder="开始日期" |
||||
|
end-placeholder="结束日期" |
||||
|
></el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="接收日期"> |
||||
|
<el-date-picker |
||||
|
v-model="ReceiveTimeVale" |
||||
|
size="small" |
||||
|
style="width: 240px" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
type="daterange" |
||||
|
range-separator="-" |
||||
|
start-placeholder="开始日期" |
||||
|
end-placeholder="结束日期" |
||||
|
></el-date-picker> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<!-- <el-form-item label="单据状态" prop="BillStatus"> |
||||
|
<el-select |
||||
|
v-model="listQuery.BillStatus" |
||||
|
placeholder="请选择" |
||||
|
style="width: 200px" |
||||
|
> |
||||
|
<el-option label="未领取生产任务" :value="1"></el-option> |
||||
|
<el-option label="已领取生产任务" :value="2"></el-option> |
||||
|
<el-option label="完成生产任务" :value="3"></el-option> |
||||
|
</el-select> |
||||
|
</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('queryForm')" |
||||
|
>重置</el-button |
||||
|
> |
||||
|
<el-button |
||||
|
type="warning" |
||||
|
plain |
||||
|
icon="el-icon-download" |
||||
|
size="mini" |
||||
|
style="margin-left: 15px" |
||||
|
@click="handleDownload()" |
||||
|
>导出(Excel)查询信息 |
||||
|
</el-button> |
||||
|
</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" |
||||
|
:cell-style="cellStyle" |
||||
|
:header-cell-style="headerRowStyle" |
||||
|
size="small" |
||||
|
stripe |
||||
|
border |
||||
|
highlight-current-row |
||||
|
style="width: 100%" |
||||
|
@sort-change="sortChange" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
@row-click="handleRowClick" |
||||
|
> |
||||
|
<el-table-column |
||||
|
label="底盘号" |
||||
|
prop="vin " |
||||
|
sortable="custom" |
||||
|
align="center" |
||||
|
fixed |
||||
|
width="180px" |
||||
|
> |
||||
|
<template slot-scope="scope"> |
||||
|
<span class="link-type" @click="handleDrawerOpen(scope.row)">{{ |
||||
|
scope.row.vin |
||||
|
}}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<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" |
||||
|
show-overflow-tooltip |
||||
|
:gutter="0" |
||||
|
> |
||||
|
<template slot="header" slot-scope="scope"> |
||||
|
{{ scope.column.label }} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</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" |
||||
|
:crmType="crmType" |
||||
|
@close="importExcelData" |
||||
|
/> |
||||
|
</div> |
||||
|
<!-- 抽屉控件 --> |
||||
|
<el-drawer |
||||
|
title="信息详细页" |
||||
|
size="75%" |
||||
|
direction="rtl" |
||||
|
:visible.sync="drawer" |
||||
|
:before-close="handleDrawerClose" |
||||
|
> |
||||
|
<div> |
||||
|
<Detail |
||||
|
v-bind:customerInfos="customerInfos" |
||||
|
style="margin-top: -35px" |
||||
|
></Detail> |
||||
|
</div> |
||||
|
</el-drawer> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import Pagination from "@/components/Pagination"; |
||||
|
import permission from "@/directive/permission/index.js"; |
||||
|
import CRMTableHead from "../../components/CRMTableHead"; |
||||
|
import importExcel from "@/components/ImportExcel-vw"; |
||||
|
import Lockr from "lockr"; |
||||
|
import moment from "moment"; |
||||
|
import message_table from "../../components/mixins/message_table"; |
||||
|
import Detail from "./detail.vue"; |
||||
|
import { downloadFile } from "@/utils/crmindex.js"; |
||||
|
|
||||
|
//组件计量单位 |
||||
|
const bomUnit = [ |
||||
|
{ key: 0, display_name: "PC" }, |
||||
|
{ key: 1, display_name: "TON" }, |
||||
|
{ key: 2, display_name: "Other" }, |
||||
|
]; |
||||
|
const projectTypeKeyValue = bomUnit.reduce((acc, cur) => { |
||||
|
acc[cur.key] = cur.display_name; |
||||
|
return acc; |
||||
|
}, {}); |
||||
|
|
||||
|
export default { |
||||
|
name: "RepeatM100", |
||||
|
components: { Pagination, CRMTableHead, importExcel, Detail }, |
||||
|
directives: { permission }, |
||||
|
filters: { |
||||
|
IsCustomerSignFilter(status) { |
||||
|
//翻译是否签字 |
||||
|
const statusMap = { |
||||
|
true: "是", |
||||
|
false: "否", |
||||
|
}; |
||||
|
return statusMap[status]; |
||||
|
}, |
||||
|
}, |
||||
|
mixins: [message_table], |
||||
|
data() { |
||||
|
return { |
||||
|
crmType: "bomdatabase", |
||||
|
customerInfos: [], |
||||
|
OnlineTimeVale: [], |
||||
|
ReceiveTimeVale: [], |
||||
|
versionValue: "", |
||||
|
versionList: [], //版本列表 |
||||
|
searchContent: "", // 输入内容 |
||||
|
showExcelImport: false, |
||||
|
form: {}, |
||||
|
drawer: false, |
||||
|
list: null, |
||||
|
totalCount: 0, |
||||
|
listLoading: true, |
||||
|
customerInfo: { |
||||
|
bomId: "", |
||||
|
}, |
||||
|
// 高级搜索 |
||||
|
filterObj: { |
||||
|
type: Object, |
||||
|
default: () => { |
||||
|
return {}; |
||||
|
}, |
||||
|
}, |
||||
|
listQuery: { |
||||
|
SkipCount: 0, |
||||
|
MaxResultCount: 15, |
||||
|
HostSNBegin: undefined, |
||||
|
HostSNEnd: undefined, |
||||
|
VIN: undefined, |
||||
|
OnlineTimeBegin: undefined, |
||||
|
OnlineTimeEnd: undefined, |
||||
|
ReceiveTimeBegin: undefined, |
||||
|
ReceiveTimeEnd: undefined, |
||||
|
VehicleModelCode: undefined, |
||||
|
Version: undefined, |
||||
|
KNR: undefined, |
||||
|
}, |
||||
|
page: 1, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
bomUnit, |
||||
|
multipleSelection: [], |
||||
|
drawer: false, |
||||
|
//tableHeight: document.documentElement.clientHeight - 260, |
||||
|
}; |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.$nextTick(() => { |
||||
|
var offsetHei = document.documentElement.clientHeight; |
||||
|
//console.log(offsetHei); |
||||
|
let boxH = this.$refs.box.offsetHeight; |
||||
|
this.tableHeight = offsetHei - boxH - 57 - 79;//57为footer高度,79为页面上部标签高度 |
||||
|
}); |
||||
|
}, |
||||
|
created() { |
||||
|
this.getList(); |
||||
|
}, |
||||
|
computed: { |
||||
|
getDefaultField() { |
||||
|
var tempsTabs = []; |
||||
|
tempsTabs.push({ label: "流水号", prop: "serialNum", width: 100 }); |
||||
|
tempsTabs.push({ label: "大众顺序号", prop: "hostSN", width: 120 }); |
||||
|
tempsTabs.push({ |
||||
|
label: "KNR", |
||||
|
prop: "knr", |
||||
|
width: 120, |
||||
|
}); |
||||
|
// tempsTabs.push({ |
||||
|
// label: "底盘号", |
||||
|
// prop: "vin", |
||||
|
// width: 130, |
||||
|
// }); |
||||
|
tempsTabs.push({ |
||||
|
label: "上线时间", |
||||
|
prop: "onlineTime", |
||||
|
width: 150, |
||||
|
}); |
||||
|
tempsTabs.push({ |
||||
|
label: "接收时间", |
||||
|
prop: "receiveTime", |
||||
|
width: 180, |
||||
|
}); |
||||
|
tempsTabs.push({ |
||||
|
label: "车型代码", |
||||
|
prop: "vehicleModelCode", |
||||
|
width: 120, |
||||
|
}); |
||||
|
tempsTabs.push({ |
||||
|
label: "版本", |
||||
|
prop: "version", |
||||
|
width: 150, |
||||
|
}); |
||||
|
tempsTabs.push({ label: "单据状态", prop: "billStatus", width: 120 }); |
||||
|
tempsTabs.push({ |
||||
|
label: "车型名称", |
||||
|
prop: "vehicleModelName", |
||||
|
width: 120, |
||||
|
}); |
||||
|
return tempsTabs; |
||||
|
}, |
||||
|
}, |
||||
|
methods: { |
||||
|
//抽屉 |
||||
|
handleDrawerOpen(param) { |
||||
|
this.drawer = true; |
||||
|
var parentId = param.id; //传入的是总成id |
||||
|
this.customerInfos = [ |
||||
|
{ |
||||
|
ParentId: parentId, |
||||
|
}, |
||||
|
]; |
||||
|
}, |
||||
|
handleDrawerClose(done) { |
||||
|
done(); |
||||
|
}, |
||||
|
/** 导出功能 */ |
||||
|
handleDownload() { |
||||
|
this.listLoading = true; |
||||
|
// if (this.OnlineTimeVale != []) { |
||||
|
// this.listQuery.OnlineTimeBegin = this.OnlineTimeVale[0]; |
||||
|
// this.listQuery.OnlineTimeEnd = this.OnlineTimeVale[1]; |
||||
|
// } |
||||
|
// if (this.ReceiveTimeVale != []) { |
||||
|
// this.listQuery.ReceiveTimeBegin = this.ReceiveTimeVale[0]; |
||||
|
// this.listQuery.ReceiveTimeEnd = this.ReceiveTimeVale[1]; |
||||
|
// } |
||||
|
if (this.OnlineTimeVale != []) { |
||||
|
this.listQuery.OnlineTimeBegin = this.OnlineTimeVale |
||||
|
? this.OnlineTimeVale[0] || undefined |
||||
|
: undefined; |
||||
|
this.listQuery.OnlineTimeEnd = this.OnlineTimeVale |
||||
|
? this.OnlineTimeVale[1] || undefined |
||||
|
: undefined; |
||||
|
} |
||||
|
if (this.ReceiveTimeVale != []) { |
||||
|
this.listQuery.ReceiveTimeBegin = this.ReceiveTimeVale |
||||
|
? this.ReceiveTimeVale[0] || undefined |
||||
|
: undefined; |
||||
|
|
||||
|
this.listQuery.ReceiveTimeEnd = this.ReceiveTimeVale |
||||
|
? this.ReceiveTimeVale[1] || undefined |
||||
|
: undefined; |
||||
|
} |
||||
|
console.log("重复报文导出条件:" + JSON.stringify(this.listQuery)); |
||||
|
this.$axios |
||||
|
.posts("/api/newjit/repeat-m100/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.OnlineTimeVale = []; |
||||
|
this.ReceiveTimeVale = []; |
||||
|
this.$refs[refName].resetFields(); |
||||
|
this.handleQuery(); |
||||
|
}, |
||||
|
/** 搜索按钮操作 */ |
||||
|
handleQuery() { |
||||
|
this.listQuery.SkipCount = 1; |
||||
|
this.getList(); |
||||
|
}, |
||||
|
selectValue(params) { |
||||
|
//版本下拉选择 |
||||
|
this.versionValue = params.value; |
||||
|
this.getList(); |
||||
|
}, |
||||
|
|
||||
|
selectOptionsChange(item) { |
||||
|
this.getList(); |
||||
|
}, |
||||
|
importExcelData() { |
||||
|
//关闭导入窗体时调用 |
||||
|
this.showExcelImport = false; |
||||
|
//this.getList(); |
||||
|
}, |
||||
|
|
||||
|
/** 刷新列表 */ |
||||
|
handleHandle(data) { |
||||
|
if (data.type !== "edit") { |
||||
|
this.getList(); |
||||
|
} |
||||
|
}, |
||||
|
/** 格式化字段 */ |
||||
|
fieldFormatter(row, column) { |
||||
|
if (column.property === "billStatus") { |
||||
|
return { 1: "未领取生产任务", 2: "已领取生产任务", 3: "完成生产任务" }[ |
||||
|
row[column.property] |
||||
|
]; |
||||
|
} |
||||
|
if (column.property == "onlineTime" || column.property == "receiveTime") { |
||||
|
var date = row[column.property]; |
||||
|
if (date == undefined) { |
||||
|
return ""; |
||||
|
} |
||||
|
return moment(date).format("YYYY-MM-DD HH:mm:ss"); |
||||
|
} |
||||
|
return row[column.property] || "--"; |
||||
|
}, |
||||
|
roleFilter(type) { |
||||
|
return projectTypeKeyValue[type]; |
||||
|
}, |
||||
|
getList() { |
||||
|
this.listLoading = true; |
||||
|
this.listQuery.SkipCount = (this.page - 1) * 10; |
||||
|
if (this.OnlineTimeVale != []) { |
||||
|
this.listQuery.OnlineTimeBegin = this.OnlineTimeVale[0]; |
||||
|
this.listQuery.OnlineTimeEnd = this.OnlineTimeVale[1]; |
||||
|
} |
||||
|
if (this.ReceiveTimeVale != []) { |
||||
|
this.listQuery.ReceiveTimeBegin = this.ReceiveTimeVale[0]; |
||||
|
this.listQuery.ReceiveTimeEnd = this.ReceiveTimeVale[1]; |
||||
|
} |
||||
|
this.$axios |
||||
|
.gets("/api/newjit/repeat-m100/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.handleFilter(); |
||||
|
return; |
||||
|
} |
||||
|
this.listQuery.Sorting = prop + " " + order; |
||||
|
this.handleFilter(); |
||||
|
}, |
||||
|
handleSelectionChange(val) { |
||||
|
this.multipleSelection = val; |
||||
|
}, |
||||
|
/** 通过回调控制style */ |
||||
|
cellStyle({ row, column, rowIndex, columnIndex }) { |
||||
|
if (column.property === "qty") { |
||||
|
return { textAlign: "right" }; |
||||
|
} else { |
||||
|
return { textAlign: "left" }; |
||||
|
} |
||||
|
}, |
||||
|
/** 通过回调控制表头style */ |
||||
|
headerRowStyle({ row, column, rowIndex, columnIndex }) { |
||||
|
if (column.property === "qty") { |
||||
|
return { textAlign: "right", background: "#FAFAFA" }; |
||||
|
} else { |
||||
|
return { textAlign: "left", background: "#FAFAFA" }; |
||||
|
} |
||||
|
}, |
||||
|
handleRowClick(row, column, event) { |
||||
|
this.$refs.multipleTable.clearSelection(); |
||||
|
this.$refs.multipleTable.toggleRowSelection(row); |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
@import "../../../pg-fis/styles/crmtable.scss"; |
||||
|
</style> |
||||
|
|
Loading…
Reference in new issue