|
@@ -143,7 +143,7 @@
|
|
|
|
|
|
<!-- 上传 报废5 时 -->
|
|
<!-- 上传 报废5 时 -->
|
|
<el-button
|
|
<el-button
|
|
- v-show="activeTab == 5 && update == 1"
|
|
|
|
|
|
+ v-show="activeTab == 5 && update == 1 && abandonAble"
|
|
size="mini"
|
|
size="mini"
|
|
type="primary"
|
|
type="primary"
|
|
style="float: right;"
|
|
style="float: right;"
|
|
@@ -210,12 +210,14 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="part3dFile.fileName" label="3D图档" width="200" sortable>
|
|
<el-table-column prop="part3dFile.fileName" label="3D图档" width="200" sortable>
|
|
<template slot-scope="scope" v-if="scope.row.part3dFile != null">
|
|
<template slot-scope="scope" v-if="scope.row.part3dFile != null">
|
|
- <a class="download" :href="scope.row.part3dFile.fileUrl" target="_blank">{{scope.row.part3dFile.fileName}}</a>
|
|
|
|
|
|
+ <a v-if="scope.row.state == 3 && download == 1" class="download" :href="scope.row.part3dFile.fileUrl" target="_blank">{{scope.row.part3dFile.fileName}}</a>
|
|
|
|
+ <span v-else>{{scope.row.part2dFile.fileName}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="part2dFile.fileName" label="2D图档" width="200" sortable>
|
|
<el-table-column prop="part2dFile.fileName" label="2D图档" width="200" sortable>
|
|
<template slot-scope="scope" v-if="scope.row.part2dFile != null">
|
|
<template slot-scope="scope" v-if="scope.row.part2dFile != null">
|
|
- <a class="download" :href="scope.row.part2dFile.fileUrl" :download="scope.row.part2dFile.fileName">{{scope.row.part2dFile.fileName}}</a>
|
|
|
|
|
|
+ <a v-if="scope.row.state == 3 && download == 1" class="download" :href="scope.row.part2dFile.fileUrl" :download="scope.row.part2dFile.fileName">{{scope.row.part2dFile.fileName}}</a>
|
|
|
|
+ <span v-else>{{scope.row.part2dFile.fileName}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="indate" label="上传时间" width="200" align="center" sortable></el-table-column>
|
|
<el-table-column prop="indate" label="上传时间" width="200" align="center" sortable></el-table-column>
|
|
@@ -430,7 +432,16 @@
|
|
|
|
|
|
<!-- 审批弹窗 -->
|
|
<!-- 审批弹窗 -->
|
|
<el-dialog title="审批" :visible.sync="centerDialogVisible" width="450px">
|
|
<el-dialog title="审批" :visible.sync="centerDialogVisible" width="450px">
|
|
- <a :href="this.fileUrl" :download="this.activeFileName"><el-link type="primary">{{this.activeFileName}}</el-link></a>
|
|
|
|
|
|
+ <a v-if="this.activeFileName != null" :href="this.fileUrl" :download="this.activeFileName"><el-link type="primary">{{this.activeFileName}}</el-link></a>
|
|
|
|
+ <div v-else>
|
|
|
|
+ <div v-if="this.part2dFile != null">
|
|
|
|
+ 2D:<a :href="this.part2dFile.fileUrl" :download="this.part2dFile.fileName"><el-link type="primary">{{this.part2dFile.fileName}}</el-link></a>
|
|
|
|
+ </div>
|
|
|
|
+ </br>
|
|
|
|
+ <div v-if="this.part2dFile != null">
|
|
|
|
+ 3D:<a :href="this.part3dFile.fileUrl" :download="this.part3dFile.fileName"><el-link type="primary">{{this.part3dFile.fileName}}</el-link></a>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button @click="check(false)">不通过</el-button>
|
|
<el-button @click="check(false)">不通过</el-button>
|
|
<el-button type="primary" @click="check(true)">通过</el-button>
|
|
<el-button type="primary" @click="check(true)">通过</el-button>
|
|
@@ -613,6 +624,8 @@
|
|
canInitiate: true,
|
|
canInitiate: true,
|
|
//根据状态判断能否更新
|
|
//根据状态判断能否更新
|
|
updateAble: true,
|
|
updateAble: true,
|
|
|
|
+ //能否进行报废
|
|
|
|
+ abandonAble: false,
|
|
|
|
|
|
//6种文档
|
|
//6种文档
|
|
documents: {
|
|
documents: {
|
|
@@ -647,6 +660,8 @@
|
|
activeArticleId: null,
|
|
activeArticleId: null,
|
|
activeFileName: null,
|
|
activeFileName: null,
|
|
fileUrl: null,
|
|
fileUrl: null,
|
|
|
|
+ part2dFile: null,
|
|
|
|
+ part3dFile: null,
|
|
|
|
|
|
boxes: [],
|
|
boxes: [],
|
|
companys: [],
|
|
companys: [],
|
|
@@ -686,11 +701,11 @@
|
|
},
|
|
},
|
|
|
|
|
|
toAnotherMould(id){
|
|
toAnotherMould(id){
|
|
- var currentRoute = this.$route.path.split("/");
|
|
|
|
|
|
+ var currentRoute = this.$route.path.split("/");
|
|
|
|
+ this.$router.push('/mould/' + id);
|
|
if (currentRoute.length == 3 && currentRoute[1] == "moldList") {
|
|
if (currentRoute.length == 3 && currentRoute[1] == "moldList") {
|
|
this.$router.go(0);
|
|
this.$router.go(0);
|
|
}
|
|
}
|
|
- this.$router.push('/mould/' + id);
|
|
|
|
},
|
|
},
|
|
|
|
|
|
//标签页面切换时
|
|
//标签页面切换时
|
|
@@ -841,6 +856,8 @@
|
|
this.getOperationRecord(this.activeTab);
|
|
this.getOperationRecord(this.activeTab);
|
|
//顺便再看看可不可以申请更新
|
|
//顺便再看看可不可以申请更新
|
|
this.checkUpdateState();
|
|
this.checkUpdateState();
|
|
|
|
+ //顺便再看看能不能报废
|
|
|
|
+ this.checkAbandonState();
|
|
} else {
|
|
} else {
|
|
this.$message({
|
|
this.$message({
|
|
message: res.msg,
|
|
message: res.msg,
|
|
@@ -867,6 +884,17 @@
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ //查看有无审核中或者审核成功的报废申请
|
|
|
|
+ checkAbandonState(){
|
|
|
|
+ this.abandonAble = true;
|
|
|
|
+ this.documents.abandon.forEach(item => {
|
|
|
|
+ if(item.state != "-1" || item.state != "-2"){
|
|
|
|
+ //有进行中的报废申请 现在不能再申请报废了
|
|
|
|
+ this.abandonAble = false;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
//将list中对应的文件传入相应的document下
|
|
//将list中对应的文件传入相应的document下
|
|
setList(list, num) {
|
|
setList(list, num) {
|
|
var array = [];
|
|
var array = [];
|
|
@@ -915,12 +943,16 @@
|
|
|
|
|
|
//打开审批窗口
|
|
//打开审批窗口
|
|
checkOpenPort(row) {
|
|
checkOpenPort(row) {
|
|
|
|
+ this.part2dFile = null;
|
|
|
|
+ this.part3dFile = null;
|
|
if(row.part2dFile != null) {
|
|
if(row.part2dFile != null) {
|
|
this.twoId = row.part2dFile.id
|
|
this.twoId = row.part2dFile.id
|
|
|
|
+ this.part2dFile = row.part2dFile;
|
|
}
|
|
}
|
|
|
|
|
|
if(row.part3dFile != null) {
|
|
if(row.part3dFile != null) {
|
|
this.threeId = row.part3dFile.id
|
|
this.threeId = row.part3dFile.id
|
|
|
|
+ this.part3dFile = row.part3dFile;
|
|
}
|
|
}
|
|
this.activeArticleId = null;
|
|
this.activeArticleId = null;
|
|
this.activeFileName = null;
|
|
this.activeFileName = null;
|