中航光电热表web
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

308 lines
7.8 KiB

<template>
<basic-container>
<avue-crud
:option="option"
:table-loading="loading"
:data="data"
v-model="form"
v-model:page="page"
ref="crud"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@on-load="onLoad"
>
<template #menu-left>
<!-- <el-button type="primary" icon="el-icon-plus" @click="handleDelete">申报
</el-button> -->
</template>
<template #menu-right> </template>
<template #menu="scope">
<el-button type="text" @click="detailsView(scope.row)">详情 </el-button>
<el-button type="text" @click="handle(scope.row)" v-if="scope.row.tbStatus == 0"
>处理
</el-button>
</template>
</avue-crud>
<!-- 处理 -->
<inPlantProcessHandle
v-if="showHandle"
:showDialog="showHandle"
:moldAddMore="moldAddMore"
:rowData="rowData"
@closeDialog="cancel()"
></inPlantProcessHandle>
<!-- 详情 -->
<inPlantProcessDetails
v-if="showDetails"
:showDialog="showDetails"
:rowData="rowData"
@closeDialog="cancel()"
></inPlantProcessDetails>
</basic-container>
</template>
<script>
import { getList } from '@/api/processManagement/inPlantProcess.js';
import inPlantProcessHandle from './components/inPlantProcessHandle.vue';
import inPlantProcessDetails from './components/inPlantProcessDetails.vue';
export default {
name: 'inPlantProcess',
components: {
inPlantProcessHandle,
inPlantProcessDetails,
},
props: {},
data() {
return {
selectionList: [],
loading: false,
query: {},
option: {
height: 'auto',
calcHeight: 32,
tip: false,
simplePage: true,
searchShow: true,
searchMenuSpan: 6,
searchIcon: true,
searchIndex: 3,
tree: false,
border: true,
index: true,
selection: false,
viewBtn: false,
delBtn: false,
editBtn: false,
addBtn: false,
editBtnText: '修改',
addBtnIcon: ' ',
viewBtnIcon: ' ',
delBtnIcon: ' ',
editBtnIcon: ' ',
viewBtnText: '详情',
labelWidth: 120,
menuWidth: 100,
dialogWidth: 1040,
dialogClickModal: false,
searchEnter: true,
excelBtn: false,
filterBtn: true,
searchShowBtn: false,
columnSort: true,
excelBtn: true,
columnSort: true,
showOverflowTooltip: true,
menuAlign: 'left',
gridBtn: false,
searchLabelPosition: 'left',
searchGutter: 24,
searchSpan: 6,
searchMenuPosition: 'right',
align: 'center',
menu: true,
column: [
{
label: '作业中心',
prop: 'wcId',
sortable: true,
filter: true,
span: 12,
search: true,
display: false,
headerAlign: 'center',
align: 'left',
type: 'select',
filterable: true,
clearable: true,
hide: true,
dicUrl: '/blade-desk/bsWorkCenter/getList',
props: {
label: 'wcName',
value: 'id',
},
},
{
label: '任务号',
prop: 'tbCode',
sortable: true,
filter: true,
span: 12,
search: false,
display: false,
headerAlign: 'center',
align: 'left',
searchLabelWidth: 60,
},
{
label: '产线',
prop: 'equipmentName',
search: true,
sortable: true,
filter: true,
span: 12,
headerAlign: 'center',
align: 'left',
searchLabelWidth: 45,
},
{
label: '确认编号',
prop: 'confirmCondition',
search: false,
sortable: true,
filter: true,
span: 12,
headerAlign: 'center',
align: 'left',
},
{
label: '确认到期日期',
prop: 'lastTime',
search: false,
sortable: true,
filter: true,
span: 12,
type: 'date',
format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD',
headerAlign: 'center',
align: 'center',
width: 150,
},
{
label: '提醒天数',
prop: 'remDays',
search: false,
sortable: true,
filter: true,
span: 12,
headerAlign: 'center',
align: 'center',
},
{
label: '工艺员',
prop: 'proManName',
search: false,
sortable: true,
filter: true,
span: 12,
headerAlign: 'center',
align: 'center',
searchLabelWidth: 60,
},
{
label: '备注',
prop: 'remarks',
search: false,
sortable: true,
filter: true,
span: 12,
headerAlign: 'center',
align: 'left',
},
{
label: '状态',
prop: 'tbStatus',
search: true,
sortable: true,
filter: true,
span: 12,
headerAlign: 'center',
align: 'center',
type: 'select',
searchLabelWidth: 50,
dicData: [
{
value: 0,
label: '未处理',
},
{
value: 1,
label: '已处理',
},
],
},
{
label: '填报备注',
prop: 'remarks',
search: false,
sortable: true,
filter: true,
span: 12,
headerAlign: 'center',
align: 'left',
},
],
},
form: {},
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
rowData: {},
showHandle: false,
moldAddMore: true,
showDetails: false,
};
},
methods: {
// 查看详情
detailsView(row) {
console.log(row, 'row');
this.showDetails = true;
this.rowData = row;
this.moldAddMore = false;
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');
return;
}
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {});
},
handle(row) {
this.rowData = row;
this.showHandle = true;
},
cancel() {
this.showHandle = false;
this.showDetails = false;
this.onLoad(this.page, this.query);
},
// 重置
searchReset() {
this.query = {};
this.onLoad(this.page, this.query);
},
// 搜索
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
// 多选
selectionChange(list) {
this.selectionList = list;
},
onLoad(page, params = {}) {
this.loading = true;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
this.data = res.data.data.records;
this.loading = false;
this.page.total = res.data.data.total;
// this.selectionClear();
});
},
},
};
</script>
<style lang="scss" scoped></style>