中航光电热表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.

408 lines
13 KiB

<template>
7 months ago
<basic-container>
<avue-crud :option="option" :table-loading="loading" :data="data" v-model="form" v-model:page="page" ref="crud"
@row-del="rowDel" @search-change="searchChange" @search-reset="searchReset"
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
@refresh-change="refreshChange" @on-load="onLoad">
<template #body>
<el-tag style="width:100%;display:block;line-height:22px">{{expireData.length}}个零件工艺即将到期请尽快维护有效期</el-tag>
7 months ago
</template>
<template #tip>
</template>
<template #menu-left>
7 months ago
<el-button type="primary" @click="setIndate()">有效期维护</el-button>
7 months ago
</template>
<template #menu-right="{ size }">
</template>
<template #menu="scope">
</template>
<template #bsWorkType.wtName="scope">
<span>
{{ scope.row.bsWorkType ? scope.row.bsWorkType.wtName : '-' }}
</span>
</template>
<template #name="{ row }">
<i :class="row.source" style="margin-right: 5px" />
<span>{{ row.name }}</span>
</template>
<template #source="{ row }">
<div style="text-align: center">
<i :class="row.source" />
</div>
</template>
</avue-crud>
7 months ago
<!-- 有效期维护 -->
<indateDailog :id="bcId" :set-crew-open="indateOpen" v-if="indateOpen" type="platingAssort"
@setIndateCancel="setIndateCancel" :title="'有效期维护'" :expireData="expireData"></indateDailog>
7 months ago
</basic-container>
</template>
<script>
import { mapGetters } from 'vuex';
6 months ago
7 months ago
import indateDailog from "./components/indateDailog.vue"
import { getList,getExpire } from "@/api/processManagement/procepssPlanning";
import { getDictionary } from '@/api/system/dict';
7 months ago
export default {
components: {
7 months ago
indateDailog
7 months ago
},
data() {
return {
indateOpen: false,
7 months ago
bcId: null,
setCrewOpen: false,
form: {},
query: {},
loading: true,
selectionList: [],
parentId: '',
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
option: {
height: 'auto',
7 months ago
calcHeight: 32,
7 months ago
tip: false,
simplePage: true,
7 months ago
searchShow: true,
searchMenuSpan: 6,
7 months ago
searchIcon: true,
searchIndex: 3,
tree: false,
7 months ago
border: true,
selection: false,
7 months ago
viewBtn: true,
delBtn: false,
addBtn: false,
editBtn: false,
7 months ago
editBtnText: '修改',
addBtnIcon: ' ',
viewBtnIcon: ' ',
delBtnIcon: ' ',
editBtnIcon: ' ',
viewBtnText: '详情',
7 months ago
labelWidth: 120,
6 months ago
menuWidth: 80,
7 months ago
dialogWidth: 1200,
7 months ago
dialogClickModal: false,
7 months ago
searchEnter: true,
excelBtn: false,
filterBtn: true,
7 months ago
searchShowBtn: false,
7 months ago
columnSort: true,
excelBtn: true,
columnSort: true,
7 months ago
index: false,
showOverflowTooltip: true,
menuAlign: 'left',
6 months ago
gridBtn: false,
searchLabelPosition: 'left',
searchGutter: 24,
searchSpan: 6,
6 months ago
searchMenuPosition: 'right',
6 months ago
align: 'center',
7 months ago
column: [
{
label: '镀种',
7 months ago
prop: 'partCode',
search: true,
sortable: true,
overHidden: true,
width: 210,
hide:true,
headerAlign: 'center',
align: 'center',
searchLabelWidth: 60,
},
{
label: '物料编码',
prop: 'partCode',
search: true,
sortable: true,
overHidden: true,
width: 210,
hide:true,
headerAlign: 'center',
align: 'center',
},
{
label: '子件类型',
prop: 'partCode',
search: true,
sortable: true,
overHidden: true,
width: 210,
hide:true,
headerAlign: 'center',
align: 'center',
},
{
label: '材料',
prop: 'partCode',
search: true,
sortable: true,
overHidden: true,
width: 210,
hide:true,
headerAlign: 'center',
align: 'center',
searchLabelWidth: 60,
},
{
label: '粉重',
prop: 'partCode',
search: true,
sortable: true,
overHidden: true,
width: 210,
hide:true,
headerAlign: 'center',
align: 'center',
searchLabelWidth: 60,
},
{
label: '成型厚度',
prop: 'partCode',
search: true,
sortable: true,
overHidden: true,
width: 210,
hide:true,
headerAlign: 'center',
align: 'center',
},
{
label: '检验项目',
prop: 'partCode',
search: true,
sortable: true,
overHidden: true,
width: 210,
hide:true,
headerAlign: 'center',
align: 'center',
type:'select',
multiple:true,
dicData:[
{
label:'项目1',
value:1
},
{
label:'项目2',
value:2
},
]
},
{
label: '零件号',
prop: 'partCode',
search: false,
sortable: true,
overHidden: true,
width: 210,
headerAlign: 'center',
align: 'center',
searchLabelWidth: 60,
6 months ago
7 months ago
},
{
label: '零件名称',
prop: 'partName',
sortable: true,
search: false,
overHidden: true,
width: 170,
headerAlign: 'center',
align: 'left',
6 months ago
7 months ago
},
{
label: '零件类型',
prop: 'sinTerType',
7 months ago
sortable: true,
6 months ago
search: false,
7 months ago
overHidden: true,
type: 'select',
headerAlign: 'center',
align: 'center',
7 months ago
dicData: [
{
label: '烧结零件',
value: '1',
},
{
label: '热表零件',
value: '2',
}
],
width: 120,
6 months ago
7 months ago
},
{
label: '工艺路线',
prop: 'craftWay',
7 months ago
sortable: true,
search: false,
overHidden: true,
headerAlign: 'center',
align: 'center',
6 months ago
7 months ago
},
{
label: '状态',
prop: 'status',
7 months ago
sortable: true,
search: false,
7 months ago
overHidden: true,
width: 120,
type: "select",
headerAlign: 'center',
align: 'center',
searchLabelWidth: 45,
7 months ago
dicData: [{
value: 0,
label: '待分派'
}, {
value: 1,
label: '已分派'
}, {
value: 2,
label: '已处理'
}],
},
{
label: '到期时间',
prop: 'nextDue',
7 months ago
sortable: true,
search: true,
7 months ago
overHidden: true,
width: 140,
headerAlign: 'center',
align: 'center',
type:'date',
searchRange:true,
startPlaceholder: '开始时间',
endPlaceholder: "结束时间",
6 months ago
7 months ago
},
{
label: '维护人',
prop: 'updateUser',
7 months ago
sortable: true,
search: false,
overHidden: true,
width: 120,
headerAlign: 'center',
align: 'center',
6 months ago
7 months ago
},
{
6 months ago
label: '维护时间',
prop: 'updateTime',
7 months ago
sortable: true,
search: false,
overHidden: true,
width: 140,
headerAlign: 'center',
align: 'center',
6 months ago
7 months ago
},
],
},
data: [],
title: '分派',
expireData:[],
7 months ago
}
},
mounted(){
this.getExpireDay()
7 months ago
},
7 months ago
methods: {
getExpireDay(){
getDictionary({code:'soonToExpire'}).then(res=>{
this.getExpireList(res.data.data[0].dictKey)
})
},
getExpireList(val){
getExpire({expire:val}).then(res=>{
console.log(99999,res.data.data)
this.expireData = res.data.data
})
},
7 months ago
// 有效期维护
setIndate() {
7 months ago
this.indateOpen = true
},
setIndateCancel(isRefresh) {
if (isRefresh) {
this.$refs.myTable.load();
}
this.indateOpen = false;
},
7 months ago
// 重置
searchReset() {
this.query = {};
this.parentId = 0;
this.onLoad(this.page);
},
// 搜索
searchChange(params, done) {
this.query = params;
this.parentId = '';
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
// 选中表格数据
selectionChange(list) {
this.selectionList = list;
},
//
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
// 切换 页码
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
// 切换页面 数量
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
// 加载页面数据
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 = this.data.length
this.selectionClear();
});
7 months ago
},
},
}
</script>