|
@@ -3,19 +3,27 @@
|
|
|
<!--工具条-->
|
|
|
<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
|
|
|
<el-form :inline="true" :model="filters">
|
|
|
- <el-col :span="2">
|
|
|
+ <el-col :span="3">
|
|
|
<el-form-item>
|
|
|
- <el-select v-model="filters.value" clearable placeholder="请选择">
|
|
|
- <el-option label="编号" value="0"></el-option>
|
|
|
- <el-option label="名称" value="1"></el-option>
|
|
|
+ <el-select v-model="filters.projectId" clearable placeholder="请选择项目">
|
|
|
+ <el-option v-for="item in projects" :key="item.id" :label="item.projectName" :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3">
|
|
|
+ <el-form-item>
|
|
|
+ <el-select v-model="filters.serchType" placeholder="请选择查询条件">
|
|
|
+ <el-option label="编号" value="0"></el-option>
|
|
|
+ <el-option label="名称" value="1"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-form-item>
|
|
|
- <el-input v-model="filters.name" placeholder="请输入编号或名称进行搜索"></el-input>
|
|
|
+ <el-input v-model="filters.keyName" placeholder="请输入编号或名称进行搜索"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary">查询</el-button>
|
|
|
+ <el-button type="primary" @click="getMoldList">查询</el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item style="float: right" v-if="user.parentId == 1">
|
|
|
<el-button type="primary" @click="showAdd">新建</el-button>
|
|
@@ -26,40 +34,42 @@
|
|
|
<!--列表-->
|
|
|
<el-table :data="molds" :height="tableHeight" highlight-current-row v-loading="listLoading" style="width: 100%;">
|
|
|
<el-table-column type="index" width="40"></el-table-column>
|
|
|
- <el-table-column prop="typeNumber" label="模具类型编号" width="130" sortable></el-table-column>
|
|
|
- <el-table-column prop="name" label="模具名称" width="120" sortable></el-table-column>
|
|
|
- <el-table-column prop="project" label="所属项目" width="100" sortable></el-table-column>
|
|
|
- <el-table-column prop="client" label="所属客户" sortable></el-table-column>
|
|
|
- <el-table-column prop="manufacturer" label="生产厂家" sortable></el-table-column>
|
|
|
- <el-table-column prop="mouldNumber" label="云模盒编号" width="120" sortable></el-table-column>
|
|
|
- <el-table-column prop="lifetime" label="模次寿命" width="100" sortable></el-table-column>
|
|
|
- <el-table-column prop="initial" label="初始模次" width="100" sortable></el-table-column>
|
|
|
- <el-table-column prop="RFIDcode" label="对应RFID码" width="120" sortable></el-table-column>
|
|
|
- <el-table-column label="图纸资料" width="100" sortable>
|
|
|
+ <el-table-column prop="equipmentNo" label="云模盒编号" width="150" sortable></el-table-column>
|
|
|
+ <el-table-column prop="hillNumber" label="电量" align="center" width="100" sortable></el-table-column>
|
|
|
+ <el-table-column prop="modelNo" label="模具编号" width="150" sortable></el-table-column>
|
|
|
+ <el-table-column prop="modelName" label="模具名称" width="150" sortable></el-table-column>
|
|
|
+ <el-table-column prop="projectName" label="所属项目" width="180" sortable></el-table-column>
|
|
|
+ <el-table-column label="所属资产方" width="200" sortable></el-table-column>
|
|
|
+ <el-table-column label="所属生产方" width="200" sortable></el-table-column>
|
|
|
+ <el-table-column prop="settingLife" label="模次寿命" width="100" align="center" sortable></el-table-column>
|
|
|
+ <el-table-column prop="initialModulus" label="初始模次" width="100" align="center" sortable></el-table-column>
|
|
|
+ <el-table-column prop="initial" label="穴数" width="100" align="center" sortable></el-table-column>
|
|
|
+ <el-table-column prop="rfid" label="对应RFID码" width="120" align="center" sortable></el-table-column>
|
|
|
+ <el-table-column label="模具文档" width="100" align="center" sortable>
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.blueprint">需要</span>
|
|
|
- <span v-else>不需要</span>
|
|
|
+ <span v-if="scope.row.mouldFile == 1">已上传</span>
|
|
|
+ <span v-else>未上传</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="Bom表" width="100" sortable>
|
|
|
+ <el-table-column label="零件文档" width="100" align="center" sortable>
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.BOMtable">需要</span>
|
|
|
- <span v-else>不需要</span>
|
|
|
+ <span v-if="scope.row.compFile == 1">已上传</span>
|
|
|
+ <span v-else>未上传</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="零件清单" width="100" sortable>
|
|
|
+ <el-table-column label="保养方案" width="100" align="center" sortable>
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.partList">需要</span>
|
|
|
- <span v-else>不需要</span>
|
|
|
+ <span v-if="scope.row.maintianPlan == 1">已上传</span>
|
|
|
+ <span v-else>未上传</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="保养标准" width="100" sortable>
|
|
|
+ <el-table-column label="状态" width="100" align="center" sortable>
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.standard">需要</span>
|
|
|
- <span v-else>不需要</span>
|
|
|
+ <span v-if="scope.row.state == 1" style="color:#00CD66;">运行</span>
|
|
|
+ <span v-else style="color:#CD2626;">禁止</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" width="150" sortable>
|
|
|
+ <el-table-column label="操作" width="150" align="center" fixed="right" sortable>
|
|
|
<template slot-scope="scope">
|
|
|
<el-button size="small" type="primary" @click="toDetail(scope.row.typeNumber)">详情</el-button>
|
|
|
<el-button size="small" type="danger" v-if="user.parentId == 1">删除</el-button>
|
|
@@ -110,42 +120,10 @@
|
|
|
data() {
|
|
|
return {
|
|
|
user: JSON.parse(sessionStorage.getItem('user')),
|
|
|
- molds: [
|
|
|
- //临时数据
|
|
|
- {
|
|
|
- typeNumber: "MUJU002",
|
|
|
- name: "墨模具测试",
|
|
|
- project: "墨盒项目",
|
|
|
- client: "南京海市蜃楼有限公司",
|
|
|
- manufacturer: "南京江宁制造局",
|
|
|
- mouldNumber: "MOHE0023",
|
|
|
- lifetime: "1年",
|
|
|
- initial: "36",
|
|
|
- RFIDcode: "RFID1234",
|
|
|
- blueprint: true,
|
|
|
- BOMtable: true,
|
|
|
- partList: false,
|
|
|
- standard: false
|
|
|
- },
|
|
|
- {
|
|
|
- typeNumber: "MUJU003",
|
|
|
- name: "啦啦啦测试",
|
|
|
- project: "啦啦项目",
|
|
|
- client: "南京啦啦啦有限公司",
|
|
|
- manufacturer: "南京啦啦制造局",
|
|
|
- mouldNumber: "MOHE0045",
|
|
|
- lifetime: "1秒",
|
|
|
- initial: "47",
|
|
|
- RFIDcode: "RFID5678",
|
|
|
- blueprint: false,
|
|
|
- BOMtable: false,
|
|
|
- partList: true,
|
|
|
- standard: true
|
|
|
- }
|
|
|
- ],
|
|
|
+ molds: [],
|
|
|
filters: {
|
|
|
keyName: "",
|
|
|
- serchType: -1,
|
|
|
+ serchType: "编号",
|
|
|
projectId: ""
|
|
|
},
|
|
|
|
|
@@ -164,6 +142,7 @@
|
|
|
total: 0,
|
|
|
tableHeight: 0,
|
|
|
boxes: [],
|
|
|
+ projects: [],
|
|
|
|
|
|
addLoading: false,
|
|
|
addFormVisible: false,
|
|
@@ -194,15 +173,32 @@
|
|
|
type: 'error'
|
|
|
});
|
|
|
})
|
|
|
+
|
|
|
+ this.http.post(this.port.project.projects, {}, res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.projects = res.data;
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'error'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }, error => {
|
|
|
+ this.listLoading = false;
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: 'error'
|
|
|
+ });
|
|
|
+ })
|
|
|
},
|
|
|
//分页
|
|
|
handleCurrentChange(val) {
|
|
|
this.page = val;
|
|
|
- // this.getUsers();
|
|
|
+ this.getMoldList();
|
|
|
},
|
|
|
handleSizeChange(val) {
|
|
|
this.size = val;
|
|
|
- // this.getUsers();
|
|
|
+ this.getMoldList();
|
|
|
},
|
|
|
|
|
|
//获取模具列表
|
|
@@ -211,7 +207,9 @@
|
|
|
this.http.post(this.port.mold.molds, {
|
|
|
keyName: this.filters.keyName,
|
|
|
currentPage: this.page,
|
|
|
- pageSize: this.size
|
|
|
+ pageSize: this.size,
|
|
|
+ projectId: this.filters.projectId == ""?-1:this.filters.projectId,
|
|
|
+ serchType: this.filters.serchType
|
|
|
}, res => {
|
|
|
this.listLoading = false;
|
|
|
if (res.code == "ok") {
|
|
@@ -279,10 +277,15 @@
|
|
|
created() {
|
|
|
let height = window.innerHeight;
|
|
|
this.tableHeight = height - 210;
|
|
|
+ const that = this;
|
|
|
+ window.onresize = function temp() {
|
|
|
+ that.tableHeight = window.innerHeight - 210;
|
|
|
+ };
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getMsg();
|
|
|
this.getMoldList();
|
|
|
+
|
|
|
}
|
|
|
};
|
|
|
</script>
|