|  | @@ -143,7 +143,7 @@
 | 
	
		
			
				|  |  |              
 | 
	
		
			
				|  |  |              <!-- 上传 报废5 时 -->
 | 
	
		
			
				|  |  |              <el-button
 | 
	
		
			
				|  |  | -                v-show="activeTab == 5 && update == 1"
 | 
	
		
			
				|  |  | +                v-show="activeTab == 5 && update == 1 && abandonAble"
 | 
	
		
			
				|  |  |                  size="mini"
 | 
	
		
			
				|  |  |                  type="primary"
 | 
	
		
			
				|  |  |                  style="float: right;"
 | 
	
	
		
			
				|  | @@ -210,12 +210,14 @@
 | 
	
		
			
				|  |  |                          </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" 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>
 | 
	
		
			
				|  |  |                          </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>
 | 
	
		
			
				|  |  | +                                <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>
 | 
	
		
			
				|  |  |                          </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">
 | 
	
		
			
				|  |  | -            <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">
 | 
	
		
			
				|  |  |                  <el-button @click="check(false)">不通过</el-button>
 | 
	
		
			
				|  |  |                  <el-button type="primary" @click="check(true)">通过</el-button>
 | 
	
	
		
			
				|  | @@ -613,6 +624,8 @@
 | 
	
		
			
				|  |  |                  canInitiate: true,
 | 
	
		
			
				|  |  |                  //根据状态判断能否更新
 | 
	
		
			
				|  |  |                  updateAble: true,
 | 
	
		
			
				|  |  | +                //能否进行报废
 | 
	
		
			
				|  |  | +                abandonAble: false,
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                  //6种文档
 | 
	
		
			
				|  |  |                  documents: {
 | 
	
	
		
			
				|  | @@ -647,6 +660,8 @@
 | 
	
		
			
				|  |  |                  activeArticleId: null,
 | 
	
		
			
				|  |  |                  activeFileName: null,
 | 
	
		
			
				|  |  |                  fileUrl: null,
 | 
	
		
			
				|  |  | +                part2dFile: null,
 | 
	
		
			
				|  |  | +                part3dFile: null,
 | 
	
		
			
				|  |  |                  
 | 
	
		
			
				|  |  |                  boxes: [],
 | 
	
		
			
				|  |  |                  companys: [],
 | 
	
	
		
			
				|  | @@ -686,11 +701,11 @@
 | 
	
		
			
				|  |  |              },
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              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") {
 | 
	
		
			
				|  |  |                      this.$router.go(0);
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | -                this.$router.push('/mould/' + id);
 | 
	
		
			
				|  |  |              },
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              //标签页面切换时
 | 
	
	
		
			
				|  | @@ -841,6 +856,8 @@
 | 
	
		
			
				|  |  |                          this.getOperationRecord(this.activeTab);
 | 
	
		
			
				|  |  |                          //顺便再看看可不可以申请更新
 | 
	
		
			
				|  |  |                          this.checkUpdateState();
 | 
	
		
			
				|  |  | +                        //顺便再看看能不能报废
 | 
	
		
			
				|  |  | +                        this.checkAbandonState();
 | 
	
		
			
				|  |  |                      } else {
 | 
	
		
			
				|  |  |                          this.$message({
 | 
	
		
			
				|  |  |                              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下
 | 
	
		
			
				|  |  |              setList(list, num) {
 | 
	
		
			
				|  |  |                  var array = [];
 | 
	
	
		
			
				|  | @@ -915,12 +943,16 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              //打开审批窗口
 | 
	
		
			
				|  |  |              checkOpenPort(row) {
 | 
	
		
			
				|  |  | +                this.part2dFile = null;
 | 
	
		
			
				|  |  | +                this.part3dFile = null;
 | 
	
		
			
				|  |  |                  if(row.part2dFile != null) {
 | 
	
		
			
				|  |  |                      this.twoId = row.part2dFile.id
 | 
	
		
			
				|  |  | +                    this.part2dFile = row.part2dFile;
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                  if(row.part3dFile != null) {
 | 
	
		
			
				|  |  |                      this.threeId = row.part3dFile.id
 | 
	
		
			
				|  |  | +                    this.part3dFile = row.part3dFile;
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  this.activeArticleId = null;
 | 
	
		
			
				|  |  |                  this.activeFileName = null;
 |