|
@@ -204,51 +204,43 @@
|
|
|
<el-table-column prop="isVulnerable" label="易损件" align="center" width="100" sortable>
|
|
|
<template slot-scope="scope">{{scope.row.isVulnerable==0?'否':'是'}}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="part3dFile.fileName" label="3D图档" width="200" sortable></el-table-column>
|
|
|
- <el-table-column prop="part2dFile.fileName" label="2D图档" width="200" sortable></el-table-column>
|
|
|
+ <el-table-column prop="part3dFile.fileName" label="3D图档" width="200" sortable>
|
|
|
+ <template slot-scope="scope" v-if="scope.row.part3dFile != null">
|
|
|
+ <a class="download" :href="scope.row.part3dFile.fileUrl" :download="scope.row.part3dFile.fileName">{{scope.row.part3dFile.fileName}}</a>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="part2dFile.fileName" label="2D图档" width="200" sortable>
|
|
|
+ <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>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="indate" label="上传时间" width="200" align="center" sortable></el-table-column>
|
|
|
<el-table-column label="状态" width="120" align="center" sortable>
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.part3dFile != null && scope.row.part2dFile == null">
|
|
|
- <span v-if="scope.row.part3dFile.state == -2">生产方审核不通过</span>
|
|
|
- <span v-else-if="scope.row.part3dFile.state == -1">资产方审核不通过</span>
|
|
|
- <span v-else-if="scope.row.part3dFile.state == 0">待双方审核</span>
|
|
|
- <span v-else-if="scope.row.part3dFile.state == 1">待生产方审核</span>
|
|
|
- <span v-else-if="scope.row.part3dFile.state == 2">待资产方审核</span>
|
|
|
- <span v-else-if="scope.row.part3dFile.state == 3">审核通过</span>
|
|
|
- </span>
|
|
|
- <span v-if="scope.row.part3dFile == null && scope.row.part2dFile != null">
|
|
|
- <span v-if="scope.row.part2dFile.state == -2">生产方审核不通过</span>
|
|
|
- <span v-else-if="scope.row.part2dFile.state == -1">资产方审核不通过</span>
|
|
|
- <span v-else-if="scope.row.part2dFile.state == 0">待双方审核</span>
|
|
|
- <span v-else-if="scope.row.part2dFile.state == 1">待生产方审核</span>
|
|
|
- <span v-else-if="scope.row.part2dFile.state == 2">待资产方审核</span>
|
|
|
- <span v-else-if="scope.row.part2dFile.state == 3">审核通过</span>
|
|
|
- </span>
|
|
|
- <span v-if="scope.row.part3dFile != null && scope.row.part2dFile != null">
|
|
|
- <span v-if="scope.row.part2dFile.state == -2">生产方审核不通过</span>
|
|
|
- <span v-else-if="scope.row.part2dFile.state == -1">资产方审核不通过</span>
|
|
|
- <span v-else-if="scope.row.part2dFile.state == 0">待双方审核</span>
|
|
|
- <span v-else-if="scope.row.part2dFile.state == 1">待生产方审核</span>
|
|
|
- <span v-else-if="scope.row.part2dFile.state == 2">待资产方审核</span>
|
|
|
- <span v-else-if="scope.row.part2dFile.state == 3">审核通过</span>
|
|
|
- </span>
|
|
|
+ <span v-if="scope.row.state == -2">生产方审核不通过</span>
|
|
|
+ <span v-else-if="scope.row.state == -1">资产方审核不通过</span>
|
|
|
+ <span v-else-if="scope.row.state == 0">待双方审核</span>
|
|
|
+ <span v-else-if="scope.row.state == 1">待生产方审核</span>
|
|
|
+ <span v-else-if="scope.row.state == 2">待资产方审核</span>
|
|
|
+ <span v-else-if="scope.row.state == 3">审核通过</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" width="200" align="center" sortable>
|
|
|
<template slot-scope="scope">
|
|
|
<el-button size="small"
|
|
|
- v-if="approve == 1 && (scope.row.state == 0 || (scope.row.state == 1 && user.subordinateType == 1) || (scope.row.state == 2 && user.subordinateType == 0))"
|
|
|
- @click="checkOpen(scope.row.id, scope.row.fileName)">审批</el-button>
|
|
|
+ v-if="approve == 1 && (scope.row.state == 0
|
|
|
+ || (scope.row.state == 1 && user.subordinateType == 1)
|
|
|
+ || (scope.row.state == 2 && user.subordinateType == 0))"
|
|
|
+ @click="checkOpenPort(scope.row)">审批</el-button>
|
|
|
<el-button size="small" @click="editPort(scope.row)" v-if="scope.row.creatorId == user.id">
|
|
|
修改
|
|
|
</el-button>
|
|
|
- <el-button size="small" @click="dowloadfile(scope.row.id)" v-if="download == 1 && scope.row.state == 3">
|
|
|
+ <!-- <el-button size="small" @click="dowloadfile(scope.row.id)" v-if="download == 1 && scope.row.state == 3 ">
|
|
|
<a :href="scope.row.fileUrl" :download="scope.row.fileName">下载 </a>
|
|
|
- </el-button>
|
|
|
- <el-button size="small"
|
|
|
+ </el-button> -->
|
|
|
+ <!-- <el-button size="small"
|
|
|
v-if="scope.row.uplodtorId == user.id && scope.row.state <= 0"
|
|
|
- @click="deleteFile(scope.row.id)" type="danger">删除</el-button>
|
|
|
+ @click="deleteFile(scope.row.id)" type="danger">删除</el-button> -->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -630,7 +622,10 @@
|
|
|
flag: 1
|
|
|
},
|
|
|
|
|
|
- files: []
|
|
|
+ files: [],
|
|
|
+
|
|
|
+ twoId: null,
|
|
|
+ threeId: null,
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -834,6 +829,22 @@
|
|
|
checkOpen(id, name) {
|
|
|
this.activeArticleId = id;
|
|
|
this.activeFileName = name;
|
|
|
+ this.twoId = null;
|
|
|
+ this.threeId = null;
|
|
|
+ this.centerDialogVisible = true;
|
|
|
+ },
|
|
|
+
|
|
|
+ //打开审批窗口
|
|
|
+ checkOpenPort(row) {
|
|
|
+ if(row.part2dFile != null) {
|
|
|
+ this.twoId = row.part2dFile.id
|
|
|
+ }
|
|
|
+
|
|
|
+ if(row.part3dFile != null) {
|
|
|
+ this.threeId = row.part3dFile.id
|
|
|
+ }
|
|
|
+ this.activeArticleId = null;
|
|
|
+ this.activeFileName = null;
|
|
|
this.centerDialogVisible = true;
|
|
|
},
|
|
|
|
|
@@ -848,9 +859,21 @@
|
|
|
|
|
|
//审批文件
|
|
|
check(adoption) {
|
|
|
+ if(this.activeArticleId != null) {
|
|
|
+ this.onSubMit(this.activeArticleId , adoption , 0)
|
|
|
+ }
|
|
|
+ if(this.twoId != null) {
|
|
|
+ this.onSubMit(this.twoId , adoption , 1)
|
|
|
+ }
|
|
|
+ if(this.threeId != null) {
|
|
|
+ this.onSubMit(this.threeId , adoption , 1)
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ onSubMit(id , type , from) {
|
|
|
this.http.post( this.port.mold.moldFileCheck, {
|
|
|
- mouldFileId: this.activeArticleId,
|
|
|
- isPass: adoption ? 1 : 0 //通过为1 不通过为0
|
|
|
+ mouldFileId: id,
|
|
|
+ isPass: type ? 1 : 0 //通过为1 不通过为0
|
|
|
},
|
|
|
res => {
|
|
|
if (res.code == "ok") {
|
|
@@ -859,7 +882,11 @@
|
|
|
message: "审批成功",
|
|
|
type: "success"
|
|
|
});
|
|
|
- this.getDocument();
|
|
|
+ if(from == 0){
|
|
|
+ this.getDocument();
|
|
|
+ } else {
|
|
|
+ this.getPartList();
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: res.msg,
|
|
@@ -1005,7 +1032,6 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
|
|
|
//打开零件修改
|
|
|
editPort(row) {
|
|
@@ -1063,7 +1089,14 @@
|
|
|
},
|
|
|
res => {
|
|
|
if (res.code == "ok") {
|
|
|
- this.documents.part = res.data;
|
|
|
+ var list = res.data;
|
|
|
+ for(var i in list){
|
|
|
+ if(list[i].state == null){
|
|
|
+ list[i].state = 100;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log(list)
|
|
|
+ this.documents.part = list;
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: res.msg,
|
|
@@ -1239,6 +1272,12 @@
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
|
|
|
+ .download {
|
|
|
+ text-decoration:none;
|
|
|
+ color: #20a0ff;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+
|
|
|
.info {
|
|
|
color: grey;
|
|
|
}
|