制造中心-制造

This commit is contained in:
bryan sun
2019-11-16 17:04:00 +08:00
parent 0b2103e6ad
commit 2f99a2d964
6 changed files with 304 additions and 299 deletions

View File

@@ -2,145 +2,147 @@
<div>
<el-card>
<div>
<span>项目名称</span>
<el-select v-model="entryNameValue" clearable filterable placeholder="项目名称" size="small" style="width:200px;margin-top: 3px">
<el-select v-model="entryNameValue" clearable filterable placeholder="项目名称" size="small" style="width:200px;margin: 3px 10px">
<el-option
v-for="item in entryName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span style="margin-left: 10px">机床型号</span>
<el-input v-model="machine" clearable size="small" style="width:200px" placeholder="请输入机床型号"/>
</div>
<div style="margin-top: 10px">
<span style="margin-left: 0px">开始日期</span>
<el-date-picker
v-model="startTime"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择开始日期"/>
<span style="margin-left: 10px">结束日期</span>
<el-date-picker
v-model="endTime"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择结束日期"/>
<el-input v-model="contractNumber" clearable size="small" style="width:200px;margin: 3px 10px" placeholder="请输入合同编号"/>
<!-- <span style="margin-left: 10px">机床型号</span>-->
<!-- <el-input v-model="machine" clearable size="small" style="width:200px" placeholder="请输入机床型号"/>-->
<!-- </div>-->
<!-- <div style="margin-top: 10px">-->
<!-- <span style="margin-left: 0px">开始日期</span>-->
<!-- <el-date-picker-->
<!-- v-model="startTime"-->
<!-- style="width: 200px;"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- size="small"-->
<!-- type="date"-->
<!-- placeholder="请选择开始日期"/>-->
<!-- <span style="margin-left: 10px">结束日期</span>-->
<!-- <el-date-picker-->
<!-- v-model="endTime"-->
<!-- style="width: 200px;"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- size="small"-->
<!-- type="date"-->
<!-- placeholder="请选择结束日期"/>-->
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
<el-tooltip :open-delay="1200" effect="dark" content="新增项目" placement="top">
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD()">新增</el-button>
</el-tooltip>
</div>
</el-card>
<el-card>
<el-table
v-loading="listLoading"
:data="tableData1"
:row-key="getRowKeys"
:expand-row-keys="expands"
style="width: 100%"
height="500"
border
stripe
size="mini"
@expand-change="selectMachine">
<el-table-column type="expand" label="详情">
<template slot-scope="scope">
<el-table :data="tableData2" class="subTableHeader" border stripe style="width: 612px; text-align: center" size="mini">
<el-table-column label="设备型号" align="center" width="150">
<template slot-scope="scope">
{{ scope.row.机床图 }}
<el-row>
<el-col style="width: 56%">
<el-card>
<el-table
v-loading="listLoading"
:data="tableData1"
:row-key="getRowKeys"
:expand-row-keys="expands"
style="width: 100%"
height="500"
border
stripe
size="mini"
@row-click="selectMachine">
<el-table-column align="center" label="合同编号" prop="合同编号" width="120">
<template slot-scope="scope">
<template>
{{ scope.row.合同编 }}
</template>
</el-table-column>
<el-table-column label="设备名称" align="center" width="160">
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column label="机床数量" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.机床数量 }}
</template>
</el-table-column>
<el-table-column label="操作" width="200" align="center">
<template slot-scope="scope">
</template>
</el-table-column>
<el-table-column align="center" label="项目名称" prop="项目名称" width="130" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="项目下达日期" prop="合同签订日期" width="100">
<template slot-scope="scope">
{{ scope.row.合同签订日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="合同信息备注" min-width="150">
<template slot-scope="scope">
{{ scope.row.合同信息备注 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="160">
<template slot-scope="scope">
<el-tooltip :open-delay="1200" effect="dark" content="增加机床" placement="top">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="editMachine(scope.row);flag = 2">编辑</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="deleteMachine(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</template>
</el-table-column>
<el-table-column align="center" label="合同编号" prop="合同编号" width="150">
<template slot-scope="scope">
<template>
<el-tag slot="reference">{{ scope.row.合同编号 }}</el-tag>
</template>
</template>
</el-table-column>
<el-table-column align="center" label="项目名称" prop="项目名称" min-width="150">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="项目下达日期" prop="合同签订日期" width="150">
<template slot-scope="scope">
{{ scope.row.合同签订日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="合同信息备注" min-width="200">
<template slot-scope="scope">
{{ scope.row.合同信息备注 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="350">
<template slot-scope="scope">
<el-tooltip :open-delay="1200" effect="dark" content="增加机床" placement="top">
<el-button
size="mini"
type="warning"
plain
icon="el-icon-plus"
@click.stop="addMachine(scope.row);flag = 1">机床</el-button>
</el-tooltip>
<el-button
size="mini"
plain
type="primary"
icon="el-icon-edit"
@click.stop="handleEdit(scope.row)">编辑</el-button>
<el-button
size="mini"
type="danger"
plain
icon="el-icon-delete"
@click.stop="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="PageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="PageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
type="warning"
plain
icon="el-icon-plus"
@click.stop="addMachine(scope.row);flag = 1">机床</el-button>
</el-tooltip>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click.stop="handleEdit(scope.row)"/>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click.stop="handleDelete(scope.row)"/>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="PageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="PageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
</el-col>
<el-col style="width: 43%">
<el-card>
<el-table :data="tableData2" class="subTableHeader" border stripe style="width: 100%; text-align: center" size="mini">
<el-table-column label="设备型号" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="设备名称" align="center" min-width="160">
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column label="机床数量" align="center" width="70">
<template slot-scope="scope">
{{ scope.row.机床数量 }}
</template>
</el-table-column>
<el-table-column label="操作" width="140" align="center">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="editMachine(scope.row);flag = 2">编辑</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="deleteMachine(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
<!--新增合同信息对话框-->
<el-dialog v-el-drag-dialog :title="title" :visible.sync="dialogFormVisible1" center style="min-height: 300px" width="400px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="140px" class="demo-ruleForm">
@@ -212,6 +214,8 @@ export default {
},
data() {
return {
contractNumber_check: '',
contractNumber: '', // 合同编号
entryName: [],
entryNameValue: '',
machine: '',
@@ -278,12 +282,13 @@ export default {
this.fetchTableData1()
},
fetchTableData1() {
if (this.contractNumber === '' || this.contractNumber === null) { this.contractNumber_check = 0 } else { this.contractNumber_check = 1 }
if (this.entryNameValue === '' || this.entryNameValue === null) { this.entryNameValue_check = 0 } else { this.entryNameValue_check = 1 }
if (this.startTime === '' || this.startTime === null) { this.startTime_check = 0 } else { this.startTime_check = 1 }
if (this.endTime === '' || this.endTime === null) { this.endTime_check = 0 } else { this.endTime_check = 1 }
if (this.machine === '' || this.machine === null) { this.machine_check = 0 } else { this.machine_check = 1 }
this.listLoading = true
this.getTable(searchTable1, [this.PageCurrent, this.PageSize, this.entryNameValue, this.entryNameValue_check, this.startTime_check, this.endTime_check, this.startTime, this.endTime, this.machine_check, this.machine], ['tableData1', 'total', 'listLoading'])
this.getTable(searchTable1, [this.PageCurrent, this.PageSize, this.entryNameValue, this.entryNameValue_check, this.startTime_check, this.endTime_check, this.startTime, this.endTime, this.machine_check, this.machine, this.contractNumber_check, this.contractNumber], ['tableData1', 'total', 'listLoading'])
},
selectMachine(row) {
this.projectNum = row.项目流水号